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

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/simplify/inliner.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/simplify/inliner.sml

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

revision 3502, Thu Dec 17 23:13:35 2015 UTC revision 3510, Fri Dec 18 16:37:24 2015 UTC
# Line 93  Line 93 
93            fun expandBlk (S.Block{props, code}) =            fun expandBlk (S.Block{props, code}) =
94                  S.Block{props = props, code = List.foldr expandStm [] code}                  S.Block{props = props, code = List.foldr expandStm [] code}
95            and expandStm (stm, stms') = (case stm            and expandStm (stm, stms') = (case stm
96                   of S.S_Assign(x, S.E_Apply(f, xs, _)) => (case findFunc f                   of S.S_Var(x, SOME(S.E_Apply(f, xs, _))) => (case findFunc f
97                           of NONE => stm :: stms'
98                            | SOME func => let
99                                val S.Block{code, ...} = beta(x, func, xs)
100                                in
101                                  code @ stms'
102                                end
103                          (* end case *))
104                      | S.S_Assign(x, S.E_Apply(f, xs, _)) => (case findFunc f
105                         of NONE => stm :: stms'                         of NONE => stm :: stms'
106                          | SOME func => let                          | SOME func => let
107                              val S.Block{code, ...} = beta(x, func, xs)                              val S.Block{code, ...} = beta(x, func, xs)
# Line 103  Line 111 
111                        (* end case *))                        (* end case *))
112                    | S.S_IfThenElse(x, b1, b2) =>                    | S.S_IfThenElse(x, b1, b2) =>
113                        S.S_IfThenElse(x, expandBlk b1, expandBlk b2) :: stms'                        S.S_IfThenElse(x, expandBlk b1, expandBlk b2) :: stms'
114                      | S.S_Foreach(x, xs, blk) =>
115                          S.S_Foreach(x, xs, expandBlk blk) :: stms'
116                    | _ => stm :: stms'                    | _ => stm :: stms'
117                  (* end case *))                  (* end case *))
118            in            in

Legend:
Removed from v.3502  
changed lines
  Added in v.3510

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