LuauState class abstract

Constructors

LuauState.new()

Properties

consoleHasData ChangeNotifier
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

booleanAt(int index) bool
call(int numArgs, int numResults) → void
dispose() → void
dumpStack() → void
gc(GarbageCollection what, [int data = 0]) int
Controls the garbage collector. This function performs several tasks, according to the value of the what parameter.
getField(int index, String name) LuauType
Pushes onto the stack the value tk, where t is the value at the given index. As in Lua, this function may trigger a metamethod for the "index" event.
getGlobal(String name) LuauType
Pushes onto the stack the value of the global name. Returns the type of that value.
getTop() int
lua_gettop equivalent. Returns the number of elements in the stack, which is also the index of the top element. Notice that a negative index -x is equivalent to the positive index gettop - x + 1.
insert(int index) → void
integerAt(int index) int
isBoolean(int index) bool
isBuffer(int index) bool
isFunction(int index) bool
isLightUserdata(int index) bool
isNil(int index) bool
isNumber(int index) bool
isString(int index) bool
isTable(int index) bool
isThread(int index) bool
isUserdata(int index) bool
isVector(int index) bool
load(String name, Uint8List bytecode, {int env = 0}) → void
memoryUsedKB() int
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
numberAt(int index) double
pcall(int numArgs, int numResults) LuauStatus
pop(int count) → void
pushArtboard(Artboard artboard) → void
pushFunction(LuauFunction t, {String debugName = 'unknown'}) → void
pushInteger(int value) → void
pushNil() → void
pushNumber(double value) → void
pushRef(int id) LuauType
pushRenderer(Renderer renderer) ScriptedRenderer
pushString(String value) → void
pushUnsigned(int value) → void
pushValue(int index) → void
Pushes on the top of the stack a copy of the element at the given index.
pushViewModelInstanceValue(InternalViewModelInstanceValue value) → void
rawGeti(int idx, int n) LuauType
lua_rawgeti equivalent. Pushes onto the stack the value tn, where t is the table at the given index. The access is raw, that is, it does not invoke the __index metamethod. Returns the type of the pushed value.
readConsole(List<ConsoleEntry> entries) bool
ref(int idx) int
lua_unref equivalent. Stores the value at idx in the registry and returns an integer id to unref and get it. This is a strong reference, the object will not get garbage collected until it is unreffed.
registerModule(String name, Uint8List bytecode) bool
registerScript(String name, Uint8List bytecode) bool
replace(int index) → void
Moves the top element into the given valid index without shifting any element (therefore replacing the value at that given index), and then pops the top element.
setField(int index, String name) → void
Does the equivalent to tk = v, where t is the value at the given index and v is the value on the top of the stack.
setGlobal(String name) → void
setTop(int index) → void
lua_settop equivalent.
stringAt(int index) String
toString() String
A string representation of this object.
inherited
typeAt(int index) LuauType
unref(int id) → void
Removes the reference with id from the registry. The object will be garbage collected when it is no longer used elsewhere.
unregisterModule(String name) → void
unsignedAt(int index) int
writeConsole(ConsoleEntry entry) → void

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

init(Factory riveFactory) LuauState

Constants

luaGlobalsIndex → const int
luaRegistryIndex → const int
maxCStack → const int