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

SCM Repository

[smlnj] Diff of /MLRISC/releases/release-110.64/gc-safety/gc-cells.sml
ViewVC logotype

Diff of /MLRISC/releases/release-110.64/gc-safety/gc-cells.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 733, Fri Nov 17 05:13:45 2000 UTC revision 744, Fri Dec 8 04:11:42 2000 UTC
# Line 1  Line 1 
1  (*  (*
2   * This makes a new cell module that automatically propagate gc type info.   * This makes a new cell module that automatically propagate gc type info.
3   *)   *)
4  functor GCCells(structure C : CELLS  functor GCCells(structure GCMap : GC_MAP
5                  structure GCMap : GC_MAP) : GC_CELLS =                  structure C : CELLS
6                   ) : GC_CELLS =
7  struct  struct
8    
9     structure C  = C     structure C  = C
# Line 28  Line 29 
29     fun newCell k =     fun newCell k =
30     let val new = C.newCell k     let val new = C.newCell k
31         val gcmap = getGCMap()         val gcmap = getGCMap()
32         val add  = IntHashTable.insert gcmap         val add  = GCMap.C.HashTable.insert gcmap
33         fun genVar gc =         fun genVar gc =
34         let val r = new()         let val r = new()
35         in  add(r,gc); r end         in  add(r,gc); r end
# Line 39  Line 40 
40      * Create a new GC map      * Create a new GC map
41      *)      *)
42     fun newGCMap() =     fun newGCMap() =
43     let val gcmap = IntHashTable.mkTable(129,GCMap.GCMap)     let val gcmap = GCMap.C.HashTable.mkTable(129,GCMap.GCMap)
44     in  case C.zeroReg C.GP of     in  case C.zeroReg C.GP of
45           SOME r => IntHashTable.insert gcmap (r,GC.CONST 0)           SOME r => GCMap.C.HashTable.insert gcmap (r,GC.CONST 0)
46         | _ => ();         | _ => ();
47         gcmap         gcmap
48     end     end

Legend:
Removed from v.733  
changed lines
  Added in v.744

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