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

SCM Repository

[diderot] Diff of /branches/charisee/src/compiler/mid-to-low/step2.sml
ViewVC logotype

Diff of /branches/charisee/src/compiler/mid-to-low/step2.sml

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

revision 2612, Wed May 7 02:58:55 2014 UTC revision 2613, Wed May 7 04:35:38 2014 UTC
# Line 127  Line 127 
127  (* general expressions-removes zeros*)  (* general expressions-removes zeros*)
128  fun generalfn(dict,(body,origargs,info))=let  fun generalfn(dict,(body,origargs,info))=let
129      val mapp=ref dict      val mapp=ref dict
130      (*val _=printMapp(!mapp)*)  
     val _=print "in General FUNCTIOn"  
131    
132    
133      fun gen body=let      fun gen body=let
# Line 153  Line 152 
152              end              end
153    
154          fun Sumcheck(sumx,e)=let          fun Sumcheck(sumx,e)=let
             val _=print "\n Found Sum"  
155              fun sumloop mapsum=let              fun sumloop mapsum=let
156                  val _ = mapp:=mapsum                  val _ = mapp:=mapsum
157                  val(vA,A)=gen e                  val(vA,A)=gen e
# Line 197  Line 195 
195          | E.Const c             => mkInt c          | E.Const c             => mkInt c
196          | E.Epsilon(i,j,k)      => S3.evalEps(!mapp,i,j,k)          | E.Epsilon(i,j,k)      => S3.evalEps(!mapp,i,j,k)
197          | E.Delta(i,j)          => S3.evalDelta2(!mapp,i,j)          | E.Delta(i,j)          => S3.evalDelta2(!mapp,i,j)
198          | E.Tensor(id,ix)       => (print("\n Tensor: "^Int.toString(id));          | E.Tensor(id,ix)       => S3.mkSca(!mapp,(id,ix,info))
             S3.mkSca(!mapp,(id,ix,info)))  
199          | E.Neg e               => NegCheckO(gen e)          | E.Neg e               => NegCheckO(gen e)
200          | E.Sub (e1,e2)         => SubcheckO(gen e1,gen e2)          | E.Sub (e1,e2)         => SubcheckO(gen e1,gen e2)
201          | E.Div(e1,e2)          => let          | E.Div(e1,e2)          => let
# Line 211  Line 208 
208                      in (vD, A@B@D) end                      in (vD, A@B@D) end
209                  (*end case*))                  (*end case*))
210              end              end
211          | E.Add e               => (print "\n in Add";iterList(AddcheckO(e,[],[]),DstOp.addSca))          | E.Add e               => (iterList(AddcheckO(e,[],[]),DstOp.addSca))
212          | E.Prod e              => iterList(ProdcheckO(e,[],[]),DstOp.prodSca)          | E.Prod e              => iterList(ProdcheckO(e,[],[]),DstOp.prodSca)
213          | E.Sum(sx,E.Prod(E.Img (Vid,_,_)::E.Krn(Hid,del,pos)::es))=>let          | E.Sum(sx,E.Prod(E.Img (Vid,_,_)::E.Krn(Hid,del,pos)::es))=>let
214              val harg=List.nth(origargs,Hid)              val harg=List.nth(origargs,Hid)

Legend:
Removed from v.2612  
changed lines
  Added in v.2613

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