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

Unified Diff: runtime/vm/ast.h

Issue 8234016: Inline allocation of implicit closures. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 2 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 | « no previous file | runtime/vm/ast_printer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/ast.h
===================================================================
--- runtime/vm/ast.h (revision 355)
+++ runtime/vm/ast.h (working copy)
@@ -38,8 +38,8 @@
V(ArgumentListNode, "args") \
V(ArrayNode, "array") \
V(ClosureNode, "closure") \
- V(ImplicitClosureNode, "implicit closure") \
- V(StaticImplicitClosureNode, "static implicit closure") \
+ V(ImplicitInstanceClosureNode, "implicit instance closure") \
+ V(ImplicitStaticClosureNode, "implicit static closure") \
V(InstanceCallNode, "instance call") \
V(StaticCallNode, "static call") \
V(ClosureCallNode, "closure call") \
@@ -366,6 +366,7 @@
ClosureNode(intptr_t token_index, const Function& function, LocalScope* scope)
: AstNode(token_index), function_(function), scope_(scope) {
ASSERT(function.IsZoneHandle());
+ ASSERT(function.IsNonImplicitClosureFunction());
ASSERT(scope_ != NULL);
}
@@ -384,33 +385,35 @@
};
-class StaticImplicitClosureNode : public AstNode {
+class ImplicitStaticClosureNode : public AstNode {
public:
- StaticImplicitClosureNode(intptr_t token_index, const Function& function)
+ ImplicitStaticClosureNode(intptr_t token_index, const Function& function)
: AstNode(token_index), function_(function) {
ASSERT(function.IsZoneHandle());
+ ASSERT(function.IsImplicitStaticClosureFunction());
}
const Function& function() const { return function_; }
virtual void VisitChildren(AstNodeVisitor* visitor) const { }
- DECLARE_COMMON_NODE_FUNCTIONS(StaticImplicitClosureNode);
+ DECLARE_COMMON_NODE_FUNCTIONS(ImplicitStaticClosureNode);
private:
const Function& function_;
- DISALLOW_IMPLICIT_CONSTRUCTORS(StaticImplicitClosureNode);
+ DISALLOW_IMPLICIT_CONSTRUCTORS(ImplicitStaticClosureNode);
};
-class ImplicitClosureNode : public AstNode {
+class ImplicitInstanceClosureNode : public AstNode {
public:
- ImplicitClosureNode(intptr_t token_index,
- const Function& function,
- AstNode* receiver)
+ ImplicitInstanceClosureNode(intptr_t token_index,
+ const Function& function,
+ AstNode* receiver)
: AstNode(token_index), function_(function), receiver_(receiver) {
ASSERT(function.IsZoneHandle());
+ ASSERT(function.IsImplicitInstanceClosureFunction());
}
const Function& function() const { return function_; }
@@ -422,13 +425,13 @@
}
}
- DECLARE_COMMON_NODE_FUNCTIONS(ImplicitClosureNode);
+ DECLARE_COMMON_NODE_FUNCTIONS(ImplicitInstanceClosureNode);
private:
const Function& function_;
AstNode* receiver_;
- DISALLOW_IMPLICIT_CONSTRUCTORS(ImplicitClosureNode);
+ DISALLOW_IMPLICIT_CONSTRUCTORS(ImplicitInstanceClosureNode);
};
« no previous file with comments | « no previous file | runtime/vm/ast_printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698