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
merge stable #11027
Merged
Merged
merge stable #11027
Conversation
This file contains 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
Member
MartinNowak
commented
Apr 12, 2020
- bump VERSION to v2.091.1-beta.1
- Handle mixin expressions as assert conditions
- Fix misc. issues wrt. temporaries for -checkaction=context lowering
- Fix Issue 18651 - ice: assert in glue.d:777 when building these three… (Fix Issue 18651 - ice: assert in glue.d:777 when building these three… #10960)
- Fix issue 20700 - Fwd refs leads to extern(C++, class|struct) being ignored
- Revert "Fix Issue 20687 - Allow member function address as const initializer"
- Fix Issue 20692 - Nested alias declarations and getMember trait can crash dmd
- Fix Issue 20687 - Allow member function address as const initializer
- Fix Issue 20130 - ICE when casting from string to other array type due to __ArrayCast not being written
- Fix Issue 20610 - const in a .tupleof loop is ignored
- Fix Issue 20656 - cannot compile live function without -preview=dip1021
- Set the DMD binary as executable
- Fix Issue 20649 - Trait isZeroInit gives false in certain scenarios
- Follow-up on Fix Issue 17181 - Local imports in templates should be added to impor… #9221
[stable] Follow-up on dlang#9221 merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
Fix Issue 20649 - Trait isZeroInit gives false in certain scenarios merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
The dmd binary must have permission to be executable otherwise it would be impossible to launch it without manually setting permissions. This patch sets the 644 permission by default for all the other files installed through installRelativeFiles while the 755 permissions will be set for the dmd binary. This fixes the issue #20662
(Fix #20662) Set the DMD binary as executable merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
Fix Issue 20610 - const in a .tupleof loop is ignored merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
…e to __ArrayCast not being written
Fix Issue 20130 - ICE when casting from string to other array type du… merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
Fix Issue 20656 - cannot compile live function without -preview=dip1021 merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
Fix Issue 20687 - Allow member function address as const initializer merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
Fix Issue 20692 - Nested alias declarations and getMember trait can c…
…gnored `Type`-derived AST nodes do not support the same kind of semantic analysis that `Dsymbol`-derived one do. The issue was that in some codes, semantic analysis on the type was performed before it was performed on the declaration, and chasing those cases turned out to be endless, hence the minor refactoring.
[stable] Fix issue 20700 - Forward references leads to extern(C++, class|struct) being ignored merged-on-behalf-of: unknown
dlang#10960) Fix Issue 18651 - ice: assert in glue.d:777 when building these three… merged-on-behalf-of: Mathias LANG <pro.mathias.lang@gmail.com>
The early expression sema of `exp.e1`, the assert condition, was a major problem. E.g.: ``` struct S { int a; this(this) {} bool opEquals(S) @safe { return true; } } void foo() { S a; assert(S() == a); // S().opEquals(a) } ``` Here, an lvalue `a` is passed to `S.opEquals()`, which takes the arg by value. The early `CallExp` sema already lowers the argument expression `a` to a temporary, to something like `S __copytmp = (__copytmp = a).__postblit()`. *That* expression (instead of `a`) was previously stored as a further `__assertOp` temporary, and the original argument replaced by that temporary (without postblit). Previous lowering: assert(S(0).opEquals(((S __assertOp3 = (S __copytmp2 = (__copytmp2 = a).__postblit();) , __assertOp3 = __copytmp2;) , __assertOp3)), _d_assert_fail(S(0), __assertOp3)); New lowering: assert(S(0).opEquals(((S __copytmp2 = (__copytmp2 = a).__postblit();) , __copytmp2)), _d_assert_fail(S(0), a)); A related 2nd issue concerns rvalue arguments - the early `CallExp` sema detects that no temporary is needed (move; elide postblit and dtor in the caller); the rvalue was previously correctly stored as `__assertOp` temporary, but as it is now an lvalue (possibly accessed a 2nd time for the `_d_assert_fail()` call if the assertion fails), it must be copied + postblitted. This can be fixed by deferring the `CallExp` sema until the arguments have been replaced by required temporaries (and hence possibly promoted from rvalues to lvalues). void rval() { static S nonPure() { __gshared int counter; ++counter; return S(123); } assert(S() == nonPure()); } Previous lowering: assert(S(0).opEquals(((S __assertOp12 = nonPure();) , __assertOp12)), _d_assert_fail(S(0), __assertOp12)); New lowering: (S __assertOp11 = nonPure();) , assert(S(0).opEquals(((S __copytmp12 = (__copytmp12 = __assertOp11).__postblit();) , __copytmp12)), _d_assert_fail(S(0), __assertOp11));
For druntime's test/exceptions/src/assert_fail.d.
[stable] Fix misc. issues wrt. temporaries for -checkaction=context lowering merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
…d errors occurred in compilation When running semantic on __traits(compiles), errors are gagged, so the saved errors count is global.gaggedErrors, and not global.errors. So the condition always evaluated as true if any real errors occured during compilation, and every subsequent __traits(compiles) errors too, whether it is valid syntax or not.
fix Issue 20730 - [REG 2.091] __traits(compiles) fails if any ungagged errors occurred in compilation merged-on-behalf-of: Rainer Schuetze <rainers@users.noreply.github.com>
The const flag being set on the return type triggered switch errors
Thanks for your pull request, @MartinNowak! Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + dmd#11027" |
Cleaning up after dlang#10952 and dlang#10988.
Remove qualifiers from toPrec return type merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
Fix for the druntime issue: dlang/druntime#3029 |
[stable] 2 small frontend fix-ups after v2.091.0 merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
PR dlang#6621 took the code for pending `ConditionalDeclaration`s from doc.d but missed the early return.
MartinNowak
force-pushed
the
merge_stable
branch
from
April 18, 2020 16:44
81ac69d
to
52de7dd
Compare
Another one: dlang/druntime#3044 |
Fix Issue 20742 - dmd -X (JSON output) includes uncompiled symbols merged-on-behalf-of: Steven Schveighoffer <schveiguy@users.noreply.github.com>
Needs a rebase |
Conflicts: test/fail_compilation/fob2.d
Done |
MoonlightSentinel
approved these changes
Apr 21, 2020
DlangBot is AFK again? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.