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

SCM Repository

[diderot] Diff of /branches/charisee/src/compiler/high-il/normalize-ein.sml
ViewVC logotype

Diff of /branches/charisee/src/compiler/high-il/normalize-ein.sml

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

revision 2507, Mon Nov 11 20:03:02 2013 UTC revision 2508, Tue Nov 12 17:14:33 2013 UTC
# Line 342  Line 342 
342                | E.Neg e => E.Neg(rewriteBody e)                | E.Neg e => E.Neg(rewriteBody e)
343                | E.Add es => let val (change,body')= mkAdd(List.map rewriteBody es)                | E.Add es => let val (change,body')= mkAdd(List.map rewriteBody es)
344                     in if (change=1) then ( changed:=true;body') else body' end                     in if (change=1) then ( changed:=true;body') else body' end
345                    | E.Sub(a, E.Field f)=> (changed:=true;E.Add[a, E.Neg(E.Field(f))])
346                  (*| E.Sub(a,E.Sub(b,c))=> (changed:=true;E.Add[E.Sub(a,b),c])*)
347                | E.Sub (a,b)=>  E.Sub(rewriteBody a, rewriteBody b)                | E.Sub (a,b)=>  E.Sub(rewriteBody a, rewriteBody b)
348                | E.Div (a, b) => E.Div(rewriteBody a, rewriteBody b)                | E.Div (a, b) => E.Div(rewriteBody a, rewriteBody b)
349                | E.Partial _=>body                | E.Partial _=>body
# Line 552  Line 554 
554              end              end
555    
556      val (b,count) = loop(body,0)      val (b,count) = loop(body,0)
557      val j=(print "Final Counter:";print(Int.toString(count));print"\n")      (*val j=(print "Final Counter:";print(Int.toString(count));print"\n")*)
558      in      in
559                  (Ein.EIN{params=params, index=index, body=b},count)                  (Ein.EIN{params=params, index=index, body=b},count)
560      end      end

Legend:
Removed from v.2507  
changed lines
  Added in v.2508

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