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

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/high-opt/eps-util.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/high-opt/eps-util.sml

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

revision 3978, Wed Jun 15 19:07:40 2016 UTC revision 3979, Wed Jun 15 19:24:44 2016 UTC
# Line 121  Line 121 
121      *  distribute deltas of ein_exp list      *  distribute deltas of ein_exp list
122      *)      *)
123      fun reduceDelta (eps, dels, es)=let      fun reduceDelta (eps, dels, es)=let
124            fun appDel (changed, [], beta, mu, nu) = (changed, beta, mu@nu)            fun appDel (changed, [], beta, mu, nu) = (changed, List.rev beta, mu@(List.rev nu))
125              | appDel (changed, a::alpha, beta, [], nu) = appDel(changed, alpha, beta@[a], nu, [])              | appDel (changed, a::alpha, beta, [], nu) = appDel(changed, alpha, a::beta, List.rev nu, [])
126              | appDel (changed, a::alpha, beta, E.Delta(i, j)::mu, nu) =              | appDel (changed, a::alpha, beta, E.Delta(i, j)::mu, nu) =
127                  if (a = E.V j)                  if (a = E.V j)
128                    then appDel(true, alpha, beta@[E.V i], mu, nu)                    then appDel(true, alpha, (E.V i)::beta, mu, nu)
129                    else appDel(changed, a::alpha, beta, mu, nu@[E.Delta(i, j)])                   else appDel(changed, a::alpha, beta, mu, (E.Delta(i, j))::nu)
130          (* *)  
131  (* FIXME: instead of appending singletons, build results in reverse order! *)  (* FIXME: instead of appending singletons, build results in reverse order! *)
132            fun distribute (changed, [], rest, mu) = (changed, E.Opn(E.Prod, eps@mu@rest))            fun distribute (changed, [], rest, mu) = (changed, E.Opn(E.Prod, eps@mu@rest))
133              | distribute (changed, p1::ps, rest, mu) = (case p1              | distribute (changed, p1::ps, rest, mu) = (case p1

Legend:
Removed from v.3978  
changed lines
  Added in v.3979

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