| 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 5856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5867 | 5867 |
| 5868 protected: | 5868 protected: |
| 5869 virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } | 5869 virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } |
| 5870 }; | 5870 }; |
| 5871 | 5871 |
| 5872 class ArrayInstructionInterface { | 5872 class ArrayInstructionInterface { |
| 5873 public: | 5873 public: |
| 5874 virtual HValue* GetKey() = 0; | 5874 virtual HValue* GetKey() = 0; |
| 5875 virtual void SetKey(HValue* key) = 0; | 5875 virtual void SetKey(HValue* key) = 0; |
| 5876 virtual void SetIndexOffset(uint32_t index_offset) = 0; | 5876 virtual void SetIndexOffset(uint32_t index_offset) = 0; |
| 5877 virtual int MaxIndexOffsetBits() = 0; |
| 5877 virtual bool IsDehoisted() = 0; | 5878 virtual bool IsDehoisted() = 0; |
| 5878 virtual void SetDehoisted(bool is_dehoisted) = 0; | 5879 virtual void SetDehoisted(bool is_dehoisted) = 0; |
| 5879 virtual ~ArrayInstructionInterface() { }; | 5880 virtual ~ArrayInstructionInterface() { }; |
| 5880 | 5881 |
| 5881 static Representation KeyedAccessIndexRequirement(Representation r) { | 5882 static Representation KeyedAccessIndexRequirement(Representation r) { |
| 5882 return r.IsInteger32() || SmiValuesAre32Bits() | 5883 return r.IsInteger32() || SmiValuesAre32Bits() |
| 5883 ? Representation::Integer32() : Representation::Smi(); | 5884 ? Representation::Integer32() : Representation::Smi(); |
| 5884 } | 5885 } |
| 5885 }; | 5886 }; |
| 5886 | 5887 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 5906 HValue* key() { return OperandAt(1); } | 5907 HValue* key() { return OperandAt(1); } |
| 5907 HValue* dependency() { | 5908 HValue* dependency() { |
| 5908 ASSERT(HasDependency()); | 5909 ASSERT(HasDependency()); |
| 5909 return OperandAt(2); | 5910 return OperandAt(2); |
| 5910 } | 5911 } |
| 5911 bool HasDependency() const { return OperandAt(0) != OperandAt(2); } | 5912 bool HasDependency() const { return OperandAt(0) != OperandAt(2); } |
| 5912 uint32_t index_offset() { return IndexOffsetField::decode(bit_field_); } | 5913 uint32_t index_offset() { return IndexOffsetField::decode(bit_field_); } |
| 5913 void SetIndexOffset(uint32_t index_offset) { | 5914 void SetIndexOffset(uint32_t index_offset) { |
| 5914 bit_field_ = IndexOffsetField::update(bit_field_, index_offset); | 5915 bit_field_ = IndexOffsetField::update(bit_field_, index_offset); |
| 5915 } | 5916 } |
| 5917 virtual int MaxIndexOffsetBits() { |
| 5918 return kBitsForIndexOffset; |
| 5919 } |
| 5916 HValue* GetKey() { return key(); } | 5920 HValue* GetKey() { return key(); } |
| 5917 void SetKey(HValue* key) { SetOperandAt(1, key); } | 5921 void SetKey(HValue* key) { SetOperandAt(1, key); } |
| 5918 bool IsDehoisted() { return IsDehoistedField::decode(bit_field_); } | 5922 bool IsDehoisted() { return IsDehoistedField::decode(bit_field_); } |
| 5919 void SetDehoisted(bool is_dehoisted) { | 5923 void SetDehoisted(bool is_dehoisted) { |
| 5920 bit_field_ = IsDehoistedField::update(bit_field_, is_dehoisted); | 5924 bit_field_ = IsDehoistedField::update(bit_field_, is_dehoisted); |
| 5921 } | 5925 } |
| 5922 ElementsKind elements_kind() const { | 5926 ElementsKind elements_kind() const { |
| 5923 return ElementsKindField::decode(bit_field_); | 5927 return ElementsKindField::decode(bit_field_); |
| 5924 } | 5928 } |
| 5925 LoadKeyedHoleMode hole_mode() const { | 5929 LoadKeyedHoleMode hole_mode() const { |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6280 | 6284 |
| 6281 HValue* elements() { return OperandAt(0); } | 6285 HValue* elements() { return OperandAt(0); } |
| 6282 HValue* key() { return OperandAt(1); } | 6286 HValue* key() { return OperandAt(1); } |
| 6283 HValue* value() { return OperandAt(2); } | 6287 HValue* value() { return OperandAt(2); } |
| 6284 bool value_is_smi() const { | 6288 bool value_is_smi() const { |
| 6285 return IsFastSmiElementsKind(elements_kind_); | 6289 return IsFastSmiElementsKind(elements_kind_); |
| 6286 } | 6290 } |
| 6287 ElementsKind elements_kind() const { return elements_kind_; } | 6291 ElementsKind elements_kind() const { return elements_kind_; } |
| 6288 uint32_t index_offset() { return index_offset_; } | 6292 uint32_t index_offset() { return index_offset_; } |
| 6289 void SetIndexOffset(uint32_t index_offset) { index_offset_ = index_offset; } | 6293 void SetIndexOffset(uint32_t index_offset) { index_offset_ = index_offset; } |
| 6294 virtual int MaxIndexOffsetBits() { |
| 6295 return 31 - ElementsKindToShiftSize(elements_kind_); |
| 6296 } |
| 6290 HValue* GetKey() { return key(); } | 6297 HValue* GetKey() { return key(); } |
| 6291 void SetKey(HValue* key) { SetOperandAt(1, key); } | 6298 void SetKey(HValue* key) { SetOperandAt(1, key); } |
| 6292 bool IsDehoisted() { return is_dehoisted_; } | 6299 bool IsDehoisted() { return is_dehoisted_; } |
| 6293 void SetDehoisted(bool is_dehoisted) { is_dehoisted_ = is_dehoisted; } | 6300 void SetDehoisted(bool is_dehoisted) { is_dehoisted_ = is_dehoisted; } |
| 6294 bool IsUninitialized() { return is_uninitialized_; } | 6301 bool IsUninitialized() { return is_uninitialized_; } |
| 6295 void SetUninitialized(bool is_uninitialized) { | 6302 void SetUninitialized(bool is_uninitialized) { |
| 6296 is_uninitialized_ = is_uninitialized; | 6303 is_uninitialized_ = is_uninitialized; |
| 6297 } | 6304 } |
| 6298 | 6305 |
| 6299 bool IsConstantHoleStore() { | 6306 bool IsConstantHoleStore() { |
| (...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6969 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 6976 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
| 6970 }; | 6977 }; |
| 6971 | 6978 |
| 6972 | 6979 |
| 6973 #undef DECLARE_INSTRUCTION | 6980 #undef DECLARE_INSTRUCTION |
| 6974 #undef DECLARE_CONCRETE_INSTRUCTION | 6981 #undef DECLARE_CONCRETE_INSTRUCTION |
| 6975 | 6982 |
| 6976 } } // namespace v8::internal | 6983 } } // namespace v8::internal |
| 6977 | 6984 |
| 6978 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 6985 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |