Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions changelog/druntime.pow.dd
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Translate ^^ operator to druntime hook

The exponentiation operator (^^) is now lowered to a druntime hook call instead of being expanded inline by the compiler.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was never expanded inline by the compiler. Previously it was forwarding to std.math in phobos.

Copy link
Copy Markdown
Contributor Author

@xoxorwr xoxorwr Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another reason to enforce change log entries to be written with the PR by its author, I remembered wrong, I should have checked the diff properly.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was going to add one, but I'm still working on this but was away on Sunday so I didn't respond immediately. Thanks for adding one in the mean time though!

This change moves the implementation logic into the runtime library, allowing for easier maintenance and platform-specific optimizations without requiring compiler modifications.

```d
auto _d_pow(Base, Exp)(Base base, Exp exp);
auto _d_sqrt(T)(T x);
```
Loading