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

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

Issue 1906453002: Revert of Change calling convention of CallApiGetterStub to accept the 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/interface-descriptors.cc ('k') | src/mips/interface-descriptors-mips.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 39259d75a6a73d7bb6069f89d3c07943c5cc0a34..7fd79a6004ac2139e0fd38176d7c1818d7a21b61 100644
--- a/src/mips/code-stubs-mips.cc
+++ b/src/mips/code-stubs-mips.cc
@@ -5690,36 +5690,16 @@
void CallApiGetterStub::Generate(MacroAssembler* masm) {
- // Build v8::PropertyCallbackInfo::args_ array on the stack and push property
- // name below the exit frame to make GC aware of them.
- STATIC_ASSERT(PropertyCallbackArguments::kShouldThrowOnErrorIndex == 0);
- STATIC_ASSERT(PropertyCallbackArguments::kHolderIndex == 1);
- STATIC_ASSERT(PropertyCallbackArguments::kIsolateIndex == 2);
- STATIC_ASSERT(PropertyCallbackArguments::kReturnValueDefaultValueIndex == 3);
- STATIC_ASSERT(PropertyCallbackArguments::kReturnValueOffset == 4);
- STATIC_ASSERT(PropertyCallbackArguments::kDataIndex == 5);
- STATIC_ASSERT(PropertyCallbackArguments::kThisIndex == 6);
- STATIC_ASSERT(PropertyCallbackArguments::kArgsLength == 7);
-
- Register receiver = ApiGetterDescriptor::ReceiverRegister();
- 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));
-
- Register api_function_address = a2;
-
- __ Push(receiver);
- // Push data from AccessorInfo.
- __ 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
- __ lw(scratch, FieldMemOperand(callback, AccessorInfo::kNameOffset));
- __ push(scratch);
+ // ----------- S t a t e -------------
+ // -- sp[0] : name
+ // -- sp[4 .. (4 + kArgsLength*4)] : v8::PropertyCallbackInfo::args_
+ // -- ...
+ // -- a2 : api_function_address
+ // -----------------------------------
+
+ Register api_function_address = ApiGetterDescriptor::function_address();
+ DCHECK(api_function_address.is(a2));
+
// v8::PropertyCallbackInfo::args_ array and name handle.
const int kStackUnwindSpace = PropertyCallbackArguments::kArgsLength + 1;
@@ -5738,10 +5718,6 @@
ExternalReference thunk_ref =
ExternalReference::invoke_accessor_getter_callback(isolate());
-
- __ lw(scratch, FieldMemOperand(callback, AccessorInfo::kJsGetterOffset));
- __ lw(api_function_address,
- FieldMemOperand(scratch, Foreign::kForeignAddressOffset));
// +3 is to skip prolog, return address and name handle.
MemOperand return_value_operand(
« no previous file with comments | « src/interface-descriptors.cc ('k') | src/mips/interface-descriptors-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698