2026-07-25 23:01:18 +02:00
|
|
|
#include "bscript/compiler/representation/FunctionReferenceDescriptor.h"
|
2024-08-06 20:29:02 +02:00
|
|
|
|
|
|
|
|
namespace Pol::Bscript::Compiler
|
|
|
|
|
{
|
2024-09-04 13:28:50 +02:00
|
|
|
FunctionReferenceDescriptor::FunctionReferenceDescriptor(
|
|
|
|
|
unsigned address, int parameter_count, int capture_count, bool is_variadic,
|
|
|
|
|
unsigned class_index, bool is_constructor, std::vector<unsigned> default_parameter_addresses )
|
2024-08-26 22:37:22 +02:00
|
|
|
: address_( address ),
|
|
|
|
|
parameter_count_( parameter_count ),
|
2024-08-06 20:29:02 +02:00
|
|
|
capture_count_( capture_count ),
|
2024-08-26 22:37:22 +02:00
|
|
|
is_variadic_( is_variadic ),
|
2024-09-04 13:28:50 +02:00
|
|
|
class_index_( class_index ),
|
|
|
|
|
is_constructor_( is_constructor ),
|
|
|
|
|
default_parameter_addresses_( std::move( default_parameter_addresses ) )
|
2024-08-06 20:29:02 +02:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2024-08-26 22:37:22 +02:00
|
|
|
unsigned FunctionReferenceDescriptor::address() const
|
|
|
|
|
{
|
|
|
|
|
return address_;
|
|
|
|
|
}
|
|
|
|
|
|
2024-08-06 20:29:02 +02:00
|
|
|
int FunctionReferenceDescriptor::parameter_count() const
|
|
|
|
|
{
|
|
|
|
|
return parameter_count_;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int FunctionReferenceDescriptor::capture_count() const
|
|
|
|
|
{
|
|
|
|
|
return capture_count_;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool FunctionReferenceDescriptor::is_variadic() const
|
|
|
|
|
{
|
|
|
|
|
return is_variadic_;
|
|
|
|
|
}
|
2024-08-26 22:37:22 +02:00
|
|
|
|
|
|
|
|
unsigned FunctionReferenceDescriptor::class_index() const
|
|
|
|
|
{
|
|
|
|
|
return class_index_;
|
|
|
|
|
}
|
2024-09-04 13:28:50 +02:00
|
|
|
|
|
|
|
|
bool FunctionReferenceDescriptor::is_constructor() const
|
|
|
|
|
{
|
|
|
|
|
return is_constructor_;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const std::vector<unsigned>& FunctionReferenceDescriptor::default_parameter_addresses() const
|
|
|
|
|
{
|
|
|
|
|
return default_parameter_addresses_;
|
|
|
|
|
}
|
2024-08-06 20:29:02 +02:00
|
|
|
} // namespace Pol::Bscript::Compiler
|