| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_ | 5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_ |
| 6 #define V8_HYDROGEN_INSTRUCTIONS_H_ | 6 #define V8_HYDROGEN_INSTRUCTIONS_H_ |
| 7 | 7 |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
| (...skipping 6963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6974 ASSERT_EQ(index, 2); | 6974 ASSERT_EQ(index, 2); |
| 6975 return RequiredValueRepresentation(elements_kind_, store_mode_); | 6975 return RequiredValueRepresentation(elements_kind_, store_mode_); |
| 6976 } | 6976 } |
| 6977 | 6977 |
| 6978 static Representation RequiredValueRepresentation( | 6978 static Representation RequiredValueRepresentation( |
| 6979 ElementsKind kind, StoreFieldOrKeyedMode mode) { | 6979 ElementsKind kind, StoreFieldOrKeyedMode mode) { |
| 6980 if (IsDoubleOrFloatElementsKind(kind)) { | 6980 if (IsDoubleOrFloatElementsKind(kind)) { |
| 6981 return Representation::Double(); | 6981 return Representation::Double(); |
| 6982 } | 6982 } |
| 6983 | 6983 |
| 6984 if (kind == FAST_SMI_ELEMENTS && SmiValuesAre32Bits() && |
| 6985 mode == STORE_TO_INITIALIZED_ENTRY) { |
| 6986 return Representation::Integer32(); |
| 6987 } |
| 6988 |
| 6984 if (IsFastSmiElementsKind(kind)) { | 6989 if (IsFastSmiElementsKind(kind)) { |
| 6985 if (SmiValuesAre32Bits() && mode == STORE_TO_INITIALIZED_ENTRY) { | |
| 6986 return Representation::Integer32(); | |
| 6987 } | |
| 6988 return Representation::Smi(); | 6990 return Representation::Smi(); |
| 6989 } | 6991 } |
| 6990 | 6992 |
| 6991 return IsExternalArrayElementsKind(kind) || | 6993 return IsExternalArrayElementsKind(kind) || |
| 6992 IsFixedTypedArrayElementsKind(kind) | 6994 IsFixedTypedArrayElementsKind(kind) |
| 6993 ? Representation::Integer32() | 6995 ? Representation::Integer32() |
| 6994 : Representation::Tagged(); | 6996 : Representation::Tagged(); |
| 6995 } | 6997 } |
| 6996 | 6998 |
| 6997 bool is_external() const { | 6999 bool is_external() const { |
| (...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7853 }; | 7855 }; |
| 7854 | 7856 |
| 7855 | 7857 |
| 7856 | 7858 |
| 7857 #undef DECLARE_INSTRUCTION | 7859 #undef DECLARE_INSTRUCTION |
| 7858 #undef DECLARE_CONCRETE_INSTRUCTION | 7860 #undef DECLARE_CONCRETE_INSTRUCTION |
| 7859 | 7861 |
| 7860 } } // namespace v8::internal | 7862 } } // namespace v8::internal |
| 7861 | 7863 |
| 7862 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7864 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |