Home | History | Annotate | Download | only in regress
      1 // 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 
      7 function 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 
     16 c = {
     17   "one" : { x : 1},
     18   "two" : { x : 2},
     19   "thr" : { x : 3, z : 4},
     20 };
     21 
     22 foo({}, c);
     23 foo({}, c);
     24 %OptimizeFunctionOnNextCall(foo);
     25 foo({}, c);
     26