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

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

Issue 24196002: revert 16744 for breaking build (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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/ia32/stub-cache-ia32.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 f514f2922516c13d068caf79d9d1d27a7b0b1fdf..d8a475c7a824aa6ba95ed09b95929a7516595ad8 100644
--- a/src/ia32/macro-assembler-ia32.cc
+++ b/src/ia32/macro-assembler-ia32.cc
@@ -1115,16 +1115,14 @@ void MacroAssembler::LeaveExitFrame(bool save_doubles) {
// Push the return address to get ready to return.
push(ecx);
- LeaveExitFrameEpilogue(true);
+ LeaveExitFrameEpilogue();
}
-void MacroAssembler::LeaveExitFrameEpilogue(bool restore_context) {
+void MacroAssembler::LeaveExitFrameEpilogue() {
// Restore current context from top and clear it in debug mode.
ExternalReference context_address(Isolate::kContextAddress, isolate());
- if (restore_context) {
- mov(esi, Operand::StaticVariable(context_address));
- }
+ mov(esi, Operand::StaticVariable(context_address));
#ifdef DEBUG
mov(Operand::StaticVariable(context_address), Immediate(0));
#endif
@@ -1136,11 +1134,11 @@ void MacroAssembler::LeaveExitFrameEpilogue(bool restore_context) {
}
-void MacroAssembler::LeaveApiExitFrame(bool restore_context) {
+void MacroAssembler::LeaveApiExitFrame() {
mov(esp, ebp);
pop(ebp);
- LeaveExitFrameEpilogue(restore_context);
+ LeaveExitFrameEpilogue();
}
@@ -2229,13 +2227,11 @@ void MacroAssembler::PrepareCallApiFunction(int argc) {
}
-void MacroAssembler::CallApiFunctionAndReturn(
- Address function_address,
- Address thunk_address,
- Operand thunk_last_arg,
- int stack_space,
- Operand return_value_operand,
- Operand* context_restore_operand) {
+void MacroAssembler::CallApiFunctionAndReturn(Address function_address,
+ Address thunk_address,
+ Operand thunk_last_arg,
+ int stack_space,
+ int return_value_offset) {
ExternalReference next_address =
ExternalReference::handle_scope_next_address(isolate());
ExternalReference limit_address =
@@ -2291,10 +2287,9 @@ void MacroAssembler::CallApiFunctionAndReturn(
Label prologue;
// Load the value from ReturnValue
- mov(eax, return_value_operand);
+ mov(eax, Operand(ebp, return_value_offset * kPointerSize));
Label promote_scheduled_exception;
- Label exception_handled;
Label delete_allocated_handles;
Label leave_exit_frame;
@@ -2314,7 +2309,6 @@ void MacroAssembler::CallApiFunctionAndReturn(
cmp(Operand::StaticVariable(scheduled_exception_address),
Immediate(isolate()->factory()->the_hole_value()));
j(not_equal, &promote_scheduled_exception);
- bind(&exception_handled);
#if ENABLE_EXTRA_CHECKS
// Check if the function returned a valid JavaScript value.
@@ -2351,16 +2345,11 @@ void MacroAssembler::CallApiFunctionAndReturn(
bind(&ok);
#endif
- bool restore_context = context_restore_operand != NULL;
- if (restore_context) {
- mov(esi, *context_restore_operand);
- }
- LeaveApiExitFrame(!restore_context);
+ LeaveApiExitFrame();
ret(stack_space * kPointerSize);
bind(&promote_scheduled_exception);
- CallRuntime(Runtime::kPromoteScheduledException, 0);
- jmp(&exception_handled);
+ TailCallRuntime(Runtime::kPromoteScheduledException, 0, 1);
// HandleScope limit has changed. Delete allocated extensions.
ExternalReference delete_extensions =
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698