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

Unified Diff: src/parser.cc

Issue 766663003: harmony-classes: Implement 'super(...)' call syntactic restriction. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Patch for landing Created 6 years, 1 month 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
Index: src/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index 712fdd4f44e8d4e1fd61d6de14bac0be6f013222..22c0f5c142c918cc45043fc1b11efb6f4a46488d 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -301,7 +301,7 @@ FunctionLiteral* Parser::DefaultConstructor(bool call_super, Scope* scope,
Runtime::FunctionForId(Runtime::kDefaultConstructorSuperCall), args,
pos);
body->Add(factory()->NewExpressionStatement(call, pos), zone());
- function_scope->RecordSuperUsage();
+ function_scope->RecordSuperConstructorCallUsage();
}
materialized_literal_count = function_state.materialized_literal_count();
@@ -1053,8 +1053,8 @@ FunctionLiteral* Parser::ParseLazy(Utf16CharacterStream* source) {
DCHECK(expression->IsFunctionLiteral());
result = expression->AsFunctionLiteral();
} else if (shared_info->is_default_constructor()) {
- result = DefaultConstructor(shared_info->uses_super(), scope,
- shared_info->start_position(),
+ result = DefaultConstructor(shared_info->uses_super_constructor_call(),
+ scope, shared_info->start_position(),
shared_info->end_position());
} else {
result = ParseFunctionLiteral(raw_name, Scanner::Location::invalid(),

Powered by Google App Engine
This is Rietveld 408576698