ObjUpvalue class

Represents a captured upvalue (closed-over variable)

Constructors

ObjUpvalue(int location)

Properties

closed Object?
If closed, this holds the actual value
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isClosed bool
Whether this upvalue has been closed (moved to heap)
getter/setter pair
location int
Stack index when still on stack (before closing)
getter/setter pair
next ObjUpvalue?
Pointer to next upvalue in linked list (for open upvalues)
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

close(List<Object?> stack) → void
Close this upvalue - move value from stack to heap
getValue(List<Object?> stack) Object?
Get the value - either from stack or closed value
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setValue(List<Object?> stack, Object? value) → void
Set the value - either in stack or closed value
toString() String
A string representation of this object.
override

Operators

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