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

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

Issue 989123003: [turbofan] Project exception value out of calls. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments. Created 5 years, 9 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
« no previous file with comments | « src/compiler/instruction-selector.h ('k') | src/compiler/opcodes.h » ('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 c1d66ea345aec415ebe343757f62445a2da4fefb..89c2fe1e459f1110b61fbaa0e25bbc2dc0b2d104 100644
--- a/src/compiler/instruction-selector.cc
+++ b/src/compiler/instruction-selector.cc
@@ -596,7 +596,6 @@ void InstructionSelector::VisitNode(Node* node) {
case IrOpcode::kIfTrue:
case IrOpcode::kIfFalse:
case IrOpcode::kIfSuccess:
- case IrOpcode::kIfException:
case IrOpcode::kSwitch:
case IrOpcode::kIfValue:
case IrOpcode::kIfDefault:
@@ -604,6 +603,8 @@ void InstructionSelector::VisitNode(Node* node) {
case IrOpcode::kMerge:
// No code needed for these graph artifacts.
return;
+ case IrOpcode::kIfException:
+ return MarkAsReference(node), VisitIfException(node);
case IrOpcode::kFinish:
return MarkAsReference(node), VisitFinish(node);
case IrOpcode::kParameter: {
@@ -969,6 +970,16 @@ void InstructionSelector::VisitParameter(Node* node) {
}
+void InstructionSelector::VisitIfException(Node* node) {
+ OperandGenerator g(this);
+ Node* call = node->InputAt(0);
+ DCHECK_EQ(IrOpcode::kCall, call->opcode());
+ const CallDescriptor* descriptor = OpParameter<const CallDescriptor*>(call);
+ Emit(kArchNop, g.DefineAsLocation(node, descriptor->GetReturnLocation(0),
+ descriptor->GetReturnType(0)));
+}
+
+
void InstructionSelector::VisitOsrValue(Node* node) {
OperandGenerator g(this);
int index = OpParameter<int>(node);
« no previous file with comments | « src/compiler/instruction-selector.h ('k') | src/compiler/opcodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698