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-to-mid/split.sml
ViewVC logotype

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

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

revision 3373, Thu Nov 5 19:01:17 2015 UTC revision 3374, Thu Nov 5 21:05:53 2015 UTC
# Line 113  Line 113 
113          | E.Krn _     => err("Krn used before expand")          | E.Krn _     => err("Krn used before expand")
114          | E.Value _   => err("Value used before expand")          | E.Value _   => err("Value used before expand")
115          | E.Img _     => err("Probe used before expand")          | E.Img _     => err("Probe used before expand")
116    |  Ein.PowEmb(e1,sx1,n1) =>1
117          | _           => 2          | _           => 2
118      (*end case*))      (*end case*))
119    
# Line 300  Line 301 
301              (einapp,code,fieldset)              (einapp,code,fieldset)
302          end          end
303    
304    fun handlePowEmb(y,e1,sx1,n1,params,index,args,fieldset,flag)=let
305    val (e1',params',args',code,fieldset)=  rewriteOp("mag",e1,params,index,sx1,args,fieldset,flag)
306    val body= E.Sum(sx1,E.Prod[e1',e1'])
307    val einapp= rewriteOrig(y,body,params',index,sx1,args')
308    val _=print(String.concat["\nhandlePowEmb:",P.printbody(E.PowEmb(e1,sx1,n1)),"\n=>",
309    P.printbody(body)])
310    in
311    (einapp,code,fieldset)
312    end
313    
314    
315      (* split:var*ein_app-> (var*einap)*code      (* split:var*ein_app-> (var*einap)*code
316      * split ein expression into smaller pieces      * split ein expression into smaller pieces
317        note we leave summation around probe exp        note we leave summation around probe exp
# Line 352  Line 364 
364              | E.Krn _                 => err("Krn used before expand")              | E.Krn _                 => err("Krn used before expand")
365              | E.Value _               => err("Value used before expand")              | E.Value _               => err("Value used before expand")
366              | E.Img _                 => err("Probe used before expand")              | E.Img _                 => err("Probe used before expand")
367    | Ein.PowEmb(e1,sx1,n1) =>handlePowEmb(y,e1,sx1,n1,params,index,args,fieldset,flag)
368    
369              (*end case *))              (*end case *))
370          val (einapp2,newbies,fieldset) =rewrite body          val (einapp2,newbies,fieldset) =rewrite body
371          in          in

Legend:
Removed from v.3373  
changed lines
  Added in v.3374

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