OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Flags: --allow-natives-syntax --block-concurrent-recompilation | 5 // Flags: --allow-natives-syntax --block-concurrent-recompilation |
6 | 6 |
7 function Ctor() { | 7 function Ctor() { |
8 this.a = 1; | 8 this.a = 1; |
9 } | 9 } |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 var f1 = get_closure(); | 23 var f1 = get_closure(); |
24 f1(new Ctor(), false); | 24 f1(new Ctor(), false); |
25 f1(new Ctor(), false); | 25 f1(new Ctor(), false); |
26 | 26 |
27 %OptimizeFunctionOnNextCall(f1, "concurrent"); | 27 %OptimizeFunctionOnNextCall(f1, "concurrent"); |
28 | 28 |
29 // Kick off concurrent recompilation and OSR. | 29 // Kick off concurrent recompilation and OSR. |
30 var o = new Ctor(); | 30 var o = new Ctor(); |
31 f1(o, true); | 31 f1(o, true); |
32 assertOptimized(f1, "no sync"); | |
33 | 32 |
34 // Flush the optimizing compiler's queue. | 33 // Flush the optimizing compiler's queue. |
35 %NotifyContextDisposed(); | 34 %NotifyContextDisposed(); |
36 assertUnoptimized(f1, "no sync"); | |
37 | 35 |
38 // Trigger deopt. | 36 // Trigger deopt. |
39 o.c = 2.2; | 37 o.c = 2.2; |
40 | 38 |
41 var f2 = get_closure(); | 39 var f2 = get_closure(); |
42 f2(new Ctor(), true); | 40 f2(new Ctor(), true); |
OLD | NEW |