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