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); |
}; |