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

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

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

revision 3720, Mon Apr 4 18:20:42 2016 UTC revision 3721, Mon Apr 4 19:38:34 2016 UTC
# Line 227  Line 227 
227                | SrcOp.Normalize ty => assign (DstOp.Normalize(arity ty))                | SrcOp.Normalize ty => assign (DstOp.Normalize(arity ty))
228                | SrcOp.PrincipleEvec ty => assign (DstOp.PrincipleEvec(cvtTy ty))                | SrcOp.PrincipleEvec ty => assign (DstOp.PrincipleEvec(cvtTy ty))
229                | SrcOp.Zero ty => assign (DstOp.Zero(cvtTy ty))                | SrcOp.Zero ty => assign (DstOp.Zero(cvtTy ty))
               | 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)  
                   (* ("aFIXME: Slice{\n\t"^String.concatWith"\n\t,"(List.map SrcIL.Var.toString args))*)  
                   val a = Env.renameList(env, args)  
                   in  
                     [(y,DstIL.EINAPP(rator,a))]  
                   end  
               | SrcOp.Slice(ty, mask) => raise Fail "FIXME: Slice"  
230                | SrcOp.TensorSub(ty as SrcTy.TensorTy _) => assign (DstOp.Subscript(cvtTy ty))                | SrcOp.TensorSub(ty as SrcTy.TensorTy _) => assign (DstOp.Subscript(cvtTy ty))
231                | 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))
232                | 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.3720  
changed lines
  Added in v.3721

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