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