| Index: src/hydrogen-instructions.cc
|
| diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
|
| index 24264d3f132c5e99ae8b7c3a81bacf2bb3f50196..7580beb38c170a451e30df74891c624298c0f5ad 100644
|
| --- a/src/hydrogen-instructions.cc
|
| +++ b/src/hydrogen-instructions.cc
|
| @@ -1143,16 +1143,15 @@ void HBoundsCheck::InferRepresentation(HInferRepresentation* h_infer) {
|
| HValue* actual_length = length()->ActualValue();
|
| HValue* actual_index = index()->ActualValue();
|
| if (key_mode_ == DONT_ALLOW_SMI_KEY ||
|
| - !actual_length->representation().IsTagged()) {
|
| + !actual_length->representation().IsSmiOrTagged()) {
|
| r = Representation::Integer32();
|
| - } else if (actual_index->representation().IsTagged() ||
|
| - (actual_index->IsConstant() &&
|
| - HConstant::cast(actual_index)->HasSmiValue())) {
|
| - // If the index is tagged, or a constant that holds a Smi, allow the length
|
| - // to be tagged, since it is usually already tagged from loading it out of
|
| - // the length field of a JSArray. This allows for direct comparison without
|
| - // untagging.
|
| - r = Representation::Tagged();
|
| + } else if (actual_index->representation().IsSmiOrTagged() ||
|
| + (actual_index->IsConstant() &&
|
| + HConstant::cast(actual_index)->HasSmiValue())) {
|
| + // If the index is smi, or a constant that holds a Smi, allow the length to
|
| + // be smi, since it is usually already smi from loading it out of the length
|
| + // field of a JSArray. This allows for direct comparison without untagging.
|
| + r = Representation::Smi();
|
| } else {
|
| r = Representation::Integer32();
|
| }
|
| @@ -2947,15 +2946,6 @@ HType HCheckSmi::CalculateInferredType() {
|
| }
|
|
|
|
|
| -void HCheckSmiOrInt32::InferRepresentation(HInferRepresentation* h_infer) {
|
| - ASSERT(CheckFlag(kFlexibleRepresentation));
|
| - ASSERT(UseCount() == 1);
|
| - HUseIterator use = uses();
|
| - Representation r = use.value()->RequiredInputRepresentation(use.index());
|
| - UpdateRepresentation(r, h_infer, "checksmiorint32");
|
| -}
|
| -
|
| -
|
| HType HPhi::CalculateInferredType() {
|
| HType result = HType::Uninitialized();
|
| for (int i = 0; i < OperandCount(); ++i) {
|
|
|