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 808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
819 case IrOpcode::kChangeFloat32ToFloat64: | 819 case IrOpcode::kChangeFloat32ToFloat64: |
820 return MarkAsFloat64(node), VisitChangeFloat32ToFloat64(node); | 820 return MarkAsFloat64(node), VisitChangeFloat32ToFloat64(node); |
821 case IrOpcode::kChangeInt32ToFloat64: | 821 case IrOpcode::kChangeInt32ToFloat64: |
822 return MarkAsFloat64(node), VisitChangeInt32ToFloat64(node); | 822 return MarkAsFloat64(node), VisitChangeInt32ToFloat64(node); |
823 case IrOpcode::kChangeUint32ToFloat64: | 823 case IrOpcode::kChangeUint32ToFloat64: |
824 return MarkAsFloat64(node), VisitChangeUint32ToFloat64(node); | 824 return MarkAsFloat64(node), VisitChangeUint32ToFloat64(node); |
825 case IrOpcode::kChangeFloat64ToInt32: | 825 case IrOpcode::kChangeFloat64ToInt32: |
826 return MarkAsWord32(node), VisitChangeFloat64ToInt32(node); | 826 return MarkAsWord32(node), VisitChangeFloat64ToInt32(node); |
827 case IrOpcode::kChangeFloat64ToUint32: | 827 case IrOpcode::kChangeFloat64ToUint32: |
828 return MarkAsWord32(node), VisitChangeFloat64ToUint32(node); | 828 return MarkAsWord32(node), VisitChangeFloat64ToUint32(node); |
829 case IrOpcode::kTruncateFloat32ToInt64: | 829 case IrOpcode::kTryTruncateFloat32ToInt64: |
830 return MarkAsWord64(node), VisitTruncateFloat32ToInt64(node); | 830 return MarkAsWord64(node), VisitTryTruncateFloat32ToInt64(node); |
831 case IrOpcode::kTryTruncateFloat64ToInt64: | 831 case IrOpcode::kTryTruncateFloat64ToInt64: |
832 return MarkAsWord64(node), VisitTryTruncateFloat64ToInt64(node); | 832 return MarkAsWord64(node), VisitTryTruncateFloat64ToInt64(node); |
833 case IrOpcode::kTruncateFloat32ToUint64: | 833 case IrOpcode::kTruncateFloat32ToUint64: |
834 return MarkAsWord64(node), VisitTruncateFloat32ToUint64(node); | 834 return MarkAsWord64(node), VisitTruncateFloat32ToUint64(node); |
835 case IrOpcode::kTryTruncateFloat64ToUint64: | 835 case IrOpcode::kTryTruncateFloat64ToUint64: |
836 return MarkAsWord64(node), VisitTryTruncateFloat64ToUint64(node); | 836 return MarkAsWord64(node), VisitTryTruncateFloat64ToUint64(node); |
837 case IrOpcode::kChangeInt32ToInt64: | 837 case IrOpcode::kChangeInt32ToInt64: |
838 return MarkAsWord64(node), VisitChangeInt32ToInt64(node); | 838 return MarkAsWord64(node), VisitChangeInt32ToInt64(node); |
839 case IrOpcode::kChangeUint32ToUint64: | 839 case IrOpcode::kChangeUint32ToUint64: |
840 return MarkAsWord64(node), VisitChangeUint32ToUint64(node); | 840 return MarkAsWord64(node), VisitChangeUint32ToUint64(node); |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1075 void InstructionSelector::VisitChangeInt32ToInt64(Node* node) { | 1075 void InstructionSelector::VisitChangeInt32ToInt64(Node* node) { |
1076 UNIMPLEMENTED(); | 1076 UNIMPLEMENTED(); |
1077 } | 1077 } |
1078 | 1078 |
1079 | 1079 |
1080 void InstructionSelector::VisitChangeUint32ToUint64(Node* node) { | 1080 void InstructionSelector::VisitChangeUint32ToUint64(Node* node) { |
1081 UNIMPLEMENTED(); | 1081 UNIMPLEMENTED(); |
1082 } | 1082 } |
1083 | 1083 |
1084 | 1084 |
1085 void InstructionSelector::VisitTruncateFloat32ToInt64(Node* node) { | 1085 void InstructionSelector::VisitTryTruncateFloat32ToInt64(Node* node) { |
1086 UNIMPLEMENTED(); | 1086 UNIMPLEMENTED(); |
1087 } | 1087 } |
1088 | 1088 |
1089 | 1089 |
1090 void InstructionSelector::VisitTryTruncateFloat64ToInt64(Node* node) { | 1090 void InstructionSelector::VisitTryTruncateFloat64ToInt64(Node* node) { |
1091 UNIMPLEMENTED(); | 1091 UNIMPLEMENTED(); |
1092 } | 1092 } |
1093 | 1093 |
1094 | 1094 |
1095 void InstructionSelector::VisitTruncateFloat32ToUint64(Node* node) { | 1095 void InstructionSelector::VisitTruncateFloat32ToUint64(Node* node) { |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1201 } | 1201 } |
1202 } | 1202 } |
1203 | 1203 |
1204 | 1204 |
1205 void InstructionSelector::VisitProjection(Node* node) { | 1205 void InstructionSelector::VisitProjection(Node* node) { |
1206 OperandGenerator g(this); | 1206 OperandGenerator g(this); |
1207 Node* value = node->InputAt(0); | 1207 Node* value = node->InputAt(0); |
1208 switch (value->opcode()) { | 1208 switch (value->opcode()) { |
1209 case IrOpcode::kInt32AddWithOverflow: | 1209 case IrOpcode::kInt32AddWithOverflow: |
1210 case IrOpcode::kInt32SubWithOverflow: | 1210 case IrOpcode::kInt32SubWithOverflow: |
| 1211 case IrOpcode::kTryTruncateFloat32ToInt64: |
1211 case IrOpcode::kTryTruncateFloat64ToInt64: | 1212 case IrOpcode::kTryTruncateFloat64ToInt64: |
1212 case IrOpcode::kTryTruncateFloat64ToUint64: | 1213 case IrOpcode::kTryTruncateFloat64ToUint64: |
1213 if (ProjectionIndexOf(node->op()) == 0u) { | 1214 if (ProjectionIndexOf(node->op()) == 0u) { |
1214 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value)); | 1215 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value)); |
1215 } else { | 1216 } else { |
1216 DCHECK(ProjectionIndexOf(node->op()) == 1u); | 1217 DCHECK(ProjectionIndexOf(node->op()) == 1u); |
1217 MarkAsUsed(value); | 1218 MarkAsUsed(value); |
1218 } | 1219 } |
1219 break; | 1220 break; |
1220 default: | 1221 default: |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1467 return new (instruction_zone()) FrameStateDescriptor( | 1468 return new (instruction_zone()) FrameStateDescriptor( |
1468 instruction_zone(), state_info.type(), state_info.bailout_id(), | 1469 instruction_zone(), state_info.type(), state_info.bailout_id(), |
1469 state_info.state_combine(), parameters, locals, stack, | 1470 state_info.state_combine(), parameters, locals, stack, |
1470 state_info.shared_info(), outer_state); | 1471 state_info.shared_info(), outer_state); |
1471 } | 1472 } |
1472 | 1473 |
1473 | 1474 |
1474 } // namespace compiler | 1475 } // namespace compiler |
1475 } // namespace internal | 1476 } // namespace internal |
1476 } // namespace v8 | 1477 } // namespace v8 |
OLD | NEW |