Commit f6a325fb authored by bjaideep's avatar bjaideep Committed by Commit bot

PPC/s390: [builtins] Port parameter and argument-related code stubs to CSA

Port c205c9b7

Original Commit Message:

    Includes the port of these three builtins: FastNewStrictArguments,
    FastNewSloppyArguments and FastNewRestParameter. Also inline
    the implementation of these into the corresponding interpreter
    byte codes.

R=danno@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=v8:5269
LOG=N

Review-Url: https://codereview.chromium.org/2686623002
Cr-Commit-Position: refs/heads/master@{#43007}
parent d0bccc9c
......@@ -278,14 +278,16 @@ void FullCodeGenerator::Generate() {
__ LoadP(r4, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
}
if (is_strict(language_mode()) || !has_simple_parameters()) {
FastNewStrictArgumentsStub stub(isolate());
__ CallStub(&stub);
Callable callable = CodeFactory::FastNewStrictArguments(isolate());
__ Call(callable.code(), RelocInfo::CODE_TARGET);
RestoreContext();
} else if (literal()->has_duplicate_parameters()) {
__ Push(r4);
__ CallRuntime(Runtime::kNewSloppyArguments_Generic);
} else {
FastNewSloppyArgumentsStub stub(isolate());
__ CallStub(&stub);
Callable callable = CodeFactory::FastNewSloppyArguments(isolate());
__ Call(callable.code(), RelocInfo::CODE_TARGET);
RestoreContext();
}
SetVar(arguments, r3, r4, r5);
......
......@@ -282,14 +282,16 @@ void FullCodeGenerator::Generate() {
__ LoadP(r3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
}
if (is_strict(language_mode()) || !has_simple_parameters()) {
FastNewStrictArgumentsStub stub(isolate());
__ CallStub(&stub);
Callable callable = CodeFactory::FastNewStrictArguments(isolate());
__ Call(callable.code(), RelocInfo::CODE_TARGET);
RestoreContext();
} else if (literal()->has_duplicate_parameters()) {
__ Push(r3);
__ CallRuntime(Runtime::kNewSloppyArguments_Generic);
} else {
FastNewSloppyArgumentsStub stub(isolate());
__ CallStub(&stub);
Callable callable = CodeFactory::FastNewSloppyArguments(isolate());
__ Call(callable.code(), RelocInfo::CODE_TARGET);
RestoreContext();
}
SetVar(arguments, r2, r3, r4);
......
This diff is collapsed.
......@@ -67,24 +67,6 @@ void FastNewClosureDescriptor::InitializePlatformSpecific(
data->InitializePlatformSpecific(arraysize(registers), registers);
}
void FastNewRestParameterDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {r4};
data->InitializePlatformSpecific(arraysize(registers), registers);
}
void FastNewSloppyArgumentsDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {r4};
data->InitializePlatformSpecific(arraysize(registers), registers);
}
void FastNewStrictArgumentsDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {r4};
data->InitializePlatformSpecific(arraysize(registers), registers);
}
// static
const Register TypeConversionDescriptor::ArgumentRegister() { return r3; }
......
This diff is collapsed.
......@@ -65,24 +65,6 @@ void FastNewClosureDescriptor::InitializePlatformSpecific(
data->InitializePlatformSpecific(arraysize(registers), registers);
}
void FastNewRestParameterDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {r3};
data->InitializePlatformSpecific(arraysize(registers), registers);
}
void FastNewSloppyArgumentsDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {r3};
data->InitializePlatformSpecific(arraysize(registers), registers);
}
void FastNewStrictArgumentsDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {r3};
data->InitializePlatformSpecific(arraysize(registers), registers);
}
// static
const Register TypeConversionDescriptor::ArgumentRegister() { return r2; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment