| Index: test/mjsunit/regress/regress-crbug-631318-7.js
|
| diff --git a/test/mjsunit/compiler/regress-5158.js b/test/mjsunit/regress/regress-crbug-631318-7.js
|
| similarity index 57%
|
| copy from test/mjsunit/compiler/regress-5158.js
|
| copy to test/mjsunit/regress/regress-crbug-631318-7.js
|
| index ead5f4ed9d36bde7ddf9036f8f18bc11bc386ed3..7d03fa85516ebbd9a205abfa04576b32f05f210c 100644
|
| --- a/test/mjsunit/compiler/regress-5158.js
|
| +++ b/test/mjsunit/regress/regress-crbug-631318-7.js
|
| @@ -4,13 +4,11 @@
|
|
|
| // Flags: --allow-natives-syntax
|
|
|
| -function foo(x) {
|
| - x = +x;
|
| - return (x > 0) ? x : 0 - x;
|
| -}
|
| -
|
| +function foo(x) { return x * x; }
|
| foo(1);
|
| -foo(-1);
|
| -foo(0);
|
| -%OptimizeFunctionOnNextCall(foo);
|
| -assertEquals(2147483648, foo(-2147483648));
|
| +foo(2);
|
| +
|
| +function bar(x) { foo(x); }
|
| +%OptimizeFunctionOnNextCall(bar);
|
| +
|
| +assertThrows(() => bar(Symbol.toPrimitive));
|
|
|