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 3994, Sat Jun 18 18:41:33 2016 UTC revision 3995, Sat Jun 18 20:00:19 2016 UTC
# Line 144  Line 144 
144    
145      fun transform (prog as S.Program{funcs=[], ...}) = prog      fun transform (prog as S.Program{funcs=[], ...}) = prog
146        | transform prog = let        | transform prog = let
147            val S.Program{props, consts, inputs, constInit, globals, funcs, init, strand, create, update} = prog            val S.Program{
148                      props, consts, inputs, constInit, globals, funcs,
149                      globInit, strand, create, init, update
150                    } = prog
151          (* a table that maps function names to their definitions *)          (* a table that maps function names to their definitions *)
152            val funcTbl = V.Tbl.mkTable (List.length funcs, Fail "funcTbl")            val funcTbl = V.Tbl.mkTable (List.length funcs, Fail "funcTbl")
153          (* first we inline expand the function bodies in definition order *)          (* first we inline expand the function bodies in definition order *)
# Line 157  Line 160 
160                  inputs = inputs,                  inputs = inputs,
161                  constInit = constInit,                  constInit = constInit,
162                  globals = globals,                  globals = globals,
163                  init = expandBlock init,                  globInit = expandBlock globInit,
164                  funcs = [],                  funcs = [],
165                  strand = expandStrand funcTbl strand,                  strand = expandStrand funcTbl strand,
166                  create = (case create                  create = (case create
167                     of S.Create{dim, code} => S.Create{dim = dim, code = expandBlock code}                     of S.Create{dim, code} => S.Create{dim = dim, code = expandBlock code}
168                    (* end case *)),                    (* end case *)),
169                    init = Option.map expandBlock init,
170                  update = Option.map expandBlock update                  update = Option.map expandBlock update
171                }                }
172            end            end

Legend:
Removed from v.3994  
changed lines
  Added in v.3995

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