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 #include "src/allocation-site-scopes.h" | 10 #include "src/allocation-site-scopes.h" |
(...skipping 8520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8531 HValue* search_number = Add<HLoadNamedField>( | 8531 HValue* search_number = Add<HLoadNamedField>( |
8532 search_element, isheapnumber, | 8532 search_element, isheapnumber, |
8533 HObjectAccess::ForHeapNumberValue()); | 8533 HObjectAccess::ForHeapNumberValue()); |
8534 LoopBuilder loop(this, context(), direction); | 8534 LoopBuilder loop(this, context(), direction); |
8535 { | 8535 { |
8536 HValue* index = loop.BeginBody(initial, terminating, token); | 8536 HValue* index = loop.BeginBody(initial, terminating, token); |
8537 HValue* element = AddUncasted<HLoadKeyed>( | 8537 HValue* element = AddUncasted<HLoadKeyed>( |
8538 elements, index, static_cast<HValue*>(NULL), | 8538 elements, index, static_cast<HValue*>(NULL), |
8539 kind, ALLOW_RETURN_HOLE); | 8539 kind, ALLOW_RETURN_HOLE); |
8540 IfBuilder if_issame(this); | 8540 IfBuilder if_issame(this); |
8541 HCompareMap* issame = if_issame.If<HCompareMap>( | 8541 if_issame.IfNot<HIsSmiAndBranch>(element); |
| 8542 HCompareMap* issame = if_issame.AndIf<HCompareMap>( |
8542 element, isolate()->factory()->heap_number_map()); | 8543 element, isolate()->factory()->heap_number_map()); |
8543 if_issame.And(); | 8544 if_issame.And(); |
8544 HValue* number = Add<HLoadNamedField>( | 8545 HValue* number = Add<HLoadNamedField>( |
8545 element, issame, HObjectAccess::ForHeapNumberValue()); | 8546 element, issame, HObjectAccess::ForHeapNumberValue()); |
8546 if_issame.If<HCompareNumericAndBranch>( | 8547 if_issame.If<HCompareNumericAndBranch>( |
8547 number, search_number, Token::EQ_STRICT); | 8548 number, search_number, Token::EQ_STRICT); |
8548 if_issame.Then(); | 8549 if_issame.Then(); |
8549 { | 8550 { |
8550 Drop(1); | 8551 Drop(1); |
8551 Push(index); | 8552 Push(index); |
(...skipping 3587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12139 if (ShouldProduceTraceOutput()) { | 12140 if (ShouldProduceTraceOutput()) { |
12140 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 12141 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
12141 } | 12142 } |
12142 | 12143 |
12143 #ifdef DEBUG | 12144 #ifdef DEBUG |
12144 graph_->Verify(false); // No full verify. | 12145 graph_->Verify(false); // No full verify. |
12145 #endif | 12146 #endif |
12146 } | 12147 } |
12147 | 12148 |
12148 } } // namespace v8::internal | 12149 } } // namespace v8::internal |
OLD | NEW |