mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-07-15 11:45:22 +02:00
[svn r44] Lots of bug fixes.
New array literal support New array ~= operator support (for single element) New with statement support More...
This commit is contained in:
@@ -31,7 +31,8 @@ Declaration::Declaration(Identifier *id)
|
||||
type = NULL;
|
||||
storage_class = STCundefined;
|
||||
protection = PROTundefined;
|
||||
linkage = LINKdefault;
|
||||
linkage = LINKdefault;
|
||||
llvmTouched = false;
|
||||
}
|
||||
|
||||
void Declaration::semantic(Scope *sc)
|
||||
|
||||
@@ -125,7 +125,9 @@ struct Declaration : Dsymbol
|
||||
|
||||
Declaration *isDeclaration() { return this; }
|
||||
|
||||
virtual void toObjFile(); // compile to .obj file
|
||||
virtual void toObjFile(); // compile to .obj file
|
||||
|
||||
bool llvmTouched;
|
||||
};
|
||||
|
||||
/**************************************************************/
|
||||
|
||||
@@ -46,6 +46,7 @@ struct Symbol; // back end symbol
|
||||
|
||||
namespace llvm
|
||||
{
|
||||
class Constant;
|
||||
class ConstantInt;
|
||||
}
|
||||
|
||||
@@ -147,6 +148,8 @@ struct Expression : Object
|
||||
// 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 @@ struct IntegerExp : Expression
|
||||
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 @@ struct RealExp : Expression
|
||||
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 @@ struct NullExp : Expression
|
||||
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 @@ struct StringExp : Expression
|
||||
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 @@ struct ArrayLiteralExp : Expression
|
||||
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 @@ struct AssocArrayLiteralExp : Expression
|
||||
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 @@ struct StructLiteralExp : Expression
|
||||
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 @@ struct VarExp : Expression
|
||||
int inlineCost(InlineCostState *ics);
|
||||
Expression *doInline(InlineDoState *ids);
|
||||
//Expression *inlineScan(InlineScanState *iss);
|
||||
// LLVMDC
|
||||
virtual llvm::Constant *toConstElem(IRState *irs);
|
||||
};
|
||||
|
||||
// Function/Delegate literal
|
||||
|
||||
@@ -192,16 +192,16 @@ Usage:\n\
|
||||
x86 x86-64 ppc32 ppc64\n\
|
||||
-nofloat do not emit reference to floating point\n\
|
||||
-noruntime do not allow code that generates implicit runtime calls\n\
|
||||
-novalidate do not run the validation pass before writing bitcode\n\
|
||||
-noverify do not run the validation pass before writing bitcode\n\
|
||||
-O optimize, same as -O2\n\
|
||||
-O<n> optimize at level <n> (0-5)\n\
|
||||
-o- do not write object file\n\
|
||||
-od<objdir> write object files to directory <objdir>\n\
|
||||
-of<filename> name output file to <filename>\n\
|
||||
-op do not strip paths from source file\n\
|
||||
-profile profile runtime performance of generated code\n\
|
||||
-profile profile runtime performance of generated code\n\
|
||||
-quiet suppress unnecessary messages\n\
|
||||
-release compile release version\n\
|
||||
-release compile release version\n\
|
||||
-run srcfile args... run resulting program, passing args\n\
|
||||
-unittest compile in unit tests\n\
|
||||
-v verbose\n\
|
||||
@@ -382,7 +382,7 @@ int main(int argc, char *argv[])
|
||||
global.params.forceBE = 1;
|
||||
else if (strcmp(p + 1, "noruntime") == 0)
|
||||
global.params.noruntime = 1;
|
||||
else if (strcmp(p + 1, "novalidate") == 0)
|
||||
else if (strcmp(p + 1, "noverify") == 0)
|
||||
global.params.novalidate = 1;
|
||||
else if (p[1] == 'o')
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user