Commit graph

677 commits

Author SHA1 Message Date
Quirin F. Schroll
26727f988f Rename mixin-assign.dd to dmd.mixin-assign.dd 2024-09-29 13:04:26 +08:00
Quirin F. Schroll
2d8ab65540 Changelog for solving Issue 21564 2024-09-29 13:04:26 +08:00
Nicholas Wilson
3bcdd191d2 Add expect and trap to core.builtins
This exists mostly as a way to harmonise between the different spellings of the same concepts in LDC and GDC, rather than to provide a useful implementation from DMD.
2024-09-18 15:18:59 +01:00
Tim Schendekehl
0e8e67097d
Fix bugzilla 23812 - ImportC: allow adding function attributes to imported C functions (#16820)
This adds a new pragma for ImportC, which allows to set default storage
classes. Only `nothrow`, `@nogc` and `pure` are supported for now.
They can be disabled later using `#pragma attribute(pop)`.

Unknown storage classes are ignored.
2024-09-14 10:58:00 -07:00
Dennis Korpel
64df340150 Fix bugzilla 24748 - DMD can't output object files with fully qualified name, making -od overwirte each other file 2024-09-13 15:38:28 +01:00
Amaury Séchet
cbbc96f5b1 Remove criticalRegionLock
1. It is unused.
2. It doesn't provide the guarantee one think it does. See https://issues.dlang.org/show_bug.cgi?id=24741
2024-09-03 23:47:00 +02:00
Nicholas Wilson
0834c750aa
[Deprecation -> Error] nothrow function contracts that throw (#16801) 2024-08-26 11:36:18 +03:00
Quirin F. Schroll
97b71f1c2a
Reword dmd.auto-ref-adjacent.dd (#16786) 2024-08-25 08:43:53 +08:00
Nicholas Wilson
df377af9fe
[Deprecation -> Error] destructor field attributes (#16802) 2024-08-22 09:35:39 +03:00
Nicholas Wilson
0276d7e50a
Remove deprecation for bugzilla 22999 (#16800) 2024-08-21 10:01:48 +03:00
Dennis Korpel
ae2dc11619 Require adjacent auto ref keywords 2024-08-15 00:18:12 +02:00
ryuukk
05b2c0dfe2
Fix bugzilla issue 24669 - Make -i work with C modules (#16776) 2024-08-11 19:34:17 +08:00
Quirin F. Schroll
8dabb67ee5
Update dmd.reflocal.dd to include auto ref (#16772) 2024-08-11 12:59:07 +02:00
Dennis
04025fdba6
Add --ftime-trace to dmd (#16363)
* Add --ftime-trace to dmd

* Refactor timetrace code for dmd.

Pass Outbuffer by ref,
move timetrace filename logic to main.d
2024-07-29 14:48:03 +02:00
Walter Bright
dc1daca611
allow ref on locals, globals, and statics (#16428)
* allow ref on locals, globals, and statics

* add const to opEquals() overrides
2024-07-23 14:42:15 -07:00
Nick Treleaven
3c13c3c548
[.di generation] Show TypeCtor method attributes after parameters (#16732)
* [.di generation] Show TypeCtor method attributes after parameters

Follow up to https://github.com/dlang/dmd/pull/16708.

* Add changelog
2024-07-20 16:01:45 +02:00
Dennis Korpel
25f26e2bdf Treat import("file") as hex string 2024-07-01 01:21:36 +02:00
Nick Treleaven
5cfc340fc0
Update changelog for unsafe bool expressions (#16624)
The original changelog item was added to stable after 2.109.0, so will
appear in 2.109.1:
https://dlang.org/changelog/2.109.1.html#dmd.unsafe-boolean-values

However, fewer people may see point release changelogs, so its worth
repeating those for 2.110 IMO.

This also adds new items.
2024-06-26 20:57:35 +08:00
Nick Treleaven
c6058f9b76
Fix Bugzilla 17148 - Copying from const(void)[] to void[] breaks immu… (#16583) 2024-06-17 17:11:52 +08:00
Nick Treleaven
6c6a89e79f
[stable] Update changelog for unsafe bool values (#16560)
* Update changelog for unsafe bool values

* Casting to bool is actually safe
2024-06-04 10:35:53 +03:00
Iain Buclaw
09210fdd1b purge changelog 2024-06-02 00:29:25 +00:00
Nick Treleaven
23f6757be9
Add changelog for #16334 (#16470) 2024-05-10 17:03:18 +02:00
Dennis
109dddb649
Fix error message in deprecation-limit.dd (#16471) 2024-05-10 17:02:53 +02:00
Walter Bright
0466791297
bitfields: add bitoffsetof, bitwidth, isBitfield (#16444) 2024-05-08 14:59:34 +03:00
Dennis
62e5e9f1af
Merge pull request #16422 from rikkimax/kill-omf
Kill off OMF support
2024-05-07 18:24:23 +02:00
zopsicle
5eb426e588 Add module core.sys.linux.sys.mount
The new module core.sys.linux.sys.mount provides definitions corresponding to
those in the header <sys/mount.h> on Linux.
2024-05-07 02:02:11 +02:00
richard (rikki) andrew cattermole
ad6e0c7a27 Kill off OMF support 2024-05-03 18:24:36 +12:00
Nick Treleaven
32e4910ab3
Make foreach_reverse with a delegate an error (#16418)
* Make `foreach_reverse` with a delegate an error

Deprecation goes back to at least 2016:
68fb91a130 (diff-13f50d9dea67df89a0535d6b8957f3145d49f71f6b72fdd3913f329a265e1423R1155)
2024-04-27 20:25:20 +08:00
chloekek
ab7f6e65a5
Mark Thread.sleep as @trusted (#16411)
I am fairly convinced that no possible arguments to or global state at the time
of any call to Thread.sleep can result in memory corruption.

There is a precondition on Thread.sleep, that the duration must be
non-negative. On Windows, Thread.sleep calls Sleep, which takes an unsigned
integer. On POSIX, Thread.sleep calls nanosleep, which is specified to handle
negative durations gracefully. As such, violating this precondition should not
be a source of undefined behavior.
2024-04-26 10:57:35 +03:00
Dennis
49c4afd93f
Demangle symbols in linker errors (#16021)
* Demangle symbols in linker errors

Fix bugzilla issue 5573

* Fix test output regex of needspkgmod

---------

Co-authored-by: Dennis Korpel <dennis@sarc.nl>
2024-04-24 14:35:14 +03:00
Steven Schveighoffer
aec16d889c
Remove the interface function fullCollectNoStack from the gcinterface (#16401)
* Remove the interface function fullCollectNoStack from the gcinterface

* Fix tests that depend on the GC not scanning the stack.

* Remove all nostack remnants

* Add changelog entry
2024-04-23 15:06:21 +08:00
Dennis
499a85100a
Limit the number of deprecation messages by default (#16403) 2024-04-22 22:28:07 +08:00
Nick Treleaven
56a0ea80b1
Fix Bugzilla 14128 - AliasDeclaration allows expressions, causing false … (#15863)
* Fix Issue 14128 - AliasDeclaration allows expressions, causing false code for ThisExp

* Add test case

* Fix deprecation comment

* Add changelog

* Use dummy out param, not null

* Change to error with __edition_latest_do_not_use
2024-04-19 17:55:31 +03:00
Dennis
3b3d496210
dtoh: export extern(Windows) and extern(System) functions (#16394)
Co-authored-by: Dennis Korpel <dennis@sarc.nl>
2024-04-18 10:09:52 +03:00
Iain Buclaw
f2b61e6c48 Merge remote-tracking branch 'upstream/stable' into merge_stable 2024-04-01 20:58:54 +00:00
Iain Buclaw
b65767825f purge changelog 2024-04-01 20:12:39 +00:00
Johan Engelen
92181d3c0d
Implement __ctfeWrite builtin (#16250)
* Implement __ctfeWrite builtin

Reworked stalled PR #12412.
The __ctfeWrite function is already part of druntime (core.builtins), but was never implemented.
The actual implementation is the one used at Weka (slightly different from PR #12412) and does not require any changes to expression.d (contrary to said PR).

* fix file extension of changelog entry

* fix changelog file naming

* Improve changelog entry

* Remove superfluous code and add test case.
2024-03-18 11:26:29 -07:00
Richard (Rikki) Andrew Cattermole
dffd899508
Implement UAX31 character ranges (#15307) 2024-03-18 11:19:16 -07:00
Iain Buclaw
2a7a9c459a
Merge pull request #16293 from dkorpel/hexstring-impl-conv-stable
[stable] Make hex strings implicitly convert to integer arrays
2024-03-15 09:41:59 +01:00
Dennis Korpel
4e3cc5c6c6 Make hex strings implicitly convert to integer arrays 2024-03-15 08:53:48 +01:00
Dennis
310a2d7ea6
Add changelog for named arguments (#16262) 2024-03-13 14:36:29 +02:00
Dennis Korpel
3e9bc4ee17 Add L postfix for hex string 2024-03-06 11:48:45 +01:00
Iain Buclaw
6343e32705 Merge remote-tracking branch 'upstream/stable' into merge_stable 2024-02-02 10:00:55 +00:00
Iain Buclaw
44ef2773be purge changelog 2024-02-02 10:00:49 +00:00
Dennis
d396a5ae84
Fix bugzilla issue 24363 - hex string postfixes are useless (#16118)
* Fix bugzilla issue 24363 - hex string postfixes are useless

* Mangle invalid strings as arrays
2024-01-31 13:44:43 +01:00
Iain Buclaw
b514d89f9e Merge remote-tracking branch 'upstream/stable' into merge_stable 2024-01-28 00:17:46 +00:00
Dennis
ba5402e7ac
Allow casting hexstring to int array (#16079) 2024-01-25 10:02:04 +01:00
Adam D. Ruppe
d8dcb940ab
Enhanced version of dip1036 implementation (#15715)
This implements the Enhanced Interpolated Expression Sequence proposal:

i"" or iq{} or q`` with a $(expression) in the middle are converted to a tuple of druntime types for future processing by library code.
2024-01-19 22:21:40 -08:00
Iain Buclaw
a8259d353f core.atomic: Reject invalid failure memory modules in compare exchange
- Rejects MemoryOrder.rel and MemoryOrder.acq_rel as the `fail`
  argument in atomicCompareExchangeStrong and atomicCompareExchangeWeak.
- Rejects `fail` argument having a stronger value than the `succ`
  memory model.

These are rejected as invalid memory models if ever encountered
compiling with GDC or LDC, so make it also rejected by druntime atomics.
2024-01-17 14:42:29 +01:00
Iain Buclaw
92f1c2b498 core.atomic: Reject invalid memory models in load, store and exchange
- Rejects MemoryOrder.acq_rel in atomicLoad and atomicStore.
- Rejects MemoryOrder.acq in atomicExchange.

These are rejected as an invalid memory models if ever encountered
compiling with GDC or LDC, so make it also rejected by druntime atomics
2024-01-17 00:18:05 +01:00