Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/branches/primop-branch-2/src/compiler/FLINT/trans/translate.sml
ViewVC logotype

Diff of /sml/branches/primop-branch-2/src/compiler/FLINT/trans/translate.sml

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

revision 1948, Tue Jun 27 22:08:49 2006 UTC revision 1961, Fri Jul 7 21:06:11 2006 UTC
# Line 835  Line 835 
835   *   val mkBnd : DI.depth -> B.binding -> L.lexp                           *   *   val mkBnd : DI.depth -> B.binding -> L.lexp                           *
836   *                                                                         *   *                                                                         *
837   ***************************************************************************)   ***************************************************************************)
838  fun mkVar (v as V.VALvar{access, info, typ, path}, d) =  fun mkVar (v as V.VALvar{access, prim, typ, path}, d) =
839        mkAccInfo(access, info, fn () => toLty d (!typ), getNameOp path)        mkAccInfo(access, prim, fn () => toLty d (!typ), getNameOp path)
840    | mkVar _ = bug "unexpected vars in mkVar"    | mkVar _ = bug "unexpected vars in mkVar"
841    
842  fun mkVE (v, ts, d) = let  fun mkVE (v, ts, d) = let
# Line 846  Line 846 
846            | _ => TAPP(mkVar(v, d), map (toTyc d) ts)            | _ => TAPP(mkVar(v, d), map (toTyc d) ts)
847  in  in
848      case v of      case v of
849          V.VALvar { info, ... } =>          V.VALvar { prim, ... } =>
850          II.match info          case prim
851             { inl_prim = fn (p, typ) =>           of PrimOpId.Prim p =>
852               (case (p, ts) of              let val ts = (* compute intrinsic instantiation params *) []
853                    (PO.POLYEQL, [t]) => eqGen(typ, t, toTcLt d)              in (case (p, ts)
854                    of (PO.POLYEQL, [t]) => eqGen(typ, t, toTcLt d)
855                  | (PO.POLYNEQ, [t]) =>                  | (PO.POLYNEQ, [t]) =>
856                    composeNOT(eqGen(typ, t, toTcLt d), toLty d t)                    composeNOT(eqGen(typ, t, toTcLt d), toLty d t)
857                  | (PO.INLMKARRAY, [t]) =>                  | (PO.INLMKARRAY, [t]) =>
# Line 865  Line 866 
866                                handle CProto.BadEncoding => NONE                                handle CProto.BadEncoding => NONE
867                    in PRIM (PO.RAW_CCALL i, toLty d typ, map (toTyc d) ts)                    in PRIM (PO.RAW_CCALL i, toLty d typ, map (toTyc d) ts)
868                    end                    end
869                  | _ => transPrim(p, (toLty d typ), map (toTyc d) ts)),                  | _ => transPrim(p, (toLty d typ), map (toTyc d) ts))
870               inl_str = fn _ => otherwise (),              end
871               inl_no = fn () => otherwise () }            |  PrimOpId.NonPrim => otherwise ()
872        | _ => otherwise ()        | _ => otherwise ()
873  end  end
874    

Legend:
Removed from v.1948  
changed lines
  Added in v.1961

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