Index: src/ia32/builtins-ia32.cc |
diff --git a/src/ia32/builtins-ia32.cc b/src/ia32/builtins-ia32.cc |
index 392ed430e8a8a3ef5a65510fb96789cc7c530fcf..5f663b0c65819fdac86e736656ce541e3bcc9d5e 100644 |
--- a/src/ia32/builtins-ia32.cc |
+++ b/src/ia32/builtins-ia32.cc |
@@ -752,9 +752,14 @@ void Builtins::Generate_InterpreterExitTrampoline(MacroAssembler* masm) { |
// Leave the frame (also dropping the register file). |
__ leave(); |
- // Return droping receiver + arguments. |
- // TODO(rmcilroy): Get number of arguments from BytecodeArray. |
- __ Ret(1 * kPointerSize, ecx); |
+ |
+ // Drop receiver + arguments and return. |
+ __ mov(ebx, FieldOperand(kInterpreterBytecodeArrayRegister, |
+ BytecodeArray::kParameterSizeOffset)); |
+ __ pop(ecx); |
+ __ add(esp, ebx); |
+ __ push(ecx); |
+ __ ret(0); |
} |