From 0a9e41420a18a6b4437ca2eb617a344163148319 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Mon, 26 Dec 2022 10:17:43 -0800 Subject: [PATCH] Catch split tails --- src/uxnlin.tal | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/uxnlin.tal b/src/uxnlin.tal index 3c6169d..f3d9a0c 100644 --- a/src/uxnlin.tal +++ b/src/uxnlin.tal @@ -369,6 +369,7 @@ JMP2r @eagerstack "Eager-stack $1 ( arithmetic performed before stashing ) @tokenlen "Token-length $1 ( token is longer than 24 characters ) @combine "Combine $1 ( sequences of two literal bytes ) +@tailcall "Split-Tail $1 ( potential tail-call optimisation ) @inc "INC $1 @inc2 "INC2 $1 @inc-twice "INC 20 "INC $1 @@ -654,5 +655,9 @@ JMP2r "STH2 $1 "SWP2 $1 "STH2r $1 =rot2swp2 "#80 $1 "SFT2 $1 "POP $1 =nip "#08 $1 "SFT2 $1 "NIP $1 =pop + "JSR2 $1 "POP2 $1 "JMP2r $1 =tailcall + "JSR2 $1 "POP $1 "JMP2r $1 =tailcall + "JSR $1 "POP2 $1 "JMP2r $1 =tailcall + "JSR $1 "POP $1 "JMP2r $1 =tailcall &end