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

SCM Repository

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

Diff of /branches/ein16/src/compiler/high-to-mid/high-to-mid.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 229  Line 229 
229                | SrcOp.Normalize ty => assign (DstOp.Normalize(arity ty))                | SrcOp.Normalize ty => assign (DstOp.Normalize(arity ty))
230                | SrcOp.PrincipleEvec ty => assign (DstOp.PrincipleEvec(cvtTy ty))                | SrcOp.PrincipleEvec ty => assign (DstOp.PrincipleEvec(cvtTy ty))
231                | SrcOp.Zero ty => assign (DstOp.Zero(cvtTy ty))                | SrcOp.Zero ty => assign (DstOp.Zero(cvtTy ty))
 (*              Moved to translate*)  
               | SrcOp.Slice(SrcTy.TensorTy argTy, mask) => let  
   
                   fun iterArgs []=[]  
                     | iterArgs(e1::es)=let  
                           val SrcIL.LIT(Literal.Int i)=getRHS e1  
                           in [IntInf.toInt i]@iterArgs es end  
                   val const = iterArgs (List.drop(args,1))  
                   val DstTy.TensorTy rstTy = DstIL.Var.ty y  
                   val rator = Mk.slice (argTy,mask,const,rstTy)  
                   val a = Env.renameList(env, args)  
                   in  
                     [(y,DstIL.EINAPP(rator,a))]  
                   end  
232                | SrcOp.TensorSub(ty as SrcTy.TensorTy _) => assign (DstOp.Subscript(cvtTy ty))                | SrcOp.TensorSub(ty as SrcTy.TensorTy _) => assign (DstOp.Subscript(cvtTy ty))
233                | SrcOp.Select(ty as SrcTy.TupleTy _, i) => assign (DstOp.Select(cvtTy ty, i))                | SrcOp.Select(ty as SrcTy.TupleTy _, i) => assign (DstOp.Select(cvtTy ty, i))
234                | SrcOp.Select(ty as SrcTy.SeqTy _, i) => assign (DstOp.Index(cvtTy ty, i))                | SrcOp.Select(ty as SrcTy.SeqTy _, i) => assign (DstOp.Index(cvtTy ty, i))

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