Index: src/hydrogen-instructions.h |
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h |
index 43a5ad869eb30a780157e5689354b0a1734b5e93..038714622e96c64d60a341f65b0eccf19aa67abd 100644 |
--- a/src/hydrogen-instructions.h |
+++ b/src/hydrogen-instructions.h |
@@ -5465,7 +5465,9 @@ class HLoadKeyed |
IsFastDoubleElementsKind(elements_kind)); |
if (IsFastSmiOrObjectElementsKind(elements_kind)) { |
- if (IsFastSmiElementsKind(elements_kind)) { |
+ if (IsFastSmiElementsKind(elements_kind) && |
+ (!IsHoleyElementsKind(elements_kind) || |
+ mode == NEVER_RETURN_HOLE)) { |
set_type(HType::Smi()); |
set_representation(Representation::Smi()); |
} else { |
@@ -5774,6 +5776,7 @@ class HStoreKeyed |
virtual Representation RequiredInputRepresentation(int index) { |
// kind_fast: tagged[int32] = tagged |
// kind_double: tagged[int32] = double |
+ // kind_smi : tagged[int32] = smi |
// kind_external: external[int32] = (double | int32) |
if (index == 0) { |
return is_external() ? Representation::External() |
@@ -5802,6 +5805,9 @@ class HStoreKeyed |
virtual Representation observed_input_representation(int index) { |
if (index < 2) return RequiredInputRepresentation(index); |
+ if (IsFastSmiElementsKind(elements_kind())) { |
+ return Representation::Smi(); |
+ } |
if (IsDoubleOrFloatElementsKind(elements_kind())) { |
return Representation::Double(); |
} |