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

SCM Repository

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

Diff of /branches/ein16/src/compiler/high-il/app-ein.sml

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

revision 3997, Sun Jun 19 15:55:49 2016 UTC revision 3998, Sun Jun 19 17:12:03 2016 UTC
# Line 113  Line 113 
113      (*Looks for params id that match substitution*)      (*Looks for params id that match substitution*)
114      fun app(E.EIN{params, index, body},place,e2,newArgs,done)=let      fun app(E.EIN{params, index, body},place,e2,newArgs,done)=let
115          val e1=E.EIN{params=params, index=index, body=body}          val e1=E.EIN{params=params, index=index, body=body}
116    (*
117    val _ = print("\n\n**original: "^P.printerE(e1))
118    val _ = print("\n\n**replacing at: "^Int.toString(place)^"-"^P.printerE (e2))
119    *)
120          val changed = ref 0          val changed = ref 0
121          val params2=E.params e2          val params2=E.params e2
122          val index2=E.index e2          val index2=E.index e2
# Line 126  Line 130 
130              in              in
131              if(id=place) then              if(id=place) then
132                  if(length(mx)=length(index2)) then                  if(length(mx)=length(index2)) then
133                      (changed:=1; rewriteSubst(body2,substId,mx,paramShift,x,newArgs,done))                      (changed:=1;
134    rewriteSubst(body2,substId,mx,paramShift,x,newArgs,done))
135                  else ( raise Fail(err mx);E.B(E.Const 0))                  else ( raise Fail(err mx);E.B(E.Const 0))
136              else (case e              else (case e
137                  of E.Tensor(id,mx) => E.Tensor(mapId(id,origId,0), mx)                  of E.Tensor(id,mx) => E.Tensor(mapId(id,origId,0), mx)

Legend:
Removed from v.3997  
changed lines
  Added in v.3998

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