Starlight-JS / starlight

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

Register based bytecode #127

Open playXE opened 3 years ago

playXE commented 3 years ago

Stack based bytecode is quite hard to maintain especially when you have to deal with iterators so I want to get register based bytecode in Starlight. We could write a DSL for generating one just like JSC: https://github.com/WebKit/WebKit/blob/main/Source/JavaScriptCore/bytecode/BytecodeList.rb https://github.com/WebKit/WebKit/tree/main/Source/JavaScriptCore/generator

playXE commented 3 years ago

Such a change will require almost full execution pipeline rewrite and probably will take about a month or more to finish but I hope it is worth it.