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

Unified Diff: src/x64/macro-assembler-x64.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/x64/macro-assembler-x64.h ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/macro-assembler-x64.cc
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc
index 4ff379138bd47013b09e19a0188f052078718b32..fa8cf18fe1365e4fcfeec7b87351020f1912a844 100644
--- a/src/x64/macro-assembler-x64.cc
+++ b/src/x64/macro-assembler-x64.cc
@@ -691,16 +691,13 @@ void MacroAssembler::PrepareCallApiFunction(int arg_stack_space) {
}
-void MacroAssembler::CallApiFunctionAndReturn(
- Address function_address,
- Address thunk_address,
- Register thunk_last_arg,
- int stack_space,
- Operand return_value_operand,
- Operand* context_restore_operand) {
+void MacroAssembler::CallApiFunctionAndReturn(Address function_address,
+ Address thunk_address,
+ Register thunk_last_arg,
+ int stack_space,
+ int return_value_offset) {
Label prologue;
Label promote_scheduled_exception;
- Label exception_handled;
Label delete_allocated_handles;
Label leave_exit_frame;
Label write_back;
@@ -771,7 +768,7 @@ void MacroAssembler::CallApiFunctionAndReturn(
}
// Load the value from ReturnValue
- movq(rax, return_value_operand);
+ movq(rax, Operand(rbp, return_value_offset * kPointerSize));
bind(&prologue);
// No more valid handles (the result handle was the last one). Restore
@@ -786,7 +783,6 @@ void MacroAssembler::CallApiFunctionAndReturn(
movq(rsi, scheduled_exception_address);
Cmp(Operand(rsi, 0), 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.
@@ -823,16 +819,11 @@ void MacroAssembler::CallApiFunctionAndReturn(
bind(&ok);
#endif
- bool restore_context = context_restore_operand != NULL;
- if (restore_context) {
- movq(rsi, *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.
bind(&delete_allocated_handles);
@@ -3704,25 +3695,23 @@ void MacroAssembler::LeaveExitFrame(bool save_doubles) {
PushReturnAddressFrom(rcx);
- LeaveExitFrameEpilogue(true);
+ LeaveExitFrameEpilogue();
}
-void MacroAssembler::LeaveApiExitFrame(bool restore_context) {
+void MacroAssembler::LeaveApiExitFrame() {
movq(rsp, rbp);
pop(rbp);
- LeaveExitFrameEpilogue(restore_context);
+ 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());
Operand context_operand = ExternalOperand(context_address);
- if (restore_context) {
- movq(rsi, context_operand);
- }
+ movq(rsi, context_operand);
#ifdef DEBUG
movq(context_operand, Immediate(0));
#endif
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698