-
-
Notifications
You must be signed in to change notification settings - Fork 273
Merge 2.074 front-end + libs #2076
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
f70a51a
Merge 2.074.0 front-end
kinke 83c9d66
druntime: Remove obsolete OSX code in rt.sections_ldc
kinke 0a11aa8
druntime: Fix rt.sections_elf_shared regression
kinke 708486d
druntime: Fix __cmp(void[], void[])
kinke 1e11275
dmd-testsuite: Fix compile error for runnable/ldc_enum
kinke 15e565e
Support cast runtime variables as case expressions
kinke fe3d36a
druntime: Fix rt.arrayint (RAX instead of EAX for 64-bit inline asm)
kinke a5fe1ab
Phobos: Fix missing alignment for kernighan_ritchie allocator unittests
kinke 6ac98e3
Merge branch 'master' into merge-2.074
kinke bcec3d2
dmd-testsuite: Disable Windows-specific runnable/testptrref
kinke a966f22
druntime: Make LDC-specific fiber migration check @nogc
kinke 0637caa
Phobos: Relax a few unittests for double-precision reals
kinke 291c2a6
Merge branch 'master' into merge-2.074
kinke 60285b7
Phobos: Apply upstream SSE control register fixes
kinke 0ae2a95
Phobos: Tiny std.math inline assembly constraints fixes
kinke 51f1b13
druntime: Mark dladdr() as @nogc for OSX
kinke 6a44d57
Support DMD's new undocumented -vcg-ast switch
kinke a3025b0
druntime: Adapt core.memory to LLVM optimizer cleverness
kinke ff33356
Phobos: Disable some new std.math tests affected by issue #888
kinke 85e004f
Merge branch 'master' into merge-2.074
kinke 090031c
Upgrade front-end + libs to v2.074.1
kinke 45eacd0
Merge branch 'master' into merge-2.074
kinke 03d8034
Fix Target.RealProperties potentially aliasing Target.DoubleProperties
kinke 6036769
Merge branch 'master' into merge-2.074
kinke a0a20cd
Merge branch 'master' into merge-2.074
kinke 8a3188d
Merge branch 'master' into merge-2.074
kinke cd45257
Merge branch 'master' into merge-2.074
kinke 66241ab
Merge branch 'master' into merge-2.074
kinke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,115 @@ | ||
| /** | ||
| * Part of the Compiler implementation of the D programming language | ||
| * Copyright: Copyright (c) 1999-2017 by The D Language Foundation, All Rights Reserved | ||
| * Authors: Stefan Koch | ||
| * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) | ||
| * Source: $(DMDSRC _asttypename.d) | ||
| */ | ||
|
|
||
| module ddmd.asttypename; | ||
|
|
||
| import ddmd.attrib; | ||
| import ddmd.aliasthis; | ||
| import ddmd.aggregate; | ||
| import ddmd.complex; | ||
| import ddmd.cond; | ||
| import ddmd.ctfeexpr; | ||
| import ddmd.dclass; | ||
| import ddmd.declaration; | ||
| import ddmd.denum; | ||
| import ddmd.dimport; | ||
| import ddmd.declaration; | ||
| import ddmd.dstruct; | ||
| import ddmd.dsymbol; | ||
| import ddmd.dtemplate; | ||
| import ddmd.dversion; | ||
| import ddmd.expression; | ||
| import ddmd.func; | ||
| import ddmd.denum; | ||
| import ddmd.dimport; | ||
| import ddmd.dmodule; | ||
| import ddmd.mtype; | ||
| import ddmd.typinf; | ||
| import ddmd.identifier; | ||
| import ddmd.init; | ||
| import ddmd.doc; | ||
| import ddmd.root.rootobject; | ||
| import ddmd.statement; | ||
| import ddmd.staticassert; | ||
| import ddmd.nspace; | ||
| import ddmd.visitor; | ||
|
|
||
| /// Returns: the typename of the dynamic ast-node-type | ||
| /// (this is a development tool, do not use in actual code) | ||
| string astTypeName(RootObject node) | ||
| { | ||
| final switch (node.dyncast()) | ||
| { | ||
| case DYNCAST.object: | ||
| return "RootObject"; | ||
| case DYNCAST.identifier: | ||
| return "Identifier"; | ||
|
|
||
| case DYNCAST.expression: | ||
| return astTypeName(cast(Expression) node); | ||
| case DYNCAST.dsymbol: | ||
| return astTypeName(cast(Dsymbol) node); | ||
| case DYNCAST.type: | ||
| return astTypeName(cast(Type) node); | ||
| case DYNCAST.tuple: | ||
| return astTypeName(cast(Tuple) node); | ||
| case DYNCAST.parameter: | ||
| return astTypeName(cast(Parameter) node); | ||
| case DYNCAST.statement: | ||
| return astTypeName(cast(Statement) node); | ||
| case DYNCAST.condition: | ||
| return astTypeName(cast(Condition) node); | ||
| } | ||
| } | ||
|
|
||
| mixin | ||
| ({ | ||
| string astTypeNameFunctions; | ||
| string visitOverloads; | ||
|
|
||
| foreach (ov; __traits(getOverloads, Visitor, "visit")) | ||
| { | ||
| static if (is(typeof(ov) P == function)) | ||
| { | ||
| static if (is(P[0] S == super) && is(S[0] == RootObject)) | ||
| { | ||
| astTypeNameFunctions ~= ` | ||
| string astTypeName(` ~ P[0].stringof ~ ` node) | ||
| { | ||
| scope tsv = new AstTypeNameVisitor; | ||
| node.accept(tsv); | ||
| return tsv.typeName; | ||
| } | ||
| `; | ||
| } | ||
|
|
||
| visitOverloads ~= ` | ||
| override void visit (` ~ P[0].stringof ~ ` _) | ||
| { | ||
| typeName = "` ~ P[0].stringof ~ `"; | ||
| } | ||
| `; | ||
| } | ||
| } | ||
|
|
||
| return astTypeNameFunctions ~ ` | ||
| extern(C++) final class AstTypeNameVisitor : Visitor | ||
| { | ||
| alias visit = super.visit; | ||
| public : | ||
| string typeName; | ||
| ` ~ visitOverloads ~ "}"; | ||
| }()); | ||
|
|
||
| /// | ||
| unittest | ||
| { | ||
| import ddmd.globals : Loc; | ||
| Expression e = new TypeidExp(Loc.init, null); | ||
| assert(e.astTypeName == "TypeidExp"); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will need to be checked, i.e., whether a proper fix preventing the same field from being added multiple times to the fields list has made it into upstream 2.074.