CVS: sml-dist/src/compiler/FLINT/trans tempexpn.sml, 1.2, 1.2.26.1 translate.sml, 1.33.4.1, 1.33.4.2

David MacQueen <[email protected]> Fri, 07 Jul 2006 14:06:13 -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-serv1837/compiler/FLINT/trans

Modified Files:
      Tag: primop-branch-2
	tempexpn.sml translate.sml 
Log Message:
fixup matchTypes in sigmatch, VALvar in many files

Index: tempexpn.sml
===================================================================
RCS file: /cvsroot/smlnj/sml-dist/src/compiler/FLINT/trans/tempexpn.sml,v
retrieving revision 1.2
retrieving revision 1.2.26.1
diff -C2 -d -r1.2 -r1.2.26.1
*** tempexpn.sml	1 Jun 2000 18:33:27 -0000	1.2
--- tempexpn.sml	7 Jul 2006 21:06:10 -0000	1.2.26.1
***************
*** 152,157 ****
  	  (instantiatePatexp(pat, env))::(multiInstantiatePatexp(rest, env))
  
! fun instance (VARpat (VALvar {path, typ, info, ...})) =
!       VARsimp (VALvar{access=LVAR (mkLvar()), path=path, typ=typ, info=info})
    | instance (VARpat _) = impossible "bad variabel in match"
    | instance (RECORDpat{fields,...}) = 
--- 152,157 ----
  	  (instantiatePatexp(pat, env))::(multiInstantiatePatexp(rest, env))
  
! fun instance (VARpat (VALvar {path, typ, prim, ...})) =
!       VARsimp (VALvar{access=LVAR (mkLvar()), path=path, typ=typ, prim=prim})
    | instance (VARpat _) = impossible "bad variabel in match"
    | instance (RECORDpat{fields,...}) = 
***************
*** 234,242 ****
  fun newVars (RECORDsimp labsimps, env) = 
  	  multiNewVars(map #2 labsimps, env)
!   | newVars (VARsimp (v as VALvar {path, typ, info, ...}), env) =
  	  ((lookup(v, env); env) 
           handle Lookup => 
             ((v,VALvar{path=path, typ=typ,access=LVAR (mkLvar()),
!                       info=info})::env))
    | newVars (VARsimp _, _) = impossible "bad instance call to newVars"
  and multiNewVars(nil, env) = env
--- 234,242 ----
  fun newVars (RECORDsimp labsimps, env) = 
  	  multiNewVars(map #2 labsimps, env)
!   | newVars (VARsimp (v as VALvar {path, typ, prim, ...}), env) =
  	  ((lookup(v, env); env) 
           handle Lookup => 
             ((v,VALvar{path=path, typ=typ,access=LVAR (mkLvar()),
!                       prim=prim})::env))
    | newVars (VARsimp _, _) = impossible "bad instance call to newVars"
  and multiNewVars(nil, env) = env

Index: translate.sml
===================================================================
RCS file: /cvsroot/smlnj/sml-dist/src/compiler/FLINT/trans/translate.sml,v
retrieving revision 1.33.4.1
retrieving revision 1.33.4.2
diff -C2 -d -r1.33.4.1 -r1.33.4.2
*** translate.sml	27 Jun 2006 22:08:49 -0000	1.33.4.1
--- translate.sml	7 Jul 2006 21:06:10 -0000	1.33.4.2
***************
*** 836,841 ****
   *                                                                         *
   ***************************************************************************)
! fun mkVar (v as V.VALvar{access, info, typ, path}, d) = 
!       mkAccInfo(access, info, fn () => toLty d (!typ), getNameOp path)
    | mkVar _ = bug "unexpected vars in mkVar"
  
--- 836,841 ----
   *                                                                         *
   ***************************************************************************)
! fun mkVar (v as V.VALvar{access, prim, typ, path}, d) = 
!       mkAccInfo(access, prim, fn () => toLty d (!typ), getNameOp path)
    | mkVar _ = bug "unexpected vars in mkVar"
  
***************
*** 847,855 ****
  in
      case v of
! 	V.VALvar { info, ... } =>
! 	II.match info
! 	   { inl_prim = fn (p, typ) =>
! 	     (case (p, ts) of
! 		  (PO.POLYEQL, [t]) => eqGen(typ, t, toTcLt d)
  		| (PO.POLYNEQ, [t]) =>
  		  composeNOT(eqGen(typ, t, toTcLt d), toLty d t)
--- 847,856 ----
  in
      case v of
! 	V.VALvar { prim, ... } =>
! 	case prim
! 	 of PrimOpId.Prim p => 
!             let val ts = (* compute intrinsic instantiation params *) []
!             in (case (p, ts)
! 		of (PO.POLYEQL, [t]) => eqGen(typ, t, toTcLt d)
  		| (PO.POLYNEQ, [t]) =>
  		  composeNOT(eqGen(typ, t, toTcLt d), toLty d t)
***************
*** 866,872 ****
  		  in PRIM (PO.RAW_CCALL i, toLty d typ, map (toTyc d) ts)
  		  end
! 		| _ => transPrim(p, (toLty d typ), map (toTyc d) ts)),
! 	     inl_str = fn _ => otherwise (),
! 	     inl_no = fn () => otherwise () }
        | _ => otherwise ()
  end
--- 867,873 ----
  		  in PRIM (PO.RAW_CCALL i, toLty d typ, map (toTyc d) ts)
  		  end
! 		| _ => transPrim(p, (toLty d typ), map (toTyc d) ts))
!             end
! 	  |  PrimOpId.NonPrim => otherwise ()
        | _ => otherwise ()
  end


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