BuiltinFunction class abstract
Abstract base class representing a built-in function in the interpreter.
Built-in functions are implemented directly in Dart and provide core functionality to the interpreted language. They can be called with a list of arguments and return a value of any type.
- Implementers
Constructors
- BuiltinFunction([LuaRuntime? interpreter])
- Creates a builtin function with optional interpreter reference.
Properties
- canBytecodeInlineWithoutManagedFrame → bool
-
Whether the bytecode VM may bypass managed call-stack setup for this
builtin when no debug hook is active.
no setter
- doc → FunctionDoc?
-
Optional documentation metadata for auto-generated library docs.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- interpreter → LuaRuntime?
-
The interpreter instance that this builtin function belongs to.
This is optional for backwards compatibility with existing functions.
final
- isBytecodeAssertBuiltin → bool
-
Whether this builtin is the base-library
assertand therefore eligible for the bytecode VM's dedicated assert-success fast path.no setter - isBytecodeDebugGetLocalBuiltin → bool
-
Whether this builtin is
debug.getlocalfor bytecode-local fast paths.no setter - isBytecodeDebugSetLocalBuiltin → bool
-
Whether this builtin is
debug.setlocalfor bytecode-local fast paths.no setter - isBytecodeProtectedCallBuiltin → bool
-
Whether this builtin is
pcallfor bytecode protected-call fast paths.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
call(
List< Object?> args) → FutureOr<Object?> - Executes the built-in function with the given arguments.
-
dartStringValue(
String raw) → Value -
Reuses runtime-cached wrappers for public Dart string results while
preserving the public
raw is Stringinterop contract. -
fastCall0(
) → Object? - Optional fixed-arity fast paths used by the bytecode VM hot call sites.
-
fastCall1(
Object? arg0) → Object? - Optional single-argument fast path used by hot bytecode call sites.
-
fastCall2(
Object? arg0, Object? arg1) → Object? - Optional two-argument fast path used by hot bytecode call sites.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
primitiveValue(
Object? raw) → Value - Reuses cached wrappers for primitive Lua values when the active runtime supports it, falling back to a fresh wrapper otherwise.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- fastCallUnsupported → Object
-
final