-
-
Notifications
You must be signed in to change notification settings - Fork 411
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] - Split vm/opcode into modules #2343
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2343 +/- ##
==========================================
+ Coverage 39.84% 40.09% +0.24%
==========================================
Files 242 304 +62
Lines 23242 23369 +127
==========================================
+ Hits 9260 9369 +109
- Misses 13982 14000 +18
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Great work!! Thank you for this contribution :) This is related to #1808, but for the VM instead of the byte compiler, if I'm not mistaken. |
fcc0fa9
to
d1e678a
Compare
d1e678a
to
a1647d8
Compare
Just wanted to follow up that this is probably ready for review (updated to some of the recent pull requests). 😄 |
Test262 conformance changesVM implementation
|
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.
Great work!! This is very helpful.
I added a couple of comments. I like the approach, and I would be OK to merge it as-is, but check if my comments make sense. Also, this is missing documentation of all the op-codes, but we didn't have such documentation before, so, if you add it, that would be great, but if not, I'm OK to merge it as-is and create an issue to do it later :)
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.
Thanks! Looks good to me :)
I like the change. I pushed an empty commit to trigger the benchmarks to see if there is any noticeable change in how the code is compiled/optimized. |
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.
Looks good to me :)
Too much standard deviation, difficult to say, but I don't see it went worse, and we might even have some gains.
|
bors r+ |
<!--- Thank you for contributing to Boa! Please fill out the template below, and remove or add any information as you feel necessary. ---> Hi! This isn't really related to a pull request that I know of. I was trying to better wrap my head around Boa's VM and thought I'd break it apart so that the file wasn't 2500+ lines. I figured I'd submit it as a draft and get feedback/see if anyone was interested in it. The way the modules were broken apart was primarily based off the opcode name (`GetFunction` & `GetFunctionAsync` -> `./get/function.rs`). It changes the following: - Adds an `Operation` trait to opcode/mod.rs - Implements `Operation` for each Opcode variant, moving the executable instruction code from `vm/mod.rs` to the respective module Co-authored-by: raskad <[email protected]>
Pull request successfully merged into main. Build succeeded: |
Hi!
This isn't really related to a pull request that I know of. I was trying to better wrap my head around Boa's VM and thought I'd break it apart so that the file wasn't 2500+ lines. I figured I'd submit it as a draft and get feedback/see if anyone was interested in it. The way the modules were broken apart was primarily based off the opcode name (
GetFunction
&GetFunctionAsync
->./get/function.rs
).It changes the following:
Operation
trait to opcode/mod.rsOperation
for each Opcode variant, moving the executable instruction code fromvm/mod.rs
to the respective module