Index: test/mjsunit/regress/regress-368243.js |
diff --git a/test/mjsunit/regress/regress-361608.js b/test/mjsunit/regress/regress-368243.js |
similarity index 50% |
copy from test/mjsunit/regress/regress-361608.js |
copy to test/mjsunit/regress/regress-368243.js |
index b3cc90cfd4b06afb3c7424758e23f91d685e3aa2..6647d1228685ddd7596438305fa63dfe6a28e7a0 100644 |
--- a/test/mjsunit/regress/regress-361608.js |
+++ b/test/mjsunit/regress/regress-368243.js |
@@ -4,17 +4,22 @@ |
// Flags: --allow-natives-syntax |
-function f() {}; |
-int_array = [1]; |
- |
-function foo() { |
- var x; |
- for (var i = -1; i < 0; i++) { |
- x = int_array[i + 1]; |
- f(function() { x = i; }); |
+function foo(a, c){ |
+ for(var f in c) { |
+ if ("object" === typeof c[f]) { |
+ a[f] = c[f]; |
+ foo(a[f], c[f]); |
+ } |
} |
-} |
+}; |
+ |
+c = { |
+ "one" : { x : 1}, |
+ "two" : { x : 2}, |
+ "thr" : { x : 3, z : 4}, |
+}; |
-foo(); |
+foo({}, c); |
+foo({}, c); |
%OptimizeFunctionOnNextCall(foo); |
-foo(); |
+foo({}, c); |