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

Close iterator after generator return call while array destructuring assignment #3164

Merged
merged 2 commits into from
Jul 30, 2023

Conversation

HalidOdat
Copy link
Member

@HalidOdat HalidOdat commented Jul 22, 2023

Depends on #3059, which makes it much easier to implement this :)

This was causing some tests to fail in array destructuring assignment.

Blocked until #3059 is merged!

@HalidOdat HalidOdat added bug Something isn't working execution Issues or PRs related to code execution vm Issues and PRs related to the Boa Virtual Machine. labels Jul 22, 2023
@HalidOdat HalidOdat added this to the v0.18.0 milestone Jul 22, 2023
@HalidOdat HalidOdat added the blocked Waiting for another code change label Jul 22, 2023
@HalidOdat HalidOdat changed the base branch from main to refactor-opcodes-environments July 22, 2023 01:11
@HalidOdat HalidOdat changed the base branch from refactor-opcodes-environments to main July 22, 2023 01:13
@HalidOdat HalidOdat changed the base branch from main to refactor-opcodes-environments July 22, 2023 01:13
@codecov
Copy link

codecov bot commented Jul 22, 2023

Codecov Report

Merging #3164 (a188b49) into main (be055a3) will decrease coverage by 0.01%.
The diff coverage is 50.00%.

@@            Coverage Diff             @@
##             main    #3164      +/-   ##
==========================================
- Coverage   50.41%   50.41%   -0.01%     
==========================================
  Files         436      436              
  Lines       42340    42343       +3     
==========================================
- Hits        21347    21346       -1     
- Misses      20993    20997       +4     
Files Changed Coverage Δ
boa_engine/src/vm/code_block.rs 57.62% <ø> (ø)
boa_engine/src/vm/flowgraph/mod.rs 0.00% <ø> (ø)
boa_engine/src/vm/opcode/mod.rs 69.23% <ø> (ø)
boa_engine/src/vm/opcode/control_flow/throw.rs 64.51% <42.85%> (-6.32%) ⬇️
...rc/bytecompiler/declaration/declaration_pattern.rs 35.18% <100.00%> (-1.57%) ⬇️

@github-actions
Copy link

github-actions bot commented Jul 22, 2023

Test262 conformance changes

Test result main count PR count difference
Total 95,260 95,260 0
Passed 74,918 74,952 +34
Ignored 19,230 19,230 0
Failed 1,112 1,078 -34
Panics 0 0 0
Conformance 78.65% 78.68% +0.04%
Fixed tests (34):
test/language/statements/for-await-of/async-gen-decl-dstr-array-elem-iter-rtrn-close-null.js [strict mode] (previously Failed)
test/language/statements/for-await-of/async-gen-decl-dstr-array-elem-iter-rtrn-close-null.js (previously Failed)
test/language/statements/for-of/dstr/array-elem-iter-rtrn-close-err.js [strict mode] (previously Failed)
test/language/statements/for-of/dstr/array-elem-iter-rtrn-close-err.js (previously Failed)
test/language/statements/for-of/dstr/array-elem-trlg-iter-rest-rtrn-close-null.js [strict mode] (previously Failed)
test/language/statements/for-of/dstr/array-elem-trlg-iter-rest-rtrn-close-null.js (previously Failed)
test/language/statements/for-of/dstr/array-elem-trlg-iter-list-rtrn-close-err.js [strict mode] (previously Failed)
test/language/statements/for-of/dstr/array-elem-trlg-iter-list-rtrn-close-err.js (previously Failed)
test/language/statements/for-of/dstr/array-rest-iter-rtrn-close-err.js [strict mode] (previously Failed)
test/language/statements/for-of/dstr/array-rest-iter-rtrn-close-err.js (previously Failed)
test/language/statements/for-of/dstr/array-elem-trlg-iter-list-rtrn-close-null.js [strict mode] (previously Failed)
test/language/statements/for-of/dstr/array-elem-trlg-iter-list-rtrn-close-null.js (previously Failed)
test/language/statements/for-of/dstr/array-rest-iter-rtrn-close-null.js [strict mode] (previously Failed)
test/language/statements/for-of/dstr/array-rest-iter-rtrn-close-null.js (previously Failed)
test/language/statements/for-of/dstr/array-elem-trlg-iter-rest-rtrn-close-err.js [strict mode] (previously Failed)
test/language/statements/for-of/dstr/array-elem-trlg-iter-rest-rtrn-close-err.js (previously Failed)
test/language/statements/for-of/dstr/array-elem-iter-rtrn-close-null.js [strict mode] (previously Failed)
test/language/statements/for-of/dstr/array-elem-iter-rtrn-close-null.js (previously Failed)
test/language/expressions/assignment/dstr/array-elem-iter-rtrn-close-err.js [strict mode] (previously Failed)
test/language/expressions/assignment/dstr/array-elem-iter-rtrn-close-err.js (previously Failed)
test/language/expressions/assignment/dstr/array-elem-trlg-iter-rest-rtrn-close-null.js [strict mode] (previously Failed)
test/language/expressions/assignment/dstr/array-elem-trlg-iter-rest-rtrn-close-null.js (previously Failed)
test/language/expressions/assignment/dstr/array-elem-trlg-iter-list-rtrn-close-err.js [strict mode] (previously Failed)
test/language/expressions/assignment/dstr/array-elem-trlg-iter-list-rtrn-close-err.js (previously Failed)
test/language/expressions/assignment/dstr/array-rest-iter-rtrn-close-err.js [strict mode] (previously Failed)
test/language/expressions/assignment/dstr/array-rest-iter-rtrn-close-err.js (previously Failed)
test/language/expressions/assignment/dstr/array-elem-trlg-iter-list-rtrn-close-null.js [strict mode] (previously Failed)
test/language/expressions/assignment/dstr/array-elem-trlg-iter-list-rtrn-close-null.js (previously Failed)
test/language/expressions/assignment/dstr/array-rest-iter-rtrn-close-null.js [strict mode] (previously Failed)
test/language/expressions/assignment/dstr/array-rest-iter-rtrn-close-null.js (previously Failed)
test/language/expressions/assignment/dstr/array-elem-trlg-iter-rest-rtrn-close-err.js [strict mode] (previously Failed)
test/language/expressions/assignment/dstr/array-elem-trlg-iter-rest-rtrn-close-err.js (previously Failed)
test/language/expressions/assignment/dstr/array-elem-iter-rtrn-close-null.js [strict mode] (previously Failed)
test/language/expressions/assignment/dstr/array-elem-iter-rtrn-close-null.js (previously Failed)

@HalidOdat
Copy link
Member Author

HalidOdat commented Jul 22, 2023

The actual tests passed increase is +34 test (+8 tests fixed in #3059 )

Test262 conformance changes

Test result main count PR count difference
Total 94,858 94,858 0
Passed 74,820 74,862 +34
Ignored 18,828 18,828 0
Failed 1,210 1,168 -34
Panics 0 0 0
Conformance 78.89% 78.92% +0.03%
Fixed tests (34):
test/language/statements/for-await-of/async-gen-decl-dstr-array-elem-iter-rtrn-close-null.js [strict mode] (previously Failed)
test/language/statements/for-await-of/async-gen-decl-dstr-array-elem-iter-rtrn-close-null.js (previously Failed)
test/language/statements/for-of/dstr/array-elem-iter-rtrn-close-null.js [strict mode] (previously Failed)
test/language/statements/for-of/dstr/array-elem-iter-rtrn-close-null.js (previously Failed)
test/language/statements/for-of/dstr/array-elem-iter-rtrn-close-err.js [strict mode] (previously Failed)
test/language/statements/for-of/dstr/array-elem-iter-rtrn-close-err.js (previously Failed)
test/language/statements/for-of/dstr/array-elem-trlg-iter-rest-rtrn-close-err.js [strict mode] (previously Failed)
test/language/statements/for-of/dstr/array-elem-trlg-iter-rest-rtrn-close-err.js (previously Failed)
test/language/statements/for-of/dstr/array-elem-trlg-iter-rest-rtrn-close-null.js [strict mode] (previously Failed)
test/language/statements/for-of/dstr/array-elem-trlg-iter-rest-rtrn-close-null.js (previously Failed)
test/language/statements/for-of/dstr/array-rest-iter-rtrn-close-err.js [strict mode] (previously Failed)
test/language/statements/for-of/dstr/array-rest-iter-rtrn-close-err.js (previously Failed)
test/language/statements/for-of/dstr/array-elem-trlg-iter-list-rtrn-close-null.js [strict mode] (previously Failed)
test/language/statements/for-of/dstr/array-elem-trlg-iter-list-rtrn-close-null.js (previously Failed)
test/language/statements/for-of/dstr/array-rest-iter-rtrn-close-null.js [strict mode] (previously Failed)
test/language/statements/for-of/dstr/array-rest-iter-rtrn-close-null.js (previously Failed)
test/language/statements/for-of/dstr/array-elem-trlg-iter-list-rtrn-close-err.js [strict mode] (previously Failed)
test/language/statements/for-of/dstr/array-elem-trlg-iter-list-rtrn-close-err.js (previously Failed)
test/language/expressions/assignment/dstr/array-elem-iter-rtrn-close-null.js [strict mode] (previously Failed)
test/language/expressions/assignment/dstr/array-elem-iter-rtrn-close-null.js (previously Failed)
test/language/expressions/assignment/dstr/array-elem-iter-rtrn-close-err.js [strict mode] (previously Failed)
test/language/expressions/assignment/dstr/array-elem-iter-rtrn-close-err.js (previously Failed)
test/language/expressions/assignment/dstr/array-elem-trlg-iter-rest-rtrn-close-err.js [strict mode] (previously Failed)
test/language/expressions/assignment/dstr/array-elem-trlg-iter-rest-rtrn-close-err.js (previously Failed)
test/language/expressions/assignment/dstr/array-elem-trlg-iter-rest-rtrn-close-null.js [strict mode] (previously Failed)
test/language/expressions/assignment/dstr/array-elem-trlg-iter-rest-rtrn-close-null.js (previously Failed)
test/language/expressions/assignment/dstr/array-rest-iter-rtrn-close-err.js [strict mode] (previously Failed)
test/language/expressions/assignment/dstr/array-rest-iter-rtrn-close-err.js (previously Failed)
test/language/expressions/assignment/dstr/array-elem-trlg-iter-list-rtrn-close-null.js [strict mode] (previously Failed)
test/language/expressions/assignment/dstr/array-elem-trlg-iter-list-rtrn-close-null.js (previously Failed)
test/language/expressions/assignment/dstr/array-rest-iter-rtrn-close-null.js [strict mode] (previously Failed)
test/language/expressions/assignment/dstr/array-rest-iter-rtrn-close-null.js (previously Failed)
test/language/expressions/assignment/dstr/array-elem-trlg-iter-list-rtrn-close-err.js [strict mode] (previously Failed)
test/language/expressions/assignment/dstr/array-elem-trlg-iter-list-rtrn-close-err.js (previously Failed)

@HalidOdat HalidOdat force-pushed the refactor-opcodes-environments branch from e79a846 to 91986f1 Compare July 22, 2023 01:40
@HalidOdat HalidOdat force-pushed the fix/array-elem-iter-rtrn-close branch from a590c88 to acff3ff Compare July 22, 2023 01:40
@HalidOdat HalidOdat force-pushed the refactor-opcodes-environments branch from f673d03 to ae13bb1 Compare July 27, 2023 04:13
Base automatically changed from refactor-opcodes-environments to main July 29, 2023 21:52
@HalidOdat HalidOdat force-pushed the fix/array-elem-iter-rtrn-close branch from acff3ff to e2a0b6d Compare July 29, 2023 22:50
@HalidOdat HalidOdat removed the blocked Waiting for another code change label Jul 29, 2023
@HalidOdat HalidOdat force-pushed the fix/array-elem-iter-rtrn-close branch from fb15c5e to a188b49 Compare July 29, 2023 23:06
Copy link
Member

@raskad raskad left a comment

Choose a reason for hiding this comment

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

Nice fix.

@raskad raskad requested a review from a team July 30, 2023 02:42
@jedel1043 jedel1043 added this pull request to the merge queue Jul 30, 2023
Merged via the queue into main with commit 2b01ef1 Jul 30, 2023
@jedel1043 jedel1043 deleted the fix/array-elem-iter-rtrn-close branch July 30, 2023 04:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working execution Issues or PRs related to code execution vm Issues and PRs related to the Boa Virtual Machine.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants