blob: 6647d1228685ddd7596438305fa63dfe6a28e7a0 [file] [log] [blame]
Ben Murdochb8a8cc12014-11-26 15:28:44 +00001// Copyright 2014 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Flags: --allow-natives-syntax
6
7function foo(a, c){
8 for(var f in c) {
9 if ("object" === typeof c[f]) {
10 a[f] = c[f];
11 foo(a[f], c[f]);
12 }
13 }
14};
15
16c = {
17 "one" : { x : 1},
18 "two" : { x : 2},
19 "thr" : { x : 3, z : 4},
20};
21
22foo({}, c);
23foo({}, c);
24%OptimizeFunctionOnNextCall(foo);
25foo({}, c);