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

Unified Diff: src/parsing/parser.cc

Issue 1575333004: Propagate the "calls eval" bit from ScopeInfo to lazily-compiled arrow functions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Skip test on ignition Created 4 years, 11 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 | « no previous file | test/mjsunit/mjsunit.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser.cc
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc
index 96cff210f09532c4f8e51b5095a50258a46d8e8f..459002908e38f6d385091509ba2ff744624869f0 100644
--- a/src/parsing/parser.cc
+++ b/src/parsing/parser.cc
@@ -1036,9 +1036,19 @@ FunctionLiteral* Parser::ParseLazy(Isolate* isolate, ParseInfo* info,
bool ok = true;
if (shared_info->is_arrow()) {
+ // TODO(adamk): We should construct this scope from the ScopeInfo.
Scope* scope =
NewScope(scope_, FUNCTION_SCOPE, FunctionKind::kArrowFunction);
+
+ // These two bits only need to be explicitly set because we're
+ // not passing the ScopeInfo to the Scope constructor.
+ // TODO(adamk): Remove these calls once the above NewScope call
+ // passes the ScopeInfo.
+ if (shared_info->scope_info()->CallsEval()) {
+ scope->RecordEvalCall();
+ }
SetLanguageMode(scope, shared_info->language_mode());
+
scope->set_start_position(shared_info->start_position());
ExpressionClassifier formals_classifier;
ParserFormalParameters formals(scope);
« no previous file with comments | « no previous file | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698