aboutsummaryrefslogtreecommitdiff
path: root/Sil/Compile.icl
diff options
context:
space:
mode:
Diffstat (limited to 'Sil/Compile.icl')
-rw-r--r--Sil/Compile.icl14
1 files changed, 7 insertions, 7 deletions
diff --git a/Sil/Compile.icl b/Sil/Compile.icl
index 6569dd1..6efee77 100644
--- a/Sil/Compile.icl
+++ b/Sil/Compile.icl
@@ -401,7 +401,7 @@ where
instance gen Statement
where
- gen st=:(Declaration n e) =
+ gen st=:(Declaration _ n e) =
checkTypeName n e >>= \t ->
comment (toString st) *>
gen e *>
@@ -415,14 +415,14 @@ where
({asize=0}, TBool) -> tell ['ABC'.FillB_b 0 i, 'ABC'.Pop_b 1] *> shrinkStack {zero & bsize=1}
_ -> tell ['ABC'.Update_a 0 i, 'ABC'.Pop_a 1] *> shrinkStack {zero & asize=1}
updateLoc _ (BAddr i) = tell ['ABC'.Update_b 0 i, 'ABC'.Pop_b 1] *> shrinkStack {zero & bsize=1}
- gen (Application e) =
+ gen (Application _ e) =
comment "Application" *>
gen e *>
getTypeResolver >>= \tr -> case fmap typeSize <$> type tr e of
Just (Ok sz) -> tell ['ABC'.Pop_a sz.asize, 'ABC'.Pop_b sz.bsize] *> shrinkStack sz
Just (Error err) -> error err
Nothing -> error $ C_CouldNotDeduceType e
- gen (Return (Just e)) =
+ gen (Return _ (Just e)) =
comment "Return" *>
gen e *>
gets returnType >>= \rettype ->
@@ -438,13 +438,13 @@ where
updateReturnFrame {asize=0,bsize=0} _ = nop
updateReturnFrame {bsize=0} (aso, _) = tell ['ABC'.Update_a 0 (aso-1), 'ABC'.Pop_a 1] // TODO should depend on return type
updateReturnFrame _ (_, bso) = tell ['ABC'.Update_b 0 (bso-1)] // TODO should depend on return type
- gen (Return Nothing) =
+ gen (Return _ Nothing) =
comment "Return" *>
cleanup *>
tell ['ABC'.Rtn]
- gen (MachineStm s) =
+ gen (MachineStm _ s) =
tell ['ABC'.Raw s]
- gen (If blocks else) =
+ gen (If _ blocks else) =
fresh "ifend" >>= \end ->
mapM_ (genifblock end) blocks *>
genelse end else
@@ -464,7 +464,7 @@ where
genelse :: 'ABC'.Label (Maybe CodeBlock) -> Gen ()
genelse end Nothing = tell ['ABC'.Label end]
genelse end (Just cb) = gen cb *> tell ['ABC'.Label end]
- gen (While cond do) =
+ gen (While _ cond do) =
checkType TBool cond *>
fresh "while" >>= \loop -> fresh "whileend" >>= \end ->
tell [ 'ABC'.Label loop ] *>