Skip to content

Commit 781c835

Browse files
authored
[changelog] Tweaks (#23220)
1 parent 193230b commit 781c835

7 files changed

Lines changed: 16 additions & 14 deletions

changelog/dmd.exception-rewrite.dd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
Destructors now run in a nothrow function when an Error unwinds through it
1+
Destructors now run in a `nothrow` function when an `Error` unwinds through it
22

3-
Destructors and scope(exit) blocks internally generate try-finally statements.
3+
Destructors and `scope(exit)` blocks internally generate try-finally statements.
44
Since 2018, DMD has optimized `finally` blocks in `nothrow` try bodies by rewriting them into a simple sequence,
55
avoiding the overhead of exception unwinding. However, this optimization also skipped `finally` blocks when
66
an `Error` was thrown, preventing expected cleanup from running.

changelog/dmd.nullderefcheck.dd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ An optional check for null dereference is added
22

33
A new check has been implemented that injects code to check a pointer for null before it is dereferenced.
44

5-
It will be typically be used if you need a backtrace generated (when one is not automatically done), or if you want to catch and handle the Error as part of a scheduler.
5+
It will be typically be used if you need a backtrace generated (when one is not automatically done), or if you want to catch and handle the `Error` as part of a scheduler.
66

77
This can be enabled by using ``-check=nullderef=on`` by default it is off.
88
What happens may be customized by the ``-checkaction`` switch and by setting a new handler in ``core.exception``.

changelog/dmd.vgc-closure.dd

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
1-
-vgc now reports locations of nested functions that create closures
1+
`-vgc` now reports locations of nested functions that create closures
22

33
When a GC-allocated closure was created, the `-vgc` switch would only point to the outer function that a closure was created for.
44
For a big function, this still requires you to search where the nested function requiring the closure actually is.
55
It now reports the closure function and variable location just like in error messages for `@nogc`.
66

77
```
8-
auto closure()
8+
auto foo()
99
{
1010
int x;
1111
int bar() { return x; }
1212
return &bar;
1313
}
1414
```
1515

16-
After:
16+
Before:
1717

1818
$(CONSOLE
1919
vgc.d(1): vgc: using closure causes GC allocation
2020
)
2121

22+
After:
23+
2224
$(CONSOLE
2325
vgc.d(1): vgc: using closure causes GC allocation
2426
vgc.d(4): vgc: function `bar` closes over variable `x`

changelog/dmd.with-assign.dd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Add support for `with(auto x = expression())`
1+
Add support for `with (auto x = expression())`
22

3-
Added support for using `with` statements with an expression initialiser as an `AssignExpression`, like `if`, `while` for` and `switch`.
4-
For backwards compatibility, `with` still also accepts a qualified expression without assignment to a variable as in `with(immutable expression())`.
3+
Added support for using `with` statements with an expression initialiser as an `AssignExpression`, like `if`, `while`, `for` and `switch`.
4+
For backwards compatibility, `with` still also accepts a qualified expression without assignment to a variable, e.g. `with (immutable expression())`.

changelog/druntime.filterthrown.dd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
Gravedigger approach to Throwables escaping a thread entry point is now available
1+
Gravedigger approach to `Throwable`s escaping a thread entry point is now available
22

3-
A new method is added to `ThreadBase` enabling filtering of any `Throwable`'s before it is handled by the thread abstraction.
3+
A new method is added to `ThreadBase` enabling filtering of any `Throwable`s before it is handled by the thread abstraction.
44
This may be used per-thread and globally, to log that an `Error` has occured or to exit the process.
55

66
A reasonable error handler that may be of use is:

changelog/druntime.pow.dd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
Translate ^^ operator to druntime hook
1+
Translate `^^` operator to druntime hook
22

3-
The exponentiation operator (^^) is now lowered to a druntime hook call instead of being expanded inline by the compiler.
3+
The exponentiation operator (`^^`) is now lowered to a druntime hook call instead of being expanded inline by the compiler.
44
This change moves the implementation logic into the runtime library, allowing for easier maintenance and platform-specific optimizations without requiring compiler modifications.
55

66
```d
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
core.sys.linux.timerfd moved to core.sys.linux.sys.timerfd
1+
`core.sys.linux.timerfd` moved to `core.sys.linux.sys.timerfd`
22

33
Usually, a linux header that's included in C like `#include <sys/time.h>` gets its translation in `core/sys/linux/sys/time.d`.
44
timerfd.d was an exception, not being put in the `sys` package.

0 commit comments

Comments
 (0)