mirror of
https://github.com/dlang/dmd.git
synced 2025-04-27 13:40:11 +03:00
Devirtualize Dsymbol.isXXX functions (#20925)
This commit is contained in:
parent
5fc114165d
commit
216837beca
33 changed files with 581 additions and 616 deletions
|
@ -495,11 +495,6 @@ extern (C++) abstract class AggregateDeclaration : ScopeDsymbol
|
||||||
// Back end
|
// Back end
|
||||||
void* sinit; /// initializer symbol
|
void* sinit; /// initializer symbol
|
||||||
|
|
||||||
override final inout(AggregateDeclaration) isAggregateDeclaration() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
|
|
@ -135,7 +135,6 @@ public:
|
||||||
// Back end
|
// Back end
|
||||||
void *sinit;
|
void *sinit;
|
||||||
|
|
||||||
AggregateDeclaration *isAggregateDeclaration() override final { return this; }
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -191,7 +190,6 @@ public:
|
||||||
bool requestTypeInfo() const;
|
bool requestTypeInfo() const;
|
||||||
bool requestTypeInfo(bool v);
|
bool requestTypeInfo(bool v);
|
||||||
|
|
||||||
StructDeclaration *isStructDeclaration() override final { return this; }
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
|
|
||||||
unsigned numArgTypes() const;
|
unsigned numArgTypes() const;
|
||||||
|
@ -205,7 +203,6 @@ public:
|
||||||
UnionDeclaration *syntaxCopy(Dsymbol *s) override;
|
UnionDeclaration *syntaxCopy(Dsymbol *s) override;
|
||||||
const char *kind() const override;
|
const char *kind() const override;
|
||||||
|
|
||||||
UnionDeclaration *isUnionDeclaration() override { return this; }
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -305,7 +302,6 @@ public:
|
||||||
Dsymbol *vtblsym;
|
Dsymbol *vtblsym;
|
||||||
Dsymbol *vtblSymbol();
|
Dsymbol *vtblSymbol();
|
||||||
|
|
||||||
ClassDeclaration *isClassDeclaration() override final { return (ClassDeclaration *)this; }
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -320,6 +316,5 @@ public:
|
||||||
bool isCPPinterface() const override;
|
bool isCPPinterface() const override;
|
||||||
bool isCOMinterface() const override;
|
bool isCOMinterface() const override;
|
||||||
|
|
||||||
InterfaceDeclaration *isInterfaceDeclaration() override { return this; }
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
|
@ -33,7 +33,7 @@ extern (C++) final class AliasThis : Dsymbol
|
||||||
|
|
||||||
extern (D) this(Loc loc, Identifier ident) @safe
|
extern (D) this(Loc loc, Identifier ident) @safe
|
||||||
{
|
{
|
||||||
super(loc, null); // it's anonymous (no identifier)
|
super(DSYM.aliasThis, loc, null); // it's anonymous (no identifier)
|
||||||
this.ident = ident;
|
this.ident = ident;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,18 +57,19 @@ extern (C++) abstract class AttribDeclaration : Dsymbol
|
||||||
|
|
||||||
extern (D) this(Dsymbols* decl) @safe
|
extern (D) this(Dsymbols* decl) @safe
|
||||||
{
|
{
|
||||||
|
super(DSYM.attribDeclaration);
|
||||||
this.decl = decl;
|
this.decl = decl;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern (D) this(Loc loc, Dsymbols* decl) @safe
|
extern (D) this(Loc loc, Dsymbols* decl) @safe
|
||||||
{
|
{
|
||||||
super(loc, null);
|
super(DSYM.attribDeclaration, loc, null);
|
||||||
this.decl = decl;
|
this.decl = decl;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern (D) this(Loc loc, Identifier ident, Dsymbols* decl) @safe
|
extern (D) this(Loc loc, Identifier ident, Dsymbols* decl) @safe
|
||||||
{
|
{
|
||||||
super(loc, ident);
|
super(DSYM.attribDeclaration, loc, ident);
|
||||||
this.decl = decl;
|
this.decl = decl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -126,11 +127,6 @@ extern (C++) abstract class AttribDeclaration : Dsymbol
|
||||||
objc.addSymbols(this, classes, categories);
|
objc.addSymbols(this, classes, categories);
|
||||||
}
|
}
|
||||||
|
|
||||||
override inout(AttribDeclaration) isAttribDeclaration() inout pure @safe
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
@ -150,12 +146,14 @@ extern (C++) class StorageClassDeclaration : AttribDeclaration
|
||||||
{
|
{
|
||||||
super(decl);
|
super(decl);
|
||||||
this.stc = stc;
|
this.stc = stc;
|
||||||
|
this.dsym = DSYM.storageClassDeclaration;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern (D) this(Loc loc, StorageClass stc, Dsymbols* decl) @safe
|
extern (D) this(Loc loc, StorageClass stc, Dsymbols* decl) @safe
|
||||||
{
|
{
|
||||||
super(loc, decl);
|
super(loc, decl);
|
||||||
this.stc = stc;
|
this.stc = stc;
|
||||||
|
this.dsym = DSYM.storageClassDeclaration;
|
||||||
}
|
}
|
||||||
|
|
||||||
override StorageClassDeclaration syntaxCopy(Dsymbol s)
|
override StorageClassDeclaration syntaxCopy(Dsymbol s)
|
||||||
|
@ -164,11 +162,6 @@ extern (C++) class StorageClassDeclaration : AttribDeclaration
|
||||||
return new StorageClassDeclaration(stc, Dsymbol.arraySyntaxCopy(decl));
|
return new StorageClassDeclaration(stc, Dsymbol.arraySyntaxCopy(decl));
|
||||||
}
|
}
|
||||||
|
|
||||||
override inout(StorageClassDeclaration) isStorageClassDeclaration() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
@ -221,6 +214,7 @@ extern (C++) final class LinkDeclaration : AttribDeclaration
|
||||||
super(loc, null, decl);
|
super(loc, null, decl);
|
||||||
//printf("LinkDeclaration(linkage = %d, decl = %p)\n", linkage, decl);
|
//printf("LinkDeclaration(linkage = %d, decl = %p)\n", linkage, decl);
|
||||||
this.linkage = linkage;
|
this.linkage = linkage;
|
||||||
|
this.dsym = DSYM.linkDeclaration;
|
||||||
}
|
}
|
||||||
|
|
||||||
static LinkDeclaration create(Loc loc, LINK p, Dsymbols* decl) @safe
|
static LinkDeclaration create(Loc loc, LINK p, Dsymbols* decl) @safe
|
||||||
|
@ -257,6 +251,7 @@ extern (C++) final class CPPMangleDeclaration : AttribDeclaration
|
||||||
super(loc, null, decl);
|
super(loc, null, decl);
|
||||||
//printf("CPPMangleDeclaration(cppmangle = %d, decl = %p)\n", cppmangle, decl);
|
//printf("CPPMangleDeclaration(cppmangle = %d, decl = %p)\n", cppmangle, decl);
|
||||||
this.cppmangle = cppmangle;
|
this.cppmangle = cppmangle;
|
||||||
|
this.dsym = DSYM.cppMangleDeclaration;
|
||||||
}
|
}
|
||||||
|
|
||||||
override CPPMangleDeclaration syntaxCopy(Dsymbol s)
|
override CPPMangleDeclaration syntaxCopy(Dsymbol s)
|
||||||
|
@ -302,11 +297,13 @@ extern (C++) final class CPPNamespaceDeclaration : AttribDeclaration
|
||||||
extern (D) this(Loc loc, Identifier ident, Dsymbols* decl) @safe
|
extern (D) this(Loc loc, Identifier ident, Dsymbols* decl) @safe
|
||||||
{
|
{
|
||||||
super(loc, ident, decl);
|
super(loc, ident, decl);
|
||||||
|
this.dsym = DSYM.cppNamespaceDeclaration;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern (D) this(Loc loc, Expression exp, Dsymbols* decl) @safe
|
extern (D) this(Loc loc, Expression exp, Dsymbols* decl) @safe
|
||||||
{
|
{
|
||||||
super(loc, null, decl);
|
super(loc, null, decl);
|
||||||
|
this.dsym = DSYM.cppNamespaceDeclaration;
|
||||||
this.exp = exp;
|
this.exp = exp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -314,6 +311,7 @@ extern (C++) final class CPPNamespaceDeclaration : AttribDeclaration
|
||||||
CPPNamespaceDeclaration parent) @safe
|
CPPNamespaceDeclaration parent) @safe
|
||||||
{
|
{
|
||||||
super(loc, ident, decl);
|
super(loc, ident, decl);
|
||||||
|
this.dsym = DSYM.cppNamespaceDeclaration;
|
||||||
this.exp = exp;
|
this.exp = exp;
|
||||||
this.cppnamespace = parent;
|
this.cppnamespace = parent;
|
||||||
}
|
}
|
||||||
|
@ -329,8 +327,6 @@ extern (C++) final class CPPNamespaceDeclaration : AttribDeclaration
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
override inout(CPPNamespaceDeclaration) isCPPNamespaceDeclaration() inout { return this; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************
|
/***********************************************************
|
||||||
|
@ -353,6 +349,7 @@ extern (C++) final class VisibilityDeclaration : AttribDeclaration
|
||||||
extern (D) this(Loc loc, Visibility visibility, Dsymbols* decl) @safe
|
extern (D) this(Loc loc, Visibility visibility, Dsymbols* decl) @safe
|
||||||
{
|
{
|
||||||
super(loc, null, decl);
|
super(loc, null, decl);
|
||||||
|
this.dsym = DSYM.visibilityDeclaration;
|
||||||
this.visibility = visibility;
|
this.visibility = visibility;
|
||||||
//printf("decl = %p\n", decl);
|
//printf("decl = %p\n", decl);
|
||||||
}
|
}
|
||||||
|
@ -366,6 +363,7 @@ extern (C++) final class VisibilityDeclaration : AttribDeclaration
|
||||||
extern (D) this(Loc loc, Identifier[] pkg_identifiers, Dsymbols* decl)
|
extern (D) this(Loc loc, Identifier[] pkg_identifiers, Dsymbols* decl)
|
||||||
{
|
{
|
||||||
super(loc, null, decl);
|
super(loc, null, decl);
|
||||||
|
this.dsym = DSYM.visibilityDeclaration;
|
||||||
this.visibility.kind = Visibility.Kind.package_;
|
this.visibility.kind = Visibility.Kind.package_;
|
||||||
this.pkg_identifiers = pkg_identifiers;
|
this.pkg_identifiers = pkg_identifiers;
|
||||||
if (pkg_identifiers.length > 0)
|
if (pkg_identifiers.length > 0)
|
||||||
|
@ -399,11 +397,6 @@ extern (C++) final class VisibilityDeclaration : AttribDeclaration
|
||||||
return buf.extractChars();
|
return buf.extractChars();
|
||||||
}
|
}
|
||||||
|
|
||||||
override inout(VisibilityDeclaration) isVisibilityDeclaration() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
@ -428,6 +421,7 @@ extern (C++) final class AlignDeclaration : AttribDeclaration
|
||||||
extern (D) this(Loc loc, Expression exp, Dsymbols* decl)
|
extern (D) this(Loc loc, Expression exp, Dsymbols* decl)
|
||||||
{
|
{
|
||||||
super(loc, null, decl);
|
super(loc, null, decl);
|
||||||
|
this.dsym = DSYM.alignDeclaration;
|
||||||
if (exp)
|
if (exp)
|
||||||
{
|
{
|
||||||
exps = new Expressions();
|
exps = new Expressions();
|
||||||
|
@ -438,12 +432,14 @@ extern (C++) final class AlignDeclaration : AttribDeclaration
|
||||||
extern (D) this(Loc loc, Expressions* exps, Dsymbols* decl) @safe
|
extern (D) this(Loc loc, Expressions* exps, Dsymbols* decl) @safe
|
||||||
{
|
{
|
||||||
super(loc, null, decl);
|
super(loc, null, decl);
|
||||||
|
this.dsym = DSYM.alignDeclaration;
|
||||||
this.exps = exps;
|
this.exps = exps;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern (D) this(Loc loc, structalign_t salign, Dsymbols* decl) @safe
|
extern (D) this(Loc loc, structalign_t salign, Dsymbols* decl) @safe
|
||||||
{
|
{
|
||||||
super(loc, null, decl);
|
super(loc, null, decl);
|
||||||
|
this.dsym = DSYM.alignDeclaration;
|
||||||
this.salign = salign;
|
this.salign = salign;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -475,6 +471,7 @@ extern (C++) final class AnonDeclaration : AttribDeclaration
|
||||||
extern (D) this(Loc loc, bool isunion, Dsymbols* decl) @safe
|
extern (D) this(Loc loc, bool isunion, Dsymbols* decl) @safe
|
||||||
{
|
{
|
||||||
super(loc, null, decl);
|
super(loc, null, decl);
|
||||||
|
this.dsym = DSYM.anonDeclaration;
|
||||||
this.isunion = isunion;
|
this.isunion = isunion;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -489,11 +486,6 @@ extern (C++) final class AnonDeclaration : AttribDeclaration
|
||||||
return (isunion ? "anonymous union" : "anonymous struct");
|
return (isunion ? "anonymous union" : "anonymous struct");
|
||||||
}
|
}
|
||||||
|
|
||||||
override inout(AnonDeclaration) isAnonDeclaration() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
@ -513,6 +505,7 @@ extern (C++) final class PragmaDeclaration : AttribDeclaration
|
||||||
extern (D) this(Loc loc, Identifier ident, Expressions* args, Dsymbols* decl) @safe
|
extern (D) this(Loc loc, Identifier ident, Expressions* args, Dsymbols* decl) @safe
|
||||||
{
|
{
|
||||||
super(loc, ident, decl);
|
super(loc, ident, decl);
|
||||||
|
this.dsym = DSYM.pragmaDeclaration;
|
||||||
this.args = args;
|
this.args = args;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -548,6 +541,7 @@ extern (C++) class ConditionalDeclaration : AttribDeclaration
|
||||||
extern (D) this(Loc loc, Condition condition, Dsymbols* decl, Dsymbols* elsedecl) @safe
|
extern (D) this(Loc loc, Condition condition, Dsymbols* decl, Dsymbols* elsedecl) @safe
|
||||||
{
|
{
|
||||||
super(loc, null, decl);
|
super(loc, null, decl);
|
||||||
|
this.dsym = DSYM.conditionalDeclaration;
|
||||||
//printf("ConditionalDeclaration::ConditionalDeclaration()\n");
|
//printf("ConditionalDeclaration::ConditionalDeclaration()\n");
|
||||||
this.condition = condition;
|
this.condition = condition;
|
||||||
this.elsedecl = elsedecl;
|
this.elsedecl = elsedecl;
|
||||||
|
@ -579,6 +573,7 @@ extern (C++) final class StaticIfDeclaration : ConditionalDeclaration
|
||||||
extern (D) this(Loc loc, Condition condition, Dsymbols* decl, Dsymbols* elsedecl) @safe
|
extern (D) this(Loc loc, Condition condition, Dsymbols* decl, Dsymbols* elsedecl) @safe
|
||||||
{
|
{
|
||||||
super(loc, condition, decl, elsedecl);
|
super(loc, condition, decl, elsedecl);
|
||||||
|
this.dsym = DSYM.staticIfDeclaration;
|
||||||
//printf("StaticIfDeclaration::StaticIfDeclaration()\n");
|
//printf("StaticIfDeclaration::StaticIfDeclaration()\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -593,11 +588,6 @@ extern (C++) final class StaticIfDeclaration : ConditionalDeclaration
|
||||||
return "static if";
|
return "static if";
|
||||||
}
|
}
|
||||||
|
|
||||||
override inout(StaticIfDeclaration) isStaticIfDeclaration() inout pure @safe
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
@ -628,6 +618,7 @@ extern (C++) final class StaticForeachDeclaration : AttribDeclaration
|
||||||
extern (D) this(StaticForeach sfe, Dsymbols* decl) @safe
|
extern (D) this(StaticForeach sfe, Dsymbols* decl) @safe
|
||||||
{
|
{
|
||||||
super(sfe.loc, null, decl);
|
super(sfe.loc, null, decl);
|
||||||
|
this.dsym = DSYM.staticForeachDeclaration;
|
||||||
this.sfe = sfe;
|
this.sfe = sfe;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -683,16 +674,11 @@ extern(C++) final class ForwardingAttribDeclaration : AttribDeclaration
|
||||||
this(Dsymbols* decl) @safe
|
this(Dsymbols* decl) @safe
|
||||||
{
|
{
|
||||||
super(decl);
|
super(decl);
|
||||||
|
this.dsym = DSYM.forwardingAttribDeclaration;
|
||||||
sym = new ForwardingScopeDsymbol();
|
sym = new ForwardingScopeDsymbol();
|
||||||
sym.symtab = new DsymbolTable();
|
sym.symtab = new DsymbolTable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
override inout(ForwardingAttribDeclaration) isForwardingAttribDeclaration() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
@ -715,6 +701,7 @@ extern (C++) final class MixinDeclaration : AttribDeclaration
|
||||||
{
|
{
|
||||||
super(loc, null, null);
|
super(loc, null, null);
|
||||||
//printf("MixinDeclaration(loc = %d)\n", loc.linnum);
|
//printf("MixinDeclaration(loc = %d)\n", loc.linnum);
|
||||||
|
this.dsym = DSYM.mixinDeclaration;
|
||||||
this.exps = exps;
|
this.exps = exps;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -729,11 +716,6 @@ extern (C++) final class MixinDeclaration : AttribDeclaration
|
||||||
return "mixin";
|
return "mixin";
|
||||||
}
|
}
|
||||||
|
|
||||||
override inout(MixinDeclaration) isMixinDeclaration() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
@ -752,6 +734,7 @@ extern (C++) final class UserAttributeDeclaration : AttribDeclaration
|
||||||
extern (D) this(Expressions* atts, Dsymbols* decl) @safe
|
extern (D) this(Expressions* atts, Dsymbols* decl) @safe
|
||||||
{
|
{
|
||||||
super(decl);
|
super(decl);
|
||||||
|
this.dsym = DSYM.userAttributeDeclaration;
|
||||||
this.atts = atts;
|
this.atts = atts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,6 @@ public:
|
||||||
const char *kind() const override;
|
const char *kind() const override;
|
||||||
bool hasPointers() override final;
|
bool hasPointers() override final;
|
||||||
bool hasStaticCtorOrDtor() override final;
|
bool hasStaticCtorOrDtor() override final;
|
||||||
AttribDeclaration *isAttribDeclaration() override { return this; }
|
|
||||||
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
@ -42,7 +41,6 @@ public:
|
||||||
StorageClass stc;
|
StorageClass stc;
|
||||||
|
|
||||||
StorageClassDeclaration *syntaxCopy(Dsymbol *s) override;
|
StorageClassDeclaration *syntaxCopy(Dsymbol *s) override;
|
||||||
StorageClassDeclaration *isStorageClassDeclaration() override { return this; }
|
|
||||||
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
@ -94,7 +92,6 @@ public:
|
||||||
VisibilityDeclaration *syntaxCopy(Dsymbol *s) override;
|
VisibilityDeclaration *syntaxCopy(Dsymbol *s) override;
|
||||||
const char *kind() const override;
|
const char *kind() const override;
|
||||||
const char *toPrettyChars(bool unused) override;
|
const char *toPrettyChars(bool unused) override;
|
||||||
VisibilityDeclaration *isVisibilityDeclaration() override { return this; }
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -119,7 +116,6 @@ public:
|
||||||
|
|
||||||
AnonDeclaration *syntaxCopy(Dsymbol *s) override;
|
AnonDeclaration *syntaxCopy(Dsymbol *s) override;
|
||||||
const char *kind() const override;
|
const char *kind() const override;
|
||||||
AnonDeclaration *isAnonDeclaration() override { return this; }
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -151,7 +147,6 @@ public:
|
||||||
d_bool onStack;
|
d_bool onStack;
|
||||||
|
|
||||||
StaticIfDeclaration *syntaxCopy(Dsymbol *s) override;
|
StaticIfDeclaration *syntaxCopy(Dsymbol *s) override;
|
||||||
StaticIfDeclaration *isStaticIfDeclaration() override { return this; }
|
|
||||||
const char *kind() const override;
|
const char *kind() const override;
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
@ -175,7 +170,6 @@ class ForwardingAttribDeclaration final : public AttribDeclaration
|
||||||
public:
|
public:
|
||||||
ForwardingScopeDsymbol *sym;
|
ForwardingScopeDsymbol *sym;
|
||||||
|
|
||||||
ForwardingAttribDeclaration *isForwardingAttribDeclaration() override { return this; }
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,6 @@ public:
|
||||||
static void addGlobalIdent(const char *ident);
|
static void addGlobalIdent(const char *ident);
|
||||||
|
|
||||||
int include(Scope *sc) override;
|
int include(Scope *sc) override;
|
||||||
DebugCondition *isDebugCondition() override { return this; }
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -82,7 +81,6 @@ public:
|
||||||
static void addPredefinedGlobalIdent(const char *ident);
|
static void addPredefinedGlobalIdent(const char *ident);
|
||||||
|
|
||||||
int include(Scope *sc) override;
|
int include(Scope *sc) override;
|
||||||
VersionCondition *isVersionCondition() override { return this; }
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -206,6 +206,7 @@ extern (C++) class ClassDeclaration : AggregateDeclaration
|
||||||
id = Identifier.generateAnonymousId("class");
|
id = Identifier.generateAnonymousId("class");
|
||||||
|
|
||||||
super(loc, id);
|
super(loc, id);
|
||||||
|
this.dsym = DSYM.classDeclaration;
|
||||||
|
|
||||||
static immutable msg = "only object.d can define this reserved class name";
|
static immutable msg = "only object.d can define this reserved class name";
|
||||||
|
|
||||||
|
@ -941,11 +942,6 @@ extern (C++) class ClassDeclaration : AggregateDeclaration
|
||||||
return errorException && (this == errorException || errorException.isBaseOf(this, null));
|
return errorException && (this == errorException || errorException.isBaseOf(this, null));
|
||||||
}
|
}
|
||||||
|
|
||||||
override final inout(ClassDeclaration) isClassDeclaration() inout @nogc nothrow pure @safe
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
@ -959,6 +955,7 @@ extern (C++) final class InterfaceDeclaration : ClassDeclaration
|
||||||
extern (D) this(Loc loc, Identifier id, BaseClasses* baseclasses)
|
extern (D) this(Loc loc, Identifier id, BaseClasses* baseclasses)
|
||||||
{
|
{
|
||||||
super(loc, id, baseclasses, null, false);
|
super(loc, id, baseclasses, null, false);
|
||||||
|
this.dsym = DSYM.interfaceDeclaration;
|
||||||
if (id == Id.IUnknown) // IUnknown is the root of all COM interfaces
|
if (id == Id.IUnknown) // IUnknown is the root of all COM interfaces
|
||||||
{
|
{
|
||||||
com = true;
|
com = true;
|
||||||
|
@ -1058,11 +1055,6 @@ extern (C++) final class InterfaceDeclaration : ClassDeclaration
|
||||||
return com;
|
return com;
|
||||||
}
|
}
|
||||||
|
|
||||||
override inout(InterfaceDeclaration) isInterfaceDeclaration() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
|
|
@ -106,15 +106,15 @@ extern (C++) abstract class Declaration : Dsymbol
|
||||||
import dmd.common.bitfields;
|
import dmd.common.bitfields;
|
||||||
mixin(generateBitFields!(BitFields, ubyte));
|
mixin(generateBitFields!(BitFields, ubyte));
|
||||||
|
|
||||||
final extern (D) this(Identifier ident) @safe
|
final extern (D) this(DSYM tag, Identifier ident) @safe
|
||||||
{
|
{
|
||||||
super(ident);
|
super(tag, ident);
|
||||||
visibility = Visibility(Visibility.Kind.undefined);
|
visibility = Visibility(Visibility.Kind.undefined);
|
||||||
}
|
}
|
||||||
|
|
||||||
final extern (D) this(Loc loc, Identifier ident) @safe
|
final extern (D) this(DSYM tag, Loc loc, Identifier ident) @safe
|
||||||
{
|
{
|
||||||
super(loc, ident);
|
super(tag, loc, ident);
|
||||||
visibility = Visibility(Visibility.Kind.undefined);
|
visibility = Visibility(Visibility.Kind.undefined);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -274,11 +274,6 @@ extern (C++) abstract class Declaration : Dsymbol
|
||||||
return visibility;
|
return visibility;
|
||||||
}
|
}
|
||||||
|
|
||||||
override final inout(Declaration) isDeclaration() inout pure nothrow @nogc @safe
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
@ -296,7 +291,7 @@ extern (C++) final class TupleDeclaration : Declaration
|
||||||
|
|
||||||
extern (D) this(Loc loc, Identifier ident, Objects* objects) @safe
|
extern (D) this(Loc loc, Identifier ident, Objects* objects) @safe
|
||||||
{
|
{
|
||||||
super(loc, ident);
|
super(DSYM.tupleDeclaration, loc, ident);
|
||||||
this.objects = objects;
|
this.objects = objects;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -424,11 +419,6 @@ extern (C++) final class TupleDeclaration : Declaration
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
override inout(TupleDeclaration) isTupleDeclaration() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
@ -447,7 +437,7 @@ extern (C++) final class AliasDeclaration : Declaration
|
||||||
|
|
||||||
extern (D) this(Loc loc, Identifier ident, Type type) @safe
|
extern (D) this(Loc loc, Identifier ident, Type type) @safe
|
||||||
{
|
{
|
||||||
super(loc, ident);
|
super(DSYM.aliasDeclaration, loc, ident);
|
||||||
//debug printf("AliasDeclaration(id = '%s', type = `%s`, %p)\n", ident.toChars(), dmd.hdrgen.toChars(type), type.isTypeIdentifier());
|
//debug printf("AliasDeclaration(id = '%s', type = `%s`, %p)\n", ident.toChars(), dmd.hdrgen.toChars(type), type.isTypeIdentifier());
|
||||||
this.type = type;
|
this.type = type;
|
||||||
assert(type);
|
assert(type);
|
||||||
|
@ -455,7 +445,7 @@ extern (C++) final class AliasDeclaration : Declaration
|
||||||
|
|
||||||
extern (D) this(Loc loc, Identifier ident, Dsymbol s) @safe
|
extern (D) this(Loc loc, Identifier ident, Dsymbol s) @safe
|
||||||
{
|
{
|
||||||
super(loc, ident);
|
super(DSYM.aliasDeclaration, loc, ident);
|
||||||
//debug printf("AliasDeclaration(id = '%s', s = `%s`)\n", ident.toChars(), s.toChars());
|
//debug printf("AliasDeclaration(id = '%s', s = `%s`)\n", ident.toChars(), s.toChars());
|
||||||
assert(s != this);
|
assert(s != this);
|
||||||
this.aliassym = s;
|
this.aliassym = s;
|
||||||
|
@ -732,11 +722,6 @@ extern (C++) final class AliasDeclaration : Declaration
|
||||||
aliassym && aliassym.isOverloadable();
|
aliassym && aliassym.isOverloadable();
|
||||||
}
|
}
|
||||||
|
|
||||||
override inout(AliasDeclaration) isAliasDeclaration() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Returns: `true` if this instance was created to make a template parameter
|
/** Returns: `true` if this instance was created to make a template parameter
|
||||||
visible in the scope of a template body, `false` otherwise */
|
visible in the scope of a template body, `false` otherwise */
|
||||||
extern (D) bool isAliasedTemplateParameter() const
|
extern (D) bool isAliasedTemplateParameter() const
|
||||||
|
@ -759,7 +744,7 @@ extern (C++) final class OverDeclaration : Declaration
|
||||||
|
|
||||||
extern (D) this(Identifier ident, Dsymbol s) @safe
|
extern (D) this(Identifier ident, Dsymbol s) @safe
|
||||||
{
|
{
|
||||||
super(ident);
|
super(DSYM.overDeclaration, ident);
|
||||||
this.aliassym = s;
|
this.aliassym = s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -817,11 +802,6 @@ extern (C++) final class OverDeclaration : Declaration
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
override inout(OverDeclaration) isOverDeclaration() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
@ -895,7 +875,7 @@ extern (C++) class VarDeclaration : Declaration
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
//printf("VarDeclaration('%s')\n", ident.toChars());
|
//printf("VarDeclaration('%s')\n", ident.toChars());
|
||||||
super(loc, ident);
|
super(DSYM.varDeclaration, loc, ident);
|
||||||
debug
|
debug
|
||||||
{
|
{
|
||||||
if (!type && !_init)
|
if (!type && !_init)
|
||||||
|
@ -1217,12 +1197,6 @@ extern (C++) class VarDeclaration : Declaration
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Eliminate need for dynamic_cast
|
|
||||||
override final inout(VarDeclaration) isVarDeclaration() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
@ -1242,7 +1216,7 @@ extern (C++) class BitFieldDeclaration : VarDeclaration
|
||||||
final extern (D) this(Loc loc, Type type, Identifier ident, Expression width)
|
final extern (D) this(Loc loc, Type type, Identifier ident, Expression width)
|
||||||
{
|
{
|
||||||
super(loc, type, ident, null);
|
super(loc, type, ident, null);
|
||||||
|
this.dsym = DSYM.bitFieldDeclaration;
|
||||||
this.width = width;
|
this.width = width;
|
||||||
this.storage_class |= STC.field;
|
this.storage_class |= STC.field;
|
||||||
}
|
}
|
||||||
|
@ -1256,11 +1230,6 @@ extern (C++) class BitFieldDeclaration : VarDeclaration
|
||||||
return bf;
|
return bf;
|
||||||
}
|
}
|
||||||
|
|
||||||
override final inout(BitFieldDeclaration) isBitFieldDeclaration() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
@ -1302,17 +1271,11 @@ extern (C++) final class SymbolDeclaration : Declaration
|
||||||
|
|
||||||
extern (D) this(Loc loc, AggregateDeclaration dsym) @safe
|
extern (D) this(Loc loc, AggregateDeclaration dsym) @safe
|
||||||
{
|
{
|
||||||
super(loc, dsym.ident);
|
super(DSYM.symbolDeclaration, loc, dsym.ident);
|
||||||
this.dsym = dsym;
|
this.dsym = dsym;
|
||||||
storage_class |= STC.const_;
|
storage_class |= STC.const_;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Eliminate need for dynamic_cast
|
|
||||||
override inout(SymbolDeclaration) isSymbolDeclaration() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
@ -1357,6 +1320,7 @@ extern (C++) class TypeInfoDeclaration : VarDeclaration
|
||||||
final extern (D) this(Type tinfo)
|
final extern (D) this(Type tinfo)
|
||||||
{
|
{
|
||||||
super(Loc.initial, Type.dtypeinfo.type, tinfo.getTypeInfoIdent(), null);
|
super(Loc.initial, Type.dtypeinfo.type, tinfo.getTypeInfoIdent(), null);
|
||||||
|
this.dsym = DSYM.typeInfoDeclaration;
|
||||||
this.tinfo = tinfo;
|
this.tinfo = tinfo;
|
||||||
storage_class = STC.static_ | STC.gshared;
|
storage_class = STC.static_ | STC.gshared;
|
||||||
visibility = Visibility(Visibility.Kind.public_);
|
visibility = Visibility(Visibility.Kind.public_);
|
||||||
|
@ -1374,11 +1338,6 @@ extern (C++) class TypeInfoDeclaration : VarDeclaration
|
||||||
assert(0); // should never be produced by syntax
|
assert(0); // should never be produced by syntax
|
||||||
}
|
}
|
||||||
|
|
||||||
override final inout(TypeInfoDeclaration) isTypeInfoDeclaration() inout @nogc nothrow pure @safe
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
@ -1795,6 +1754,7 @@ extern (C++) final class ThisDeclaration : VarDeclaration
|
||||||
extern (D) this(Loc loc, Type t)
|
extern (D) this(Loc loc, Type t)
|
||||||
{
|
{
|
||||||
super(loc, t, Id.This, null);
|
super(loc, t, Id.This, null);
|
||||||
|
this.dsym = DSYM.thisDeclaration;
|
||||||
storage_class |= STC.nodtor;
|
storage_class |= STC.nodtor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1803,11 +1763,6 @@ extern (C++) final class ThisDeclaration : VarDeclaration
|
||||||
assert(0); // should never be produced by syntax
|
assert(0); // should never be produced by syntax
|
||||||
}
|
}
|
||||||
|
|
||||||
override inout(ThisDeclaration) isThisDeclaration() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
|
|
@ -160,7 +160,6 @@ public:
|
||||||
|
|
||||||
Visibility visible() override final;
|
Visibility visible() override final;
|
||||||
|
|
||||||
Declaration *isDeclaration() override final { return this; }
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -180,7 +179,6 @@ public:
|
||||||
Dsymbol *toAlias2() override;
|
Dsymbol *toAlias2() override;
|
||||||
bool needThis() override;
|
bool needThis() override;
|
||||||
|
|
||||||
TupleDeclaration *isTupleDeclaration() override { return this; }
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -202,7 +200,6 @@ public:
|
||||||
Dsymbol *toAlias2() override;
|
Dsymbol *toAlias2() override;
|
||||||
bool isOverloadable() const override;
|
bool isOverloadable() const override;
|
||||||
|
|
||||||
AliasDeclaration *isAliasDeclaration() override { return this; }
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -222,7 +219,6 @@ public:
|
||||||
Dsymbol *isUnique();
|
Dsymbol *isUnique();
|
||||||
bool isOverloadable() const override;
|
bool isOverloadable() const override;
|
||||||
|
|
||||||
OverDeclaration *isOverDeclaration() override { return this; }
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -300,7 +296,6 @@ public:
|
||||||
bool needsScopeDtor();
|
bool needsScopeDtor();
|
||||||
Dsymbol *toAlias() override final;
|
Dsymbol *toAlias() override final;
|
||||||
// Eliminate need for dynamic_cast
|
// Eliminate need for dynamic_cast
|
||||||
VarDeclaration *isVarDeclaration() override final { return (VarDeclaration *)this; }
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -315,7 +310,6 @@ public:
|
||||||
unsigned bitOffset;
|
unsigned bitOffset;
|
||||||
|
|
||||||
BitFieldDeclaration *syntaxCopy(Dsymbol *) override;
|
BitFieldDeclaration *syntaxCopy(Dsymbol *) override;
|
||||||
BitFieldDeclaration *isBitFieldDeclaration() override final { return this; }
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -329,7 +323,6 @@ public:
|
||||||
AggregateDeclaration *dsym;
|
AggregateDeclaration *dsym;
|
||||||
|
|
||||||
// Eliminate need for dynamic_cast
|
// Eliminate need for dynamic_cast
|
||||||
SymbolDeclaration *isSymbolDeclaration() override { return (SymbolDeclaration *)this; }
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -341,7 +334,6 @@ public:
|
||||||
static TypeInfoDeclaration *create(Type *tinfo);
|
static TypeInfoDeclaration *create(Type *tinfo);
|
||||||
TypeInfoDeclaration *syntaxCopy(Dsymbol *) override final;
|
TypeInfoDeclaration *syntaxCopy(Dsymbol *) override final;
|
||||||
|
|
||||||
TypeInfoDeclaration *isTypeInfoDeclaration() override final { return this; }
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -481,7 +473,6 @@ class ThisDeclaration final : public VarDeclaration
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ThisDeclaration *syntaxCopy(Dsymbol *) override;
|
ThisDeclaration *syntaxCopy(Dsymbol *) override;
|
||||||
ThisDeclaration *isThisDeclaration() override { return this; }
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -738,8 +729,6 @@ public:
|
||||||
static FuncDeclaration *genCfunc(Parameters *args, Type *treturn, const char *name, StorageClass stc=0);
|
static FuncDeclaration *genCfunc(Parameters *args, Type *treturn, const char *name, StorageClass stc=0);
|
||||||
static FuncDeclaration *genCfunc(Parameters *args, Type *treturn, Identifier *id, StorageClass stc=0);
|
static FuncDeclaration *genCfunc(Parameters *args, Type *treturn, Identifier *id, StorageClass stc=0);
|
||||||
|
|
||||||
FuncDeclaration *isFuncDeclaration() override final { return this; }
|
|
||||||
|
|
||||||
virtual FuncDeclaration *toAliasFunc() { return this; }
|
virtual FuncDeclaration *toAliasFunc() { return this; }
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
@ -750,7 +739,6 @@ public:
|
||||||
FuncDeclaration *funcalias;
|
FuncDeclaration *funcalias;
|
||||||
d_bool hasOverloads;
|
d_bool hasOverloads;
|
||||||
|
|
||||||
FuncAliasDeclaration *isFuncAliasDeclaration() override { return this; }
|
|
||||||
const char *kind() const override;
|
const char *kind() const override;
|
||||||
|
|
||||||
FuncDeclaration *toAliasFunc() override;
|
FuncDeclaration *toAliasFunc() override;
|
||||||
|
@ -773,7 +761,6 @@ public:
|
||||||
bool addPreInvariant() override;
|
bool addPreInvariant() override;
|
||||||
bool addPostInvariant() override;
|
bool addPostInvariant() override;
|
||||||
|
|
||||||
FuncLiteralDeclaration *isFuncLiteralDeclaration() override { return this; }
|
|
||||||
const char *kind() const override;
|
const char *kind() const override;
|
||||||
const char *toPrettyChars(bool QualifyTypes = false) override;
|
const char *toPrettyChars(bool QualifyTypes = false) override;
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
|
@ -790,7 +777,6 @@ public:
|
||||||
bool addPreInvariant() override;
|
bool addPreInvariant() override;
|
||||||
bool addPostInvariant() override;
|
bool addPostInvariant() override;
|
||||||
|
|
||||||
CtorDeclaration *isCtorDeclaration() override { return this; }
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -803,7 +789,6 @@ public:
|
||||||
bool addPostInvariant() override;
|
bool addPostInvariant() override;
|
||||||
bool overloadInsert(Dsymbol *s) override;
|
bool overloadInsert(Dsymbol *s) override;
|
||||||
|
|
||||||
PostBlitDeclaration *isPostBlitDeclaration() override { return this; }
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -817,7 +802,6 @@ public:
|
||||||
bool addPostInvariant() override;
|
bool addPostInvariant() override;
|
||||||
bool overloadInsert(Dsymbol *s) override;
|
bool overloadInsert(Dsymbol *s) override;
|
||||||
|
|
||||||
DtorDeclaration *isDtorDeclaration() override { return this; }
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -831,7 +815,6 @@ public:
|
||||||
bool addPostInvariant() override final;
|
bool addPostInvariant() override final;
|
||||||
bool hasStaticCtorOrDtor() override final;
|
bool hasStaticCtorOrDtor() override final;
|
||||||
|
|
||||||
StaticCtorDeclaration *isStaticCtorDeclaration() override final { return this; }
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -841,7 +824,6 @@ public:
|
||||||
bool standalone;
|
bool standalone;
|
||||||
SharedStaticCtorDeclaration *syntaxCopy(Dsymbol *) override;
|
SharedStaticCtorDeclaration *syntaxCopy(Dsymbol *) override;
|
||||||
|
|
||||||
SharedStaticCtorDeclaration *isSharedStaticCtorDeclaration() override { return this; }
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -857,7 +839,6 @@ public:
|
||||||
bool addPreInvariant() override final;
|
bool addPreInvariant() override final;
|
||||||
bool addPostInvariant() override final;
|
bool addPostInvariant() override final;
|
||||||
|
|
||||||
StaticDtorDeclaration *isStaticDtorDeclaration() override final { return this; }
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -866,7 +847,6 @@ class SharedStaticDtorDeclaration final : public StaticDtorDeclaration
|
||||||
public:
|
public:
|
||||||
SharedStaticDtorDeclaration *syntaxCopy(Dsymbol *) override;
|
SharedStaticDtorDeclaration *syntaxCopy(Dsymbol *) override;
|
||||||
|
|
||||||
SharedStaticDtorDeclaration *isSharedStaticDtorDeclaration() override { return this; }
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -878,7 +858,6 @@ public:
|
||||||
bool addPreInvariant() override;
|
bool addPreInvariant() override;
|
||||||
bool addPostInvariant() override;
|
bool addPostInvariant() override;
|
||||||
|
|
||||||
InvariantDeclaration *isInvariantDeclaration() override { return this; }
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -896,7 +875,6 @@ public:
|
||||||
bool addPreInvariant() override;
|
bool addPreInvariant() override;
|
||||||
bool addPostInvariant() override;
|
bool addPostInvariant() override;
|
||||||
|
|
||||||
UnitTestDeclaration *isUnitTestDeclaration() override { return this; }
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -909,6 +887,5 @@ public:
|
||||||
bool addPreInvariant() override;
|
bool addPreInvariant() override;
|
||||||
bool addPostInvariant() override;
|
bool addPostInvariant() override;
|
||||||
|
|
||||||
NewDeclaration *isNewDeclaration() override { return this; }
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
|
@ -70,6 +70,7 @@ extern (C++) final class EnumDeclaration : ScopeDsymbol
|
||||||
//printf("EnumDeclaration() %p %s : %s\n", this, toChars(), memtype.toChars());
|
//printf("EnumDeclaration() %p %s : %s\n", this, toChars(), memtype.toChars());
|
||||||
type = new TypeEnum(this);
|
type = new TypeEnum(this);
|
||||||
this.memtype = memtype;
|
this.memtype = memtype;
|
||||||
|
this.dsym = DSYM.enumDeclaration;
|
||||||
visibility = Visibility(Visibility.Kind.undefined);
|
visibility = Visibility(Visibility.Kind.undefined);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,11 +114,6 @@ extern (C++) final class EnumDeclaration : ScopeDsymbol
|
||||||
return isSpecialEnumIdent(ident) && memtype;
|
return isSpecialEnumIdent(ident) && memtype;
|
||||||
}
|
}
|
||||||
|
|
||||||
override inout(EnumDeclaration) isEnumDeclaration() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
@ -152,6 +148,7 @@ extern (C++) final class EnumMember : VarDeclaration
|
||||||
super(loc, null, id ? id : Id.empty, new ExpInitializer(loc, value));
|
super(loc, null, id ? id : Id.empty, new ExpInitializer(loc, value));
|
||||||
this.origValue = value;
|
this.origValue = value;
|
||||||
this.origType = origType;
|
this.origType = origType;
|
||||||
|
this.dsym = DSYM.enumMember;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern(D) this(Loc loc, Identifier id, Expression value, Type memtype,
|
extern(D) this(Loc loc, Identifier id, Expression value, Type memtype,
|
||||||
|
@ -180,11 +177,6 @@ extern (C++) final class EnumMember : VarDeclaration
|
||||||
return "enum member";
|
return "enum member";
|
||||||
}
|
}
|
||||||
|
|
||||||
override inout(EnumMember) isEnumMember() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
|
|
@ -59,7 +59,7 @@ extern (C++) final class Import : Dsymbol
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
super(loc, selectIdent());
|
super(DSYM.import_, loc, selectIdent());
|
||||||
|
|
||||||
assert(id);
|
assert(id);
|
||||||
version (none)
|
version (none)
|
||||||
|
@ -161,11 +161,6 @@ extern (C++) final class Import : Dsymbol
|
||||||
return imp && !imp.aliasId;
|
return imp && !imp.aliasId;
|
||||||
}
|
}
|
||||||
|
|
||||||
override inout(Import) isImport() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
|
|
@ -180,6 +180,7 @@ extern (C++) class Package : ScopeDsymbol
|
||||||
super(loc, ident);
|
super(loc, ident);
|
||||||
__gshared uint packageTag;
|
__gshared uint packageTag;
|
||||||
this.tag = packageTag++;
|
this.tag = packageTag++;
|
||||||
|
this.dsym = DSYM.package_;
|
||||||
}
|
}
|
||||||
|
|
||||||
override const(char)* kind() const nothrow
|
override const(char)* kind() const nothrow
|
||||||
|
@ -253,11 +254,6 @@ extern (C++) class Package : ScopeDsymbol
|
||||||
return dst;
|
return dst;
|
||||||
}
|
}
|
||||||
|
|
||||||
override final inout(Package) isPackage() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if pkg is a sub-package of this
|
* Checks if pkg is a sub-package of this
|
||||||
*
|
*
|
||||||
|
@ -445,6 +441,7 @@ extern (C++) final class Module : Package
|
||||||
extern (D) this(Loc loc, const(char)[] filename, Identifier ident, int doDocComment, int doHdrGen)
|
extern (D) this(Loc loc, const(char)[] filename, Identifier ident, int doDocComment, int doHdrGen)
|
||||||
{
|
{
|
||||||
super(loc, ident);
|
super(loc, ident);
|
||||||
|
this.dsym = DSYM.module_;
|
||||||
const(char)[] srcfilename;
|
const(char)[] srcfilename;
|
||||||
//printf("Module::Module(filename = '%.*s', ident = '%s')\n", cast(int)filename.length, filename.ptr, ident.toChars());
|
//printf("Module::Module(filename = '%.*s', ident = '%s')\n", cast(int)filename.length, filename.ptr, ident.toChars());
|
||||||
this.arg = filename;
|
this.arg = filename;
|
||||||
|
@ -1178,11 +1175,6 @@ extern (C++) final class Module : Package
|
||||||
|
|
||||||
uint[uint] ctfe_cov; /// coverage information from ctfe execution_count[line]
|
uint[uint] ctfe_cov; /// coverage information from ctfe execution_count[line]
|
||||||
|
|
||||||
override inout(Module) isModule() inout nothrow
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
|
|
@ -119,6 +119,7 @@ extern (C++) class StructDeclaration : AggregateDeclaration
|
||||||
extern (D) this(Loc loc, Identifier id, bool inObject)
|
extern (D) this(Loc loc, Identifier id, bool inObject)
|
||||||
{
|
{
|
||||||
super(loc, id);
|
super(loc, id);
|
||||||
|
this.dsym = DSYM.structDeclaration;
|
||||||
zeroInit = false; // assume false until we do semantic processing
|
zeroInit = false; // assume false until we do semantic processing
|
||||||
ispod = ThreeState.none;
|
ispod = ThreeState.none;
|
||||||
// For forward references
|
// For forward references
|
||||||
|
@ -374,11 +375,6 @@ extern (C++) class StructDeclaration : AggregateDeclaration
|
||||||
return postblit || hasCopyCtor;
|
return postblit || hasCopyCtor;
|
||||||
}
|
}
|
||||||
|
|
||||||
override final inout(StructDeclaration) isStructDeclaration() inout @nogc nothrow pure @safe
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
@ -543,6 +539,7 @@ extern (C++) final class UnionDeclaration : StructDeclaration
|
||||||
extern (D) this(Loc loc, Identifier id)
|
extern (D) this(Loc loc, Identifier id)
|
||||||
{
|
{
|
||||||
super(loc, id, false);
|
super(loc, id, false);
|
||||||
|
this.dsym = DSYM.unionDeclaration;
|
||||||
}
|
}
|
||||||
|
|
||||||
override UnionDeclaration syntaxCopy(Dsymbol s)
|
override UnionDeclaration syntaxCopy(Dsymbol s)
|
||||||
|
@ -558,11 +555,6 @@ extern (C++) final class UnionDeclaration : StructDeclaration
|
||||||
return "union";
|
return "union";
|
||||||
}
|
}
|
||||||
|
|
||||||
override inout(UnionDeclaration) isUnionDeclaration() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
|
|
@ -259,6 +259,76 @@ private struct DsymbolAttributes
|
||||||
UserAttributeDeclaration userAttribDecl;
|
UserAttributeDeclaration userAttribDecl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum DSYM : ubyte
|
||||||
|
{
|
||||||
|
none,
|
||||||
|
dsymbol,
|
||||||
|
linkDeclaration,
|
||||||
|
cppMangleDeclaration,
|
||||||
|
alignDeclaration,
|
||||||
|
pragmaDeclaration,
|
||||||
|
conditionalDeclaration,
|
||||||
|
staticForeachDeclaration,
|
||||||
|
userAttributeDeclaration,
|
||||||
|
labelDsymbol,
|
||||||
|
aliasThis,
|
||||||
|
package_,
|
||||||
|
module_,
|
||||||
|
enumMember,
|
||||||
|
templateDeclaration,
|
||||||
|
templateInstance,
|
||||||
|
templateMixin,
|
||||||
|
forwardingAttribDeclaration,
|
||||||
|
nspace,
|
||||||
|
declaration,
|
||||||
|
storageClassDeclaration,
|
||||||
|
expressionDsymbol,
|
||||||
|
aliasAssign,
|
||||||
|
thisDeclaration,
|
||||||
|
bitFieldDeclaration,
|
||||||
|
typeInfoDeclaration,
|
||||||
|
tupleDeclaration,
|
||||||
|
aliasDeclaration,
|
||||||
|
aggregateDeclaration,
|
||||||
|
funcDeclaration,
|
||||||
|
funcAliasDeclaration,
|
||||||
|
overDeclaration,
|
||||||
|
funcLiteralDeclaration,
|
||||||
|
ctorDeclaration,
|
||||||
|
postBlitDeclaration,
|
||||||
|
dtorDeclaration,
|
||||||
|
staticCtorDeclaration,
|
||||||
|
staticDtorDeclaration,
|
||||||
|
sharedStaticCtorDeclaration,
|
||||||
|
sharedStaticDtorDeclaration,
|
||||||
|
invariantDeclaration,
|
||||||
|
unitTestDeclaration,
|
||||||
|
newDeclaration,
|
||||||
|
varDeclaration,
|
||||||
|
versionSymbol,
|
||||||
|
debugSymbol,
|
||||||
|
classDeclaration,
|
||||||
|
structDeclaration,
|
||||||
|
unionDeclaration,
|
||||||
|
interfaceDeclaration,
|
||||||
|
scopeDsymbol,
|
||||||
|
forwardingScopeDsymbol,
|
||||||
|
withScopeSymbol,
|
||||||
|
arrayScopeSymbol,
|
||||||
|
import_,
|
||||||
|
enumDeclaration,
|
||||||
|
symbolDeclaration,
|
||||||
|
attribDeclaration,
|
||||||
|
anonDeclaration,
|
||||||
|
cppNamespaceDeclaration,
|
||||||
|
visibilityDeclaration,
|
||||||
|
overloadSet,
|
||||||
|
mixinDeclaration,
|
||||||
|
staticAssert,
|
||||||
|
staticIfDeclaration,
|
||||||
|
cAsmDeclaration
|
||||||
|
}
|
||||||
|
|
||||||
/***********************************************************
|
/***********************************************************
|
||||||
*/
|
*/
|
||||||
extern (C++) class Dsymbol : ASTNode
|
extern (C++) class Dsymbol : ASTNode
|
||||||
|
@ -269,33 +339,42 @@ extern (C++) class Dsymbol : ASTNode
|
||||||
Scope* _scope; // !=null means context to use for semantic()
|
Scope* _scope; // !=null means context to use for semantic()
|
||||||
private DsymbolAttributes* atts; /// attached attribute declarations
|
private DsymbolAttributes* atts; /// attached attribute declarations
|
||||||
const Loc loc; // where defined
|
const Loc loc; // where defined
|
||||||
bool errors; // this symbol failed to pass semantic()
|
|
||||||
PASS semanticRun = PASS.initial;
|
|
||||||
ushort localNum; /// perturb mangled name to avoid collisions with those in FuncDeclaration.localsymtab
|
ushort localNum; /// perturb mangled name to avoid collisions with those in FuncDeclaration.localsymtab
|
||||||
|
static struct BitFields
|
||||||
|
{
|
||||||
|
bool errors; // this symbol failed to pass semantic()
|
||||||
|
PASS semanticRun = PASS.initial;
|
||||||
|
}
|
||||||
|
import dmd.common.bitfields;
|
||||||
|
mixin(generateBitFields!(BitFields, ubyte));
|
||||||
|
DSYM dsym;
|
||||||
|
|
||||||
final extern (D) this() nothrow @safe
|
final extern (D) this(DSYM tag) nothrow @safe
|
||||||
{
|
{
|
||||||
//printf("Dsymbol::Dsymbol(%p)\n", this);
|
//printf("Dsymbol::Dsymbol(%p)\n", this);
|
||||||
|
this.dsym = tag;
|
||||||
loc = Loc.initial;
|
loc = Loc.initial;
|
||||||
}
|
}
|
||||||
|
|
||||||
final extern (D) this(Identifier ident) nothrow @safe
|
final extern (D) this(DSYM tag, Identifier ident) nothrow @safe
|
||||||
{
|
{
|
||||||
//printf("Dsymbol::Dsymbol(%p, ident)\n", this);
|
//printf("Dsymbol::Dsymbol(%p, ident)\n", this);
|
||||||
|
this.dsym = tag;
|
||||||
this.loc = Loc.initial;
|
this.loc = Loc.initial;
|
||||||
this.ident = ident;
|
this.ident = ident;
|
||||||
}
|
}
|
||||||
|
|
||||||
final extern (D) this(Loc loc, Identifier ident) nothrow @safe
|
final extern (D) this(DSYM tag, Loc loc, Identifier ident) nothrow @safe
|
||||||
{
|
{
|
||||||
//printf("Dsymbol::Dsymbol(%p, ident)\n", this);
|
//printf("Dsymbol::Dsymbol(%p, ident)\n", this);
|
||||||
|
this.dsym = tag;
|
||||||
this.loc = loc;
|
this.loc = loc;
|
||||||
this.ident = ident;
|
this.ident = ident;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Dsymbol create(Identifier ident) nothrow @safe
|
static Dsymbol create(Identifier ident) nothrow @safe
|
||||||
{
|
{
|
||||||
return new Dsymbol(ident);
|
return new Dsymbol(DSYM.dsymbol, ident);
|
||||||
}
|
}
|
||||||
|
|
||||||
final override const(char)* toChars() const
|
final override const(char)* toChars() const
|
||||||
|
@ -995,64 +1074,181 @@ extern (C++) class Dsymbol : ASTNode
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
pure nothrow @safe @nogc:
|
pure nothrow @trusted @nogc final:
|
||||||
|
|
||||||
// Eliminate need for dynamic_cast
|
inout(Package) isPackage() inout { return (dsym == DSYM.package_ || dsym == DSYM.module_) ? cast(inout(Package)) cast(void*) this : null; }
|
||||||
inout(Package) isPackage() inout { return null; }
|
inout(Module) isModule() inout { return dsym == DSYM.module_ ? cast(inout(Module)) cast(void*) this : null; }
|
||||||
inout(Module) isModule() inout { return null; }
|
inout(EnumMember) isEnumMember() inout { return dsym == DSYM.enumMember ? cast(inout(EnumMember)) cast(void*) this : null; }
|
||||||
inout(EnumMember) isEnumMember() inout { return null; }
|
inout(TemplateDeclaration) isTemplateDeclaration() inout { return dsym == DSYM.templateDeclaration ? cast(inout(TemplateDeclaration)) cast(void*) this : null; }
|
||||||
inout(TemplateDeclaration) isTemplateDeclaration() inout { return null; }
|
inout(TemplateInstance) isTemplateInstance() inout { return (dsym == DSYM.templateInstance || dsym == DSYM.templateMixin) ? cast(inout(TemplateInstance)) cast(void*) this : null; }
|
||||||
inout(TemplateInstance) isTemplateInstance() inout { return null; }
|
inout(TemplateMixin) isTemplateMixin() inout { return dsym == DSYM.templateMixin ? cast(inout(TemplateMixin)) cast(void*) this : null; }
|
||||||
inout(TemplateMixin) isTemplateMixin() inout { return null; }
|
inout(ForwardingAttribDeclaration) isForwardingAttribDeclaration() inout { return dsym == DSYM.forwardingAttribDeclaration ? cast(inout(ForwardingAttribDeclaration)) cast(void*) this : null; }
|
||||||
inout(ForwardingAttribDeclaration) isForwardingAttribDeclaration() inout { return null; }
|
inout(Nspace) isNspace() inout { return dsym == DSYM.nspace ? cast(inout(Nspace)) cast(void*) this : null; }
|
||||||
inout(Nspace) isNspace() inout { return null; }
|
inout(Declaration) isDeclaration() inout {
|
||||||
inout(Declaration) isDeclaration() inout { return null; }
|
switch (dsym)
|
||||||
inout(StorageClassDeclaration) isStorageClassDeclaration() inout { return null; }
|
{
|
||||||
inout(ExpressionDsymbol) isExpressionDsymbol() inout { return null; }
|
case DSYM.tupleDeclaration:
|
||||||
inout(AliasAssign) isAliasAssign() inout { return null; }
|
case DSYM.aliasDeclaration:
|
||||||
inout(ThisDeclaration) isThisDeclaration() inout { return null; }
|
case DSYM.overDeclaration:
|
||||||
inout(BitFieldDeclaration) isBitFieldDeclaration() inout { return null; }
|
case DSYM.varDeclaration:
|
||||||
inout(TypeInfoDeclaration) isTypeInfoDeclaration() inout { return null; }
|
case DSYM.bitFieldDeclaration:
|
||||||
inout(TupleDeclaration) isTupleDeclaration() inout { return null; }
|
case DSYM.typeInfoDeclaration:
|
||||||
inout(AliasDeclaration) isAliasDeclaration() inout { return null; }
|
case DSYM.thisDeclaration:
|
||||||
inout(AggregateDeclaration) isAggregateDeclaration() inout { return null; }
|
case DSYM.enumMember:
|
||||||
inout(FuncDeclaration) isFuncDeclaration() inout { return null; }
|
case DSYM.symbolDeclaration:
|
||||||
inout(FuncAliasDeclaration) isFuncAliasDeclaration() inout { return null; }
|
case DSYM.funcDeclaration:
|
||||||
inout(OverDeclaration) isOverDeclaration() inout { return null; }
|
case DSYM.funcAliasDeclaration:
|
||||||
inout(FuncLiteralDeclaration) isFuncLiteralDeclaration() inout { return null; }
|
case DSYM.funcLiteralDeclaration:
|
||||||
inout(CtorDeclaration) isCtorDeclaration() inout { return null; }
|
case DSYM.ctorDeclaration:
|
||||||
inout(PostBlitDeclaration) isPostBlitDeclaration() inout { return null; }
|
case DSYM.postBlitDeclaration:
|
||||||
inout(DtorDeclaration) isDtorDeclaration() inout { return null; }
|
case DSYM.dtorDeclaration:
|
||||||
inout(StaticCtorDeclaration) isStaticCtorDeclaration() inout { return null; }
|
case DSYM.staticCtorDeclaration:
|
||||||
inout(StaticDtorDeclaration) isStaticDtorDeclaration() inout { return null; }
|
case DSYM.sharedStaticCtorDeclaration:
|
||||||
inout(SharedStaticCtorDeclaration) isSharedStaticCtorDeclaration() inout { return null; }
|
case DSYM.staticDtorDeclaration:
|
||||||
inout(SharedStaticDtorDeclaration) isSharedStaticDtorDeclaration() inout { return null; }
|
case DSYM.sharedStaticDtorDeclaration:
|
||||||
inout(InvariantDeclaration) isInvariantDeclaration() inout { return null; }
|
case DSYM.invariantDeclaration:
|
||||||
inout(UnitTestDeclaration) isUnitTestDeclaration() inout { return null; }
|
case DSYM.unitTestDeclaration:
|
||||||
inout(NewDeclaration) isNewDeclaration() inout { return null; }
|
case DSYM.newDeclaration:
|
||||||
inout(VarDeclaration) isVarDeclaration() inout { return null; }
|
return cast(inout(Declaration)) cast(void*) this;
|
||||||
inout(VersionSymbol) isVersionSymbol() inout { return null; }
|
default:
|
||||||
inout(DebugSymbol) isDebugSymbol() inout { return null; }
|
return null;
|
||||||
inout(ClassDeclaration) isClassDeclaration() inout { return null; }
|
}
|
||||||
inout(StructDeclaration) isStructDeclaration() inout { return null; }
|
}
|
||||||
inout(UnionDeclaration) isUnionDeclaration() inout { return null; }
|
inout(StorageClassDeclaration) isStorageClassDeclaration() inout { return dsym == DSYM.storageClassDeclaration ? cast(inout(StorageClassDeclaration)) cast(void*) this : null; }
|
||||||
inout(InterfaceDeclaration) isInterfaceDeclaration() inout { return null; }
|
inout(ExpressionDsymbol) isExpressionDsymbol() inout { return dsym == DSYM.expressionDsymbol ? cast(inout(ExpressionDsymbol)) cast(void*) this : null; }
|
||||||
inout(ScopeDsymbol) isScopeDsymbol() inout { return null; }
|
inout(AliasAssign) isAliasAssign() inout { return dsym == DSYM.aliasAssign ? cast(inout(AliasAssign)) cast(void*) this : null; }
|
||||||
inout(ForwardingScopeDsymbol) isForwardingScopeDsymbol() inout { return null; }
|
inout(ThisDeclaration) isThisDeclaration() inout { return dsym == DSYM.thisDeclaration ? cast(inout(ThisDeclaration)) cast(void*) this : null; }
|
||||||
inout(WithScopeSymbol) isWithScopeSymbol() inout { return null; }
|
inout(BitFieldDeclaration) isBitFieldDeclaration() inout { return dsym == DSYM.bitFieldDeclaration ? cast(inout(BitFieldDeclaration)) cast(void*) this : null; }
|
||||||
inout(ArrayScopeSymbol) isArrayScopeSymbol() inout { return null; }
|
inout(TypeInfoDeclaration) isTypeInfoDeclaration() inout { return dsym == DSYM.typeInfoDeclaration ? cast(inout(TypeInfoDeclaration)) cast(void*) this : null; }
|
||||||
inout(Import) isImport() inout { return null; }
|
inout(TupleDeclaration) isTupleDeclaration() inout { return dsym == DSYM.tupleDeclaration ? cast(inout(TupleDeclaration)) cast(void*) this : null; }
|
||||||
inout(EnumDeclaration) isEnumDeclaration() inout { return null; }
|
inout(AliasDeclaration) isAliasDeclaration() inout { return dsym == DSYM.aliasDeclaration ? cast(inout(AliasDeclaration)) cast(void*) this : null; }
|
||||||
inout(SymbolDeclaration) isSymbolDeclaration() inout { return null; }
|
inout(AggregateDeclaration) isAggregateDeclaration() inout {
|
||||||
inout(AttribDeclaration) isAttribDeclaration() inout { return null; }
|
switch (dsym)
|
||||||
inout(AnonDeclaration) isAnonDeclaration() inout { return null; }
|
{
|
||||||
inout(CPPNamespaceDeclaration) isCPPNamespaceDeclaration() inout { return null; }
|
case DSYM.aggregateDeclaration:
|
||||||
inout(VisibilityDeclaration) isVisibilityDeclaration() inout { return null; }
|
case DSYM.structDeclaration:
|
||||||
inout(OverloadSet) isOverloadSet() inout { return null; }
|
case DSYM.unionDeclaration:
|
||||||
inout(MixinDeclaration) isMixinDeclaration() inout { return null; }
|
case DSYM.classDeclaration:
|
||||||
inout(StaticAssert) isStaticAssert() inout { return null; }
|
case DSYM.interfaceDeclaration:
|
||||||
inout(StaticIfDeclaration) isStaticIfDeclaration() inout { return null; }
|
return cast(inout(AggregateDeclaration)) cast(void*) this;
|
||||||
inout(CAsmDeclaration) isCAsmDeclaration() inout { return null; }
|
default:
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
inout(FuncDeclaration) isFuncDeclaration() inout {
|
||||||
|
switch (dsym)
|
||||||
|
{
|
||||||
|
case DSYM.funcDeclaration:
|
||||||
|
case DSYM.funcAliasDeclaration:
|
||||||
|
case DSYM.funcLiteralDeclaration:
|
||||||
|
case DSYM.ctorDeclaration:
|
||||||
|
case DSYM.postBlitDeclaration:
|
||||||
|
case DSYM.dtorDeclaration:
|
||||||
|
case DSYM.staticCtorDeclaration:
|
||||||
|
case DSYM.sharedStaticCtorDeclaration:
|
||||||
|
case DSYM.staticDtorDeclaration:
|
||||||
|
case DSYM.sharedStaticDtorDeclaration:
|
||||||
|
case DSYM.invariantDeclaration:
|
||||||
|
case DSYM.unitTestDeclaration:
|
||||||
|
case DSYM.newDeclaration:
|
||||||
|
return cast(inout(FuncDeclaration)) cast(void*) this;
|
||||||
|
default:
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
inout(FuncAliasDeclaration) isFuncAliasDeclaration() inout { return dsym == DSYM.funcAliasDeclaration ? cast(inout(FuncAliasDeclaration)) cast(void*) this : null; }
|
||||||
|
inout(OverDeclaration) isOverDeclaration() inout { return dsym == DSYM.overDeclaration ? cast(inout(OverDeclaration)) cast(void*) this : null; }
|
||||||
|
inout(FuncLiteralDeclaration) isFuncLiteralDeclaration() inout { return dsym == DSYM.funcLiteralDeclaration ? cast(inout(FuncLiteralDeclaration)) cast(void*) this : null; }
|
||||||
|
inout(CtorDeclaration) isCtorDeclaration() inout { return dsym == DSYM.ctorDeclaration ? cast(inout(CtorDeclaration)) cast(void*) this : null; }
|
||||||
|
inout(PostBlitDeclaration) isPostBlitDeclaration() inout { return dsym == DSYM.postBlitDeclaration ? cast(inout(PostBlitDeclaration)) cast(void*) this : null; }
|
||||||
|
inout(DtorDeclaration) isDtorDeclaration() inout { return dsym == DSYM.dtorDeclaration ? cast(inout(DtorDeclaration)) cast(void*) this : null; }
|
||||||
|
inout(StaticCtorDeclaration) isStaticCtorDeclaration() inout { return (dsym == DSYM.staticCtorDeclaration || dsym == DSYM.sharedStaticCtorDeclaration) ? cast(inout(StaticCtorDeclaration)) cast(void*) this : null; }
|
||||||
|
inout(StaticDtorDeclaration) isStaticDtorDeclaration() inout { return (dsym == DSYM.staticDtorDeclaration || dsym == DSYM.sharedStaticDtorDeclaration) ? cast(inout(StaticDtorDeclaration)) cast(void*) this : null; }
|
||||||
|
inout(SharedStaticCtorDeclaration) isSharedStaticCtorDeclaration() inout { return dsym == DSYM.sharedStaticCtorDeclaration ? cast(inout(SharedStaticCtorDeclaration)) cast(void*) this : null; }
|
||||||
|
inout(SharedStaticDtorDeclaration) isSharedStaticDtorDeclaration() inout { return dsym == DSYM.sharedStaticDtorDeclaration ? cast(inout(SharedStaticDtorDeclaration)) cast(void*) this : null; }
|
||||||
|
inout(InvariantDeclaration) isInvariantDeclaration() inout { return dsym == DSYM.invariantDeclaration ? cast(inout(InvariantDeclaration)) cast(void*) this : null; }
|
||||||
|
inout(UnitTestDeclaration) isUnitTestDeclaration() inout { return dsym == DSYM.unitTestDeclaration ? cast(inout(UnitTestDeclaration)) cast(void*) this : null; }
|
||||||
|
inout(NewDeclaration) isNewDeclaration() inout { return dsym == DSYM.newDeclaration ? cast(inout(NewDeclaration)) cast(void*) this : null; }
|
||||||
|
inout(VarDeclaration) isVarDeclaration() inout {
|
||||||
|
switch (dsym)
|
||||||
|
{
|
||||||
|
case DSYM.varDeclaration:
|
||||||
|
case DSYM.bitFieldDeclaration:
|
||||||
|
case DSYM.typeInfoDeclaration:
|
||||||
|
case DSYM.thisDeclaration:
|
||||||
|
case DSYM.enumMember:
|
||||||
|
return cast(inout(VarDeclaration)) cast(void*) this;
|
||||||
|
default:
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
inout(VersionSymbol) isVersionSymbol() inout { return dsym == DSYM.versionSymbol ? cast(inout(VersionSymbol)) cast(void*) this : null; }
|
||||||
|
inout(DebugSymbol) isDebugSymbol() inout { return dsym == DSYM.debugSymbol ? cast(inout(DebugSymbol)) cast(void*) this : null; }
|
||||||
|
inout(ClassDeclaration) isClassDeclaration() inout { return (dsym == DSYM.classDeclaration || dsym == DSYM.interfaceDeclaration) ? cast(inout(ClassDeclaration)) cast(void*) this : null; }
|
||||||
|
inout(StructDeclaration) isStructDeclaration() inout { return (dsym == DSYM.structDeclaration || dsym == DSYM.unionDeclaration) ? cast(inout(StructDeclaration)) cast(void*) this : null; }
|
||||||
|
inout(UnionDeclaration) isUnionDeclaration() inout { return dsym == DSYM.unionDeclaration ? cast(inout(UnionDeclaration)) cast(void*) this : null; }
|
||||||
|
inout(InterfaceDeclaration) isInterfaceDeclaration() inout { return dsym == DSYM.interfaceDeclaration ? cast(inout(InterfaceDeclaration)) cast(void*) this : null; }
|
||||||
|
inout(ScopeDsymbol) isScopeDsymbol() inout {
|
||||||
|
switch (dsym)
|
||||||
|
{
|
||||||
|
case DSYM.enumDeclaration:
|
||||||
|
case DSYM.scopeDsymbol:
|
||||||
|
case DSYM.package_:
|
||||||
|
case DSYM.module_:
|
||||||
|
case DSYM.nspace:
|
||||||
|
case DSYM.templateInstance:
|
||||||
|
case DSYM.templateMixin:
|
||||||
|
case DSYM.templateDeclaration:
|
||||||
|
case DSYM.aggregateDeclaration:
|
||||||
|
case DSYM.structDeclaration:
|
||||||
|
case DSYM.unionDeclaration:
|
||||||
|
case DSYM.classDeclaration:
|
||||||
|
case DSYM.interfaceDeclaration:
|
||||||
|
case DSYM.withScopeSymbol:
|
||||||
|
case DSYM.arrayScopeSymbol:
|
||||||
|
case DSYM.forwardingScopeDsymbol:
|
||||||
|
return cast(inout(ScopeDsymbol)) cast(void*) this;
|
||||||
|
default:
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
inout(ForwardingScopeDsymbol) isForwardingScopeDsymbol() inout { return dsym == DSYM.forwardingScopeDsymbol ? cast(inout(ForwardingScopeDsymbol)) cast(void*) this : null; }
|
||||||
|
inout(WithScopeSymbol) isWithScopeSymbol() inout { return dsym == DSYM.withScopeSymbol ? cast(inout(WithScopeSymbol)) cast(void*) this : null; }
|
||||||
|
inout(ArrayScopeSymbol) isArrayScopeSymbol() inout { return dsym == DSYM.arrayScopeSymbol ? cast(inout(ArrayScopeSymbol)) cast(void*) this : null; }
|
||||||
|
inout(Import) isImport() inout { return dsym == DSYM.import_ ? cast(inout(Import)) cast(void*) this : null; }
|
||||||
|
inout(EnumDeclaration) isEnumDeclaration() inout { return dsym == DSYM.enumDeclaration ? cast(inout(EnumDeclaration)) cast(void*) this : null; }
|
||||||
|
inout(SymbolDeclaration) isSymbolDeclaration() inout { return dsym == DSYM.symbolDeclaration ? cast(inout(SymbolDeclaration)) cast(void*) this : null; }
|
||||||
|
inout(AttribDeclaration) isAttribDeclaration() inout {
|
||||||
|
switch (dsym)
|
||||||
|
{
|
||||||
|
case DSYM.attribDeclaration:
|
||||||
|
case DSYM.storageClassDeclaration:
|
||||||
|
case DSYM.linkDeclaration:
|
||||||
|
case DSYM.cppMangleDeclaration:
|
||||||
|
case DSYM.cppNamespaceDeclaration:
|
||||||
|
case DSYM.visibilityDeclaration:
|
||||||
|
case DSYM.alignDeclaration:
|
||||||
|
case DSYM.anonDeclaration:
|
||||||
|
case DSYM.pragmaDeclaration:
|
||||||
|
case DSYM.conditionalDeclaration:
|
||||||
|
case DSYM.staticIfDeclaration:
|
||||||
|
case DSYM.staticForeachDeclaration:
|
||||||
|
case DSYM.forwardingAttribDeclaration:
|
||||||
|
case DSYM.mixinDeclaration:
|
||||||
|
case DSYM.userAttributeDeclaration:
|
||||||
|
return cast(inout(AttribDeclaration)) cast(void*) this;
|
||||||
|
default:
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
inout(AnonDeclaration) isAnonDeclaration() inout { return dsym == DSYM.anonDeclaration ? cast(inout(AnonDeclaration)) cast(void*) this : null; }
|
||||||
|
inout(CPPNamespaceDeclaration) isCPPNamespaceDeclaration() inout { return dsym == DSYM.cppNamespaceDeclaration ? cast(inout(CPPNamespaceDeclaration)) cast(void*) this : null; }
|
||||||
|
inout(VisibilityDeclaration) isVisibilityDeclaration() inout { return dsym == DSYM.visibilityDeclaration ? cast(inout(VisibilityDeclaration)) cast(void*) this : null; }
|
||||||
|
inout(OverloadSet) isOverloadSet() inout { return dsym == DSYM.overloadSet ? cast(inout(OverloadSet)) cast(void*) this : null; }
|
||||||
|
inout(MixinDeclaration) isMixinDeclaration() inout { return dsym == DSYM.mixinDeclaration ? cast(inout(MixinDeclaration)) cast(void*) this : null; }
|
||||||
|
inout(StaticAssert) isStaticAssert() inout { return dsym == DSYM.staticAssert ? cast(inout(StaticAssert)) cast(void*) this : null; }
|
||||||
|
inout(StaticIfDeclaration) isStaticIfDeclaration() inout { return dsym == DSYM.staticIfDeclaration ? cast(inout(StaticIfDeclaration)) cast(void*) this : null; }
|
||||||
|
inout(CAsmDeclaration) isCAsmDeclaration() inout { return dsym == DSYM.cAsmDeclaration ? cast(inout(CAsmDeclaration)) cast(void*) this : null; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************
|
/***********************************************************
|
||||||
|
@ -1075,16 +1271,17 @@ private:
|
||||||
public:
|
public:
|
||||||
final extern (D) this() nothrow @safe
|
final extern (D) this() nothrow @safe
|
||||||
{
|
{
|
||||||
|
super(DSYM.scopeDsymbol);
|
||||||
}
|
}
|
||||||
|
|
||||||
final extern (D) this(Identifier ident) nothrow @safe
|
final extern (D) this(Identifier ident) nothrow @safe
|
||||||
{
|
{
|
||||||
super(ident);
|
super(DSYM.scopeDsymbol, ident);
|
||||||
}
|
}
|
||||||
|
|
||||||
final extern (D) this(Loc loc, Identifier ident) nothrow @safe
|
final extern (D) this(Loc loc, Identifier ident) nothrow @safe
|
||||||
{
|
{
|
||||||
super(loc, ident);
|
super(DSYM.scopeDsymbol, loc, ident);
|
||||||
}
|
}
|
||||||
|
|
||||||
override ScopeDsymbol syntaxCopy(Dsymbol s)
|
override ScopeDsymbol syntaxCopy(Dsymbol s)
|
||||||
|
@ -1312,11 +1509,6 @@ public:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
override final inout(ScopeDsymbol) isScopeDsymbol() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
@ -1333,11 +1525,7 @@ extern (C++) final class WithScopeSymbol : ScopeDsymbol
|
||||||
extern (D) this(WithStatement withstate) nothrow @safe
|
extern (D) this(WithStatement withstate) nothrow @safe
|
||||||
{
|
{
|
||||||
this.withstate = withstate;
|
this.withstate = withstate;
|
||||||
}
|
this.dsym = DSYM.withScopeSymbol;
|
||||||
|
|
||||||
override inout(WithScopeSymbol) isWithScopeSymbol() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
|
@ -1361,6 +1549,7 @@ extern (C++) final class ArrayScopeSymbol : ScopeDsymbol
|
||||||
assert(exp.op == EXP.index || exp.op == EXP.slice || exp.op == EXP.array);
|
assert(exp.op == EXP.index || exp.op == EXP.slice || exp.op == EXP.array);
|
||||||
this._scope = sc;
|
this._scope = sc;
|
||||||
this.arrayContent = exp;
|
this.arrayContent = exp;
|
||||||
|
this.dsym = DSYM.arrayScopeSymbol;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern (D) this(Scope* sc, TypeTuple type) nothrow @safe
|
extern (D) this(Scope* sc, TypeTuple type) nothrow @safe
|
||||||
|
@ -1375,11 +1564,6 @@ extern (C++) final class ArrayScopeSymbol : ScopeDsymbol
|
||||||
this.arrayContent = td;
|
this.arrayContent = td;
|
||||||
}
|
}
|
||||||
|
|
||||||
override inout(ArrayScopeSymbol) isArrayScopeSymbol() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
@ -1395,7 +1579,7 @@ extern (C++) final class OverloadSet : Dsymbol
|
||||||
|
|
||||||
extern (D) this(Identifier ident, OverloadSet os = null) nothrow
|
extern (D) this(Identifier ident, OverloadSet os = null) nothrow
|
||||||
{
|
{
|
||||||
super(ident);
|
super(DSYM.overloadSet, ident);
|
||||||
if (os)
|
if (os)
|
||||||
{
|
{
|
||||||
a.pushSlice(os.a[]);
|
a.pushSlice(os.a[]);
|
||||||
|
@ -1407,11 +1591,6 @@ extern (C++) final class OverloadSet : Dsymbol
|
||||||
a.push(s);
|
a.push(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
override inout(OverloadSet) isOverloadSet() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override const(char)* kind() const
|
override const(char)* kind() const
|
||||||
{
|
{
|
||||||
return "overloadset";
|
return "overloadset";
|
||||||
|
@ -1434,6 +1613,7 @@ extern (C++) final class ForwardingScopeDsymbol : ScopeDsymbol
|
||||||
extern (D) this() nothrow @safe
|
extern (D) this() nothrow @safe
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
|
this.dsym = DSYM.forwardingScopeDsymbol;
|
||||||
}
|
}
|
||||||
|
|
||||||
override Dsymbol symtabInsert(Dsymbol s) nothrow
|
override Dsymbol symtabInsert(Dsymbol s) nothrow
|
||||||
|
@ -1502,11 +1682,6 @@ extern (C++) final class ForwardingScopeDsymbol : ScopeDsymbol
|
||||||
|
|
||||||
override const(char)* kind()const{ return "local scope"; }
|
override const(char)* kind()const{ return "local scope"; }
|
||||||
|
|
||||||
override inout(ForwardingScopeDsymbol) isForwardingScopeDsymbol() inout nothrow
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1519,14 +1694,9 @@ extern (C++) final class ExpressionDsymbol : Dsymbol
|
||||||
Expression exp;
|
Expression exp;
|
||||||
this(Expression exp) nothrow @safe
|
this(Expression exp) nothrow @safe
|
||||||
{
|
{
|
||||||
super();
|
super(DSYM.expressionDsymbol);
|
||||||
this.exp = exp;
|
this.exp = exp;
|
||||||
}
|
}
|
||||||
|
|
||||||
override inout(ExpressionDsymbol) isExpressionDsymbol() inout nothrow
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************
|
/**********************************************
|
||||||
|
@ -1544,7 +1714,7 @@ extern (C++) final class AliasAssign : Dsymbol
|
||||||
|
|
||||||
extern (D) this(Loc loc, Identifier ident, Type type, Dsymbol aliassym) nothrow @safe
|
extern (D) this(Loc loc, Identifier ident, Type type, Dsymbol aliassym) nothrow @safe
|
||||||
{
|
{
|
||||||
super(loc, null);
|
super(DSYM.aliasAssign, loc, null);
|
||||||
this.ident = ident;
|
this.ident = ident;
|
||||||
this.type = type;
|
this.type = type;
|
||||||
this.aliassym = aliassym;
|
this.aliassym = aliassym;
|
||||||
|
@ -1559,11 +1729,6 @@ extern (C++) final class AliasAssign : Dsymbol
|
||||||
return aa;
|
return aa;
|
||||||
}
|
}
|
||||||
|
|
||||||
override inout(AliasAssign) isAliasAssign() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override const(char)* kind() const
|
override const(char)* kind() const
|
||||||
{
|
{
|
||||||
return "alias assignment";
|
return "alias assignment";
|
||||||
|
@ -1656,15 +1821,10 @@ extern (C++) final class CAsmDeclaration : Dsymbol
|
||||||
Expression code;
|
Expression code;
|
||||||
extern (D) this(Expression e) nothrow @safe
|
extern (D) this(Expression e) nothrow @safe
|
||||||
{
|
{
|
||||||
super();
|
super(DSYM.cAsmDeclaration);
|
||||||
this.code = e;
|
this.code = e;
|
||||||
}
|
}
|
||||||
|
|
||||||
override inout(CAsmDeclaration) isCAsmDeclaration() inout nothrow
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
|
|
@ -183,9 +183,15 @@ private:
|
||||||
DsymbolAttributes* atts;
|
DsymbolAttributes* atts;
|
||||||
public:
|
public:
|
||||||
Loc loc; // where defined
|
Loc loc; // where defined
|
||||||
d_bool errors; // this symbol failed to pass semantic()
|
|
||||||
PASS semanticRun;
|
|
||||||
unsigned short localNum; // perturb mangled name to avoid collisions with those in FuncDeclaration.localsymtab
|
unsigned short localNum; // perturb mangled name to avoid collisions with those in FuncDeclaration.localsymtab
|
||||||
|
|
||||||
|
bool errors() const;
|
||||||
|
PASS semanticRun() const;
|
||||||
|
PASS semanticRun(PASS v);
|
||||||
|
private:
|
||||||
|
unsigned char bitfields;
|
||||||
|
unsigned char dsym;
|
||||||
|
public:
|
||||||
static Dsymbol *create(Identifier *);
|
static Dsymbol *create(Identifier *);
|
||||||
const char *toChars() const final override;
|
const char *toChars() const final override;
|
||||||
DeprecatedDeclaration* depdecl();
|
DeprecatedDeclaration* depdecl();
|
||||||
|
@ -250,61 +256,61 @@ public:
|
||||||
bool inNonRoot();
|
bool inNonRoot();
|
||||||
|
|
||||||
// Eliminate need for dynamic_cast
|
// Eliminate need for dynamic_cast
|
||||||
virtual Package *isPackage() { return nullptr; }
|
Package *isPackage();
|
||||||
virtual Module *isModule() { return nullptr; }
|
Module *isModule();
|
||||||
virtual EnumMember *isEnumMember() { return nullptr; }
|
EnumMember *isEnumMember();
|
||||||
virtual TemplateDeclaration *isTemplateDeclaration() { return nullptr; }
|
TemplateDeclaration *isTemplateDeclaration();
|
||||||
virtual TemplateInstance *isTemplateInstance() { return nullptr; }
|
TemplateInstance *isTemplateInstance();
|
||||||
virtual TemplateMixin *isTemplateMixin() { return nullptr; }
|
TemplateMixin *isTemplateMixin();
|
||||||
virtual ForwardingAttribDeclaration *isForwardingAttribDeclaration() { return nullptr; }
|
ForwardingAttribDeclaration *isForwardingAttribDeclaration();
|
||||||
virtual Nspace *isNspace() { return nullptr; }
|
Nspace *isNspace();
|
||||||
virtual Declaration *isDeclaration() { return nullptr; }
|
Declaration *isDeclaration();
|
||||||
virtual StorageClassDeclaration *isStorageClassDeclaration(){ return nullptr; }
|
StorageClassDeclaration *isStorageClassDeclaration();
|
||||||
virtual ExpressionDsymbol *isExpressionDsymbol() { return nullptr; }
|
ExpressionDsymbol *isExpressionDsymbol();
|
||||||
virtual AliasAssign *isAliasAssign() { return nullptr; }
|
AliasAssign *isAliasAssign();
|
||||||
virtual ThisDeclaration *isThisDeclaration() { return nullptr; }
|
ThisDeclaration *isThisDeclaration();
|
||||||
virtual BitFieldDeclaration *isBitFieldDeclaration() { return nullptr; }
|
BitFieldDeclaration *isBitFieldDeclaration();
|
||||||
virtual TypeInfoDeclaration *isTypeInfoDeclaration() { return nullptr; }
|
TypeInfoDeclaration *isTypeInfoDeclaration();
|
||||||
virtual TupleDeclaration *isTupleDeclaration() { return nullptr; }
|
TupleDeclaration *isTupleDeclaration();
|
||||||
virtual AliasDeclaration *isAliasDeclaration() { return nullptr; }
|
AliasDeclaration *isAliasDeclaration();
|
||||||
virtual AggregateDeclaration *isAggregateDeclaration() { return nullptr; }
|
AggregateDeclaration *isAggregateDeclaration();
|
||||||
virtual FuncDeclaration *isFuncDeclaration() { return nullptr; }
|
FuncDeclaration *isFuncDeclaration();
|
||||||
virtual FuncAliasDeclaration *isFuncAliasDeclaration() { return nullptr; }
|
FuncAliasDeclaration *isFuncAliasDeclaration();
|
||||||
virtual OverDeclaration *isOverDeclaration() { return nullptr; }
|
OverDeclaration *isOverDeclaration();
|
||||||
virtual FuncLiteralDeclaration *isFuncLiteralDeclaration() { return nullptr; }
|
FuncLiteralDeclaration *isFuncLiteralDeclaration();
|
||||||
virtual CtorDeclaration *isCtorDeclaration() { return nullptr; }
|
CtorDeclaration *isCtorDeclaration();
|
||||||
virtual PostBlitDeclaration *isPostBlitDeclaration() { return nullptr; }
|
PostBlitDeclaration *isPostBlitDeclaration();
|
||||||
virtual DtorDeclaration *isDtorDeclaration() { return nullptr; }
|
DtorDeclaration *isDtorDeclaration();
|
||||||
virtual StaticCtorDeclaration *isStaticCtorDeclaration() { return nullptr; }
|
StaticCtorDeclaration *isStaticCtorDeclaration();
|
||||||
virtual StaticDtorDeclaration *isStaticDtorDeclaration() { return nullptr; }
|
StaticDtorDeclaration *isStaticDtorDeclaration();
|
||||||
virtual SharedStaticCtorDeclaration *isSharedStaticCtorDeclaration() { return nullptr; }
|
SharedStaticCtorDeclaration *isSharedStaticCtorDeclaration();
|
||||||
virtual SharedStaticDtorDeclaration *isSharedStaticDtorDeclaration() { return nullptr; }
|
SharedStaticDtorDeclaration *isSharedStaticDtorDeclaration();
|
||||||
virtual InvariantDeclaration *isInvariantDeclaration() { return nullptr; }
|
InvariantDeclaration *isInvariantDeclaration();
|
||||||
virtual UnitTestDeclaration *isUnitTestDeclaration() { return nullptr; }
|
UnitTestDeclaration *isUnitTestDeclaration();
|
||||||
virtual NewDeclaration *isNewDeclaration() { return nullptr; }
|
NewDeclaration *isNewDeclaration();
|
||||||
virtual VarDeclaration *isVarDeclaration() { return nullptr; }
|
VarDeclaration *isVarDeclaration();
|
||||||
virtual VersionSymbol *isVersionSymbol() { return nullptr; }
|
VersionSymbol *isVersionSymbol();
|
||||||
virtual DebugSymbol *isDebugSymbol() { return nullptr; }
|
DebugSymbol *isDebugSymbol();
|
||||||
virtual ClassDeclaration *isClassDeclaration() { return nullptr; }
|
ClassDeclaration *isClassDeclaration();
|
||||||
virtual StructDeclaration *isStructDeclaration() { return nullptr; }
|
StructDeclaration *isStructDeclaration();
|
||||||
virtual UnionDeclaration *isUnionDeclaration() { return nullptr; }
|
UnionDeclaration *isUnionDeclaration();
|
||||||
virtual InterfaceDeclaration *isInterfaceDeclaration() { return nullptr; }
|
InterfaceDeclaration *isInterfaceDeclaration();
|
||||||
virtual ScopeDsymbol *isScopeDsymbol() { return nullptr; }
|
ScopeDsymbol *isScopeDsymbol();
|
||||||
virtual ForwardingScopeDsymbol *isForwardingScopeDsymbol() { return nullptr; }
|
ForwardingScopeDsymbol *isForwardingScopeDsymbol();
|
||||||
virtual WithScopeSymbol *isWithScopeSymbol() { return nullptr; }
|
WithScopeSymbol *isWithScopeSymbol();
|
||||||
virtual ArrayScopeSymbol *isArrayScopeSymbol() { return nullptr; }
|
ArrayScopeSymbol *isArrayScopeSymbol();
|
||||||
virtual Import *isImport() { return nullptr; }
|
Import *isImport();
|
||||||
virtual EnumDeclaration *isEnumDeclaration() { return nullptr; }
|
EnumDeclaration *isEnumDeclaration();
|
||||||
virtual SymbolDeclaration *isSymbolDeclaration() { return nullptr; }
|
SymbolDeclaration *isSymbolDeclaration();
|
||||||
virtual AttribDeclaration *isAttribDeclaration() { return nullptr; }
|
AttribDeclaration *isAttribDeclaration();
|
||||||
virtual AnonDeclaration *isAnonDeclaration() { return nullptr; }
|
AnonDeclaration *isAnonDeclaration();
|
||||||
virtual CPPNamespaceDeclaration *isCPPNamespaceDeclaration() { return nullptr; }
|
CPPNamespaceDeclaration *isCPPNamespaceDeclaration();
|
||||||
virtual VisibilityDeclaration *isVisibilityDeclaration() { return nullptr; }
|
VisibilityDeclaration *isVisibilityDeclaration();
|
||||||
virtual OverloadSet *isOverloadSet() { return nullptr; }
|
OverloadSet *isOverloadSet();
|
||||||
virtual MixinDeclaration *isMixinDeclaration() { return nullptr; }
|
MixinDeclaration *isMixinDeclaration();
|
||||||
virtual StaticAssert *isStaticAssert() { return nullptr; }
|
StaticAssert *isStaticAssert();
|
||||||
virtual StaticIfDeclaration *isStaticIfDeclaration() { return nullptr; }
|
StaticIfDeclaration *isStaticIfDeclaration();
|
||||||
virtual CAsmDeclaration *isCAsmDeclaration() { return nullptr; }
|
CAsmDeclaration *isCAsmDeclaration();
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -333,7 +339,6 @@ public:
|
||||||
virtual Dsymbol *symtabLookup(Dsymbol *s, Identifier *id);
|
virtual Dsymbol *symtabLookup(Dsymbol *s, Identifier *id);
|
||||||
bool hasStaticCtorOrDtor() override;
|
bool hasStaticCtorOrDtor() override;
|
||||||
|
|
||||||
ScopeDsymbol *isScopeDsymbol() override final { return this; }
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -345,7 +350,6 @@ public:
|
||||||
WithStatement *withstate;
|
WithStatement *withstate;
|
||||||
|
|
||||||
|
|
||||||
WithScopeSymbol *isWithScopeSymbol() override { return this; }
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -356,7 +360,6 @@ class ArrayScopeSymbol final : public ScopeDsymbol
|
||||||
public:
|
public:
|
||||||
RootObject *arrayContent;
|
RootObject *arrayContent;
|
||||||
|
|
||||||
ArrayScopeSymbol *isArrayScopeSymbol() override { return this; }
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -368,7 +371,6 @@ public:
|
||||||
Dsymbols a; // array of Dsymbols
|
Dsymbols a; // array of Dsymbols
|
||||||
|
|
||||||
void push(Dsymbol *s);
|
void push(Dsymbol *s);
|
||||||
OverloadSet *isOverloadSet() override { return this; }
|
|
||||||
const char *kind() const override;
|
const char *kind() const override;
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
@ -383,7 +385,6 @@ public:
|
||||||
void importScope(Dsymbol *s, Visibility visibility) override;
|
void importScope(Dsymbol *s, Visibility visibility) override;
|
||||||
const char *kind() const override;
|
const char *kind() const override;
|
||||||
|
|
||||||
ForwardingScopeDsymbol *isForwardingScopeDsymbol() override { return this; }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class ExpressionDsymbol final : public Dsymbol
|
class ExpressionDsymbol final : public Dsymbol
|
||||||
|
@ -391,7 +392,6 @@ class ExpressionDsymbol final : public Dsymbol
|
||||||
public:
|
public:
|
||||||
Expression *exp;
|
Expression *exp;
|
||||||
|
|
||||||
ExpressionDsymbol *isExpressionDsymbol() override { return this; }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class CAsmDeclaration final : public Dsymbol
|
class CAsmDeclaration final : public Dsymbol
|
||||||
|
@ -399,7 +399,6 @@ class CAsmDeclaration final : public Dsymbol
|
||||||
public:
|
public:
|
||||||
Expression *code; // string expression
|
Expression *code; // string expression
|
||||||
|
|
||||||
CAsmDeclaration *isCAsmDeclaration() override { return this; }
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1775,7 +1775,8 @@ private extern(C++) final class DsymbolSemanticVisitor : Visitor
|
||||||
s.dsymbolSemantic(sc2);
|
s.dsymbolSemantic(sc2);
|
||||||
errors |= s.errors;
|
errors |= s.errors;
|
||||||
}
|
}
|
||||||
ad.errors |= errors;
|
if (errors)
|
||||||
|
ad.errors = true;
|
||||||
if (sc2 != sc)
|
if (sc2 != sc)
|
||||||
sc2.pop();
|
sc2.pop();
|
||||||
|
|
||||||
|
@ -2962,7 +2963,7 @@ private extern(C++) final class DsymbolSemanticVisitor : Visitor
|
||||||
*/
|
*/
|
||||||
sd.members.foreachDsymbol( s => s.setScope(sc2) );
|
sd.members.foreachDsymbol( s => s.setScope(sc2) );
|
||||||
sd.members.foreachDsymbol( s => s.importAll(sc2) );
|
sd.members.foreachDsymbol( s => s.importAll(sc2) );
|
||||||
sd.members.foreachDsymbol( (s) { s.dsymbolSemantic(sc2); sd.errors |= s.errors; } );
|
sd.members.foreachDsymbol( (s) { s.dsymbolSemantic(sc2); if (sd.errors) s.errors = true; } );
|
||||||
|
|
||||||
if (sd.errors)
|
if (sd.errors)
|
||||||
sd.type = Type.terror;
|
sd.type = Type.terror;
|
||||||
|
|
|
@ -605,6 +605,7 @@ extern (C++) final class TemplateDeclaration : ScopeDsymbol
|
||||||
extern (D) this(Loc loc, Identifier ident, TemplateParameters* parameters, Expression constraint, Dsymbols* decldefs, bool ismixin = false, bool literal = false)
|
extern (D) this(Loc loc, Identifier ident, TemplateParameters* parameters, Expression constraint, Dsymbols* decldefs, bool ismixin = false, bool literal = false)
|
||||||
{
|
{
|
||||||
super(loc, ident);
|
super(loc, ident);
|
||||||
|
this.dsym = DSYM.templateDeclaration;
|
||||||
static if (LOG)
|
static if (LOG)
|
||||||
{
|
{
|
||||||
printf("TemplateDeclaration(this = %p, id = '%s')\n", this, ident.toChars());
|
printf("TemplateDeclaration(this = %p, id = '%s')\n", this, ident.toChars());
|
||||||
|
@ -890,11 +891,6 @@ extern (C++) final class TemplateDeclaration : ScopeDsymbol
|
||||||
instances.remove(tibox);
|
instances.remove(tibox);
|
||||||
}
|
}
|
||||||
|
|
||||||
override inout(TemplateDeclaration) isTemplateDeclaration() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the last template parameter is a tuple one,
|
* Check if the last template parameter is a tuple one,
|
||||||
* and returns it if so, else returns `null`.
|
* and returns it if so, else returns `null`.
|
||||||
|
@ -3738,6 +3734,7 @@ extern (C++) class TemplateInstance : ScopeDsymbol
|
||||||
{
|
{
|
||||||
printf("TemplateInstance(this = %p, ident = '%s')\n", this, ident ? ident.toChars() : "null");
|
printf("TemplateInstance(this = %p, ident = '%s')\n", this, ident ? ident.toChars() : "null");
|
||||||
}
|
}
|
||||||
|
this.dsym = DSYM.templateInstance;
|
||||||
this.name = ident;
|
this.name = ident;
|
||||||
this.tiargs = tiargs;
|
this.tiargs = tiargs;
|
||||||
}
|
}
|
||||||
|
@ -3753,6 +3750,7 @@ extern (C++) class TemplateInstance : ScopeDsymbol
|
||||||
{
|
{
|
||||||
printf("TemplateInstance(this = %p, tempdecl = '%s')\n", this, td.toChars());
|
printf("TemplateInstance(this = %p, tempdecl = '%s')\n", this, td.toChars());
|
||||||
}
|
}
|
||||||
|
this.dsym = DSYM.templateInstance;
|
||||||
this.name = td.ident;
|
this.name = td.ident;
|
||||||
this.tiargs = tiargs;
|
this.tiargs = tiargs;
|
||||||
this.tempdecl = td;
|
this.tempdecl = td;
|
||||||
|
@ -5336,11 +5334,6 @@ extern (C++) class TemplateInstance : ScopeDsymbol
|
||||||
--nest;
|
--nest;
|
||||||
}
|
}
|
||||||
|
|
||||||
override final inout(TemplateInstance) isTemplateInstance() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
@ -5484,6 +5477,7 @@ extern (C++) final class TemplateMixin : TemplateInstance
|
||||||
tqual.idents.length ? cast(Identifier)tqual.idents[tqual.idents.length - 1] : (cast(TypeIdentifier)tqual).ident,
|
tqual.idents.length ? cast(Identifier)tqual.idents[tqual.idents.length - 1] : (cast(TypeIdentifier)tqual).ident,
|
||||||
tiargs ? tiargs : new Objects());
|
tiargs ? tiargs : new Objects());
|
||||||
//printf("TemplateMixin(ident = '%s')\n", ident ? ident.toChars() : "");
|
//printf("TemplateMixin(ident = '%s')\n", ident ? ident.toChars() : "");
|
||||||
|
this.dsym = DSYM.templateMixin;
|
||||||
this.ident = ident;
|
this.ident = ident;
|
||||||
this.tqual = tqual;
|
this.tqual = tqual;
|
||||||
}
|
}
|
||||||
|
@ -5579,11 +5573,6 @@ extern (C++) final class TemplateMixin : TemplateInstance
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
override inout(TemplateMixin) isTemplateMixin() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
|
|
@ -34,12 +34,12 @@ extern (C++) final class DebugSymbol : Dsymbol
|
||||||
{
|
{
|
||||||
extern (D) this(Loc loc, Identifier ident) @safe
|
extern (D) this(Loc loc, Identifier ident) @safe
|
||||||
{
|
{
|
||||||
super(loc, ident);
|
super(DSYM.debugSymbol, loc, ident);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern (D) this(Loc loc) @safe
|
extern (D) this(Loc loc) @safe
|
||||||
{
|
{
|
||||||
super(loc, null);
|
super(DSYM.aliasDeclaration, loc, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
override DebugSymbol syntaxCopy(Dsymbol s)
|
override DebugSymbol syntaxCopy(Dsymbol s)
|
||||||
|
@ -55,11 +55,6 @@ extern (C++) final class DebugSymbol : Dsymbol
|
||||||
return "debug";
|
return "debug";
|
||||||
}
|
}
|
||||||
|
|
||||||
override inout(DebugSymbol) isDebugSymbol() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
@ -75,12 +70,12 @@ extern (C++) final class VersionSymbol : Dsymbol
|
||||||
|
|
||||||
extern (D) this(Loc loc, Identifier ident) @safe
|
extern (D) this(Loc loc, Identifier ident) @safe
|
||||||
{
|
{
|
||||||
super(loc, ident);
|
super(DSYM.versionSymbol, loc, ident);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern (D) this(Loc loc) @safe
|
extern (D) this(Loc loc) @safe
|
||||||
{
|
{
|
||||||
super(loc, null);
|
super(DSYM.versionSymbol, loc, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
override VersionSymbol syntaxCopy(Dsymbol s)
|
override VersionSymbol syntaxCopy(Dsymbol s)
|
||||||
|
@ -96,11 +91,6 @@ extern (C++) final class VersionSymbol : Dsymbol
|
||||||
return "version";
|
return "version";
|
||||||
}
|
}
|
||||||
|
|
||||||
override inout(VersionSymbol) isVersionSymbol() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
|
|
@ -58,7 +58,6 @@ public:
|
||||||
Visibility visible() override;
|
Visibility visible() override;
|
||||||
bool isSpecial() const;
|
bool isSpecial() const;
|
||||||
|
|
||||||
EnumDeclaration *isEnumDeclaration() override { return this; }
|
|
||||||
|
|
||||||
Symbol *sinit;
|
Symbol *sinit;
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
|
@ -86,6 +85,5 @@ public:
|
||||||
EnumMember *syntaxCopy(Dsymbol *s) override;
|
EnumMember *syntaxCopy(Dsymbol *s) override;
|
||||||
const char *kind() const override;
|
const char *kind() const override;
|
||||||
|
|
||||||
EnumMember *isEnumMember() override { return this; }
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
|
@ -414,6 +414,76 @@ enum class PASS : uint8_t
|
||||||
obj = 9u,
|
obj = 9u,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum class DSYM : uint8_t
|
||||||
|
{
|
||||||
|
none = 0u,
|
||||||
|
dsymbol = 1u,
|
||||||
|
linkDeclaration = 2u,
|
||||||
|
cppMangleDeclaration = 3u,
|
||||||
|
alignDeclaration = 4u,
|
||||||
|
pragmaDeclaration = 5u,
|
||||||
|
conditionalDeclaration = 6u,
|
||||||
|
staticForeachDeclaration = 7u,
|
||||||
|
userAttributeDeclaration = 8u,
|
||||||
|
labelDsymbol = 9u,
|
||||||
|
aliasThis = 10u,
|
||||||
|
package_ = 11u,
|
||||||
|
module_ = 12u,
|
||||||
|
enumMember = 13u,
|
||||||
|
templateDeclaration = 14u,
|
||||||
|
templateInstance = 15u,
|
||||||
|
templateMixin = 16u,
|
||||||
|
forwardingAttribDeclaration = 17u,
|
||||||
|
nspace = 18u,
|
||||||
|
declaration = 19u,
|
||||||
|
storageClassDeclaration = 20u,
|
||||||
|
expressionDsymbol = 21u,
|
||||||
|
aliasAssign = 22u,
|
||||||
|
thisDeclaration = 23u,
|
||||||
|
bitFieldDeclaration = 24u,
|
||||||
|
typeInfoDeclaration = 25u,
|
||||||
|
tupleDeclaration = 26u,
|
||||||
|
aliasDeclaration = 27u,
|
||||||
|
aggregateDeclaration = 28u,
|
||||||
|
funcDeclaration = 29u,
|
||||||
|
funcAliasDeclaration = 30u,
|
||||||
|
overDeclaration = 31u,
|
||||||
|
funcLiteralDeclaration = 32u,
|
||||||
|
ctorDeclaration = 33u,
|
||||||
|
postBlitDeclaration = 34u,
|
||||||
|
dtorDeclaration = 35u,
|
||||||
|
staticCtorDeclaration = 36u,
|
||||||
|
staticDtorDeclaration = 37u,
|
||||||
|
sharedStaticCtorDeclaration = 38u,
|
||||||
|
sharedStaticDtorDeclaration = 39u,
|
||||||
|
invariantDeclaration = 40u,
|
||||||
|
unitTestDeclaration = 41u,
|
||||||
|
newDeclaration = 42u,
|
||||||
|
varDeclaration = 43u,
|
||||||
|
versionSymbol = 44u,
|
||||||
|
debugSymbol = 45u,
|
||||||
|
classDeclaration = 46u,
|
||||||
|
structDeclaration = 47u,
|
||||||
|
unionDeclaration = 48u,
|
||||||
|
interfaceDeclaration = 49u,
|
||||||
|
scopeDsymbol = 50u,
|
||||||
|
forwardingScopeDsymbol = 51u,
|
||||||
|
withScopeSymbol = 52u,
|
||||||
|
arrayScopeSymbol = 53u,
|
||||||
|
import_ = 54u,
|
||||||
|
enumDeclaration = 55u,
|
||||||
|
symbolDeclaration = 56u,
|
||||||
|
attribDeclaration = 57u,
|
||||||
|
anonDeclaration = 58u,
|
||||||
|
cppNamespaceDeclaration = 59u,
|
||||||
|
visibilityDeclaration = 60u,
|
||||||
|
overloadSet = 61u,
|
||||||
|
mixinDeclaration = 62u,
|
||||||
|
staticAssert = 63u,
|
||||||
|
staticIfDeclaration = 64u,
|
||||||
|
cAsmDeclaration = 65u,
|
||||||
|
};
|
||||||
|
|
||||||
struct Ungag final
|
struct Ungag final
|
||||||
{
|
{
|
||||||
uint32_t oldgag;
|
uint32_t oldgag;
|
||||||
|
@ -459,9 +529,30 @@ private:
|
||||||
DsymbolAttributes* atts;
|
DsymbolAttributes* atts;
|
||||||
public:
|
public:
|
||||||
const Loc loc;
|
const Loc loc;
|
||||||
bool errors;
|
|
||||||
PASS semanticRun;
|
|
||||||
uint16_t localNum;
|
uint16_t localNum;
|
||||||
|
struct BitFields final
|
||||||
|
{
|
||||||
|
bool errors;
|
||||||
|
PASS semanticRun;
|
||||||
|
BitFields() :
|
||||||
|
errors(),
|
||||||
|
semanticRun((PASS)0u)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
BitFields(bool errors, PASS semanticRun = (PASS)0u) :
|
||||||
|
errors(errors),
|
||||||
|
semanticRun(semanticRun)
|
||||||
|
{}
|
||||||
|
};
|
||||||
|
|
||||||
|
bool errors() const;
|
||||||
|
bool errors(bool v);
|
||||||
|
PASS semanticRun() const;
|
||||||
|
PASS semanticRun(PASS v);
|
||||||
|
private:
|
||||||
|
uint8_t bitFields;
|
||||||
|
public:
|
||||||
|
DSYM dsym;
|
||||||
static Dsymbol* create(Identifier* ident);
|
static Dsymbol* create(Identifier* ident);
|
||||||
const char* toChars() const final override;
|
const char* toChars() const final override;
|
||||||
DeprecatedDeclaration* depdecl();
|
DeprecatedDeclaration* depdecl();
|
||||||
|
@ -521,61 +612,61 @@ public:
|
||||||
bool inNonRoot();
|
bool inNonRoot();
|
||||||
static void deinitialize();
|
static void deinitialize();
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
virtual Package* isPackage();
|
Package* isPackage();
|
||||||
virtual Module* isModule();
|
Module* isModule();
|
||||||
virtual EnumMember* isEnumMember();
|
EnumMember* isEnumMember();
|
||||||
virtual TemplateDeclaration* isTemplateDeclaration();
|
TemplateDeclaration* isTemplateDeclaration();
|
||||||
virtual TemplateInstance* isTemplateInstance();
|
TemplateInstance* isTemplateInstance();
|
||||||
virtual TemplateMixin* isTemplateMixin();
|
TemplateMixin* isTemplateMixin();
|
||||||
virtual ForwardingAttribDeclaration* isForwardingAttribDeclaration();
|
ForwardingAttribDeclaration* isForwardingAttribDeclaration();
|
||||||
virtual Nspace* isNspace();
|
Nspace* isNspace();
|
||||||
virtual Declaration* isDeclaration();
|
Declaration* isDeclaration();
|
||||||
virtual StorageClassDeclaration* isStorageClassDeclaration();
|
StorageClassDeclaration* isStorageClassDeclaration();
|
||||||
virtual ExpressionDsymbol* isExpressionDsymbol();
|
ExpressionDsymbol* isExpressionDsymbol();
|
||||||
virtual AliasAssign* isAliasAssign();
|
AliasAssign* isAliasAssign();
|
||||||
virtual ThisDeclaration* isThisDeclaration();
|
ThisDeclaration* isThisDeclaration();
|
||||||
virtual BitFieldDeclaration* isBitFieldDeclaration();
|
BitFieldDeclaration* isBitFieldDeclaration();
|
||||||
virtual TypeInfoDeclaration* isTypeInfoDeclaration();
|
TypeInfoDeclaration* isTypeInfoDeclaration();
|
||||||
virtual TupleDeclaration* isTupleDeclaration();
|
TupleDeclaration* isTupleDeclaration();
|
||||||
virtual AliasDeclaration* isAliasDeclaration();
|
AliasDeclaration* isAliasDeclaration();
|
||||||
virtual AggregateDeclaration* isAggregateDeclaration();
|
AggregateDeclaration* isAggregateDeclaration();
|
||||||
virtual FuncDeclaration* isFuncDeclaration();
|
FuncDeclaration* isFuncDeclaration();
|
||||||
virtual FuncAliasDeclaration* isFuncAliasDeclaration();
|
FuncAliasDeclaration* isFuncAliasDeclaration();
|
||||||
virtual OverDeclaration* isOverDeclaration();
|
OverDeclaration* isOverDeclaration();
|
||||||
virtual FuncLiteralDeclaration* isFuncLiteralDeclaration();
|
FuncLiteralDeclaration* isFuncLiteralDeclaration();
|
||||||
virtual CtorDeclaration* isCtorDeclaration();
|
CtorDeclaration* isCtorDeclaration();
|
||||||
virtual PostBlitDeclaration* isPostBlitDeclaration();
|
PostBlitDeclaration* isPostBlitDeclaration();
|
||||||
virtual DtorDeclaration* isDtorDeclaration();
|
DtorDeclaration* isDtorDeclaration();
|
||||||
virtual StaticCtorDeclaration* isStaticCtorDeclaration();
|
StaticCtorDeclaration* isStaticCtorDeclaration();
|
||||||
virtual StaticDtorDeclaration* isStaticDtorDeclaration();
|
StaticDtorDeclaration* isStaticDtorDeclaration();
|
||||||
virtual SharedStaticCtorDeclaration* isSharedStaticCtorDeclaration();
|
SharedStaticCtorDeclaration* isSharedStaticCtorDeclaration();
|
||||||
virtual SharedStaticDtorDeclaration* isSharedStaticDtorDeclaration();
|
SharedStaticDtorDeclaration* isSharedStaticDtorDeclaration();
|
||||||
virtual InvariantDeclaration* isInvariantDeclaration();
|
InvariantDeclaration* isInvariantDeclaration();
|
||||||
virtual UnitTestDeclaration* isUnitTestDeclaration();
|
UnitTestDeclaration* isUnitTestDeclaration();
|
||||||
virtual NewDeclaration* isNewDeclaration();
|
NewDeclaration* isNewDeclaration();
|
||||||
virtual VarDeclaration* isVarDeclaration();
|
VarDeclaration* isVarDeclaration();
|
||||||
virtual VersionSymbol* isVersionSymbol();
|
VersionSymbol* isVersionSymbol();
|
||||||
virtual DebugSymbol* isDebugSymbol();
|
DebugSymbol* isDebugSymbol();
|
||||||
virtual ClassDeclaration* isClassDeclaration();
|
ClassDeclaration* isClassDeclaration();
|
||||||
virtual StructDeclaration* isStructDeclaration();
|
StructDeclaration* isStructDeclaration();
|
||||||
virtual UnionDeclaration* isUnionDeclaration();
|
UnionDeclaration* isUnionDeclaration();
|
||||||
virtual InterfaceDeclaration* isInterfaceDeclaration();
|
InterfaceDeclaration* isInterfaceDeclaration();
|
||||||
virtual ScopeDsymbol* isScopeDsymbol();
|
ScopeDsymbol* isScopeDsymbol();
|
||||||
virtual ForwardingScopeDsymbol* isForwardingScopeDsymbol();
|
ForwardingScopeDsymbol* isForwardingScopeDsymbol();
|
||||||
virtual WithScopeSymbol* isWithScopeSymbol();
|
WithScopeSymbol* isWithScopeSymbol();
|
||||||
virtual ArrayScopeSymbol* isArrayScopeSymbol();
|
ArrayScopeSymbol* isArrayScopeSymbol();
|
||||||
virtual Import* isImport();
|
Import* isImport();
|
||||||
virtual EnumDeclaration* isEnumDeclaration();
|
EnumDeclaration* isEnumDeclaration();
|
||||||
virtual SymbolDeclaration* isSymbolDeclaration();
|
SymbolDeclaration* isSymbolDeclaration();
|
||||||
virtual AttribDeclaration* isAttribDeclaration();
|
AttribDeclaration* isAttribDeclaration();
|
||||||
virtual AnonDeclaration* isAnonDeclaration();
|
AnonDeclaration* isAnonDeclaration();
|
||||||
virtual CPPNamespaceDeclaration* isCPPNamespaceDeclaration();
|
CPPNamespaceDeclaration* isCPPNamespaceDeclaration();
|
||||||
virtual VisibilityDeclaration* isVisibilityDeclaration();
|
VisibilityDeclaration* isVisibilityDeclaration();
|
||||||
virtual OverloadSet* isOverloadSet();
|
OverloadSet* isOverloadSet();
|
||||||
virtual MixinDeclaration* isMixinDeclaration();
|
MixinDeclaration* isMixinDeclaration();
|
||||||
virtual StaticAssert* isStaticAssert();
|
StaticAssert* isStaticAssert();
|
||||||
virtual StaticIfDeclaration* isStaticIfDeclaration();
|
StaticIfDeclaration* isStaticIfDeclaration();
|
||||||
virtual CAsmDeclaration* isCAsmDeclaration();
|
CAsmDeclaration* isCAsmDeclaration();
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BitArray final
|
struct BitArray final
|
||||||
|
@ -622,7 +713,6 @@ public:
|
||||||
virtual Dsymbol* symtabInsert(Dsymbol* s);
|
virtual Dsymbol* symtabInsert(Dsymbol* s);
|
||||||
virtual Dsymbol* symtabLookup(Dsymbol* s, Identifier* id);
|
virtual Dsymbol* symtabLookup(Dsymbol* s, Identifier* id);
|
||||||
bool hasStaticCtorOrDtor() override;
|
bool hasStaticCtorOrDtor() override;
|
||||||
ScopeDsymbol* isScopeDsymbol() final override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1588,7 +1678,6 @@ public:
|
||||||
const char* toCharsNoConstraints() const;
|
const char* toCharsNoConstraints() const;
|
||||||
Visibility visible() override;
|
Visibility visible() override;
|
||||||
const char* getConstraintEvalError(const char*& tip);
|
const char* getConstraintEvalError(const char*& tip);
|
||||||
TemplateDeclaration* isTemplateDeclaration() override;
|
|
||||||
bool isDeprecated() const override;
|
bool isDeprecated() const override;
|
||||||
bool isOverloadable() const override;
|
bool isOverloadable() const override;
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
|
@ -1636,7 +1725,6 @@ public:
|
||||||
bool equalsx(TemplateInstance* ti);
|
bool equalsx(TemplateInstance* ti);
|
||||||
bool isDiscardable();
|
bool isDiscardable();
|
||||||
bool needsCodegen();
|
bool needsCodegen();
|
||||||
TemplateInstance* isTemplateInstance() final override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1656,7 +1744,6 @@ public:
|
||||||
TemplateInstance* syntaxCopy(Dsymbol* s) override;
|
TemplateInstance* syntaxCopy(Dsymbol* s) override;
|
||||||
const char* kind() const override;
|
const char* kind() const override;
|
||||||
bool hasPointers() override;
|
bool hasPointers() override;
|
||||||
TemplateMixin* isTemplateMixin() override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2020,7 +2107,6 @@ class DebugSymbol final : public Dsymbol
|
||||||
public:
|
public:
|
||||||
DebugSymbol* syntaxCopy(Dsymbol* s) override;
|
DebugSymbol* syntaxCopy(Dsymbol* s) override;
|
||||||
const char* kind() const override;
|
const char* kind() const override;
|
||||||
DebugSymbol* isDebugSymbol() override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2029,7 +2115,6 @@ class VersionSymbol final : public Dsymbol
|
||||||
public:
|
public:
|
||||||
VersionSymbol* syntaxCopy(Dsymbol* s) override;
|
VersionSymbol* syntaxCopy(Dsymbol* s) override;
|
||||||
const char* kind() const override;
|
const char* kind() const override;
|
||||||
VersionSymbol* isVersionSymbol() override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -3906,7 +3991,6 @@ public:
|
||||||
ParameterList getParameterList();
|
ParameterList getParameterList();
|
||||||
static FuncDeclaration* genCfunc(Array<Parameter* >* fparams, Type* treturn, const char* name, StorageClass stc = 0);
|
static FuncDeclaration* genCfunc(Array<Parameter* >* fparams, Type* treturn, const char* name, StorageClass stc = 0);
|
||||||
static FuncDeclaration* genCfunc(Array<Parameter* >* fparams, Type* treturn, Identifier* id, StorageClass stc = 0);
|
static FuncDeclaration* genCfunc(Array<Parameter* >* fparams, Type* treturn, Identifier* id, StorageClass stc = 0);
|
||||||
FuncDeclaration* isFuncDeclaration() final override;
|
|
||||||
virtual FuncDeclaration* toAliasFunc();
|
virtual FuncDeclaration* toAliasFunc();
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
@ -3921,7 +4005,6 @@ public:
|
||||||
bool isVirtual() const override;
|
bool isVirtual() const override;
|
||||||
bool addPreInvariant() override;
|
bool addPreInvariant() override;
|
||||||
bool addPostInvariant() override;
|
bool addPostInvariant() override;
|
||||||
CtorDeclaration* isCtorDeclaration() override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -3934,7 +4017,6 @@ public:
|
||||||
bool addPreInvariant() override;
|
bool addPreInvariant() override;
|
||||||
bool addPostInvariant() override;
|
bool addPostInvariant() override;
|
||||||
bool overloadInsert(Dsymbol* s) override;
|
bool overloadInsert(Dsymbol* s) override;
|
||||||
DtorDeclaration* isDtorDeclaration() override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -3943,7 +4025,6 @@ class FuncAliasDeclaration final : public FuncDeclaration
|
||||||
public:
|
public:
|
||||||
FuncDeclaration* funcalias;
|
FuncDeclaration* funcalias;
|
||||||
bool hasOverloads;
|
bool hasOverloads;
|
||||||
FuncAliasDeclaration* isFuncAliasDeclaration() override;
|
|
||||||
const char* kind() const override;
|
const char* kind() const override;
|
||||||
FuncDeclaration* toAliasFunc() override;
|
FuncDeclaration* toAliasFunc() override;
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
|
@ -3961,7 +4042,6 @@ public:
|
||||||
bool isVirtual() const override;
|
bool isVirtual() const override;
|
||||||
bool addPreInvariant() override;
|
bool addPreInvariant() override;
|
||||||
bool addPostInvariant() override;
|
bool addPostInvariant() override;
|
||||||
FuncLiteralDeclaration* isFuncLiteralDeclaration() override;
|
|
||||||
const char* kind() const override;
|
const char* kind() const override;
|
||||||
const char* toPrettyChars(bool QualifyTypes = false) override;
|
const char* toPrettyChars(bool QualifyTypes = false) override;
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
|
@ -3974,7 +4054,6 @@ public:
|
||||||
bool isVirtual() const override;
|
bool isVirtual() const override;
|
||||||
bool addPreInvariant() override;
|
bool addPreInvariant() override;
|
||||||
bool addPostInvariant() override;
|
bool addPostInvariant() override;
|
||||||
InvariantDeclaration* isInvariantDeclaration() override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -3986,7 +4065,6 @@ public:
|
||||||
bool isVirtual() const override;
|
bool isVirtual() const override;
|
||||||
bool addPreInvariant() override;
|
bool addPreInvariant() override;
|
||||||
bool addPostInvariant() override;
|
bool addPostInvariant() override;
|
||||||
NewDeclaration* isNewDeclaration() override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -3998,7 +4076,6 @@ public:
|
||||||
bool addPreInvariant() override;
|
bool addPreInvariant() override;
|
||||||
bool addPostInvariant() override;
|
bool addPostInvariant() override;
|
||||||
bool overloadInsert(Dsymbol* s) override;
|
bool overloadInsert(Dsymbol* s) override;
|
||||||
PostBlitDeclaration* isPostBlitDeclaration() override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -4011,7 +4088,6 @@ public:
|
||||||
bool addPreInvariant() final override;
|
bool addPreInvariant() final override;
|
||||||
bool addPostInvariant() final override;
|
bool addPostInvariant() final override;
|
||||||
bool hasStaticCtorOrDtor() final override;
|
bool hasStaticCtorOrDtor() final override;
|
||||||
StaticCtorDeclaration* isStaticCtorDeclaration() final override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -4020,7 +4096,6 @@ class SharedStaticCtorDeclaration final : public StaticCtorDeclaration
|
||||||
public:
|
public:
|
||||||
bool standalone;
|
bool standalone;
|
||||||
SharedStaticCtorDeclaration* syntaxCopy(Dsymbol* s) override;
|
SharedStaticCtorDeclaration* syntaxCopy(Dsymbol* s) override;
|
||||||
SharedStaticCtorDeclaration* isSharedStaticCtorDeclaration() override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -4034,7 +4109,6 @@ public:
|
||||||
bool hasStaticCtorOrDtor() final override;
|
bool hasStaticCtorOrDtor() final override;
|
||||||
bool addPreInvariant() final override;
|
bool addPreInvariant() final override;
|
||||||
bool addPostInvariant() final override;
|
bool addPostInvariant() final override;
|
||||||
StaticDtorDeclaration* isStaticDtorDeclaration() final override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -4042,7 +4116,6 @@ class SharedStaticDtorDeclaration final : public StaticDtorDeclaration
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SharedStaticDtorDeclaration* syntaxCopy(Dsymbol* s) override;
|
SharedStaticDtorDeclaration* syntaxCopy(Dsymbol* s) override;
|
||||||
SharedStaticDtorDeclaration* isSharedStaticDtorDeclaration() override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -4056,7 +4129,6 @@ public:
|
||||||
bool isVirtual() const override;
|
bool isVirtual() const override;
|
||||||
bool addPreInvariant() override;
|
bool addPreInvariant() override;
|
||||||
bool addPostInvariant() override;
|
bool addPostInvariant() override;
|
||||||
UnitTestDeclaration* isUnitTestDeclaration() override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -4759,7 +4831,6 @@ public:
|
||||||
Nspace* syntaxCopy(Dsymbol* s) override;
|
Nspace* syntaxCopy(Dsymbol* s) override;
|
||||||
bool hasPointers() override;
|
bool hasPointers() override;
|
||||||
const char* kind() const override;
|
const char* kind() const override;
|
||||||
Nspace* isNspace() override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -5376,7 +5447,6 @@ public:
|
||||||
Array<Expression* >* msgs;
|
Array<Expression* >* msgs;
|
||||||
StaticAssert* syntaxCopy(Dsymbol* s) override;
|
StaticAssert* syntaxCopy(Dsymbol* s) override;
|
||||||
const char* kind() const override;
|
const char* kind() const override;
|
||||||
StaticAssert* isStaticAssert() override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -5592,6 +5662,7 @@ struct ASTCodegen final
|
||||||
using AliasAssign = ::AliasAssign;
|
using AliasAssign = ::AliasAssign;
|
||||||
using ArrayScopeSymbol = ::ArrayScopeSymbol;
|
using ArrayScopeSymbol = ::ArrayScopeSymbol;
|
||||||
using CAsmDeclaration = ::CAsmDeclaration;
|
using CAsmDeclaration = ::CAsmDeclaration;
|
||||||
|
using DSYM = ::DSYM;
|
||||||
using Dsymbol = ::Dsymbol;
|
using Dsymbol = ::Dsymbol;
|
||||||
using DsymbolTable = ::DsymbolTable;
|
using DsymbolTable = ::DsymbolTable;
|
||||||
using ExpressionDsymbol = ::ExpressionDsymbol;
|
using ExpressionDsymbol = ::ExpressionDsymbol;
|
||||||
|
@ -6270,7 +6341,6 @@ public:
|
||||||
Type* handleType();
|
Type* handleType();
|
||||||
bool hasInvariant();
|
bool hasInvariant();
|
||||||
void* sinit;
|
void* sinit;
|
||||||
AggregateDeclaration* isAggregateDeclaration() final override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -6329,7 +6399,6 @@ public:
|
||||||
bool hasPointers() final override;
|
bool hasPointers() final override;
|
||||||
bool hasStaticCtorOrDtor() final override;
|
bool hasStaticCtorOrDtor() final override;
|
||||||
void addObjcSymbols(Array<ClassDeclaration* >* classes, Array<ClassDeclaration* >* categories) final override;
|
void addObjcSymbols(Array<ClassDeclaration* >* classes, Array<ClassDeclaration* >* categories) final override;
|
||||||
AttribDeclaration* isAttribDeclaration() override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -6338,7 +6407,6 @@ class StorageClassDeclaration : public AttribDeclaration
|
||||||
public:
|
public:
|
||||||
StorageClass stc;
|
StorageClass stc;
|
||||||
StorageClassDeclaration* syntaxCopy(Dsymbol* s) override;
|
StorageClassDeclaration* syntaxCopy(Dsymbol* s) override;
|
||||||
StorageClassDeclaration* isStorageClassDeclaration() override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -6374,7 +6442,6 @@ public:
|
||||||
Expression* exp;
|
Expression* exp;
|
||||||
CPPNamespaceDeclaration* syntaxCopy(Dsymbol* s) override;
|
CPPNamespaceDeclaration* syntaxCopy(Dsymbol* s) override;
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
CPPNamespaceDeclaration* isCPPNamespaceDeclaration() override;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class VisibilityDeclaration final : public AttribDeclaration
|
class VisibilityDeclaration final : public AttribDeclaration
|
||||||
|
@ -6385,7 +6452,6 @@ public:
|
||||||
VisibilityDeclaration* syntaxCopy(Dsymbol* s) override;
|
VisibilityDeclaration* syntaxCopy(Dsymbol* s) override;
|
||||||
const char* kind() const override;
|
const char* kind() const override;
|
||||||
const char* toPrettyChars(bool __param_0_) override;
|
const char* toPrettyChars(bool __param_0_) override;
|
||||||
VisibilityDeclaration* isVisibilityDeclaration() override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -6408,7 +6474,6 @@ public:
|
||||||
uint32_t anonalignsize;
|
uint32_t anonalignsize;
|
||||||
AnonDeclaration* syntaxCopy(Dsymbol* s) override;
|
AnonDeclaration* syntaxCopy(Dsymbol* s) override;
|
||||||
const char* kind() const override;
|
const char* kind() const override;
|
||||||
AnonDeclaration* isAnonDeclaration() override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -6438,7 +6503,6 @@ public:
|
||||||
bool onStack;
|
bool onStack;
|
||||||
StaticIfDeclaration* syntaxCopy(Dsymbol* s) override;
|
StaticIfDeclaration* syntaxCopy(Dsymbol* s) override;
|
||||||
const char* kind() const override;
|
const char* kind() const override;
|
||||||
StaticIfDeclaration* isStaticIfDeclaration() override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -6460,7 +6524,6 @@ class ForwardingAttribDeclaration final : public AttribDeclaration
|
||||||
public:
|
public:
|
||||||
ForwardingScopeDsymbol* sym;
|
ForwardingScopeDsymbol* sym;
|
||||||
ForwardingAttribDeclaration(Array<Dsymbol* >* decl);
|
ForwardingAttribDeclaration(Array<Dsymbol* >* decl);
|
||||||
ForwardingAttribDeclaration* isForwardingAttribDeclaration() override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -6472,7 +6535,6 @@ public:
|
||||||
bool compiled;
|
bool compiled;
|
||||||
MixinDeclaration* syntaxCopy(Dsymbol* s) override;
|
MixinDeclaration* syntaxCopy(Dsymbol* s) override;
|
||||||
const char* kind() const override;
|
const char* kind() const override;
|
||||||
MixinDeclaration* isMixinDeclaration() override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -6634,7 +6696,6 @@ public:
|
||||||
void addObjcSymbols(Array<ClassDeclaration* >* classes, Array<ClassDeclaration* >* categories) final override;
|
void addObjcSymbols(Array<ClassDeclaration* >* classes, Array<ClassDeclaration* >* categories) final override;
|
||||||
Dsymbol* vtblsym;
|
Dsymbol* vtblsym;
|
||||||
Dsymbol* vtblSymbol();
|
Dsymbol* vtblSymbol();
|
||||||
ClassDeclaration* isClassDeclaration() final override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -6648,7 +6709,6 @@ public:
|
||||||
int32_t vtblOffset() const override;
|
int32_t vtblOffset() const override;
|
||||||
bool isCPPinterface() const override;
|
bool isCPPinterface() const override;
|
||||||
bool isCOMinterface() const override;
|
bool isCOMinterface() const override;
|
||||||
InterfaceDeclaration* isInterfaceDeclaration() override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -6705,7 +6765,6 @@ public:
|
||||||
bool isReference() const;
|
bool isReference() const;
|
||||||
bool isFuture() const;
|
bool isFuture() const;
|
||||||
Visibility visible() final override;
|
Visibility visible() final override;
|
||||||
Declaration* isDeclaration() final override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -6721,7 +6780,6 @@ public:
|
||||||
Type* getType() override;
|
Type* getType() override;
|
||||||
Dsymbol* toAlias2() override;
|
Dsymbol* toAlias2() override;
|
||||||
bool needThis() override;
|
bool needThis() override;
|
||||||
TupleDeclaration* isTupleDeclaration() override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -6739,7 +6797,6 @@ public:
|
||||||
Dsymbol* toAlias() override;
|
Dsymbol* toAlias() override;
|
||||||
Dsymbol* toAlias2() override;
|
Dsymbol* toAlias2() override;
|
||||||
bool isOverloadable() const override;
|
bool isOverloadable() const override;
|
||||||
AliasDeclaration* isAliasDeclaration() override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -6753,7 +6810,6 @@ public:
|
||||||
bool overloadInsert(Dsymbol* s) override;
|
bool overloadInsert(Dsymbol* s) override;
|
||||||
bool isOverloadable() const override;
|
bool isOverloadable() const override;
|
||||||
Dsymbol* isUnique();
|
Dsymbol* isUnique();
|
||||||
OverDeclaration* isOverDeclaration() override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -6828,7 +6884,6 @@ public:
|
||||||
bool canTakeAddressOf();
|
bool canTakeAddressOf();
|
||||||
bool needsScopeDtor();
|
bool needsScopeDtor();
|
||||||
Dsymbol* toAlias() final override;
|
Dsymbol* toAlias() final override;
|
||||||
VarDeclaration* isVarDeclaration() final override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -6839,7 +6894,6 @@ public:
|
||||||
uint32_t fieldWidth;
|
uint32_t fieldWidth;
|
||||||
uint32_t bitOffset;
|
uint32_t bitOffset;
|
||||||
BitFieldDeclaration* syntaxCopy(Dsymbol* s) override;
|
BitFieldDeclaration* syntaxCopy(Dsymbol* s) override;
|
||||||
BitFieldDeclaration* isBitFieldDeclaration() final override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
uint64_t getMinMax(Identifier* id);
|
uint64_t getMinMax(Identifier* id);
|
||||||
};
|
};
|
||||||
|
@ -6848,7 +6902,6 @@ class SymbolDeclaration final : public Declaration
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AggregateDeclaration* dsym;
|
AggregateDeclaration* dsym;
|
||||||
SymbolDeclaration* isSymbolDeclaration() override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -6858,7 +6911,6 @@ public:
|
||||||
Type* tinfo;
|
Type* tinfo;
|
||||||
static TypeInfoDeclaration* create(Type* tinfo);
|
static TypeInfoDeclaration* create(Type* tinfo);
|
||||||
TypeInfoDeclaration* syntaxCopy(Dsymbol* s) final override;
|
TypeInfoDeclaration* syntaxCopy(Dsymbol* s) final override;
|
||||||
TypeInfoDeclaration* isTypeInfoDeclaration() final override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -6979,7 +7031,6 @@ class ThisDeclaration final : public VarDeclaration
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ThisDeclaration* syntaxCopy(Dsymbol* s) override;
|
ThisDeclaration* syntaxCopy(Dsymbol* s) override;
|
||||||
ThisDeclaration* isThisDeclaration() override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -7008,7 +7059,6 @@ public:
|
||||||
bool isDeprecated() const override;
|
bool isDeprecated() const override;
|
||||||
Visibility visible() override;
|
Visibility visible() override;
|
||||||
bool isSpecial() const;
|
bool isSpecial() const;
|
||||||
EnumDeclaration* isEnumDeclaration() override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -7021,7 +7071,6 @@ public:
|
||||||
EnumDeclaration* ed;
|
EnumDeclaration* ed;
|
||||||
EnumMember* syntaxCopy(Dsymbol* s) override;
|
EnumMember* syntaxCopy(Dsymbol* s) override;
|
||||||
const char* kind() const override;
|
const char* kind() const override;
|
||||||
EnumMember* isEnumMember() override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -7043,7 +7092,6 @@ public:
|
||||||
Import* syntaxCopy(Dsymbol* s) override;
|
Import* syntaxCopy(Dsymbol* s) override;
|
||||||
Dsymbol* toAlias() override;
|
Dsymbol* toAlias() override;
|
||||||
bool overloadInsert(Dsymbol* s) override;
|
bool overloadInsert(Dsymbol* s) override;
|
||||||
Import* isImport() override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -7057,7 +7105,6 @@ public:
|
||||||
Module* mod;
|
Module* mod;
|
||||||
const char* kind() const override;
|
const char* kind() const override;
|
||||||
bool equals(const RootObject* const o) const override;
|
bool equals(const RootObject* const o) const override;
|
||||||
Package* isPackage() final override;
|
|
||||||
bool isAncestorPackageOf(const Package* const pkg) const;
|
bool isAncestorPackageOf(const Package* const pkg) const;
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
Module* isPackageMod();
|
Module* isPackageMod();
|
||||||
|
@ -7144,7 +7191,6 @@ public:
|
||||||
Symbol* stest;
|
Symbol* stest;
|
||||||
Symbol* sfilename;
|
Symbol* sfilename;
|
||||||
void* ctfe_cov;
|
void* ctfe_cov;
|
||||||
Module* isModule() override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
void fullyQualifiedName(OutBuffer& buf);
|
void fullyQualifiedName(OutBuffer& buf);
|
||||||
};
|
};
|
||||||
|
@ -7378,7 +7424,6 @@ public:
|
||||||
void finalizeSize() final override;
|
void finalizeSize() final override;
|
||||||
bool isPOD();
|
bool isPOD();
|
||||||
bool hasCopyConstruction();
|
bool hasCopyConstruction();
|
||||||
StructDeclaration* isStructDeclaration() final override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
uint32_t numArgTypes() const;
|
uint32_t numArgTypes() const;
|
||||||
Type* argType(uint32_t index);
|
Type* argType(uint32_t index);
|
||||||
|
@ -7390,7 +7435,6 @@ class UnionDeclaration final : public StructDeclaration
|
||||||
public:
|
public:
|
||||||
UnionDeclaration* syntaxCopy(Dsymbol* s) override;
|
UnionDeclaration* syntaxCopy(Dsymbol* s) override;
|
||||||
const char* kind() const override;
|
const char* kind() const override;
|
||||||
UnionDeclaration* isUnionDeclaration() override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -7398,7 +7442,6 @@ class WithScopeSymbol final : public ScopeDsymbol
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
WithStatement* withstate;
|
WithStatement* withstate;
|
||||||
WithScopeSymbol* isWithScopeSymbol() override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -7406,7 +7449,6 @@ class ArrayScopeSymbol final : public ScopeDsymbol
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RootObject* arrayContent;
|
RootObject* arrayContent;
|
||||||
ArrayScopeSymbol* isArrayScopeSymbol() override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -7415,7 +7457,6 @@ class OverloadSet final : public Dsymbol
|
||||||
public:
|
public:
|
||||||
Array<Dsymbol* > a;
|
Array<Dsymbol* > a;
|
||||||
void push(Dsymbol* s);
|
void push(Dsymbol* s);
|
||||||
OverloadSet* isOverloadSet() override;
|
|
||||||
const char* kind() const override;
|
const char* kind() const override;
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
@ -7427,7 +7468,6 @@ public:
|
||||||
Dsymbol* symtabLookup(Dsymbol* s, Identifier* id) override;
|
Dsymbol* symtabLookup(Dsymbol* s, Identifier* id) override;
|
||||||
void importScope(Dsymbol* s, Visibility visibility) override;
|
void importScope(Dsymbol* s, Visibility visibility) override;
|
||||||
const char* kind() const override;
|
const char* kind() const override;
|
||||||
ForwardingScopeDsymbol* isForwardingScopeDsymbol() override;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class ExpressionDsymbol final : public Dsymbol
|
class ExpressionDsymbol final : public Dsymbol
|
||||||
|
@ -7435,7 +7475,6 @@ class ExpressionDsymbol final : public Dsymbol
|
||||||
public:
|
public:
|
||||||
Expression* exp;
|
Expression* exp;
|
||||||
ExpressionDsymbol(Expression* exp);
|
ExpressionDsymbol(Expression* exp);
|
||||||
ExpressionDsymbol* isExpressionDsymbol() override;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class AliasAssign final : public Dsymbol
|
class AliasAssign final : public Dsymbol
|
||||||
|
@ -7445,7 +7484,6 @@ public:
|
||||||
Type* type;
|
Type* type;
|
||||||
Dsymbol* aliassym;
|
Dsymbol* aliassym;
|
||||||
AliasAssign* syntaxCopy(Dsymbol* s) override;
|
AliasAssign* syntaxCopy(Dsymbol* s) override;
|
||||||
AliasAssign* isAliasAssign() override;
|
|
||||||
const char* kind() const override;
|
const char* kind() const override;
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
@ -7466,7 +7504,6 @@ class CAsmDeclaration final : public Dsymbol
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Expression* code;
|
Expression* code;
|
||||||
CAsmDeclaration* isCAsmDeclaration() override;
|
|
||||||
void accept(Visitor* v) override;
|
void accept(Visitor* v) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -298,7 +298,7 @@ extern (C++) class FuncDeclaration : Declaration
|
||||||
|
|
||||||
extern (D) this(Loc loc, Loc endloc, Identifier ident, StorageClass storage_class, Type type, bool noreturn = false)
|
extern (D) this(Loc loc, Loc endloc, Identifier ident, StorageClass storage_class, Type type, bool noreturn = false)
|
||||||
{
|
{
|
||||||
super(loc, ident);
|
super(DSYM.funcDeclaration, loc, ident);
|
||||||
//.printf("FuncDeclaration(id = '%s', type = %s)\n", ident.toChars(), type.toChars());
|
//.printf("FuncDeclaration(id = '%s', type = %s)\n", ident.toChars(), type.toChars());
|
||||||
//.printf("storage_class = x%llx\n", storage_class);
|
//.printf("storage_class = x%llx\n", storage_class);
|
||||||
this.storage_class = storage_class;
|
this.storage_class = storage_class;
|
||||||
|
@ -1043,11 +1043,6 @@ extern (C++) class FuncDeclaration : Declaration
|
||||||
return fd;
|
return fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
override final inout(FuncDeclaration) isFuncDeclaration() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
inout(FuncDeclaration) toAliasFunc() inout @safe
|
inout(FuncDeclaration) toAliasFunc() inout @safe
|
||||||
{
|
{
|
||||||
return this;
|
return this;
|
||||||
|
@ -1243,6 +1238,7 @@ extern (C++) final class FuncAliasDeclaration : FuncDeclaration
|
||||||
super(funcalias.loc, funcalias.endloc, ident, funcalias.storage_class, funcalias.type);
|
super(funcalias.loc, funcalias.endloc, ident, funcalias.storage_class, funcalias.type);
|
||||||
assert(funcalias != this);
|
assert(funcalias != this);
|
||||||
this.funcalias = funcalias;
|
this.funcalias = funcalias;
|
||||||
|
this.dsym = DSYM.funcAliasDeclaration;
|
||||||
|
|
||||||
this.hasOverloads = hasOverloads;
|
this.hasOverloads = hasOverloads;
|
||||||
if (hasOverloads)
|
if (hasOverloads)
|
||||||
|
@ -1259,11 +1255,6 @@ extern (C++) final class FuncAliasDeclaration : FuncDeclaration
|
||||||
userAttribDecl = funcalias.userAttribDecl;
|
userAttribDecl = funcalias.userAttribDecl;
|
||||||
}
|
}
|
||||||
|
|
||||||
override inout(FuncAliasDeclaration) isFuncAliasDeclaration() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override const(char)* kind() const
|
override const(char)* kind() const
|
||||||
{
|
{
|
||||||
return "function alias";
|
return "function alias";
|
||||||
|
@ -1293,6 +1284,7 @@ extern (C++) final class FuncLiteralDeclaration : FuncDeclaration
|
||||||
extern (D) this(Loc loc, Loc endloc, Type type, TOK tok, ForeachStatement fes, Identifier id = null, StorageClass storage_class = STC.undefined_)
|
extern (D) this(Loc loc, Loc endloc, Type type, TOK tok, ForeachStatement fes, Identifier id = null, StorageClass storage_class = STC.undefined_)
|
||||||
{
|
{
|
||||||
super(loc, endloc, null, storage_class, type);
|
super(loc, endloc, null, storage_class, type);
|
||||||
|
this.dsym = DSYM.funcLiteralDeclaration;
|
||||||
this.ident = id ? id : Id.empty;
|
this.ident = id ? id : Id.empty;
|
||||||
this.tok = tok;
|
this.tok = tok;
|
||||||
this.fes = fes;
|
this.fes = fes;
|
||||||
|
@ -1338,11 +1330,6 @@ extern (C++) final class FuncLiteralDeclaration : FuncDeclaration
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
override inout(FuncLiteralDeclaration) isFuncLiteralDeclaration() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override const(char)* kind() const
|
override const(char)* kind() const
|
||||||
{
|
{
|
||||||
// GCC requires the (char*) casts
|
// GCC requires the (char*) casts
|
||||||
|
@ -1374,6 +1361,7 @@ extern (C++) final class CtorDeclaration : FuncDeclaration
|
||||||
extern (D) this(Loc loc, Loc endloc, StorageClass stc, Type type)
|
extern (D) this(Loc loc, Loc endloc, StorageClass stc, Type type)
|
||||||
{
|
{
|
||||||
super(loc, endloc, Id.ctor, stc, type);
|
super(loc, endloc, Id.ctor, stc, type);
|
||||||
|
this.dsym = DSYM.ctorDeclaration;
|
||||||
//printf("CtorDeclaration(loc = %s) %s %p\n", loc.toChars(), toChars(), this);
|
//printf("CtorDeclaration(loc = %s) %s %p\n", loc.toChars(), toChars(), this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1405,11 +1393,6 @@ extern (C++) final class CtorDeclaration : FuncDeclaration
|
||||||
return (isThis() && vthis && global.params.useInvariants == CHECKENABLE.on);
|
return (isThis() && vthis && global.params.useInvariants == CHECKENABLE.on);
|
||||||
}
|
}
|
||||||
|
|
||||||
override inout(CtorDeclaration) isCtorDeclaration() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
@ -1423,6 +1406,7 @@ extern (C++) final class PostBlitDeclaration : FuncDeclaration
|
||||||
extern (D) this(Loc loc, Loc endloc, StorageClass stc, Identifier id)
|
extern (D) this(Loc loc, Loc endloc, StorageClass stc, Identifier id)
|
||||||
{
|
{
|
||||||
super(loc, endloc, id, stc, null);
|
super(loc, endloc, id, stc, null);
|
||||||
|
this.dsym = DSYM.postBlitDeclaration;
|
||||||
}
|
}
|
||||||
|
|
||||||
override PostBlitDeclaration syntaxCopy(Dsymbol s)
|
override PostBlitDeclaration syntaxCopy(Dsymbol s)
|
||||||
|
@ -1453,11 +1437,6 @@ extern (C++) final class PostBlitDeclaration : FuncDeclaration
|
||||||
return false; // cannot overload postblits
|
return false; // cannot overload postblits
|
||||||
}
|
}
|
||||||
|
|
||||||
override inout(PostBlitDeclaration) isPostBlitDeclaration() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
@ -1471,11 +1450,13 @@ extern (C++) final class DtorDeclaration : FuncDeclaration
|
||||||
extern (D) this(Loc loc, Loc endloc)
|
extern (D) this(Loc loc, Loc endloc)
|
||||||
{
|
{
|
||||||
super(loc, endloc, Id.dtor, STC.undefined_, null);
|
super(loc, endloc, Id.dtor, STC.undefined_, null);
|
||||||
|
this.dsym = DSYM.dtorDeclaration;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern (D) this(Loc loc, Loc endloc, StorageClass stc, Identifier id)
|
extern (D) this(Loc loc, Loc endloc, StorageClass stc, Identifier id)
|
||||||
{
|
{
|
||||||
super(loc, endloc, id, stc, null);
|
super(loc, endloc, id, stc, null);
|
||||||
|
this.dsym = DSYM.dtorDeclaration;
|
||||||
}
|
}
|
||||||
|
|
||||||
override DtorDeclaration syntaxCopy(Dsymbol s)
|
override DtorDeclaration syntaxCopy(Dsymbol s)
|
||||||
|
@ -1513,11 +1494,6 @@ extern (C++) final class DtorDeclaration : FuncDeclaration
|
||||||
return false; // cannot overload destructors
|
return false; // cannot overload destructors
|
||||||
}
|
}
|
||||||
|
|
||||||
override inout(DtorDeclaration) isDtorDeclaration() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
@ -1531,11 +1507,13 @@ extern (C++) class StaticCtorDeclaration : FuncDeclaration
|
||||||
extern (D) this(Loc loc, Loc endloc, StorageClass stc)
|
extern (D) this(Loc loc, Loc endloc, StorageClass stc)
|
||||||
{
|
{
|
||||||
super(loc, endloc, Identifier.generateIdWithLoc("_staticCtor", loc), STC.static_ | stc, null);
|
super(loc, endloc, Identifier.generateIdWithLoc("_staticCtor", loc), STC.static_ | stc, null);
|
||||||
|
this.dsym = DSYM.staticCtorDeclaration;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern (D) this(Loc loc, Loc endloc, string name, StorageClass stc)
|
extern (D) this(Loc loc, Loc endloc, string name, StorageClass stc)
|
||||||
{
|
{
|
||||||
super(loc, endloc, Identifier.generateIdWithLoc(name, loc), STC.static_ | stc, null);
|
super(loc, endloc, Identifier.generateIdWithLoc(name, loc), STC.static_ | stc, null);
|
||||||
|
this.dsym = DSYM.staticCtorDeclaration;
|
||||||
}
|
}
|
||||||
|
|
||||||
override StaticCtorDeclaration syntaxCopy(Dsymbol s)
|
override StaticCtorDeclaration syntaxCopy(Dsymbol s)
|
||||||
|
@ -1571,11 +1549,6 @@ extern (C++) class StaticCtorDeclaration : FuncDeclaration
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
override final inout(StaticCtorDeclaration) isStaticCtorDeclaration() inout @nogc nothrow pure @safe
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
@ -1592,6 +1565,7 @@ extern (C++) final class SharedStaticCtorDeclaration : StaticCtorDeclaration
|
||||||
extern (D) this(Loc loc, Loc endloc, StorageClass stc)
|
extern (D) this(Loc loc, Loc endloc, StorageClass stc)
|
||||||
{
|
{
|
||||||
super(loc, endloc, "_sharedStaticCtor", stc);
|
super(loc, endloc, "_sharedStaticCtor", stc);
|
||||||
|
this.dsym = DSYM.sharedStaticCtorDeclaration;
|
||||||
}
|
}
|
||||||
|
|
||||||
override SharedStaticCtorDeclaration syntaxCopy(Dsymbol s)
|
override SharedStaticCtorDeclaration syntaxCopy(Dsymbol s)
|
||||||
|
@ -1602,11 +1576,6 @@ extern (C++) final class SharedStaticCtorDeclaration : StaticCtorDeclaration
|
||||||
return scd;
|
return scd;
|
||||||
}
|
}
|
||||||
|
|
||||||
override inout(SharedStaticCtorDeclaration) isSharedStaticCtorDeclaration() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
@ -1622,11 +1591,13 @@ extern (C++) class StaticDtorDeclaration : FuncDeclaration
|
||||||
extern (D) this(Loc loc, Loc endloc, StorageClass stc)
|
extern (D) this(Loc loc, Loc endloc, StorageClass stc)
|
||||||
{
|
{
|
||||||
super(loc, endloc, Identifier.generateIdWithLoc("_staticDtor", loc), STC.static_ | stc, null);
|
super(loc, endloc, Identifier.generateIdWithLoc("_staticDtor", loc), STC.static_ | stc, null);
|
||||||
|
this.dsym = DSYM.staticDtorDeclaration;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern (D) this(Loc loc, Loc endloc, string name, StorageClass stc)
|
extern (D) this(Loc loc, Loc endloc, string name, StorageClass stc)
|
||||||
{
|
{
|
||||||
super(loc, endloc, Identifier.generateIdWithLoc(name, loc), STC.static_ | stc, null);
|
super(loc, endloc, Identifier.generateIdWithLoc(name, loc), STC.static_ | stc, null);
|
||||||
|
this.dsym = DSYM.staticDtorDeclaration;
|
||||||
}
|
}
|
||||||
|
|
||||||
override StaticDtorDeclaration syntaxCopy(Dsymbol s)
|
override StaticDtorDeclaration syntaxCopy(Dsymbol s)
|
||||||
|
@ -1662,11 +1633,6 @@ extern (C++) class StaticDtorDeclaration : FuncDeclaration
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
override final inout(StaticDtorDeclaration) isStaticDtorDeclaration() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
@ -1680,6 +1646,7 @@ extern (C++) final class SharedStaticDtorDeclaration : StaticDtorDeclaration
|
||||||
extern (D) this(Loc loc, Loc endloc, StorageClass stc)
|
extern (D) this(Loc loc, Loc endloc, StorageClass stc)
|
||||||
{
|
{
|
||||||
super(loc, endloc, "_sharedStaticDtor", stc);
|
super(loc, endloc, "_sharedStaticDtor", stc);
|
||||||
|
this.dsym = DSYM.sharedStaticDtorDeclaration;
|
||||||
}
|
}
|
||||||
|
|
||||||
override SharedStaticDtorDeclaration syntaxCopy(Dsymbol s)
|
override SharedStaticDtorDeclaration syntaxCopy(Dsymbol s)
|
||||||
|
@ -1690,11 +1657,6 @@ extern (C++) final class SharedStaticDtorDeclaration : StaticDtorDeclaration
|
||||||
return sdd;
|
return sdd;
|
||||||
}
|
}
|
||||||
|
|
||||||
override inout(SharedStaticDtorDeclaration) isSharedStaticDtorDeclaration() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
@ -1710,6 +1672,7 @@ extern (C++) final class InvariantDeclaration : FuncDeclaration
|
||||||
// Make a unique invariant for now; we'll fix it up as we add it to the aggregate invariant list.
|
// Make a unique invariant for now; we'll fix it up as we add it to the aggregate invariant list.
|
||||||
super(loc, endloc, id ? id : Identifier.generateId("__invariant"), stc, null);
|
super(loc, endloc, id ? id : Identifier.generateId("__invariant"), stc, null);
|
||||||
this.fbody = fbody;
|
this.fbody = fbody;
|
||||||
|
this.dsym = DSYM.invariantDeclaration;
|
||||||
}
|
}
|
||||||
|
|
||||||
override InvariantDeclaration syntaxCopy(Dsymbol s)
|
override InvariantDeclaration syntaxCopy(Dsymbol s)
|
||||||
|
@ -1735,11 +1698,6 @@ extern (C++) final class InvariantDeclaration : FuncDeclaration
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
override inout(InvariantDeclaration) isInvariantDeclaration() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
@ -1769,6 +1727,7 @@ extern (C++) final class UnitTestDeclaration : FuncDeclaration
|
||||||
{
|
{
|
||||||
super(loc, endloc, Identifier.generateIdWithLoc("__unittest", loc), stc, null);
|
super(loc, endloc, Identifier.generateIdWithLoc("__unittest", loc), stc, null);
|
||||||
this.codedoc = codedoc;
|
this.codedoc = codedoc;
|
||||||
|
this.dsym = DSYM.unitTestDeclaration;
|
||||||
}
|
}
|
||||||
|
|
||||||
override UnitTestDeclaration syntaxCopy(Dsymbol s)
|
override UnitTestDeclaration syntaxCopy(Dsymbol s)
|
||||||
|
@ -1799,11 +1758,6 @@ extern (C++) final class UnitTestDeclaration : FuncDeclaration
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
override inout(UnitTestDeclaration) isUnitTestDeclaration() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
@ -1817,6 +1771,7 @@ extern (C++) final class NewDeclaration : FuncDeclaration
|
||||||
extern (D) this(Loc loc, StorageClass stc)
|
extern (D) this(Loc loc, StorageClass stc)
|
||||||
{
|
{
|
||||||
super(loc, Loc.initial, Id.classNew, STC.static_ | stc, null);
|
super(loc, Loc.initial, Id.classNew, STC.static_ | stc, null);
|
||||||
|
this.dsym = DSYM.newDeclaration;
|
||||||
}
|
}
|
||||||
|
|
||||||
override NewDeclaration syntaxCopy(Dsymbol s)
|
override NewDeclaration syntaxCopy(Dsymbol s)
|
||||||
|
@ -1847,11 +1802,6 @@ extern (C++) final class NewDeclaration : FuncDeclaration
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
override inout(NewDeclaration) isNewDeclaration() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
|
|
@ -1275,6 +1275,7 @@ extern (D) void declareThis(FuncDeclaration fd, Scope* sc)
|
||||||
const bool dualCtx = (fd.toParent2() != fd.toParentLocal());
|
const bool dualCtx = (fd.toParent2() != fd.toParentLocal());
|
||||||
if (dualCtx)
|
if (dualCtx)
|
||||||
fd.hasDualContext = true;
|
fd.hasDualContext = true;
|
||||||
|
|
||||||
auto ad = fd.isThis();
|
auto ad = fd.isThis();
|
||||||
if (!dualCtx && !ad && !fd.isNested())
|
if (!dualCtx && !ad && !fd.isNested())
|
||||||
{
|
{
|
||||||
|
|
|
@ -44,6 +44,5 @@ public:
|
||||||
Dsymbol *toAlias() override;
|
Dsymbol *toAlias() override;
|
||||||
bool overloadInsert(Dsymbol *s) override;
|
bool overloadInsert(Dsymbol *s) override;
|
||||||
|
|
||||||
Import *isImport() override { return this; }
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
|
@ -47,8 +47,6 @@ public:
|
||||||
|
|
||||||
bool equals(const RootObject * const o) const override;
|
bool equals(const RootObject * const o) const override;
|
||||||
|
|
||||||
Package *isPackage() override final { return this; }
|
|
||||||
|
|
||||||
bool isAncestorPackageOf(const Package * const pkg) const;
|
bool isAncestorPackageOf(const Package * const pkg) const;
|
||||||
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
|
@ -158,7 +156,6 @@ public:
|
||||||
|
|
||||||
void *ctfe_cov; // stores coverage information from ctfe
|
void *ctfe_cov; // stores coverage information from ctfe
|
||||||
|
|
||||||
Module *isModule() override { return this; }
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -66,6 +66,7 @@ extern (C++) final class Nspace : ScopeDsymbol
|
||||||
{
|
{
|
||||||
super(loc, ident);
|
super(loc, ident);
|
||||||
//printf("Nspace::Nspace(ident = %s)\n", ident.toChars());
|
//printf("Nspace::Nspace(ident = %s)\n", ident.toChars());
|
||||||
|
this.dsym = DSYM.nspace;
|
||||||
this.members = members;
|
this.members = members;
|
||||||
this.identExp = identExp;
|
this.identExp = identExp;
|
||||||
}
|
}
|
||||||
|
@ -88,11 +89,6 @@ extern (C++) final class Nspace : ScopeDsymbol
|
||||||
return "namespace";
|
return "namespace";
|
||||||
}
|
}
|
||||||
|
|
||||||
override inout(Nspace) isNspace() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
|
|
@ -23,6 +23,5 @@ class Nspace final : public ScopeDsymbol
|
||||||
Nspace *syntaxCopy(Dsymbol *s) override;
|
Nspace *syntaxCopy(Dsymbol *s) override;
|
||||||
bool hasPointers() override;
|
bool hasPointers() override;
|
||||||
const char *kind() const override;
|
const char *kind() const override;
|
||||||
Nspace *isNspace() override { return this; }
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
|
@ -1715,7 +1715,7 @@ extern (C++) final class LabelDsymbol : Dsymbol
|
||||||
|
|
||||||
extern (D) this(Identifier ident, Loc loc = Loc.initial) @safe
|
extern (D) this(Identifier ident, Loc loc = Loc.initial) @safe
|
||||||
{
|
{
|
||||||
super(loc, ident);
|
super(DSYM.labelDsymbol, loc, ident);
|
||||||
}
|
}
|
||||||
|
|
||||||
static LabelDsymbol create(Identifier ident) @safe
|
static LabelDsymbol create(Identifier ident) @safe
|
||||||
|
|
|
@ -30,7 +30,7 @@ extern (C++) final class StaticAssert : Dsymbol
|
||||||
|
|
||||||
extern (D) this(Loc loc, Expression exp, Expression msg)
|
extern (D) this(Loc loc, Expression exp, Expression msg)
|
||||||
{
|
{
|
||||||
super(loc, Id.empty);
|
super(DSYM.staticAssert, loc, Id.empty);
|
||||||
this.exp = exp;
|
this.exp = exp;
|
||||||
this.msgs = new Expressions(1);
|
this.msgs = new Expressions(1);
|
||||||
(*this.msgs)[0] = msg;
|
(*this.msgs)[0] = msg;
|
||||||
|
@ -38,7 +38,7 @@ extern (C++) final class StaticAssert : Dsymbol
|
||||||
|
|
||||||
extern (D) this(Loc loc, Expression exp, Expressions* msgs)
|
extern (D) this(Loc loc, Expression exp, Expressions* msgs)
|
||||||
{
|
{
|
||||||
super(loc, Id.empty);
|
super(DSYM.staticAssert, loc, Id.empty);
|
||||||
this.exp = exp;
|
this.exp = exp;
|
||||||
this.msgs = msgs;
|
this.msgs = msgs;
|
||||||
}
|
}
|
||||||
|
@ -54,11 +54,6 @@ extern (C++) final class StaticAssert : Dsymbol
|
||||||
return "static assert";
|
return "static assert";
|
||||||
}
|
}
|
||||||
|
|
||||||
override inout(StaticAssert) isStaticAssert() inout
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
override void accept(Visitor v)
|
override void accept(Visitor v)
|
||||||
{
|
{
|
||||||
v.visit(this);
|
v.visit(this);
|
||||||
|
|
|
@ -22,6 +22,5 @@ public:
|
||||||
|
|
||||||
StaticAssert *syntaxCopy(Dsymbol *s) override;
|
StaticAssert *syntaxCopy(Dsymbol *s) override;
|
||||||
const char *kind() const override;
|
const char *kind() const override;
|
||||||
StaticAssert *isStaticAssert() override { return this; }
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
|
@ -82,7 +82,6 @@ public:
|
||||||
|
|
||||||
Visibility visible() override;
|
Visibility visible() override;
|
||||||
|
|
||||||
TemplateDeclaration *isTemplateDeclaration() override { return this; }
|
|
||||||
|
|
||||||
bool isDeprecated() const override;
|
bool isDeprecated() const override;
|
||||||
bool isOverloadable() const override;
|
bool isOverloadable() const override;
|
||||||
|
@ -276,7 +275,6 @@ public:
|
||||||
bool isDiscardable();
|
bool isDiscardable();
|
||||||
bool needsCodegen();
|
bool needsCodegen();
|
||||||
|
|
||||||
TemplateInstance *isTemplateInstance() override final { return this; }
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -289,7 +287,6 @@ public:
|
||||||
const char *kind() const override;
|
const char *kind() const override;
|
||||||
bool hasPointers() override;
|
bool hasPointers() override;
|
||||||
|
|
||||||
TemplateMixin *isTemplateMixin() override { return this; }
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -2491,7 +2491,7 @@ private extern(C++) class DummyArgVisitor : Visitor
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!tap.sdummy)
|
if (!tap.sdummy)
|
||||||
tap.sdummy = new Dsymbol();
|
tap.sdummy = new Dsymbol(DSYM.dsymbol);
|
||||||
result = tap.sdummy;
|
result = tap.sdummy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,6 @@ public:
|
||||||
DebugSymbol *syntaxCopy(Dsymbol *) override;
|
DebugSymbol *syntaxCopy(Dsymbol *) override;
|
||||||
|
|
||||||
const char *kind() const override;
|
const char *kind() const override;
|
||||||
DebugSymbol *isDebugSymbol() override;
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -28,6 +27,5 @@ public:
|
||||||
VersionSymbol *syntaxCopy(Dsymbol *) override;
|
VersionSymbol *syntaxCopy(Dsymbol *) override;
|
||||||
|
|
||||||
const char *kind() const override;
|
const char *kind() const override;
|
||||||
VersionSymbol *isVersionSymbol() override;
|
|
||||||
void accept(Visitor *v) override { v->visit(this); }
|
void accept(Visitor *v) override { v->visit(this); }
|
||||||
};
|
};
|
||||||
|
|
|
@ -1166,7 +1166,7 @@ public:
|
||||||
void visit(Dsymbol *) override { assert(0); }
|
void visit(Dsymbol *) override { assert(0); }
|
||||||
void visit(Module *d) override
|
void visit(Module *d) override
|
||||||
{
|
{
|
||||||
if (d->semanticRun >= PASS::obj)
|
if (d->semanticRun() >= PASS::obj)
|
||||||
return;
|
return;
|
||||||
if (d->members)
|
if (d->members)
|
||||||
{
|
{
|
||||||
|
@ -1192,11 +1192,11 @@ public:
|
||||||
(void)d->stest;
|
(void)d->stest;
|
||||||
(void)d->needmoduleinfo;
|
(void)d->needmoduleinfo;
|
||||||
}
|
}
|
||||||
d->semanticRun = PASS::obj;
|
d->semanticRun(PASS::obj);
|
||||||
}
|
}
|
||||||
void visit(Import *d) override
|
void visit(Import *d) override
|
||||||
{
|
{
|
||||||
if (d->semanticRun >= PASS::obj)
|
if (d->semanticRun() >= PASS::obj)
|
||||||
return;
|
return;
|
||||||
if (d->isstatic)
|
if (d->isstatic)
|
||||||
return;
|
return;
|
||||||
|
@ -1210,7 +1210,7 @@ public:
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
d->mod->accept(this);
|
d->mod->accept(this);
|
||||||
d->semanticRun = PASS::obj;
|
d->semanticRun(PASS::obj);
|
||||||
}
|
}
|
||||||
void visit(TupleDeclaration *d) override
|
void visit(TupleDeclaration *d) override
|
||||||
{
|
{
|
||||||
|
@ -1283,7 +1283,7 @@ public:
|
||||||
}
|
}
|
||||||
void visit(StructDeclaration *d) override
|
void visit(StructDeclaration *d) override
|
||||||
{
|
{
|
||||||
if (d->semanticRun >= PASS::obj)
|
if (d->semanticRun() >= PASS::obj)
|
||||||
return;
|
return;
|
||||||
if (d->type->ty == TY::Terror)
|
if (d->type->ty == TY::Terror)
|
||||||
return;
|
return;
|
||||||
|
@ -1304,11 +1304,11 @@ public:
|
||||||
d->xcmp->accept(this);
|
d->xcmp->accept(this);
|
||||||
if (d->xhash)
|
if (d->xhash)
|
||||||
d->xhash->accept(this);
|
d->xhash->accept(this);
|
||||||
d->semanticRun = PASS::obj;
|
d->semanticRun(PASS::obj);
|
||||||
}
|
}
|
||||||
void visit(ClassDeclaration *d) override
|
void visit(ClassDeclaration *d) override
|
||||||
{
|
{
|
||||||
if (d->semanticRun >= PASS::obj)
|
if (d->semanticRun() >= PASS::obj)
|
||||||
return;
|
return;
|
||||||
if (d->type->ty == TY::Terror)
|
if (d->type->ty == TY::Terror)
|
||||||
return;
|
return;
|
||||||
|
@ -1401,11 +1401,11 @@ public:
|
||||||
visitDeclaration(fd);
|
visitDeclaration(fd);
|
||||||
}
|
}
|
||||||
d->type->accept(this);
|
d->type->accept(this);
|
||||||
d->semanticRun = PASS::obj;
|
d->semanticRun(PASS::obj);
|
||||||
}
|
}
|
||||||
void visit(InterfaceDeclaration *d) override
|
void visit(InterfaceDeclaration *d) override
|
||||||
{
|
{
|
||||||
if (d->semanticRun >= PASS::obj)
|
if (d->semanticRun() >= PASS::obj)
|
||||||
return;
|
return;
|
||||||
if (d->type->ty == TY::Terror)
|
if (d->type->ty == TY::Terror)
|
||||||
return;
|
return;
|
||||||
|
@ -1415,13 +1415,13 @@ public:
|
||||||
(*d->members)[i]->accept(this);
|
(*d->members)[i]->accept(this);
|
||||||
(void)d->csym;
|
(void)d->csym;
|
||||||
d->type->accept(this);
|
d->type->accept(this);
|
||||||
d->semanticRun = PASS::obj;
|
d->semanticRun(PASS::obj);
|
||||||
}
|
}
|
||||||
void visit(EnumDeclaration *d) override
|
void visit(EnumDeclaration *d) override
|
||||||
{
|
{
|
||||||
if (d->semanticRun >= PASS::obj)
|
if (d->semanticRun() >= PASS::obj)
|
||||||
return;
|
return;
|
||||||
if (d->errors || d->type->ty == TY::Terror)
|
if (d->errors() || d->type->ty == TY::Terror)
|
||||||
return;
|
return;
|
||||||
if (d->isAnonymous())
|
if (d->isAnonymous())
|
||||||
return;
|
return;
|
||||||
|
@ -1432,7 +1432,7 @@ public:
|
||||||
tc->sym->defaultval->accept(this);
|
tc->sym->defaultval->accept(this);
|
||||||
}
|
}
|
||||||
d->type->accept(this);
|
d->type->accept(this);
|
||||||
d->semanticRun = PASS::obj;
|
d->semanticRun(PASS::obj);
|
||||||
}
|
}
|
||||||
void visitDeclaration(Declaration *decl)
|
void visitDeclaration(Declaration *decl)
|
||||||
{
|
{
|
||||||
|
@ -1525,7 +1525,7 @@ public:
|
||||||
}
|
}
|
||||||
void visit(VarDeclaration *d) override
|
void visit(VarDeclaration *d) override
|
||||||
{
|
{
|
||||||
if (d->semanticRun >= PASS::obj)
|
if (d->semanticRun() >= PASS::obj)
|
||||||
return;
|
return;
|
||||||
if (d->type->ty == TY::Terror)
|
if (d->type->ty == TY::Terror)
|
||||||
return;
|
return;
|
||||||
|
@ -1579,18 +1579,18 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
d->type->accept(this);
|
d->type->accept(this);
|
||||||
d->semanticRun = PASS::obj;
|
d->semanticRun(PASS::obj);
|
||||||
}
|
}
|
||||||
void visit(TypeInfoDeclaration *d) override
|
void visit(TypeInfoDeclaration *d) override
|
||||||
{
|
{
|
||||||
if (d->semanticRun >= PASS::obj)
|
if (d->semanticRun() >= PASS::obj)
|
||||||
return;
|
return;
|
||||||
visitDeclaration(d);
|
visitDeclaration(d);
|
||||||
d->semanticRun = PASS::obj;
|
d->semanticRun(PASS::obj);
|
||||||
}
|
}
|
||||||
void visit(FuncDeclaration *d) override
|
void visit(FuncDeclaration *d) override
|
||||||
{
|
{
|
||||||
if (d->semanticRun >= PASS::obj)
|
if (d->semanticRun() >= PASS::obj)
|
||||||
return;
|
return;
|
||||||
if (d->isUnitTestDeclaration())
|
if (d->isUnitTestDeclaration())
|
||||||
return;
|
return;
|
||||||
|
@ -1613,7 +1613,7 @@ public:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (d->semanticRun < PASS::semantic3)
|
if (d->semanticRun() < PASS::semantic3)
|
||||||
{
|
{
|
||||||
dmd::functionSemantic3(d);
|
dmd::functionSemantic3(d);
|
||||||
Module::runDeferredSemantic3();
|
Module::runDeferredSemantic3();
|
||||||
|
@ -1623,8 +1623,8 @@ public:
|
||||||
visitDeclaration(d);
|
visitDeclaration(d);
|
||||||
if (!d->fbody)
|
if (!d->fbody)
|
||||||
return;
|
return;
|
||||||
assert(d->semanticRun == PASS::semantic3done);
|
assert(d->semanticRun() == PASS::semantic3done);
|
||||||
d->semanticRun = PASS::obj;
|
d->semanticRun(PASS::obj);
|
||||||
if (d->vthis)
|
if (d->vthis)
|
||||||
visitDeclaration(d->vthis);
|
visitDeclaration(d->vthis);
|
||||||
if (d->v_arguments)
|
if (d->v_arguments)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue