repositories
/
cc1516.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4039c77
)
Added some comments on codegen
author
pimjager
<pim@pimjager.nl>
Fri, 6 May 2016 15:35:10 +0000
(17:35 +0200)
committer
pimjager
<pim@pimjager.nl>
Fri, 6 May 2016 15:35:10 +0000
(17:35 +0200)
gen.icl
patch
|
blob
|
history
diff --git
a/gen.icl
b/gen.icl
index
eb96982
..
71fe103
100644
(file)
--- a/
gen.icl
+++ b/
gen.icl
@@
-19,12
+19,17
@@
import AST
:: Arg = L String | Lit Int
:: SSMProgram :== [Instr]
:: 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"]
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
class g a :: a -> SSMProgram
instance g Expr where