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

Unified Diff: src/parser.cc

Issue 716853003: Classes: Add support for arguments in default constructor (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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
« no previous file with comments | « no previous file | src/runtime/runtime.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 e34854fe7adacd564655429abd05a62caa2d4b20..4c813554e7e07174bf1994f08713dab426a8303a 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -302,10 +302,12 @@ FunctionLiteral* Parser::DefaultConstructor(bool call_super, Scope* scope,
body = new (zone()) ZoneList<Statement*>(1, zone());
if (call_super) {
- Expression* prop = SuperReference(function_scope, factory(), pos);
ZoneList<Expression*>* args =
new (zone()) ZoneList<Expression*>(0, zone());
- Call* call = factory()->NewCall(prop, args, pos);
+ CallRuntime* call = factory()->NewCallRuntime(
+ ast_value_factory()->empty_string(),
+ Runtime::FunctionForId(Runtime::kDefaultConstructorSuperCall), args,
+ pos);
body->Add(factory()->NewExpressionStatement(call, pos), zone());
}
« no previous file with comments | « no previous file | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698