WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
147063
lexical scoping is broken with respect to "break" and "continue"
https://bugs.webkit.org/show_bug.cgi?id=147063
Summary
lexical scoping is broken with respect to "break" and "continue"
Saam Barati
Reported
2015-07-17 19:26:26 PDT
There is some silliness in how byte code generator handles push/pop lexical scope and prepareScopeForNextForLoopIteration. This should be skipped. There is a silly mistake to always assume that scopeRegister() will be the scope in which we want to grab the parent scope of. This is fundamentally wrong. We want to grab the parent of the corresponding lexical scope. scopeRegister() just refers to scope stack top which is not always what we want to pop from.
Attachments
patch
(22.95 KB, patch)
2015-07-18 02:02 PDT
,
Saam Barati
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Saam Barati
Comment 1
2015-07-18 02:02:11 PDT
Created
attachment 257027
[details]
patch
Saam Barati
Comment 2
2015-07-18 02:04:53 PDT
(In reply to
comment #0
)
> There is some silliness in how byte code generator handles push/pop lexical > scope and prepareScopeForNextForLoopIteration. > This should be skipped. There is a silly mistake to always assume that > scopeRegister() will be the scope in which > we want to grab the parent scope of. This is fundamentally wrong. We want to > grab the parent of the corresponding > lexical scope. scopeRegister() just refers to scope stack top which is not > always what we want to pop from.
This assessment is still correct. But it doesn't tell the whole story. This was a symptom, rather than the leading cause, of the problem this patch fixes.
WebKit Commit Bot
Comment 3
2015-07-18 13:13:31 PDT
Comment on
attachment 257027
[details]
patch Clearing flags on attachment: 257027 Committed
r186996
: <
http://trac.webkit.org/changeset/186996
>
WebKit Commit Bot
Comment 4
2015-07-18 13:13:37 PDT
All reviewed patches have been landed. Closing bug.
Simon Fraser (smfr)
Comment 5
2015-07-18 14:13:51 PDT
This broke 11 tests:
https://build.webkit.org/builders/Apple%20Mavericks%2032-bit%20JSC%20%28BuildAndTest%29/builds/11494
WebKit Commit Bot
Comment 6
2015-07-18 14:17:21 PDT
Re-opened since this is blocked by
bug 147070
Saam Barati
Comment 7
2015-07-18 17:38:49 PDT
Fixed 32-bit tests. They were timing out. I made the test have fewer loop iterations. landed in:
http://trac.webkit.org/changeset/187003
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug