| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 // comments to trigger lazy compilation comments to trigger lazy compilation | 5 // comments to trigger lazy compilation comments to trigger lazy compilation |
| 6 // comments to trigger lazy compilation comments to trigger lazy compilation | 6 // comments to trigger lazy compilation comments to trigger lazy compilation |
| 7 // comments to trigger lazy compilation comments to trigger lazy compilation | 7 // comments to trigger lazy compilation comments to trigger lazy compilation |
| 8 // comments to trigger lazy compilation comments to trigger lazy compilation | 8 // comments to trigger lazy compilation comments to trigger lazy compilation |
| 9 // comments to trigger lazy compilation comments to trigger lazy compilation | 9 // comments to trigger lazy compilation comments to trigger lazy compilation |
| 10 // comments to trigger lazy compilation comments to trigger lazy compilation | 10 // comments to trigger lazy compilation comments to trigger lazy compilation |
| 11 // comments to trigger lazy compilation comments to trigger lazy compilation | 11 // comments to trigger lazy compilation comments to trigger lazy compilation |
| 12 // comments to trigger lazy compilation comments to trigger lazy compilation | 12 // comments to trigger lazy compilation comments to trigger lazy compilation |
| 13 // comments to trigger lazy compilation comments to trigger lazy compilation | 13 // comments to trigger lazy compilation comments to trigger lazy compilation |
| 14 // comments to trigger lazy compilation comments to trigger lazy compilation | 14 // comments to trigger lazy compilation comments to trigger lazy compilation |
| 15 // comments to trigger lazy compilation comments to trigger lazy compilation | 15 // comments to trigger lazy compilation comments to trigger lazy compilation |
| 16 // comments to trigger lazy compilation comments to trigger lazy compilation | 16 // comments to trigger lazy compilation comments to trigger lazy compilation |
| 17 // comments to trigger lazy compilation comments to trigger lazy compilation | 17 // comments to trigger lazy compilation comments to trigger lazy compilation |
| 18 // comments to trigger lazy compilation comments to trigger lazy compilation | 18 // comments to trigger lazy compilation comments to trigger lazy compilation |
| 19 // comments to trigger lazy compilation comments to trigger lazy compilation | 19 // comments to trigger lazy compilation comments to trigger lazy compilation |
| 20 | 20 |
| 21 'use strict'; | 21 // Test that IIFEs are compilable even under lazy conditions where the enclosing |
| 22 { | 22 // parentheses heuristic has not been triggered. |
| 23 let x = function() {}; | 23 |
| 24 // Trigger OSR. | 24 function f() { |
| 25 for (var i = 0; i < 1000000; i++); | 25 return function(){ return 0; }(); |
| 26 } | 26 } |
| 27 |
| 28 function g() { |
| 29 function h() { |
| 30 return function(){ return 0; }(); |
| 31 } |
| 32 return h(); |
| 33 } |
| 34 |
| 35 f(); |
| 36 |
| 37 g(); |
| 38 |
| 39 0, function(){}(); |
| 40 |
| 41 (function(){ 0, function(){}(); })(); |
| 42 |
| 43 0, function(){ (function(){ 0, function(){}(); })(); }(); |
| OLD | NEW |