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

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

Issue 2378773013: [WASM] Implements catch for the wasm low level exception mechanism. (Closed)
Patch Set: updates effect dependencies. Created 4 years, 3 months 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 side-by-side diff with in-line comments
Download patch
Index: src/compiler/instruction-selector.cc
diff --git a/src/compiler/instruction-selector.cc b/src/compiler/instruction-selector.cc
index e4faca5a6692b572875374ad51a63bfc8957fc65..d8409a3f89c8250155d645b73b189ece198083d4 100644
--- a/src/compiler/instruction-selector.cc
+++ b/src/compiler/instruction-selector.cc
@@ -1707,13 +1707,17 @@ void InstructionSelector::VisitParameter(Node* node) {
Emit(kArchNop, op);
}
+namespace {
+LinkageLocation ExceptionLocation() {
+ return LinkageLocation::ForRegister(kReturnRegister0.code(),
+ MachineType::IntPtr());
+}
+}
void InstructionSelector::VisitIfException(Node* node) {
OperandGenerator g(this);
- Node* call = node->InputAt(1);
- DCHECK_EQ(IrOpcode::kCall, call->opcode());
- const CallDescriptor* descriptor = CallDescriptorOf(call->op());
- Emit(kArchNop, g.DefineAsLocation(node, descriptor->GetReturnLocation(0)));
+ DCHECK_EQ(IrOpcode::kCall, node->InputAt(1)->opcode());
+ Emit(kArchNop, g.DefineAsLocation(node, ExceptionLocation()));
}

Powered by Google App Engine
This is Rietveld 408576698