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

Unified Diff: src/parser.cc

Issue 480543002: Parse 'super' keyword. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Patch for landing (minor fix for tests in release mode) Created 6 years, 4 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/preparser.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 6c941daa978d3d53bdc6cfca5f1914195bc7d2f0..e2677b5f0ec4afd0d978dc6f47456f19837e11ff 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -619,6 +619,12 @@ Expression* ParserTraits::ThisExpression(
return factory->NewVariableProxy(scope->receiver(), pos);
}
+Expression* ParserTraits::SuperReference(
+ Scope* scope, AstNodeFactory<AstConstructionVisitor>* factory, int pos) {
+ return factory->NewSuperReference(
+ ThisExpression(scope, factory, pos)->AsVariableProxy(),
+ pos);
+}
Literal* ParserTraits::ExpressionFromLiteral(
Token::Value token, int pos,
@@ -731,6 +737,7 @@ Parser::Parser(CompilationInfo* info)
set_allow_generators(FLAG_harmony_generators);
set_allow_arrow_functions(FLAG_harmony_arrow_functions);
set_allow_harmony_numeric_literals(FLAG_harmony_numeric_literals);
+ set_allow_classes(FLAG_harmony_classes);
for (int feature = 0; feature < v8::Isolate::kUseCounterFeatureCount;
++feature) {
use_counts_[feature] = 0;
« no previous file with comments | « src/parser.h ('k') | src/preparser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698