Chromium Code Reviews| Index: src/hydrogen-instructions.h |
| diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h |
| index a0d932fbd24311f8eeb613edc706e6002cadd60b..785d9a1cf35eb9f5cbc2073d62da571a09c918d0 100644 |
| --- a/src/hydrogen-instructions.h |
| +++ b/src/hydrogen-instructions.h |
| @@ -150,6 +150,7 @@ class LChunkBuilder; |
| V(StoreContextSlot) \ |
| V(StoreGlobal) \ |
| V(StoreKeyedFastElement) \ |
| + V(StorePixelArrayElement) \ |
| V(StoreKeyedGeneric) \ |
| V(StoreNamedField) \ |
| V(StoreNamedGeneric) \ |
| @@ -3170,6 +3171,43 @@ class HStoreKeyedFastElement: public HStoreKeyed { |
| }; |
| +class HStorePixelArrayElement: public HInstruction { |
| + public: |
| + HStorePixelArrayElement(HValue* external_elements, HValue* key, HValue* val) { |
| + SetFlag(kChangesPixelArrayElements); |
| + SetOperandAt(0, external_elements); |
| + SetOperandAt(1, key); |
| + SetOperandAt(2, val); |
| + } |
| + |
| + virtual void PrintDataTo(StringStream* stream) const; |
| + virtual int OperandCount() const { return operands_.length(); } |
| + virtual HValue* OperandAt(int index) const { return operands_[index]; } |
| + |
| + virtual Representation RequiredInputRepresentation(int index) const { |
| + if (index == 0) { |
| + return Representation::External(); |
| + } else { |
| + return Representation::Integer32(); |
| + } |
| + } |
| + |
| + HValue* external_pointer() const { return OperandAt(0); } |
|
Kevin Millikin (Chromium)
2011/02/16 08:51:25
I would just use return operands_[0] (OperandAt is
danno
2011/02/16 13:54:22
Done.
|
| + HValue* key() const { return OperandAt(1); } |
| + HValue* value() const { return OperandAt(2); } |
| + |
| + DECLARE_CONCRETE_INSTRUCTION(StorePixelArrayElement, |
| + "store_pixel_array_element") |
| + |
| + protected: |
| + virtual void InternalSetOperandAt(int index, HValue* value) { |
| + operands_[index] = value; |
| + } |
| + |
| + HOperandVector<3> operands_; |
| +}; |
| + |
| + |
| class HStoreKeyedGeneric: public HStoreKeyed { |
| public: |
| HStoreKeyedGeneric(HValue* context, |