namespace v8 {
namespace internal {
-const Register InterfaceDescriptor::ContextRegister() { return cp; }
+const Register CallInterfaceDescriptor::ContextRegister() { return cp; }
void CallDescriptors::InitializeForIsolate(Isolate* isolate) {
LInstruction* LChunkBuilder::DoCallWithDescriptor(
HCallWithDescriptor* instr) {
- const InterfaceDescriptor* descriptor = instr->descriptor();
+ const CallInterfaceDescriptor* descriptor = instr->descriptor();
LOperand* target = UseRegisterOrConstantAtStart(instr->target());
ZoneList<LOperand*> ops(instr->OperandCount(), zone());
class LCallWithDescriptor V8_FINAL : public LTemplateResultInstruction<1> {
public:
- LCallWithDescriptor(const InterfaceDescriptor* descriptor,
- const ZoneList<LOperand*>& operands,
- Zone* zone)
- : descriptor_(descriptor),
- inputs_(descriptor->GetRegisterParameterCount() + 1, zone) {
+ LCallWithDescriptor(const CallInterfaceDescriptor* descriptor,
+ const ZoneList<LOperand*>& operands, Zone* zone)
+ : descriptor_(descriptor),
+ inputs_(descriptor->GetRegisterParameterCount() + 1, zone) {
DCHECK(descriptor->GetRegisterParameterCount() + 1 == operands.length());
inputs_.AddAll(operands, zone);
}
LOperand* target() const { return inputs_[0]; }
- const InterfaceDescriptor* descriptor() { return descriptor_; }
+ const CallInterfaceDescriptor* descriptor() { return descriptor_; }
private:
DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor")
int arity() const { return hydrogen()->argument_count() - 1; }
- const InterfaceDescriptor* descriptor_;
+ const CallInterfaceDescriptor* descriptor_;
ZoneList<LOperand*> inputs_;
// Iterator support.
namespace v8 {
namespace internal {
-const Register InterfaceDescriptor::ContextRegister() { return cp; }
+const Register CallInterfaceDescriptor::ContextRegister() { return cp; }
void CallDescriptors::InitializeForIsolate(Isolate* isolate) {
LInstruction* LChunkBuilder::DoCallWithDescriptor(
HCallWithDescriptor* instr) {
- const InterfaceDescriptor* descriptor = instr->descriptor();
+ const CallInterfaceDescriptor* descriptor = instr->descriptor();
LOperand* target = UseRegisterOrConstantAtStart(instr->target());
ZoneList<LOperand*> ops(instr->OperandCount(), zone());
class LCallWithDescriptor V8_FINAL : public LTemplateResultInstruction<1> {
public:
- LCallWithDescriptor(const InterfaceDescriptor* descriptor,
- const ZoneList<LOperand*>& operands,
- Zone* zone)
- : descriptor_(descriptor),
- inputs_(descriptor->GetRegisterParameterCount() + 1, zone) {
+ LCallWithDescriptor(const CallInterfaceDescriptor* descriptor,
+ const ZoneList<LOperand*>& operands, Zone* zone)
+ : descriptor_(descriptor),
+ inputs_(descriptor->GetRegisterParameterCount() + 1, zone) {
DCHECK(descriptor->GetRegisterParameterCount() + 1 == operands.length());
inputs_.AddAll(operands, zone);
}
LOperand* target() const { return inputs_[0]; }
- const InterfaceDescriptor* descriptor() { return descriptor_; }
+ const CallInterfaceDescriptor* descriptor() { return descriptor_; }
private:
DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor")
int arity() const { return hydrogen()->argument_count() - 1; }
- const InterfaceDescriptor* descriptor_;
+ const CallInterfaceDescriptor* descriptor_;
ZoneList<LOperand*> inputs_;
// Iterator support.
class HCallWithDescriptor V8_FINAL : public HInstruction {
public:
- static HCallWithDescriptor* New(Zone* zone, HValue* context,
- HValue* target,
- int argument_count,
- const InterfaceDescriptor* descriptor,
- const Vector<HValue*>& operands) {
+ static HCallWithDescriptor* New(Zone* zone, HValue* context, HValue* target,
+ int argument_count,
+ const CallInterfaceDescriptor* descriptor,
+ const Vector<HValue*>& operands) {
DCHECK(operands.length() == descriptor->GetEnvironmentLength());
HCallWithDescriptor* res =
new(zone) HCallWithDescriptor(target, argument_count,
return -argument_count_;
}
- const InterfaceDescriptor* descriptor() const {
- return descriptor_;
- }
+ const CallInterfaceDescriptor* descriptor() const { return descriptor_; }
HValue* target() {
return OperandAt(0);
private:
// The argument count includes the receiver.
- HCallWithDescriptor(HValue* target,
- int argument_count,
- const InterfaceDescriptor* descriptor,
- const Vector<HValue*>& operands,
- Zone* zone)
- : descriptor_(descriptor),
- values_(descriptor->GetEnvironmentLength() + 1, zone) {
+ HCallWithDescriptor(HValue* target, int argument_count,
+ const CallInterfaceDescriptor* descriptor,
+ const Vector<HValue*>& operands, Zone* zone)
+ : descriptor_(descriptor),
+ values_(descriptor->GetEnvironmentLength() + 1, zone) {
argument_count_ = argument_count;
AddOperand(target, zone);
for (int i = 0; i < operands.length(); i++) {
values_[index] = value;
}
- const InterfaceDescriptor* descriptor_;
+ const CallInterfaceDescriptor* descriptor_;
ZoneList<HValue*> values_;
int argument_count_;
};
namespace v8 {
namespace internal {
-const Register InterfaceDescriptor::ContextRegister() { return esi; }
+const Register CallInterfaceDescriptor::ContextRegister() { return esi; }
void CallDescriptors::InitializeForIsolate(Isolate* isolate) {
LInstruction* LChunkBuilder::DoCallWithDescriptor(
HCallWithDescriptor* instr) {
- const InterfaceDescriptor* descriptor = instr->descriptor();
+ const CallInterfaceDescriptor* descriptor = instr->descriptor();
LOperand* target = UseRegisterOrConstantAtStart(instr->target());
ZoneList<LOperand*> ops(instr->OperandCount(), zone());
ops.Add(target, zone());
class LCallWithDescriptor V8_FINAL : public LTemplateResultInstruction<1> {
public:
- LCallWithDescriptor(const InterfaceDescriptor* descriptor,
- const ZoneList<LOperand*>& operands,
- Zone* zone)
- : inputs_(descriptor->GetRegisterParameterCount() + 1, zone) {
+ LCallWithDescriptor(const CallInterfaceDescriptor* descriptor,
+ const ZoneList<LOperand*>& operands, Zone* zone)
+ : inputs_(descriptor->GetRegisterParameterCount() + 1, zone) {
DCHECK(descriptor->GetRegisterParameterCount() + 1 == operands.length());
inputs_.AddAll(operands, zone);
}
namespace v8 {
namespace internal {
-InterfaceDescriptor::InterfaceDescriptor() : register_param_count_(-1) {}
-
-
-void InterfaceDescriptor::Initialize(
+void CallInterfaceDescriptor::Initialize(
int register_parameter_count, Register* registers,
Representation* register_param_representations,
PlatformInterfaceDescriptor* platform_descriptor) {
}
-void CallInterfaceDescriptor::Initialize(
- int register_parameter_count, Register* registers,
- Representation* param_representations,
- PlatformInterfaceDescriptor* platform_descriptor) {
- InterfaceDescriptor::Initialize(register_parameter_count, registers,
- param_representations, platform_descriptor);
-}
-
-
void CallDescriptors::InitializeForIsolateAllPlatforms(Isolate* isolate) {
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::LoadICCall);
- Register registers[] = {InterfaceDescriptor::ContextRegister(),
+ Register registers[] = {CallInterfaceDescriptor::ContextRegister(),
LoadConvention::ReceiverRegister(),
LoadConvention::NameRegister()};
descriptor->Initialize(arraysize(registers), registers, NULL);
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::StoreICCall);
- Register registers[] = {InterfaceDescriptor::ContextRegister(),
+ Register registers[] = {CallInterfaceDescriptor::ContextRegister(),
StoreConvention::ReceiverRegister(),
StoreConvention::NameRegister(),
StoreConvention::ValueRegister()};
CallInterfaceDescriptor* descriptor = isolate->call_descriptor(
CallDescriptorKey::ElementTransitionAndStoreCall);
Register registers[] = {
- InterfaceDescriptor::ContextRegister(),
+ CallInterfaceDescriptor::ContextRegister(),
StoreConvention::ValueRegister(), StoreConvention::MapRegister(),
StoreConvention::NameRegister(), StoreConvention::ReceiverRegister()};
descriptor->Initialize(arraysize(registers), registers, NULL);
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::InstanceofCall);
- Register registers[] = {InterfaceDescriptor::ContextRegister(),
+ Register registers[] = {CallInterfaceDescriptor::ContextRegister(),
InstanceofConvention::left(),
InstanceofConvention::right()};
descriptor->Initialize(arraysize(registers), registers, NULL);
{
CallInterfaceDescriptor* descriptor =
isolate->call_descriptor(CallDescriptorKey::VectorLoadICCall);
- Register registers[] = {InterfaceDescriptor::ContextRegister(),
+ Register registers[] = {CallInterfaceDescriptor::ContextRegister(),
FullVectorLoadConvention::ReceiverRegister(),
FullVectorLoadConvention::NameRegister(),
FullVectorLoadConvention::SlotRegister(),
class PlatformInterfaceDescriptor;
-class InterfaceDescriptor {
+class CallInterfaceDescriptor {
public:
+ CallInterfaceDescriptor() : register_param_count_(-1) {}
+
+ // A copy of the passed in registers and param_representations is made
+ // and owned by the CallInterfaceDescriptor.
+
+ // TODO(mvstanton): Instead of taking parallel arrays register and
+ // param_representations, how about a struct that puts the representation
+ // and register side by side (eg, RegRep(r1, Representation::Tagged()).
+ // The same should go for the CodeStubInterfaceDescriptor class.
+ void Initialize(int register_parameter_count, Register* registers,
+ Representation* param_representations,
+ PlatformInterfaceDescriptor* platform_descriptor = NULL);
+
bool IsInitialized() const { return register_param_count_ >= 0; }
int GetEnvironmentLength() const { return register_param_count_; }
static const Register ContextRegister();
- protected:
- InterfaceDescriptor();
- virtual ~InterfaceDescriptor() {}
-
- void Initialize(int register_parameter_count, Register* registers,
- Representation* register_param_representations,
- PlatformInterfaceDescriptor* platform_descriptor = NULL);
-
private:
int register_param_count_;
PlatformInterfaceDescriptor* platform_specific_descriptor_;
- DISALLOW_COPY_AND_ASSIGN(InterfaceDescriptor);
+ DISALLOW_COPY_AND_ASSIGN(CallInterfaceDescriptor);
};
};
-class CallInterfaceDescriptor : public InterfaceDescriptor {
- public:
- CallInterfaceDescriptor() {}
-
- // A copy of the passed in registers and param_representations is made
- // and owned by the CallInterfaceDescriptor.
-
- // TODO(mvstanton): Instead of taking parallel arrays register and
- // param_representations, how about a struct that puts the representation
- // and register side by side (eg, RegRep(r1, Representation::Tagged()).
- // The same should go for the CodeStubInterfaceDescriptor class.
- void Initialize(int register_parameter_count, Register* registers,
- Representation* param_representations,
- PlatformInterfaceDescriptor* platform_descriptor = NULL);
-};
-
-
class CallDescriptors {
public:
static void InitializeForIsolate(Isolate* isolate);
namespace v8 {
namespace internal {
-const Register InterfaceDescriptor::ContextRegister() { return rsi; }
+const Register CallInterfaceDescriptor::ContextRegister() { return rsi; }
void CallDescriptors::InitializeForIsolate(Isolate* isolate) {
LInstruction* LChunkBuilder::DoCallWithDescriptor(
HCallWithDescriptor* instr) {
- const InterfaceDescriptor* descriptor = instr->descriptor();
+ const CallInterfaceDescriptor* descriptor = instr->descriptor();
LOperand* target = UseRegisterOrConstantAtStart(instr->target());
ZoneList<LOperand*> ops(instr->OperandCount(), zone());
class LCallWithDescriptor V8_FINAL : public LTemplateResultInstruction<1> {
public:
- LCallWithDescriptor(const InterfaceDescriptor* descriptor,
- const ZoneList<LOperand*>& operands,
- Zone* zone)
- : inputs_(descriptor->GetRegisterParameterCount() + 1, zone) {
+ LCallWithDescriptor(const CallInterfaceDescriptor* descriptor,
+ const ZoneList<LOperand*>& operands, Zone* zone)
+ : inputs_(descriptor->GetRegisterParameterCount() + 1, zone) {
DCHECK(descriptor->GetRegisterParameterCount() + 1 == operands.length());
inputs_.AddAll(operands, zone);
}