From cf7b7db0e4040c17e05f851fd0e9d79bc173aafd Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Thu, 21 Nov 2019 20:45:27 +0100 Subject: Tail call optimisation --- Intermediate.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Intermediate.hs') diff --git a/Intermediate.hs b/Intermediate.hs index 0e181a4..95f6cc7 100644 --- a/Intermediate.hs +++ b/Intermediate.hs @@ -41,6 +41,7 @@ data Terminator = IBr Ref Int Int | IJmp Int | IRet Ref + | ITailC Ref [Ref] | IExit | IUnknown deriving Eq @@ -91,5 +92,6 @@ instance Show Terminator where show (IBr r b1 b2) = "br " ++ show r ++ " " ++ show b1 ++ " " ++ show b2 show (IJmp b) = "jmp " ++ show b show (IRet r) = "ret " ++ show r + show (ITailC r as) = "tailc " ++ show r ++ " " ++ show as show IExit = "exit" show IUnknown = "<>" -- cgit v1.2.3-70-g09d2