new testing infrastructure
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
|
||||
@type [compiler]
|
||||
@source
|
||||
|
||||
fun add(a, b: int) {
|
||||
return a + b;
|
||||
}
|
||||
|
||||
@bytecode
|
||||
|
||||
PUSHFUN fun, 2, "add";
|
||||
JUMP end;
|
||||
fun:
|
||||
PUSHVAR "int";
|
||||
CHECKTYPE 1, "b";
|
||||
ASS "b";
|
||||
POP 1;
|
||||
ASS "a";
|
||||
POP 1;
|
||||
PUSHVAR "a";
|
||||
PUSHVAR "b";
|
||||
ADD;
|
||||
RETURN 1;
|
||||
RETURN 0;
|
||||
end:
|
||||
ASS "add";
|
||||
POP 1;
|
||||
EXIT;
|
||||
Reference in New Issue
Block a user