From: pimjager Date: Fri, 6 May 2016 15:35:10 +0000 (+0200) Subject: Added some comments on codegen X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=d77201023099377ed4d4559c26d2e02f4f61c114;p=cc1516.git Added some comments on codegen --- diff --git a/gen.icl b/gen.icl index eb96982..71fe103 100644 --- a/gen.icl +++ b/gen.icl @@ -19,12 +19,17 @@ import AST :: Arg = L String | Lit Int :: SSMProgram :== [Instr] + gen :: AST -> String gen _ = toString [Label "Test" ,Instr "ldc" [Lit 1] "Eerste instructie" ,Instr "ldc" [Lit 2] "Tweede instructie"] +//Scrap this, we'll need shared state when generating +//i.e. to figure out the positions of vars relative to the +//SP/MP/whatever or in which register they are +//and to supply with fresh labels class g a :: a -> SSMProgram instance g Expr where