Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1606)

Unified Diff: test/mjsunit/compiler/lazy-iife-no-parens.js

Issue 1304923004: When parsing inner functions, try to allocate in a temporary Zone (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: get terminology less wrong in comments Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/test-parsing.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(){}(); })(); }();
« no previous file with comments | « test/cctest/test-parsing.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698