| 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 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 824 case IrOpcode::kChangeUint32ToFloat64: | 824 case IrOpcode::kChangeUint32ToFloat64: |
| 825 return MarkAsFloat64(node), VisitChangeUint32ToFloat64(node); | 825 return MarkAsFloat64(node), VisitChangeUint32ToFloat64(node); |
| 826 case IrOpcode::kChangeFloat64ToInt32: | 826 case IrOpcode::kChangeFloat64ToInt32: |
| 827 return MarkAsWord32(node), VisitChangeFloat64ToInt32(node); | 827 return MarkAsWord32(node), VisitChangeFloat64ToInt32(node); |
| 828 case IrOpcode::kChangeFloat64ToUint32: | 828 case IrOpcode::kChangeFloat64ToUint32: |
| 829 return MarkAsWord32(node), VisitChangeFloat64ToUint32(node); | 829 return MarkAsWord32(node), VisitChangeFloat64ToUint32(node); |
| 830 case IrOpcode::kTryTruncateFloat32ToInt64: | 830 case IrOpcode::kTryTruncateFloat32ToInt64: |
| 831 return MarkAsWord64(node), VisitTryTruncateFloat32ToInt64(node); | 831 return MarkAsWord64(node), VisitTryTruncateFloat32ToInt64(node); |
| 832 case IrOpcode::kTryTruncateFloat64ToInt64: | 832 case IrOpcode::kTryTruncateFloat64ToInt64: |
| 833 return MarkAsWord64(node), VisitTryTruncateFloat64ToInt64(node); | 833 return MarkAsWord64(node), VisitTryTruncateFloat64ToInt64(node); |
| 834 case IrOpcode::kTruncateFloat32ToUint64: | 834 case IrOpcode::kTryTruncateFloat32ToUint64: |
| 835 return MarkAsWord64(node), VisitTruncateFloat32ToUint64(node); | 835 return MarkAsWord64(node), VisitTryTruncateFloat32ToUint64(node); |
| 836 case IrOpcode::kTryTruncateFloat64ToUint64: | 836 case IrOpcode::kTryTruncateFloat64ToUint64: |
| 837 return MarkAsWord64(node), VisitTryTruncateFloat64ToUint64(node); | 837 return MarkAsWord64(node), VisitTryTruncateFloat64ToUint64(node); |
| 838 case IrOpcode::kChangeInt32ToInt64: | 838 case IrOpcode::kChangeInt32ToInt64: |
| 839 return MarkAsWord64(node), VisitChangeInt32ToInt64(node); | 839 return MarkAsWord64(node), VisitChangeInt32ToInt64(node); |
| 840 case IrOpcode::kChangeUint32ToUint64: | 840 case IrOpcode::kChangeUint32ToUint64: |
| 841 return MarkAsWord64(node), VisitChangeUint32ToUint64(node); | 841 return MarkAsWord64(node), VisitChangeUint32ToUint64(node); |
| 842 case IrOpcode::kTruncateFloat64ToFloat32: | 842 case IrOpcode::kTruncateFloat64ToFloat32: |
| 843 return MarkAsFloat32(node), VisitTruncateFloat64ToFloat32(node); | 843 return MarkAsFloat32(node), VisitTruncateFloat64ToFloat32(node); |
| 844 case IrOpcode::kTruncateFloat64ToInt32: | 844 case IrOpcode::kTruncateFloat64ToInt32: |
| 845 return MarkAsWord32(node), VisitTruncateFloat64ToInt32(node); | 845 return MarkAsWord32(node), VisitTruncateFloat64ToInt32(node); |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1087 void InstructionSelector::VisitTryTruncateFloat32ToInt64(Node* node) { | 1087 void InstructionSelector::VisitTryTruncateFloat32ToInt64(Node* node) { |
| 1088 UNIMPLEMENTED(); | 1088 UNIMPLEMENTED(); |
| 1089 } | 1089 } |
| 1090 | 1090 |
| 1091 | 1091 |
| 1092 void InstructionSelector::VisitTryTruncateFloat64ToInt64(Node* node) { | 1092 void InstructionSelector::VisitTryTruncateFloat64ToInt64(Node* node) { |
| 1093 UNIMPLEMENTED(); | 1093 UNIMPLEMENTED(); |
| 1094 } | 1094 } |
| 1095 | 1095 |
| 1096 | 1096 |
| 1097 void InstructionSelector::VisitTruncateFloat32ToUint64(Node* node) { | 1097 void InstructionSelector::VisitTryTruncateFloat32ToUint64(Node* node) { |
| 1098 UNIMPLEMENTED(); | 1098 UNIMPLEMENTED(); |
| 1099 } | 1099 } |
| 1100 | 1100 |
| 1101 | 1101 |
| 1102 void InstructionSelector::VisitTryTruncateFloat64ToUint64(Node* node) { | 1102 void InstructionSelector::VisitTryTruncateFloat64ToUint64(Node* node) { |
| 1103 UNIMPLEMENTED(); | 1103 UNIMPLEMENTED(); |
| 1104 } | 1104 } |
| 1105 | 1105 |
| 1106 | 1106 |
| 1107 void InstructionSelector::VisitTruncateInt64ToInt32(Node* node) { | 1107 void InstructionSelector::VisitTruncateInt64ToInt32(Node* node) { |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1207 | 1207 |
| 1208 | 1208 |
| 1209 void InstructionSelector::VisitProjection(Node* node) { | 1209 void InstructionSelector::VisitProjection(Node* node) { |
| 1210 OperandGenerator g(this); | 1210 OperandGenerator g(this); |
| 1211 Node* value = node->InputAt(0); | 1211 Node* value = node->InputAt(0); |
| 1212 switch (value->opcode()) { | 1212 switch (value->opcode()) { |
| 1213 case IrOpcode::kInt32AddWithOverflow: | 1213 case IrOpcode::kInt32AddWithOverflow: |
| 1214 case IrOpcode::kInt32SubWithOverflow: | 1214 case IrOpcode::kInt32SubWithOverflow: |
| 1215 case IrOpcode::kTryTruncateFloat32ToInt64: | 1215 case IrOpcode::kTryTruncateFloat32ToInt64: |
| 1216 case IrOpcode::kTryTruncateFloat64ToInt64: | 1216 case IrOpcode::kTryTruncateFloat64ToInt64: |
| 1217 case IrOpcode::kTryTruncateFloat32ToUint64: |
| 1217 case IrOpcode::kTryTruncateFloat64ToUint64: | 1218 case IrOpcode::kTryTruncateFloat64ToUint64: |
| 1218 if (ProjectionIndexOf(node->op()) == 0u) { | 1219 if (ProjectionIndexOf(node->op()) == 0u) { |
| 1219 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value)); | 1220 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value)); |
| 1220 } else { | 1221 } else { |
| 1221 DCHECK(ProjectionIndexOf(node->op()) == 1u); | 1222 DCHECK(ProjectionIndexOf(node->op()) == 1u); |
| 1222 MarkAsUsed(value); | 1223 MarkAsUsed(value); |
| 1223 } | 1224 } |
| 1224 break; | 1225 break; |
| 1225 default: | 1226 default: |
| 1226 break; | 1227 break; |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1472 return new (instruction_zone()) FrameStateDescriptor( | 1473 return new (instruction_zone()) FrameStateDescriptor( |
| 1473 instruction_zone(), state_info.type(), state_info.bailout_id(), | 1474 instruction_zone(), state_info.type(), state_info.bailout_id(), |
| 1474 state_info.state_combine(), parameters, locals, stack, | 1475 state_info.state_combine(), parameters, locals, stack, |
| 1475 state_info.shared_info(), outer_state); | 1476 state_info.shared_info(), outer_state); |
| 1476 } | 1477 } |
| 1477 | 1478 |
| 1478 | 1479 |
| 1479 } // namespace compiler | 1480 } // namespace compiler |
| 1480 } // namespace internal | 1481 } // namespace internal |
| 1481 } // namespace v8 | 1482 } // namespace v8 |
| OLD | NEW |