2014-08-29 10:40:02 +00:00
|
|
|
// 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.
|
|
|
|
|
|
|
|
#include "src/interface-descriptors.h"
|
|
|
|
|
|
|
|
namespace v8 {
|
|
|
|
namespace internal {
|
|
|
|
|
2015-06-24 06:21:47 +00:00
|
|
|
|
|
|
|
void CallInterfaceDescriptorData::InitializePlatformSpecific(
|
2016-06-02 09:25:46 +00:00
|
|
|
int register_parameter_count, const Register* registers,
|
2014-08-29 10:40:02 +00:00
|
|
|
PlatformInterfaceDescriptor* platform_descriptor) {
|
|
|
|
platform_specific_descriptor_ = platform_descriptor;
|
|
|
|
register_param_count_ = register_parameter_count;
|
|
|
|
|
|
|
|
// InterfaceDescriptor owns a copy of the registers array.
|
2016-07-25 10:24:45 +00:00
|
|
|
register_params_.reset(NewArray<Register>(register_parameter_count));
|
2014-08-29 10:40:02 +00:00
|
|
|
for (int i = 0; i < register_parameter_count; i++) {
|
|
|
|
register_params_[i] = registers[i];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-09-01 20:08:42 +00:00
|
|
|
void CallInterfaceDescriptorData::InitializePlatformIndependent(
|
|
|
|
int parameter_count, int extra_parameter_count,
|
|
|
|
const MachineType* machine_types) {
|
|
|
|
// InterfaceDescriptor owns a copy of the MachineType array.
|
|
|
|
// We only care about parameters, not receiver and result.
|
|
|
|
param_count_ = parameter_count + extra_parameter_count;
|
|
|
|
machine_types_.reset(NewArray<MachineType>(param_count_));
|
|
|
|
for (int i = 0; i < param_count_; i++) {
|
|
|
|
if (machine_types == NULL || i >= parameter_count) {
|
|
|
|
machine_types_[i] = MachineType::AnyTagged();
|
|
|
|
} else {
|
|
|
|
machine_types_[i] = machine_types[i];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-10-30 09:00:58 +00:00
|
|
|
const char* CallInterfaceDescriptor::DebugName(Isolate* isolate) const {
|
2014-09-08 15:18:54 +00:00
|
|
|
CallInterfaceDescriptorData* start = isolate->call_descriptor_data(0);
|
2014-09-08 16:18:37 +00:00
|
|
|
size_t index = data_ - start;
|
2014-09-08 15:18:54 +00:00
|
|
|
DCHECK(index < CallDescriptors::NUMBER_OF_DESCRIPTORS);
|
|
|
|
CallDescriptors::Key key = static_cast<CallDescriptors::Key>(index);
|
|
|
|
switch (key) {
|
|
|
|
#define DEF_CASE(NAME) \
|
|
|
|
case CallDescriptors::NAME: \
|
|
|
|
return #NAME " Descriptor";
|
|
|
|
INTERFACE_DESCRIPTOR_LIST(DEF_CASE)
|
|
|
|
#undef DEF_CASE
|
|
|
|
case CallDescriptors::NUMBER_OF_DESCRIPTORS:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-12-02 12:35:12 +00:00
|
|
|
void VoidDescriptor::InitializePlatformSpecific(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
|
|
|
data->InitializePlatformSpecific(0, nullptr);
|
|
|
|
}
|
|
|
|
|
2016-09-01 20:08:42 +00:00
|
|
|
void FastNewFunctionContextDescriptor::InitializePlatformIndependent(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
|
|
|
MachineType machine_types[] = {MachineType::AnyTagged(),
|
|
|
|
MachineType::Int32()};
|
|
|
|
data->InitializePlatformIndependent(arraysize(machine_types), 0,
|
|
|
|
machine_types);
|
2016-08-01 19:26:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void FastNewFunctionContextDescriptor::InitializePlatformSpecific(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
|
|
|
Register registers[] = {FunctionRegister(), SlotsRegister()};
|
|
|
|
data->InitializePlatformSpecific(arraysize(registers), registers);
|
|
|
|
}
|
|
|
|
|
2016-09-01 20:08:42 +00:00
|
|
|
void LoadDescriptor::InitializePlatformIndependent(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
|
|
|
// kReceiver, kName, kSlot
|
|
|
|
MachineType machine_types[] = {MachineType::AnyTagged(),
|
|
|
|
MachineType::AnyTagged(),
|
|
|
|
MachineType::TaggedSigned()};
|
|
|
|
data->InitializePlatformIndependent(arraysize(machine_types), 0,
|
|
|
|
machine_types);
|
2015-06-24 06:21:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void LoadDescriptor::InitializePlatformSpecific(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
2015-07-01 08:45:05 +00:00
|
|
|
Register registers[] = {ReceiverRegister(), NameRegister(), SlotRegister()};
|
2015-06-24 06:21:47 +00:00
|
|
|
data->InitializePlatformSpecific(arraysize(registers), registers);
|
2014-09-03 10:51:51 +00:00
|
|
|
}
|
|
|
|
|
2016-09-01 20:08:42 +00:00
|
|
|
void LoadGlobalDescriptor::InitializePlatformIndependent(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
|
|
|
// kSlot
|
|
|
|
MachineType machine_types[] = {MachineType::TaggedSigned()};
|
|
|
|
data->InitializePlatformIndependent(arraysize(machine_types), 0,
|
|
|
|
machine_types);
|
2016-06-15 12:34:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void LoadGlobalDescriptor::InitializePlatformSpecific(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
2016-06-24 14:08:09 +00:00
|
|
|
Register registers[] = {LoadWithVectorDescriptor::SlotRegister()};
|
2016-06-15 12:34:57 +00:00
|
|
|
data->InitializePlatformSpecific(arraysize(registers), registers);
|
|
|
|
}
|
|
|
|
|
2016-09-01 20:08:42 +00:00
|
|
|
void LoadGlobalWithVectorDescriptor::InitializePlatformIndependent(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
|
|
|
// kSlot, kVector
|
|
|
|
MachineType machine_types[] = {MachineType::TaggedSigned(),
|
|
|
|
MachineType::AnyTagged()};
|
|
|
|
data->InitializePlatformIndependent(arraysize(machine_types), 0,
|
|
|
|
machine_types);
|
2016-06-14 13:20:42 +00:00
|
|
|
}
|
|
|
|
|
2016-06-15 12:34:57 +00:00
|
|
|
void LoadGlobalWithVectorDescriptor::InitializePlatformSpecific(
|
2016-06-14 13:20:42 +00:00
|
|
|
CallInterfaceDescriptorData* data) {
|
2016-06-24 14:08:09 +00:00
|
|
|
Register registers[] = {LoadWithVectorDescriptor::SlotRegister(),
|
2016-06-14 13:20:42 +00:00
|
|
|
LoadWithVectorDescriptor::VectorRegister()};
|
|
|
|
data->InitializePlatformSpecific(arraysize(registers), registers);
|
|
|
|
}
|
2014-09-03 10:51:51 +00:00
|
|
|
|
2016-09-01 20:08:42 +00:00
|
|
|
void StoreDescriptor::InitializePlatformIndependent(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
|
|
|
// kReceiver, kName, kValue, kSlot
|
|
|
|
MachineType machine_types[] = {
|
|
|
|
MachineType::AnyTagged(), MachineType::AnyTagged(),
|
|
|
|
MachineType::AnyTagged(), MachineType::TaggedSigned()};
|
|
|
|
data->InitializePlatformIndependent(arraysize(machine_types), 0,
|
|
|
|
machine_types);
|
2016-07-14 17:04:22 +00:00
|
|
|
}
|
|
|
|
|
2015-06-24 06:21:47 +00:00
|
|
|
void StoreDescriptor::InitializePlatformSpecific(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
2016-07-14 17:04:22 +00:00
|
|
|
Register registers[] = {ReceiverRegister(), NameRegister(), ValueRegister(),
|
|
|
|
SlotRegister()};
|
2014-09-03 10:51:51 +00:00
|
|
|
|
2016-09-22 08:43:53 +00:00
|
|
|
int len = arraysize(registers) - kStackArgumentsCount;
|
|
|
|
data->InitializePlatformSpecific(len, registers);
|
2015-08-21 09:04:43 +00:00
|
|
|
}
|
|
|
|
|
2016-09-16 14:23:26 +00:00
|
|
|
void StoreTransitionDescriptor::InitializePlatformSpecific(
|
2015-10-12 07:34:18 +00:00
|
|
|
CallInterfaceDescriptorData* data) {
|
2016-09-16 14:23:26 +00:00
|
|
|
Register registers[] = {
|
|
|
|
ReceiverRegister(), NameRegister(), MapRegister(),
|
|
|
|
ValueRegister(), SlotRegister(), VectorRegister(),
|
|
|
|
};
|
2016-09-22 08:43:53 +00:00
|
|
|
int len = arraysize(registers) - kStackArgumentsCount;
|
2016-09-16 14:23:26 +00:00
|
|
|
data->InitializePlatformSpecific(len, registers);
|
2015-10-12 07:34:18 +00:00
|
|
|
}
|
|
|
|
|
2016-09-01 20:08:42 +00:00
|
|
|
void StoreTransitionDescriptor::InitializePlatformIndependent(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
2016-09-16 14:23:26 +00:00
|
|
|
// kReceiver, kName, kMap, kValue, kSlot, kVector
|
2016-09-01 20:08:42 +00:00
|
|
|
MachineType machine_types[] = {
|
2016-09-16 14:23:26 +00:00
|
|
|
MachineType::AnyTagged(), MachineType::AnyTagged(),
|
|
|
|
MachineType::AnyTagged(), MachineType::AnyTagged(),
|
|
|
|
MachineType::TaggedSigned(), MachineType::AnyTagged()};
|
2016-09-01 20:08:42 +00:00
|
|
|
data->InitializePlatformIndependent(arraysize(machine_types), 0,
|
|
|
|
machine_types);
|
2015-07-13 09:18:44 +00:00
|
|
|
}
|
|
|
|
|
2016-10-05 14:56:57 +00:00
|
|
|
void StoreNamedTransitionDescriptor::InitializePlatformIndependent(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
|
|
|
// kReceiver, kFieldOffset, kMap, kValue, kSlot, kVector, kName
|
|
|
|
MachineType machine_types[] = {
|
|
|
|
MachineType::AnyTagged(), MachineType::TaggedSigned(),
|
|
|
|
MachineType::AnyTagged(), MachineType::AnyTagged(),
|
|
|
|
MachineType::TaggedSigned(), MachineType::AnyTagged(),
|
|
|
|
MachineType::AnyTagged()};
|
|
|
|
data->InitializePlatformIndependent(arraysize(machine_types), 0,
|
|
|
|
machine_types);
|
|
|
|
}
|
|
|
|
|
|
|
|
void StoreNamedTransitionDescriptor::InitializePlatformSpecific(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
|
|
|
Register registers[] = {
|
|
|
|
ReceiverRegister(), FieldOffsetRegister(), MapRegister(),
|
|
|
|
ValueRegister(), SlotRegister(), VectorRegister(),
|
|
|
|
NameRegister(),
|
|
|
|
};
|
|
|
|
int len = arraysize(registers) - kStackArgumentsCount;
|
|
|
|
data->InitializePlatformSpecific(len, registers);
|
|
|
|
}
|
|
|
|
|
2015-09-18 08:30:22 +00:00
|
|
|
void StringCompareDescriptor::InitializePlatformSpecific(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
|
|
|
Register registers[] = {LeftRegister(), RightRegister()};
|
|
|
|
data->InitializePlatformSpecific(arraysize(registers), registers);
|
|
|
|
}
|
|
|
|
|
2016-03-21 06:02:17 +00:00
|
|
|
void TypeConversionDescriptor::InitializePlatformSpecific(
|
2015-07-31 12:25:28 +00:00
|
|
|
CallInterfaceDescriptorData* data) {
|
2016-03-21 06:02:17 +00:00
|
|
|
Register registers[] = {ArgumentRegister()};
|
2015-07-31 12:25:28 +00:00
|
|
|
data->InitializePlatformSpecific(arraysize(registers), registers);
|
|
|
|
}
|
|
|
|
|
2015-06-24 06:21:47 +00:00
|
|
|
void MathPowTaggedDescriptor::InitializePlatformSpecific(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
2015-07-01 08:45:05 +00:00
|
|
|
Register registers[] = {exponent()};
|
2015-06-24 06:21:47 +00:00
|
|
|
data->InitializePlatformSpecific(arraysize(registers), registers);
|
2014-09-11 07:11:10 +00:00
|
|
|
}
|
|
|
|
|
2015-06-24 06:21:47 +00:00
|
|
|
void MathPowIntegerDescriptor::InitializePlatformSpecific(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
2015-07-01 08:45:05 +00:00
|
|
|
Register registers[] = {exponent()};
|
2015-06-24 06:21:47 +00:00
|
|
|
data->InitializePlatformSpecific(arraysize(registers), registers);
|
|
|
|
}
|
|
|
|
|
2016-09-01 20:08:42 +00:00
|
|
|
void LoadWithVectorDescriptor::InitializePlatformIndependent(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
|
|
|
// kReceiver, kName, kSlot, kVector
|
|
|
|
MachineType machine_types[] = {
|
|
|
|
MachineType::AnyTagged(), MachineType::AnyTagged(),
|
|
|
|
MachineType::TaggedSigned(), MachineType::AnyTagged()};
|
|
|
|
data->InitializePlatformIndependent(arraysize(machine_types), 0,
|
|
|
|
machine_types);
|
2014-09-11 07:11:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-06-24 06:21:47 +00:00
|
|
|
void LoadWithVectorDescriptor::InitializePlatformSpecific(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
2015-07-01 08:45:05 +00:00
|
|
|
Register registers[] = {ReceiverRegister(), NameRegister(), SlotRegister(),
|
|
|
|
VectorRegister()};
|
2015-06-24 06:21:47 +00:00
|
|
|
data->InitializePlatformSpecific(arraysize(registers), registers);
|
|
|
|
}
|
|
|
|
|
2016-09-01 20:08:42 +00:00
|
|
|
void StoreWithVectorDescriptor::InitializePlatformIndependent(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
|
|
|
// kReceiver, kName, kValue, kSlot, kVector
|
|
|
|
MachineType machine_types[] = {
|
|
|
|
MachineType::AnyTagged(), MachineType::AnyTagged(),
|
|
|
|
MachineType::AnyTagged(), MachineType::TaggedSigned(),
|
|
|
|
MachineType::AnyTagged()};
|
|
|
|
data->InitializePlatformIndependent(arraysize(machine_types), 0,
|
|
|
|
machine_types);
|
2015-05-22 14:36:48 +00:00
|
|
|
}
|
|
|
|
|
2016-07-14 17:04:22 +00:00
|
|
|
void StoreWithVectorDescriptor::InitializePlatformSpecific(
|
2015-06-24 06:21:47 +00:00
|
|
|
CallInterfaceDescriptorData* data) {
|
2015-07-01 08:45:05 +00:00
|
|
|
Register registers[] = {ReceiverRegister(), NameRegister(), ValueRegister(),
|
|
|
|
SlotRegister(), VectorRegister()};
|
2016-09-22 08:43:53 +00:00
|
|
|
int len = arraysize(registers) - kStackArgumentsCount;
|
|
|
|
data->InitializePlatformSpecific(len, registers);
|
2015-05-22 14:36:48 +00:00
|
|
|
}
|
|
|
|
|
2016-09-01 20:08:42 +00:00
|
|
|
void BinaryOpWithVectorDescriptor::InitializePlatformIndependent(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
|
|
|
// kLeft, kRight, kSlot, kVector
|
|
|
|
MachineType machine_types[] = {MachineType::AnyTagged(),
|
|
|
|
MachineType::AnyTagged(), MachineType::Int32(),
|
|
|
|
MachineType::AnyTagged()};
|
|
|
|
data->InitializePlatformIndependent(arraysize(machine_types), 0,
|
|
|
|
machine_types);
|
2016-08-23 14:59:10 +00:00
|
|
|
}
|
|
|
|
|
2016-04-20 08:01:08 +00:00
|
|
|
const Register ApiGetterDescriptor::ReceiverRegister() {
|
|
|
|
return LoadDescriptor::ReceiverRegister();
|
2015-06-24 06:21:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void ApiGetterDescriptor::InitializePlatformSpecific(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
2016-04-20 08:01:08 +00:00
|
|
|
Register registers[] = {ReceiverRegister(), HolderRegister(),
|
|
|
|
CallbackRegister()};
|
2015-06-24 06:21:47 +00:00
|
|
|
data->InitializePlatformSpecific(arraysize(registers), registers);
|
2014-09-11 07:11:10 +00:00
|
|
|
}
|
|
|
|
|
2015-06-24 06:21:47 +00:00
|
|
|
void ContextOnlyDescriptor::InitializePlatformSpecific(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
2015-07-01 08:45:05 +00:00
|
|
|
data->InitializePlatformSpecific(0, nullptr);
|
2014-09-03 10:51:51 +00:00
|
|
|
}
|
|
|
|
|
2015-06-24 06:21:47 +00:00
|
|
|
void GrowArrayElementsDescriptor::InitializePlatformSpecific(
|
2015-04-30 12:34:02 +00:00
|
|
|
CallInterfaceDescriptorData* data) {
|
2015-07-01 08:45:05 +00:00
|
|
|
Register registers[] = {ObjectRegister(), KeyRegister()};
|
2015-06-24 06:21:47 +00:00
|
|
|
data->InitializePlatformSpecific(arraysize(registers), registers);
|
|
|
|
}
|
|
|
|
|
2016-09-01 20:08:42 +00:00
|
|
|
void VarArgFunctionDescriptor::InitializePlatformIndependent(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
|
|
|
// kActualArgumentsCount
|
|
|
|
MachineType machine_types[] = {MachineType::Int32()};
|
|
|
|
data->InitializePlatformIndependent(arraysize(machine_types), 0,
|
|
|
|
machine_types);
|
2016-03-22 12:50:49 +00:00
|
|
|
}
|
|
|
|
|
2016-09-01 20:08:42 +00:00
|
|
|
void FastCloneRegExpDescriptor::InitializePlatformIndependent(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
|
|
|
// kClosure, kLiteralIndex, kPattern, kFlags
|
|
|
|
MachineType machine_types[] = {
|
|
|
|
MachineType::AnyTagged(), MachineType::TaggedSigned(),
|
|
|
|
MachineType::AnyTagged(), MachineType::AnyTagged()};
|
|
|
|
data->InitializePlatformIndependent(arraysize(machine_types), 0,
|
|
|
|
machine_types);
|
2015-04-30 12:34:02 +00:00
|
|
|
}
|
2015-06-24 06:21:47 +00:00
|
|
|
|
2016-09-01 20:08:42 +00:00
|
|
|
void FastCloneShallowArrayDescriptor::InitializePlatformIndependent(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
|
|
|
// kClosure, kLiteralIndex, kConstantElements
|
|
|
|
MachineType machine_types[] = {MachineType::AnyTagged(),
|
|
|
|
MachineType::TaggedSigned(),
|
|
|
|
MachineType::AnyTagged()};
|
|
|
|
data->InitializePlatformIndependent(arraysize(machine_types), 0,
|
|
|
|
machine_types);
|
2015-09-08 13:35:20 +00:00
|
|
|
}
|
|
|
|
|
2016-09-01 20:08:42 +00:00
|
|
|
void CreateAllocationSiteDescriptor::InitializePlatformIndependent(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
|
|
|
// kVector, kSlot
|
|
|
|
MachineType machine_types[] = {MachineType::AnyTagged(),
|
|
|
|
MachineType::TaggedSigned()};
|
|
|
|
data->InitializePlatformIndependent(arraysize(machine_types), 0,
|
|
|
|
machine_types);
|
|
|
|
}
|
|
|
|
|
|
|
|
void CreateWeakCellDescriptor::InitializePlatformIndependent(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
|
|
|
// kVector, kSlot, kValue
|
|
|
|
MachineType machine_types[] = {MachineType::AnyTagged(),
|
|
|
|
MachineType::TaggedSigned(),
|
|
|
|
MachineType::AnyTagged()};
|
|
|
|
data->InitializePlatformIndependent(arraysize(machine_types), 0,
|
|
|
|
machine_types);
|
|
|
|
}
|
|
|
|
|
|
|
|
void CallTrampolineDescriptor::InitializePlatformIndependent(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
|
|
|
// kFunction, kActualArgumentsCount
|
|
|
|
MachineType machine_types[] = {MachineType::AnyTagged(),
|
|
|
|
MachineType::Int32()};
|
|
|
|
data->InitializePlatformIndependent(arraysize(machine_types), 0,
|
|
|
|
machine_types);
|
|
|
|
}
|
|
|
|
|
|
|
|
void ConstructStubDescriptor::InitializePlatformIndependent(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
|
|
|
// kFunction, kNewTarget, kActualArgumentsCount, kAllocationSite
|
|
|
|
MachineType machine_types[] = {MachineType::AnyTagged(),
|
|
|
|
MachineType::AnyTagged(), MachineType::Int32(),
|
|
|
|
MachineType::AnyTagged()};
|
|
|
|
data->InitializePlatformIndependent(arraysize(machine_types), 0,
|
|
|
|
machine_types);
|
|
|
|
}
|
|
|
|
|
|
|
|
void ConstructTrampolineDescriptor::InitializePlatformIndependent(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
|
|
|
// kFunction, kNewTarget, kActualArgumentsCount
|
|
|
|
MachineType machine_types[] = {
|
|
|
|
MachineType::AnyTagged(), MachineType::AnyTagged(), MachineType::Int32()};
|
|
|
|
data->InitializePlatformIndependent(arraysize(machine_types), 0,
|
|
|
|
machine_types);
|
|
|
|
}
|
|
|
|
|
|
|
|
void CallFunctionWithFeedbackDescriptor::InitializePlatformIndependent(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
|
|
|
// kFunction, kSlot
|
|
|
|
MachineType machine_types[] = {MachineType::AnyTagged(),
|
|
|
|
MachineType::TaggedSigned()};
|
|
|
|
data->InitializePlatformIndependent(arraysize(machine_types), 0,
|
|
|
|
machine_types);
|
|
|
|
}
|
|
|
|
|
|
|
|
void CallFunctionWithFeedbackAndVectorDescriptor::InitializePlatformIndependent(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
2016-10-12 09:25:55 +00:00
|
|
|
// kFunction, kActualArgumentsCount, kSlot, kVector
|
|
|
|
MachineType machine_types[] = {
|
|
|
|
MachineType::TaggedPointer(), MachineType::Int32(),
|
|
|
|
MachineType::TaggedSigned(), MachineType::AnyTagged()};
|
2016-09-01 20:08:42 +00:00
|
|
|
data->InitializePlatformIndependent(arraysize(machine_types), 0,
|
|
|
|
machine_types);
|
|
|
|
}
|
|
|
|
|
|
|
|
void ArrayNoArgumentConstructorDescriptor::InitializePlatformIndependent(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
|
|
|
// kFunction, kAllocationSite, kActualArgumentsCount, kFunctionParameter
|
|
|
|
MachineType machine_types[] = {MachineType::TaggedPointer(),
|
|
|
|
MachineType::AnyTagged(), MachineType::Int32(),
|
|
|
|
MachineType::AnyTagged()};
|
|
|
|
data->InitializePlatformIndependent(arraysize(machine_types), 0,
|
|
|
|
machine_types);
|
|
|
|
}
|
|
|
|
|
|
|
|
void ArraySingleArgumentConstructorDescriptor::InitializePlatformIndependent(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
|
|
|
// kFunction, kAllocationSite, kActualArgumentsCount, kFunctionParameter,
|
|
|
|
// kArraySizeSmiParameter
|
|
|
|
MachineType machine_types[] = {
|
|
|
|
MachineType::TaggedPointer(), MachineType::AnyTagged(),
|
|
|
|
MachineType::Int32(), MachineType::AnyTagged(), MachineType::AnyTagged()};
|
|
|
|
data->InitializePlatformIndependent(arraysize(machine_types), 0,
|
|
|
|
machine_types);
|
|
|
|
}
|
|
|
|
|
|
|
|
void ArrayNArgumentsConstructorDescriptor::InitializePlatformIndependent(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
|
|
|
// kFunction, kAllocationSite, kActualArgumentsCount
|
|
|
|
MachineType machine_types[] = {MachineType::TaggedPointer(),
|
|
|
|
MachineType::AnyTagged(),
|
|
|
|
MachineType::Int32()};
|
|
|
|
data->InitializePlatformIndependent(arraysize(machine_types), 0,
|
|
|
|
machine_types);
|
|
|
|
}
|
|
|
|
|
|
|
|
void ArgumentAdaptorDescriptor::InitializePlatformIndependent(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
|
|
|
// kFunction, kNewTarget, kActualArgumentsCount, kExpectedArgumentsCount
|
|
|
|
MachineType machine_types[] = {MachineType::TaggedPointer(),
|
|
|
|
MachineType::AnyTagged(), MachineType::Int32(),
|
|
|
|
MachineType::Int32()};
|
|
|
|
data->InitializePlatformIndependent(arraysize(machine_types), 0,
|
|
|
|
machine_types);
|
2015-06-24 06:21:47 +00:00
|
|
|
}
|
|
|
|
|
2016-09-21 11:08:25 +00:00
|
|
|
void ApiCallbackDescriptor::InitializePlatformIndependent(
|
2016-09-01 20:08:42 +00:00
|
|
|
CallInterfaceDescriptorData* data) {
|
|
|
|
// kFunction, kCallData, kHolder, kApiFunctionAddress
|
|
|
|
MachineType machine_types[] = {
|
|
|
|
MachineType::AnyTagged(), MachineType::AnyTagged(),
|
|
|
|
MachineType::AnyTagged(), MachineType::Pointer()};
|
2016-09-21 11:08:25 +00:00
|
|
|
data->InitializePlatformIndependent(arraysize(machine_types), 0,
|
2016-09-01 20:08:42 +00:00
|
|
|
machine_types);
|
2015-06-24 06:21:47 +00:00
|
|
|
}
|
|
|
|
|
2016-09-01 20:08:42 +00:00
|
|
|
void InterpreterDispatchDescriptor::InitializePlatformIndependent(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
|
|
|
// kAccumulator, kBytecodeOffset, kBytecodeArray, kDispatchTable
|
2016-09-27 14:59:54 +00:00
|
|
|
MachineType machine_types[] = {
|
|
|
|
MachineType::AnyTagged(), MachineType::IntPtr(), MachineType::AnyTagged(),
|
|
|
|
MachineType::AnyTagged()};
|
2016-09-01 20:08:42 +00:00
|
|
|
data->InitializePlatformIndependent(arraysize(machine_types), 0,
|
|
|
|
machine_types);
|
2016-02-10 16:38:49 +00:00
|
|
|
}
|
2015-06-24 06:21:47 +00:00
|
|
|
|
2016-09-29 13:48:05 +00:00
|
|
|
void InterpreterPushArgsAndCallDescriptor::InitializePlatformIndependent(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
|
|
|
// kNumberOfArguments, kFirstArgument, kFunction
|
|
|
|
MachineType machine_types[] = {MachineType::Int32(), MachineType::Pointer(),
|
|
|
|
MachineType::AnyTagged()};
|
|
|
|
data->InitializePlatformIndependent(arraysize(machine_types), 0,
|
|
|
|
machine_types);
|
|
|
|
}
|
|
|
|
|
|
|
|
void InterpreterPushArgsAndConstructDescriptor::InitializePlatformIndependent(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
|
|
|
// kNumberOfArguments, kNewTarget, kConstructor, kFeedbackElement,
|
|
|
|
// kFirstArgument
|
|
|
|
MachineType machine_types[] = {
|
|
|
|
MachineType::Int32(), MachineType::AnyTagged(), MachineType::AnyTagged(),
|
|
|
|
MachineType::AnyTagged(), MachineType::Pointer()};
|
|
|
|
data->InitializePlatformIndependent(arraysize(machine_types), 0,
|
|
|
|
machine_types);
|
|
|
|
}
|
|
|
|
|
|
|
|
void InterpreterPushArgsAndConstructArrayDescriptor::
|
|
|
|
InitializePlatformIndependent(CallInterfaceDescriptorData* data) {
|
|
|
|
// kNumberOfArguments, kFunction, kFeedbackElement, kFirstArgument
|
|
|
|
MachineType machine_types[] = {MachineType::Int32(), MachineType::AnyTagged(),
|
|
|
|
MachineType::AnyTagged(),
|
|
|
|
MachineType::Pointer()};
|
|
|
|
data->InitializePlatformIndependent(arraysize(machine_types), 0,
|
|
|
|
machine_types);
|
|
|
|
}
|
|
|
|
|
|
|
|
void InterpreterCEntryDescriptor::InitializePlatformIndependent(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
|
|
|
// kNumberOfArguments, kFirstArgument, kFunctionEntry
|
|
|
|
MachineType machine_types[] = {MachineType::Int32(), MachineType::Pointer(),
|
|
|
|
MachineType::Pointer()};
|
|
|
|
data->InitializePlatformIndependent(arraysize(machine_types), 0,
|
|
|
|
machine_types);
|
|
|
|
}
|
|
|
|
|
2015-06-01 22:46:54 +00:00
|
|
|
} // namespace internal
|
|
|
|
} // namespace v8
|