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

Unified Diff: src/mips/code-stubs-mips.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 | « no previous file | src/mips64/code-stubs-mips64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/code-stubs-mips.cc
diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc
index 0ce6f7d1a602a79eff225dcdbd926e038ab7bb7f..7e901f45ba13fa0a5049e8e1751d5329b6ce837c 100644
--- a/src/mips/code-stubs-mips.cc
+++ b/src/mips/code-stubs-mips.cc
@@ -5692,21 +5692,30 @@ void CallApiGetterStub::Generate(MacroAssembler* masm) {
Register holder = ApiGetterDescriptor::HolderRegister();
Register callback = ApiGetterDescriptor::CallbackRegister();
Register scratch = t0;
- Register scratch2 = t1;
- Register scratch3 = t2;
- 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;
+ __ Subu(sp, sp, (PCA::kArgsLength + 1) * kPointerSize);
+ __ sw(receiver, MemOperand(sp, (PCA::kThisIndex + 1) * kPointerSize));
+ __ lw(scratch, FieldMemOperand(callback, AccessorInfo::kDataOffset));
+ __ sw(scratch, MemOperand(sp, (PCA::kDataIndex + 1) * kPointerSize));
__ LoadRoot(scratch, Heap::kUndefinedValueRootIndex);
- __ li(scratch2, Operand(ExternalReference::isolate_address(isolate())));
- __ lw(scratch3, FieldMemOperand(callback, AccessorInfo::kDataOffset));
- __ Push(scratch3, scratch, scratch, scratch2, holder);
- __ Push(Smi::FromInt(0)); // should_throw_on_error -> false
+ __ sw(scratch, MemOperand(sp, (PCA::kReturnValueOffset + 1) * kPointerSize));
+ __ sw(scratch, MemOperand(sp, (PCA::kReturnValueDefaultValueIndex + 1) *
+ kPointerSize));
+ __ li(scratch, Operand(ExternalReference::isolate_address(isolate())));
+ __ sw(scratch, MemOperand(sp, (PCA::kIsolateIndex + 1) * kPointerSize));
+ __ sw(holder, MemOperand(sp, (PCA::kHolderIndex + 1) * kPointerSize));
+ // should_throw_on_error -> false
+ DCHECK(Smi::FromInt(0) == nullptr);
+ __ sw(zero_reg,
+ MemOperand(sp, (PCA::kShouldThrowOnErrorIndex + 1) * kPointerSize));
__ lw(scratch, FieldMemOperand(callback, AccessorInfo::kNameOffset));
- __ push(scratch);
+ __ sw(scratch, MemOperand(sp, 0 * kPointerSize));
+
// v8::PropertyCallbackInfo::args_ array and name handle.
const int kStackUnwindSpace = PropertyCallbackArguments::kArgsLength + 1;
« no previous file with comments | « no previous file | src/mips64/code-stubs-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698