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

Unified Diff: vm/intermediate_language.h

Issue 10831176: Make CreateArrayComp a call by using explicit push-argument instructions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 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
« no previous file with comments | « vm/flow_graph_builder.cc ('k') | vm/intermediate_language.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/intermediate_language.h
===================================================================
--- vm/intermediate_language.h (revision 10278)
+++ vm/intermediate_language.h (working copy)
@@ -1179,7 +1179,7 @@
};
-class CreateArrayComp : public TemplateComputation<1> {
+class CreateArrayComp : public Computation {
public:
CreateArrayComp(intptr_t token_pos,
intptr_t try_index,
@@ -1194,21 +1194,18 @@
}
ASSERT(element_type != NULL);
#endif
srdjan 2012/08/06 16:31:25 This CL causes crashes as element_type is never se
Florian Schneider 2012/08/07 08:56:18 Oh, thanks. It worked because elements_type_ seems
- inputs_[0] = element_type;
}
- DECLARE_COMPUTATION(CreateArray)
+ DECLARE_CALL_COMPUTATION(CreateArray)
+ virtual intptr_t ArgumentCount() const { return ElementCount() + 1; }
+
intptr_t token_pos() const { return token_pos_; }
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 inputs_[0]; }
+ Value* element_type() const { return element_type_; }
- virtual intptr_t InputCount() const;
- virtual Value* InputAt(intptr_t i) const;
- virtual void SetInputAt(intptr_t i, Value* value);
-
virtual void PrintOperandsTo(BufferFormatter* f) const;
virtual bool CanDeoptimize() const { return false; }
@@ -1217,6 +1214,7 @@
const intptr_t token_pos_;
const intptr_t try_index_;
ZoneGrowableArray<Value*>* const elements_;
+ Value* element_type_;
DISALLOW_COPY_AND_ASSIGN(CreateArrayComp);
};
« no previous file with comments | « vm/flow_graph_builder.cc ('k') | vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698