| Index: test/mjsunit/regress/regress-crbug-243868.js
|
| diff --git a/test/mjsunit/regress/regress-crbug-242870.js b/test/mjsunit/regress/regress-crbug-243868.js
|
| similarity index 79%
|
| copy from test/mjsunit/regress/regress-crbug-242870.js
|
| copy to test/mjsunit/regress/regress-crbug-243868.js
|
| index 7183375ca811cedc81c870d34e694e98cf727f9b..106d9cc78bce7795cd450fa0d07794f9f004a3af 100644
|
| --- a/test/mjsunit/regress/regress-crbug-242870.js
|
| +++ b/test/mjsunit/regress/regress-crbug-243868.js
|
| @@ -29,15 +29,18 @@
|
|
|
| var non_const_true = true;
|
|
|
| -function f() {
|
| - return (non_const_true || true && g());
|
| +function f(o) {
|
| + return (non_const_true && (o.val == null || false));
|
| }
|
|
|
| -function g() {
|
| - for (;;) {}
|
| -}
|
| +// Create an object with a constant function in another realm.
|
| +var realm = Realm.create();
|
| +var realmObject = Realm.eval(realm, "function g() {}; var o = { val:g }; o;")
|
| +
|
| +// Make the CompareNil IC in the function monomorphic.
|
| +assertFalse(f(realmObject));
|
| +assertFalse(f(realmObject));
|
|
|
| -assertTrue(f());
|
| -assertTrue(f());
|
| +// Optimize the function containing the CompareNil IC.
|
| %OptimizeFunctionOnNextCall(f);
|
| -assertTrue(f());
|
| +assertFalse(f(realmObject));
|
|
|