Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Side by Side Diff: src/compiler/instruction-selector.cc

Issue 1504363002: [turbofan] Change TruncateFloat32ToInt64 to TryTruncateFloat32ToInt64. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 810 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 case IrOpcode::kChangeFloat32ToFloat64: 821 case IrOpcode::kChangeFloat32ToFloat64:
822 return MarkAsFloat64(node), VisitChangeFloat32ToFloat64(node); 822 return MarkAsFloat64(node), VisitChangeFloat32ToFloat64(node);
823 case IrOpcode::kChangeInt32ToFloat64: 823 case IrOpcode::kChangeInt32ToFloat64:
824 return MarkAsFloat64(node), VisitChangeInt32ToFloat64(node); 824 return MarkAsFloat64(node), VisitChangeInt32ToFloat64(node);
825 case IrOpcode::kChangeUint32ToFloat64: 825 case IrOpcode::kChangeUint32ToFloat64:
826 return MarkAsFloat64(node), VisitChangeUint32ToFloat64(node); 826 return MarkAsFloat64(node), VisitChangeUint32ToFloat64(node);
827 case IrOpcode::kChangeFloat64ToInt32: 827 case IrOpcode::kChangeFloat64ToInt32:
828 return MarkAsWord32(node), VisitChangeFloat64ToInt32(node); 828 return MarkAsWord32(node), VisitChangeFloat64ToInt32(node);
829 case IrOpcode::kChangeFloat64ToUint32: 829 case IrOpcode::kChangeFloat64ToUint32:
830 return MarkAsWord32(node), VisitChangeFloat64ToUint32(node); 830 return MarkAsWord32(node), VisitChangeFloat64ToUint32(node);
831 case IrOpcode::kTruncateFloat32ToInt64: 831 case IrOpcode::kTryTruncateFloat32ToInt64:
832 return MarkAsWord64(node), VisitTruncateFloat32ToInt64(node); 832 return MarkAsWord64(node), VisitTryTruncateFloat32ToInt64(node);
833 case IrOpcode::kTryTruncateFloat64ToInt64: 833 case IrOpcode::kTryTruncateFloat64ToInt64:
834 return MarkAsWord64(node), VisitTryTruncateFloat64ToInt64(node); 834 return MarkAsWord64(node), VisitTryTruncateFloat64ToInt64(node);
835 case IrOpcode::kTruncateFloat32ToUint64: 835 case IrOpcode::kTruncateFloat32ToUint64:
836 return MarkAsWord64(node), VisitTruncateFloat32ToUint64(node); 836 return MarkAsWord64(node), VisitTruncateFloat32ToUint64(node);
837 case IrOpcode::kTruncateFloat64ToUint64: 837 case IrOpcode::kTruncateFloat64ToUint64:
838 return MarkAsWord64(node), VisitTruncateFloat64ToUint64(node); 838 return MarkAsWord64(node), VisitTruncateFloat64ToUint64(node);
839 case IrOpcode::kChangeInt32ToInt64: 839 case IrOpcode::kChangeInt32ToInt64:
840 return MarkAsWord64(node), VisitChangeInt32ToInt64(node); 840 return MarkAsWord64(node), VisitChangeInt32ToInt64(node);
841 case IrOpcode::kChangeUint32ToUint64: 841 case IrOpcode::kChangeUint32ToUint64:
842 return MarkAsWord64(node), VisitChangeUint32ToUint64(node); 842 return MarkAsWord64(node), VisitChangeUint32ToUint64(node);
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
1077 void InstructionSelector::VisitChangeInt32ToInt64(Node* node) { 1077 void InstructionSelector::VisitChangeInt32ToInt64(Node* node) {
1078 UNIMPLEMENTED(); 1078 UNIMPLEMENTED();
1079 } 1079 }
1080 1080
1081 1081
1082 void InstructionSelector::VisitChangeUint32ToUint64(Node* node) { 1082 void InstructionSelector::VisitChangeUint32ToUint64(Node* node) {
1083 UNIMPLEMENTED(); 1083 UNIMPLEMENTED();
1084 } 1084 }
1085 1085
1086 1086
1087 void InstructionSelector::VisitTruncateFloat32ToInt64(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::VisitTruncateFloat32ToUint64(Node* node) {
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
1203 } 1203 }
1204 } 1204 }
1205 1205
1206 1206
1207 void InstructionSelector::VisitProjection(Node* node) { 1207 void InstructionSelector::VisitProjection(Node* node) {
1208 OperandGenerator g(this); 1208 OperandGenerator g(this);
1209 Node* value = node->InputAt(0); 1209 Node* value = node->InputAt(0);
1210 switch (value->opcode()) { 1210 switch (value->opcode()) {
1211 case IrOpcode::kInt32AddWithOverflow: 1211 case IrOpcode::kInt32AddWithOverflow:
1212 case IrOpcode::kInt32SubWithOverflow: 1212 case IrOpcode::kInt32SubWithOverflow:
1213 case IrOpcode::kTryTruncateFloat32ToInt64:
1213 case IrOpcode::kTryTruncateFloat64ToInt64: 1214 case IrOpcode::kTryTruncateFloat64ToInt64:
1214 if (ProjectionIndexOf(node->op()) == 0u) { 1215 if (ProjectionIndexOf(node->op()) == 0u) {
1215 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value)); 1216 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value));
1216 } else { 1217 } else {
1217 DCHECK(ProjectionIndexOf(node->op()) == 1u); 1218 DCHECK(ProjectionIndexOf(node->op()) == 1u);
1218 MarkAsUsed(value); 1219 MarkAsUsed(value);
1219 } 1220 }
1220 break; 1221 break;
1221 default: 1222 default:
1222 break; 1223 break;
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
1459 return new (instruction_zone()) FrameStateDescriptor( 1460 return new (instruction_zone()) FrameStateDescriptor(
1460 instruction_zone(), state_info.type(), state_info.bailout_id(), 1461 instruction_zone(), state_info.type(), state_info.bailout_id(),
1461 state_info.state_combine(), parameters, locals, stack, 1462 state_info.state_combine(), parameters, locals, stack,
1462 state_info.shared_info(), outer_state); 1463 state_info.shared_info(), outer_state);
1463 } 1464 }
1464 1465
1465 1466
1466 } // namespace compiler 1467 } // namespace compiler
1467 } // namespace internal 1468 } // namespace internal
1468 } // namespace v8 1469 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698