WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
18192
Squirrelfish needs support for break and continue
https://bugs.webkit.org/show_bug.cgi?id=18192
Summary
Squirrelfish needs support for break and continue
Oliver Hunt
Reported
2008-03-28 14:40:05 PDT
Task tracking bug
Attachments
Implementate support for continue and goto
(9.67 KB, patch)
2008-03-28 14:47 PDT
,
Oliver Hunt
oliver
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Oliver Hunt
Comment 1
2008-03-28 14:47:12 PDT
Created
attachment 20165
[details]
Implementate support for continue and goto
Geoffrey Garen
Comment 2
2008-03-28 15:00:53 PDT
+ Vector<LoopContext> m_loopsContextStack; How about calling this "m_loopContextStack"? +CodeGenerator::LoopContext* CodeGenerator::scopeForIdentifier(const Identifier& label) "Scope" is very specifically tied to variable resolution in JavaScript. How about naming this function "loopContextForIdentifier"? + LoopContext* scope = scopeForIdentifier(label); And calling this variable "loopContext"? +LabelID* CodeGenerator::getLabelForContinue(const Identifier& label) +{ + LoopContext* scope = scopeForIdentifier(label); + return scope ? scope->continueTarget : 0; +} + +LabelID* CodeGenerator::getLabelForBreak(const Identifier& label) Our style is to omit the "get" from these function names. Looks good. r=me
Geoffrey Garen
Comment 3
2008-03-28 15:01:34 PDT
I think you can change this: + LoopContext scope = { labels, continueTarget, breakTarget }; + m_loopsContextStack.append(scope); to this: m_loopsContextStack.append({ labels, continueTarget, breakTarget });
Oliver Hunt
Comment 4
2008-03-28 15:38:37 PDT
Comment on
attachment 20165
[details]
Implementate support for continue and goto reviewed by Geoff
Oliver Hunt
Comment 5
2008-03-28 15:40:42 PDT
Landed
r31411
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