-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
support both inline keyword as well as callconv(.Inline) #6429
Comments
This is a change we can get |
what about the inconsistency this now causes with that being |
I agree, I think there's a difference in stage 2 between a semantic inline and a machine code inline. Machine code inline is a calling convention, semantic inline is maybe something else. It may make sense to have both. |
Performed using `zig fmt .`, see ziglang/zig#6429 Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
Performed using `zig fmt .`, see ziglang/zig#6429 Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
Any function that uses an async call cannot be explicitly inlined now: error: function with calling convention 'Inline' cannot be async |
The asymmetry with |
I have a completely feelings-based reaction to this, I can't justify it other than emotions.
|
I miss |
I agree with the switch back,
I only learned after this was implemented that this was the plan in stage2. |
You are not alone... will be glad when inline is back. |
If we went back to |
having it as |
whether or not it counts as a callconv or not I guess depends on exactly how |
If we kept it as |
|
I take my comment back. Apparently Zig is free to inline functions of any calling convention, which means the presence of "noinline" on a function can change the behavior of a function with any calling convention. |
how is |
You put it on the declaration site,
It's an error because the chosen |
I'm making the call here, Zig will support both As far as one way to do things goes, here's the one way to do things:
|
are there any notable situations where would *not* be able to? |
I can't think of a single instance where one would use this over |
using Anyhow, I intend to implement the revised proposal today and make zig format replace |
accepted proposal
inline
is mutually exclusive with a custom calling convention, I think this makes it simpler.noinline
is unaffected.The text was updated successfully, but these errors were encountered: