Open jmeaster30 opened 11 months ago
I think this may require only having one stack between function calls instead of creating a new stack for each call. This would allow us to consume as much of the stack as a function needs and can even have functions that add more than one thing to a stack at a time.
This may also give a small speed up since we don't have to clone the execution context to make it a parent of the next one. It just becomes a stack of instruction pointers and everything exists in a single execution context.
I want to get some code analysis like stack overflow issues check though and this might make it more difficult
Currently you can only get a limited number of arguments in a function at a time but I can imagine some functions that would need a variable number of arguments