Closed
Bug 765976
Opened 12 years ago
Closed 12 years ago
Simplify CompileFunctionBody's control flow
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla16
People
(Reporter: n.nethercote, Assigned: n.nethercote)
Details
(Whiteboard: [js:t])
Attachments
(1 file)
3.94 KB,
patch
|
sfink
:
review+
|
Details | Diff | Splinter Review |
CompileFunctionBody()'s second half is oddly keen to avoid return statements. By using them, this patch reduces the nesting greatly and makes the function more readable and more like CompileScript() (and most other SpiderMonkey code).
Assignee | ||
Comment 1•12 years ago
|
||
Attachment #634241 -
Flags: review?(sphink)
Assignee | ||
Comment 2•12 years ago
|
||
Hey, |hg bzexport| actually works! Nice.
Status: NEW → ASSIGNED
Summary: Simplify CompileFunctionBody's control flow. → Simplify CompileFunctionBody's control flow
Whiteboard: [js:t]
Assignee | ||
Comment 3•12 years ago
|
||
BTW, I removed the "/* FoldConstants reported the error already. */" comment because AFAICT it's not true -- FoldConstants() doesn't report any errors.
Comment 4•12 years ago
|
||
Comment on attachment 634241 [details] [diff] [review] Simplify CompileFunctionBody's control flow Review of attachment 634241 [details] [diff] [review]: ----------------------------------------------------------------- Yes, yes, a thousand times yes. The original was... well... WHY??!
Attachment #634241 -
Flags: review?(sphink) → review+
Assignee | ||
Comment 5•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/0dba7486e5c7
Comment 6•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/0dba7486e5c7
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla16
You need to log in
before you can comment on or make changes to this bug.
Description
•