Skip to content

AstGen: allow unary float builtins to forward a result location #23988

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Rexicon226
Copy link
Contributor

Simple, non-breaking change.

Before this wasn't allowed:

const x: f64 = @sqrt(@floatFromInt(N));

and for no good reason!

These,

@sqrt
@sin
@cos
@tan
@exp
@exp2
@log
@log2
@log10
@floor
@ceil
@trunc
@round

builtins don't modify the result location nor is it ambiguous at any time what the operands type needs to be.

@alexrp alexrp requested a review from mlugg May 25, 2025 09:58
@alexrp alexrp added the proposal This issue suggests modifications. If it also has the "accepted" label then it is planned. label May 25, 2025
@alexrp
Copy link
Member

alexrp commented May 29, 2025

Just a reminder that, if accepted, this should have some copy-pastable release notes in the PR description.

@Rexicon226
Copy link
Contributor Author

Yeah, happy to write them up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal This issue suggests modifications. If it also has the "accepted" label then it is planned.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants