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

RESOLVED FIXED in mozilla1.9.1b2

Status

()

P1
normal
RESOLVED FIXED
11 years ago
10 years ago

People

(Reporter: brendan, Assigned: brendan)

Tracking

({fixed1.9.1})

Trunk
mozilla1.9.1b2
fixed1.9.1
Points:
---
Dependency tree / graph
Bug Flags:
blocking1.9.1 +
in-testsuite -
in-litmus -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

11 years ago
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
(Assignee)

Updated

11 years ago
Blocks: 363529
Status: NEW → ASSIGNED
(Assignee)

Updated

10 years ago
Priority: -- → P1
Target Milestone: mozilla1.9.1 → mozilla1.9.1b2
(Assignee)

Updated

10 years ago
Blocks: 458851
(Assignee)

Comment 1

10 years ago
Created attachment 342468 [details] [diff] [review]
patch in progress, no decompiler changes yet

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

Updated

10 years ago
Flags: blocking1.9.1+
(Assignee)

Comment 2

10 years ago
Created attachment 344228 [details] [diff] [review]
fix

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+
(Assignee)

Comment 4

10 years ago
Fixed in tm:

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

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

/be
(Assignee)

Updated

10 years ago
Depends on: 461307
(Assignee)

Comment 5

10 years ago
Fixed in m-c today.

/be
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED

Updated

10 years ago
Flags: in-testsuite-
Flags: in-litmus-
Keywords: fixed1.9.1
You need to log in before you can comment on or make changes to this bug.