(Mold is currently under implementation)
SMOP Mold is a register based interpreter implementation
A DSL called m0ld is used to represent mold opcodes in text form
A Mold block(?) is composed of three parts
the number of registers used by the program (not counting the ones used to put constants or the 3 special ones)
constants - which are put into registers
opcodes
The registers 1,2,3 are initialised with
interpreter
identifier
captures
Mold opcodes
call invocant,identifier,named,positionals,target
call2 responder,capture,target
goto label - jumps to label
br register,iftrue,iffalse - jumps to iftruel if the native bool in register is true to iffalse otherwise
$*OUT.print("hello world\n") be translated to something like
my $out;
my $OUT = "$*OUT";
my $print = "print";
my $curly = "postcircumfix:{ }";
my $SMOP__S1P__RootNamespace = $SMOP__S1P__RootNamespace;
my $hello_world = "hello world\n";
$out = $SMOP__S1P__RootNamespace.$curly($OUT);
$out.$print($hello_world);