Index: src/compiler/arm64/code-generator-arm64.cc |
diff --git a/src/compiler/arm64/code-generator-arm64.cc b/src/compiler/arm64/code-generator-arm64.cc |
index 8563901650d5e8b8b24a523888a7f99f563ad9ea..c417594e16dfd96d1146ac538e7212164fddd098 100644 |
--- a/src/compiler/arm64/code-generator-arm64.cc |
+++ b/src/compiler/arm64/code-generator-arm64.cc |
@@ -783,7 +783,7 @@ |
break; |
} |
case kArchRet: |
- AssembleReturn(instr->InputAt(0)); |
+ AssembleReturn(); |
break; |
case kArchStackPointer: |
__ mov(i.OutputRegister(), masm()->StackPointer()); |
@@ -1854,7 +1854,8 @@ |
} |
} |
-void CodeGenerator::AssembleReturn(InstructionOperand* pop) { |
+ |
+void CodeGenerator::AssembleReturn() { |
CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); |
// Restore registers. |
@@ -1873,34 +1874,23 @@ |
unwinding_info_writer_.MarkBlockWillExit(); |
- Arm64OperandConverter g(this, nullptr); |
int pop_count = static_cast<int>(descriptor->StackParameterCount()); |
if (descriptor->IsCFunctionCall()) { |
AssembleDeconstructFrame(); |
} else if (frame_access_state()->has_frame()) { |
- // Canonicalize JSFunction return sites for now unless they have an variable |
- // number of stack slot pops. |
- if (pop->IsImmediate() && g.ToConstant(pop).ToInt32() == 0) { |
- if (return_label_.is_bound()) { |
- __ B(&return_label_); |
- return; |
- } else { |
- __ Bind(&return_label_); |
- AssembleDeconstructFrame(); |
- if (descriptor->UseNativeStack()) { |
- pop_count += (pop_count & 1); // align |
- } |
+ // Canonicalize JSFunction return sites for now. |
+ if (return_label_.is_bound()) { |
+ __ B(&return_label_); |
+ return; |
+ } else { |
+ __ Bind(&return_label_); |
+ AssembleDeconstructFrame(); |
+ if (descriptor->UseNativeStack()) { |
+ pop_count += (pop_count & 1); // align |
} |
} |
} else if (descriptor->UseNativeStack()) { |
pop_count += (pop_count & 1); // align |
- } |
- |
- if (pop->IsImmediate()) { |
- DCHECK_EQ(Constant::kInt32, g.ToConstant(pop).type()); |
- pop_count += g.ToConstant(pop).ToInt32(); |
- } else { |
- __ Drop(g.ToRegister(pop)); |
} |
__ Drop(pop_count); |