-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtigertemp.sig
20 lines (16 loc) · 881 Bytes
/
tigertemp.sig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
signature tigertemp = sig
(* TEMPORARIES & LABELS:
Sometimes is too early to determine exactly which registers
are available, or exactly where a procedure body will be
located. So, we use the word "temporary" to mean a value
that is temporarily held in a register, and the word
"label" to mean some machine-language location whose exact
address is yet to be determined - just like a label in
assembly language. *)
type label = string (* Abstract names for static memory addresses *)
type temp = string (* Abstract names for local variables *)
val makeString: string -> string
val newtemp: unit -> temp (* Returns a new temporary from an infinite set of temps *)
val newlabel: unit -> label (* Returns a new label from an infinite set of labels *)
val lastTempIndex: unit -> int (* Returns last index number used to identify a temp *)
end