diff dmd/expression.h @ 40:8b0e809563df trunk

[svn r44] Lots of bug fixes. New array literal support New array ~= operator support (for single element) New with statement support More...
author lindquist
date Fri, 19 Oct 2007 07:43:21 +0200
parents 3cfcb944304e
children fd32135dca3e
line wrap: on
line diff
--- a/dmd/expression.h	Wed Oct 10 06:21:31 2007 +0200
+++ b/dmd/expression.h	Fri Oct 19 07:43:21 2007 +0200
@@ -46,6 +46,7 @@
 
 namespace llvm
 {
+    class Constant;
     class ConstantInt;
 }
 
@@ -147,6 +148,8 @@
     // Back end
     virtual elem *toElem(IRState *irs);
     virtual dt_t **toDt(dt_t **pdt);
+    // LLVMDC
+    virtual llvm::Constant *toConstElem(IRState *irs);
 };
 
 struct IntegerExp : Expression
@@ -172,6 +175,8 @@
     Expression *toLvalue(Scope *sc, Expression *e);
     elem *toElem(IRState *irs);
     dt_t **toDt(dt_t **pdt);
+    // LLVMDC
+    virtual llvm::Constant *toConstElem(IRState *irs);
 };
 
 struct RealExp : Expression
@@ -195,6 +200,8 @@
     void toMangleBuffer(OutBuffer *buf);
     elem *toElem(IRState *irs);
     dt_t **toDt(dt_t **pdt);
+    // LLVMDC
+    virtual llvm::Constant *toConstElem(IRState *irs);
 };
 
 struct ComplexExp : Expression
@@ -298,6 +305,8 @@
     Expression *interpret(InterState *istate);
     elem *toElem(IRState *irs);
     dt_t **toDt(dt_t **pdt);
+    // LLVMDC
+    virtual llvm::Constant *toConstElem(IRState *irs);
 };
 
 struct StringExp : Expression
@@ -326,6 +335,8 @@
     void toMangleBuffer(OutBuffer *buf);
     elem *toElem(IRState *irs);
     dt_t **toDt(dt_t **pdt);
+    // LLVMDC
+    virtual llvm::Constant *toConstElem(IRState *irs);
 };
 
 // Tuple
@@ -376,6 +387,8 @@
     int inlineCost(InlineCostState *ics);
     Expression *doInline(InlineDoState *ids);
     Expression *inlineScan(InlineScanState *iss);
+    // LLVMDC
+    virtual llvm::Constant *toConstElem(IRState *irs);
 };
 
 struct AssocArrayLiteralExp : Expression
@@ -401,6 +414,8 @@
     int inlineCost(InlineCostState *ics);
     Expression *doInline(InlineDoState *ids);
     Expression *inlineScan(InlineScanState *iss);
+    // LLVMDC
+    virtual llvm::Constant *toConstElem(IRState *irs);
 };
 
 struct StructLiteralExp : Expression
@@ -432,6 +447,8 @@
     int inlineCost(InlineCostState *ics);
     Expression *doInline(InlineDoState *ids);
     Expression *inlineScan(InlineScanState *iss);
+    // LLVMDC
+    virtual llvm::Constant *toConstElem(IRState *irs);
 };
 
 struct TypeDotIdExp : Expression
@@ -564,6 +581,8 @@
     int inlineCost(InlineCostState *ics);
     Expression *doInline(InlineDoState *ids);
     //Expression *inlineScan(InlineScanState *iss);
+    // LLVMDC
+    virtual llvm::Constant *toConstElem(IRState *irs);
 };
 
 // Function/Delegate literal