Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(475)

Unified Diff: src/ia32/macro-assembler-ia32.cc

Issue 836093007: split api call stubs into accessor and function call stubs (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/ic/arm/handler-compiler-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/macro-assembler-ia32.cc
diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc
index a3c235b79648151cce992737bd1a44296ca0b84e..1dd17c4319b04e21a17c92a7868af4d1b83a9a8e 100644
--- a/src/ia32/macro-assembler-ia32.cc
+++ b/src/ia32/macro-assembler-ia32.cc
@@ -2098,12 +2098,9 @@ void MacroAssembler::PrepareCallApiFunction(int argc) {
void MacroAssembler::CallApiFunctionAndReturn(
- Register function_address,
- ExternalReference thunk_ref,
- Operand thunk_last_arg,
- int stack_space,
- Operand return_value_operand,
- Operand* context_restore_operand) {
+ Register function_address, ExternalReference thunk_ref,
+ Operand thunk_last_arg, int stack_space, Operand* stack_space_operand,
+ Operand return_value_operand, Operand* context_restore_operand) {
ExternalReference next_address =
ExternalReference::handle_scope_next_address(isolate());
ExternalReference limit_address =
@@ -2222,8 +2219,18 @@ void MacroAssembler::CallApiFunctionAndReturn(
if (restore_context) {
mov(esi, *context_restore_operand);
}
+ if (stack_space_operand != nullptr) {
+ mov(ebx, *stack_space_operand);
+ }
LeaveApiExitFrame(!restore_context);
- ret(stack_space * kPointerSize);
+ if (stack_space_operand != nullptr) {
+ DCHECK_EQ(0, stack_space);
+ pop(ecx);
+ add(esp, ebx);
+ jmp(ecx);
+ } else {
+ ret(stack_space * kPointerSize);
+ }
bind(&promote_scheduled_exception);
{
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/ic/arm/handler-compiler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698