Closed Bug 1059241 Opened 9 years ago Closed 9 years ago

array.pop() should not mark the array as non-packed

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla35

People

(Reporter: jandem, Assigned: jschulte)

References

Details

Attachments

(1 file)

See the testcase below. Ion emits a hole check for the arr[1] load inside the loop, because the arr.pop() call marked the array as non-packed.

This affects deltablue.

function f() {
    var res = 0;
    var arr = [1, 2, 3];
    arr.pop();
    for (var i=0; i<1000000; i++) {
	res += arr[1];
	arr[1] = 1;
    }
}
f();
Attached patch v1.patchSplinter Review
Nice, 5.6 % improvement on deltablue.
Attachment #8484139 - Flags: review?(jdemooij)
Comment on attachment 8484139 [details] [diff] [review]
v1.patch

Review of attachment 8484139 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks for the patch. Forwarding to Brian.
Attachment #8484139 - Flags: review?(jdemooij) → review?(bhackett1024)
Attachment #8484139 - Flags: review?(bhackett1024) → review+
pushed for johannes on try as he doesn't have L1 commit access:
https://tbpl.mozilla.org/?tree=Try&rev=5d9979000d19
Assignee: nobody → j_schulte
Status: NEW → ASSIGNED
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/992b2c2eef2c
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in before you can comment on or make changes to this bug.