3 * Like temporaries, except more different
4 * Author: Joshua Wise <jwise@cs.cmu.edu>
11 val reset : unit -> unit (* resets label numbering *)
12 val new : unit -> label (* returns a unique new label *)
13 val name : label -> string (* returns the name of a label *)
14 val compare : label * label -> order (* comparison function *)
17 structure Label :> LABEL =
24 (* warning: calling reset() may jeopardize uniqueness of labels! *)
25 fun reset () = ( counter := 1 )
26 fun new () = !counter before ( counter := !counter + 1 )
29 fun name t = ".L" ^ Int.toString t
31 fun compare (t1,t2) = Int.compare (t1,t2)