| Index: runtime/vm/intermediate_language.h
|
| ===================================================================
|
| --- runtime/vm/intermediate_language.h (revision 29065)
|
| +++ runtime/vm/intermediate_language.h (working copy)
|
| @@ -2219,14 +2219,18 @@
|
| class StoreContextInstr : public TemplateInstruction<1> {
|
| public:
|
| explicit StoreContextInstr(Value* value) {
|
| - SetInputAt(0, value);
|
| + SetInputAt(kValuePos, value);
|
| }
|
|
|
| + enum {
|
| + kValuePos = 0
|
| + };
|
| +
|
| DECLARE_INSTRUCTION(StoreContext)
|
|
|
| virtual intptr_t ArgumentCount() const { return 0; }
|
|
|
| - Value* value() const { return inputs_[0]; }
|
| + Value* value() const { return inputs_[kValuePos]; }
|
|
|
| virtual bool CanDeoptimize() const { return false; }
|
|
|
| @@ -3419,17 +3423,24 @@
|
| StoreBarrierType emit_store_barrier)
|
| : field_(field),
|
| emit_store_barrier_(emit_store_barrier) {
|
| - SetInputAt(0, instance);
|
| - SetInputAt(1, value);
|
| + SetInputAt(kInstancePos, instance);
|
| + SetInputAt(kValuePos, value);
|
| }
|
|
|
| DECLARE_INSTRUCTION(StoreInstanceField)
|
| +
|
| + enum {
|
| + kInstancePos = 0,
|
| + kValuePos = 1
|
| + };
|
| +
|
| + Value* instance() const { return inputs_[kInstancePos]; }
|
| + Value* value() const { return inputs_[kValuePos]; }
|
| +
|
| virtual CompileType* ComputeInitialType() const;
|
|
|
| const Field& field() const { return field_; }
|
|
|
| - Value* instance() const { return inputs_[0]; }
|
| - Value* value() const { return inputs_[1]; }
|
| bool ShouldEmitStoreBarrier() const {
|
| return value()->NeedsStoreBuffer()
|
| && (emit_store_barrier_ == kEmitStoreBarrier);
|
| @@ -3534,14 +3545,18 @@
|
| StoreStaticFieldInstr(const Field& field, Value* value)
|
| : field_(field) {
|
| ASSERT(field.IsZoneHandle());
|
| - SetInputAt(0, value);
|
| + SetInputAt(kValuePos, value);
|
| }
|
|
|
| + enum {
|
| + kValuePos = 0
|
| + };
|
| +
|
| DECLARE_INSTRUCTION(StoreStaticField)
|
| virtual CompileType* ComputeInitialType() const;
|
|
|
| const Field& field() const { return field_; }
|
| - Value* value() const { return inputs_[0]; }
|
| + Value* value() const { return inputs_[kValuePos]; }
|
|
|
| virtual void PrintOperandsTo(BufferFormatter* f) const;
|
|
|
| @@ -3696,17 +3711,24 @@
|
| : emit_store_barrier_(emit_store_barrier),
|
| index_scale_(index_scale),
|
| class_id_(class_id) {
|
| - SetInputAt(0, array);
|
| - SetInputAt(1, index);
|
| - SetInputAt(2, value);
|
| + SetInputAt(kArrayPos, array);
|
| + SetInputAt(kIndexPos, index);
|
| + SetInputAt(kValuePos, value);
|
| deopt_id_ = deopt_id;
|
| }
|
|
|
| DECLARE_INSTRUCTION(StoreIndexed)
|
|
|
| - Value* array() const { return inputs_[0]; }
|
| - Value* index() const { return inputs_[1]; }
|
| - Value* value() const { return inputs_[2]; }
|
| + enum {
|
| + kArrayPos = 0,
|
| + kIndexPos = 1,
|
| + kValuePos = 2
|
| + };
|
| +
|
| + Value* array() const { return inputs_[kArrayPos]; }
|
| + Value* index() const { return inputs_[kIndexPos]; }
|
| + Value* value() const { return inputs_[kValuePos]; }
|
| +
|
| intptr_t index_scale() const { return index_scale_; }
|
| intptr_t class_id() const { return class_id_; }
|
|
|
| @@ -4197,15 +4219,20 @@
|
| const AbstractType& type)
|
| : offset_in_bytes_(offset_in_bytes), type_(type) {
|
| ASSERT(type.IsZoneHandle()); // May be null if field is not an instance.
|
| - SetInputAt(0, value);
|
| - SetInputAt(1, dest);
|
| + SetInputAt(kValuePos, value);
|
| + SetInputAt(kDestPos, dest);
|
| }
|
|
|
| + enum {
|
| + kValuePos = 0,
|
| + kDestPos = 1
|
| + };
|
| +
|
| DECLARE_INSTRUCTION(StoreVMField)
|
| virtual CompileType* ComputeInitialType() const;
|
|
|
| - Value* value() const { return inputs_[0]; }
|
| - Value* dest() const { return inputs_[1]; }
|
| + Value* value() const { return inputs_[kValuePos]; }
|
| + Value* dest() const { return inputs_[kDestPos]; }
|
| intptr_t offset_in_bytes() const { return offset_in_bytes_; }
|
| const AbstractType& type() const { return type_; }
|
|
|
|
|