| Index: test/mjsunit/allocation-site-info.js
|
| diff --git a/test/mjsunit/allocation-site-info.js b/test/mjsunit/allocation-site-info.js
|
| index d85ce3ef533a3743b99373e536588e8c9e595fa9..d43d2630671b907addd7d37709e479d0b2eeaa85 100644
|
| --- a/test/mjsunit/allocation-site-info.js
|
| +++ b/test/mjsunit/allocation-site-info.js
|
| @@ -41,7 +41,7 @@
|
|
|
| // support_smi_only_arrays = %HasFastSmiElements(new Array(1,2,3,4,5,6,7,8));
|
| support_smi_only_arrays = true;
|
| -optimize_constructed_arrays = false;
|
| +optimize_constructed_arrays = true;
|
|
|
| if (support_smi_only_arrays) {
|
| print("Tests include smi-only arrays.");
|
| @@ -284,5 +284,25 @@ if (support_smi_only_arrays) {
|
| assertKind(elements_kind.fast, obj);
|
| obj = newarraycase_list_smiobj(2);
|
| assertKind(elements_kind.fast, obj);
|
| +
|
| + // Verify that cross context calls work
|
| + var realmA = Realm.current();
|
| + var realmB = Realm.create();
|
| + assertEquals(0, realmA);
|
| + assertEquals(1, realmB);
|
| +
|
| + function instanceof_check(type) {
|
| + assertTrue(new type() instanceof type);
|
| + assertTrue(new type(5) instanceof type);
|
| + assertTrue(new type(1,2,3) instanceof type);
|
| + }
|
| +
|
| + var realmBArray = Realm.eval(realmB, "Array");
|
| + instanceof_check(Array);
|
| + instanceof_check(realmBArray);
|
| + %OptimizeFunctionOnNextCall(instanceof_check);
|
| + instanceof_check(Array);
|
| + instanceof_check(realmBArray);
|
| + assertTrue(2 != %GetOptimizationStatus(instanceof_check));
|
| }
|
| }
|
|
|