diff options
Diffstat (limited to 'gcc/d/dmd/clone.c')
-rw-r--r-- | gcc/d/dmd/clone.c | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/gcc/d/dmd/clone.c b/gcc/d/dmd/clone.c index 73c4a66..eb09076 100644 --- a/gcc/d/dmd/clone.c +++ b/gcc/d/dmd/clone.c @@ -1,6 +1,6 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2020 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved * written by Walter Bright * http://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. @@ -23,8 +23,6 @@ #include "template.h" #include "tokens.h" -Expression *semantic(Expression *e, Scope *sc); - /******************************************* * Merge function attributes pure, nothrow, @safe, @nogc, and @disable */ @@ -326,8 +324,8 @@ FuncDeclaration *buildOpAssign(StructDeclaration *sd, Scope *sc) sc2->stc = 0; sc2->linkage = LINKd; - fop->semantic(sc2); - fop->semantic2(sc2); + dsymbolSemantic(fop, sc2); + semantic2(fop, sc2); // Bugzilla 15044: fop->semantic3 isn't run here for lazy forward reference resolution. sc2->pop(); @@ -506,7 +504,7 @@ FuncDeclaration *buildXopEquals(StructDeclaration *sd, Scope *sc) parameters->push(new Parameter(STCref | STCconst, sd->type, NULL, NULL, NULL)); tfeqptr = new TypeFunction(ParameterList(parameters), Type::tbool, LINKd); tfeqptr->mod = MODconst; - tfeqptr = (TypeFunction *)tfeqptr->semantic(Loc(), &scx); + tfeqptr = (TypeFunction *)typeSemantic(tfeqptr, Loc(), &scx); } fd = fd->overloadExactMatch(tfeqptr); if (fd) @@ -521,7 +519,7 @@ FuncDeclaration *buildXopEquals(StructDeclaration *sd, Scope *sc) Expression *e = new IdentifierExp(sd->loc, Id::empty); e = new DotIdExp(sd->loc, e, Id::object); e = new DotIdExp(sd->loc, e, id); - e = semantic(e, sc); + e = expressionSemantic(e, sc); Dsymbol *s = getDsymbol(e); assert(s); sd->xerreq = s->isFuncDeclaration(); @@ -549,8 +547,8 @@ FuncDeclaration *buildXopEquals(StructDeclaration *sd, Scope *sc) sc2->stc = 0; sc2->linkage = LINKd; - fop->semantic(sc2); - fop->semantic2(sc2); + dsymbolSemantic(fop, sc2); + semantic2(fop, sc2); sc2->pop(); if (global.endGagging(errors)) // if errors happened @@ -586,7 +584,7 @@ FuncDeclaration *buildXopCmp(StructDeclaration *sd, Scope *sc) parameters->push(new Parameter(STCref | STCconst, sd->type, NULL, NULL, NULL)); tfcmpptr = new TypeFunction(ParameterList(parameters), Type::tint32, LINKd); tfcmpptr->mod = MODconst; - tfcmpptr = (TypeFunction *)tfcmpptr->semantic(Loc(), &scx); + tfcmpptr = (TypeFunction *)typeSemantic(tfcmpptr, Loc(), &scx); } fd = fd->overloadExactMatch(tfcmpptr); if (fd) @@ -606,7 +604,7 @@ FuncDeclaration *buildXopCmp(StructDeclaration *sd, Scope *sc) Expression *e = new IdentifierExp(sd->loc, Id::empty); e = new DotIdExp(sd->loc, e, Id::object); e = new DotIdExp(sd->loc, e, id); - e = semantic(e, sc); + e = expressionSemantic(e, sc); Dsymbol *s = getDsymbol(e); assert(s); sd->xerrcmp = s->isFuncDeclaration(); @@ -638,8 +636,8 @@ FuncDeclaration *buildXopCmp(StructDeclaration *sd, Scope *sc) sc2->stc = 0; sc2->linkage = LINKd; - fop->semantic(sc2); - fop->semantic2(sc2); + dsymbolSemantic(fop, sc2); + semantic2(fop, sc2); sc2->pop(); if (global.endGagging(errors)) // if errors happened @@ -762,8 +760,8 @@ FuncDeclaration *buildXtoHash(StructDeclaration *sd, Scope *sc) sc2->stc = 0; sc2->linkage = LINKd; - fop->semantic(sc2); - fop->semantic2(sc2); + dsymbolSemantic(fop, sc2); + semantic2(fop, sc2); sc2->pop(); @@ -927,7 +925,7 @@ FuncDeclaration *buildPostBlit(StructDeclaration *sd, Scope *sc) dd->fbody = (stc & STCdisable) ? NULL : new CompoundStatement(loc, a); sd->postblits.shift(dd); sd->members->push(dd); - dd->semantic(sc); + dsymbolSemantic(dd, sc); } FuncDeclaration *xpostblit = NULL; @@ -961,7 +959,7 @@ FuncDeclaration *buildPostBlit(StructDeclaration *sd, Scope *sc) dd->storage_class |= STCinference; dd->fbody = new ExpStatement(loc, e); sd->members->push(dd); - dd->semantic(sc); + dsymbolSemantic(dd, sc); xpostblit = dd; break; } @@ -969,7 +967,7 @@ FuncDeclaration *buildPostBlit(StructDeclaration *sd, Scope *sc) if (xpostblit) { AliasDeclaration *alias = new AliasDeclaration(Loc(), Id::__xpostblit, xpostblit); - alias->semantic(sc); + dsymbolSemantic(alias, sc); sd->members->push(alias); alias->addMember(sc, sd); // add to symbol table } @@ -1074,7 +1072,7 @@ FuncDeclaration *buildDtor(AggregateDeclaration *ad, Scope *sc) dd->fbody = new ExpStatement(loc, e); ad->dtors.shift(dd); ad->members->push(dd); - dd->semantic(sc); + dsymbolSemantic(dd, sc); } FuncDeclaration *xdtor = NULL; @@ -1109,7 +1107,7 @@ FuncDeclaration *buildDtor(AggregateDeclaration *ad, Scope *sc) dd->storage_class |= STCinference; dd->fbody = new ExpStatement(loc, e); ad->members->push(dd); - dd->semantic(sc); + dsymbolSemantic(dd, sc); xdtor = dd; break; } @@ -1117,7 +1115,7 @@ FuncDeclaration *buildDtor(AggregateDeclaration *ad, Scope *sc) if (xdtor) { AliasDeclaration *alias = new AliasDeclaration(Loc(), Id::__xdtor, xdtor); - alias->semantic(sc); + dsymbolSemantic(alias, sc); ad->members->push(alias); alias->addMember(sc, ad); // add to symbol table } @@ -1175,7 +1173,7 @@ FuncDeclaration *buildInv(AggregateDeclaration *ad, Scope *sc) inv = new InvariantDeclaration(declLoc, Loc(), stc | stcx, Id::classInvariant); inv->fbody = new ExpStatement(loc, e); ad->members->push(inv); - inv->semantic(sc); + dsymbolSemantic(inv, sc); return inv; } } |