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/compiler/CodeGen/cpscompile/spill.sml
ViewVC logotype

Diff of /sml/branches/SMLNJ/src/compiler/CodeGen/cpscompile/spill.sml

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

revision 418, Fri Sep 3 23:51:27 1999 UTC revision 429, Wed Sep 8 09:47:00 1999 UTC
# Line 155  Line 155 
155  exception SpillCtyMap  exception SpillCtyMap
156  val ctymap : cty Intmap.intmap = Intmap.new(32,SpillCtyMap)  val ctymap : cty Intmap.intmap = Intmap.new(32,SpillCtyMap)
157  fun clearCtyMap() = Intmap.clear ctymap  fun clearCtyMap() = Intmap.clear ctymap
158  fun getty v = (Intmap.map ctymap v) handle _ => BOGt  fun getty v = Intmap.mapWithDefault (ctymap,BOGt) v
159  val addty = Intmap.add ctymap  val addty = Intmap.add ctymap
160  fun copyLvar v = let val p = (LV.dupLvar v, getty v) in addty p; p end  fun copyLvar v = let val p = (LV.dupLvar v, getty v) in addty p; p end
161  fun floatP v = case (getty v) of FLTt => true | _ => false  fun floatP v = case (getty v) of FLTt => true | _ => false
# Line 340  Line 340 
340    val floatset : bool Intmap.intmap = Intmap.new(32,FloatSet)    val floatset : bool Intmap.intmap = Intmap.new(32,FloatSet)
341    fun fltM(v,FLTt) = Intmap.add floatset (v,true)    fun fltM(v,FLTt) = Intmap.add floatset (v,true)
342      | fltM _ = ()      | fltM _ = ()
343    fun fltP v = (Intmap.map floatset v) handle _ => false    val fltP = Intmap.mapWithDefault (floatset,false)
344    fun clearSet() = Intmap.clear floatset    fun clearSet() = Intmap.clear floatset
345    val dummyM = fn _ => ()    val dummyM = fn _ => ()
346    val dummyP = fn _ => true    val dummyP = fn _ => true
# Line 396  Line 396 
396    let exception Spillmap    let exception Spillmap
397        val m : (int ref*int*value) Intmap.intmap = Intmap.new(32,Spillmap)        val m : (int ref*int*value) Intmap.intmap = Intmap.new(32,Spillmap)
398        val enter = Intmap.add m        val enter = Intmap.add m
399        fun get(VAR x) = (SOME(Intmap.map m x) handle Spillmap => NONE)        val lookup = Intmap.map m
400          fun get(VAR x) = (SOME(lookup x) handle Spillmap => NONE)
401          | get _ = NONE          | get _ = NONE
402        fun kill(VAR v) = Intmap.rmv m v        fun kill(VAR v) = Intmap.rmv m v
403          | kill _ = ()          | kill _ = ()
# Line 436  Line 437 
437           | ARITH(i,vl,w,t,e) => ARITH(i,vl,w,t,g e)           | ARITH(i,vl,w,t,e) => ARITH(i,vl,w,t,g e)
438           | PURE(i,vl,w,t,e) => PURE(i,vl,w,t,g e)           | PURE(i,vl,w,t,e) => PURE(i,vl,w,t,g e)
439    
440        val count = (pass1 cexp; length(Intmap.intMapToList m))        val count = (pass1 cexp; Intmap.elems m)
441    
442        val _ = if (!CGoptions.debugcps) then        val _ = if (!CGoptions.debugcps) then
443                  (pr "count="; (pr o Int.toString) count; pr "\n")                  (pr "count="; (pr o Int.toString) count; pr "\n")

Legend:
Removed from v.418  
changed lines
  Added in v.429

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