Skip to content
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

Pass arguments via uxn working stack, let callee spill arguments if necessary #12

Closed
hikari-no-yume opened this issue Jun 12, 2023 · 0 comments

Comments

@hikari-no-yume
Copy link
Collaborator

Currently the caller of a function writes arguments to an in-memory stack (@rbp). If it instead just put them on the uxn working stack and let the callee (the function itself) write them to memory, it would reduce code size when a function is called more than once, and perhaps improve the general readability of the assembly. Maybe we could even use Uxntal's ( a -- b ) syntax for type-checking?

I didn't check if we support struct arguments, but if we do, they would have to be written to memory by the caller still, and then a pointer would be pushed to the uxn working stack.

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

No branches or pull requests

1 participant