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

Unified Diff: src/ic/ia32/handler-compiler-ia32.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/arm64/handler-compiler-arm64.cc ('k') | src/ic/mips/handler-compiler-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/ia32/handler-compiler-ia32.cc
diff --git a/src/ic/ia32/handler-compiler-ia32.cc b/src/ic/ia32/handler-compiler-ia32.cc
index 409f1b3827a7b49c4e15ac08f1e9610da45905ce..c7f683fd5b60f8f2400ba9888bebd4a90d6d5582 100644
--- a/src/ic/ia32/handler-compiler-ia32.cc
+++ b/src/ic/ia32/handler-compiler-ia32.cc
@@ -144,30 +144,30 @@ void NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(
// when api call ICs are generated in hydrogen.
void PropertyHandlerCompiler::GenerateApiAccessorCall(
MacroAssembler* masm, const CallOptimization& optimization,
- Handle<Map> receiver_map, Register receiver, Register scratch_in,
+ Handle<Map> receiver_map, Register receiver, Register scratch,
bool is_store, Register store_parameter, Register accessor_holder,
int accessor_index) {
- DCHECK(!accessor_holder.is(scratch_in));
+ DCHECK(!accessor_holder.is(scratch));
// Copy return value.
- __ pop(scratch_in);
+ __ pop(scratch);
// receiver
__ push(receiver);
// Write the arguments to stack frame.
if (is_store) {
DCHECK(!receiver.is(store_parameter));
- DCHECK(!scratch_in.is(store_parameter));
+ DCHECK(!scratch.is(store_parameter));
__ push(store_parameter);
}
- __ push(scratch_in);
+ __ push(scratch);
// Stack now matches JSFunction abi.
DCHECK(optimization.is_simple_api_call());
// Abi for CallApiFunctionStub.
Register callee = edi;
- Register call_data = ebx;
+ Register data = ebx;
Register holder = ecx;
Register api_function_address = edx;
- Register scratch = eax; // scratch_in is no longer valid.
+ scratch = no_reg;
// Put callee in place.
__ LoadAccessor(callee, accessor_holder, accessor_index,
@@ -191,19 +191,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)) {
- __ mov(scratch, api_call_info);
- __ mov(call_data, FieldOperand(scratch, CallHandlerInfo::kDataOffset));
- } else if (call_data_obj->IsUndefined()) {
+ // Put call data in place.
+ if (api_call_info->data()->IsUndefined()) {
call_data_undefined = true;
- __ mov(call_data, Immediate(isolate->factory()->undefined_value()));
+ __ mov(data, Immediate(isolate->factory()->undefined_value()));
} else {
- __ mov(call_data, call_data_obj);
+ __ mov(data, FieldOperand(callee, JSFunction::kSharedFunctionInfoOffset));
+ __ mov(data, FieldOperand(data, SharedFunctionInfo::kFunctionDataOffset));
+ __ mov(data, FieldOperand(data, FunctionTemplateInfo::kCallCodeOffset));
+ __ mov(data, FieldOperand(data, CallHandlerInfo::kDataOffset));
}
// Put api_function_address in place.
« no previous file with comments | « src/ic/arm64/handler-compiler-arm64.cc ('k') | src/ic/mips/handler-compiler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698