Index: src/a64/stub-cache-a64.cc |
diff --git a/src/a64/stub-cache-a64.cc b/src/a64/stub-cache-a64.cc |
index 3cf2a29cc33c63c9c32d31e07771d6ea59d54c38..60c7d6aa7f8bb68c1e96b8e0d062f2834600ae36 100644 |
--- a/src/a64/stub-cache-a64.cc |
+++ b/src/a64/stub-cache-a64.cc |
@@ -754,14 +754,16 @@ void StubCompiler::GenerateFastApiCall(MacroAssembler* masm, |
int argc, |
Register* values) { |
ASSERT(!AreAliased(receiver, scratch)); |
- __ Push(receiver); |
- // Write the arguments to stack frame. |
+ |
+ MacroAssembler::PushPopQueue queue(masm); |
+ queue.Queue(receiver); |
+ // Write the arguments to the stack frame. |
for (int i = 0; i < argc; i++) { |
- // TODO(jbramley): Push these in as few Push() calls as possible. |
Register arg = values[argc-1-i]; |
ASSERT(!AreAliased(receiver, scratch, arg)); |
- __ Push(arg); |
+ queue.Queue(arg); |
} |
+ queue.PushQueued(); |
ASSERT(optimization.is_simple_api_call()); |