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/v8.h"
|
|
|
|
|
|
|
|
#include "src/interface-descriptors.h"
|
|
|
|
|
|
|
|
namespace v8 {
|
|
|
|
namespace internal {
|
|
|
|
|
2015-06-24 06:21:47 +00:00
|
|
|
namespace {
|
|
|
|
// Constructors for common combined semantic and representation types.
|
|
|
|
Type* SmiType() {
|
|
|
|
return Type::Intersect(Type::SignedSmall(), Type::TaggedSigned());
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Type* UntaggedSigned32() {
|
|
|
|
return Type::Intersect(Type::Signed32(), Type::UntaggedSigned32());
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Type* AnyTagged() {
|
|
|
|
return Type::Intersect(
|
|
|
|
Type::Any(), Type::Union(Type::TaggedPointer(), Type::TaggedSigned()));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Type* ExternalPointer() {
|
|
|
|
return Type::Intersect(Type::Internal(), Type::UntaggedPointer());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Type::FunctionType* CallInterfaceDescriptor::BuildDefaultFunctionType(
|
|
|
|
Isolate* isolate, int parameter_count) {
|
|
|
|
Type::FunctionType* function =
|
|
|
|
Type::FunctionType::New(AnyTagged(), Type::Undefined(), parameter_count,
|
|
|
|
isolate->interface_descriptor_zone());
|
|
|
|
while (parameter_count-- != 0) {
|
|
|
|
function->InitParameter(parameter_count, AnyTagged());
|
|
|
|
}
|
|
|
|
return function;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CallInterfaceDescriptorData::InitializePlatformSpecific(
|
2014-08-29 10:40:02 +00:00
|
|
|
int register_parameter_count, Register* registers,
|
|
|
|
PlatformInterfaceDescriptor* platform_descriptor) {
|
|
|
|
platform_specific_descriptor_ = platform_descriptor;
|
|
|
|
register_param_count_ = register_parameter_count;
|
|
|
|
|
|
|
|
// InterfaceDescriptor owns a copy of the registers array.
|
|
|
|
register_params_.Reset(NewArray<Register>(register_parameter_count));
|
|
|
|
for (int i = 0; i < register_parameter_count; i++) {
|
|
|
|
register_params_[i] = registers[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-06-24 06:21:47 +00:00
|
|
|
Type::FunctionType* LoadDescriptor::BuildCallInterfaceDescriptorFunctionType(
|
|
|
|
Isolate* isolate, int paramater_count) {
|
|
|
|
Type::FunctionType* function = Type::FunctionType::New(
|
2015-07-01 08:45:05 +00:00
|
|
|
AnyTagged(), Type::Undefined(), 3, isolate->interface_descriptor_zone());
|
2015-06-24 06:21:47 +00:00
|
|
|
function->InitParameter(0, AnyTagged());
|
|
|
|
function->InitParameter(1, AnyTagged());
|
2015-07-01 08:45:05 +00:00
|
|
|
function->InitParameter(2, SmiType());
|
2015-06-24 06:21:47 +00:00
|
|
|
return function;
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-06-24 06:21:47 +00:00
|
|
|
void StoreDescriptor::InitializePlatformSpecific(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
2015-07-01 08:45:05 +00:00
|
|
|
Register registers[] = {ReceiverRegister(), NameRegister(), ValueRegister()};
|
2015-06-24 06:21:47 +00:00
|
|
|
data->InitializePlatformSpecific(arraysize(registers), registers);
|
2014-09-03 10:51:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-06-24 06:21:47 +00:00
|
|
|
void StoreTransitionDescriptor::InitializePlatformSpecific(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
2015-07-01 08:45:05 +00:00
|
|
|
Register registers[] = {ReceiverRegister(), NameRegister(), ValueRegister(),
|
|
|
|
MapRegister()};
|
2015-06-24 06:21:47 +00:00
|
|
|
data->InitializePlatformSpecific(arraysize(registers), registers);
|
2014-09-29 13:11:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-06-24 06:21:47 +00:00
|
|
|
void ElementTransitionAndStoreDescriptor::InitializePlatformSpecific(
|
2014-09-03 12:25:13 +00:00
|
|
|
CallInterfaceDescriptorData* data) {
|
2015-07-01 08:45:05 +00:00
|
|
|
Register registers[] = {ValueRegister(), MapRegister(), NameRegister(),
|
|
|
|
ReceiverRegister()};
|
2015-06-24 06:21:47 +00:00
|
|
|
data->InitializePlatformSpecific(arraysize(registers), registers);
|
2014-09-03 10:51:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-06-24 06:21:47 +00:00
|
|
|
void InstanceofDescriptor::InitializePlatformSpecific(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
2015-07-01 08:45:05 +00:00
|
|
|
Register registers[] = {left(), right()};
|
2015-06-24 06:21:47 +00:00
|
|
|
data->InitializePlatformSpecific(arraysize(registers), registers);
|
2014-09-03 10:51:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Type::FunctionType*
|
|
|
|
LoadWithVectorDescriptor::BuildCallInterfaceDescriptorFunctionType(
|
|
|
|
Isolate* isolate, int paramater_count) {
|
|
|
|
Type::FunctionType* function = Type::FunctionType::New(
|
2015-07-01 08:45:05 +00:00
|
|
|
AnyTagged(), Type::Undefined(), 4, isolate->interface_descriptor_zone());
|
2015-06-24 06:21:47 +00:00
|
|
|
function->InitParameter(0, AnyTagged());
|
|
|
|
function->InitParameter(1, AnyTagged());
|
2015-07-01 08:45:05 +00:00
|
|
|
function->InitParameter(2, SmiType());
|
|
|
|
function->InitParameter(3, AnyTagged());
|
2015-06-24 06:21:47 +00:00
|
|
|
return function;
|
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);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Type::FunctionType*
|
|
|
|
VectorStoreICDescriptor::BuildCallInterfaceDescriptorFunctionType(
|
|
|
|
Isolate* isolate, int paramater_count) {
|
|
|
|
Type::FunctionType* function = Type::FunctionType::New(
|
2015-07-01 08:45:05 +00:00
|
|
|
AnyTagged(), Type::Undefined(), 5, isolate->interface_descriptor_zone());
|
2015-06-24 06:21:47 +00:00
|
|
|
function->InitParameter(0, AnyTagged());
|
|
|
|
function->InitParameter(1, AnyTagged());
|
|
|
|
function->InitParameter(2, AnyTagged());
|
2015-07-01 08:45:05 +00:00
|
|
|
function->InitParameter(3, SmiType());
|
|
|
|
function->InitParameter(4, AnyTagged());
|
2015-06-24 06:21:47 +00:00
|
|
|
return function;
|
2015-05-22 14:36:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-06-24 06:21:47 +00:00
|
|
|
void VectorStoreICDescriptor::InitializePlatformSpecific(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
2015-07-01 08:45:05 +00:00
|
|
|
Register registers[] = {ReceiverRegister(), NameRegister(), ValueRegister(),
|
|
|
|
SlotRegister(), VectorRegister()};
|
2015-06-24 06:21:47 +00:00
|
|
|
data->InitializePlatformSpecific(arraysize(registers), registers);
|
2015-05-22 14:36:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-06-24 06:21:47 +00:00
|
|
|
Type::FunctionType*
|
|
|
|
VectorStoreICTrampolineDescriptor::BuildCallInterfaceDescriptorFunctionType(
|
|
|
|
Isolate* isolate, int paramater_count) {
|
|
|
|
Type::FunctionType* function = Type::FunctionType::New(
|
2015-07-01 08:45:05 +00:00
|
|
|
AnyTagged(), Type::Undefined(), 4, isolate->interface_descriptor_zone());
|
2015-06-24 06:21:47 +00:00
|
|
|
function->InitParameter(0, AnyTagged());
|
|
|
|
function->InitParameter(1, AnyTagged());
|
|
|
|
function->InitParameter(2, AnyTagged());
|
2015-07-01 08:45:05 +00:00
|
|
|
function->InitParameter(3, SmiType());
|
2015-06-24 06:21:47 +00:00
|
|
|
return function;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void VectorStoreICTrampolineDescriptor::InitializePlatformSpecific(
|
2015-05-22 14:36:48 +00:00
|
|
|
CallInterfaceDescriptorData* data) {
|
2015-07-01 08:45:05 +00:00
|
|
|
Register registers[] = {ReceiverRegister(), NameRegister(), ValueRegister(),
|
|
|
|
SlotRegister()};
|
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
|
|
|
Type::FunctionType*
|
|
|
|
ApiGetterDescriptor::BuildCallInterfaceDescriptorFunctionType(
|
|
|
|
Isolate* isolate, int paramater_count) {
|
|
|
|
Type::FunctionType* function = Type::FunctionType::New(
|
2015-07-01 08:45:05 +00:00
|
|
|
AnyTagged(), Type::Undefined(), 1, isolate->interface_descriptor_zone());
|
|
|
|
function->InitParameter(0, ExternalPointer());
|
2015-06-24 06:21:47 +00:00
|
|
|
return function;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void ApiGetterDescriptor::InitializePlatformSpecific(
|
|
|
|
CallInterfaceDescriptorData* data) {
|
2015-07-01 08:45:05 +00:00
|
|
|
Register registers[] = {function_address()};
|
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 ArgumentsAccessReadDescriptor::InitializePlatformSpecific(
|
2014-09-11 07:11:10 +00:00
|
|
|
CallInterfaceDescriptorData* data) {
|
2015-07-01 08:45:05 +00:00
|
|
|
Register registers[] = {index(), parameter_count()};
|
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-04-30 12:34:02 +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);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Type::FunctionType*
|
|
|
|
FastCloneShallowArrayDescriptor::BuildCallInterfaceDescriptorFunctionType(
|
|
|
|
Isolate* isolate, int paramater_count) {
|
|
|
|
Type::FunctionType* function = Type::FunctionType::New(
|
2015-07-01 08:45:05 +00:00
|
|
|
AnyTagged(), Type::Undefined(), 3, isolate->interface_descriptor_zone());
|
2015-06-24 06:21:47 +00:00
|
|
|
function->InitParameter(0, AnyTagged());
|
2015-07-01 08:45:05 +00:00
|
|
|
function->InitParameter(1, SmiType());
|
|
|
|
function->InitParameter(2, AnyTagged());
|
2015-06-24 06:21:47 +00:00
|
|
|
return function;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Type::FunctionType*
|
|
|
|
CreateAllocationSiteDescriptor::BuildCallInterfaceDescriptorFunctionType(
|
|
|
|
Isolate* isolate, int paramater_count) {
|
|
|
|
Type::FunctionType* function = Type::FunctionType::New(
|
2015-07-01 08:45:05 +00:00
|
|
|
AnyTagged(), Type::Undefined(), 2, isolate->interface_descriptor_zone());
|
2015-06-24 06:21:47 +00:00
|
|
|
function->InitParameter(0, AnyTagged());
|
2015-07-01 08:45:05 +00:00
|
|
|
function->InitParameter(1, SmiType());
|
2015-06-24 06:21:47 +00:00
|
|
|
return function;
|
2015-04-30 12:34:02 +00:00
|
|
|
}
|
2015-06-24 06:21:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
Type::FunctionType*
|
|
|
|
CreateWeakCellDescriptor::BuildCallInterfaceDescriptorFunctionType(
|
|
|
|
Isolate* isolate, int paramater_count) {
|
|
|
|
Type::FunctionType* function = Type::FunctionType::New(
|
2015-07-01 08:45:05 +00:00
|
|
|
AnyTagged(), Type::Undefined(), 3, isolate->interface_descriptor_zone());
|
2015-06-24 06:21:47 +00:00
|
|
|
function->InitParameter(0, AnyTagged());
|
2015-07-01 08:45:05 +00:00
|
|
|
function->InitParameter(1, SmiType());
|
|
|
|
function->InitParameter(2, AnyTagged());
|
2015-06-24 06:21:47 +00:00
|
|
|
return function;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Type::FunctionType*
|
|
|
|
CallFunctionWithFeedbackDescriptor::BuildCallInterfaceDescriptorFunctionType(
|
|
|
|
Isolate* isolate, int paramater_count) {
|
|
|
|
Type::FunctionType* function = Type::FunctionType::New(
|
2015-07-01 08:45:05 +00:00
|
|
|
AnyTagged(), Type::Undefined(), 2, isolate->interface_descriptor_zone());
|
|
|
|
function->InitParameter(0, Type::Receiver()); // JSFunction
|
|
|
|
function->InitParameter(1, SmiType());
|
2015-06-24 06:21:47 +00:00
|
|
|
return function;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Type::FunctionType* CallFunctionWithFeedbackAndVectorDescriptor::
|
|
|
|
BuildCallInterfaceDescriptorFunctionType(Isolate* isolate,
|
|
|
|
int paramater_count) {
|
|
|
|
Type::FunctionType* function = Type::FunctionType::New(
|
2015-07-01 08:45:05 +00:00
|
|
|
AnyTagged(), Type::Undefined(), 3, isolate->interface_descriptor_zone());
|
|
|
|
function->InitParameter(0, Type::Receiver()); // JSFunction
|
|
|
|
function->InitParameter(1, SmiType());
|
|
|
|
function->InitParameter(2, AnyTagged());
|
2015-06-24 06:21:47 +00:00
|
|
|
return function;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Type::FunctionType*
|
|
|
|
ArrayConstructorDescriptor::BuildCallInterfaceDescriptorFunctionType(
|
|
|
|
Isolate* isolate, int paramater_count) {
|
|
|
|
Type::FunctionType* function = Type::FunctionType::New(
|
2015-07-01 08:45:05 +00:00
|
|
|
AnyTagged(), Type::Undefined(), 3, isolate->interface_descriptor_zone());
|
|
|
|
function->InitParameter(0, Type::Receiver()); // JSFunction
|
|
|
|
function->InitParameter(1, AnyTagged());
|
|
|
|
function->InitParameter(2, UntaggedSigned32());
|
2015-06-24 06:21:47 +00:00
|
|
|
return function;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Type::FunctionType*
|
|
|
|
InternalArrayConstructorDescriptor::BuildCallInterfaceDescriptorFunctionType(
|
|
|
|
Isolate* isolate, int paramater_count) {
|
|
|
|
Type::FunctionType* function = Type::FunctionType::New(
|
2015-07-01 08:45:05 +00:00
|
|
|
AnyTagged(), Type::Undefined(), 2, isolate->interface_descriptor_zone());
|
|
|
|
function->InitParameter(0, Type::Receiver()); // JSFunction
|
|
|
|
function->InitParameter(1, UntaggedSigned32());
|
2015-06-24 06:21:47 +00:00
|
|
|
return function;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Type::FunctionType*
|
|
|
|
ArgumentAdaptorDescriptor::BuildCallInterfaceDescriptorFunctionType(
|
|
|
|
Isolate* isolate, int paramater_count) {
|
|
|
|
Type::FunctionType* function = Type::FunctionType::New(
|
2015-07-01 08:45:05 +00:00
|
|
|
AnyTagged(), Type::Undefined(), 3, isolate->interface_descriptor_zone());
|
|
|
|
function->InitParameter(0, Type::Receiver()); // JSFunction
|
|
|
|
function->InitParameter(1, UntaggedSigned32()); // actual number of arguments
|
|
|
|
function->InitParameter(2,
|
2015-06-24 06:21:47 +00:00
|
|
|
UntaggedSigned32()); // expected number of arguments
|
|
|
|
return function;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Type::FunctionType*
|
|
|
|
ApiFunctionDescriptor::BuildCallInterfaceDescriptorFunctionType(
|
|
|
|
Isolate* isolate, int paramater_count) {
|
|
|
|
Type::FunctionType* function = Type::FunctionType::New(
|
2015-07-01 08:45:05 +00:00
|
|
|
AnyTagged(), Type::Undefined(), 5, isolate->interface_descriptor_zone());
|
|
|
|
function->InitParameter(0, AnyTagged()); // callee
|
|
|
|
function->InitParameter(1, AnyTagged()); // call_data
|
|
|
|
function->InitParameter(2, AnyTagged()); // holder
|
|
|
|
function->InitParameter(3, ExternalPointer()); // api_function_address
|
|
|
|
function->InitParameter(4, UntaggedSigned32()); // actual number of arguments
|
2015-06-24 06:21:47 +00:00
|
|
|
return function;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Type::FunctionType*
|
|
|
|
ApiAccessorDescriptor::BuildCallInterfaceDescriptorFunctionType(
|
|
|
|
Isolate* isolate, int paramater_count) {
|
|
|
|
Type::FunctionType* function = Type::FunctionType::New(
|
2015-07-01 08:45:05 +00:00
|
|
|
AnyTagged(), Type::Undefined(), 4, isolate->interface_descriptor_zone());
|
|
|
|
function->InitParameter(0, AnyTagged()); // callee
|
|
|
|
function->InitParameter(1, AnyTagged()); // call_data
|
|
|
|
function->InitParameter(2, AnyTagged()); // holder
|
|
|
|
function->InitParameter(3, ExternalPointer()); // api_function_address
|
2015-06-24 06:21:47 +00:00
|
|
|
return function;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-07-08 16:53:32 +00:00
|
|
|
Type::FunctionType* MathRoundVariantCallFromUnoptimizedCodeDescriptor::
|
|
|
|
BuildCallInterfaceDescriptorFunctionType(Isolate* isolate,
|
|
|
|
int paramater_count) {
|
2015-06-24 06:21:47 +00:00
|
|
|
Type::FunctionType* function = Type::FunctionType::New(
|
2015-07-08 16:53:32 +00:00
|
|
|
AnyTagged(), Type::Undefined(), 4, isolate->interface_descriptor_zone());
|
|
|
|
function->InitParameter(0, Type::Receiver());
|
|
|
|
function->InitParameter(1, SmiType());
|
|
|
|
function->InitParameter(2, AnyTagged());
|
|
|
|
function->InitParameter(3, AnyTagged());
|
2015-06-24 06:21:47 +00:00
|
|
|
return function;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-07-08 16:53:32 +00:00
|
|
|
Type::FunctionType* MathRoundVariantCallFromOptimizedCodeDescriptor::
|
|
|
|
BuildCallInterfaceDescriptorFunctionType(Isolate* isolate,
|
|
|
|
int paramater_count) {
|
|
|
|
Type::FunctionType* function = Type::FunctionType::New(
|
|
|
|
AnyTagged(), Type::Undefined(), 5, isolate->interface_descriptor_zone());
|
|
|
|
function->InitParameter(0, Type::Receiver());
|
|
|
|
function->InitParameter(1, SmiType());
|
|
|
|
function->InitParameter(2, AnyTagged());
|
|
|
|
function->InitParameter(3, AnyTagged());
|
|
|
|
function->InitParameter(4, AnyTagged());
|
|
|
|
return function;
|
|
|
|
}
|
2015-06-01 22:46:54 +00:00
|
|
|
} // namespace internal
|
|
|
|
} // namespace v8
|