CVS: sml-dist/src/compiler/Elaborator/elaborate elabcore.sml, 1.8.4.1, 1.8.4.2 elabutil.sml, 1.9.4.1, 1.9.4.2

David MacQueen <[email protected]> Fri, 07 Jul 2006 14:06:11 -0700
Newsgroups gmane.comp.lang.sml.smlnj.commits
Message-ID <[email protected]>
Update of /cvsroot/smlnj/sml-dist/src/compiler/Elaborator/elaborate
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv1837/compiler/Elaborator/elaborate

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

Index: elabcore.sml
===================================================================
RCS file: /cvsroot/smlnj/sml-dist/src/compiler/Elaborator/elaborate/elabcore.sml,v
retrieving revision 1.8.4.1
retrieving revision 1.8.4.2
diff -C2 -d -r1.8.4.1 -r1.8.4.2
*** elabcore.sml	20 Jun 2006 04:18:10 -0000	1.8.4.1
--- elabcore.sml	7 Jul 2006 21:06:09 -0000	1.8.4.2
***************
*** 198,202 ****
  
  	    (* Y variable and local variables ri and fi and d *)
! 	    val yvar (* as VALvar{path,typ,access,info} *) =
  		newVALvar(S.varSymbol("Y$"^(Int.toString n)))
  	    fun mkVarSym s i = newVALvar(S.varSymbol(s^(Int.toString i)))
--- 198,202 ----
  
  	    (* Y variable and local variables ri and fi and d *)
! 	    val yvar (* as VALvar{path,typ,access,prim} *) =
  		newVALvar(S.varSymbol("Y$"^(Int.toString n)))
  	    fun mkVarSym s i = newVALvar(S.varSymbol(s^(Int.toString i)))
***************
*** 357,366 ****
  		       fun doPat(insFn: (S.symbol*access*ty ref)
                                            ->access*ty ref) =
! 			   let fun doPat' (VARpat(VALvar{access, info, path, 
                                                           typ})) =
  				     let val (access,typ) = 
  					 insFn(SymPath.first path,access,typ)
  				      in VARpat(VALvar{access=access, 
!                                                        path=path,info=info,
  						       typ=typ})
  				     end
--- 357,366 ----
  		       fun doPat(insFn: (S.symbol*access*ty ref)
                                            ->access*ty ref) =
! 			   let fun doPat' (VARpat(VALvar{access, prim, path, 
                                                           typ})) =
  				     let val (access,typ) = 
  					 insFn(SymPath.first path,access,typ)
  				      in VARpat(VALvar{access=access, 
!                                                        path=path,prim=prim,
  						       typ=typ})
  				     end
***************
*** 790,795 ****
  	      val pat = 
  		case stripExpAbs exp
! 		 of VARexp(ref(VALvar{info=dinfo,...}),_) =>
!                       (if II.isSimple dinfo then
  		        (case pat
  			  of CONSTRAINTpat(VARpat(VALvar{path,typ,
--- 790,796 ----
  	      val pat = 
  		case stripExpAbs exp
! 		 of VARexp(ref(VALvar{prim=dinfo,...}),_) =>
!                       (case dinfo
!                          of Prim _ => 
  		        (case pat
  			  of CONSTRAINTpat(VARpat(VALvar{path,typ,
***************
*** 797,806 ****
  			      CONSTRAINTpat(VARpat(
                                     VALvar{path=path, typ=typ, access=access,
!                                           info=dinfo}), ty)
  			   | VARpat(VALvar{path, typ, access, ...}) =>
  			      VARpat(VALvar{path=path, typ=typ, access=access,
!                                             info=dinfo})
  			   | _ => pat)
!                        else pat)
  		  | _ => pat
  
--- 798,807 ----
  			      CONSTRAINTpat(VARpat(
                                     VALvar{path=path, typ=typ, access=access,
!                                           prim=dinfo}), ty)
  			   | VARpat(VALvar{path, typ, access, ...}) =>
  			      VARpat(VALvar{path=path, typ=typ, access=access,
!                                             prim=dinfo})
  			   | _ => pat)
!                        | PrimOpId.NonPrim => pat)
  		  | _ => pat
  

Index: elabutil.sml
===================================================================
RCS file: /cvsroot/smlnj/sml-dist/src/compiler/Elaborator/elaborate/elabutil.sml,v
retrieving revision 1.9.4.1
retrieving revision 1.9.4.2
diff -C2 -d -r1.9.4.1 -r1.9.4.2
*** elabutil.sml	20 Jun 2006 01:28:00 -0000	1.9.4.1
--- elabutil.sml	7 Jul 2006 21:06:09 -0000	1.9.4.2
***************
*** 119,126 ****
      let val vl = ref (nil: symbol list)
  	val env = ref(SE.empty: SE.staticEnv)
! 	fun f (VARpat(v as VALvar{path=SP.SPATH[name],info,...})) = 
  	       (if S.eq(name, EQUALsym) (*** major hack ***)
  		then (* if InlInfo.isPrimInfo(InlInfo.fromExn info) then ()
!                      else *) err WARN "rebinding =" nullErrorBody
  		else ();
  		env := SE.bind(name,B.VALbind v,!env); 
--- 119,126 ----
      let val vl = ref (nil: symbol list)
  	val env = ref(SE.empty: SE.staticEnv)
! 	fun f (VARpat(v as VALvar{path=SP.SPATH[name],prim,...})) = 
  	       (if S.eq(name, EQUALsym) (*** major hack ***)
  		then (* if InlInfo.isPrimInfo(InlInfo.fromExn info) then ()
!                      else [dbm: ???] *) err WARN "rebinding =" nullErrorBody
  		else ();
  		env := SE.bind(name,B.VALbind v,!env); 
***************
*** 154,158 ****
      let val oldnew : (Absyn.pat * var) list ref = ref nil
  
! 	fun f (p as VARpat(VALvar{access=acc,info,typ=ref typ',path})) =
                let fun find ((VARpat(VALvar{access=acc',...}), x)::rest, v) = 
  		        (case (A.accLvar acc') (* DBM: can this return NONE? *)
--- 154,158 ----
      let val oldnew : (Absyn.pat * var) list ref = ref nil
  
! 	fun f (p as VARpat(VALvar{access=acc,prim,typ=ref typ',path})) =
                let fun find ((VARpat(VALvar{access=acc',...}), x)::rest, v) = 
  		        (case (A.accLvar acc') (* DBM: can this return NONE? *)
***************
*** 164,168 ****
                      | find (_::rest, v) = find(rest, v)
  		    | find (nil, v) = (* DBM: assert this rule always applies ? *)
! 		        let val x = VALvar{access=A.dupAcc(v,mkv), info=info,
                                             typ=ref typ', path=path}
  			 in oldnew := (p,x):: !oldnew; x
--- 164,168 ----
                      | find (_::rest, v) = find(rest, v)
  		    | find (nil, v) = (* DBM: assert this rule always applies ? *)
! 		        let val x = VALvar{access=A.dupAcc(v,mkv), prim=prim,
                                             typ=ref typ', path=path}
  			 in oldnew := (p,x):: !oldnew; x


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