Index: test/mjsunit/array-literal-feedback.js |
diff --git a/test/mjsunit/array-literal-feedback.js b/test/mjsunit/array-literal-feedback.js |
index 93ed3bce9988bb95dd7e7b6ac6b665a1cdc96534..3e95eab1d0f1655d89407c4e4760381c62e11c25 100644 |
--- a/test/mjsunit/array-literal-feedback.js |
+++ b/test/mjsunit/array-literal-feedback.js |
@@ -93,11 +93,15 @@ if (support_smi_only_arrays) { |
} |
get_literal(3); |
- get_literal(3); |
- %OptimizeFunctionOnNextCall(get_literal); |
+ // It's important to store a from before we crankshaft get_literal, because |
+ // mementos won't be created from crankshafted code at all. |
a = get_literal(3); |
+ %OptimizeFunctionOnNextCall(get_literal); |
+ get_literal(3); |
assertOptimized(get_literal); |
assertTrue(%HasFastSmiElements(a)); |
+ // a has a memento so the transition caused by the store will affect the |
+ // boilerplate. |
a[0] = 3.5; |
// We should have transitioned the boilerplate array to double, and |