Vectorization: opt-in
If people want to make their own builtins, they can
The VM will have a program stack, where all operations will be done, as well as numbered variables, a la JVM.
add
- TODOgoto [target: num]
- Unconditional jump to target
isinst [type: num]
, x: any -> x, bool
- pushes true
if x
is type
, false
otherwise. Does not pop x
switch [value: num, target: num]* [default: num]?
, x: num -> ()
- tries to match num
to every value
. For the first value
that matches, the intepreter will jump to the corresponding target
. If no value
matches, it jumps to default
.typeof
, x: any -> x, num
- pushes the type ID of x
. Does not pop x