diff --git a/src/dmd/aggregate.h b/src/dmd/aggregate.h index d5e56914b72e..dcd564b57047 100644 --- a/src/dmd/aggregate.h +++ b/src/dmd/aggregate.h @@ -95,6 +95,7 @@ class AggregateDeclaration : public ScopeDsymbol */ Dsymbol *enclosing; VarDeclaration *vthis; // 'this' parameter if this aggregate is nested + VarDeclaration *vthis2; // 'this' parameter if this aggregate is a template and is nested // Special member functions FuncDeclarations invs; // Array of invariants FuncDeclaration *inv; // invariant @@ -121,6 +122,7 @@ class AggregateDeclaration : public ScopeDsymbol virtual Scope *newScope(Scope *sc); void setScope(Scope *sc); bool determineFields(); + size_t nonHiddenFields(); bool determineSize(Loc loc); virtual void finalizeSize() = 0; d_uns64 size(const Loc &loc); @@ -129,6 +131,7 @@ class AggregateDeclaration : public ScopeDsymbol bool isDeprecated() const; // is aggregate deprecated? bool isNested() const; void makeNested(); + void makeNested2(); bool isExport() const; Dsymbol *searchCtor(); diff --git a/src/dmd/declaration.h b/src/dmd/declaration.h index 1f2a87b9216c..bfddea1c3421 100644 --- a/src/dmd/declaration.h +++ b/src/dmd/declaration.h @@ -461,6 +461,7 @@ class FuncDeclaration : public Declaration struct HiddenParameters { VarDeclaration *this_; + bool isThis2; VarDeclaration *selector; }; @@ -486,6 +487,7 @@ class FuncDeclaration : public Declaration // scopes from having the same name DsymbolTable *localsymtab; VarDeclaration *vthis; // 'this' parameter (member and nested) + bool isThis2; // has a dual-context 'this' parameter VarDeclaration *v_arguments; // '_arguments' parameter ObjcSelector *selector; // Objective-C method selector (member function only) VarDeclaration *selectorParameter; // Objective-C implicit selector parameter diff --git a/src/dmd/expression.h b/src/dmd/expression.h index bf685d7e11d1..7dd6994ea0e4 100644 --- a/src/dmd/expression.h +++ b/src/dmd/expression.h @@ -785,6 +785,7 @@ class DelegateExp : public UnaExp public: FuncDeclaration *func; bool hasOverloads; + VarDeclaration *vthis2; // container for multi-context void accept(Visitor *v) { v->visit(this); } @@ -804,6 +805,7 @@ class CallExp : public UnaExp Expressions *arguments; // function arguments FuncDeclaration *f; // symbol to call bool directcall; // true if a virtual call is devirtualized + VarDeclaration *vthis2; // container for multi-context static CallExp *create(Loc loc, Expression *e, Expressions *exps); static CallExp *create(Loc loc, Expression *e);