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

Unified Diff: src/mips64/code-stubs-mips64.cc

Issue 867183003: MIPS: Refactoring after 'MIPS: split api call stubs into accessor and function call stubs'. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix typo 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/mips/constants-mips.h ('k') | src/mips64/constants-mips64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips64/code-stubs-mips64.cc
diff --git a/src/mips64/code-stubs-mips64.cc b/src/mips64/code-stubs-mips64.cc
index b0ef6c6aeffbe0e6255e50cb642b78b78dda8aa4..585f56781312bb422f05415691a7f027ec24fb49 100644
--- a/src/mips64/code-stubs-mips64.cc
+++ b/src/mips64/code-stubs-mips64.cc
@@ -4887,13 +4887,10 @@ static int AddressOffset(ExternalReference ref0, ExternalReference ref1) {
// from handle and propagates exceptions. Restores context. stack_space
// - space to be unwound on exit (includes the call JS arguments space and
// the additional space allocated for the fast call).
-static void CallApiFunctionAndReturn(MacroAssembler* masm,
- Register function_address,
- ExternalReference thunk_ref,
- int stack_space,
- MemOperand* stack_space_operand,
- MemOperand return_value_operand,
- MemOperand* context_restore_operand) {
+static void CallApiFunctionAndReturn(
+ MacroAssembler* masm, Register function_address,
+ ExternalReference thunk_ref, int stack_space, int32_t stack_space_offset,
+ MemOperand return_value_operand, MemOperand* context_restore_operand) {
Isolate* isolate = masm->isolate();
ExternalReference next_address =
ExternalReference::handle_scope_next_address(isolate);
@@ -4987,13 +4984,14 @@ static void CallApiFunctionAndReturn(MacroAssembler* masm,
if (restore_context) {
__ ld(cp, *context_restore_operand);
}
- if (stack_space_operand != NULL) {
- __ lw(s0, *stack_space_operand);
+ if (stack_space_offset != kInvalidStackOffset) {
+ DCHECK(kCArgsSlotsSize == 0);
+ __ ld(s0, MemOperand(sp, stack_space_offset));
} else {
__ li(s0, Operand(stack_space));
}
__ LeaveExitFrame(false, s0, !restore_context, EMIT_RETURN,
- stack_space_operand != NULL);
+ stack_space_offset != kInvalidStackOffset);
__ bind(&promote_scheduled_exception);
{
FrameScope frame(masm, StackFrame::INTERNAL);
@@ -5123,14 +5121,13 @@ static void CallApiFunctionStubHelper(MacroAssembler* masm,
}
MemOperand return_value_operand(fp, return_value_offset * kPointerSize);
int stack_space = 0;
- MemOperand is_construct_call_operand = MemOperand(sp, 4 * kPointerSize);
- MemOperand* stack_space_operand = &is_construct_call_operand;
+ int32_t stack_space_offset = 4 * kPointerSize;
if (argc.is_immediate()) {
stack_space = argc.immediate() + FCA::kArgsLength + 1;
- stack_space_operand = NULL;
+ stack_space_offset = kInvalidStackOffset;
}
CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, stack_space,
- stack_space_operand, return_value_operand,
+ stack_space_offset, return_value_operand,
&context_restore_operand);
}
@@ -5179,7 +5176,7 @@ void CallApiGetterStub::Generate(MacroAssembler* masm) {
ExternalReference thunk_ref =
ExternalReference::invoke_accessor_getter_callback(isolate());
CallApiFunctionAndReturn(masm, api_function_address, thunk_ref,
- kStackUnwindSpace, NULL,
+ kStackUnwindSpace, kInvalidStackOffset,
MemOperand(fp, 6 * kPointerSize), NULL);
}
« no previous file with comments | « src/mips/constants-mips.h ('k') | src/mips64/constants-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698