,Instr "ldh" [Lit 0] "Get function number"
,Instr "str" [Raw "R5"] ""
,Instr "bsr" [L "1func"] ""
- ,Instr "ldr" [Raw "MP"] ""
- ,Instr "ldc" [Lit t] ""
- ,Instr "add" [] ""
- ,Instr "str" [Raw "SP"] ""
,Instr "ldr" [Raw "RR"] ""
+ // ,Instr "ldl" [Lit t] ""
+ // ,Instr "ldh" [Lit $ 1] ""
+ // ,Instr "neg" [] ""
+ // ,Instr "ldr" [Raw "SP"] ""
+ // ,Instr "add" [] ""
+ // ,Instr "ldc" [Lit arity] ""
+ // ,Instr "sub" [] ""
+ // ,Instr "str" [Raw "SP"] ""
]
)
Nothing = liftT (Left $ Error "Undefined function!!!")
fresh >>= \elseLabel->
fresh >>= \endLabel->
g cond >>|
- tell [Instr "brf" [L elseLabel] "branch else"] >>|
+ tell [Instr "brf" [L elseLabel] "branch else"] >>|
mapM_ g th >>|
tell [Instr "bra" [L endLabel] "branch end if"] >>|
tell [Lab elseLabel] >>|
annote :: Int String -> Gen ()
annote pos key =
- tell [Instr "annote" [Raw "MP", Lit pos, Lit pos, Raw "green", Raw key] ""]
+ tell [Instr "annote" [Raw "MP", Lit pos, Lit pos, Raw "black", Raw key] ""]
class print a :: a -> [String]