Index: test/mjsunit/regress/regress-crbug-604680.js |
diff --git a/test/mjsunit/regress/regress-crbug-601617.js b/test/mjsunit/regress/regress-crbug-604680.js |
similarity index 63% |
copy from test/mjsunit/regress/regress-crbug-601617.js |
copy to test/mjsunit/regress/regress-crbug-604680.js |
index 7d03fef838ea0288c4c9824aed2db2d799f1328f..3df2f2047a44653c587a1ee60b3f705ae81779fe 100644 |
--- a/test/mjsunit/regress/regress-crbug-601617.js |
+++ b/test/mjsunit/regress/regress-crbug-604680.js |
@@ -5,7 +5,7 @@ |
// Flags: --allow-natives-syntax --harmony-tailcalls |
function h() { |
- var res = g.arguments[0].x; |
+ var res = g.arguments; |
return res; |
} |
@@ -15,18 +15,31 @@ function g(o) { |
} |
function f1() { |
- var o = { x : 1 }; |
+ var o = { x : 42 }; |
var res = g(o); |
- return res; |
+ return 1; |
} |
-function f0() { |
+function f0(a, b) { |
"use strict"; |
return f1(5); |
} |
+function boom(b) { |
+ if (b) throw new Error("boom!"); |
+} |
+ |
%NeverOptimizeFunction(h); |
f0(); |
f0(); |
%OptimizeFunctionOnNextCall(f0); |
-assertEquals(1, f0()); |
+ |
+boom(false); |
+boom(false); |
+%OptimizeFunctionOnNextCall(boom); |
+ |
+try { |
+ f0(1, 2, 3); |
+ boom(true, 1, 2, 3); |
+} catch (e) { |
+} |