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

New function call/return helper opcodes #857

Open
Dentosal opened this issue Oct 14, 2024 · 2 comments
Open

New function call/return helper opcodes #857

Dentosal opened this issue Oct 14, 2024 · 2 comments

Comments

@Dentosal
Copy link
Member

$is being the basis of jumps is something we should get rid of. I'd like to introduce two new opcodes:

  • JMPA $reg imm : jump to absolute address in register plus immediate
  • SRAJ $reta reg/imm store return address and jump to "function"
@MitchTurner
Copy link
Member

@MitchTurner
Copy link
Member

It sounds like this would optimize a lot of places where the compiler adds 3 opcodes, and this would replace those spots with 1. It would be a nice improvement to bytecode size.

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

2 participants