Chromium Code Reviews

Unified Diff: src/compiler/instruction-selector.cc

Issue 1894983002: [turbofan] Introduce CallDescriptorOf helper for safety. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_issue-4924
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « src/compiler/common-operator.cc ('k') | src/compiler/int64-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/instruction-selector.cc
diff --git a/src/compiler/instruction-selector.cc b/src/compiler/instruction-selector.cc
index a917328650a45af6e39bc1b3033e3ec2cad893b1..cfa4536851693d289ec924b22098cd6e144c0fc0 100644
--- a/src/compiler/instruction-selector.cc
+++ b/src/compiler/instruction-selector.cc
@@ -1451,7 +1451,7 @@ void InstructionSelector::VisitIfException(Node* node) {
OperandGenerator g(this);
Node* call = node->InputAt(1);
DCHECK_EQ(IrOpcode::kCall, call->opcode());
- const CallDescriptor* descriptor = OpParameter<const CallDescriptor*>(call);
+ const CallDescriptor* descriptor = CallDescriptorOf(call->op());
Emit(kArchNop,
g.DefineAsLocation(node, descriptor->GetReturnLocation(0),
descriptor->GetReturnType(0).representation()));
@@ -1523,7 +1523,7 @@ void InstructionSelector::VisitConstant(Node* node) {
void InstructionSelector::VisitCall(Node* node, BasicBlock* handler) {
OperandGenerator g(this);
- const CallDescriptor* descriptor = OpParameter<const CallDescriptor*>(node);
+ const CallDescriptor* descriptor = CallDescriptorOf(node->op());
FrameStateDescriptor* frame_state_descriptor = nullptr;
if (descriptor->NeedsFrameState()) {
@@ -1591,7 +1591,7 @@ void InstructionSelector::VisitCall(Node* node, BasicBlock* handler) {
void InstructionSelector::VisitTailCall(Node* node) {
OperandGenerator g(this);
- CallDescriptor const* descriptor = OpParameter<CallDescriptor const*>(node);
+ CallDescriptor const* descriptor = CallDescriptorOf(node->op());
DCHECK_NE(0, descriptor->flags() & CallDescriptor::kSupportsTailCalls);
DCHECK_EQ(0, descriptor->flags() & CallDescriptor::kPatchableCallSite);
DCHECK_EQ(0, descriptor->flags() & CallDescriptor::kNeedsNopAfterCall);
« no previous file with comments | « src/compiler/common-operator.cc ('k') | src/compiler/int64-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine