This commit is contained in:
NikolajDanger
2022-06-01 15:53:24 +02:00
parent bb45db22e0
commit e46e002e9f
18 changed files with 165 additions and 252 deletions

View File

@ -156,7 +156,7 @@ let dynalloc (size_reg : Mips.reg,
; Mips.ADD (HP, HP, tmp_reg)
; Mips.SW (size_reg, place, 0) ]
code1 @ code2 @ code3
[Mips.COMMENT "dynalloc"] @ code1 @ code2 @ code3
(* Pushing arguments on the stack: *)
(* For each register 'r' in 'rs', copy them to registers from
@ -540,7 +540,8 @@ let rec compileExp (e : TypedExp)
; Mips.J loop_beg
; Mips.LABEL loop_end
]
arr_code
[Mips.COMMENT "map"]
@ arr_code
@ get_size
@ dynalloc (size_reg, place, ret_type)
@ init_regs