| Index: src/x87/code-stubs-x87.cc
|
| diff --git a/src/x87/code-stubs-x87.cc b/src/x87/code-stubs-x87.cc
|
| index aa4b10ead182848b81918c768a50f28fe720605c..637ec65e683321e80dc5badc64c529e0684d85fd 100644
|
| --- a/src/x87/code-stubs-x87.cc
|
| +++ b/src/x87/code-stubs-x87.cc
|
| @@ -19,110 +19,6 @@ namespace v8 {
|
| namespace internal {
|
|
|
|
|
| -void FastNewClosureStub::InitializeInterfaceDescriptor(
|
| - CodeStubInterfaceDescriptor* descriptor) {
|
| - Register registers[] = { esi, ebx };
|
| - descriptor->Initialize(
|
| - MajorKey(), arraysize(registers), registers,
|
| - Runtime::FunctionForId(Runtime::kNewClosureFromStubFailure)->entry);
|
| -}
|
| -
|
| -
|
| -void FastNewContextStub::InitializeInterfaceDescriptor(
|
| - CodeStubInterfaceDescriptor* descriptor) {
|
| - Register registers[] = { esi, edi };
|
| - descriptor->Initialize(MajorKey(), arraysize(registers), registers);
|
| -}
|
| -
|
| -
|
| -void ToNumberStub::InitializeInterfaceDescriptor(
|
| - CodeStubInterfaceDescriptor* descriptor) {
|
| - // ToNumberStub invokes a function, and therefore needs a context.
|
| - Register registers[] = { esi, eax };
|
| - descriptor->Initialize(MajorKey(), arraysize(registers), registers);
|
| -}
|
| -
|
| -
|
| -void NumberToStringStub::InitializeInterfaceDescriptor(
|
| - CodeStubInterfaceDescriptor* descriptor) {
|
| - Register registers[] = { esi, eax };
|
| - descriptor->Initialize(
|
| - MajorKey(), arraysize(registers), registers,
|
| - Runtime::FunctionForId(Runtime::kNumberToStringRT)->entry);
|
| -}
|
| -
|
| -
|
| -void FastCloneShallowArrayStub::InitializeInterfaceDescriptor(
|
| - CodeStubInterfaceDescriptor* descriptor) {
|
| - Register registers[] = { esi, eax, ebx, ecx };
|
| - 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[] = { esi, eax, ebx, ecx, edx };
|
| - descriptor->Initialize(
|
| - MajorKey(), arraysize(registers), registers,
|
| - Runtime::FunctionForId(Runtime::kCreateObjectLiteral)->entry);
|
| -}
|
| -
|
| -
|
| -void CreateAllocationSiteStub::InitializeInterfaceDescriptor(
|
| - CodeStubInterfaceDescriptor* descriptor) {
|
| - Register registers[] = { esi, ebx, edx };
|
| - descriptor->Initialize(MajorKey(), arraysize(registers), registers);
|
| -}
|
| -
|
| -
|
| -void CallFunctionStub::InitializeInterfaceDescriptor(
|
| - CodeStubInterfaceDescriptor* descriptor) {
|
| - Register registers[] = {esi, edi};
|
| - descriptor->Initialize(MajorKey(), arraysize(registers), registers);
|
| -}
|
| -
|
| -
|
| -void CallConstructStub::InitializeInterfaceDescriptor(
|
| - CodeStubInterfaceDescriptor* descriptor) {
|
| - // eax : number of arguments
|
| - // ebx : feedback vector
|
| - // edx : (only if ebx is not the megamorphic symbol) slot in feedback
|
| - // vector (Smi)
|
| - // edi : constructor function
|
| - // TODO(turbofan): So far we don't gather type feedback and hence skip the
|
| - // slot parameter, but ArrayConstructStub needs the vector to be undefined.
|
| - Register registers[] = {esi, eax, edi, ebx};
|
| - descriptor->Initialize(MajorKey(), arraysize(registers), registers);
|
| -}
|
| -
|
| -
|
| -void RegExpConstructResultStub::InitializeInterfaceDescriptor(
|
| - CodeStubInterfaceDescriptor* descriptor) {
|
| - Register registers[] = { esi, ecx, ebx, eax };
|
| - descriptor->Initialize(
|
| - MajorKey(), arraysize(registers), registers,
|
| - Runtime::FunctionForId(Runtime::kRegExpConstructResult)->entry);
|
| -}
|
| -
|
| -
|
| -void TransitionElementsKindStub::InitializeInterfaceDescriptor(
|
| - CodeStubInterfaceDescriptor* descriptor) {
|
| - Register registers[] = { esi, eax, ebx };
|
| - descriptor->Initialize(
|
| - MajorKey(), arraysize(registers), registers,
|
| - Runtime::FunctionForId(Runtime::kTransitionElementsKind)->entry);
|
| -}
|
| -
|
| -
|
| static void InitializeArrayConstructorDescriptor(
|
| Isolate* isolate, CodeStub::Major major,
|
| CodeStubInterfaceDescriptor* descriptor,
|
| @@ -135,20 +31,15 @@ static void InitializeArrayConstructorDescriptor(
|
| Runtime::kArrayConstructor)->entry;
|
|
|
| if (constant_stack_parameter_count == 0) {
|
| - Register registers[] = { esi, edi, ebx };
|
| - 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[] = { esi, edi, ebx, eax };
|
| - Representation representations[] = {
|
| - Representation::Tagged(),
|
| - Representation::Tagged(),
|
| - Representation::Tagged(),
|
| - Representation::Integer32() };
|
| - descriptor->Initialize(major, arraysize(registers), registers, eax,
|
| - deopt_handler, representations,
|
| + CallInterfaceDescriptor* call_descriptor =
|
| + isolate->call_descriptor(CallDescriptorKey::ArrayConstructorCall);
|
| + descriptor->Initialize(major, call_descriptor, eax, deopt_handler,
|
| constant_stack_parameter_count,
|
| JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS);
|
| }
|
| @@ -156,7 +47,8 @@ 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
|
| // eax -- number of arguments
|
| @@ -165,19 +57,15 @@ static void InitializeInternalArrayConstructorDescriptor(
|
| Runtime::kInternalArrayConstructor)->entry;
|
|
|
| if (constant_stack_parameter_count == 0) {
|
| - Register registers[] = { esi, edi };
|
| - 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[] = { esi, edi, eax };
|
| - Representation representations[] = {
|
| - Representation::Tagged(),
|
| - Representation::Tagged(),
|
| - Representation::Integer32() };
|
| - descriptor->Initialize(major, arraysize(registers), registers, eax,
|
| - deopt_handler, representations,
|
| + CallInterfaceDescriptor* call_descriptor = isolate->call_descriptor(
|
| + CallDescriptorKey::InternalArrayConstructorCall);
|
| + descriptor->Initialize(major, call_descriptor, eax, deopt_handler,
|
| constant_stack_parameter_count,
|
| JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS);
|
| }
|
| @@ -204,64 +92,22 @@ void ArrayNArgumentsConstructorStub::InitializeInterfaceDescriptor(
|
|
|
| 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 CompareNilICStub::InitializeInterfaceDescriptor(
|
| - CodeStubInterfaceDescriptor* descriptor) {
|
| - Register registers[] = { esi, eax };
|
| - descriptor->Initialize(MajorKey(), arraysize(registers), registers,
|
| - FUNCTION_ADDR(CompareNilIC_Miss));
|
| - descriptor->SetMissHandler(
|
| - ExternalReference(IC_Utility(IC::kCompareNilIC_Miss), isolate()));
|
| -}
|
| -
|
| -void ToBooleanStub::InitializeInterfaceDescriptor(
|
| - CodeStubInterfaceDescriptor* descriptor) {
|
| - Register registers[] = { esi, eax };
|
| - descriptor->Initialize(MajorKey(), arraysize(registers), registers,
|
| - FUNCTION_ADDR(ToBooleanIC_Miss));
|
| - descriptor->SetMissHandler(
|
| - ExternalReference(IC_Utility(IC::kToBooleanIC_Miss), isolate()));
|
| -}
|
| -
|
| -
|
| -void BinaryOpICStub::InitializeInterfaceDescriptor(
|
| - CodeStubInterfaceDescriptor* descriptor) {
|
| - Register registers[] = { esi, edx, eax };
|
| - 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[] = { esi, ecx, edx, eax };
|
| - descriptor->Initialize(MajorKey(), arraysize(registers), registers,
|
| - FUNCTION_ADDR(BinaryOpIC_MissWithAllocationSite));
|
| -}
|
| -
|
| -
|
| -void StringAddStub::InitializeInterfaceDescriptor(
|
| - CodeStubInterfaceDescriptor* descriptor) {
|
| - Register registers[] = { esi, edx, eax };
|
| - descriptor->Initialize(MajorKey(), arraysize(registers), registers,
|
| - Runtime::FunctionForId(Runtime::kStringAdd)->entry);
|
| + InitializeInternalArrayConstructorDescriptor(isolate(), MajorKey(),
|
| + descriptor, -1);
|
| }
|
|
|
|
|
| @@ -2563,12 +2409,6 @@ void InstanceofStub::Generate(MacroAssembler* masm) {
|
| }
|
|
|
|
|
| -Register InstanceofStub::left() { return eax; }
|
| -
|
| -
|
| -Register InstanceofStub::right() { return edx; }
|
| -
|
| -
|
| // -------------------------------------------------------------------------
|
| // StringCharCodeAtGenerator
|
|
|
|
|