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

SCM Repository

[diderot] Diff of /branches/vis12/src/compiler/translate/translate.sml
ViewVC logotype

Diff of /branches/vis12/src/compiler/translate/translate.sml

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

revision 1686, Mon Jan 23 18:49:17 2012 UTC revision 1687, Wed Jan 25 13:02:32 2012 UTC
# Line 187  Line 187 
187                  [IL.ASSGN(lhs, IL.OP(HighOps.Input(IL.Var.ty lhs, name, desc), []))]                  [IL.ASSGN(lhs, IL.OP(HighOps.Input(IL.Var.ty lhs, name, desc), []))]
188              | S.E_Input(_, name, desc, SOME dflt) =>              | S.E_Input(_, name, desc, SOME dflt) =>
189                  [IL.ASSGN(lhs, IL.OP(HighOps.InputWithDefault(IL.Var.ty lhs, name, desc), [lookup env dflt]))]                  [IL.ASSGN(lhs, IL.OP(HighOps.InputWithDefault(IL.Var.ty lhs, name, desc), [lookup env dflt]))]
190              | S.E_LoadImage(info, name) => [IL.ASSGN(lhs, IL.OP(HighOps.LoadImage info, [lookup env name]))]              | S.E_LoadImage(info, name) =>
191                    [IL.ASSGN(lhs, IL.OP(HighOps.LoadImage info, [lookup env name]))]
192                | S.E_Coerce{srcTy, dstTy, x} => (case (srcTy, dstTy)
193                     of (Ty.T_Int, Ty.T_Tensor _) =>
194                          [IL.ASSGN(lhs, IL.OP(HighOps.IntToReal, [lookup env x]))]
195                      | (Ty.T_Sequence(ty, Ty.DimConst n), Ty.T_DynSequence _) =>
196                          [IL.ASSGN(lhs, IL.OP(HighOps.MkDynamic(cvtTy ty, n), [lookup env x]))]
197                      | (Ty.T_Tensor _, Ty.T_Tensor _) =>
198                        (* change in continuity is a no-op *)
199                          [IL.ASSGN(lhs, IL.VAR(lookup env x))]
200                      | _ => raise Fail "unsupported type coercion"
201                    (* end case *))
202            (* end case *))            (* end case *))
203    
204    (* add nodes to save the strand state, followed by an exit node *)    (* add nodes to save the strand state, followed by an exit node *)

Legend:
Removed from v.1686  
changed lines
  Added in v.1687

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