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

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

Issue 150213003: stub api getters (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: arm Created 6 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 | « no previous file | src/arm/stub-cache-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/code-stubs-arm.cc
diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc
index e5471fd540b2272f5c99209c5edbf9b8b7f39a11..9c0fa582a63f8ee73070fbbd4fc2a9a716a5aff2 100644
--- a/src/arm/code-stubs-arm.cc
+++ b/src/arm/code-stubs-arm.cc
@@ -5462,10 +5462,10 @@ void CallApiFunctionStub::Generate(MacroAssembler* masm) {
// -- r1 : thunk_arg
// -- cp : context
// --
- // -- esp[0] : last argument
+ // -- sp[0] : last argument
// -- ...
- // -- esp[(argc - 1)* 4] : first argument
- // -- esp[argc * 4] : receiver
+ // -- sp[(argc - 1)* 4] : first argument
+ // -- sp[argc * 4] : receiver
// -----------------------------------
Register callee = r0;
@@ -5567,6 +5567,47 @@ void CallApiFunctionStub::Generate(MacroAssembler* masm) {
}
+void CallApiGetterStub::Generate(MacroAssembler* masm) {
+ // ----------- S t a t e -------------
+ // -- sp[0] : name
+ // -- sp[4 - kArgsLength*4] : PropertyCallbackArguments object
+ // -- ...
+ // -- r3 : api_function_address
+ // -- r2 : thunk_last_arg
+ // -----------------------------------
+
+ Register api_function_address = r3;
+ Register thunk_last_arg = r2;
+
+ __ mov(r0, sp); // r0 = Handle<Name>
+ __ add(r1, r0, Operand(1 * kPointerSize)); // r1 = PCA
+
+ const int kApiStackSpace = 1;
+ FrameScope frame_scope(masm, StackFrame::MANUAL);
+ __ EnterExitFrame(false, kApiStackSpace);
+
+ // Create PropertyAccessorInfo instance on the stack above the exit frame with
+ // r1 (internal::Object** args_) as the data.
+ __ str(r1, MemOperand(sp, 1 * kPointerSize));
+ __ add(r1, sp, Operand(1 * kPointerSize)); // r1 = AccessorInfo&
+
+ const int kStackUnwindSpace = PropertyCallbackArguments::kArgsLength + 1;
+
+ Address thunk_address = FUNCTION_ADDR(&InvokeAccessorGetterCallback);
+ ExternalReference::Type thunk_type =
+ ExternalReference::PROFILING_GETTER_CALL;
+ ApiFunction thunk_fun(thunk_address);
+ ExternalReference thunk_ref = ExternalReference(&thunk_fun, thunk_type,
+ masm->isolate());
+ __ CallApiFunctionAndReturn(api_function_address,
+ thunk_ref,
+ thunk_last_arg,
+ kStackUnwindSpace,
+ MemOperand(fp, 6 * kPointerSize),
+ NULL);
+}
+
+
#undef __
} } // namespace v8::internal
« no previous file with comments | « no previous file | src/arm/stub-cache-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698