-
-
Notifications
You must be signed in to change notification settings - Fork 407
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
Bytecode Interpreter (new branch) #860
Conversation
Codecov Report
@@ Coverage Diff @@
## master #860 +/- ##
==========================================
- Coverage 60.27% 58.72% -1.55%
==========================================
Files 169 172 +3
Lines 11415 11728 +313
==========================================
+ Hits 6880 6887 +7
- Misses 4535 4841 +306
Continue to review full report at Codecov.
|
Benchmark for e97c522Click to view benchmark
|
Benchmark for f150203Click to view benchmark
|
@HalidOdat i was hoping to get some sort of trace output, like this
So i've added Display for |
Test262 conformance changes:
|
Benchmark for d5cbe3eClick to view benchmark
|
Benchmark for d38e554Click to view benchmark
|
* Bytecode interpreter * Added push and pop to Vm * Add undefined, null, bool bytecodes * Add string literals * Add BigInt literal bytecode * Split Bool to True and False * Add Zero and One bytecodes * Add Rational bytecode * Added some unary operators Co-authored-by: Jason Williams <jwilliams720@bloomberg.net>
* Instructions will need to implement Display so we can output them in a trace
- profiler only needed in vm mode
Benchmark for 1be6aabClick to view benchmark
|
This does run!
Nodes implement
CodeGen
which generates instructions onto a stack held in Context.The
VM
will interpret the instructions from Context.There are some issues:
ctx
andctx.instructions
together without it moaning about "mutable borrowing" twice.As most of this is behind a feature flag it would be good to merge parts of it so we can work on as the main interpreter is active. Then one day we can switch over.
for
The instructions generated are
We can optimize even further here and just do the addition at CodeGen level and throw 4 onto the stack
Fixes #167
@Razican @HalidOdat