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 2288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2299 // that at some point, and maybe even a dedicated truncation. | 2299 // that at some point, and maybe even a dedicated truncation. |
2300 VisitUnop(node, UseInfo::AnyTagged(), | 2300 VisitUnop(node, UseInfo::AnyTagged(), |
2301 MachineRepresentation::kTagged); | 2301 MachineRepresentation::kTagged); |
2302 } | 2302 } |
2303 if (lower()) DeferReplacement(node, node->InputAt(0)); | 2303 if (lower()) DeferReplacement(node, node->InputAt(0)); |
2304 } else { | 2304 } else { |
2305 VisitUnop(node, UseInfo::AnyTagged(), MachineRepresentation::kTagged); | 2305 VisitUnop(node, UseInfo::AnyTagged(), MachineRepresentation::kTagged); |
2306 } | 2306 } |
2307 return; | 2307 return; |
2308 } | 2308 } |
| 2309 case IrOpcode::kCheckReceiver: { |
| 2310 if (InputIs(node, Type::Receiver())) { |
| 2311 VisitUnop(node, UseInfo::AnyTagged(), |
| 2312 MachineRepresentation::kTaggedPointer); |
| 2313 if (lower()) DeferReplacement(node, node->InputAt(0)); |
| 2314 } else { |
| 2315 VisitUnop(node, UseInfo::CheckedHeapObjectAsTaggedPointer(), |
| 2316 MachineRepresentation::kTaggedPointer); |
| 2317 } |
| 2318 return; |
| 2319 } |
2309 case IrOpcode::kCheckSmi: { | 2320 case IrOpcode::kCheckSmi: { |
2310 if (SmiValuesAre32Bits() && truncation.IsUsedAsWord32()) { | 2321 if (SmiValuesAre32Bits() && truncation.IsUsedAsWord32()) { |
2311 VisitUnop(node, UseInfo::CheckedSignedSmallAsWord32(), | 2322 VisitUnop(node, UseInfo::CheckedSignedSmallAsWord32(), |
2312 MachineRepresentation::kWord32); | 2323 MachineRepresentation::kWord32); |
2313 } else { | 2324 } else { |
2314 VisitUnop(node, UseInfo::CheckedSignedSmallAsTaggedSigned(), | 2325 VisitUnop(node, UseInfo::CheckedSignedSmallAsTaggedSigned(), |
2315 MachineRepresentation::kTaggedSigned); | 2326 MachineRepresentation::kTaggedSigned); |
2316 } | 2327 } |
2317 if (lower()) DeferReplacement(node, node->InputAt(0)); | 2328 if (lower()) DeferReplacement(node, node->InputAt(0)); |
2318 return; | 2329 return; |
(...skipping 1173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3492 isolate(), graph()->zone(), callable.descriptor(), 0, flags, | 3503 isolate(), graph()->zone(), callable.descriptor(), 0, flags, |
3493 Operator::kNoProperties); | 3504 Operator::kNoProperties); |
3494 to_number_operator_.set(common()->Call(desc)); | 3505 to_number_operator_.set(common()->Call(desc)); |
3495 } | 3506 } |
3496 return to_number_operator_.get(); | 3507 return to_number_operator_.get(); |
3497 } | 3508 } |
3498 | 3509 |
3499 } // namespace compiler | 3510 } // namespace compiler |
3500 } // namespace internal | 3511 } // namespace internal |
3501 } // namespace v8 | 3512 } // namespace v8 |
OLD | NEW |