This commit is contained in:
2026-06-11 12:38:01 -06:00
parent 4f12bcc476
commit a9aca0f00b
2 changed files with 10 additions and 3 deletions

View File

@@ -53,7 +53,7 @@ enum Token {
Tphi,
Tjmp,
Tjnz,
Ttail,
Ttail,
Tret,
Thlt,
Texport,
@@ -668,6 +668,10 @@ parseline(PState ps)
goto Close;
case Ttail:
curb->jmp.type = Jtail;
curb->jmp.arg = parseref ();
/* Ins *restore = curi; */
parserefl(1);
/* curi = restore; */
goto Close;
case Tjmp:
curb->jmp.type = Jjmp;
@@ -1440,7 +1444,8 @@ printfn(Fn *fn, FILE *f)
fprintf(f, "\tjmp @%s\n", b->s1->name);
break;
case Jtail:
fprintf (f, "\ttail\n");
fprintf (f, "\ttail ");
printref (b->jmp.arg, fn, f);
break;
default:
fprintf(f, "\t%s ", jtoa[b->jmp.type]);