-
-
Notifications
You must be signed in to change notification settings - Fork 406
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
[Merged by Bors] - Fix internal vm tests #1718
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1718 +/- ##
==========================================
- Coverage 53.38% 53.08% -0.30%
==========================================
Files 200 200
Lines 16967 17059 +92
==========================================
- Hits 9057 9056 -1
- Misses 7910 8003 +93
Continue to review full report at Codecov.
|
Test262 conformance changesNon-VM implementation
VM implementation
Fixed tests (1154):
Broken tests (7):
Fixed panics (177):
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm seeing there's a lot of OpCode
s that are used only once. Would it be feasible to create a OpCode::CallRs
operation that takes a function pointer from the stack, then casts it to a fn(&mut CodeBlock, &mut usize) -> String
and calls it with function(self, pc)
?
Maybe it would impact the performance a bit because of the indirection, but it would reduce the complexity of instruction_operands
and OpCode
a lot :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow. Amazing work @raskad ! 🎉 ... I think after this PR we should remove the non-vm (ast walker) implementation and switch to VM, since the conformance of AST walker and VM are so pretty much the same :)
I also though about this a bit, but I think it's probably better to just create the opcodes. I looked at how SpiderMonkey deals with some of this. For example they also have a |
I think we're better with individual opcodes then creating a special one that actually invokes N other functions. That's just moving the indirection to a later point in execution, I think it would make it harder to understand the code and most likely not help performance. |
1b05e64
to
980e719
Compare
980e719
to
3dfd0a7
Compare
@HalidOdat I've got a question for you. I want to fix the individual opcode documentation, as some of them differ. What order should the stack values have in the doc comments? e.g.: What is the appropriate order / where is the top of the stack? But I'm not sure how to best represent this. |
Hmmm... IMO the
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, might want to wait for more approvals since its such a big PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM :)
bors r+ |
👎 Rejected by code reviews |
bors r+ |
This PR fixes some vm implementation code. All our internal tests should now pass with the vm enabled. There are only a few (~100) 262 tests left that currently break with the vm, that previously worked.
I’m also fine with this, would be good to focus on that going forward |
Pull request successfully merged into main. Build succeeded: |
This PR fixes some vm implementation code. All our internal tests should now pass with the vm enabled.
There are only a few (~100) 262 tests left that currently break with the vm, that previously worked.