Starlight-JS / starlight

JS engine in Rust
https://teletype.in/@starlight-js
Mozilla Public License 2.0
509 stars 9 forks source link

New calling convention #125

Open playXE opened 3 years ago

playXE commented 3 years ago

We need faster and easier to use calling convention. For this purpose we have to know function stack size ahead of time (done in 0f5d078e1399c7ef41e45ecb298fcffd57d4571c) and allocate memory on the stack (alloca-rs will be used). This way we get faster calls and easier JIT in the future.

Also I thought about precalculating catch stack size which will remove all the heap allocation that happens right now during call to JS.