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

SCM Repository

[diderot] Diff of /branches/charisee/src/compiler/high-to-mid/split-einHtM.sml
ViewVC logotype

Diff of /branches/charisee/src/compiler/high-to-mid/split-einHtM.sml

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

revision 2583, Thu Apr 10 19:50:28 2014 UTC revision 2584, Tue Apr 15 03:22:58 2014 UTC
# Line 85  Line 85 
85    
86  (*Outside Operator is Add*)  (*Outside Operator is Add*)
87  fun handleAdd(params, index,list1,args)=let  fun handleAdd(params, index,list1,args)=let
88      val aa=print "ADDXX"  
89      val id=ref (length params)      val id=ref (length params)
90      val n=length index      val n=length index
91      val ix=List.tabulate (n,fn v=> E.V(v))      val ix=List.tabulate (n,fn v=> E.V(v))
# Line 227  Line 227 
227          (z,(p',b',args'))          (z,(p',b',args'))
228      end      end
229    
230    
231    (* need to figure this out*)
232  fun handleSumProd(paramsO, indO,sxO,list1O,argsO)=let  fun handleSumProd(paramsO, indO,sxO,list1O,argsO)=let
233      val id=ref (length paramsO)      val id=ref (length paramsO)
234      val n=length indO      val n=length indO
# Line 256  Line 258 
258    
259    
260  fun genfn(id,Ein.EIN{params, index, body},args)= let  fun genfn(id,Ein.EIN{params, index, body},args)= let
261      val mm=print(P.printbody(body))  
262      val notDone=([],(params,body,args))      val notDone=([],(params,body,args))
263    
264      fun gen body=(case body      fun gen body=(case body
# Line 283  Line 285 
285          | E.Div(e1,e2)=>handleDiv(params, index,e1,e2,args)          | E.Div(e1,e2)=>handleDiv(params, index,e1,e2,args)
286          | E.Prod e=> (handleProd(params, index,e,args))          | E.Prod e=> (handleProd(params, index,e,args))
287          | E.Sum(_,E.Prod(E.Img _ :: _ ))=>notDone          | E.Sum(_,E.Prod(E.Img _ :: _ ))=>notDone
288          | E.Sum(sx,E.Prod e)=>(handleSumProd(params, index,sx,e,args))        (*  | E.Sum(sx,E.Prod e)=>(handleSumProd(params, index,sx,e,args))*)
289          | _=> notDone          | _=> notDone
290      (*end case*))      (*end case*))
291    
# Line 311  Line 313 
313      end      end
314    
315  fun splitein(id,E.EIN{params,index,body},arg)=let  fun splitein(id,E.EIN{params,index,body},arg)=let
316      val m=print(printA(id,E.EIN{params=params,index=index,body=body},arg))      val _=print(String.concat["\n Pre Shift \n", printA(id,E.EIN{params=params,index=index,body=body},arg)])
317      val g=print "\n \t changed to =>\n \t"  
318      val (p',i',b',args')=shiftHtM.clean(params, index, body, arg)      val (p',i',b',args')=shiftHtM.clean(params, index, body, arg)
319      val einn'=createEin(p',i', b')      val einn'=createEin(p',i', b')
320      val m=print(printA(id,einn',args'))      val _ =print(String.concat[ "\n Post shift-\n ",printA(id,einn',args'),"\n \n"])
321    
322      in      in
323          splitIt(0,(id,einn',args'))          splitIt(0,(id,einn',args'))

Legend:
Removed from v.2583  
changed lines
  Added in v.2584

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