| Index: test/mjsunit/allocation-site-info.js
|
| diff --git a/test/mjsunit/allocation-site-info.js b/test/mjsunit/allocation-site-info.js
|
| index 542f874f334c7a5bf70cc067662c4d2b595a7641..1369a2d2ec801b1861d7b4f91d9fcd5936ec1746 100644
|
| --- a/test/mjsunit/allocation-site-info.js
|
| +++ b/test/mjsunit/allocation-site-info.js
|
| @@ -89,7 +89,6 @@ function assertNotHoley(obj, name_opt) {
|
| }
|
|
|
| if (support_smi_only_arrays) {
|
| -
|
| obj = [];
|
| assertNotHoley(obj);
|
| assertKind(elements_kind.fast_smi_only, obj);
|
| @@ -134,9 +133,7 @@ if (support_smi_only_arrays) {
|
| obj = fastliteralcase(get_standard_literal(), 1.5);
|
| assertKind(elements_kind.fast_double, obj);
|
| obj = fastliteralcase(get_standard_literal(), 2);
|
| - // TODO(hpayer): bring the following assert back as soon as allocation
|
| - // sites work again for fast literals
|
| - //assertKind(elements_kind.fast_double, obj);
|
| + assertKind(elements_kind.fast_double, obj);
|
|
|
| // The test below is in a loop because arrays that live
|
| // at global scope without the chance of being recreated
|
| @@ -176,9 +173,7 @@ if (support_smi_only_arrays) {
|
| obj = fastliteralcase_smifast("carter");
|
| assertKind(elements_kind.fast, obj);
|
| obj = fastliteralcase_smifast(2);
|
| - // TODO(hpayer): bring the following assert back as soon as allocation
|
| - // sites work again for fast literals
|
| - //assertKind(elements_kind.fast, obj);
|
| + assertKind(elements_kind.fast, obj);
|
|
|
| function newarraycase_smidouble(value) {
|
| var a = new Array();
|
| @@ -305,9 +300,26 @@ if (support_smi_only_arrays) {
|
| var realmBArray = Realm.eval(realmB, "Array");
|
| instanceof_check(Array);
|
| instanceof_check(realmBArray);
|
| - %OptimizeFunctionOnNextCall(instanceof_check);
|
| + %OptimizeFunctionOnNextCall(instanceof_check);
|
| +
|
| + // No de-opt will occur because HCallNewArray wasn't selected, on account of
|
| + // the call site not being monomorphic to Array.
|
| + instanceof_check(Array);
|
| + assertTrue(2 != %GetOptimizationStatus(instanceof_check));
|
| + instanceof_check(realmBArray);
|
| + assertTrue(2 != %GetOptimizationStatus(instanceof_check));
|
| +
|
| + // Try to optimize again, but first clear all type feedback, and allow it
|
| + // to be monomorphic on first call. Only after crankshafting do we introduce
|
| + // realmBArray. This should deopt the method.
|
| + %DeoptimizeFunction(instanceof_check);
|
| + %ClearFunctionTypeFeedback(instanceof_check);
|
| + instanceof_check(Array);
|
| + instanceof_check(Array);
|
| + %OptimizeFunctionOnNextCall(instanceof_check);
|
| instanceof_check(Array);
|
| assertTrue(2 != %GetOptimizationStatus(instanceof_check));
|
| +
|
| instanceof_check(realmBArray);
|
| assertTrue(1 != %GetOptimizationStatus(instanceof_check));
|
| }
|
|
|