Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / v8 / test / mjsunit / regress / regress-load-field-by-index.js
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 var o = {a:1.5, b:{}};
8
9 function f(o) {
10   var result = [];
11   for (var k in o) {
12     result[result.length] = o[k];
13   }
14   return result;
15 }
16
17 f(o);
18 f(o);
19 %OptimizeFunctionOnNextCall(f);
20 var array = f(o);
21 o.a = 1.7;
22 assertEquals(1.5, array[0]);