Skip to content

Commit c9ae68f

Browse files
committed
d: Merge upstream dmd f4be7f6f7b.
D front-end changes: - Fix bootstrap failure with i686-darwin9. ``` Undefined symbols for architecture i386: "gendocfile", referenced from: __ZL20d_generate_ddoc_fileP6ModuleR9OutBuffer in d-lang.o ld: symbol(s) not found for architecture i386 ``` gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd f4be7f6f7b. * Make-lang.in (D_FRONTEND_OBJS): Rename d/root-rootobject.o to d/rootobject.o.
1 parent 80ddcb9 commit c9ae68f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+375
-468
lines changed

gcc/d/Make-lang.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,11 @@ D_FRONTEND_OBJS = \
174174
d/root-port.o \
175175
d/root-region.o \
176176
d/root-rmem.o \
177-
d/root-rootobject.o \
178177
d/root-speller.o \
179178
d/root-string.o \
180179
d/root-stringtable.o \
181180
d/root-utf.o \
181+
d/rootobject.o \
182182
d/safe.o \
183183
d/sapply.o \
184184
d/semantic2.o \

gcc/d/dmd/MERGE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
4c18eed9674e04c1ca89fbc8bd5c4e483eb5477c
1+
f4be7f6f7bae75f1613b862940cdd533b5ae99b2
22

33
The first line of this file holds the git revision number of the last
44
merge done from the dlang/dmd repository.

gcc/d/dmd/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ Note that these groups have no strict meaning, the category assignments are a bi
8484
| [astcodegen.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/astcodegen.d) | Namespace of AST nodes of a AST ready for code generation |
8585
| [astenums.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/astenums.d) | Enums common to DMD and AST |
8686
| [expression.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/expression.d) | Define expression AST nodes |
87+
| [rootobject.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/rootobject.d) | Define an abstract root class |
8788
| [statement.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/statement.d) | Define statement AST nodes |
8889
| [staticassert.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/staticassert.d) | Define a `static assert` AST node |
8990
| [aggregate.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/aggregate.d) | Define an aggregate (`struct`, `union` or `class`) AST node |

gcc/d/dmd/arraytypes.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import dmd.identifier;
2222
import dmd.init;
2323
import dmd.mtype;
2424
import dmd.root.array;
25-
import dmd.root.rootobject;
25+
import dmd.rootobject;
2626
import dmd.statement;
2727

2828
alias Strings = Array!(const(char)*);

gcc/d/dmd/ast_node.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111
module dmd.ast_node;
1212

13-
import dmd.root.rootobject : RootObject;
13+
import dmd.rootobject : RootObject;
1414
import dmd.visitor : Visitor;
1515

1616
/// The base class of all AST nodes.

gcc/d/dmd/blockexit.d

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -151,14 +151,7 @@ int blockExit(Statement s, FuncDeclaration func, ErrorSink eSink)
151151
}
152152
}
153153

154-
if (!(result & BE.fallthru) && !s.comeFrom())
155-
{
156-
version (none) // this warning is completely useless due to insane false positive rate in real life template code
157-
if (blockExit(s, func, eSink) != BE.halt && s.hasCode() &&
158-
s.loc != Loc.initial) // don't emit warning for generated code
159-
global.errorSink.warning(s.loc, "statement is not reachable");
160-
}
161-
else
154+
if ((result & BE.fallthru) || s.comeFrom())
162155
{
163156
result &= ~BE.fallthru;
164157
result |= blockExit(s, func, eSink);
@@ -447,17 +440,6 @@ int blockExit(Statement s, FuncDeclaration func, ErrorSink eSink)
447440
blockExit(s.finalbody, func, eSink);
448441
}
449442

450-
version (none)
451-
{
452-
// https://issues.dlang.org/show_bug.cgi?id=13201
453-
// Mask to prevent spurious warnings for
454-
// destructor call, exit of synchronized statement, etc.
455-
if (result == BE.halt && finalresult != BE.halt && s.finalbody && s.finalbody.hasCode())
456-
{
457-
eSink.warning(s.finalbody.loc, "statement is not reachable");
458-
}
459-
}
460-
461443
if (!(finalresult & BE.fallthru))
462444
result &= ~BE.fallthru;
463445
result |= finalresult & ~BE.fallthru;

gcc/d/dmd/cond.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import dmd.location;
3030
import dmd.mtype;
3131
import dmd.typesem;
3232
import dmd.common.outbuffer;
33-
import dmd.root.rootobject;
33+
import dmd.rootobject;
3434
import dmd.root.string;
3535
import dmd.tokens;
3636
import dmd.utils;

gcc/d/dmd/cppmangle.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import dmd.mtype;
4242
import dmd.nspace;
4343
import dmd.root.array;
4444
import dmd.common.outbuffer;
45-
import dmd.root.rootobject;
45+
import dmd.rootobject;
4646
import dmd.root.string;
4747
import dmd.target;
4848
import dmd.typesem;

gcc/d/dmd/declaration.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import dmd.intrange;
3737
import dmd.location;
3838
import dmd.mtype;
3939
import dmd.common.outbuffer;
40-
import dmd.root.rootobject;
40+
import dmd.rootobject;
4141
import dmd.target;
4242
import dmd.tokens;
4343
import dmd.typesem;

gcc/d/dmd/dinterpret.d

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ import dmd.root.rmem;
4444
import dmd.root.array;
4545
import dmd.root.ctfloat;
4646
import dmd.root.region;
47-
import dmd.root.rootobject;
47+
import dmd.rootobject;
4848
import dmd.root.utf;
4949
import dmd.statement;
5050
import dmd.tokens;
@@ -4965,6 +4965,22 @@ public:
49654965

49664966
override void visit(CommaExp e)
49674967
{
4968+
/****************************************
4969+
* Find the first non-comma expression.
4970+
* Params:
4971+
* e = Expressions connected by commas
4972+
* Returns:
4973+
* left-most non-comma expression
4974+
*/
4975+
static inout(Expression) firstComma(inout Expression e)
4976+
{
4977+
Expression ex = cast()e;
4978+
while (ex.op == EXP.comma)
4979+
ex = (cast(CommaExp)ex).e1;
4980+
return cast(inout)ex;
4981+
4982+
}
4983+
49684984
debug (LOG)
49694985
{
49704986
printf("%s CommaExp::interpret() %s\n", e.loc.toChars(), e.toChars());

0 commit comments

Comments
 (0)