Index: src/compiler/simplified-lowering.cc |
diff --git a/src/compiler/simplified-lowering.cc b/src/compiler/simplified-lowering.cc |
index 3acefdf163c029692ef2b413b34c16b3ecdc6c57..be6be16463d41fa13a8e2221b9e1a9064352b12c 100644 |
--- a/src/compiler/simplified-lowering.cc |
+++ b/src/compiler/simplified-lowering.cc |
@@ -749,6 +749,23 @@ class RepresentationSelector { |
} |
} |
+ void VisitReturn(Node* node) { |
+ int tagged_limit = node->op()->ValueInputCount() + |
+ OperatorProperties::GetContextInputCount(node->op()) + |
+ OperatorProperties::GetFrameStateInputCount(node->op()); |
+ // Visit integer slot count to pop |
+ ProcessInput(node, 0, UseInfo::TruncatingWord32()); |
+ |
+ // Visit value, context and frame state inputs as tagged. |
+ for (int i = 1; i < tagged_limit; i++) { |
+ ProcessInput(node, i, UseInfo::AnyTagged()); |
+ } |
+ // Only enqueue other inputs (effects, control). |
+ for (int i = tagged_limit; i < node->InputCount(); i++) { |
+ EnqueueInput(node, i); |
+ } |
+ } |
+ |
// Helper for an unused node. |
void VisitUnused(Node* node) { |
int value_count = node->op()->ValueInputCount() + |
@@ -2452,7 +2469,6 @@ class RepresentationSelector { |
// Operators with all inputs tagged and no or tagged output have uniform |
// handling. |
case IrOpcode::kEnd: |
- case IrOpcode::kReturn: |
case IrOpcode::kIfSuccess: |
case IrOpcode::kIfException: |
case IrOpcode::kIfTrue: |
@@ -2487,6 +2503,11 @@ class RepresentationSelector { |
// Assume the output is tagged. |
return SetOutput(node, MachineRepresentation::kTagged); |
+ case IrOpcode::kReturn: |
Michael Starzinger
2016/10/28 14:12:14
nit: Please move this up to before the block where
danno
2016/10/31 10:06:40
Done.
|
+ VisitReturn(node); |
+ // Assume the output is tagged. |
+ return SetOutput(node, MachineRepresentation::kTagged); |
+ |
default: |
V8_Fatal( |
__FILE__, __LINE__, |