First merge of 2.064 beta.

This corresponds to DMD commit a913ce4bc59a94a022a27e390fc841f4aededffb.

Doesn't build Phobos yet.
This commit is contained in:
David Nadlinger
2013-10-19 23:21:53 +02:00
committed by Kai Nacke
parent c400d180d2
commit cb341586e3
130 changed files with 13566 additions and 9190 deletions

View File

@@ -23,40 +23,42 @@
struct OutBuffer;
struct Scope;
struct Expression;
struct LabelDsymbol;
struct Identifier;
struct IfStatement;
struct ExpStatement;
struct DefaultStatement;
struct VarDeclaration;
struct Condition;
struct Module;
class Expression;
class LabelDsymbol;
class Identifier;
class IfStatement;
class ExpStatement;
class DefaultStatement;
class VarDeclaration;
class Condition;
class Module;
struct Token;
struct InlineCostState;
struct InlineDoState;
struct InlineScanState;
struct ReturnStatement;
struct CompoundStatement;
struct Parameter;
struct StaticAssert;
struct AsmStatement;
class ErrorStatement;
class ReturnStatement;
class CompoundStatement;
class Parameter;
class StaticAssert;
class AsmStatement;
#if IN_LLVM
struct AsmBlockStatement;
class AsmBlockStatement;
#endif
struct GotoStatement;
struct ScopeStatement;
struct TryCatchStatement;
struct TryFinallyStatement;
struct CaseStatement;
struct DefaultStatement;
struct LabelStatement;
class GotoStatement;
class ScopeStatement;
class TryCatchStatement;
class TryFinallyStatement;
class CaseStatement;
class DefaultStatement;
class LabelStatement;
struct HdrGenState;
struct InterState;
struct CompiledCtfeFunction;
#if IN_LLVM
struct CaseStatement;
struct LabelStatement;
struct SynchronizedStatement;
class CaseStatement;
class LabelStatement;
class SynchronizedStatement;
#endif
enum TOK;
@@ -77,8 +79,8 @@ struct IRState;
struct Blockx;
#ifdef IN_GCC
union tree_node; typedef union tree_node block;
union tree_node; typedef union tree_node elem;
typedef union tree_node block;
typedef union tree_node elem;
#elif IN_LLVM
class DValue;
typedef DValue elem;
@@ -100,11 +102,13 @@ enum BE
BEhalt = 0x10,
BEbreak = 0x20,
BEcontinue = 0x40,
BEerrthrow = 0x80,
BEany = (BEfallthru | BEthrow | BEreturn | BEgoto | BEhalt),
};
struct Statement : Object
class Statement : public RootObject
{
public:
Loc loc;
virtual ~Statement() {}
@@ -118,7 +122,6 @@ struct Statement : Object
void warning(const char *format, ...);
void deprecation(const char *format, ...);
virtual void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
virtual ScopeStatement *isScopeStatement() { return NULL; }
virtual Statement *semantic(Scope *sc);
Statement *semanticScope(Scope *sc, Statement *sbreak, Statement *scontinue);
Statement *semanticNoScope(Scope *sc);
@@ -136,6 +139,7 @@ struct Statement : Object
virtual Statements *flatten(Scope *sc);
virtual Expression *interpret(InterState *istate);
virtual bool apply(sapply_fp_t fp, void *param);
virtual void ctfeCompile(CompiledCtfeFunction *ccf);
virtual Statement *last();
virtual int inlineCost(InlineCostState *ics);
@@ -147,6 +151,8 @@ struct Statement : Object
virtual void toIR(IRState *irs);
// Avoid dynamic_cast
virtual ErrorStatement *isErrorStatement() { return NULL; }
virtual ScopeStatement *isScopeStatement() { return NULL; }
virtual ExpStatement *isExpStatement() { return NULL; }
virtual CompoundStatement *isCompoundStatement() { return NULL; }
virtual ReturnStatement *isReturnStatement() { return NULL; }
@@ -162,8 +168,23 @@ struct Statement : Object
#endif
};
struct PeelStatement : Statement
/** Any Statement that fails semantic() or has a component that is an ErrorExp or
* a TypeError should return an ErrorStatement from semantic().
*/
class ErrorStatement : public Statement
{
public:
ErrorStatement();
Statement *syntaxCopy();
Statement *semantic(Scope *sc);
int blockExit(bool mustNotThrow);
ErrorStatement *isErrorStatement() { return this; }
};
class PeelStatement : public Statement
{
public:
Statement *s;
PeelStatement(Statement *s);
@@ -171,8 +192,9 @@ struct PeelStatement : Statement
bool apply(sapply_fp_t fp, void *param);
};
struct ExpStatement : Statement
class ExpStatement : public Statement
{
public:
Expression *exp;
ExpStatement(Loc loc, Expression *exp);
@@ -181,6 +203,7 @@ struct ExpStatement : Statement
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
Statement *semantic(Scope *sc);
Expression *interpret(InterState *istate);
void ctfeCompile(CompiledCtfeFunction *ccf);
int blockExit(bool mustNotThrow);
bool hasCodeImpl();
Statement *scopeCode(Scope *sc, Statement **sentry, Statement **sexit, Statement **sfinally);
@@ -198,8 +221,9 @@ struct ExpStatement : Statement
#endif
};
struct DtorExpStatement : ExpStatement
class DtorExpStatement : public ExpStatement
{
public:
/* Wraps an expression that is the destruction of 'var'
*/
@@ -210,8 +234,9 @@ struct DtorExpStatement : ExpStatement
void toIR(IRState *irs);
};
struct CompileStatement : Statement
class CompileStatement : public Statement
{
public:
Expression *exp;
CompileStatement(Loc loc, Expression *exp);
@@ -222,8 +247,9 @@ struct CompileStatement : Statement
int blockExit(bool mustNotThrow);
};
struct CompoundStatement : Statement
class CompoundStatement : public Statement
{
public:
Statements *statements;
CompoundStatement(Loc loc, Statements *s);
@@ -238,6 +264,7 @@ struct CompoundStatement : Statement
ReturnStatement *isReturnStatement();
Expression *interpret(InterState *istate);
bool apply(sapply_fp_t fp, void *param);
void ctfeCompile(CompiledCtfeFunction *ccf);
Statement *last();
int inlineCost(InlineCostState *ics);
@@ -255,8 +282,9 @@ struct CompoundStatement : Statement
#endif
};
struct CompoundDeclarationStatement : CompoundStatement
class CompoundDeclarationStatement : public CompoundStatement
{
public:
CompoundDeclarationStatement(Loc loc, Statements *s);
Statement *syntaxCopy();
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
@@ -265,8 +293,9 @@ struct CompoundDeclarationStatement : CompoundStatement
/* The purpose of this is so that continue will go to the next
* of the statements, and break will go to the end of the statements.
*/
struct UnrolledLoopStatement : Statement
class UnrolledLoopStatement : public Statement
{
public:
Statements *statements;
UnrolledLoopStatement(Loc loc, Statements *statements);
@@ -277,6 +306,7 @@ struct UnrolledLoopStatement : Statement
int blockExit(bool mustNotThrow);
Expression *interpret(InterState *istate);
bool apply(sapply_fp_t fp, void *param);
void ctfeCompile(CompiledCtfeFunction *ccf);
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
int inlineCost(InlineCostState *ics);
@@ -287,8 +317,9 @@ struct UnrolledLoopStatement : Statement
void toIR(IRState *irs);
};
struct ScopeStatement : Statement
class ScopeStatement : public Statement
{
public:
Statement *statement;
ScopeStatement(Loc loc, Statement *s);
@@ -302,6 +333,7 @@ struct ScopeStatement : Statement
bool hasCodeImpl();
Expression *interpret(InterState *istate);
bool apply(sapply_fp_t fp, void *param);
void ctfeCompile(CompiledCtfeFunction *ccf);
int inlineCost(InlineCostState *ics);
Expression *doInline(InlineDoState *ids);
@@ -311,8 +343,9 @@ struct ScopeStatement : Statement
void toIR(IRState *irs);
};
struct WhileStatement : Statement
class WhileStatement : public Statement
{
public:
Expression *condition;
Statement *body;
@@ -324,6 +357,7 @@ struct WhileStatement : Statement
int blockExit(bool mustNotThrow);
Expression *interpret(InterState *istate);
bool apply(sapply_fp_t fp, void *param);
void ctfeCompile(CompiledCtfeFunction *ccf);
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
Statement *inlineScan(InlineScanState *iss);
@@ -331,8 +365,9 @@ struct WhileStatement : Statement
void toIR(IRState *irs);
};
struct DoStatement : Statement
class DoStatement : public Statement
{
public:
Statement *body;
Expression *condition;
@@ -344,6 +379,7 @@ struct DoStatement : Statement
int blockExit(bool mustNotThrow);
Expression *interpret(InterState *istate);
bool apply(sapply_fp_t fp, void *param);
void ctfeCompile(CompiledCtfeFunction *ccf);
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
Statement *inlineScan(InlineScanState *iss);
@@ -351,13 +387,13 @@ struct DoStatement : Statement
void toIR(IRState *irs);
};
struct ForStatement : Statement
class ForStatement : public Statement
{
public:
Statement *init;
Expression *condition;
Expression *increment;
Statement *body;
int nest;
// When wrapped in try/finally clauses, this points to the outermost one,
// which may have an associated label. Internal break/continue statements
@@ -366,7 +402,6 @@ struct ForStatement : Statement
ForStatement(Loc loc, Statement *init, Expression *condition, Expression *increment, Statement *body);
Statement *syntaxCopy();
Statement *semanticInit(Scope *sc, Statements *ainit, size_t i);
Statement *semantic(Scope *sc);
Statement *scopeCode(Scope *sc, Statement **sentry, Statement **sexit, Statement **sfinally);
Statement *getRelatedLabeled() { return relatedLabeled ? relatedLabeled : this; }
@@ -375,6 +410,7 @@ struct ForStatement : Statement
int blockExit(bool mustNotThrow);
Expression *interpret(InterState *istate);
bool apply(sapply_fp_t fp, void *param);
void ctfeCompile(CompiledCtfeFunction *ccf);
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
int inlineCost(InlineCostState *ics);
@@ -384,9 +420,10 @@ struct ForStatement : Statement
void toIR(IRState *irs);
};
struct ForeachStatement : Statement
class ForeachStatement : public Statement
{
enum TOK op; // TOKforeach or TOKforeach_reverse
public:
TOK op; // TOKforeach or TOKforeach_reverse
Parameters *arguments; // array of Parameter*'s
Expression *aggr;
Statement *body;
@@ -399,7 +436,7 @@ struct ForeachStatement : Statement
Statements *cases; // put breaks, continues, gotos and returns here
CompoundStatements *gotos; // forward referenced goto's go here
ForeachStatement(Loc loc, enum TOK op, Parameters *arguments, Expression *aggr, Statement *body);
ForeachStatement(Loc loc, TOK op, Parameters *arguments, Expression *aggr, Statement *body);
Statement *syntaxCopy();
Statement *semantic(Scope *sc);
bool checkForArgTypes();
@@ -410,6 +447,7 @@ struct ForeachStatement : Statement
int blockExit(bool mustNotThrow);
Expression *interpret(InterState *istate);
bool apply(sapply_fp_t fp, void *param);
void ctfeCompile(CompiledCtfeFunction *ccf);
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
Statement *inlineScan(InlineScanState *iss);
@@ -418,9 +456,10 @@ struct ForeachStatement : Statement
};
#if DMDV2
struct ForeachRangeStatement : Statement
class ForeachRangeStatement : public Statement
{
enum TOK op; // TOKforeach or TOKforeach_reverse
public:
TOK op; // TOKforeach or TOKforeach_reverse
Parameter *arg; // loop index variable
Expression *lwr;
Expression *upr;
@@ -428,7 +467,7 @@ struct ForeachRangeStatement : Statement
VarDeclaration *key;
ForeachRangeStatement(Loc loc, enum TOK op, Parameter *arg,
ForeachRangeStatement(Loc loc, TOK op, Parameter *arg,
Expression *lwr, Expression *upr, Statement *body);
Statement *syntaxCopy();
Statement *semantic(Scope *sc);
@@ -437,6 +476,7 @@ struct ForeachRangeStatement : Statement
int blockExit(bool mustNotThrow);
Expression *interpret(InterState *istate);
bool apply(sapply_fp_t fp, void *param);
void ctfeCompile(CompiledCtfeFunction *ccf);
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
Statement *inlineScan(InlineScanState *iss);
@@ -445,8 +485,9 @@ struct ForeachRangeStatement : Statement
};
#endif
struct IfStatement : Statement
class IfStatement : public Statement
{
public:
Parameter *arg;
Expression *condition;
Statement *ifbody;
@@ -459,6 +500,7 @@ struct IfStatement : Statement
Statement *semantic(Scope *sc);
Expression *interpret(InterState *istate);
bool apply(sapply_fp_t fp, void *param);
void ctfeCompile(CompiledCtfeFunction *ccf);
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
int blockExit(bool mustNotThrow);
IfStatement *isIfStatement() { return this; }
@@ -471,8 +513,9 @@ struct IfStatement : Statement
void toIR(IRState *irs);
};
struct ConditionalStatement : Statement
class ConditionalStatement : public Statement
{
public:
Condition *condition;
Statement *ifbody;
Statement *elsebody;
@@ -487,8 +530,9 @@ struct ConditionalStatement : Statement
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
};
struct PragmaStatement : Statement
class PragmaStatement : public Statement
{
public:
Identifier *ident;
Expressions *args; // array of Expression's
Statement *body;
@@ -504,8 +548,9 @@ struct PragmaStatement : Statement
void toIR(IRState *irs);
};
struct StaticAssertStatement : Statement
class StaticAssertStatement : public Statement
{
public:
StaticAssert *sa;
StaticAssertStatement(StaticAssert *sa);
@@ -516,8 +561,9 @@ struct StaticAssertStatement : Statement
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
};
struct SwitchStatement : Statement
class SwitchStatement : public Statement
{
public:
Expression *condition;
Statement *body;
bool isFinal;
@@ -542,6 +588,7 @@ struct SwitchStatement : Statement
int blockExit(bool mustNotThrow);
Expression *interpret(InterState *istate);
bool apply(sapply_fp_t fp, void *param);
void ctfeCompile(CompiledCtfeFunction *ccf);
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
Statement *inlineScan(InlineScanState *iss);
@@ -549,8 +596,9 @@ struct SwitchStatement : Statement
void toIR(IRState *irs);
};
struct CaseStatement : Statement
class CaseStatement : public Statement
{
public:
Expression *exp;
Statement *statement;
@@ -564,11 +612,12 @@ struct CaseStatement : Statement
CaseStatement(Loc loc, Expression *exp, Statement *s);
Statement *syntaxCopy();
Statement *semantic(Scope *sc);
int compare(Object *obj);
int compare(RootObject *obj);
int blockExit(bool mustNotThrow);
bool comeFromImpl();
Expression *interpret(InterState *istate);
bool apply(sapply_fp_t fp, void *param);
void ctfeCompile(CompiledCtfeFunction *ccf);
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
CaseStatement *isCaseStatement() { return this; }
@@ -584,8 +633,9 @@ struct CaseStatement : Statement
#if DMDV2
struct CaseRangeStatement : Statement
class CaseRangeStatement : public Statement
{
public:
Expression *first;
Expression *last;
Statement *statement;
@@ -599,8 +649,9 @@ struct CaseRangeStatement : Statement
#endif
struct DefaultStatement : Statement
class DefaultStatement : public Statement
{
public:
Statement *statement;
#ifdef IN_GCC
block *cblock; // back end: label for the block
@@ -617,6 +668,7 @@ struct DefaultStatement : Statement
bool comeFromImpl();
Expression *interpret(InterState *istate);
bool apply(sapply_fp_t fp, void *param);
void ctfeCompile(CompiledCtfeFunction *ccf);
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
DefaultStatement *isDefaultStatement() { return this; }
@@ -629,22 +681,25 @@ struct DefaultStatement : Statement
#endif
};
struct GotoDefaultStatement : Statement
class GotoDefaultStatement : public Statement
{
public:
SwitchStatement *sw;
GotoDefaultStatement(Loc loc);
Statement *syntaxCopy();
Statement *semantic(Scope *sc);
Expression *interpret(InterState *istate);
void ctfeCompile(CompiledCtfeFunction *ccf);
int blockExit(bool mustNotThrow);
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
void toIR(IRState *irs);
};
struct GotoCaseStatement : Statement
class GotoCaseStatement : public Statement
{
public:
Expression *exp; // NULL, or which case to goto
CaseStatement *cs; // case statement it resolves to
SwitchStatement *sw;
@@ -653,23 +708,27 @@ struct GotoCaseStatement : Statement
Statement *syntaxCopy();
Statement *semantic(Scope *sc);
Expression *interpret(InterState *istate);
void ctfeCompile(CompiledCtfeFunction *ccf);
int blockExit(bool mustNotThrow);
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
void toIR(IRState *irs);
};
struct SwitchErrorStatement : Statement
class SwitchErrorStatement : public Statement
{
public:
SwitchErrorStatement(Loc loc);
int blockExit(bool mustNotThrow);
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
void ctfeCompile(CompiledCtfeFunction *ccf);
void toIR(IRState *irs);
};
struct ReturnStatement : Statement
class ReturnStatement : public Statement
{
public:
Expression *exp;
bool implicit0; // this is an implicit "return 0;"
@@ -679,6 +738,7 @@ struct ReturnStatement : Statement
Statement *semantic(Scope *sc);
int blockExit(bool mustNotThrow);
Expression *interpret(InterState *istate);
void ctfeCompile(CompiledCtfeFunction *ccf);
int inlineCost(InlineCostState *ics);
Expression *doInline(InlineDoState *ids);
@@ -690,14 +750,16 @@ struct ReturnStatement : Statement
ReturnStatement *isReturnStatement() { return this; }
};
struct BreakStatement : Statement
class BreakStatement : public Statement
{
public:
Identifier *ident;
BreakStatement(Loc loc, Identifier *ident);
Statement *syntaxCopy();
Statement *semantic(Scope *sc);
Expression *interpret(InterState *istate);
void ctfeCompile(CompiledCtfeFunction *ccf);
int blockExit(bool mustNotThrow);
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
@@ -709,14 +771,16 @@ struct BreakStatement : Statement
#endif
};
struct ContinueStatement : Statement
class ContinueStatement : public Statement
{
public:
Identifier *ident;
ContinueStatement(Loc loc, Identifier *ident);
Statement *syntaxCopy();
Statement *semantic(Scope *sc);
Expression *interpret(InterState *istate);
void ctfeCompile(CompiledCtfeFunction *ccf);
int blockExit(bool mustNotThrow);
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
@@ -728,8 +792,9 @@ struct ContinueStatement : Statement
#endif
};
struct SynchronizedStatement : Statement
class SynchronizedStatement : public Statement
{
public:
Expression *exp;
Statement *body;
@@ -754,8 +819,9 @@ struct SynchronizedStatement : Statement
#endif
};
struct WithStatement : Statement
class WithStatement : public Statement
{
public:
Expression *exp;
Statement *body;
VarDeclaration *wthis;
@@ -767,14 +833,16 @@ struct WithStatement : Statement
int blockExit(bool mustNotThrow);
Expression *interpret(InterState *istate);
bool apply(sapply_fp_t fp, void *param);
void ctfeCompile(CompiledCtfeFunction *ccf);
Statement *inlineScan(InlineScanState *iss);
void toIR(IRState *irs);
};
struct TryCatchStatement : Statement
class TryCatchStatement : public Statement
{
public:
Statement *body;
Catches *catches;
@@ -786,6 +854,7 @@ struct TryCatchStatement : Statement
int blockExit(bool mustNotThrow);
Expression *interpret(InterState *istate);
bool apply(sapply_fp_t fp, void *param);
void ctfeCompile(CompiledCtfeFunction *ccf);
Statement *inlineScan(InlineScanState *iss);
@@ -793,8 +862,9 @@ struct TryCatchStatement : Statement
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
};
struct Catch : Object
class Catch : public RootObject
{
public:
Loc loc;
Type *type;
Identifier *ident;
@@ -810,8 +880,9 @@ struct Catch : Object
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
};
struct TryFinallyStatement : Statement
class TryFinallyStatement : public Statement
{
public:
Statement *body;
Statement *finalbody;
@@ -825,14 +896,16 @@ struct TryFinallyStatement : Statement
int blockExit(bool mustNotThrow);
Expression *interpret(InterState *istate);
bool apply(sapply_fp_t fp, void *param);
void ctfeCompile(CompiledCtfeFunction *ccf);
Statement *inlineScan(InlineScanState *iss);
void toIR(IRState *irs);
};
struct OnScopeStatement : Statement
class OnScopeStatement : public Statement
{
public:
TOK tok;
Statement *statement;
@@ -845,12 +918,14 @@ struct OnScopeStatement : Statement
Statement *scopeCode(Scope *sc, Statement **sentry, Statement **sexit, Statement **sfinally);
Expression *interpret(InterState *istate);
bool apply(sapply_fp_t fp, void *param);
void ctfeCompile(CompiledCtfeFunction *ccf);
void toIR(IRState *irs);
};
struct ThrowStatement : Statement
class ThrowStatement : public Statement
{
public:
Expression *exp;
bool internalThrow; // was generated by the compiler,
// wasn't present in source code
@@ -861,14 +936,16 @@ struct ThrowStatement : Statement
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
int blockExit(bool mustNotThrow);
Expression *interpret(InterState *istate);
void ctfeCompile(CompiledCtfeFunction *ccf);
Statement *inlineScan(InlineScanState *iss);
void toIR(IRState *irs);
};
struct DebugStatement : Statement
class DebugStatement : public Statement
{
public:
Statement *statement;
DebugStatement(Loc loc, Statement *statement);
@@ -879,8 +956,9 @@ struct DebugStatement : Statement
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
};
struct GotoStatement : Statement
class GotoStatement : public Statement
{
public:
Identifier *ident;
LabelDsymbol *label;
#if !IN_LLVM
@@ -895,13 +973,15 @@ struct GotoStatement : Statement
Statement *semantic(Scope *sc);
int blockExit(bool mustNotThrow);
Expression *interpret(InterState *istate);
void ctfeCompile(CompiledCtfeFunction *ccf);
void toIR(IRState *irs);
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
};
struct LabelStatement : Statement
class LabelStatement : public Statement
{
public:
Identifier *ident;
Statement *statement;
#if !IN_LLVM
@@ -910,6 +990,7 @@ struct LabelStatement : Statement
TryFinallyStatement *enclosingFinally;
Statement* enclosingScopeExit;
#endif
Statement *gotoTarget; // interpret
block *lblock; // back end
Blocks *fwdrefs; // forward references to this LabelStatement
@@ -922,6 +1003,7 @@ struct LabelStatement : Statement
bool comeFromImpl();
Expression *interpret(InterState *istate);
bool apply(sapply_fp_t fp, void *param);
void ctfeCompile(CompiledCtfeFunction *ccf);
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
Statement *inlineScan(InlineScanState *iss);
@@ -934,16 +1016,18 @@ struct LabelStatement : Statement
#endif
};
struct LabelDsymbol : Dsymbol
class LabelDsymbol : public Dsymbol
{
public:
LabelStatement *statement;
LabelDsymbol(Identifier *ident);
LabelDsymbol *isLabel();
};
struct AsmStatement : Statement
class AsmStatement : public Statement
{
public:
Token *tokens;
code *asmcode;
unsigned asmalign; // alignment of this statement
@@ -957,6 +1041,7 @@ struct AsmStatement : Statement
int blockExit(bool mustNotThrow);
bool comeFromImpl();
Expression *interpret(InterState *istate);
void ctfeCompile(CompiledCtfeFunction *ccf);
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
@@ -974,8 +1059,9 @@ struct AsmStatement : Statement
#endif
};
struct ImportStatement : Statement
class ImportStatement : public Statement
{
public:
Dsymbols *imports; // Array of Import's
ImportStatement(Loc loc, Dsymbols *imports);
@@ -984,6 +1070,7 @@ struct ImportStatement : Statement
int blockExit(bool mustNotThrow);
bool hasCodeImpl();
Expression *interpret(InterState *istate);
void ctfeCompile(CompiledCtfeFunction *ccf);
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
@@ -995,8 +1082,9 @@ struct ImportStatement : Statement
};
#if IN_LLVM
struct AsmBlockStatement : CompoundStatement
class AsmBlockStatement : public CompoundStatement
{
public:
TryFinallyStatement* enclosingFinally;
Statement* enclosingScopeExit;