Index: src/a64/stub-cache-a64.cc |
diff --git a/src/a64/stub-cache-a64.cc b/src/a64/stub-cache-a64.cc |
index adb835506a0dfad3dfdbae7efd217eb9612b9d99..b1e9130fdf7c227cddcc5779d845e8848bc8b7df 100644 |
--- a/src/a64/stub-cache-a64.cc |
+++ b/src/a64/stub-cache-a64.cc |
@@ -754,14 +754,16 @@ static void 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()); |