aboutsummaryrefslogtreecommitdiff
path: root/snug-clean/src/Snug/Compile/ABI.dcl
diff options
context:
space:
mode:
Diffstat (limited to 'snug-clean/src/Snug/Compile/ABI.dcl')
-rw-r--r--snug-clean/src/Snug/Compile/ABI.dcl8
1 files changed, 7 insertions, 1 deletions
diff --git a/snug-clean/src/Snug/Compile/ABI.dcl b/snug-clean/src/Snug/Compile/ABI.dcl
index c7fe7ad..7d3a63a 100644
--- a/snug-clean/src/Snug/Compile/ABI.dcl
+++ b/snug-clean/src/Snug/Compile/ABI.dcl
@@ -1,5 +1,11 @@
definition module Snug.Compile.ABI
+from StdBool import not, &&
+from StdClass import class Ord(<=)
+from StdInt import instance < Int
+from StdMisc import abort
+from StdOverloaded import class <(<)
+
from MIPS.MIPS32 import :: Label, :: Register(GP,S,T)
from Snug.Compile import :: Namespace
from Snug.Syntax import :: ConstructorIdent, :: SymbolIdent
@@ -17,7 +23,7 @@ TextEndDataStart :== S 7
HeapPtr :== GP
-TempImm :== T 0
+TempImm i :== if (0 <= i && i <= 1) (T i) (abort "TempImm out of range\n")
constructorLabel :: !Namespace !ConstructorIdent -> Label
functionLabel :: !Namespace !EntryPoint !SymbolIdent -> Label