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

Unified Diff: runtime/vm/ast.h

Issue 10310132: Remove TuckTemp, PickTemp, use temporary locals instead. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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/code_generator_test.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 7560)
+++ runtime/vm/ast.h (working copy)
@@ -1432,16 +1432,21 @@
// instantiator is the first parameter of this factory, which is already a
// type argument vector. This case is identified by a null and unneeded
// instantiator_class.
+//
+// A temporary local is needed to hold the allocated value while the
+// constructor is being called.
class ConstructorCallNode : public AstNode {
public:
ConstructorCallNode(intptr_t token_index,
const AbstractTypeArguments& type_arguments,
const Function& constructor,
- ArgumentListNode* arguments)
+ ArgumentListNode* arguments,
+ const LocalVariable& allocated_object_var)
: AstNode(token_index),
type_arguments_(type_arguments),
constructor_(constructor),
- arguments_(arguments) {
+ arguments_(arguments),
+ allocated_object_var_(allocated_object_var) {
ASSERT(type_arguments_.IsZoneHandle());
ASSERT(constructor_.IsZoneHandle());
ASSERT(arguments_ != NULL);
@@ -1452,6 +1457,9 @@
}
const Function& constructor() const { return constructor_; }
ArgumentListNode* arguments() const { return arguments_; }
+ const LocalVariable& allocated_object_var() const {
+ return allocated_object_var_;
+ }
virtual void VisitChildren(AstNodeVisitor* visitor) const {
arguments()->Visit(visitor);
@@ -1463,6 +1471,7 @@
const AbstractTypeArguments& type_arguments_;
const Function& constructor_;
ArgumentListNode* arguments_;
+ const LocalVariable& allocated_object_var_;
DISALLOW_IMPLICIT_CONSTRUCTORS(ConstructorCallNode);
};
« no previous file with comments | « no previous file | runtime/vm/code_generator_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698