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

SCM Repository

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

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

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

revision 2517, Thu Dec 12 20:35:28 2013 UTC revision 2521, Thu Jan 9 02:17:07 2014 UTC
# Line 290  Line 290 
290                | E.Value _ =>body                | E.Value _ =>body
291                | E.Epsilon _=>body                | E.Epsilon _=>body
292                | E.Conv _=>body                | E.Conv _=>body
293    
294                  | E.Neg(E.Neg e)=> rewriteBody e
295                | E.Neg e => E.Neg(rewriteBody e)                | E.Neg e => E.Neg(rewriteBody e)
296                | E.Add es => let val (change,body')= mkAdd(List.map rewriteBody es)                | E.Add es => let val (change,body')= mkAdd(List.map rewriteBody es)
297                     in if (change=1) then ( changed:=true;body') else body' end                     in if (change=1) then ( changed:=true;body') else body' end
298                | E.Sub(a, E.Field f)=> (changed:=true;E.Add[a, E.Neg(E.Field(f))])                | E.Sub(a, E.Field f)=> (changed:=true;E.Add[a, E.Neg(E.Field(f))])
299                  | E.Sub(E.Sub(a,b),E.Sub(c,d))=> rewriteBody(E.Sub(E.Add[a,d],E.Add[b,c]))
300                  | E.Sub(E.Sub(a,b),e2)=>rewriteBody (E.Sub(a,E.Add[b,e2]))
301                  | E.Sub(e1,E.Sub(c,d))=>rewriteBody(E.Add([E.Sub(e1,c),d]))
302                | E.Sub (a,b)=>  E.Sub(rewriteBody a, rewriteBody b)                | E.Sub (a,b)=>  E.Sub(rewriteBody a, rewriteBody b)
303                  | E.Div(E.Div(a,b),E.Div(c,d))=> rewriteBody (E.Div(E.Prod[a,d],E.Prod[b,c]))
304                  | E.Div(E.Div(a,b),c)=> rewriteBody (E.Div(a, E.Prod[b,c]))
305                  | E.Div(a,E.Div(b,c))=>  rewriteBody (E.Div(E.Prod[a,c],b))
306                | E.Div (a, b) => E.Div(rewriteBody a, rewriteBody b)                | E.Div (a, b) => E.Div(rewriteBody a, rewriteBody b)
307                | E.Partial _=>body                | E.Partial _=>body
308                | E.Krn(tid,deltas,pos)=> E.Krn(tid,deltas, (rewriteBody pos))                | E.Krn(tid,deltas,pos)=> E.Krn(tid,deltas, (rewriteBody pos))

Legend:
Removed from v.2517  
changed lines
  Added in v.2521

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