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

SCM Repository

[diderot] Diff of /branches/femprime/src/compiler/high-opt/normalize.sml
ViewVC logotype

Diff of /branches/femprime/src/compiler/high-opt/normalize.sml

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

revision 4816, Mon Oct 31 18:49:44 2016 UTC revision 4821, Tue Nov 1 22:10:00 2016 UTC
# Line 83  Line 83 
83            case List.nth(params, place)            case List.nth(params, place)
84             of Ein.TEN(false, _) => (             of Ein.TEN(false, _) => (
85                  (changed, orig, place+1, done@[arg]))                  (changed, orig, place+1, done@[arg]))
86                | _ => (case Apply.apply (orig, place, newEinOp)
87                     of SOME einOp => ( (* einOp is the result of the beta-reduction *)
88                          (* decUse arg; *) List.app incUse newArgs;
89                          (true, einOp, place + length newArgs, done @ newArgs))
90                      | NONE => ( (* arg was unused in orig, so we can get rid of it *)
91                          decUse arg;
92                          (true, orig, place, done))
93                    (* end case *))
94    (*
95              | _ => let              | _ => let
96                  val rtnArgs = done @ newArgs                  val rtnArgs = done @ newArgs
97                  val (c, subst) = Apply.apply(orig, place, newEinOp)                  val (c, subst) = Apply.apply(orig, place, newEinOp)
# Line 91  Line 100 
100                    if c then () else  (decUse arg);                    if c then () else  (decUse arg);
101                    (true, subst, place + length newArgs, rtnArgs)                    (true, subst, place + length newArgs, rtnArgs)
102                  end                  end
103    *)
104            (* end case *))            (* end case *))
105    
106  (* FIXME: it would be much more efficient to do all of the substitutions in one go,  (* FIXME: it would be much more efficient to do all of the substitutions in one go,

Legend:
Removed from v.4816  
changed lines
  Added in v.4821

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