CVS: sml-dist/src/compiler/FLINT/trans translate.sml, 1.33.4.8, 1.33.4.9

George Kuan <[email protected]> Thu, 13 Jul 2006 15:35:53 -0700
Newsgroups gmane.comp.lang.sml.smlnj.commits
Message-ID <[email protected]>
Update of /cvsroot/smlnj/sml-dist/src/compiler/FLINT/trans
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv28574/FLINT/trans

Modified Files:
      Tag: primop-branch-2
	translate.sml 
Log Message:
Debug info for matchInstTypes bug during translate of core.sml

Index: translate.sml
===================================================================
RCS file: /cvsroot/smlnj/sml-dist/src/compiler/FLINT/trans/translate.sml,v
retrieving revision 1.33.4.8
retrieving revision 1.33.4.9
diff -C2 -d -r1.33.4.8 -r1.33.4.9
*** translate.sml	13 Jul 2006 20:20:48 -0000	1.33.4.8
--- translate.sml	13 Jul 2006 22:35:51 -0000	1.33.4.9
***************
*** 850,854 ****
   * type parameters of instantiation of the intrinsic primop type relative
   * to the variable occurrence type *)
! fun mkVE (V.VALvar { typ, prim = PrimOpId.Prim p, ... }, ts, d) =
        let val occty = (* compute the occurrence type of the variable *)
                case ts
--- 850,854 ----
   * type parameters of instantiation of the intrinsic primop type relative
   * to the variable occurrence type *)
! fun mkVE (e as V.VALvar { typ, prim = PrimOpId.Prim p, ... }, ts, d) =
        let val occty = (* compute the occurrence type of the variable *)
                case ts
***************
*** 861,867 ****
            val intrinsicParams =
                (* compute intrinsic instantiation params of intrinsicType *)
!               case ((TU.matchInstTypes(occty,intrinsicType)) : (TP.tyvar list * TP.tyvar list) option )
!                 of SOME(_,tvs) => map TU.pruneTyvar tvs
!                  | NONE => bug "primop intrinsic type doesn't match occurence type"
         in case (primop, intrinsicParams)
              of (PO.POLYEQL, [t]) => eqGen(intrinsicType, t, toTcLt d)
--- 861,884 ----
            val intrinsicParams =
                (* compute intrinsic instantiation params of intrinsicType *)
!               case ((TU.matchInstTypes(occty, intrinsicType)) : (TP.tyvar list * TP.tyvar list) option )
!                 of SOME(_, tvs) => map TU.pruneTyvar tvs
!                  | NONE => (complain EM.COMPLAIN "matchInstTypes"
!                               (fn ppstrm => 
!                                     (PP.newline ppstrm;
! 				     PP.string ppstrm "VALvar: ";
! 				     PPVal.ppVar ppstrm e;
! 				     PP.newline ppstrm;
!                                      PP.string ppstrm "occtypes: ";
!                                      PPType.ppType env ppstrm occty;
! 				     PP.newline ppstrm;
! 				     PP.string ppstrm "intrinsicType: ";
! 				     PPType.ppType env ppstrm intrinsicType;
! 				     PP.newline ppstrm;
! 				     PP.string ppstrm "instpoly occ: ";
! 				     PPType.ppType env ppstrm (#1 (TU.instantiatePoly occty));
! 				     PP.newline ppstrm;
! 				     PP.string ppstrm "instpoly intrinsicType: ";
! 				     PPType.ppType env ppstrm (#1 (TU.instantiatePoly intrinsicType))));
! 			    bug "primop intrinsic type doesn't match occurence type")
         in case (primop, intrinsicParams)
              of (PO.POLYEQL, [t]) => eqGen(intrinsicType, t, toTcLt d)



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642