Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /MLRISC/trunk/gc-safety/gc-map.sml
ViewVC logotype

Annotation of /MLRISC/trunk/gc-safety/gc-map.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2126 - (view) (download)

1 : monnier 473 functor GCMap(GC : GC_TYPE) : GC_MAP =
2 :     struct
3 : leunga 744 structure C = CellsBasis
4 : monnier 473 structure GC = GC
5 :     exception GCMap
6 :    
7 : leunga 744 type gcmap = GC.gctype C.HashTable.hash_table
8 :    
9 : george 545 val GCMAP = Annotations.new(SOME(fn _ => "gcmap"))
10 :     : gcmap Annotations.property
11 : monnier 473
12 :     fun toString gcmap =
13 : leunga 744 let val lookup = C.HashTable.lookup gcmap
14 :     fun f r = "{" ^ GC.toString(lookup r)^ "}" handle _ => "{?}"
15 : monnier 473 in f end
16 :    
17 : leunga 744 fun pr(r,gc) = "r" ^ Int.toString(C.cellId r) ^ ":" ^ GC.toString gc
18 : leunga 624 fun prSet S = "{"^foldr (fn (x,"") => pr x | (x,y) => pr x^","^y) "" S^"}"
19 :    
20 :     val GCLIVEIN = Annotations.new(SOME(fn S => "livein: "^prSet S))
21 :     val GCLIVEOUT = Annotations.new(SOME(fn S => "liveout: "^prSet S))
22 :    
23 : monnier 473 end

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0