| // Copyright 2014 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 |
| // Gather type feedback for both branches. |
| // Gather type feedback for g, but only on one branch for f. |
| %PrepareFunctionForOptimization(g); |
| %OptimizeFunctionOnNextCall(g); |
| // Optimize g, which inlines f. Both branches in f will see the constant. |
| // Gather type feedback for both branches. |
| // Gather type feedback for g, but only on one branch for f. |
| %PrepareFunctionForOptimization(g); |
| %OptimizeFunctionOnNextCall(g); |
| // Optimize g, which inlines f. Both branches in f will see the constant. |