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/compiler/FLINT/clos/closure.sml
 [smlnj] / sml / trunk / compiler / FLINT / clos / closure.sml

# Diff of /sml/trunk/compiler/FLINT/clos/closure.sml

sml/trunk/src/compiler/FLINT/clos/closure.sml revision 773, Mon Jan 8 16:18:37 2001 UTC sml/trunk/compiler/FLINT/clos/closure.sml revision 2162, Thu Nov 2 21:20:47 2006 UTC
# Line 1021  Line 1021
1021               | SOME v => (enter(v,t),b))               | SOME v => (enter(v,t),b))
1022
1023        (* process the rest groups in free *)        (* process the rest groups in free *)
1024        fun h([],i,r,t,b) = m(r,t,b)        fun h([],i:int,r,t,b) = m(r,t,b)
1025          | h((v,_,j)::z,i,r,t,b) =          | h((v,_,j)::z,i,r,t,b) =
1026              if j = i then h(z,i,enter(v,r),t,b)              if j = i then h(z,i,enter(v,r),t,b)
1027              else let val (nt,nb) = m(r,t,b)              else let val (nt,nb) = m(r,t,b)
# Line 1464  Line 1464
1464
1465          (* for recursive functions, always spill deeper level free variables *)          (* for recursive functions, always spill deeper level free variables *)
1466          val ((gpspill,gpfree),(fpspill,fpfree),nflag) = case lpv          val ((gpspill,gpfree),(fpspill,fpfree),nflag) = case lpv
1467            of SOME _ => (partition deep1 gpfree,partition deep1 fpfree,true)            of SOME _ =>
1468                   let fun h((v,_,_),l) =
1469                         case whatIs(initEnv,v)
1470                          of (Closure (CR(_,{free,...}))) => merge(rmv(v,free),l)
1471                           | _ => l
1472                       val gpfree = removeV(foldr h [] gpfree, gpfree)
1473                       val gpfreePart =
1474                             if length(gpfree) < numCSgpregs
1475                             then ([],gpfree)
1476                             else partition deep1 gpfree
1477                    in (gpfreePart, partition deep1 fpfree,true)
1478                   end
1479             | NONE => if ekfuns v then ((gpfree,[]),(fpfree,[]),flag)             | NONE => if ekfuns v then ((gpfree,[]),(fpfree,[]),flag)
1480                       else (partition deep2 gpfree,partition deep2 fpfree,flag)                       else (partition deep2 gpfree,partition deep2 fpfree,flag)
1481
# Line 2022  Line 2033
2033             val ne = close(e,augValue(w,t,env),sn,csg,csf,ret)             val ne = close(e,augValue(w,t,env),sn,csg,csf,ret)
2035         end         end
2036      | RCC(p,args,w,t,e) =>      | RCC(k,l,p,args,wtl,e) =>