Index: test/mjsunit/array-natives-elements.js |
diff --git a/test/mjsunit/array-natives-elements.js b/test/mjsunit/array-natives-elements.js |
index 96a8cb5d1984fd6a54089b103fb90190befd7fa1..f74f8be0d94c38846e5cb77521b46e95a26b7c6c 100644 |
--- a/test/mjsunit/array-natives-elements.js |
+++ b/test/mjsunit/array-natives-elements.js |
@@ -57,17 +57,27 @@ function array_natives_test() { |
// Push |
var a0 = [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)); |
+ if (%HasFastSmiElements(a0)) { |
+ 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)); |
+ } else { |
+ assertTrue(%HasFastObjectElements(a0)); |
+ a0.push(4); |
+ a0.push(1.3); |
+ a0.push(1.5); |
+ a0.push({}); |
+ a0.push({}); |
+ assertTrue(%HasFastObjectElements(a0)); |
+ } |
assertEquals([1,2,3,4,1.3,1.5,{},{}], a0); |
// Concat |