| Index: src/mips/code-stubs-mips.cc
|
| diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc
|
| index 9c0abe845de99373a46fa4e941a1d0fa851054f1..a175e792b1d7a24017976206ff16bae1b25c3019 100644
|
| --- a/src/mips/code-stubs-mips.cc
|
| +++ b/src/mips/code-stubs-mips.cc
|
| @@ -19,136 +19,23 @@ namespace v8 {
|
| namespace internal {
|
|
|
|
|
| -void FastNewClosureStub::InitializeInterfaceDescriptor(
|
| - CodeStubInterfaceDescriptor* descriptor) {
|
| - Register registers[] = { cp, a2 };
|
| - descriptor->Initialize(
|
| - MajorKey(), arraysize(registers), registers,
|
| - Runtime::FunctionForId(Runtime::kNewClosureFromStubFailure)->entry);
|
| -}
|
| -
|
| -
|
| -void FastNewContextStub::InitializeInterfaceDescriptor(
|
| - CodeStubInterfaceDescriptor* descriptor) {
|
| - Register registers[] = { cp, a1 };
|
| - descriptor->Initialize(MajorKey(), arraysize(registers), registers);
|
| -}
|
| -
|
| -
|
| -void ToNumberStub::InitializeInterfaceDescriptor(
|
| - CodeStubInterfaceDescriptor* descriptor) {
|
| - Register registers[] = { cp, a0 };
|
| - descriptor->Initialize(MajorKey(), arraysize(registers), registers);
|
| -}
|
| -
|
| -
|
| -void NumberToStringStub::InitializeInterfaceDescriptor(
|
| - CodeStubInterfaceDescriptor* descriptor) {
|
| - Register registers[] = { cp, a0 };
|
| - descriptor->Initialize(
|
| - MajorKey(), arraysize(registers), registers,
|
| - Runtime::FunctionForId(Runtime::kNumberToStringRT)->entry);
|
| -}
|
| -
|
| -
|
| -void FastCloneShallowArrayStub::InitializeInterfaceDescriptor(
|
| - CodeStubInterfaceDescriptor* descriptor) {
|
| - Register registers[] = { cp, a3, a2, a1 };
|
| - Representation representations[] = {
|
| - Representation::Tagged(),
|
| - Representation::Tagged(),
|
| - Representation::Smi(),
|
| - Representation::Tagged() };
|
| - descriptor->Initialize(
|
| - MajorKey(), arraysize(registers), registers,
|
| - Runtime::FunctionForId(Runtime::kCreateArrayLiteralStubBailout)->entry,
|
| - representations);
|
| -}
|
| -
|
| -
|
| -void FastCloneShallowObjectStub::InitializeInterfaceDescriptor(
|
| - CodeStubInterfaceDescriptor* descriptor) {
|
| - Register registers[] = { cp, a3, a2, a1, a0 };
|
| - descriptor->Initialize(
|
| - MajorKey(), arraysize(registers), registers,
|
| - Runtime::FunctionForId(Runtime::kCreateObjectLiteral)->entry);
|
| -}
|
| -
|
| -
|
| -void CreateAllocationSiteStub::InitializeInterfaceDescriptor(
|
| - CodeStubInterfaceDescriptor* descriptor) {
|
| - Register registers[] = { cp, a2, a3 };
|
| - descriptor->Initialize(MajorKey(), arraysize(registers), registers);
|
| -}
|
| -
|
| -
|
| -void CallFunctionStub::InitializeInterfaceDescriptor(
|
| - CodeStubInterfaceDescriptor* descriptor) {
|
| - UNIMPLEMENTED();
|
| -}
|
| -
|
| -
|
| -void CallConstructStub::InitializeInterfaceDescriptor(
|
| - CodeStubInterfaceDescriptor* descriptor) {
|
| - UNIMPLEMENTED();
|
| -}
|
| -
|
| -
|
| -void RegExpConstructResultStub::InitializeInterfaceDescriptor(
|
| - CodeStubInterfaceDescriptor* descriptor) {
|
| - Register registers[] = { cp, a2, a1, a0 };
|
| - descriptor->Initialize(
|
| - MajorKey(), arraysize(registers), registers,
|
| - Runtime::FunctionForId(Runtime::kRegExpConstructResult)->entry);
|
| -}
|
| -
|
| -
|
| -void TransitionElementsKindStub::InitializeInterfaceDescriptor(
|
| - CodeStubInterfaceDescriptor* descriptor) {
|
| - Register registers[] = { cp, a0, a1 };
|
| - Address entry =
|
| - Runtime::FunctionForId(Runtime::kTransitionElementsKind)->entry;
|
| - descriptor->Initialize(MajorKey(), arraysize(registers), registers,
|
| - FUNCTION_ADDR(entry));
|
| -}
|
| -
|
| -
|
| -void CompareNilICStub::InitializeInterfaceDescriptor(
|
| - CodeStubInterfaceDescriptor* descriptor) {
|
| - Register registers[] = { cp, a0 };
|
| - descriptor->Initialize(MajorKey(), arraysize(registers), registers,
|
| - FUNCTION_ADDR(CompareNilIC_Miss));
|
| - descriptor->SetMissHandler(
|
| - ExternalReference(IC_Utility(IC::kCompareNilIC_Miss), isolate()));
|
| -}
|
| -
|
| -
|
| static void InitializeArrayConstructorDescriptor(
|
| - CodeStub::Major major, CodeStubInterfaceDescriptor* descriptor,
|
| + Isolate* isolate, CodeStub::Major major,
|
| + CodeStubInterfaceDescriptor* descriptor,
|
| int constant_stack_parameter_count) {
|
| - // register state
|
| - // cp -- context
|
| - // a0 -- number of arguments
|
| - // a1 -- function
|
| - // a2 -- allocation site with elements kind
|
| Address deopt_handler = Runtime::FunctionForId(
|
| Runtime::kArrayConstructor)->entry;
|
|
|
| if (constant_stack_parameter_count == 0) {
|
| - Register registers[] = { cp, a1, a2 };
|
| - descriptor->Initialize(major, arraysize(registers), registers,
|
| - deopt_handler, NULL, constant_stack_parameter_count,
|
| + CallInterfaceDescriptor* call_descriptor = isolate->call_descriptor(
|
| + CallDescriptorKey::ArrayConstructorConstantArgCountCall);
|
| + descriptor->Initialize(major, call_descriptor, deopt_handler,
|
| + constant_stack_parameter_count,
|
| JS_FUNCTION_STUB_MODE);
|
| } else {
|
| - // stack param count needs (constructor pointer, and single argument)
|
| - Register registers[] = { cp, a1, a2, a0 };
|
| - Representation representations[] = {
|
| - Representation::Tagged(),
|
| - Representation::Tagged(),
|
| - Representation::Tagged(),
|
| - Representation::Integer32() };
|
| - descriptor->Initialize(major, arraysize(registers), registers, a0,
|
| - deopt_handler, representations,
|
| + CallInterfaceDescriptor* call_descriptor =
|
| + isolate->call_descriptor(CallDescriptorKey::ArrayConstructorCall);
|
| + descriptor->Initialize(major, call_descriptor, a0, deopt_handler,
|
| constant_stack_parameter_count,
|
| JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS);
|
| }
|
| @@ -156,29 +43,22 @@ static void InitializeArrayConstructorDescriptor(
|
|
|
|
|
| static void InitializeInternalArrayConstructorDescriptor(
|
| - CodeStub::Major major, CodeStubInterfaceDescriptor* descriptor,
|
| + Isolate* isolate, CodeStub::Major major,
|
| + CodeStubInterfaceDescriptor* descriptor,
|
| int constant_stack_parameter_count) {
|
| - // register state
|
| - // cp -- context
|
| - // a0 -- number of arguments
|
| - // a1 -- constructor function
|
| Address deopt_handler = Runtime::FunctionForId(
|
| Runtime::kInternalArrayConstructor)->entry;
|
|
|
| if (constant_stack_parameter_count == 0) {
|
| - Register registers[] = { cp, a1 };
|
| - descriptor->Initialize(major, arraysize(registers), registers,
|
| - deopt_handler, NULL, constant_stack_parameter_count,
|
| + CallInterfaceDescriptor* call_descriptor = isolate->call_descriptor(
|
| + CallDescriptorKey::InternalArrayConstructorConstantArgCountCall);
|
| + descriptor->Initialize(major, call_descriptor, deopt_handler,
|
| + constant_stack_parameter_count,
|
| JS_FUNCTION_STUB_MODE);
|
| } else {
|
| - // stack param count needs (constructor pointer, and single argument)
|
| - Register registers[] = { cp, a1, a0 };
|
| - Representation representations[] = {
|
| - Representation::Tagged(),
|
| - Representation::Tagged(),
|
| - Representation::Integer32() };
|
| - descriptor->Initialize(major, arraysize(registers), registers, a0,
|
| - deopt_handler, representations,
|
| + CallInterfaceDescriptor* call_descriptor = isolate->call_descriptor(
|
| + CallDescriptorKey::InternalArrayConstructorCall);
|
| + descriptor->Initialize(major, call_descriptor, a0, deopt_handler,
|
| constant_stack_parameter_count,
|
| JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS);
|
| }
|
| @@ -187,73 +67,40 @@ static void InitializeInternalArrayConstructorDescriptor(
|
|
|
| void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor(
|
| CodeStubInterfaceDescriptor* descriptor) {
|
| - InitializeArrayConstructorDescriptor(MajorKey(), descriptor, 0);
|
| + InitializeArrayConstructorDescriptor(isolate(), MajorKey(), descriptor, 0);
|
| }
|
|
|
|
|
| void ArraySingleArgumentConstructorStub::InitializeInterfaceDescriptor(
|
| CodeStubInterfaceDescriptor* descriptor) {
|
| - InitializeArrayConstructorDescriptor(MajorKey(), descriptor, 1);
|
| + InitializeArrayConstructorDescriptor(isolate(), MajorKey(), descriptor, 1);
|
| }
|
|
|
|
|
| void ArrayNArgumentsConstructorStub::InitializeInterfaceDescriptor(
|
| CodeStubInterfaceDescriptor* descriptor) {
|
| - InitializeArrayConstructorDescriptor(MajorKey(), descriptor, -1);
|
| -}
|
| -
|
| -
|
| -void ToBooleanStub::InitializeInterfaceDescriptor(
|
| - CodeStubInterfaceDescriptor* descriptor) {
|
| - Register registers[] = { cp, a0 };
|
| - descriptor->Initialize(MajorKey(), arraysize(registers), registers,
|
| - FUNCTION_ADDR(ToBooleanIC_Miss));
|
| - descriptor->SetMissHandler(
|
| - ExternalReference(IC_Utility(IC::kToBooleanIC_Miss), isolate()));
|
| + InitializeArrayConstructorDescriptor(isolate(), MajorKey(), descriptor, -1);
|
| }
|
|
|
|
|
| void InternalArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor(
|
| CodeStubInterfaceDescriptor* descriptor) {
|
| - InitializeInternalArrayConstructorDescriptor(MajorKey(), descriptor, 0);
|
| + InitializeInternalArrayConstructorDescriptor(isolate(), MajorKey(),
|
| + descriptor, 0);
|
| }
|
|
|
|
|
| void InternalArraySingleArgumentConstructorStub::InitializeInterfaceDescriptor(
|
| CodeStubInterfaceDescriptor* descriptor) {
|
| - InitializeInternalArrayConstructorDescriptor(MajorKey(), descriptor, 1);
|
| + InitializeInternalArrayConstructorDescriptor(isolate(), MajorKey(),
|
| + descriptor, 1);
|
| }
|
|
|
|
|
| void InternalArrayNArgumentsConstructorStub::InitializeInterfaceDescriptor(
|
| CodeStubInterfaceDescriptor* descriptor) {
|
| - InitializeInternalArrayConstructorDescriptor(MajorKey(), descriptor, -1);
|
| -}
|
| -
|
| -
|
| -void BinaryOpICStub::InitializeInterfaceDescriptor(
|
| - CodeStubInterfaceDescriptor* descriptor) {
|
| - Register registers[] = { cp, a1, a0 };
|
| - descriptor->Initialize(MajorKey(), arraysize(registers), registers,
|
| - FUNCTION_ADDR(BinaryOpIC_Miss));
|
| - descriptor->SetMissHandler(
|
| - ExternalReference(IC_Utility(IC::kBinaryOpIC_Miss), isolate()));
|
| -}
|
| -
|
| -
|
| -void BinaryOpWithAllocationSiteStub::InitializeInterfaceDescriptor(
|
| - CodeStubInterfaceDescriptor* descriptor) {
|
| - Register registers[] = { cp, a2, a1, a0 };
|
| - descriptor->Initialize(MajorKey(), arraysize(registers), registers,
|
| - FUNCTION_ADDR(BinaryOpIC_MissWithAllocationSite));
|
| -}
|
| -
|
| -
|
| -void StringAddStub::InitializeInterfaceDescriptor(
|
| - CodeStubInterfaceDescriptor* descriptor) {
|
| - Register registers[] = { cp, a1, a0 };
|
| - descriptor->Initialize(MajorKey(), arraysize(registers), registers,
|
| - Runtime::FunctionForId(Runtime::kStringAdd)->entry);
|
| + InitializeInternalArrayConstructorDescriptor(isolate(), MajorKey(),
|
| + descriptor, -1);
|
| }
|
|
|
|
|
| @@ -1886,12 +1733,6 @@ void FunctionPrototypeStub::Generate(MacroAssembler* masm) {
|
| }
|
|
|
|
|
| -Register InstanceofStub::left() { return a0; }
|
| -
|
| -
|
| -Register InstanceofStub::right() { return a1; }
|
| -
|
| -
|
| void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) {
|
| // The displacement is the offset of the last parameter (if any)
|
| // relative to the frame pointer.
|
|
|