PPC/s390: [stubs] Drop CallApiCallbackStub::call_data_undefined optimization.
Port 46d0e4818a
Original Commit Message:
The CallApiCallbackStub can avoid loading undefined in case the
call_data is already undefined, which doubles the number of versions of
the stub and adds unnecessary complexity (at the benefit of saving one
stupid load). The idea is to turn the CallApiCallbackStub into a single
builtin instead, which does the right thing, so this is the first step
towards that goal.
R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=v8:6304
LOG=N
Review-Url: https://codereview.chromium.org/2837283004
Cr-Commit-Position: refs/heads/master@{#44872}
This commit is contained in:
parent
f661fe84f4
commit
336876989a
@ -216,10 +216,8 @@ void PropertyHandlerCompiler::GenerateApiAccessorCall(
|
||||
|
||||
Isolate* isolate = masm->isolate();
|
||||
Handle<CallHandlerInfo> api_call_info = optimization.api_call_info();
|
||||
bool call_data_undefined = false;
|
||||
// Put call data in place.
|
||||
if (api_call_info->data()->IsUndefined(isolate)) {
|
||||
call_data_undefined = true;
|
||||
__ LoadRoot(data, Heap::kUndefinedValueRootIndex);
|
||||
} else {
|
||||
if (optimization.is_constant_call()) {
|
||||
@ -244,8 +242,7 @@ void PropertyHandlerCompiler::GenerateApiAccessorCall(
|
||||
__ mov(api_function_address, Operand(ref));
|
||||
|
||||
// Jump to stub.
|
||||
CallApiCallbackStub stub(isolate, is_store, call_data_undefined,
|
||||
!optimization.is_constant_call());
|
||||
CallApiCallbackStub stub(isolate, is_store, !optimization.is_constant_call());
|
||||
__ TailCallStub(&stub);
|
||||
}
|
||||
|
||||
|
@ -208,10 +208,8 @@ void PropertyHandlerCompiler::GenerateApiAccessorCall(
|
||||
|
||||
Isolate* isolate = masm->isolate();
|
||||
Handle<CallHandlerInfo> api_call_info = optimization.api_call_info();
|
||||
bool call_data_undefined = false;
|
||||
// Put call data in place.
|
||||
if (api_call_info->data()->IsUndefined(isolate)) {
|
||||
call_data_undefined = true;
|
||||
__ LoadRoot(data, Heap::kUndefinedValueRootIndex);
|
||||
} else {
|
||||
if (optimization.is_constant_call()) {
|
||||
@ -236,8 +234,7 @@ void PropertyHandlerCompiler::GenerateApiAccessorCall(
|
||||
__ mov(api_function_address, Operand(ref));
|
||||
|
||||
// Jump to stub.
|
||||
CallApiCallbackStub stub(isolate, is_store, call_data_undefined,
|
||||
!optimization.is_constant_call());
|
||||
CallApiCallbackStub stub(isolate, is_store, !optimization.is_constant_call());
|
||||
__ TailCallStub(&stub);
|
||||
}
|
||||
|
||||
|
@ -2946,9 +2946,7 @@ void CallApiCallbackStub::Generate(MacroAssembler* masm) {
|
||||
__ push(call_data);
|
||||
|
||||
Register scratch = call_data;
|
||||
if (!call_data_undefined()) {
|
||||
__ LoadRoot(scratch, Heap::kUndefinedValueRootIndex);
|
||||
}
|
||||
__ LoadRoot(scratch, Heap::kUndefinedValueRootIndex);
|
||||
// return value
|
||||
__ push(scratch);
|
||||
// return value default
|
||||
|
@ -2875,9 +2875,7 @@ void CallApiCallbackStub::Generate(MacroAssembler* masm) {
|
||||
__ push(call_data);
|
||||
|
||||
Register scratch = call_data;
|
||||
if (!call_data_undefined()) {
|
||||
__ LoadRoot(scratch, Heap::kUndefinedValueRootIndex);
|
||||
}
|
||||
__ LoadRoot(scratch, Heap::kUndefinedValueRootIndex);
|
||||
// return value
|
||||
__ push(scratch);
|
||||
// return value default
|
||||
|
Loading…
Reference in New Issue
Block a user