-
-
Notifications
You must be signed in to change notification settings - Fork 407
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] - Fix incorrect LoopContinue
instruction in while-do loops
#2866
Conversation
Test262 conformance changes
|
Codecov Report
@@ Coverage Diff @@
## main #2866 +/- ##
=======================================
Coverage 50.95% 50.95%
=======================================
Files 419 419
Lines 41874 41874
=======================================
Hits 21335 21335
Misses 20539 20539
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
Nice catch!
bors r+ |
While working on #2857 I discovered that while generating the bytecode for `do-while` loops we were emitting an orphan `LoopContinue` that is never executed, which was preventing the error to be thrown when max loop iteration is reached. This can more easily be identified with it's flowgraph : (`do { 1; } while(0) `) Main: <details> <img src="https://user-images.githubusercontent.com/8566042/233908011-247313bc-6435-4622-8ecb-f469d9eaf850.png"> </details> With this PR: <details> <img src="https://user-images.githubusercontent.com/8566042/233908030-3552636e-f09c-4c5e-8c7c-1ecfa0024dfe.png"> </details>
Pull request successfully merged into main. Build succeeded: |
LoopContinue
instruction in while-do loopsLoopContinue
instruction in while-do loops
While working on #2857 I discovered that while generating the bytecode for
do-while
loops we were emitting an orphanLoopContinue
that is never executed, which was preventing the error to be thrown when max loop iteration is reached.This can more easily be identified with it's flowgraph : (
do { 1; } while(0)
)Main:
With this PR: