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..02bcca26119cb4230a11d221a628a5280778edfd 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]; |
Jakob Kummerow
2014/05/07 16:16:09
nit: spaces around '=' (and ',' in the next line).
|
+ 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); |