refactor: merge MemLocation with IndexedAddress #37

Merged
gk1623 merged 7 commits from single-memlocation into master 2025-02-28 18:44:49 +00:00
6 changed files with 89 additions and 64 deletions
Showing only changes of commit 5ae65d3190 - Show all commits

View File

@@ -81,7 +81,7 @@ class Stack {
/** Get an MemLocation for a variable in the stack. */ /** Get an MemLocation for a variable in the stack. */
def accessVar(ident: mw.Ident): MemLocation = def accessVar(ident: mw.Ident): MemLocation =
MemLocation(RSP, sizeBytes - stack(ident).bottom, opSize = Some(ident.ty.size)) MemLocation(RSP, sizeBytes - stack(ident).bottom)
def contains(ident: mw.Ident): Boolean = stack.contains(ident) def contains(ident: mw.Ident): Boolean = stack.contains(ident)
def head: MemLocation = MemLocation(RSP, opSize = Some(stack.last._2.size)) def head: MemLocation = MemLocation(RSP, opSize = Some(stack.last._2.size))