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

Unified Diff: runtime/vm/intermediate_language.h

Issue 10460002: Move CreateArray and CreateClosure to new location template. (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
Index: runtime/vm/intermediate_language.h
===================================================================
--- runtime/vm/intermediate_language.h (revision 8091)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -966,7 +966,7 @@
};
-class CreateArrayComp : public Computation {
+class CreateArrayComp : public TemplateComputation<1> {
public:
CreateArrayComp(intptr_t token_index,
intptr_t try_index,
@@ -974,14 +974,14 @@
Value* element_type)
: token_index_(token_index),
try_index_(try_index),
- elements_(elements),
- element_type_(element_type) {
+ elements_(elements) {
#if defined(DEBUG)
for (int i = 0; i < ElementCount(); ++i) {
ASSERT(ElementAt(i) != NULL);
}
- ASSERT(element_type_ != NULL);
+ ASSERT(element_type != NULL);
#endif
+ inputs_[0] = element_type;
}
DECLARE_COMPUTATION(CreateArray)
@@ -990,7 +990,7 @@
intptr_t try_index() const { return try_index_; }
intptr_t ElementCount() const { return elements_->length(); }
Value* ElementAt(intptr_t i) const { return (*elements_)[i]; }
- Value* element_type() const { return element_type_; }
+ Value* element_type() const { return inputs_[0]; }
virtual intptr_t InputCount() const;
virtual Value* InputAt(intptr_t i) const { return ElementAt(i); }
@@ -1001,7 +1001,6 @@
const intptr_t token_index_;
const intptr_t try_index_;
ZoneGrowableArray<Value*>* const elements_;
- Value* element_type_;
DISALLOW_COPY_AND_ASSIGN(CreateArrayComp);
};

Powered by Google App Engine
This is Rietveld 408576698