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 basic function inlining #3869

Open
GearsDatapacks opened this issue Nov 21, 2024 · 1 comment
Open

Implement basic function inlining #3869

GearsDatapacks opened this issue Nov 21, 2024 · 1 comment
Labels
help wanted Contributions encouraged priority:medium

Comments

@GearsDatapacks
Copy link
Member

As discussed in #3722, and this thread.
As pointed out here, some key functions such as bool.guard can cause a stack overflow with recursion in javascript, while giving a false appearance of being tail recursive.

Inlining bool.guard would solve this issue. As Louis suggested, we could initially implement a basic version of inlining (i.e. the inlining itself, without complex heuristics etc.), and later we can expand and improved upon this. @lpil could you elaborate a bit on how you were imagining we would decide which functions to inline?

I did a bit of research into how function inlining works when the about discussion was first created, so I'll write up a quick summary of how this will work soon, and then I'll look into implementing this.

@lpil
Copy link
Member

lpil commented Nov 21, 2024

Thank you

@lpil lpil added help wanted Contributions encouraged priority:medium labels Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Contributions encouraged priority:medium
Projects
None yet
Development

No branches or pull requests

2 participants