Commit graph

726 commits

Author SHA1 Message Date
Martin Kinkelin
7d368925cc Merge remote-tracking branch 'origin/stable' 2025-04-12 11:55:36 +02:00
Sönke Ludwig
09ed02ce56
Fix segmentation fault on macOS 15.4 (#21176)
Strips off additional bits that are not part of the actual TLV key to avoid applications using DRuntime crashing during initialization.

Fixes #21126.
2025-04-12 11:53:18 +02:00
Dennis
4d0934d37f
merge stable (#21127)
* bump VERSION to v2.110.0

* purge changelog

* bump VERSION to v2.111.0-beta.1

* 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.

* memoryerror.d: Fix AnySupported version condition (#20983)

* Fix #20982 - wrong line number in iasmgcc (#20993)

* Move genCfunc to cxxfrontend (#20992)

* druntime: Fix compilation of rt.cover on Android (#21015)

* Expose SourceLoc to C++ interface (#20980)

* [stable] C++ header fixes for declaration, expression, and typinf (#21016)

Seen either from compilation errors or missing symbols at link time.

* C++ headers: Add 3 Declaration bitfield setters/getters required by LDC

* druntime: Add module declaration to rt.invariant, to prevent conflicts with user-provided invariant.d (#21017)

* Fix #21020 - Indexing a *cast* AA yields no lvalue anymore (#21029)

* Add C++23 to CppStdRevision enum (#21043)

* Improve UFCS/property error message (#21046)

* bump VERSION to v2.111.0-rc.1

* 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.

* Update source code and coverage links (#21111)

* 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>

* Revert "Fix #21024 - Optimize x^^c expressions (#21082)" (#21114)

This reverts commit fa1f860e4b.

* bump VERSION to v2.111.0

* purge changelog

* Strip trailing newline off sarif version

---------

Co-authored-by: Manu Evans <turkeyman@gmail.com>
Co-authored-by: Martin Kinkelin <kinke@users.noreply.github.com>
Co-authored-by: Iain Buclaw <ibuclaw@gdcproject.org>
Co-authored-by: Martin Kinkelin <noone@nowhere.com>
Co-authored-by: Fares A. Bakhit <faresa.bakhit@gmail.com>
2025-03-31 15:54:53 +02:00
Dennis Korpel
c6863be720 purge changelog 2025-03-31 13:33:57 +02:00
Dennis
cfa763d301
Turn macro translations into template functions (#21108) 2025-03-29 06:31:49 +08:00
Martin Kinkelin
b390c7ec13 [druntime] core.int128: Add 64-bit mul() overload and optimize via inline asm on x86_64 2025-03-25 16:12:24 +08:00
Dennis
31bfe613b0
Require adjacent auto ref return as well (#21061) 2025-03-23 05:59:00 +08:00
Dennis
d5db322fce
Merge stable (#21048)
* bump VERSION to v2.110.0

* purge changelog

* bump VERSION to v2.111.0-beta.1

* 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.

* memoryerror.d: Fix AnySupported version condition (#20983)

* Fix #20982 - wrong line number in iasmgcc (#20993)

* Move genCfunc to cxxfrontend (#20992)

* druntime: Fix compilation of rt.cover on Android (#21015)

* Expose SourceLoc to C++ interface (#20980)

* [stable] C++ header fixes for declaration, expression, and typinf (#21016)

Seen either from compilation errors or missing symbols at link time.

* C++ headers: Add 3 Declaration bitfield setters/getters required by LDC

* druntime: Add module declaration to rt.invariant, to prevent conflicts with user-provided invariant.d (#21017)

* Fix #21020 - Indexing a *cast* AA yields no lvalue anymore (#21029)

* Add C++23 to CppStdRevision enum (#21043)

* Improve UFCS/property error message (#21046)

---------

Co-authored-by: Manu Evans <turkeyman@gmail.com>
Co-authored-by: Martin Kinkelin <kinke@users.noreply.github.com>
Co-authored-by: Iain Buclaw <ibuclaw@gdcproject.org>
Co-authored-by: Martin Kinkelin <noone@nowhere.com>
2025-03-21 15:48:21 +01:00
Iain Buclaw
94950cae58
Add C++23 to CppStdRevision enum (#21043) 2025-03-21 08:29:14 +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
Manu Evans
6c04f52a39
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-10 04:06:29 -07:00
Dennis Korpel
ed78e9d300 Merge remote-tracking branch 'upstream/master' into stable 2025-03-09 17:10:21 +01: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
Walter Bright
73158d8a78 add Placement New 2025-03-03 16:23:02 +10:00
Dennis Korpel
efd10b140c Print function bodies instead of __lambda in error messages 2025-02-17 00:41:33 +01:00
Dennis
961862c455
Deprecate typesafe variadic class arguments (#20673) 2025-02-16 21:35:11 +01:00
Quirin F. Schroll
38f0151910
Polish changelog (#20864) 2025-02-14 08:23:16 +08:00
Dennis
06d0cfe2ba
Improve error messages for opUnary (#20801) 2025-01-30 19:44:05 +08:00
Dennis
06e0096aca
Improve opOpAssign error messages (#20800) 2025-01-30 15:04:17 +08:00
Dennis
a55dff5f28
Improve opIndex/opSlice error messages (#20791) 2025-01-28 18:44:46 +08:00
Dennis
ea9ead9cae
Improve opBinary error messages (#20789) 2025-01-28 06:23:30 +08:00
IchorDev
32883d3994
Add Windows BCrypt bindings (#20740)
* Update sdkddkver/w32api bindings

* Add BCrypt bindings

---------

Co-authored-by: IchorDev <ichordev@noreply.git.sleeping.town>
2025-01-25 16:33:27 +01:00
Dennis
096c9c1528
Make delete an identifier instead of keyword (#20745) 2025-01-21 23:33:50 +01:00
Dennis
12c1363f86
Add changelog entry for error message changes (#20753)
Co-authored-by: Dennis Korpel <dennis@sarc.nl>
2025-01-22 05:01:00 +08:00
Dennis
2a627016f6
Disallow initializing fields with themself (#20696) 2025-01-21 05:49:24 +08:00
Jonas Meeuws
d115713410
Add an assert-based segfault handler to etc.linux.memoryerror (#20643)
* Add an assert-based segfault handler to `etc.linux.memoryerror`

* Commit memoryAssertError review feedback

* Indent the MemoryErrorSupported version block

* Fix a bad ucontext_t in memoryerror.d

* Fix bad imports in memoryerror.d

* Use a module-scope version: in memoryerror.d

* Add a memoryerror.d unittest

* Prefer version-else-version... in memoryerror.d
2025-01-18 22:38:54 +01:00
Dennis
888917669c
Remove debug() / version() integers (#20713) 2025-01-16 15:20:06 +08:00
Dennis Korpel
646dc29eec Remove 'samples' folder 2025-01-11 08:12:48 +08:00
Paul Backus
99b4a5dc76 Revert "Enable -preview=fieldwise by default"
This reverts commit 6a7bd45a8e.

PR #17495 was originally merged in an incomplete state. Since there are
non-trivial obstacles to completing it, revert the incomplete changes
instead.

See PR #20670 for more information.
2025-01-09 13:38:03 -05:00
Dennis
69664b922d
Merge pull request #20577 from thewilsonator/pointer-subtract
Make subtracting pointers of different types an error
2025-01-09 15:06:33 +01:00
Nicholas Wilson
8d2fe40f4b Fix #20330 - Make subtracting pointers of different types an error 2025-01-08 15:44:38 +08:00
Denis Feklushkin
439e068588
Always accept .o and .obj files (#20609) 2025-01-08 14:05:32 +08:00
Quirin F. Schroll
3f90de47c1
Fixes #20587 - Add align(default) (#20589) 2024-12-30 13:02:14 +08:00
Nicholas Wilson
8b90e07991
Add newline at EOF for changelog dmd.objc-improvements.dd (#20563) 2024-12-16 06:47:06 +08:00
The Dlang Bot
059b1ab407
Merge pull request #20559 from KitsunebiGames/objc
Objective-C Improvements

Signed-off-by: Dennis <dkorpel@users.noreply.github.com>
Signed-off-by: Nicholas Wilson <thewilsonator@users.noreply.github.com>
Merged-on-behalf-of: Dennis <dkorpel@users.noreply.github.com>
2024-12-15 22:48:39 +01:00
Walter Bright
a99a3894be
add __rvalue(expression) builtin (#17050) 2024-12-15 12:13:28 -08:00
LunaTheFoxgirl
bfa9192eb4 Add changelog 2024-12-15 19:03:06 +01:00
Paul Backus
6a7bd45a8e Enable -preview=fieldwise by default
Introduced in PR #9331, this was changed from a normal bug fix to a
-preview switch because enabling it triggered a suprious "statement is
not reachable" warning in Phobos. That warning has since been removed
(in PR #15568).
2024-12-08 21:19:17 +01:00
Nick Treleaven
a7f6b04a0c
Don't allow short constructor with non-void expression except this() and super() (#17489) 2024-12-08 17:21:42 +08:00
Nick Treleaven
a13b00fab1
Improve -preview=safer changelog entry (#17490) 2024-12-08 15:54:18 +08:00
Dennis Korpel
56eb579a45 Allow shortened method syntax for constructors 2024-12-04 12:16:44 +01:00
Dennis Korpel
74c40e9be0 Merge branch 'stable' into master 2024-11-29 12:46:40 +01:00
Richard (Rikki) Andrew Cattermole
6567f6f4a4 Fix bugzilla issue 24882 - COM class is allocated using GC not malloc 2024-11-29 08:37:07 +01:00
Walter Bright
347c883586
Implement Safer D (#17044) 2024-11-27 22:59:29 -08:00
Walter Bright
b70e66033c
add __traits getBitfieldOffset and getBitfieldWidth (#17043) 2024-11-10 20:22:59 +01:00
Nick Treleaven
74a18b0953 Add link to new ref item 2024-10-25 15:20:54 +08:00
Nick Treleaven
d6149fdf0f Fix TT 2024-10-25 15:20:54 +08:00
Nick Treleaven
817ecde722 Fix link 2024-10-25 15:20:54 +08:00
Quirin F. Schroll
26727f988f Rename mixin-assign.dd to dmd.mixin-assign.dd 2024-09-29 13:04:26 +08:00