Index: test/mjsunit/regress/regress-crbug-631318-14.js |
diff --git a/test/mjsunit/compiler/regress-5158.js b/test/mjsunit/regress/regress-crbug-631318-14.js |
similarity index 57% |
copy from test/mjsunit/compiler/regress-5158.js |
copy to test/mjsunit/regress/regress-crbug-631318-14.js |
index ead5f4ed9d36bde7ddf9036f8f18bc11bc386ed3..829bf900b676919dc59f702888c3e8407bf44655 100644 |
--- a/test/mjsunit/compiler/regress-5158.js |
+++ b/test/mjsunit/regress/regress-crbug-631318-14.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)); |