Index: src/arm/macro-assembler-arm.cc |
diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc |
index 0aaea1daa0b7b89db7521637292af44d0557f054..3210fefb76966b09319fc00262df93b52e162a80 100644 |
--- a/src/arm/macro-assembler-arm.cc |
+++ b/src/arm/macro-assembler-arm.cc |
@@ -2481,20 +2481,17 @@ void MacroAssembler::CallExternalReference(const ExternalReference& ext, |
} |
-void MacroAssembler::TailCallExternalReference(const ExternalReference& ext, |
- int num_arguments) { |
- // TODO(1236192): Most runtime routines don't need the number of |
- // arguments passed in because it is constant. At some point we |
- // should remove this need and make the runtime routine entry code |
- // smarter. |
- mov(r0, Operand(num_arguments)); |
- JumpToExternalReference(ext); |
-} |
- |
- |
-void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid, |
- int num_arguments) { |
- TailCallExternalReference(ExternalReference(fid, isolate()), num_arguments); |
+void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid) { |
+ const Runtime::Function* function = Runtime::FunctionForId(fid); |
+ DCHECK_EQ(1, function->result_size); |
+ if (function->nargs >= 0) { |
+ // TODO(1236192): Most runtime routines don't need the number of |
+ // arguments passed in because it is constant. At some point we |
+ // should remove this need and make the runtime routine entry code |
+ // smarter. |
+ mov(r0, Operand(function->nargs)); |
+ } |
+ JumpToExternalReference(ExternalReference(fid, isolate())); |
} |