blob: c572c1ee36383835d3e6d068a3c2b4a6fc3e8871 [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
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]);