| 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 2038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2049 case IrOpcode::kStringCharCodeAt: { | 2049 case IrOpcode::kStringCharCodeAt: { |
| 2050 VisitBinop(node, UseInfo::AnyTagged(), UseInfo::TruncatingWord32(), | 2050 VisitBinop(node, UseInfo::AnyTagged(), UseInfo::TruncatingWord32(), |
| 2051 MachineRepresentation::kWord32); | 2051 MachineRepresentation::kWord32); |
| 2052 return; | 2052 return; |
| 2053 } | 2053 } |
| 2054 case IrOpcode::kStringFromCharCode: { | 2054 case IrOpcode::kStringFromCharCode: { |
| 2055 VisitUnop(node, UseInfo::TruncatingWord32(), | 2055 VisitUnop(node, UseInfo::TruncatingWord32(), |
| 2056 MachineRepresentation::kTagged); | 2056 MachineRepresentation::kTagged); |
| 2057 return; | 2057 return; |
| 2058 } | 2058 } |
| 2059 case IrOpcode::kStringFromCodePoint: { |
| 2060 VisitUnop(node, UseInfo::TruncatingWord32(), |
| 2061 MachineRepresentation::kTagged); |
| 2062 return; |
| 2063 } |
| 2059 | 2064 |
| 2060 case IrOpcode::kCheckBounds: { | 2065 case IrOpcode::kCheckBounds: { |
| 2061 Type* index_type = TypeOf(node->InputAt(0)); | 2066 Type* index_type = TypeOf(node->InputAt(0)); |
| 2062 Type* length_type = TypeOf(node->InputAt(1)); | 2067 Type* length_type = TypeOf(node->InputAt(1)); |
| 2063 if (index_type->Is(Type::Unsigned32())) { | 2068 if (index_type->Is(Type::Unsigned32())) { |
| 2064 VisitBinop(node, UseInfo::TruncatingWord32(), | 2069 VisitBinop(node, UseInfo::TruncatingWord32(), |
| 2065 MachineRepresentation::kWord32); | 2070 MachineRepresentation::kWord32); |
| 2066 if (lower() && index_type->Max() < length_type->Min()) { | 2071 if (lower() && index_type->Max() < length_type->Min()) { |
| 2067 // The bounds check is redundant if we already know that | 2072 // The bounds check is redundant if we already know that |
| 2068 // the index is within the bounds of [0.0, length[. | 2073 // the index is within the bounds of [0.0, length[. |
| (...skipping 1141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3210 isolate(), graph()->zone(), callable.descriptor(), 0, flags, | 3215 isolate(), graph()->zone(), callable.descriptor(), 0, flags, |
| 3211 Operator::kNoProperties); | 3216 Operator::kNoProperties); |
| 3212 to_number_operator_.set(common()->Call(desc)); | 3217 to_number_operator_.set(common()->Call(desc)); |
| 3213 } | 3218 } |
| 3214 return to_number_operator_.get(); | 3219 return to_number_operator_.get(); |
| 3215 } | 3220 } |
| 3216 | 3221 |
| 3217 } // namespace compiler | 3222 } // namespace compiler |
| 3218 } // namespace internal | 3223 } // namespace internal |
| 3219 } // namespace v8 | 3224 } // namespace v8 |
| OLD | NEW |