Commit graph

40453 commits

Author SHA1 Message Date
Iain Buclaw
a6b3751b19
fix #21153 - [REG 2.111.0] Infinite loop in isAliasThisTuple (#21154) 2025-04-06 07:31:30 +08:00
Martin Kinkelin
ed17b3e95d
Fix #21098 (#21132)
By reverting #10718 - it seems superfluous nowadays?
2025-04-02 07:42:03 +08:00
Martin Kinkelin
dbe0ddbde6
[stable] build.d: Fix VERSION fallback if git describe fails (#21133)
* build.d: Fix VERSION fallback if `git describe` fails

Which can fail for *shallow* git clones, as used for GitHub Actions.

* [apply to config.d as well; e.g., used by Visual Studio project]
2025-04-01 22:10:37 +02:00
Dennis Korpel
c6863be720 purge changelog 2025-03-31 13:33:57 +02:00
Dennis Korpel
c403accecf bump VERSION to v2.111.0 2025-03-31 12:17:24 +02:00
Dennis
8dcef66a5f
Revert "Fix #21024 - Optimize x^^c expressions (#21082)" (#21114)
This reverts commit fa1f860e4b.
2025-03-29 12:25:53 +01:00
Fares A. Bakhit
fa1f860e4b
Fix #21024 - Optimize x^^c expressions (#21082)
* Fix #21024 - Optimize x^^c expressions

Reason for the *magic* constraint c<8 on inlining x^^c:

https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/x86_64/fpu/e_powl.S;h=47f129f34d368d7c67b8e5f2462b36b0bebb7621;hb=HEAD#l136

* Fix poor assumption about expression state

* Restrict optimization to floating point expressions

* Generalize optimization to any scalar data type

* Fix segfault on x^^c where x is a single member anonymous enum

DMD segfaulted on compiling the unittests in std/algorithm/sorting.o, the
unittest that caused the segfault can be reduced to:

    enum real Two = 2.0;
    auto _ = Two^^3;

I'm not sure why copying the anonymous enum into a `const` variable causes
the compiler to segfault.

* Add tests to x^^c inlining optimization

* Fix missing type for e1 ^^ -1 to 1 / e1 rewrite

* Move rewrites from constant folding to expression semantic and restrict them to [-1, 2]

* Improve error message for the x^^2 rewrite.

Before:
    ex.d(4): Error: can implicitly convert expression `(const const(double) __powtmp2 = x + 5.0;) , __powtmp2 * ...` of type `double` to `int`
        int y = ( x + 5 ) ^^ 2;
                ^
and after:
    ex.d(4): Error: cannot implicitly convert expression `(x + 5.0) ^^ 2L` of type `double` to `int`
        int y = ( x + 5 ) ^^ 2;
                ^

* Update C++ frontend header to match change in `CommaExp`

* Address code review feedback

Co-authored-by: Dennis Korpel <dkorpel@gmail.com>

---------

Co-authored-by: Dennis Korpel <dkorpel@gmail.com>
2025-03-29 12:13:38 +01:00
Fares A. Bakhit
d65a100b6c
Update source code and coverage links (#21111) 2025-03-29 10:57:56 +08:00
Iain Buclaw
02a64d2e13
Fix #21045 - import __stdin causes compilation to pause while reading from stdin (#21047)
Moves the special handling of reading from stdin out of the semantic
routines to the DMD driver itself. All references to `__stdin.d` have
also been removed from the frontend implementation.
2025-03-22 13:00:35 +01:00
Dennis Korpel
032e24446b bump VERSION to v2.111.0-rc.1 2025-03-21 20:27:52 +01:00
Dennis
9d2f034398
Improve UFCS/property error message (#21046) 2025-03-21 15:15:29 +01:00
Iain Buclaw
94950cae58
Add C++23 to CppStdRevision enum (#21043) 2025-03-21 08:29:14 +08:00
Martin Kinkelin
8db14cf846
Fix #21020 - Indexing a *cast* AA yields no lvalue anymore (#21029) 2025-03-19 07:15:23 +08:00
Martin Kinkelin
6d57da76e4
druntime: Add module declaration to rt.invariant, to prevent conflicts with user-provided invariant.d (#21017) 2025-03-18 07:42:46 +08:00
Martin Kinkelin
fde0f8c40a C++ headers: Add 3 Declaration bitfield setters/getters required by LDC 2025-03-17 15:30:21 +01:00
Iain Buclaw
7f22e651ed
[stable] C++ header fixes for declaration, expression, and typinf (#21016)
Seen either from compilation errors or missing symbols at link time.
2025-03-17 22:19:12 +08:00
Iain Buclaw
8c9769fef4
Expose SourceLoc to C++ interface (#20980) 2025-03-17 22:17:16 +08:00
Martin Kinkelin
d2ee11364c
druntime: Fix compilation of rt.cover on Android (#21015) 2025-03-17 15:06:24 +01:00
Dennis
57a60e575c
Move genCfunc to cxxfrontend (#20992) 2025-03-17 06:40:49 +08:00
Dennis
d5e6f49098
Fix #20982 - wrong line number in iasmgcc (#20993) 2025-03-15 20:16:44 +01:00
Dennis
51be8bb729
memoryerror.d: Fix AnySupported version condition (#20983) 2025-03-14 07:13:44 +08:00
Manu Evans
603225372b Accept __rvalue attribute on ref functions; which will force the result to be treated as __rvalue. (#20946)
This is essential to implement `move`, `forward`, etc.
2025-03-11 14:12:06 +10:00
Dennis Korpel
c6e387c448 bump VERSION to v2.111.0-beta.1 2025-03-09 17:10:49 +01:00
Dennis Korpel
ed78e9d300 Merge remote-tracking branch 'upstream/master' into stable 2025-03-09 17:10:21 +01:00
Walter Bright
4ad88c4b11
successfully run exe1.c elemi() test (#20969) 2025-03-09 16:39:25 +08:00
Walter Bright
d1f5972b54
getting first two tests in exe1.c to run (#20968) 2025-03-08 22:49:35 -08:00
Walter Bright
8812065e8b
fix #20960 i = i && 1; fails at runtime (#20961) 2025-03-07 11:42:12 +08:00
Walter Bright
4c4b9aef4d
detab source code (#20962) 2025-03-07 10:31:19 +08:00
Walter Bright
42619075eb
add exe1.c to test suite (#20957) 2025-03-06 12:25:59 -08:00
Walter Bright
b02be83f5c
fix 64 bit Arm relocations (#20951) 2025-03-06 12:24:21 -08:00
Dennis
4661fec6b7
Update copyright years to 2025 (#20958) 2025-03-06 18:17:32 +08:00
Matthew Qiu
325ef115e8
Move ClassDeclaration.vtblSymbol to dsymbolsem (#20956) 2025-03-06 16:02:40 +08:00
Matthew Qiu
57e7419c4d
Moved StaticForeach.lowerArrayAggregate to expressionsem (#20955) 2025-03-06 15:59:41 +08:00
Quirin F. Schroll
cc6f184a66
Improve placement new changelog entry (#20954) 2025-03-06 15:58:46 +08:00
Dennis Korpel
5ed96a59b3 purge changelog 2025-03-05 15:33:12 +01:00
Dennis Korpel
d5fa6e0629 bump VERSION to v2.110.0 2025-03-05 12:28:07 +01:00
Nicholas Wilson
ee6449ded0
Merge pull request #20952 from dkorpel/merge-stable
Merge stable
2025-03-05 19:00:22 +08:00
Dennis Korpel
5375db4f76 Merge branch 'stable' into merge-stable 2025-03-05 11:03:30 +01:00
Matthew Qiu
6df52b0ef2
Move ClassDeclaration.isFuncHidden to dsymbolsem (#20945) 2025-03-05 16:18:53 +08:00
Matthew Qiu
bc4c7e4452
Move Dsymbol.hasStaticCtorOrDtor to dsymbolsem (#20943) 2025-03-05 06:23:33 +08:00
Walter Bright
ddc7eaf570
another pass over movParams() (#20949) 2025-03-04 18:39:08 +08:00
Walter Bright
eb95108dfb
2nd go at funccall() for AArch64 (#20948) 2025-03-04 17:06:41 +08:00
Matthew Qiu
58d3b59dc5
Moved Staticforeach.lowerNonArrayAggregate and Staticforeach.prepare to expressionsem (#20944) 2025-03-04 17:05:02 +08:00
Walter Bright
5cd254f9e0
go over cdfunc() for AArch64 (#20941) 2025-03-03 10:51:34 -08:00
Manu Evans
37469bfae8
Merge pull request #17057 from WalterBright/placementNew
add Placement New
2025-03-03 19:50:22 +10:00
Walter Bright
ac045cf7a4
rewrite fixresult() for AArch64 (#20940) 2025-03-03 00:13:56 -08:00
Walter Bright
73158d8a78 add Placement New 2025-03-03 16:23:02 +10:00
Walter Bright
a9666925cc
tidy up cdloglog() (#20939) 2025-03-02 21:45:27 -08:00
Walter Bright
cdf4f5b072
implement floating point negation (#20934) 2025-03-02 15:52:40 -08:00
Walter Bright
ab57e77c03
recognize (e ? e : f) (#20935) 2025-03-02 11:03:44 -08:00