| 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/compiler/simplified-lowering.h" | 5 #include "src/compiler/simplified-lowering.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "src/address-map.h" | 9 #include "src/address-map.h" |
| 10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
| (...skipping 2831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2842 Node* const one = jsgraph()->Float64Constant(1.0); | 2842 Node* const one = jsgraph()->Float64Constant(1.0); |
| 2843 | 2843 |
| 2844 Node* const input = node->InputAt(0); | 2844 Node* const input = node->InputAt(0); |
| 2845 | 2845 |
| 2846 return graph()->NewNode( | 2846 return graph()->NewNode( |
| 2847 common()->Select(MachineRepresentation::kFloat64), | 2847 common()->Select(MachineRepresentation::kFloat64), |
| 2848 graph()->NewNode(machine()->Float64LessThan(), input, zero), minus_one, | 2848 graph()->NewNode(machine()->Float64LessThan(), input, zero), minus_one, |
| 2849 graph()->NewNode( | 2849 graph()->NewNode( |
| 2850 common()->Select(MachineRepresentation::kFloat64), | 2850 common()->Select(MachineRepresentation::kFloat64), |
| 2851 graph()->NewNode(machine()->Float64LessThan(), zero, input), one, | 2851 graph()->NewNode(machine()->Float64LessThan(), zero, input), one, |
| 2852 zero)); | 2852 input)); |
| 2853 } | 2853 } |
| 2854 | 2854 |
| 2855 Node* SimplifiedLowering::Int32Abs(Node* const node) { | 2855 Node* SimplifiedLowering::Int32Abs(Node* const node) { |
| 2856 Node* const input = node->InputAt(0); | 2856 Node* const input = node->InputAt(0); |
| 2857 | 2857 |
| 2858 // Generate case for absolute integer value. | 2858 // Generate case for absolute integer value. |
| 2859 // | 2859 // |
| 2860 // let sign = input >> 31 in | 2860 // let sign = input >> 31 in |
| 2861 // (input ^ sign) - sign | 2861 // (input ^ sign) - sign |
| 2862 | 2862 |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3195 isolate(), graph()->zone(), callable.descriptor(), 0, flags, | 3195 isolate(), graph()->zone(), callable.descriptor(), 0, flags, |
| 3196 Operator::kNoProperties); | 3196 Operator::kNoProperties); |
| 3197 to_number_operator_.set(common()->Call(desc)); | 3197 to_number_operator_.set(common()->Call(desc)); |
| 3198 } | 3198 } |
| 3199 return to_number_operator_.get(); | 3199 return to_number_operator_.get(); |
| 3200 } | 3200 } |
| 3201 | 3201 |
| 3202 } // namespace compiler | 3202 } // namespace compiler |
| 3203 } // namespace internal | 3203 } // namespace internal |
| 3204 } // namespace v8 | 3204 } // namespace v8 |
| OLD | NEW |