OLD | NEW |
---|---|
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/hydrogen.h" | 5 #include "src/hydrogen.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "src/v8.h" | 9 #include "src/v8.h" |
10 | 10 |
(...skipping 1495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1506 Push(BuildDecodeField<String::ArrayIndexValueBits>(hash)); | 1506 Push(BuildDecodeField<String::ArrayIndexValueBits>(hash)); |
1507 } | 1507 } |
1508 string_index_if.Else(); | 1508 string_index_if.Else(); |
1509 { | 1509 { |
1510 // Key is a non-index String, check for uniqueness/internalization. If | 1510 // Key is a non-index String, check for uniqueness/internalization. If |
1511 // it's not, deopt. | 1511 // it's not, deopt. |
1512 HValue* not_internalized_bit = AddUncasted<HBitwise>( | 1512 HValue* not_internalized_bit = AddUncasted<HBitwise>( |
1513 Token::BIT_AND, | 1513 Token::BIT_AND, |
1514 instance_type, | 1514 instance_type, |
1515 Add<HConstant>(static_cast<int>(kIsNotInternalizedMask))); | 1515 Add<HConstant>(static_cast<int>(kIsNotInternalizedMask))); |
1516 DeoptimizeIf<HCompareNumericAndBranch>( | 1516 |
1517 not_internalized_bit, | 1517 IfBuilder not_internalized(this); |
1518 graph()->GetConstant0(), | 1518 not_internalized.If<HCompareNumericAndBranch>(not_internalized_bit, |
1519 Token::NE, | 1519 graph()->GetConstant0(), |
1520 "BuildKeyedIndexCheck: string isn't internalized"); | 1520 Token::EQ); |
1521 // Key guaranteed to be a unqiue string | 1521 not_internalized.Then(); |
Jakob Kummerow
2014/06/27 17:37:37
Now you've changed both the name and the meaning.
danno
2014/06/27 17:43:28
This is intentional. I also switched from Token::N
| |
1522 Push(key); | 1522 Push(key); |
1523 | |
1524 not_internalized.Else(); | |
1525 Add<HPushArguments>(key); | |
1526 HValue* intern_key = Add<HCallRuntime>( | |
1527 isolate()->factory()->empty_string(), | |
1528 Runtime::FunctionForId(Runtime::kInternalizeString), 1); | |
1529 Push(intern_key); | |
1530 | |
1531 not_internalized.End(); | |
1532 // Key guaranteed to be a unique string | |
1523 } | 1533 } |
1524 string_index_if.JoinContinuation(join_continuation); | 1534 string_index_if.JoinContinuation(join_continuation); |
1525 } | 1535 } |
1526 not_symbol_if.Else(); | 1536 not_symbol_if.Else(); |
1527 { | 1537 { |
1528 Push(key); // Key is symbol | 1538 Push(key); // Key is symbol |
1529 } | 1539 } |
1530 not_symbol_if.JoinContinuation(join_continuation); | 1540 not_symbol_if.JoinContinuation(join_continuation); |
1531 } | 1541 } |
1532 not_string_or_name_if.JoinContinuation(join_continuation); | 1542 not_string_or_name_if.JoinContinuation(join_continuation); |
(...skipping 10819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
12352 if (ShouldProduceTraceOutput()) { | 12362 if (ShouldProduceTraceOutput()) { |
12353 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 12363 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
12354 } | 12364 } |
12355 | 12365 |
12356 #ifdef DEBUG | 12366 #ifdef DEBUG |
12357 graph_->Verify(false); // No full verify. | 12367 graph_->Verify(false); // No full verify. |
12358 #endif | 12368 #endif |
12359 } | 12369 } |
12360 | 12370 |
12361 } } // namespace v8::internal | 12371 } } // namespace v8::internal |
OLD | NEW |