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