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 // Flags: --no-concurrent-osr | |
7 | 6 |
8 function Ctor() { | 7 function Ctor() { |
9 this.a = 1; | 8 this.a = 1; |
10 } | 9 } |
11 | 10 |
12 function get_closure() { | 11 function get_closure() { |
13 return function add_field(obj, osr) { | 12 return function add_field(obj, osr) { |
14 obj.c = 3; | 13 obj.c = 3; |
15 var x = 0; | 14 var x = 0; |
16 if (osr) %OptimizeOsr(); | 15 if (osr) %OptimizeOsr(); |
(...skipping 17 matching lines...) Expand all Loading... |
34 | 33 |
35 // Flush the optimizing compiler's queue. | 34 // Flush the optimizing compiler's queue. |
36 %NotifyContextDisposed(); | 35 %NotifyContextDisposed(); |
37 assertUnoptimized(f1, "no sync"); | 36 assertUnoptimized(f1, "no sync"); |
38 | 37 |
39 // Trigger deopt. | 38 // Trigger deopt. |
40 o.c = 2.2; | 39 o.c = 2.2; |
41 | 40 |
42 var f2 = get_closure(); | 41 var f2 = get_closure(); |
43 f2(new Ctor(), true); | 42 f2(new Ctor(), true); |
OLD | NEW |