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/compiler/FLINT/clos/freemap.sml
ViewVC logotype

Diff of /sml/trunk/src/compiler/FLINT/clos/freemap.sml

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

revision 732, Mon Nov 13 21:59:12 2000 UTC revision 733, Fri Nov 17 05:13:45 2000 UTC
# Line 123  Line 123 
123   *)   *)
124  fun freemapClose ce =  fun freemapClose ce =
125  let exception Freemap  let exception Freemap
126      val vars : lvar list Intmap.intmap = Intmap.new(32, Freemap)      val vars : lvar list IntHashTable.hash_table =
127            IntHashTable.mkTable(32, Freemap)
128      val escapes = Intset.new()      val escapes = Intset.new()
129      val escapesP = Intset.mem escapes      val escapesP = Intset.mem escapes
130      fun escapesM(VAR v) = Intset.add escapes v      fun escapesM(VAR v) = Intset.add escapes v
# Line 138  Line 139 
139                      val freel =                      val freel =
140                          foldr (fn ((_,v,args,_,body),freel) =>                          foldr (fn ((_,v,args,_,body),freel) =>
141                                 (let val l = remove(uniq args,freevars body)                                 (let val l = remove(uniq args,freevars body)
142                                  in  Intmap.add vars (v,l);                                  in  IntHashTable.insert vars (v,l);
143                                      l::freel                                      l::freel
144                                  end))                                  end))
145                                [] l                                [] l
# Line 164  Line 165 
165                    (app escapesM vl;                    (app escapesM vl;
166                     merge(clean vl,merge(freevars e1, freevars e2)))                     merge(clean vl,merge(freevars e1, freevars e2)))
167  in  freevars ce;  in  freevars ce;
168      (Intmap.map vars, Intset.mem escapes, Intset.mem known)      (IntHashTable.lookup vars, Intset.mem escapes, Intset.mem known)
169  end  end
170    
171  (* temporary, for debugging  (* temporary, for debugging

Legend:
Removed from v.732  
changed lines
  Added in v.733

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