summaryrefslogtreecommitdiff
path: root/Intermediate.hs
diff options
context:
space:
mode:
authorTom Smeding <tom.smeding@gmail.com>2019-04-18 23:24:56 +0200
committerTom Smeding <tom.smeding@gmail.com>2019-04-18 23:24:56 +0200
commitd37b2cfec1cfcbc3b6cfcedc88a9c6775312f8eb (patch)
tree5426e28f530b69fbf5f618ac759c2bde9cf87bd3 /Intermediate.hs
parent7b2f8b602e65ed2462b7d2c5a432d102f0ba6705 (diff)
Lower to isa WIP
Diffstat (limited to 'Intermediate.hs')
-rw-r--r--Intermediate.hs9
1 files changed, 9 insertions, 0 deletions
diff --git a/Intermediate.hs b/Intermediate.hs
index c72e81c..c677ddd 100644
--- a/Intermediate.hs
+++ b/Intermediate.hs
@@ -28,12 +28,21 @@ data Ref
deriving Eq
data InsCode
+ -- | Get value of the ref
= IAssign Ref
+ -- | Get i'th parameter to current function
| IParam Int
+ -- | Get i'th closure entry for current function
| IClosure Int
+ -- | Get i'th entry in global data table
| IData Int
+ -- |
| ICallC Ref [Ref]
+ -- | Allocate memory containing:
+ -- - Function pointer for function with the given name
+ -- - The values of each of the references
| IAllocClo Name [Ref]
+ -- | Do nothing?
| IDiscard Ref
deriving Eq