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/instruction-selector.h" | 5 #include "src/compiler/instruction-selector.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "src/base/adapters.h" | 9 #include "src/base/adapters.h" |
10 #include "src/compiler/instruction-selector-impl.h" | 10 #include "src/compiler/instruction-selector-impl.h" |
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
538 case IrOpcode::kBranch: | 538 case IrOpcode::kBranch: |
539 case IrOpcode::kIfTrue: | 539 case IrOpcode::kIfTrue: |
540 case IrOpcode::kIfFalse: | 540 case IrOpcode::kIfFalse: |
541 case IrOpcode::kIfSuccess: | 541 case IrOpcode::kIfSuccess: |
542 case IrOpcode::kSwitch: | 542 case IrOpcode::kSwitch: |
543 case IrOpcode::kIfValue: | 543 case IrOpcode::kIfValue: |
544 case IrOpcode::kIfDefault: | 544 case IrOpcode::kIfDefault: |
545 case IrOpcode::kEffectPhi: | 545 case IrOpcode::kEffectPhi: |
546 case IrOpcode::kMerge: | 546 case IrOpcode::kMerge: |
547 case IrOpcode::kTerminate: | 547 case IrOpcode::kTerminate: |
| 548 case IrOpcode::kBeginRegion: |
548 // No code needed for these graph artifacts. | 549 // No code needed for these graph artifacts. |
549 return; | 550 return; |
550 case IrOpcode::kIfException: | 551 case IrOpcode::kIfException: |
551 return MarkAsReference(node), VisitIfException(node); | 552 return MarkAsReference(node), VisitIfException(node); |
552 case IrOpcode::kFinish: | 553 case IrOpcode::kFinishRegion: |
553 return MarkAsReference(node), VisitFinish(node); | 554 return MarkAsReference(node), VisitFinishRegion(node); |
554 case IrOpcode::kParameter: { | 555 case IrOpcode::kParameter: { |
555 MachineType type = | 556 MachineType type = |
556 linkage()->GetParameterType(ParameterIndexOf(node->op())); | 557 linkage()->GetParameterType(ParameterIndexOf(node->op())); |
557 MarkAsRepresentation(type, node); | 558 MarkAsRepresentation(type, node); |
558 return VisitParameter(node); | 559 return VisitParameter(node); |
559 } | 560 } |
560 case IrOpcode::kOsrValue: | 561 case IrOpcode::kOsrValue: |
561 return MarkAsReference(node), VisitOsrValue(node); | 562 return MarkAsReference(node), VisitOsrValue(node); |
562 case IrOpcode::kPhi: { | 563 case IrOpcode::kPhi: { |
563 MachineType type = OpParameter<MachineType>(node); | 564 MachineType type = OpParameter<MachineType>(node); |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
918 } | 919 } |
919 | 920 |
920 | 921 |
921 void InstructionSelector::VisitBitcastInt64ToFloat64(Node* node) { | 922 void InstructionSelector::VisitBitcastInt64ToFloat64(Node* node) { |
922 UNIMPLEMENTED(); | 923 UNIMPLEMENTED(); |
923 } | 924 } |
924 | 925 |
925 #endif // V8_TARGET_ARCH_32_BIT | 926 #endif // V8_TARGET_ARCH_32_BIT |
926 | 927 |
927 | 928 |
928 void InstructionSelector::VisitFinish(Node* node) { | 929 void InstructionSelector::VisitFinishRegion(Node* node) { |
929 OperandGenerator g(this); | 930 OperandGenerator g(this); |
930 Node* value = node->InputAt(0); | 931 Node* value = node->InputAt(0); |
931 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value)); | 932 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value)); |
932 } | 933 } |
933 | 934 |
934 | 935 |
935 void InstructionSelector::VisitParameter(Node* node) { | 936 void InstructionSelector::VisitParameter(Node* node) { |
936 OperandGenerator g(this); | 937 OperandGenerator g(this); |
937 int index = ParameterIndexOf(node->op()); | 938 int index = ParameterIndexOf(node->op()); |
938 Emit(kArchNop, | 939 Emit(kArchNop, |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1148 for (StateValuesAccess::TypedNode input_node : StateValuesAccess(stack)) { | 1149 for (StateValuesAccess::TypedNode input_node : StateValuesAccess(stack)) { |
1149 inputs->push_back(OperandForDeopt(&g, input_node.node, kind)); | 1150 inputs->push_back(OperandForDeopt(&g, input_node.node, kind)); |
1150 descriptor->SetType(value_index++, input_node.type); | 1151 descriptor->SetType(value_index++, input_node.type); |
1151 } | 1152 } |
1152 DCHECK(value_index == descriptor->GetSize()); | 1153 DCHECK(value_index == descriptor->GetSize()); |
1153 } | 1154 } |
1154 | 1155 |
1155 } // namespace compiler | 1156 } // namespace compiler |
1156 } // namespace internal | 1157 } // namespace internal |
1157 } // namespace v8 | 1158 } // namespace v8 |
OLD | NEW |