| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/code-factory.h" | 5 #include "src/code-factory.h" |
| 6 #include "src/compilation-dependencies.h" | 6 #include "src/compilation-dependencies.h" |
| 7 #include "src/compiler/access-builder.h" | 7 #include "src/compiler/access-builder.h" |
| 8 #include "src/compiler/js-graph.h" | 8 #include "src/compiler/js-graph.h" |
| 9 #include "src/compiler/js-typed-lowering.h" | 9 #include "src/compiler/js-typed-lowering.h" |
| 10 #include "src/compiler/linkage.h" | 10 #include "src/compiler/linkage.h" |
| (...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 648 } | 648 } |
| 649 r.ChangeToPureOperator(stringOp); | 649 r.ChangeToPureOperator(stringOp); |
| 650 return Changed(node); | 650 return Changed(node); |
| 651 } | 651 } |
| 652 | 652 |
| 653 CompareOperationHints::Hint hint = r.GetNumberCompareOperationFeedback(); | 653 CompareOperationHints::Hint hint = r.GetNumberCompareOperationFeedback(); |
| 654 if (hint != CompareOperationHints::kAny || | 654 if (hint != CompareOperationHints::kAny || |
| 655 r.OneInputCannotBe(Type::StringOrReceiver())) { | 655 r.OneInputCannotBe(Type::StringOrReceiver())) { |
| 656 const Operator* less_than; | 656 const Operator* less_than; |
| 657 const Operator* less_than_or_equal; | 657 const Operator* less_than_or_equal; |
| 658 if (hint != CompareOperationHints::kAny) { | 658 if (r.BothInputsAre(Type::Signed32()) || |
| 659 r.BothInputsAre(Type::Unsigned32())) { |
| 660 less_than = simplified()->NumberLessThan(); |
| 661 less_than_or_equal = simplified()->NumberLessThanOrEqual(); |
| 662 } else if (hint != CompareOperationHints::kAny) { |
| 659 less_than = simplified()->SpeculativeNumberLessThan(hint); | 663 less_than = simplified()->SpeculativeNumberLessThan(hint); |
| 660 less_than_or_equal = simplified()->SpeculativeNumberLessThanOrEqual(hint); | 664 less_than_or_equal = simplified()->SpeculativeNumberLessThanOrEqual(hint); |
| 661 } else if (r.BothInputsAre(Type::PlainPrimitive()) || | 665 } else if (r.BothInputsAre(Type::PlainPrimitive()) || |
| 662 !(flags() & kDeoptimizationEnabled)) { | 666 !(flags() & kDeoptimizationEnabled)) { |
| 663 r.ConvertInputsToNumber(); | 667 r.ConvertInputsToNumber(); |
| 664 less_than = simplified()->NumberLessThan(); | 668 less_than = simplified()->NumberLessThan(); |
| 665 less_than_or_equal = simplified()->NumberLessThanOrEqual(); | 669 less_than_or_equal = simplified()->NumberLessThanOrEqual(); |
| 666 } else { | 670 } else { |
| 667 return NoChange(); | 671 return NoChange(); |
| 668 } | 672 } |
| (...skipping 1393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2062 } | 2066 } |
| 2063 | 2067 |
| 2064 | 2068 |
| 2065 CompilationDependencies* JSTypedLowering::dependencies() const { | 2069 CompilationDependencies* JSTypedLowering::dependencies() const { |
| 2066 return dependencies_; | 2070 return dependencies_; |
| 2067 } | 2071 } |
| 2068 | 2072 |
| 2069 } // namespace compiler | 2073 } // namespace compiler |
| 2070 } // namespace internal | 2074 } // namespace internal |
| 2071 } // namespace v8 | 2075 } // namespace v8 |
| OLD | NEW |