Chromium Code Reviews| Index: src/hydrogen.cc |
| diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
| index 6ae1466d62de54427cc9992af757099705339594..24b0d5976eea49675defa690630175096dc201a3 100644 |
| --- a/src/hydrogen.cc |
| +++ b/src/hydrogen.cc |
| @@ -1513,13 +1513,23 @@ void HGraphBuilder::BuildKeyedIndexCheck(HValue* key, |
| Token::BIT_AND, |
| instance_type, |
| Add<HConstant>(static_cast<int>(kIsNotInternalizedMask))); |
| - DeoptimizeIf<HCompareNumericAndBranch>( |
| - not_internalized_bit, |
| - graph()->GetConstant0(), |
| - Token::NE, |
| - "BuildKeyedIndexCheck: string isn't internalized"); |
| - // Key guaranteed to be a unqiue string |
| + |
| + IfBuilder internalized(this); |
|
Jakob Kummerow
2014/06/27 15:37:51
nit: I think "not_internalized" would more accurat
danno
2014/06/27 17:43:28
Done.
|
| + internalized.If<HCompareNumericAndBranch>(not_internalized_bit, |
| + graph()->GetConstant0(), |
| + Token::NE); |
| + internalized.Then(); |
| + Add<HPushArguments>(key); |
| + HValue* intern_key = Add<HCallRuntime>( |
| + isolate()->factory()->empty_string(), |
| + Runtime::FunctionForId(Runtime::kInternalizeString), 1); |
| + Push(intern_key); |
| + |
| + internalized.Else(); |
| Push(key); |
| + |
| + internalized.End(); |
| + // Key guaranteed to be a unqiue string |
|
Jakob Kummerow
2014/06/27 15:37:51
nit: while you're here, "unique"
danno
2014/06/27 17:43:28
Done.
|
| } |
| string_index_if.JoinContinuation(join_continuation); |
| } |