Skip to content
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

Improve bytecompiler bytecode generation. #3188

Merged
merged 2 commits into from
Aug 5, 2023
Merged

Conversation

HalidOdat
Copy link
Member

This PR adds the Operand enum (which represents an instruction operand), and makes ByteCompiler::emit take an array of Operands instead of u32 which allows to emit varying length operands more easily.

@HalidOdat HalidOdat added enhancement New feature or request Internal Category for changelog labels Jul 31, 2023
@HalidOdat HalidOdat added this to the v0.18.0 milestone Jul 31, 2023
@HalidOdat HalidOdat requested a review from a team July 31, 2023 05:23
@codecov
Copy link

codecov bot commented Jul 31, 2023

Codecov Report

Merging #3188 (15e5dc4) into main (5f70585) will decrease coverage by 0.02%.
Report is 5 commits behind head on main.
The diff coverage is 39.86%.

❗ Current head 15e5dc4 differs from pull request most recent head 8bcb4f8. Consider uploading reports for the commit 8bcb4f8 to get more accurate results

@@            Coverage Diff             @@
##             main    #3188      +/-   ##
==========================================
- Coverage   50.40%   50.38%   -0.02%     
==========================================
  Files         436      436              
  Lines       42375    42432      +57     
==========================================
+ Hits        21358    21381      +23     
- Misses      21017    21051      +34     
Files Changed Coverage Δ
boa_engine/src/bytecompiler/module.rs 0.00% <0.00%> (ø)
boa_engine/src/module/source.rs 0.00% <0.00%> (ø)
boa_engine/src/vm/opcode/mod.rs 69.23% <ø> (ø)
boa_engine/src/bytecompiler/class.rs 15.15% <5.35%> (-0.42%) ⬇️
boa_engine/src/bytecompiler/declarations.rs 51.28% <10.52%> (-0.36%) ⬇️
...rc/bytecompiler/declaration/declaration_pattern.rs 34.33% <11.11%> (-0.85%) ⬇️
boa_engine/src/bytecompiler/expression/binary.rs 74.62% <28.57%> (ø)
boa_engine/src/bytecompiler/expression/update.rs 55.44% <41.17%> (+1.23%) ⬆️
boa_engine/src/bytecompiler/expression/assign.rs 38.25% <41.66%> (+0.25%) ⬆️
boa_engine/src/bytecompiler/utils.rs 78.57% <50.00%> (+1.82%) ⬆️
... and 5 more

@raskad
Copy link
Member

raskad commented Jul 31, 2023

I like the refactor, but there seems to be a bug somewhere since -1,820 tests are failing

@HalidOdat HalidOdat force-pushed the better-bytecompiler-emit branch from d606744 to 5e0d134 Compare July 31, 2023 23:09
@github-actions
Copy link

github-actions bot commented Jul 31, 2023

Test262 conformance changes

Test result main count PR count difference
Total 95,282 95,282 0
Passed 75,036 75,036 0
Ignored 19,220 19,220 0
Failed 1,026 1,026 0
Panics 0 0 0
Conformance 78.75% 78.75% 0.00%

@HalidOdat HalidOdat force-pushed the better-bytecompiler-emit branch from 5e0d134 to 3b192d1 Compare July 31, 2023 23:24
@HalidOdat HalidOdat mentioned this pull request Aug 3, 2023
@HalidOdat HalidOdat force-pushed the better-bytecompiler-emit branch from 3b192d1 to 15e5dc4 Compare August 3, 2023 19:04
@raskad raskad requested a review from a team August 5, 2023 00:19
Copy link
Member

@jedel1043 jedel1043 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice refactor!

@jedel1043 jedel1043 added this pull request to the merge queue Aug 5, 2023
Merged via the queue into main with commit c2df31b Aug 5, 2023
@HalidOdat HalidOdat deleted the better-bytecompiler-emit branch August 5, 2023 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Internal Category for changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants