| Index: test/mjsunit/compiler/lazy-iife-no-parens.js
|
| diff --git a/test/mjsunit/regress/regress-4255-1.js b/test/mjsunit/compiler/lazy-iife-no-parens.js
|
| similarity index 76%
|
| copy from test/mjsunit/regress/regress-4255-1.js
|
| copy to test/mjsunit/compiler/lazy-iife-no-parens.js
|
| index 78fe860290be517983d226cce8b46dd7cc948d5c..cbad4da4a6454f2cc31fda404dda26c30b5d4a1b 100644
|
| --- a/test/mjsunit/regress/regress-4255-1.js
|
| +++ b/test/mjsunit/compiler/lazy-iife-no-parens.js
|
| @@ -18,9 +18,26 @@
|
| // comments to trigger lazy compilation comments to trigger lazy compilation
|
| // comments to trigger lazy compilation comments to trigger lazy compilation
|
|
|
| -'use strict';
|
| -{
|
| - let x = function() {};
|
| - // Trigger OSR.
|
| - for (var i = 0; i < 1000000; i++);
|
| +// Test that IIFEs are compilable even under lazy conditions where the enclosing
|
| +// parentheses heuristic has not been triggered.
|
| +
|
| +function f() {
|
| + return function(){ return 0; }();
|
| +}
|
| +
|
| +function g() {
|
| + function h() {
|
| + return function(){ return 0; }();
|
| + }
|
| + return h();
|
| }
|
| +
|
| +f();
|
| +
|
| +g();
|
| +
|
| +0, function(){}();
|
| +
|
| +(function(){ 0, function(){}(); })();
|
| +
|
| +0, function(){ (function(){ 0, function(){}(); })(); }();
|
|
|