PPC: Introduce a code stub version of Array.prototype.push
Port 1134688ced
Original commit message:
This roughly doubles performance for generic Array.prototype.push.
R=verwaest@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
Review URL: https://codereview.chromium.org/1823103002
Cr-Commit-Position: refs/heads/master@{#34999}
This commit is contained in:
parent
69e8bb4357
commit
f0d88f9084
@ -3206,7 +3206,7 @@ void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) {
|
||||
|
||||
if (instr->hydrogen()->from_inlined()) {
|
||||
__ subi(result, sp, Operand(2 * kPointerSize));
|
||||
} else {
|
||||
} else if (instr->hydrogen()->arguments_adaptor()) {
|
||||
// Check if the calling frame is an arguments adaptor frame.
|
||||
__ LoadP(scratch, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
|
||||
__ LoadP(
|
||||
@ -3228,6 +3228,8 @@ void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) {
|
||||
__ mr(result, scratch);
|
||||
__ bind(&done);
|
||||
}
|
||||
} else {
|
||||
__ mr(result, fp);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -77,6 +77,10 @@ void InternalArrayNoArgumentConstructorStub::InitializeDescriptor(
|
||||
InitializeInternalArrayConstructorDescriptor(isolate(), descriptor, 0);
|
||||
}
|
||||
|
||||
void FastArrayPushStub::InitializeDescriptor(CodeStubDescriptor* descriptor) {
|
||||
Address deopt_handler = Runtime::FunctionForId(Runtime::kArrayPush)->entry;
|
||||
descriptor->Initialize(r3, deopt_handler, -1, JS_FUNCTION_STUB_MODE);
|
||||
}
|
||||
|
||||
void InternalArraySingleArgumentConstructorStub::InitializeDescriptor(
|
||||
CodeStubDescriptor* descriptor) {
|
||||
|
@ -287,6 +287,12 @@ void InternalArrayConstructorDescriptor::InitializePlatformSpecific(
|
||||
data->InitializePlatformSpecific(arraysize(registers), registers);
|
||||
}
|
||||
|
||||
void FastArrayPushDescriptor::InitializePlatformSpecific(
|
||||
CallInterfaceDescriptorData* data) {
|
||||
// stack param count needs (arg count)
|
||||
Register registers[] = {r3};
|
||||
data->InitializePlatformSpecific(arraysize(registers), registers);
|
||||
}
|
||||
|
||||
void CompareDescriptor::InitializePlatformSpecific(
|
||||
CallInterfaceDescriptorData* data) {
|
||||
|
Loading…
Reference in New Issue
Block a user