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 1976, Thu Jul 13 20:20:48 2006 UTC revision 1979, Thu Jul 13 22:35:51 2006 UTC
# Line 849  Line 849 
849   * In the case of a primop variable, this function reconstructs the   * In the case of a primop variable, this function reconstructs the
850   * type parameters of instantiation of the intrinsic primop type relative   * type parameters of instantiation of the intrinsic primop type relative
851   * to the variable occurrence type *)   * to the variable occurrence type *)
852  fun mkVE (V.VALvar { typ, prim = PrimOpId.Prim p, ... }, ts, d) =  fun mkVE (e as V.VALvar { typ, prim = PrimOpId.Prim p, ... }, ts, d) =
853        let val occty = (* compute the occurrence type of the variable *)        let val occty = (* compute the occurrence type of the variable *)
854                case ts                case ts
855                  of [] => !typ                  of [] => !typ
# Line 862  Line 862 
862                (* compute intrinsic instantiation params of intrinsicType *)                (* compute intrinsic instantiation params of intrinsicType *)
863                case ((TU.matchInstTypes(occty,intrinsicType)) : (TP.tyvar list * TP.tyvar list) option )                case ((TU.matchInstTypes(occty,intrinsicType)) : (TP.tyvar list * TP.tyvar list) option )
864                  of SOME(_,tvs) => map TU.pruneTyvar tvs                  of SOME(_,tvs) => map TU.pruneTyvar tvs
865                   | NONE => bug "primop intrinsic type doesn't match occurence type"                   | NONE => (complain EM.COMPLAIN "matchInstTypes"
866                                  (fn ppstrm =>
867                                        (PP.newline ppstrm;
868                                         PP.string ppstrm "VALvar: ";
869                                         PPVal.ppVar ppstrm e;
870                                         PP.newline ppstrm;
871                                         PP.string ppstrm "occtypes: ";
872                                         PPType.ppType env ppstrm occty;
873                                         PP.newline ppstrm;
874                                         PP.string ppstrm "intrinsicType: ";
875                                         PPType.ppType env ppstrm intrinsicType;
876                                         PP.newline ppstrm;
877                                         PP.string ppstrm "instpoly occ: ";
878                                         PPType.ppType env ppstrm (#1 (TU.instantiatePoly occty));
879                                         PP.newline ppstrm;
880                                         PP.string ppstrm "instpoly intrinsicType: ";
881                                         PPType.ppType env ppstrm (#1 (TU.instantiatePoly intrinsicType))));
882                                bug "primop intrinsic type doesn't match occurence type")
883         in case (primop, intrinsicParams)         in case (primop, intrinsicParams)
884              of (PO.POLYEQL, [t]) => eqGen(intrinsicType, t, toTcLt d)              of (PO.POLYEQL, [t]) => eqGen(intrinsicType, t, toTcLt d)
885               | (PO.POLYNEQ, [t]) =>               | (PO.POLYNEQ, [t]) =>

Legend:
Removed from v.1976  
changed lines
  Added in v.1979

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