Closed Bug 986155 Opened 10 years ago Closed 10 years ago

MPostWriteBarrier can inhibit some optimizations

Categories

(Core :: JavaScript Engine: JIT, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla31

People

(Reporter: jandem, Assigned: jandem)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

See the micro-benchmark below. We're not able to hoist the element access due to MPostWriteBarrier not overriding getAliasSet.

Note that this is not GGC-specific as MPostWriteBarrier is also added in non-GGC builds.

function f() {
    var arr = [1, 2, 3];
    var obj = {x: arr};
    for (var i=0; i<100000000; i++) {
	var z = arr[1];
	obj.x = arr;
    }
}
var t = new Date;
f();
print(new Date - t);
Blocks: 875863
Attached patch PatchSplinter Review
MPostWriteBarrier is not movable, and doesn't override congruentTo, so this should work.
Attachment #8400166 - Flags: review?(bhackett1024)
Attachment #8400166 - Flags: review?(bhackett1024) → review+
https://hg.mozilla.org/mozilla-central/rev/b980a3d22ced
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
Blocks: 1507445
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: