From 4ce6adb6f5dc6623b903853322be726a9f95a3b8 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Wed, 29 Nov 2023 11:26:28 +0100 Subject: Continue with cases WIP: todo is matching code for basic values and adding locals for constructor arguments in a pattern --- snug-clean/src/Snug/Compile/ABI.dcl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'snug-clean/src/Snug/Compile/ABI.dcl') 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 -- cgit v1.2.3