From: pimjager Date: Sun, 8 May 2016 22:46:24 +0000 (+0200) Subject: codegen work in progress X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=0ca117e1e474ea50b9c0e006b68b6bff30b60496;p=cc1516.git codegen work in progress --- diff --git a/gen.icl b/gen.icl index e1f6838..e87542c 100644 --- a/gen.icl +++ b/gen.icl @@ -113,8 +113,8 @@ instance g Stmt where g e >>| abort "Shit, an assignment, figure out something with storing vars or something" //vars will be on stack in locals (possible pointers to heap) - g (FunStmt _ _) = abort "CodeGen FunStmt unused" //not used - g (ReturnStmt Nothing) = tell [Instr "ret" [] ""] + g (FunStmt _ _) = abort "CodeGen, FunStmt unused" //not used + g (ReturnStmt Nothing) = tell [Instr "ret" [] ""] //NOTE! Assumes only return address on stack, safe? g (ReturnStmt (Just e)) = g e >>| tell [Instr "str" [Raw "RR"] ""] >>|