diff options
author | Iain Buclaw <ibuclaw@gdcproject.org> | 2020-06-22 21:29:16 +0200 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gdcproject.org> | 2020-06-25 17:02:44 +0200 |
commit | 72acf751d8eb41bab7a4d8b4dd74f8165b10cd71 (patch) | |
tree | c96d8ac146eb035f3e04f7eb142d756af7638113 /gcc/d/dmd | |
parent | f48bffe70cba310461ec19ffcd07c573a6b86575 (diff) | |
download | gcc-72acf751d8eb41bab7a4d8b4dd74f8165b10cd71.zip gcc-72acf751d8eb41bab7a4d8b4dd74f8165b10cd71.tar.gz gcc-72acf751d8eb41bab7a4d8b4dd74f8165b10cd71.tar.bz2 |
d: Merge upstream dmd 4f1046222.
Renames OnScopeStatement to ScopeGuardStatement.
Reviewed-on: https://github.com/dlang/dmd/pull/11285
gcc/d/ChangeLog:
* dmd/MERGE: Merge upstream dmd 4f1046222.
* toir.cc (IRVisitor::visit (OnScopeGuardStatement *)): Rename to ...
(IRVisitor::visit (ScopeGuardStatement *)): ... this.
Diffstat (limited to 'gcc/d/dmd')
-rw-r--r-- | gcc/d/dmd/MERGE | 2 | ||||
-rw-r--r-- | gcc/d/dmd/blockexit.c | 2 | ||||
-rw-r--r-- | gcc/d/dmd/clone.c | 2 | ||||
-rw-r--r-- | gcc/d/dmd/dinterpret.c | 4 | ||||
-rw-r--r-- | gcc/d/dmd/func.c | 2 | ||||
-rw-r--r-- | gcc/d/dmd/hdrgen.c | 2 | ||||
-rw-r--r-- | gcc/d/dmd/parse.c | 2 | ||||
-rw-r--r-- | gcc/d/dmd/sapply.c | 2 | ||||
-rw-r--r-- | gcc/d/dmd/scope.h | 2 | ||||
-rw-r--r-- | gcc/d/dmd/statement.c | 14 | ||||
-rw-r--r-- | gcc/d/dmd/statement.h | 8 | ||||
-rw-r--r-- | gcc/d/dmd/statementsem.c | 4 | ||||
-rw-r--r-- | gcc/d/dmd/visitor.h | 4 |
13 files changed, 25 insertions, 25 deletions
diff --git a/gcc/d/dmd/MERGE b/gcc/d/dmd/MERGE index d6b2a2a..a13b5c1 100644 --- a/gcc/d/dmd/MERGE +++ b/gcc/d/dmd/MERGE @@ -1,4 +1,4 @@ -13d67c5757b83a86411e510bd65a6b5167241324 +4f1046222f3a15a746ad2455e1099ed31e39b554 The first line of this file holds the git revision number of the last merge done from the dlang/dmd repository. diff --git a/gcc/d/dmd/blockexit.c b/gcc/d/dmd/blockexit.c index d4088f5c..4705862 100644 --- a/gcc/d/dmd/blockexit.c +++ b/gcc/d/dmd/blockexit.c @@ -435,7 +435,7 @@ int blockExit(Statement *s, FuncDeclaration *func, bool mustNotThrow) result |= finalresult & ~BEfallthru; } - void visit(OnScopeStatement *) + void visit(ScopeGuardStatement *) { // At this point, this statement is just an empty placeholder result = BEfallthru; diff --git a/gcc/d/dmd/clone.c b/gcc/d/dmd/clone.c index a704d13..dd22fb3 100644 --- a/gcc/d/dmd/clone.c +++ b/gcc/d/dmd/clone.c @@ -914,7 +914,7 @@ FuncDeclaration *buildPostBlit(StructDeclaration *sd, Scope *sc) ex = new CallExp(loc, new IdentifierExp(loc, Id::__ArrayDtor), ex); } - a->push(new OnScopeStatement(loc, TOKon_scope_failure, new ExpStatement(loc, ex))); + a->push(new ScopeGuardStatement(loc, TOKon_scope_failure, new ExpStatement(loc, ex))); } // Build our own "postblit" which executes a, but only if needed. diff --git a/gcc/d/dmd/dinterpret.c b/gcc/d/dmd/dinterpret.c index ada1d8b..dd1105c 100644 --- a/gcc/d/dmd/dinterpret.c +++ b/gcc/d/dmd/dinterpret.c @@ -439,7 +439,7 @@ public: ctfeCompile(s->statement); } - void visit(OnScopeStatement *) + void visit(ScopeGuardStatement *) { // rewritten to try/catch/finally assert(0); @@ -1753,7 +1753,7 @@ public: result = new ThrownExceptionExp(s->loc, (ClassReferenceExp *)e); } - void visit(OnScopeStatement *) + void visit(ScopeGuardStatement *) { assert(0); } diff --git a/gcc/d/dmd/func.c b/gcc/d/dmd/func.c index 008f097..b684955 100644 --- a/gcc/d/dmd/func.c +++ b/gcc/d/dmd/func.c @@ -194,7 +194,7 @@ public: if (s->finalbody) visitStmt(s->finalbody); } - void visit(OnScopeStatement *) { } + void visit(ScopeGuardStatement *) { } void visit(ThrowStatement *) { } void visit(DebugStatement *s) { diff --git a/gcc/d/dmd/hdrgen.c b/gcc/d/dmd/hdrgen.c index 11a06a8..33a804f 100644 --- a/gcc/d/dmd/hdrgen.c +++ b/gcc/d/dmd/hdrgen.c @@ -618,7 +618,7 @@ public: buf->writenl(); } - void visit(OnScopeStatement *s) + void visit(ScopeGuardStatement *s) { buf->writestring(Token::toChars(s->tok)); buf->writeByte(' '); diff --git a/gcc/d/dmd/parse.c b/gcc/d/dmd/parse.c index 4aec7a4..f4cd28e 100644 --- a/gcc/d/dmd/parse.c +++ b/gcc/d/dmd/parse.c @@ -5395,7 +5395,7 @@ Statement *Parser::parseStatement(int flags, const utf8_t** endPtr, Loc *pEndloc nextToken(); check(TOKrparen); Statement *st = parseStatement(PSscope); - s = new OnScopeStatement(loc, t, st); + s = new ScopeGuardStatement(loc, t, st); break; } diff --git a/gcc/d/dmd/sapply.c b/gcc/d/dmd/sapply.c index b15d2a8..35e38c1 100644 --- a/gcc/d/dmd/sapply.c +++ b/gcc/d/dmd/sapply.c @@ -133,7 +133,7 @@ public: { doCond(s->_body) || doCond(s->finalbody) || applyTo(s); } - void visit(OnScopeStatement *s) + void visit(ScopeGuardStatement *s) { doCond(s->statement) || applyTo(s); } diff --git a/gcc/d/dmd/scope.h b/gcc/d/dmd/scope.h index 7456f70..b22823f 100644 --- a/gcc/d/dmd/scope.h +++ b/gcc/d/dmd/scope.h @@ -77,7 +77,7 @@ struct Scope LabelStatement *slabel; // enclosing labelled statement SwitchStatement *sw; // enclosing switch statement TryFinallyStatement *tf; // enclosing try finally statement - OnScopeStatement *os; // enclosing scope(xxx) statement + ScopeGuardStatement *os; // enclosing scope(xxx) statement Statement *sbreak; // enclosing statement that supports "break" Statement *scontinue; // enclosing statement that supports "continue" ForeachStatement *fes; // if nested function for ForeachStatement, this is it diff --git a/gcc/d/dmd/statement.c b/gcc/d/dmd/statement.c index 7a0fd6d..9d2e7e2 100644 --- a/gcc/d/dmd/statement.c +++ b/gcc/d/dmd/statement.c @@ -171,7 +171,7 @@ bool Statement::usesEH() void visit(Statement *) {} void visit(TryCatchStatement *) { stop = true; } void visit(TryFinallyStatement *) { stop = true; } - void visit(OnScopeStatement *) { stop = true; } + void visit(ScopeGuardStatement *) { stop = true; } void visit(SynchronizedStatement *) { stop = true; } }; @@ -1418,23 +1418,23 @@ bool TryFinallyStatement::hasContinue() return false; //true; } -/****************************** OnScopeStatement ***************************/ +/****************************** ScopeGuardStatement ***************************/ -OnScopeStatement::OnScopeStatement(Loc loc, TOK tok, Statement *statement) +ScopeGuardStatement::ScopeGuardStatement(Loc loc, TOK tok, Statement *statement) : Statement(loc) { this->tok = tok; this->statement = statement; } -Statement *OnScopeStatement::syntaxCopy() +Statement *ScopeGuardStatement::syntaxCopy() { - return new OnScopeStatement(loc, tok, statement->syntaxCopy()); + return new ScopeGuardStatement(loc, tok, statement->syntaxCopy()); } -Statement *OnScopeStatement::scopeCode(Scope *sc, Statement **sentry, Statement **sexception, Statement **sfinally) +Statement *ScopeGuardStatement::scopeCode(Scope *sc, Statement **sentry, Statement **sexception, Statement **sfinally) { - //printf("OnScopeStatement::scopeCode()\n"); + //printf("ScopeGuardStatement::scopeCode()\n"); //print(); *sentry = NULL; *sexception = NULL; diff --git a/gcc/d/dmd/statement.h b/gcc/d/dmd/statement.h index c8aa4d3..4ceec87 100644 --- a/gcc/d/dmd/statement.h +++ b/gcc/d/dmd/statement.h @@ -626,13 +626,13 @@ public: void accept(Visitor *v) { v->visit(this); } }; -class OnScopeStatement : public Statement +class ScopeGuardStatement : public Statement { public: TOK tok; Statement *statement; - OnScopeStatement(Loc loc, TOK tok, Statement *statement); + ScopeGuardStatement(Loc loc, TOK tok, Statement *statement); Statement *syntaxCopy(); Statement *scopeCode(Scope *sc, Statement **sentry, Statement **sexit, Statement **sfinally); @@ -670,7 +670,7 @@ public: Identifier *ident; LabelDsymbol *label; TryFinallyStatement *tf; - OnScopeStatement *os; + ScopeGuardStatement *os; VarDeclaration *lastVar; GotoStatement(Loc loc, Identifier *ident); @@ -686,7 +686,7 @@ public: Identifier *ident; Statement *statement; TryFinallyStatement *tf; - OnScopeStatement *os; + ScopeGuardStatement *os; VarDeclaration *lastVar; Statement *gotoTarget; // interpret diff --git a/gcc/d/dmd/statementsem.c b/gcc/d/dmd/statementsem.c index 33ca467..599c52e 100644 --- a/gcc/d/dmd/statementsem.c +++ b/gcc/d/dmd/statementsem.c @@ -1969,7 +1969,7 @@ public: if (ifs->match->edtor) { Statement *sdtor = new DtorExpStatement(ifs->loc, ifs->match->edtor, ifs->match); - sdtor = new OnScopeStatement(ifs->loc, TOKon_scope_exit, sdtor); + sdtor = new ScopeGuardStatement(ifs->loc, TOKon_scope_exit, sdtor); ifs->ifbody = new CompoundStatement(ifs->loc, sdtor, ifs->ifbody); ifs->match->storage_class |= STCnodtor; } @@ -3544,7 +3544,7 @@ public: result = tfs; } - void visit(OnScopeStatement *oss) + void visit(ScopeGuardStatement *oss) { if (oss->tok != TOKon_scope_exit) { diff --git a/gcc/d/dmd/visitor.h b/gcc/d/dmd/visitor.h index 8093c94..5f2bf2c 100644 --- a/gcc/d/dmd/visitor.h +++ b/gcc/d/dmd/visitor.h @@ -46,7 +46,7 @@ class SynchronizedStatement; class WithStatement; class TryCatchStatement; class TryFinallyStatement; -class OnScopeStatement; +class ScopeGuardStatement; class ThrowStatement; class DebugStatement; class GotoStatement; @@ -339,7 +339,7 @@ public: virtual void visit(WithStatement *s) { visit((Statement *)s); } virtual void visit(TryCatchStatement *s) { visit((Statement *)s); } virtual void visit(TryFinallyStatement *s) { visit((Statement *)s); } - virtual void visit(OnScopeStatement *s) { visit((Statement *)s); } + virtual void visit(ScopeGuardStatement *s) { visit((Statement *)s); } virtual void visit(ThrowStatement *s) { visit((Statement *)s); } virtual void visit(DebugStatement *s) { visit((Statement *)s); } virtual void visit(GotoStatement *s) { visit((Statement *)s); } |