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

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: Cleanup 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 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::kTruncateFloat64ToUint64: 835 case IrOpcode::kTruncateFloat64ToUint64:
836 return MarkAsWord64(node), VisitTruncateFloat64ToUint64(node); 836 return MarkAsWord64(node), VisitTruncateFloat64ToUint64(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
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
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 if (ProjectionIndexOf(node->op()) == 0u) { 1213 if (ProjectionIndexOf(node->op()) == 0u) {
1213 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value)); 1214 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value));
1214 } else { 1215 } else {
1215 DCHECK(ProjectionIndexOf(node->op()) == 1u); 1216 DCHECK(ProjectionIndexOf(node->op()) == 1u);
1216 MarkAsUsed(value); 1217 MarkAsUsed(value);
1217 } 1218 }
1218 break; 1219 break;
1219 default: 1220 default:
1220 break; 1221 break;
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
1466 return new (instruction_zone()) FrameStateDescriptor( 1467 return new (instruction_zone()) FrameStateDescriptor(
1467 instruction_zone(), state_info.type(), state_info.bailout_id(), 1468 instruction_zone(), state_info.type(), state_info.bailout_id(),
1468 state_info.state_combine(), parameters, locals, stack, 1469 state_info.state_combine(), parameters, locals, stack,
1469 state_info.shared_info(), outer_state); 1470 state_info.shared_info(), outer_state);
1470 } 1471 }
1471 1472
1472 1473
1473 } // namespace compiler 1474 } // namespace compiler
1474 } // namespace internal 1475 } // namespace internal
1475 } // namespace v8 1476 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698