Repository navigation
introduce @call and remove other builtin calls - #3856
Merged
Merged
Conversation
closes #3732
Calling with a new stack, with a runtime-known stack pointer (e.g. not a global variable) is regressed with this branch. It is now a compile-error, due to the Runtime Hint system not being smart enough to mix a compile-time modifier field with a runtime stack field. I'm OK with this regression because this feature is flawed (see #3268) and may be deleted from the language.
This was referenced Dec 6, 2019
daurnimator
reviewed
Dec 6, 2019
| const m = mem.readIntSliceLittle(u64, b[0..]); | ||
| self.v3 ^= m; | ||
|
|
||
| // TODO this is a workaround, should be able to supply the value without a separate variable |
Contributor
There was a problem hiding this comment.
Is there a related issue open for this TODO?
Contributor
|
|
Member
Author
I don't think this is true. Can you give an example? |
Contributor
Wouldn't e.g. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implement
@call. Closes #3732. This supports more options than were previously available:The order here is interesting:
Zig is allowed to follow the arrows, but going against the arrows is a compile error. For example:
This also fixes anonymous struct/tuple literals that had any fields as runtime values.
@noInlineCallfrom the language@inlineCallfrom the language@newStackCallfrom the language.Calling with a new stack, with a runtime-known stack pointer (e.g. not a global variable) is regressed with this branch. It is now a compile-error, due to the Runtime Hint system not being smart enough to mix a compile-time
modifierfield with a runtimestackfield. I'm OK with this regression because this feature is flawed (see #3268) and may be deleted from the language.@asyncCallwill stay for now, and probably will not get removed because the return value has a different meaning than all the rest of the kinds of calls.This is one of 3 prerequisites until var args can be deleted. The other 2 are:
++operator for tuples