mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
* Introduce FunctionReferenceRegistrar - Track function references created by functors - Remove ValueStack-held attributes for functors - Add Function References section to escript program - Use Function References section in ins_functor - Update escript version * Update listfile snapshots - Remove ValueStack-held attributes created by functors * Add function reference tracking to function references - `emit.function_reference` uses funcref registrar + emits that index - `ins_funcref` uses parameter count + is variadic from prog funcref table - update listfile snapshots * Add core-changes
27 lines
667 B
C++
27 lines
667 B
C++
#include "FunctionReferenceDescriptor.h"
|
|
|
|
namespace Pol::Bscript::Compiler
|
|
{
|
|
FunctionReferenceDescriptor::FunctionReferenceDescriptor( int parameter_count, int capture_count,
|
|
bool is_variadic )
|
|
: parameter_count_( parameter_count ),
|
|
capture_count_( capture_count ),
|
|
is_variadic_( is_variadic )
|
|
{
|
|
}
|
|
|
|
int FunctionReferenceDescriptor::parameter_count() const
|
|
{
|
|
return parameter_count_;
|
|
}
|
|
|
|
int FunctionReferenceDescriptor::capture_count() const
|
|
{
|
|
return capture_count_;
|
|
}
|
|
|
|
bool FunctionReferenceDescriptor::is_variadic() const
|
|
{
|
|
return is_variadic_;
|
|
}
|
|
} // namespace Pol::Bscript::Compiler
|