Index: test/mjsunit/regress/regress-crbug-640497.js |
diff --git a/test/mjsunit/regress/regress-crbug-644245.js b/test/mjsunit/regress/regress-crbug-640497.js |
similarity index 50% |
copy from test/mjsunit/regress/regress-crbug-644245.js |
copy to test/mjsunit/regress/regress-crbug-640497.js |
index 7f4e00599e7eabfd8923c81debd3633bcfb095fb..c637badb66d06d018cbacb12bbb96ae7c877348e 100644 |
--- a/test/mjsunit/regress/regress-crbug-644245.js |
+++ b/test/mjsunit/regress/regress-crbug-640497.js |
@@ -4,14 +4,15 @@ |
// Flags: --allow-natives-syntax --turbo --turbo-escape |
-function f() { |
- try { |
- throw "boom"; |
- } catch(e) { |
- %_DeoptimizeNow(); |
- } |
-} |
+// Warm up {g} with arrays and strings. |
+function g(v) { return v.length; } |
+assertEquals(1, g("x")); |
+assertEquals(2, g("xy")); |
+assertEquals(1, g([1])); |
+assertEquals(2, g([1,2])); |
+// Inline into {f}, where we see only an array. |
+function f() { assertEquals(0, g([])); } |
f(); |
f(); |
%OptimizeFunctionOnNextCall(f); |