Commit ef1031be authored by Igor Sheludko's avatar Igor Sheludko Committed by Commit Bot

Remove unused PlatformInterfaceDescriptor.

Bug: v8:7754
Change-Id: I5de3f1fb1c1c44312238c05f53257ca75136d093
Reviewed-on: https://chromium-review.googlesource.com/1109690
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53912}
parent 0f5a0719
......@@ -2592,7 +2592,6 @@ v8_source_set("v8_base") {
"src/arm/frame-constants-arm.cc",
"src/arm/frame-constants-arm.h",
"src/arm/interface-descriptors-arm.cc",
"src/arm/interface-descriptors-arm.h",
"src/arm/macro-assembler-arm.cc",
"src/arm/macro-assembler-arm.h",
"src/arm/simulator-arm.cc",
......@@ -2633,7 +2632,6 @@ v8_source_set("v8_base") {
"src/arm64/instrument-arm64.cc",
"src/arm64/instrument-arm64.h",
"src/arm64/interface-descriptors-arm64.cc",
"src/arm64/interface-descriptors-arm64.h",
"src/arm64/macro-assembler-arm64-inl.h",
"src/arm64/macro-assembler-arm64.cc",
"src/arm64/macro-assembler-arm64.h",
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/arm/interface-descriptors-arm.h"
#if V8_TARGET_ARCH_ARM
#include "src/interface-descriptors.h"
......@@ -180,7 +178,7 @@ void AbortJSDescriptor::InitializePlatformSpecific(
void AllocateHeapNumberDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
data->InitializePlatformSpecific(0, nullptr, nullptr);
data->InitializePlatformSpecific(0, nullptr);
}
void CompareDescriptor::InitializePlatformSpecific(
......@@ -197,32 +195,24 @@ void BinaryOpDescriptor::InitializePlatformSpecific(
void ArgumentAdaptorDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
static PlatformInterfaceDescriptor default_descriptor =
PlatformInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS);
Register registers[] = {
r1, // JSFunction
r3, // the new target
r0, // actual number of arguments
r2, // expected number of arguments
};
data->InitializePlatformSpecific(arraysize(registers), registers,
&default_descriptor);
data->InitializePlatformSpecific(arraysize(registers), registers);
}
void ApiCallbackDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
static PlatformInterfaceDescriptor default_descriptor =
PlatformInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS);
Register registers[] = {
JavaScriptFrame::context_register(), // callee context
r4, // call_data
r2, // holder
r1, // api_function_address
};
data->InitializePlatformSpecific(arraysize(registers), registers,
&default_descriptor);
data->InitializePlatformSpecific(arraysize(registers), registers);
}
void InterpreterDispatchDescriptor::InitializePlatformSpecific(
......
// Copyright 2012 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_ARM_INTERFACE_DESCRIPTORS_ARM_H_
#define V8_ARM_INTERFACE_DESCRIPTORS_ARM_H_
#include "src/interface-descriptors.h"
namespace v8 {
namespace internal {
class PlatformInterfaceDescriptor {
public:
explicit PlatformInterfaceDescriptor(TargetAddressStorageMode storage_mode)
: storage_mode_(storage_mode) {}
TargetAddressStorageMode storage_mode() { return storage_mode_; }
private:
TargetAddressStorageMode storage_mode_;
};
} // namespace internal
} // namespace v8
#endif // V8_ARM_INTERFACE_DESCRIPTORS_ARM_H_
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/arm64/interface-descriptors-arm64.h"
#if V8_TARGET_ARCH_ARM64
#include "src/interface-descriptors.h"
......@@ -181,7 +179,7 @@ void AbortJSDescriptor::InitializePlatformSpecific(
void AllocateHeapNumberDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
data->InitializePlatformSpecific(0, nullptr, nullptr);
data->InitializePlatformSpecific(0, nullptr);
}
void CompareDescriptor::InitializePlatformSpecific(
......@@ -202,32 +200,24 @@ void BinaryOpDescriptor::InitializePlatformSpecific(
void ArgumentAdaptorDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
static PlatformInterfaceDescriptor default_descriptor =
PlatformInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS);
Register registers[] = {
x1, // JSFunction
x3, // the new target
x0, // actual number of arguments
x2, // expected number of arguments
};
data->InitializePlatformSpecific(arraysize(registers), registers,
&default_descriptor);
data->InitializePlatformSpecific(arraysize(registers), registers);
}
void ApiCallbackDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
static PlatformInterfaceDescriptor default_descriptor =
PlatformInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS);
Register registers[] = {
JavaScriptFrame::context_register(), // callee context
x4, // call_data
x2, // holder
x1, // api_function_address
};
data->InitializePlatformSpecific(arraysize(registers), registers,
&default_descriptor);
data->InitializePlatformSpecific(arraysize(registers), registers);
}
void InterpreterDispatchDescriptor::InitializePlatformSpecific(
......
// Copyright 2012 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_ARM64_INTERFACE_DESCRIPTORS_ARM64_H_
#define V8_ARM64_INTERFACE_DESCRIPTORS_ARM64_H_
#include "src/interface-descriptors.h"
namespace v8 {
namespace internal {
class PlatformInterfaceDescriptor {
public:
explicit PlatformInterfaceDescriptor(TargetAddressStorageMode storage_mode)
: storage_mode_(storage_mode) {}
TargetAddressStorageMode storage_mode() { return storage_mode_; }
private:
TargetAddressStorageMode storage_mode_;
};
} // namespace internal
} // namespace v8
#endif // V8_ARM64_INTERFACE_DESCRIPTORS_ARM64_H_
......@@ -68,13 +68,13 @@ const Register TypeConversionDescriptor::ArgumentRegister() { return eax; }
void TypeofDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {ebx};
data->InitializePlatformSpecific(arraysize(registers), registers, nullptr);
data->InitializePlatformSpecific(arraysize(registers), registers);
}
void CallFunctionDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {edi};
data->InitializePlatformSpecific(arraysize(registers), registers, nullptr);
data->InitializePlatformSpecific(arraysize(registers), registers);
}
void CallTrampolineDescriptor::InitializePlatformSpecific(
......@@ -180,19 +180,19 @@ void AbortJSDescriptor::InitializePlatformSpecific(
void AllocateHeapNumberDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// register state
data->InitializePlatformSpecific(0, nullptr, nullptr);
data->InitializePlatformSpecific(0, nullptr);
}
void CompareDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {edx, eax};
data->InitializePlatformSpecific(arraysize(registers), registers, nullptr);
data->InitializePlatformSpecific(arraysize(registers), registers);
}
void BinaryOpDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {edx, eax};
data->InitializePlatformSpecific(arraysize(registers), registers, nullptr);
data->InitializePlatformSpecific(arraysize(registers), registers);
}
void ArgumentAdaptorDescriptor::InitializePlatformSpecific(
......
......@@ -7,11 +7,8 @@
namespace v8 {
namespace internal {
void CallInterfaceDescriptorData::InitializePlatformSpecific(
int register_parameter_count, const Register* registers,
PlatformInterfaceDescriptor* platform_descriptor) {
platform_specific_descriptor_ = platform_descriptor;
int register_parameter_count, const Register* registers) {
register_param_count_ = register_parameter_count;
// InterfaceDescriptor owns a copy of the registers array.
......
......@@ -15,8 +15,6 @@
namespace v8 {
namespace internal {
class PlatformInterfaceDescriptor;
#define INTERFACE_DESCRIPTOR_LIST(V) \
V(Allocate) \
V(Void) \
......@@ -81,9 +79,8 @@ class V8_EXPORT_PRIVATE CallInterfaceDescriptorData {
// A copy of the passed in registers and param_representations is made
// and owned by the CallInterfaceDescriptorData.
void InitializePlatformSpecific(
int register_parameter_count, const Register* registers,
PlatformInterfaceDescriptor* platform_descriptor = nullptr);
void InitializePlatformSpecific(int register_parameter_count,
const Register* registers);
// if machine_types is null, then an array of size
// (return_count + parameter_count) will be created with
......@@ -117,9 +114,6 @@ class V8_EXPORT_PRIVATE CallInterfaceDescriptorData {
DCHECK_LT(index, param_count_);
return machine_types_[return_count_ + index];
}
PlatformInterfaceDescriptor* platform_specific_descriptor() const {
return platform_specific_descriptor_;
}
void RestrictAllocatableRegisters(const Register* registers, int num) {
DCHECK_EQ(allocatable_registers_, 0);
......@@ -149,8 +143,6 @@ class V8_EXPORT_PRIVATE CallInterfaceDescriptorData {
Register* register_params_ = nullptr;
MachineType* machine_types_ = nullptr;
PlatformInterfaceDescriptor* platform_specific_descriptor_ = nullptr;
DISALLOW_COPY_AND_ASSIGN(CallInterfaceDescriptorData);
};
......@@ -217,11 +209,6 @@ class V8_EXPORT_PRIVATE CallInterfaceDescriptor {
return data()->param_type(index);
}
// Some platforms have extra information to associate with the descriptor.
PlatformInterfaceDescriptor* platform_specific_descriptor() const {
return data()->platform_specific_descriptor();
}
RegList allocatable_registers() const {
return data()->allocatable_registers();
}
......@@ -994,11 +981,4 @@ INTERFACE_DESCRIPTOR_LIST(DEF_KEY)
} // namespace internal
} // namespace v8
#if V8_TARGET_ARCH_ARM64
#include "src/arm64/interface-descriptors-arm64.h"
#elif V8_TARGET_ARCH_ARM
#include "src/arm/interface-descriptors-arm.h"
#endif
#endif // V8_INTERFACE_DESCRIPTORS_H_
......@@ -67,13 +67,13 @@ const Register TypeConversionDescriptor::ArgumentRegister() { return a0; }
void TypeofDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {a3};
data->InitializePlatformSpecific(arraysize(registers), registers, nullptr);
data->InitializePlatformSpecific(arraysize(registers), registers);
}
void CallFunctionDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {a1};
data->InitializePlatformSpecific(arraysize(registers), registers, nullptr);
data->InitializePlatformSpecific(arraysize(registers), registers);
}
void CallTrampolineDescriptor::InitializePlatformSpecific(
......@@ -179,19 +179,19 @@ void AbortJSDescriptor::InitializePlatformSpecific(
void AllocateHeapNumberDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// register state
data->InitializePlatformSpecific(0, nullptr, nullptr);
data->InitializePlatformSpecific(0, nullptr);
}
void CompareDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {a1, a0};
data->InitializePlatformSpecific(arraysize(registers), registers, nullptr);
data->InitializePlatformSpecific(arraysize(registers), registers);
}
void BinaryOpDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {a1, a0};
data->InitializePlatformSpecific(arraysize(registers), registers, nullptr);
data->InitializePlatformSpecific(arraysize(registers), registers);
}
void ArgumentAdaptorDescriptor::InitializePlatformSpecific(
......
......@@ -67,13 +67,13 @@ const Register TypeConversionDescriptor::ArgumentRegister() { return a0; }
void TypeofDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {a3};
data->InitializePlatformSpecific(arraysize(registers), registers, nullptr);
data->InitializePlatformSpecific(arraysize(registers), registers);
}
void CallFunctionDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {a1};
data->InitializePlatformSpecific(arraysize(registers), registers, nullptr);
data->InitializePlatformSpecific(arraysize(registers), registers);
}
void CallTrampolineDescriptor::InitializePlatformSpecific(
......@@ -179,19 +179,19 @@ void AbortJSDescriptor::InitializePlatformSpecific(
void AllocateHeapNumberDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// register state
data->InitializePlatformSpecific(0, nullptr, nullptr);
data->InitializePlatformSpecific(0, nullptr);
}
void CompareDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {a1, a0};
data->InitializePlatformSpecific(arraysize(registers), registers, nullptr);
data->InitializePlatformSpecific(arraysize(registers), registers);
}
void BinaryOpDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {a1, a0};
data->InitializePlatformSpecific(arraysize(registers), registers, nullptr);
data->InitializePlatformSpecific(arraysize(registers), registers);
}
void ArgumentAdaptorDescriptor::InitializePlatformSpecific(
......
......@@ -178,7 +178,7 @@ void AbortJSDescriptor::InitializePlatformSpecific(
void AllocateHeapNumberDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
data->InitializePlatformSpecific(0, nullptr, nullptr);
data->InitializePlatformSpecific(0, nullptr);
}
void CompareDescriptor::InitializePlatformSpecific(
......
......@@ -177,7 +177,7 @@ void AbortJSDescriptor::InitializePlatformSpecific(
void AllocateHeapNumberDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
data->InitializePlatformSpecific(0, nullptr, nullptr);
data->InitializePlatformSpecific(0, nullptr);
}
void CompareDescriptor::InitializePlatformSpecific(
......
......@@ -180,7 +180,7 @@ void AbortJSDescriptor::InitializePlatformSpecific(
void AllocateHeapNumberDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
data->InitializePlatformSpecific(0, nullptr, nullptr);
data->InitializePlatformSpecific(0, nullptr);
}
void CompareDescriptor::InitializePlatformSpecific(
......
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