| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 6123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6134 SetFlag(kUseGVN); | 6134 SetFlag(kUseGVN); |
| 6135 SetGVNFlag(kDependsOnCalls); | 6135 SetGVNFlag(kDependsOnCalls); |
| 6136 } | 6136 } |
| 6137 }; | 6137 }; |
| 6138 | 6138 |
| 6139 class ArrayInstructionInterface { | 6139 class ArrayInstructionInterface { |
| 6140 public: | 6140 public: |
| 6141 virtual HValue* GetKey() = 0; | 6141 virtual HValue* GetKey() = 0; |
| 6142 virtual void SetKey(HValue* key) = 0; | 6142 virtual void SetKey(HValue* key) = 0; |
| 6143 virtual void SetIndexOffset(uint32_t index_offset) = 0; | 6143 virtual void SetIndexOffset(uint32_t index_offset) = 0; |
| 6144 virtual int MaxIndexOffsetBits() = 0; |
| 6144 virtual bool IsDehoisted() = 0; | 6145 virtual bool IsDehoisted() = 0; |
| 6145 virtual void SetDehoisted(bool is_dehoisted) = 0; | 6146 virtual void SetDehoisted(bool is_dehoisted) = 0; |
| 6146 virtual ~ArrayInstructionInterface() { }; | 6147 virtual ~ArrayInstructionInterface() { }; |
| 6147 | 6148 |
| 6148 static Representation KeyedAccessIndexRequirement(Representation r) { | 6149 static Representation KeyedAccessIndexRequirement(Representation r) { |
| 6149 return r.IsInteger32() || SmiValuesAre32Bits() | 6150 return r.IsInteger32() || SmiValuesAre32Bits() |
| 6150 ? Representation::Integer32() : Representation::Smi(); | 6151 ? Representation::Integer32() : Representation::Smi(); |
| 6151 } | 6152 } |
| 6152 }; | 6153 }; |
| 6153 | 6154 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 6173 HValue* key() { return OperandAt(1); } | 6174 HValue* key() { return OperandAt(1); } |
| 6174 HValue* dependency() { | 6175 HValue* dependency() { |
| 6175 ASSERT(HasDependency()); | 6176 ASSERT(HasDependency()); |
| 6176 return OperandAt(2); | 6177 return OperandAt(2); |
| 6177 } | 6178 } |
| 6178 bool HasDependency() const { return OperandAt(0) != OperandAt(2); } | 6179 bool HasDependency() const { return OperandAt(0) != OperandAt(2); } |
| 6179 uint32_t index_offset() { return IndexOffsetField::decode(bit_field_); } | 6180 uint32_t index_offset() { return IndexOffsetField::decode(bit_field_); } |
| 6180 void SetIndexOffset(uint32_t index_offset) { | 6181 void SetIndexOffset(uint32_t index_offset) { |
| 6181 bit_field_ = IndexOffsetField::update(bit_field_, index_offset); | 6182 bit_field_ = IndexOffsetField::update(bit_field_, index_offset); |
| 6182 } | 6183 } |
| 6184 virtual int MaxIndexOffsetBits() { |
| 6185 return kBitsForIndexOffset; |
| 6186 } |
| 6183 HValue* GetKey() { return key(); } | 6187 HValue* GetKey() { return key(); } |
| 6184 void SetKey(HValue* key) { SetOperandAt(1, key); } | 6188 void SetKey(HValue* key) { SetOperandAt(1, key); } |
| 6185 bool IsDehoisted() { return IsDehoistedField::decode(bit_field_); } | 6189 bool IsDehoisted() { return IsDehoistedField::decode(bit_field_); } |
| 6186 void SetDehoisted(bool is_dehoisted) { | 6190 void SetDehoisted(bool is_dehoisted) { |
| 6187 bit_field_ = IsDehoistedField::update(bit_field_, is_dehoisted); | 6191 bit_field_ = IsDehoistedField::update(bit_field_, is_dehoisted); |
| 6188 } | 6192 } |
| 6189 ElementsKind elements_kind() const { | 6193 ElementsKind elements_kind() const { |
| 6190 return ElementsKindField::decode(bit_field_); | 6194 return ElementsKindField::decode(bit_field_); |
| 6191 } | 6195 } |
| 6192 LoadKeyedHoleMode hole_mode() const { | 6196 LoadKeyedHoleMode hole_mode() const { |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6559 | 6563 |
| 6560 HValue* elements() { return OperandAt(0); } | 6564 HValue* elements() { return OperandAt(0); } |
| 6561 HValue* key() { return OperandAt(1); } | 6565 HValue* key() { return OperandAt(1); } |
| 6562 HValue* value() { return OperandAt(2); } | 6566 HValue* value() { return OperandAt(2); } |
| 6563 bool value_is_smi() const { | 6567 bool value_is_smi() const { |
| 6564 return IsFastSmiElementsKind(elements_kind_); | 6568 return IsFastSmiElementsKind(elements_kind_); |
| 6565 } | 6569 } |
| 6566 ElementsKind elements_kind() const { return elements_kind_; } | 6570 ElementsKind elements_kind() const { return elements_kind_; } |
| 6567 uint32_t index_offset() { return index_offset_; } | 6571 uint32_t index_offset() { return index_offset_; } |
| 6568 void SetIndexOffset(uint32_t index_offset) { index_offset_ = index_offset; } | 6572 void SetIndexOffset(uint32_t index_offset) { index_offset_ = index_offset; } |
| 6573 virtual int MaxIndexOffsetBits() { |
| 6574 return 31 - ElementsKindToShiftSize(elements_kind_); |
| 6575 } |
| 6569 HValue* GetKey() { return key(); } | 6576 HValue* GetKey() { return key(); } |
| 6570 void SetKey(HValue* key) { SetOperandAt(1, key); } | 6577 void SetKey(HValue* key) { SetOperandAt(1, key); } |
| 6571 bool IsDehoisted() { return is_dehoisted_; } | 6578 bool IsDehoisted() { return is_dehoisted_; } |
| 6572 void SetDehoisted(bool is_dehoisted) { is_dehoisted_ = is_dehoisted; } | 6579 void SetDehoisted(bool is_dehoisted) { is_dehoisted_ = is_dehoisted; } |
| 6573 bool IsUninitialized() { return is_uninitialized_; } | 6580 bool IsUninitialized() { return is_uninitialized_; } |
| 6574 void SetUninitialized(bool is_uninitialized) { | 6581 void SetUninitialized(bool is_uninitialized) { |
| 6575 is_uninitialized_ = is_uninitialized; | 6582 is_uninitialized_ = is_uninitialized; |
| 6576 } | 6583 } |
| 6577 | 6584 |
| 6578 bool IsConstantHoleStore() { | 6585 bool IsConstantHoleStore() { |
| (...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7318 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 7325 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
| 7319 }; | 7326 }; |
| 7320 | 7327 |
| 7321 | 7328 |
| 7322 #undef DECLARE_INSTRUCTION | 7329 #undef DECLARE_INSTRUCTION |
| 7323 #undef DECLARE_CONCRETE_INSTRUCTION | 7330 #undef DECLARE_CONCRETE_INSTRUCTION |
| 7324 | 7331 |
| 7325 } } // namespace v8::internal | 7332 } } // namespace v8::internal |
| 7326 | 7333 |
| 7327 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7334 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |