| // 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 --block-concurrent-recompilation |
| return function add_field(obj, osr) { |
| for (var i = 0; i < 10; i++) { |
| %PrepareFunctionForOptimization(f1); |
| %OptimizeFunctionOnNextCall(f1, "concurrent"); |
| // Kick off concurrent recompilation and OSR. |
| %PrepareFunctionForOptimization(f1); |
| // Flush the optimizing compiler's queue. |
| %NotifyContextDisposed(); |
| %PrepareFunctionForOptimization(f2); |