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 function optimize(crankshaft_test) { 8 crankshaft_test(); 9 crankshaft_test(); 10 %OptimizeFunctionOnNextCall(crankshaft_test); 11 crankshaft_test(); 12 } 13 14 function f() { 15 var v1 = 0; 16 var v2 = -0; 17 var t = v2++; 18 v2++; 19 return Math.max(v2++, v1++); 20 } 21 22 optimize(f); 23