Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/trunk/src/compiler/FLINT/opt/fcontract.sml
ViewVC logotype

Diff of /sml/trunk/src/compiler/FLINT/opt/fcontract.sml

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

revision 505, Thu Dec 9 08:24:08 1999 UTC revision 506, Fri Dec 10 00:15:35 1999 UTC
# Line 179  Line 179 
179  struct  struct
180  local  local
181      structure F  = FLINT      structure F  = FLINT
182      structure M  = IntRedBlackMap      structure M  = FLINTIntMap
183      structure S  = IntRedBlackSet      structure S  = IntRedBlackSet
     structure S1 = Intset  
184      structure C  = Collect      structure C  = Collect
185      structure O  = Option      structure O  = Option
186      structure DI = DebIndex      structure DI = DebIndex
# Line 537  Line 536 
536                                       then map (fn _ => []) args                                       then map (fn _ => []) args
537                                       else OU.transpose(!actuals)                                       else OU.transpose(!actuals)
538                         val nm = ListPair.foldl merge_actuals m (args, actuals)                         val nm = ListPair.foldl merge_actuals m (args, actuals)
539                         (* contract the body and create the resulting fundec *)                         (* contract the body and create the resulting fundec.
540                         val nbody = fcexp (S.add'(f, ifs)) nm body #2                          * Temporarily remove f's definition from the
541                            * environment while we're rebuilding it to avoid
542                            * nasty problems. *)
543                           val nbody = fcexp (S.add(ifs, f))
544                                             (addbind(nm, f, Var(f, NONE)))
545                                             body #2
546                         (* if inlining took place, the body might be completely                         (* if inlining took place, the body might be completely
547                          * changed (read: bigger), so we have to reset the                          * changed (read: bigger), so we have to reset the
548                          * `inline' bit *)                          * `inline' bit *)
# Line 737  Line 741 
741                         (*  say("copyinline "^(C.LVarString g)^"\n"); *)                         (*  say("copyinline "^(C.LVarString g)^"\n"); *)
742                         (app (unuseval m) vs);                         (app (unuseval m) vs);
743                         unusecall m g;                         unusecall m g;
744                         fcexp (S.add'(g, ifs)) m nle cont                         fcexp (S.add(ifs, g)) m nle cont
745                     end                     end
746    
747             in if C.usenb gi = 1 andalso not(S.member(ifs, g)) then simpleinline()             in if C.usenb gi = 1 andalso not(S.member(ifs, g)) then simpleinline()

Legend:
Removed from v.505  
changed lines
  Added in v.506

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