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

[Merged by Bors] - Cleanup vm stack on function return #1880

Closed
wants to merge 1 commit into from

Conversation

raskad
Copy link
Member

@raskad raskad commented Mar 1, 2022

This cleans up the vm stack on a function return. This is needed because when errors are thrown, there may be still values on the stack that cannot be cleaned up via regular control flow. The change should have little performance impact, because the Vec::truncate function does not alter the capacity of the vector.

@raskad raskad added bug Something isn't working vm Issues and PRs related to the Boa Virtual Machine. Internal Category for changelog labels Mar 1, 2022
@raskad raskad added this to the v0.14.0 milestone Mar 1, 2022
@codecov
Copy link

codecov bot commented Mar 1, 2022

Codecov Report

Merging #1880 (5737cd9) into main (3fe7d09) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1880      +/-   ##
==========================================
+ Coverage   46.71%   46.73%   +0.01%     
==========================================
  Files         204      204              
  Lines       16732    16734       +2     
==========================================
+ Hits         7817     7821       +4     
+ Misses       8915     8913       -2     
Impacted Files Coverage Δ
boa_engine/src/vm/mod.rs 70.79% <100.00%> (+0.08%) ⬆️
boa_engine/src/builtins/number/mod.rs 77.77% <0.00%> (+0.76%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3fe7d09...5737cd9. Read the comment docs.

@Razican
Copy link
Member

Razican commented Mar 1, 2022

Test262 conformance changes

VM implementation

Test result main count PR count difference
Total 88,342 88,342 0
Passed 43,039 43,041 +2
Ignored 21,413 21,413 0
Failed 23,890 23,888 -2
Panics 0 0 0
Conformance 48.72% 48.72% +0.00%
Fixed tests (2):
test/language/statements/try/completion-values-fn-finally-return.js [strict mode] (previously Failed)
test/language/statements/try/completion-values-fn-finally-return.js (previously Failed)

@RageKnify RageKnify removed the Internal Category for changelog label Mar 1, 2022
@raskad
Copy link
Member Author

raskad commented Mar 1, 2022

bors r+

bors bot pushed a commit that referenced this pull request Mar 1, 2022
This cleans up the vm stack on a function return. This is needed because when errors are thrown, there may be still values on the stack that cannot be cleaned up via regular control flow. The change should have little performance impact, because the `Vec::truncate` function does not alter the capacity of the vector.
@bors
Copy link

bors bot commented Mar 1, 2022

Pull request successfully merged into main.

Build succeeded:

@bors bors bot changed the title Cleanup vm stack on function return [Merged by Bors] - Cleanup vm stack on function return Mar 1, 2022
@bors bors bot closed this Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working vm Issues and PRs related to the Boa Virtual Machine.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants