Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(225)

Side by Side Diff: src/hydrogen.cc

Issue 1347063004: [ic] Introduce BOOLEAN state for CompareIC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/code-stubs.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <sstream> 7 #include <sstream>
8 8
9 #include "src/allocation-site-scopes.h" 9 #include "src/allocation-site-scopes.h"
10 #include "src/ast-numbering.h" 10 #include "src/ast-numbering.h"
(...skipping 11632 matching lines...) Expand 10 before | Expand all | Expand 10 after
11643 New<HCompareObjectEqAndBranch>(left, right); 11643 New<HCompareObjectEqAndBranch>(left, right);
11644 return result; 11644 return result;
11645 } else if (combined_type->Is(Type::String())) { 11645 } else if (combined_type->Is(Type::String())) {
11646 BuildCheckHeapObject(left); 11646 BuildCheckHeapObject(left);
11647 Add<HCheckInstanceType>(left, HCheckInstanceType::IS_STRING); 11647 Add<HCheckInstanceType>(left, HCheckInstanceType::IS_STRING);
11648 BuildCheckHeapObject(right); 11648 BuildCheckHeapObject(right);
11649 Add<HCheckInstanceType>(right, HCheckInstanceType::IS_STRING); 11649 Add<HCheckInstanceType>(right, HCheckInstanceType::IS_STRING);
11650 HStringCompareAndBranch* result = 11650 HStringCompareAndBranch* result =
11651 New<HStringCompareAndBranch>(left, right, op); 11651 New<HStringCompareAndBranch>(left, right, op);
11652 return result; 11652 return result;
11653 } else if (combined_type->Is(Type::Boolean())) {
11654 AddCheckMap(left, isolate()->factory()->boolean_map());
11655 AddCheckMap(right, isolate()->factory()->boolean_map());
11656 if (Token::IsEqualityOp(op)) {
11657 HCompareObjectEqAndBranch* result =
11658 New<HCompareObjectEqAndBranch>(left, right);
11659 return result;
11660 }
11661 left = Add<HLoadNamedField>(
11662 left, nullptr,
11663 HObjectAccess::ForOddballToNumber(Representation::Smi()));
11664 right = Add<HLoadNamedField>(
11665 right, nullptr,
11666 HObjectAccess::ForOddballToNumber(Representation::Smi()));
11667 HCompareNumericAndBranch* result =
11668 New<HCompareNumericAndBranch>(left, right, op);
11669 return result;
11653 } else { 11670 } else {
11654 if (combined_rep.IsTagged() || combined_rep.IsNone()) { 11671 if (combined_rep.IsTagged() || combined_rep.IsNone()) {
11655 HCompareGeneric* result = Add<HCompareGeneric>( 11672 HCompareGeneric* result = Add<HCompareGeneric>(
11656 left, right, op, strength(function_language_mode())); 11673 left, right, op, strength(function_language_mode()));
11657 result->set_observed_input_representation(1, left_rep); 11674 result->set_observed_input_representation(1, left_rep);
11658 result->set_observed_input_representation(2, right_rep); 11675 result->set_observed_input_representation(2, right_rep);
11659 if (result->HasObservableSideEffects()) { 11676 if (result->HasObservableSideEffects()) {
11660 if (push_sim_result == PUSH_BEFORE_SIMULATE) { 11677 if (push_sim_result == PUSH_BEFORE_SIMULATE) {
11661 Push(result); 11678 Push(result);
11662 AddSimulate(bailout_id, REMOVABLE_SIMULATE); 11679 AddSimulate(bailout_id, REMOVABLE_SIMULATE);
(...skipping 1940 matching lines...) Expand 10 before | Expand all | Expand 10 after
13603 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13620 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13604 } 13621 }
13605 13622
13606 #ifdef DEBUG 13623 #ifdef DEBUG
13607 graph_->Verify(false); // No full verify. 13624 graph_->Verify(false); // No full verify.
13608 #endif 13625 #endif
13609 } 13626 }
13610 13627
13611 } // namespace internal 13628 } // namespace internal
13612 } // namespace v8 13629 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stubs.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698