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

Unified Diff: src/parser.cc

Issue 923683002: Fix lazy parsing for functions that use super. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Increment the PreparserData version Created 5 years, 10 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/parser.h ('k') | src/preparse-data.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index 15ed6ded0e8e08b417b1f6a7ebbe2c2f63240844..0e0e437d8b63ce030d0c0b32a8be93f71102dfff 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -3853,6 +3853,7 @@ void Parser::SkipLazyFunctionBody(const AstRawString* function_name,
*materialized_literal_count = entry.literal_count();
*expected_property_count = entry.property_count();
scope_->SetLanguageMode(entry.language_mode());
+ if (entry.uses_super_property()) scope_->RecordSuperPropertyUsage();
return;
}
cached_parse_data_->Reject();
@@ -3884,12 +3885,16 @@ void Parser::SkipLazyFunctionBody(const AstRawString* function_name,
*materialized_literal_count = logger.literals();
*expected_property_count = logger.properties();
scope_->SetLanguageMode(logger.language_mode());
+ if (logger.scope_uses_super_property()) {
+ scope_->RecordSuperPropertyUsage();
+ }
if (produce_cached_parse_data()) {
DCHECK(log_);
// Position right after terminal '}'.
int body_end = scanner()->location().end_pos;
log_->LogFunction(function_block_pos, body_end, *materialized_literal_count,
- *expected_property_count, scope_->language_mode());
+ *expected_property_count, scope_->language_mode(),
+ scope_->uses_super_property());
}
}
« no previous file with comments | « src/parser.h ('k') | src/preparse-data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698