Skip to content
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

Upgrade front-end & libs to v2.086.0 #3062

Merged
merged 17 commits into from
May 9, 2019
Merged

Conversation

kinke
Copy link
Member

@kinke kinke commented Apr 22, 2019

No description provided.

@kinke
Copy link
Member Author

kinke commented Apr 24, 2019

lit-test codegen/union.d fails due to a frontend regression wrt. union initializers: https://issues.dlang.org/show_bug.cgi?id=19822

The `__ArrayCast` lowering isn't (always?) done when casting a static
array to a slice with different element size.
So exploit constant source lengths and compute the target length at
compile-time.

This fixes compilable/ldc_github_421.d - a float[16] can be cast to a
float4[] with constant length 4.
Invoke _d_newThrowable for exception allocation & initialization, and
increase the reference count in LDC-specific _d_throw_exception for MSVC
targets. Fixes runnable/test19317.d.
By converting the real_t to a `double` and repainting that value.
E.g., this fixes druntime-test-hash for MSVC targets;
core.internal.hash.hashOf!(real) reinterprets a 64-bit (target) `real`
as `ulong`, and that code path is taken at CTFE too.
@kinke
Copy link
Member Author

kinke commented Apr 27, 2019

Looking pretty good. Remaining issues:

@John-Colvin
Copy link
Contributor

Is there an ETA on this? No hurry, but ideally I would like to be able to plan around a rough time when a beta will be available.

@kinke
Copy link
Member Author

kinke commented May 3, 2019

The union regression was fixed upstream.
The aggregate invariants + auto function issue needs analysis (just LDC affected by horrible AST inconsistency or DMD too?) but is no blocker IMO (so I might just revert the relevant DMD commit for the time being).

@kinke kinke changed the title [WIP] Upgrade front-end & libs to v2.086.0-beta.1 [WIP] Upgrade front-end & libs to v2.086.0-rc.2 May 4, 2019
@kinke
Copy link
Member Author

kinke commented May 5, 2019

The runnable/test19731.d issue seems to be the following: dlang/dmd#9467 may replace an already sema3'd member function by a 'clone' (and redoing semantic, so that the new function contains the invariant calls). Cloning is performed via FuncDeclaration.syntaxCopy(), which leads to a syntaxCopy of the function body, and so to a syntaxCopy of a ThisExp for the testcase. There's no syntaxCopy override in ThisExp, so the VarDeclaration ThisExp.var member is NOT adjusted, and will point to a VarDeclaration in the old, replaced function. There seem to be more Expressions with similar syntaxCopy() behavior, i.e., not expecting to be syntaxCopied into another function.

@kinke kinke changed the title [WIP] Upgrade front-end & libs to v2.086.0-rc.2 [WIP] Upgrade front-end & libs to v2.086.0 May 5, 2019
kinke added 2 commits May 5, 2019 15:19
expressionSemantic() for a ThisExp doesn't just set its type (and do
nothing if it's already set), but may also set the ThisExp.var
VarDeclaration. This crucial step was previously skipped after
syntaxCopying an already analyzed ThisExp, as a later
expressionSemantic() for that copy was a no-op and `var` still pointed
to the original one.

This fixes runnable/test19731.d, as dlang/dmd#9467 may lead to a
syntaxCopy of a sema3'd FuncDeclaration, and that copy replacing the
original function. A ThisExp's `var` still pointed to the variable in
the original function, so LDC assumed it was a nested variable and
failed to find a matching parent function.
@kinke kinke changed the title [WIP] Upgrade front-end & libs to v2.086.0 Upgrade front-end & libs to v2.086.0 May 5, 2019
@kinke kinke merged commit 7474c19 into ldc-developers:master May 9, 2019
@kinke kinke deleted the merge-2.086 branch May 9, 2019 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants