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

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/high-to-mid/float-ein.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/high-to-mid/float-ein.sml

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

revision 3576, Tue Jan 12 17:45:05 2016 UTC revision 3582, Wed Jan 13 22:14:05 2016 UTC
# Line 8  Line 8 
8    
9  structure FloatEin : sig  structure FloatEin : sig
10    
11      val transform : MidIR.var * Ein.ein * MidIR.var list -> MidIR.assignment list      val transform : MidIR.var * Ein.ein * MidIR.var list -> MidIR.assign list
12    
13    end = struct    end = struct
14    
# Line 75  Line 75 
75           (* end case *))           (* end case *))
76    
77      fun transform (y, ein as Ein.EIN{body=E.Probe _, ...}, args) =      fun transform (y, ein as Ein.EIN{body=E.Probe _, ...}, args) =
78            [IR.ASSGN(y, IR.EINAPP(ein, args))]            [(y, IR.EINAPP(ein, args))]
79        | transform (y, ein as Ein.EIN{body=E.Sum(_, E.Probe _), ...}, args) =        | transform (y, ein as Ein.EIN{body=E.Sum(_, E.Probe _), ...}, args) =
80            [IR.ASSGN(y, IR.EINAPP(ein, args))]            [(y, IR.EINAPP(ein, args))]
81        | transform (y, Ein.EIN{params, index, body}, args) = let        | transform (y, Ein.EIN{params, index, body}, args) = let
82            val avail = AvailRHS.new()            val avail = AvailRHS.new()
83            fun filterOps (es, params, args, index, sx) = let            fun filterOps (es, params, args, index, sx) = let
# Line 139  Line 139 
139            val (body', params', args') = rewrite ([], body, params, args)            val (body', params', args') = rewrite ([], body, params, args)
140            val einapp = CleanParams.clean (body', params', index, args')            val einapp = CleanParams.clean (body', params', index, args')
141            in            in
142              List.rev (IR.ASSGN(y, einapp) :: AvailRHS.getAssignments avail)              List.rev ((y, einapp) :: AvailRHS.getAssignments avail)
143            end            end
144    
145    end    end

Legend:
Removed from v.3576  
changed lines
  Added in v.3582

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