Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/high-to-mid/clean-index.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/high-to-mid/clean-index.sml

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

revision 4444, Sun Aug 21 21:42:06 2016 UTC revision 4445, Mon Aug 22 13:59:18 2016 UTC
# Line 209  Line 209 
209          (* Creates an map for indices in tshape first. *)          (* Creates an map for indices in tshape first. *)
210            val (mapp, tocounter) = vxToMapp (IMap.empty, tshape, 0)            val (mapp, tocounter) = vxToMapp (IMap.empty, tshape, 0)
211          (* finds max element in ashape and creates list [0, 1, 2, ...., max] *)          (* finds max element in ashape and creates list [0, 1, 2, ...., max] *)
212  (* FIXME: with SML/NJ 110.80, we'll be able to use "maxItem" for this *)            val maxmu = ISet.maxItem ashape
           val maxmu = (case ISet.listItems ashape  
                  of [] => ~1  
                   | l => List.last l  
                 (* end case *))  
213          (* iff index e1 is in ashape add e1 the mapp E.V e1=> E.V cnt *)          (* iff index e1 is in ashape add e1 the mapp E.V e1=> E.V cnt *)
214            fun intToMapp (mapp, i, cnt) = if (i > maxmu)            fun intToMapp (mapp, i, cnt) = if (i > maxmu)
215                    then mapp                    then mapp

Legend:
Removed from v.4444  
changed lines
  Added in v.4445

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