Index: src/hydrogen-instructions.h |
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h |
index a596873d09e040c33ceea997bf430d6852b4e0de..a12e92178a2bb6111c116fec95291f75d819b9d0 100644 |
--- a/src/hydrogen-instructions.h |
+++ b/src/hydrogen-instructions.h |
@@ -6972,19 +6972,26 @@ class HStoreKeyed V8_FINAL |
} |
ASSERT_EQ(index, 2); |
- if (IsDoubleOrFloatElementsKind(elements_kind())) { |
+ return RequiredValueRepresentation(elements_kind_, store_mode_); |
+ } |
+ |
+ static Representation RequiredValueRepresentation( |
+ ElementsKind kind, StoreFieldOrKeyedMode mode) { |
+ if (IsDoubleOrFloatElementsKind(kind)) { |
return Representation::Double(); |
} |
- if (SmiValuesAre32Bits() && store_mode_ == STORE_TO_INITIALIZED_ENTRY) { |
- return Representation::Integer32(); |
- } |
- if (IsFastSmiElementsKind(elements_kind())) { |
+ |
+ if (IsFastSmiElementsKind(kind)) { |
+ if (SmiValuesAre32Bits() && mode == STORE_TO_INITIALIZED_ENTRY) { |
+ return Representation::Integer32(); |
+ } |
return Representation::Smi(); |
} |
- return is_external() || is_fixed_typed_array() |
- ? Representation::Integer32() |
- : Representation::Tagged(); |
+ return IsExternalArrayElementsKind(kind) || |
+ IsFixedTypedArrayElementsKind(kind) |
+ ? Representation::Integer32() |
+ : Representation::Tagged(); |
} |
bool is_external() const { |