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

Implement Tail Call Optimization for function calls #45

Open
alexdovzhanyn opened this issue Oct 11, 2024 · 0 comments
Open

Implement Tail Call Optimization for function calls #45

alexdovzhanyn opened this issue Oct 11, 2024 · 0 comments
Labels
CodeGen Impacts code generation enhancement New feature or request

Comments

@alexdovzhanyn
Copy link
Collaborator

WebAssembly has support for tail call recursion optimization with the return_call and return_call_indirect instructions as mentioned in the TCO proposal and the MDN Docs.

In Theta, we currently do not make use of this instruction and only rely on the call_indirect for our function calls. We need to update the codegen for function calls to detect when we can use the return_call_indirect and make appropriate use of it.

@alexdovzhanyn alexdovzhanyn added enhancement New feature or request CodeGen Impacts code generation labels Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CodeGen Impacts code generation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant