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

Side by Side Diff: src/crankshaft/hydrogen.cc

Issue 1775163005: [crankshaft] Add support for comparing with indirect undetectable values (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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 | « no previous file | no next file » | 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/crankshaft/hydrogen.h" 5 #include "src/crankshaft/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/ast-numbering.h" 10 #include "src/ast/ast-numbering.h"
(...skipping 11671 matching lines...) Expand 10 before | Expand all | Expand 10 after
11682 left = Add<HLoadNamedField>( 11682 left = Add<HLoadNamedField>(
11683 left, nullptr, 11683 left, nullptr,
11684 HObjectAccess::ForOddballToNumber(Representation::Smi())); 11684 HObjectAccess::ForOddballToNumber(Representation::Smi()));
11685 right = Add<HLoadNamedField>( 11685 right = Add<HLoadNamedField>(
11686 right, nullptr, 11686 right, nullptr,
11687 HObjectAccess::ForOddballToNumber(Representation::Smi())); 11687 HObjectAccess::ForOddballToNumber(Representation::Smi()));
11688 HCompareNumericAndBranch* result = 11688 HCompareNumericAndBranch* result =
11689 New<HCompareNumericAndBranch>(left, right, op); 11689 New<HCompareNumericAndBranch>(left, right, op);
11690 return result; 11690 return result;
11691 } else { 11691 } else {
11692 if (op == Token::EQ) {
11693 if (left->IsConstant() &&
11694 HConstant::cast(left)->GetInstanceType() == ODDBALL_TYPE &&
11695 HConstant::cast(left)->IsUndetectable()) {
11696 return New<HIsUndetectableAndBranch>(right);
11697 }
11698
11699 if (right->IsConstant() &&
11700 HConstant::cast(right)->GetInstanceType() == ODDBALL_TYPE &&
11701 HConstant::cast(right)->IsUndetectable()) {
11702 return New<HIsUndetectableAndBranch>(left);
11703 }
11704 }
11705
11692 if (combined_rep.IsTagged() || combined_rep.IsNone()) { 11706 if (combined_rep.IsTagged() || combined_rep.IsNone()) {
11693 HCompareGeneric* result = Add<HCompareGeneric>(left, right, op); 11707 HCompareGeneric* result = Add<HCompareGeneric>(left, right, op);
11694 result->set_observed_input_representation(1, left_rep); 11708 result->set_observed_input_representation(1, left_rep);
11695 result->set_observed_input_representation(2, right_rep); 11709 result->set_observed_input_representation(2, right_rep);
11696 if (result->HasObservableSideEffects()) { 11710 if (result->HasObservableSideEffects()) {
11697 if (push_sim_result == PUSH_BEFORE_SIMULATE) { 11711 if (push_sim_result == PUSH_BEFORE_SIMULATE) {
11698 Push(result); 11712 Push(result);
11699 AddSimulate(bailout_id, REMOVABLE_SIMULATE); 11713 AddSimulate(bailout_id, REMOVABLE_SIMULATE);
11700 Drop(1); 11714 Drop(1);
11701 } else { 11715 } else {
(...skipping 1805 matching lines...) Expand 10 before | Expand all | Expand 10 after
13507 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13521 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13508 } 13522 }
13509 13523
13510 #ifdef DEBUG 13524 #ifdef DEBUG
13511 graph_->Verify(false); // No full verify. 13525 graph_->Verify(false); // No full verify.
13512 #endif 13526 #endif
13513 } 13527 }
13514 13528
13515 } // namespace internal 13529 } // namespace internal
13516 } // namespace v8 13530 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698