mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-06 06:48:48 +00:00
TMP changes
This commit is contained in:
parent
39715334c7
commit
2c03654cca
5 changed files with 26 additions and 5 deletions
|
|
@ -67,17 +67,19 @@ void run(bytefile *bf) {
|
|||
if (l < 1) {
|
||||
failure("BINOP: l < 1");
|
||||
}
|
||||
f_binop(&s, ops[l-1]);
|
||||
void* left = s_pop(&s);
|
||||
void* right = s_pop(&s);
|
||||
s_push(&s, (void*)ops_func[l-1](left, right));
|
||||
break;
|
||||
|
||||
case 1:
|
||||
switch (l) {
|
||||
case 0: // CONST %d
|
||||
s_put_i(&s, ip_read_int(&s.ip));
|
||||
s_push(&s, (void*)BOX(ip_read_int(&s.ip)));
|
||||
break;
|
||||
|
||||
case 1: // STRING %s
|
||||
s_put_const_str(&s, ip_read_string(&s.ip, bf));
|
||||
s_push(&s, Bstring((void*)ip_read_string(&s.ip, bf)));
|
||||
break;
|
||||
|
||||
case 2: // SEXP %s %d // create sexpr with tag=%s and %d elements from stack
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue