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

Diff of /sml/trunk/src/MLRISC/gc-safety/gc-cells.sml

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

revision 775, Fri Jan 12 01:17:51 2001 UTC revision 889, Thu Jul 19 20:35:20 2001 UTC
# Line 8  Line 8 
8    
9     structure C  = C     structure C  = C
10     structure GC = GC     structure GC = GC
11       structure CB = CellsBasis
12    
13     (*     (*
14      * Generate a new virtual register and update the gc information      * Generate a new virtual register and update the gc information
# Line 17  Line 18 
18     let val new = C.newCell k     let val new = C.newCell k
19         val set = #set GC.GC_TYPE         val set = #set GC.GC_TYPE
20         fun genVar gc =         fun genVar gc =
21         let val r as C.CELL{an, ...} = new()         let val r as CB.CELL{an, ...} = new()
22         in  an := set(gc,!an); r end         in  an := set(gc,!an); r end
23     in  genVar     in  genVar
24     end     end
25    
26     fun getGCType(C.CELL{an, ...}) = #lookup GC.GC_TYPE (!an)     fun getGCType(CB.CELL{an, ...}) = #lookup GC.GC_TYPE (!an)
27     fun setGCType(C.CELL{an, ...}, gc) = an := #set GC.GC_TYPE (gc, !an)     fun setGCType(CB.CELL{an, ...}, gc) = an := #set GC.GC_TYPE (gc, !an)
28    
29     fun printType(C.CELL{an, ...}) =     fun printType(CB.CELL{an, ...}) =
30         case #get GC.GC_TYPE (!an) of         case #get GC.GC_TYPE (!an) of
31           SOME ty => ":"^GC.toString ty           SOME ty => ":"^GC.toString ty
32         | NONE    => ":?"         | NONE    => ":?"
33    
34     val GCLIVEOUT = Annotations.new(SOME(fn _ => "GCLIVEOUT"))     val GCLIVEOUT = Annotations.new(SOME(fn _ => "GCLIVEOUT"))
35                       : (C.cell * GC.gctype) list Annotations.property                       : (CB.cell * GC.gctype) list Annotations.property
36  end  end

Legend:
Removed from v.775  
changed lines
  Added in v.889

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