Machine class
TAC.Machine implements a complete MiniScript virtual machine. It keeps the context stack, keeps track of run time, and provides methods to step, stop, or reset the program.
Constructors
- Machine(Context globalContext, TextOutputMethod? standardOutput)
Properties
- done → bool
-
Returns true if the machine has finished running.
no setter
- functionType ↔ ValMap?
-
getter/setter pair
- globalContext → Context?
-
contains global variables
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
interpreter
↔ WeakReference<
Interpreter> ? -
interpreter hosting this machine
getter/setter pair
- listType ↔ ValMap?
-
getter/setter pair
- mapType ↔ ValMap?
-
getter/setter pair
- numberType ↔ ValMap?
-
getter/setter pair
- runTime → double
-
Returns the total run time of the machine in seconds.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
stack
↔ List<
Context> -
getter/setter pair
- standardOutput ↔ TextOutputMethod
-
where print() results should go
getter/setter pair
- stopwatch ↔ Stopwatch?
-
getter/setter pair
- storeImplicit ↔ bool
-
whether to store implicit values (e.g. for REPL)
getter/setter pair
- stringType ↔ ValMap?
-
getter/setter pair
- versionMap ↔ ValMap?
-
getter/setter pair
- yielding ↔ bool
-
set to true by yield intrinsic
getter/setter pair
Methods
-
doOneLine(
Line line, Context context) → void -
dumpTopContext(
) → void -
findShortName(
Value value) → String? -
getStack(
) → List< SourceLoc?> -
getTopContext(
) → Context -
manuallyPushCall(
ValFunction func, Value resultStorage, [List< Value> ? arguments]) → void - Directly invoke a ValFunction by manually pushing it onto the call stack. This might be useful, for example, in invoking handlers that have somehow been registered with the host app via intrinsics.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
popContext(
) → void -
pushContext(
Context context) → void -
reset(
) → void -
step(
) → void -
stop(
) → void -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited