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

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

Issue 148333003: crankshaft support for api method calls (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix 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/macro-assembler-arm.h » ('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 fac8110f7c3952548f42e7a987e1af9dc59de224..fc8a39a61f175947062e2f16b5343d53e1f42aa3 100644
--- a/src/arm/code-stubs-arm.cc
+++ b/src/arm/code-stubs-arm.cc
@@ -453,6 +453,27 @@ void CallDescriptors::InitializeForIsolate(Isolate* isolate) {
descriptor->param_representations_ = representations;
descriptor->platform_specific_descriptor_ = &default_descriptor;
}
+ {
+ CallInterfaceDescriptor* descriptor =
+ isolate->call_descriptor(Isolate::ApiFunctionCall);
+ static Register registers[] = { r0, // callee
+ r4, // call_data
+ r2, // holder
+ r1, // api_function_address
+ cp, // context
+ };
+ static Representation representations[] = {
+ Representation::Tagged(), // callee
+ Representation::Tagged(), // call_data
+ Representation::Tagged(), // holder
+ Representation::External(), // api_function_address
+ Representation::Tagged(), // context
+ };
+ descriptor->register_param_count_ = 5;
+ descriptor->register_params_ = registers;
+ descriptor->param_representations_ = representations;
+ descriptor->platform_specific_descriptor_ = &default_descriptor;
+ }
}
@@ -5379,8 +5400,7 @@ void CallApiFunctionStub::Generate(MacroAssembler* masm) {
// -- r0 : callee
// -- r4 : call_data
// -- r2 : holder
- // -- r3 : api_function_address
- // -- r1 : thunk_arg
+ // -- r1 : api_function_address
// -- cp : context
// --
// -- sp[0] : last argument
@@ -5392,8 +5412,7 @@ void CallApiFunctionStub::Generate(MacroAssembler* masm) {
Register callee = r0;
Register call_data = r4;
Register holder = r2;
- Register api_function_address = r3;
- Register thunk_arg = r1;
+ Register api_function_address = r1;
Register context = cp;
int argc = ArgumentBits::decode(bit_field_);
@@ -5449,7 +5468,7 @@ void CallApiFunctionStub::Generate(MacroAssembler* masm) {
FrameScope frame_scope(masm, StackFrame::MANUAL);
__ EnterExitFrame(false, kApiStackSpace);
- ASSERT(!thunk_arg.is(r0) && !api_function_address.is(r0) && !scratch.is(r0));
+ ASSERT(!api_function_address.is(r0) && !scratch.is(r0));
// r0 = FunctionCallbackInfo&
// Arguments is after the return address.
__ add(r0, sp, Operand(1 * kPointerSize));
@@ -5480,7 +5499,6 @@ void CallApiFunctionStub::Generate(MacroAssembler* masm) {
__ CallApiFunctionAndReturn(api_function_address,
thunk_ref,
- thunk_arg,
kStackUnwindSpace,
return_value_operand,
restore_context ?
@@ -5493,12 +5511,10 @@ void CallApiGetterStub::Generate(MacroAssembler* masm) {
// -- sp[0] : name
// -- sp[4 - kArgsLength*4] : PropertyCallbackArguments object
// -- ...
- // -- r3 : api_function_address
- // -- r2 : thunk_last_arg
+ // -- r2 : api_function_address
// -----------------------------------
- Register api_function_address = r3;
- Register thunk_last_arg = r2;
+ Register api_function_address = r2;
__ mov(r0, sp); // r0 = Handle<Name>
__ add(r1, r0, Operand(1 * kPointerSize)); // r1 = PCA
@@ -5522,7 +5538,6 @@ void CallApiGetterStub::Generate(MacroAssembler* masm) {
masm->isolate());
__ CallApiFunctionAndReturn(api_function_address,
thunk_ref,
- thunk_last_arg,
kStackUnwindSpace,
MemOperand(fp, 6 * kPointerSize),
NULL);
« no previous file with comments | « no previous file | src/arm/macro-assembler-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698