The default bug view has changed. See this FAQ.

Simplify CompileFunctionBody's control flow

RESOLVED FIXED in mozilla16

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: njn, Assigned: njn)

Tracking

unspecified
mozilla16
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [js:t])

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
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

5 years ago
Created attachment 634241 [details] [diff] [review]
Simplify CompileFunctionBody's control flow
Attachment #634241 - Flags: review?(sphink)
(Assignee)

Comment 2

5 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

5 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 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

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/0dba7486e5c7
https://hg.mozilla.org/mozilla-central/rev/0dba7486e5c7
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla16
You need to log in before you can comment on or make changes to this bug.