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 /sml/branches/SMLNJ/src/MLRISC/gc-safety/gc-cells.sml
ViewVC logotype

Diff of /sml/branches/SMLNJ/src/MLRISC/gc-safety/gc-cells.sml

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

revision 474, Wed Nov 10 22:59:58 1999 UTC revision 475, Wed Nov 10 22:59:58 1999 UTC
# Line 2  Line 2 
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 C  : CELLS
5                  structure GC : GC_TYPE) : GC_CELLS =                  structure GCMap : GC_MAP) : GC_CELLS =
6  struct  struct
7    
8     structure C  = C     structure C  = C
9     structure GC = GC     structure GC = GCMap.GC
10       structure GCMap = GCMap
11    
12     val gcmap = ref NONE : GC.gcmap option ref     val gcmap = ref NONE : GCMap.gcmap option ref
13    
14     fun setGCMap map = gcmap := SOME map     fun setGCMap map = gcmap := SOME map
15     fun getGCMap() = Option.valOf(!gcmap)     fun getGCMap() = Option.valOf(!gcmap)
# Line 30  Line 31 
31      * Create a new GC map      * Create a new GC map
32      *)      *)
33     fun newGCMap() =     fun newGCMap() =
34     let val gcmap = Intmap.new(129,GC.GCTYPE)     let val gcmap = Intmap.new(129,GCMap.GCMap)
35     in  case C.zeroReg C.GP of     in  case C.zeroReg C.GP of
36           SOME r => Intmap.add gcmap (r,GC.CONST 0)           SOME r => Intmap.add gcmap (r,GC.CONST 0)
37         | _ => ();         | _ => ();

Legend:
Removed from v.474  
changed lines
  Added in v.475

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