Closed Bug 441479 Opened 16 years ago Closed 16 years ago

for-in loops should use one backward branch (with downward goto on entry)

Categories

(Core :: JavaScript Engine, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla1.9.1b2

People

(Reporter: brendan, Assigned: brendan)

References

Details

(Keywords: fixed1.9.1)

Attachments

(1 file, 1 obsolete file)

See bug 371802, which fixed while and do-while loops to use one backward branch, and bug 441477, which will be fixed shortly so for(;;) loops avoid branch at top and goto backward at bottom.

/be
Blocks: jsbcopt
Status: NEW → ASSIGNED
Priority: -- → P1
Target Milestone: mozilla1.9.1 → mozilla1.9.1b2
Blocks: 458851
... so not ready for prime time. The downward goto to iterator-next call is not eliminated in the case of any empty loop body and no header-located main- and side-effects-committing loop variable update code (e.g., JSOP_FORLOCAL). When the patch for bug 458851 is done it will always put code up at the header.

Andreas, this patch leaves us with no loops using JSOP_IFEQ*, so is there any reason for TraceRecorder::flipIf and js_IsLoopEdge in jstracer.cpp to handle IFEQ?

/be
Flags: blocking1.9.1+
Attached patch fixSplinter Review
Jason, your review is more than welcome too.

This cleans up some old spaghetti in the decompiler, and paves the way for the elimination of the JSOP_FOR* bytecodes in favor of JSOP_NEXTITER followed by an appropriate JSOP_SET* op.

/be
Attachment #342468 - Attachment is obsolete: true
Attachment #344228 - Flags: review?(mrbkap)
Comment on attachment 344228 [details] [diff] [review]
fix

r=me with the ss_format fix I pointed out in person.
Attachment #344228 - Flags: review?(mrbkap) → review+
Fixed in tm:

http://hg.mozilla.org/tracemonkey/rev/ea1ffb1c0d93

We should sync with m-c today if we don't regress perf.

/be
Depends on: 461307
Fixed in m-c today.

/be
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Flags: in-testsuite-
Flags: in-litmus-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: