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.
5 // Flags: --allow-natives-syntax --block-concurrent-recompilation
6 // Flags: --no-concurrent-osr
12 function get_closure() {
13 return function add_field(obj, osr) {
17 %OptimizeFunctionOnNextCall(add_field, "osr");
19 for (var i = 0; i < 10; i++) {
26 var f1 = get_closure();
27 f1(new Ctor(), false);
28 f1(new Ctor(), false);
30 %OptimizeFunctionOnNextCall(f1, "concurrent");
32 // Kick off concurrent recompilation and OSR.
35 assertOptimized(f1, "no sync");
37 // Flush the optimizing compiler's queue.
38 %NotifyContextDisposed();
39 assertUnoptimized(f1, "no sync");
44 var f2 = get_closure();