| // Copyright 2016 the V8 project authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| // Flags: --allow-natives-syntax |
| %PrepareFunctionForOptimization(g1); |
| %OptimizeFunctionOnNextCall(g1); |
| assertEquals("hey", g1()); |
| %PrepareFunctionForOptimization(g2); |
| %OptimizeFunctionOnNextCall(g2); |
| assertEquals("hey", g2()); |
| %PrepareFunctionForOptimization(g3); |
| %OptimizeFunctionOnNextCall(g3); |
| assertEquals("hey", g3()); |
| %PrepareFunctionForOptimization(g4); |
| %OptimizeFunctionOnNextCall(g4); |
| assertEquals("hey", g4()); |