| 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/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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |