| Index: test/mjsunit/array-constructor-feedback.js
|
| diff --git a/test/mjsunit/array-constructor-feedback.js b/test/mjsunit/array-constructor-feedback.js
|
| index 7cd421bd1b86c16f7f3e096dc7be639f7d262022..527e2643a19e4a2f4a386dab81e10304bd2d0879 100644
|
| --- a/test/mjsunit/array-constructor-feedback.js
|
| +++ b/test/mjsunit/array-constructor-feedback.js
|
| @@ -82,7 +82,7 @@ function assertKind(expected, obj, name_opt) {
|
|
|
| if (support_smi_only_arrays) {
|
|
|
| - // Test: If a call site goes megamorphic, it loses the ability to
|
| + // Test: If a call site goes megamorphic, it retains the ability to
|
| // use allocation site feedback.
|
| (function() {
|
| function bar(t, len) {
|
| @@ -95,10 +95,7 @@ if (support_smi_only_arrays) {
|
| assertKind(elements_kind.fast_double, b);
|
| c = bar(Object, 3);
|
| b = bar(Array, 10);
|
| - assertKind(elements_kind.fast_smi_only, b);
|
| - b[0] = 3.5;
|
| - c = bar(Array, 10);
|
| - assertKind(elements_kind.fast_smi_only, c);
|
| + assertKind(elements_kind.fast_double, b);
|
| })();
|
|
|
|
|
| @@ -123,13 +120,16 @@ if (support_smi_only_arrays) {
|
| bar0(Array);
|
| %OptimizeFunctionOnNextCall(bar0);
|
| b = bar0(Array);
|
| - // We also lost our ability to record kind feedback, as the site
|
| - // is megamorphic now.
|
| - assertKind(elements_kind.fast_smi_only, b);
|
| - assertOptimized(bar0);
|
| - b[0] = 3.5;
|
| - c = bar0(Array);
|
| - assertKind(elements_kind.fast_smi_only, c);
|
| + // This only makes sense to test if we allow crankshafting
|
| + if (4 != %GetOptimizationStatus(bar0)) {
|
| + // We also lost our ability to record kind feedback, as the site
|
| + // is megamorphic now.
|
| + assertKind(elements_kind.fast_smi_only, b);
|
| + assertOptimized(bar0);
|
| + b[0] = 3.5;
|
| + c = bar0(Array);
|
| + assertKind(elements_kind.fast_smi_only, c);
|
| + }
|
| })();
|
|
|
|
|
|
|