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

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/mid-to-low/ein-to-low.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/mid-to-low/ein-to-low.sml

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

revision 3627, Sun Jan 31 14:15:41 2016 UTC revision 3628, Sun Jan 31 14:30:06 2016 UTC
# Line 61  Line 61 
61      * is n anywhere else?      * is n anywhere else?
62      *)      *)
63      fun matchFindLast (alpha, n) = let      fun matchFindLast (alpha, n) = let
64          val es = List.tl(List.rev(alpha))            fun find es = List.find (fn (E.V idx') => (n = idx') | _ => false) es
         val f = List.find(fn E.V e => e = n | _ => false) es  
65          in          in
66              (matchLast(alpha, n), f)              case List.rev alpha
67                 of (E.V v)::es => if (n = v)
68                      then (SOME(List.rev es), find es)
69                      else (NONE, find es)
70                  | _::es => (NONE, find es)
71                  | [] => (NONE, NONE)
72                (* end case *)
73          end          end
74    
75      (*runGeneralCase:Var*E.EIN*Var-> Var*LowIL.ASSN list      (*runGeneralCase:Var*E.EIN*Var-> Var*LowIL.ASSN list
# Line 74  Line 79 
79      fun runGeneralCase (e:Ein.ein, args:LowIL.var list) = let      fun runGeneralCase (e:Ein.ein, args:LowIL.var list) = let
80          val index = Ein.index e          val index = Ein.index e
81          in          in
82              iter(AvailRHS.new(), index, index, EtoSca.generalfn, (e, args))              iter (AvailRHS.new(), index, index, EtoSca.generalfn, e, args)
83          end          end
84    
85      fun createP((E.EIN{params ,...}, args), vecIndex, id, ix) =      fun createP((E.EIN{params ,...}, args), vecIndex, id, ix) =

Legend:
Removed from v.3627  
changed lines
  Added in v.3628

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