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

Unified Diff: test/mjsunit/modules-preparse.js

Issue 2373573003: [modules] Never do lazy parsing in modules. (Closed)
Patch Set: Different approach. Created 4 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 | « src/parsing/parser.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/modules-preparse.js
diff --git a/test/mjsunit/regress/regress-crbug-648740.js b/test/mjsunit/modules-preparse.js
similarity index 65%
copy from test/mjsunit/regress/regress-crbug-648740.js
copy to test/mjsunit/modules-preparse.js
index e52d899852433bbe95bcc3c1de54a56b5c738d7f..6006ab23063fc57f68f67183d489ce7fd344de91 100644
--- a/test/mjsunit/regress/regress-crbug-648740.js
+++ b/test/mjsunit/modules-preparse.js
@@ -1,11 +1,12 @@
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-
+//
+// MODULE
// Flags: --min-preparse-length=0
-(function () {
- function foo() {
- const arguments = 42;
- }
-})()
+let foo = 42;
+function testFoo(x) { assertEquals(x, foo); }
+testFoo(42);
+foo++;
+testFoo(43);
« no previous file with comments | « src/parsing/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698