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/cps/switch.sml
ViewVC logotype

Diff of /sml/trunk/src/compiler/FLINT/cps/switch.sml

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

revision 245, Sat Apr 17 18:47:12 1999 UTC revision 411, Fri Sep 3 00:25:03 1999 UTC
# Line 149  Line 149 
149     in g (List.length chunks, chunks, (lo, hi))     in g (List.length chunks, chunks, (lo, hi))
150    end    end
151    
152  val sortcases = Sort.sort (fn ((i:int,_),(j,_)) => i>j)  val sortcases = ListMergeSort.sort (fn ((i:int,_),(j,_)) => i>j)
153    
154  fun int_switch(e: 'value, l, default, inrange) =  fun int_switch(e: 'value, l, default, inrange) =
155    let val len = List.length l    let val len = List.length l
# Line 236  Line 236 
236     end     end
237    
238   fun coalesce(l:(string * 'a)list) : (int * (string * 'a) list) list = let   fun coalesce(l:(string * 'a)list) : (int * (string * 'a) list) list = let
239       val l' as (s,_)::_ = Sort.sort (fn ((s1,_),(s2,_)) => size s1 > size s2) l       val l' as (s,_)::_ =
240           ListMergeSort.sort (fn ((s1,_),(s2,_)) => size s1 > size s2) l
241       fun gather(n,[],current,acc) = (n,current)::acc       fun gather(n,[],current,acc) = (n,current)::acc
242         | gather(n,(x as (s,a))::rest,current,acc) = let val s1 = size s         | gather(n,(x as (s,a))::rest,current,acc) = let val s1 = size s
243           in           in
# Line 313  Line 314 
314  end (* structure Switch *)  end (* structure Switch *)
315    
316  (*  (*
317   * $Log$   * $Log: switch.sml,v $
318     * Revision 1.1.1.1  1998/04/08 18:39:47  george
319     * Version 110.5
320     *
321   *)   *)

Legend:
Removed from v.245  
changed lines
  Added in v.411

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