Index: src/compiler/js-builtin-reducer.cc |
diff --git a/src/compiler/js-builtin-reducer.cc b/src/compiler/js-builtin-reducer.cc |
index a2120884448310b3e0e039481ea9948c1845e050..9ca0c63eb957ace70efe69bbbdde5e7787bcc7bb 100644 |
--- a/src/compiler/js-builtin-reducer.cc |
+++ b/src/compiler/js-builtin-reducer.cc |
@@ -1922,26 +1922,8 @@ |
Node* effect = NodeProperties::GetEffectInput(node); |
Node* control = NodeProperties::GetControlInput(node); |
- if (Node* receiver = GetStringWitness(node)) { |
- if (isolate()->IsStringBoundsCheckIntact()) { |
- // Determine the {receiver} length. |
- Node* receiver_length = effect = graph()->NewNode( |
- simplified()->LoadField(AccessBuilder::ForStringLength()), receiver, |
- effect, control); |
- |
- // Check that the {index} is within the range of {receiver}. |
- index = effect = graph()->NewNode(simplified()->CheckBounds(), index, |
- receiver_length, effect, control); |
- |
- // Return the character from the {receiver} as single character string. |
- Node* value = graph()->NewNode(simplified()->StringCharAt(), receiver, |
- index, control); |
- |
- ReplaceWithValue(node, value, effect, control); |
- return Replace(value); |
- } |
- |
- if (index_type->Is(Type::Integral32OrMinusZeroOrNaN())) { |
+ if (index_type->Is(Type::Integral32OrMinusZeroOrNaN())) { |
+ if (Node* receiver = GetStringWitness(node)) { |
if (!index_type->Is(Type::Unsigned32())) { |
// Map -0 and NaN to 0 (as per ToInteger), and the values in |
// the [-2^31,-1] range to the [2^31,2^32-1] range, which will |
@@ -1994,26 +1976,8 @@ |
Node* effect = NodeProperties::GetEffectInput(node); |
Node* control = NodeProperties::GetControlInput(node); |
- if (Node* receiver = GetStringWitness(node)) { |
- if (isolate()->IsStringBoundsCheckIntact()) { |
- // Determine the {receiver} length. |
- Node* receiver_length = effect = graph()->NewNode( |
- simplified()->LoadField(AccessBuilder::ForStringLength()), receiver, |
- effect, control); |
- |
- // Check that the {index} is within the range of {receiver}. |
- index = effect = graph()->NewNode(simplified()->CheckBounds(), index, |
- receiver_length, effect, control); |
- |
- // Return the character from the {receiver} as character code. |
- Node* value = graph()->NewNode(simplified()->StringCharCodeAt(), |
- receiver, index, control); |
- |
- ReplaceWithValue(node, value, effect, control); |
- return Replace(value); |
- } |
- |
- if (index_type->Is(Type::Integral32OrMinusZeroOrNaN())) { |
+ if (index_type->Is(Type::Integral32OrMinusZeroOrNaN())) { |
+ if (Node* receiver = GetStringWitness(node)) { |
if (!index_type->Is(Type::Unsigned32())) { |
// Map -0 and NaN to 0 (as per ToInteger), and the values in |
// the [-2^31,-1] range to the [2^31,2^32-1] range, which will |