blob: 24fc641797c17011714c0650dde531f711dff3bb [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 --fold-constants
6
7var result = 0;
8var o1 = {};
9o2 = {y:1.5};
10o2.y = 0;
11o3 = o2.y;
12
13function crash() {
14 for (var i = 0; i < 10; i++) {
15 result += o1.x + o3.foo;
16 }
17}
18
19crash();
20%OptimizeFunctionOnNextCall(crash);
21crash();