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-gen.sml
ViewVC logotype

Diff of /sml/branches/SMLNJ/src/MLRISC/gc-safety/gc-gen.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 8  Line 8 
8  functor GCGen  functor GCGen
9     (structure MLTreeComp : MLTREECOMP     (structure MLTreeComp : MLTREECOMP
10      structure IR         : MLRISC_IR      structure IR         : MLRISC_IR
11      structure GC         : GC_TYPE      structure GCMap      : GC_MAP
12      structure InsnProps  : INSN_PROPERTIES      structure InsnProps  : INSN_PROPERTIES
13         sharing MLTreeComp.T.Constant = IR.I.Constant         sharing MLTreeComp.T.Constant = IR.I.Constant
14         sharing MLTreeComp.T.PseudoOp = IR.CFG.P         sharing MLTreeComp.T.PseudoOp = IR.CFG.P
# Line 20  Line 20 
20     structure T   = MLTreeComp.T     structure T   = MLTreeComp.T
21     structure IR  = IR     structure IR  = IR
22     structure CFG = IR.CFG     structure CFG = IR.CFG
23     structure GC  = GC     structure GC  = GCMap.GC
24     structure G   = Graph     structure G   = Graph
25     structure A   = Array     structure A   = Array
26     structure Liveness =     structure Liveness =
27        GCLiveness(structure IR = IR        GCLiveness(structure IR = IR
28                   structure GC = GC                   structure GCMap = GCMap
29                   structure InsnProps = InsnProps)                   structure InsnProps = InsnProps)
30    
31     structure Gen = InstrGen     structure Gen = InstrGen
# Line 49  Line 49 
49         val table = Liveness.liveness IR         val table = Liveness.liveness IR
50    
51         (*         (*
52          * Check if          * Check if a block is a GC point
53          *)          *)
54         fun isGCPoint an = #contains BasicAnnotations.CALLGC an         fun isGCPoint an = #contains BasicAnnotations.CALLGC an
55    
# Line 58  Line 58 
58          *)          *)
59         fun process(b,b' as CFG.BLOCK{annotations,insns,...}) =         fun process(b,b' as CFG.BLOCK{annotations,insns,...}) =
60             if isGCPoint(!annotations) then             if isGCPoint(!annotations) then
61                let val stream = MLTreeComp.selectInstructions             let val stream = MLTreeComp.selectInstructions (Gen.newStream insns)
                                  (Gen.newStream insns)  
62                    val {liveIn,liveOut} = A.sub(table,b)                    val {liveIn,liveOut} = A.sub(table,b)
63                    val roots = liveIn                    val roots = liveIn
64                in  if !debug then                in  if !debug then
# Line 69  Line 68 
68                    callgc{id     = b,                    callgc{id     = b,
69                           label  = CFG.defineLabel b',                           label  = CFG.defineLabel b',
70                           roots  = liveIn,                           roots  = liveIn,
71                           stream = stream}                            stream = stream
72                            }
73                end                end
74             else ()             else ()
75    

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