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

Unified Diff: src/ic/mips64/handler-compiler-mips64.cc

Issue 883253002: Load API call data from function instead of embedding it in handler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rename scratch_in Created 5 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 | « src/ic/mips/handler-compiler-mips.cc ('k') | src/ic/x64/handler-compiler-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/mips64/handler-compiler-mips64.cc
diff --git a/src/ic/mips64/handler-compiler-mips64.cc b/src/ic/mips64/handler-compiler-mips64.cc
index a708053ec011b0de305fe7c6115a515b3bffcd4b..e82073fe76c504dd52fe2c44615e1eef9c2f146e 100644
--- a/src/ic/mips64/handler-compiler-mips64.cc
+++ b/src/ic/mips64/handler-compiler-mips64.cc
@@ -250,7 +250,7 @@ void PropertyHandlerCompiler::GenerateApiAccessorCall(
// Abi for CallApiFunctionStub.
Register callee = a0;
- Register call_data = a4;
+ Register data = a4;
Register holder = a2;
Register api_function_address = a1;
@@ -276,18 +276,16 @@ void PropertyHandlerCompiler::GenerateApiAccessorCall(
Isolate* isolate = masm->isolate();
Handle<CallHandlerInfo> api_call_info = optimization.api_call_info();
- Handle<Object> call_data_obj(api_call_info->data(), isolate);
-
bool call_data_undefined = false;
- // Put call_data in place.
- if (isolate->heap()->InNewSpace(*call_data_obj)) {
- __ li(call_data, api_call_info);
- __ ld(call_data, FieldMemOperand(call_data, CallHandlerInfo::kDataOffset));
- } else if (call_data_obj->IsUndefined()) {
+ // Put call data in place.
+ if (api_call_info->data()->IsUndefined()) {
call_data_undefined = true;
- __ LoadRoot(call_data, Heap::kUndefinedValueRootIndex);
+ __ LoadRoot(data, Heap::kUndefinedValueRootIndex);
} else {
- __ li(call_data, call_data_obj);
+ __ ld(data, FieldMemOperand(callee, JSFunction::kSharedFunctionInfoOffset));
+ __ ld(data, FieldMemOperand(data, SharedFunctionInfo::kFunctionDataOffset));
+ __ ld(data, FieldMemOperand(data, FunctionTemplateInfo::kCallCodeOffset));
+ __ ld(data, FieldMemOperand(data, CallHandlerInfo::kDataOffset));
}
// Put api_function_address in place.
Address function_address = v8::ToCData<Address>(api_call_info->callback());
« no previous file with comments | « src/ic/mips/handler-compiler-mips.cc ('k') | src/ic/x64/handler-compiler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698