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 7var o = {a:1.5, b:{}}; 8 9function f(o) { 10 var result = []; 11 for (var k in o) { 12 result[result.length] = o[k]; 13 } 14 return result; 15} 16 17f(o); 18f(o); 19%OptimizeFunctionOnNextCall(f); 20var array = f(o); 21o.a = 1.7; 22assertEquals(1.5, array[0]); 23