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

Unified Diff: runtime/vm/parser.h

Issue 1255063005: Constructor tear-off closures (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Skip tearoff test in analyzer and dart2js Created 5 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
Index: runtime/vm/parser.h
diff --git a/runtime/vm/parser.h b/runtime/vm/parser.h
index 029cff106fc7f2920c8caa4a73c2f780c05a3e57..2e74b1c575e43e348d56e741d5cc4ea0c141583a 100644
--- a/runtime/vm/parser.h
+++ b/runtime/vm/parser.h
@@ -509,6 +509,8 @@ class Parser : public ValueObject {
AstNode* ParseSuperOperator();
AstNode* BuildUnarySuperOperator(Token::Kind op, PrimaryNode* super);
+ static bool ParseFormalParameters(const Function& func, ParamList* params);
+
static void SetupDefaultsForOptionalParams(const ParamList* params,
Array* default_values);
ClosureNode* CreateImplicitClosureNode(const Function& func,
@@ -536,6 +538,8 @@ class Parser : public ValueObject {
Array* default_values);
SequenceNode* ParseImplicitClosure(const Function& func,
Array* default_values);
+ SequenceNode* ParseConstructorClosure(const Function& func,
+ Array* default_values);
void BuildDispatcherScope(const Function& func,
const ArgumentsDescriptor& desc,
@@ -707,7 +711,12 @@ class Parser : public ValueObject {
AstNode* ParseMapLiteral(intptr_t type_pos,
bool is_const,
const TypeArguments& type_arguments);
+
+ RawFunction* BuildConstructorClosureFunction(const Function& ctr,
+ intptr_t token_pos);
AstNode* ParseNewOperator(Token::Kind op_kind);
+ void ParseConstructorClosurization(Function* constructor,
+ TypeArguments* type_arguments);
// An implicit argument, if non-null, is prepended to the returned list.
ArgumentListNode* ParseActualParameters(ArgumentListNode* implicit_arguments,
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/parser.cc » ('j') | runtime/vm/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698