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

SCM Repository

[diderot] Diff of /branches/pure-cfg/src/compiler/c-target/c-target.sml
ViewVC logotype

Diff of /branches/pure-cfg/src/compiler/c-target/c-target.sml

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

revision 695, Fri Mar 25 17:52:54 2011 UTC revision 705, Tue Mar 29 20:19:31 2011 UTC
# Line 250  Line 250 
250            | select (_, x) = invalid("select", [x])            | select (_, x) = invalid("select", [x])
251          end (* local *)          end (* local *)
252    
253            fun subscript (E(e1, ty), E(e2, T_Int)) = let
254                  val (n, tyCode, elemTy) = (case ty
255                         of T_Vec n => (n, !RN.gRealSuffix, T_Real)
256                          | T_IVec n => (n, !RN.gIntSuffix, T_Int)
257                        (* end case *))
258                  val unionTy = CL.T_Named(concat["union", Int.toString n, tyCode, "_t"])
259                  in
260                    E(CL.mkSubscript(e1, e2), elemTy)
261                  end
262    
263        (* vector (and scalar) arithmetic *)        (* vector (and scalar) arithmetic *)
264          local          local
265            fun checkTys (ty1, ty2) = (ty1 = ty2) andalso numTy ty1            fun checkTys (ty1, ty2) = (ty1 = ty2) andalso numTy ty1

Legend:
Removed from v.695  
changed lines
  Added in v.705

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