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

Unified Diff: test/mjsunit/preparse-toplevel-strict-eval.js

Issue 2413213002: Allow lazy parsing of eval-created functions (Closed)
Patch Set: disallow preparsing without scope resolution of strict-mode evaled functions Created 4 years, 2 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/preparse-toplevel-strict-eval.js
diff --git a/test/mjsunit/regress/regress-crbug-580934.js b/test/mjsunit/preparse-toplevel-strict-eval.js
similarity index 57%
copy from test/mjsunit/regress/regress-crbug-580934.js
copy to test/mjsunit/preparse-toplevel-strict-eval.js
index 02cbfca79649874628439f342de26b3cf9ccb59b..6d99ac755e35d097cef9fa5334151afee9320ce1 100644
--- a/test/mjsunit/regress/regress-crbug-580934.js
+++ b/test/mjsunit/preparse-toplevel-strict-eval.js
@@ -1,18 +1,13 @@
// 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.
-//
+
// Flags: --min-preparse-length=0
"use strict";
-{
- let one = () => {
- return "example.com";
- };
-
- let two = () => {
- return one();
- };
+var x = 1;
+var g = eval("var y = 100; function h(s) { if (s) x = s; return x+y; }; h");
- assertEquals("example.com", two());
-}
+assertEquals(101, g());
+assertEquals(102, g(2));
+assertEquals(102, g(2));
« 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