mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
* Update grammar * Implement selfIs in BObjectImp * Add tests * Update grammar * Support obj.function as a MemberAccess [1/2] - AST generation changes * Support obj.function as a MemberAccess [2/2] - add funcref index to eprog class table ctor entry - allow check_mro on non-class inst (skip ctor calls) * Move address of funcref into funcref table * Add funcref.new() - Add class index to funcref table entry - Add MTH_NEW * Fix formatting * Address self-review comments * Some more tests * Address self-review comments * Update grammar * Remove ObjMember read_only, hidden No need to special-handle MBR_FUNCTION * Addres GitHub CI annotations - '=': conversion from 'size_t' to 'unsigned int', possible loss of data
40 lines
991 B
C++
40 lines
991 B
C++
#include "FunctionReferenceDescriptor.h"
|
|
|
|
namespace Pol::Bscript::Compiler
|
|
{
|
|
FunctionReferenceDescriptor::FunctionReferenceDescriptor( unsigned address, int parameter_count,
|
|
int capture_count, bool is_variadic,
|
|
unsigned class_index )
|
|
: address_( address ),
|
|
parameter_count_( parameter_count ),
|
|
capture_count_( capture_count ),
|
|
is_variadic_( is_variadic ),
|
|
class_index_( class_index )
|
|
{
|
|
}
|
|
|
|
unsigned FunctionReferenceDescriptor::address() const
|
|
{
|
|
return address_;
|
|
}
|
|
|
|
int FunctionReferenceDescriptor::parameter_count() const
|
|
{
|
|
return parameter_count_;
|
|
}
|
|
|
|
int FunctionReferenceDescriptor::capture_count() const
|
|
{
|
|
return capture_count_;
|
|
}
|
|
|
|
bool FunctionReferenceDescriptor::is_variadic() const
|
|
{
|
|
return is_variadic_;
|
|
}
|
|
|
|
unsigned FunctionReferenceDescriptor::class_index() const
|
|
{
|
|
return class_index_;
|
|
}
|
|
} // namespace Pol::Bscript::Compiler
|