fix: variable-sized values, heap-allocated arrays (and printCharArray)

This commit is contained in:
2025-02-27 14:48:24 +00:00
parent 58df1d7bb9
commit 887b982331
8 changed files with 185 additions and 238 deletions

View File

@@ -97,11 +97,9 @@ object assemblyIR {
}
}
case class MemLocation(pointer: Register, opSize: Option[Size] = None) extends Dest with Src {
def this(pointer: Register, opSize: Size) = this(pointer, Some(opSize))
case class MemLocation(pointer: Register, opSize: Size) extends Dest with Src {
override def toString =
opSize.getOrElse("").toString + s"[$pointer]"
opSize.toString + s"[$pointer]"
}
// TODO to string is wacky