Prevent interference of allocation sites with array-natives-elements test.
This should make the arm64 build green again. R=mvstanton@chromium.org BUG= Review URL: https://codereview.chromium.org/285663005 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21288 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
78b3b6b370
commit
2b4bfce298
@ -54,29 +54,30 @@ function array_natives_test() {
|
|||||||
assertTrue(%HasFastDoubleElements([1.1]));
|
assertTrue(%HasFastDoubleElements([1.1]));
|
||||||
assertTrue(%HasFastDoubleElements([1.1,2]));
|
assertTrue(%HasFastDoubleElements([1.1,2]));
|
||||||
|
|
||||||
// Push
|
// This code exists to eliminate the learning influence of AllocationSites
|
||||||
var a0 = [1, 2, 3];
|
// on the following tests.
|
||||||
if (%HasFastSmiElements(a0)) {
|
var __sequence = 0;
|
||||||
assertTrue(%HasFastSmiElements(a0));
|
function make_array_string(literal) {
|
||||||
a0.push(4);
|
this.__sequence = this.__sequence + 1;
|
||||||
assertTrue(%HasFastSmiElements(a0));
|
return "/* " + this.__sequence + " */ " + literal;
|
||||||
a0.push(1.3);
|
|
||||||
assertTrue(%HasFastDoubleElements(a0));
|
|
||||||
a0.push(1.5);
|
|
||||||
assertTrue(%HasFastDoubleElements(a0));
|
|
||||||
a0.push({});
|
|
||||||
assertTrue(%HasFastObjectElements(a0));
|
|
||||||
a0.push({});
|
|
||||||
assertTrue(%HasFastObjectElements(a0));
|
|
||||||
} else {
|
|
||||||
assertTrue(%HasFastObjectElements(a0));
|
|
||||||
a0.push(4);
|
|
||||||
a0.push(1.3);
|
|
||||||
a0.push(1.5);
|
|
||||||
a0.push({});
|
|
||||||
a0.push({});
|
|
||||||
assertTrue(%HasFastObjectElements(a0));
|
|
||||||
}
|
}
|
||||||
|
function make_array(literal) {
|
||||||
|
return eval(make_array_string(literal));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Push
|
||||||
|
var a0 = make_array("[1, 2, 3]");
|
||||||
|
assertTrue(%HasFastSmiElements(a0));
|
||||||
|
a0.push(4);
|
||||||
|
assertTrue(%HasFastSmiElements(a0));
|
||||||
|
a0.push(1.3);
|
||||||
|
assertTrue(%HasFastDoubleElements(a0));
|
||||||
|
a0.push(1.5);
|
||||||
|
assertTrue(%HasFastDoubleElements(a0));
|
||||||
|
a0.push({});
|
||||||
|
assertTrue(%HasFastObjectElements(a0));
|
||||||
|
a0.push({});
|
||||||
|
assertTrue(%HasFastObjectElements(a0));
|
||||||
assertEquals([1,2,3,4,1.3,1.5,{},{}], a0);
|
assertEquals([1,2,3,4,1.3,1.5,{},{}], a0);
|
||||||
|
|
||||||
// Concat
|
// Concat
|
||||||
|
Loading…
Reference in New Issue
Block a user