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

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

Issue 1899423003: MIPS: Improve 'Always include js-getter as separate field in AccessorInfo'. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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/code-stubs-mips.cc ('k') | no next file » | 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 575e7556013ef56311e5e97e12d29e0bbe8c6a90..dc7604c82e55b626f4644eaf883dbc7b0cc0ebe9 100644
--- a/src/mips64/code-stubs-mips64.cc
+++ b/src/mips64/code-stubs-mips64.cc
@@ -5729,21 +5729,30 @@ void CallApiGetterStub::Generate(MacroAssembler* masm) {
Register holder = ApiGetterDescriptor::HolderRegister();
Register callback = ApiGetterDescriptor::CallbackRegister();
Register scratch = a4;
- Register scratch2 = a5;
- Register scratch3 = a6;
- DCHECK(!AreAliased(receiver, holder, callback, scratch, scratch2, scratch3));
+ DCHECK(!AreAliased(receiver, holder, callback, scratch));
Register api_function_address = a2;
- __ Push(receiver);
- // Push data from AccessorInfo.
+ // Here and below +1 is for name() pushed after the args_ array.
+ typedef PropertyCallbackArguments PCA;
+ __ Dsubu(sp, sp, (PCA::kArgsLength + 1) * kPointerSize);
+ __ sd(receiver, MemOperand(sp, (PCA::kThisIndex + 1) * kPointerSize));
+ __ ld(scratch, FieldMemOperand(callback, AccessorInfo::kDataOffset));
+ __ sd(scratch, MemOperand(sp, (PCA::kDataIndex + 1) * kPointerSize));
__ LoadRoot(scratch, Heap::kUndefinedValueRootIndex);
- __ li(scratch2, Operand(ExternalReference::isolate_address(isolate())));
- __ ld(scratch3, FieldMemOperand(callback, AccessorInfo::kDataOffset));
- __ Push(scratch3, scratch, scratch, scratch2, holder);
- __ Push(Smi::FromInt(0)); // should_throw_on_error -> false
+ __ sd(scratch, MemOperand(sp, (PCA::kReturnValueOffset + 1) * kPointerSize));
+ __ sd(scratch, MemOperand(sp, (PCA::kReturnValueDefaultValueIndex + 1) *
+ kPointerSize));
+ __ li(scratch, Operand(ExternalReference::isolate_address(isolate())));
+ __ sd(scratch, MemOperand(sp, (PCA::kIsolateIndex + 1) * kPointerSize));
+ __ sd(holder, MemOperand(sp, (PCA::kHolderIndex + 1) * kPointerSize));
+ // should_throw_on_error -> false
+ DCHECK(Smi::FromInt(0) == nullptr);
+ __ sd(zero_reg,
+ MemOperand(sp, (PCA::kShouldThrowOnErrorIndex + 1) * kPointerSize));
__ ld(scratch, FieldMemOperand(callback, AccessorInfo::kNameOffset));
- __ Push(scratch);
+ __ sd(scratch, MemOperand(sp, 0 * kPointerSize));
+
// v8::PropertyCallbackInfo::args_ array and name handle.
const int kStackUnwindSpace = PropertyCallbackArguments::kArgsLength + 1;
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698