-
-
Notifications
You must be signed in to change notification settings - Fork 411
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix labelled block statement (#2285)
<!--- Thank you for contributing to Boa! Please fill out the template below, and remove or add any information as you feel neccesary. ---> This Pull Request fixes [x-after-break-to-label](https://github.com/tc39/test262/blob/dc1dc28aa46d9457e47550b34e6f25a8b80de826/test/language/block-scope/leave/x-after-break-to-label.js) ### Example ```js { let x = 2; L: { let x = 3; console.log(x === 3); break L; console.log(false); } console.log(x === 2); } ``` ### Previously > Uncaught "SyntaxError": "Cannot use the undeclared label 'L'" ### Now > true <br> true ### What did I do 1. add `lable` to `Node::Block` 2. push labelled-block's `control info` to `jump_info` list 3. pop it before `Opcode::PopEnvironment` Co-authored-by: creampnx_x <[email protected]>
- Loading branch information
1 parent
779384d
commit dbbcc57
Showing
4 changed files
with
71 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters