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

Unified Diff: runtime/vm/intermediate_language.h

Issue 138523004: Inline recognized List factory in the flow graph optimizer. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 11 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 | « runtime/vm/flow_graph_type_propagator.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.h
===================================================================
--- runtime/vm/intermediate_language.h (revision 32158)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -4095,29 +4095,28 @@
};
-class CreateArrayInstr : public TemplateDefinition<1> {
+class CreateArrayInstr : public TemplateDefinition<2> {
public:
CreateArrayInstr(intptr_t token_pos,
- intptr_t num_elements,
- const AbstractType& type,
- Value* element_type)
- : token_pos_(token_pos),
- num_elements_(num_elements),
- type_(type) {
- ASSERT(type_.IsZoneHandle());
- ASSERT(!type_.IsNull());
- ASSERT(type_.IsFinalized());
- SetInputAt(0, element_type);
+ Value* element_type,
+ Value* num_elements)
+ : token_pos_(token_pos) {
+ SetInputAt(kElementTypePos, element_type);
+ SetInputAt(kLengthPos, num_elements);
}
+ enum {
+ kElementTypePos = 0,
+ kLengthPos = 1
+ };
+
DECLARE_INSTRUCTION(CreateArray)
virtual CompileType ComputeType() const;
- intptr_t num_elements() const { return num_elements_; }
intptr_t token_pos() const { return token_pos_; }
- const AbstractType& type() const { return type_; }
- Value* element_type() const { return inputs_[0]; }
+ Value* element_type() const { return inputs_[kElementTypePos]; }
+ Value* num_elements() const { return inputs_[kLengthPos]; }
virtual void PrintOperandsTo(BufferFormatter* f) const;
@@ -4129,8 +4128,6 @@
private:
const intptr_t token_pos_;
- const intptr_t num_elements_;
- const AbstractType& type_;
DISALLOW_COPY_AND_ASSIGN(CreateArrayInstr);
};
« no previous file with comments | « runtime/vm/flow_graph_type_propagator.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698