Skip to content

Document pass-by-reference behavior for large arguments #287

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 1 commit into
base: master
Choose a base branch
from

Conversation

Feoramund
Copy link
Contributor

This was discussed in odin-lang/Odin#2971 but I couldn't find any mention of it on the overview. I used @jakubtomsu's initial example with expanded names so the problem is more clear.

It would be good if we could get an exact and explicit definition of what is a "large" argument.

@jakubtomsu
Copy link
Contributor

Good idea.
Btw I'm not sure if the calling convention uses different thresholds on different compilation targets though. It might be a good idea to standardize it to always be size_of(rawptr) * 2, (which is what linux RISC-V calling convention does for example)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants