CVS: sml-dist/src/compiler/ElabData/modules moduleutil.sig, 1.2.20.3, 1.2.20.4 moduleutil.sml, 1.2.20.5, 1.2.20.6
George Kuan <[email protected]> Tue, 11 Jul 2006 08:35:51 -0700
| Newsgroups | gmane.comp.lang.sml.smlnj.commits |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/smlnj/sml-dist/src/compiler/ElabData/modules
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv26115/src/compiler/ElabData/modules
Modified Files:
Tag: primop-branch-2
moduleutil.sig moduleutil.sml
Log Message:
Use strPrimInfo instead of strPrimElem
Index: moduleutil.sig
===================================================================
RCS file: /cvsroot/smlnj/sml-dist/src/compiler/ElabData/modules/moduleutil.sig,v
retrieving revision 1.2.20.3
retrieving revision 1.2.20.4
diff -C2 -d -r1.2.20.3 -r1.2.20.4
*** moduleutil.sig 7 Jul 2006 20:36:18 -0000 1.2.20.3
--- moduleutil.sig 11 Jul 2006 15:35:49 -0000 1.2.20.4
***************
*** 17,25 ****
val getStr : Modules.elements * Modules.entityEnv
! * Symbol.symbol * Access.access * PrimOpId.strPrimElem
-> Modules.Structure * EntPath.entVar
val getFct : Modules.elements * Modules.entityEnv
! * Symbol.symbol * Access.access * PrimOpId.strPrimElem
-> Modules.Functor * EntPath.entVar
--- 17,25 ----
val getStr : Modules.elements * Modules.entityEnv
! * Symbol.symbol * Access.access * PrimOpId.strPrimInfo
-> Modules.Structure * EntPath.entVar
val getFct : Modules.elements * Modules.entityEnv
! * Symbol.symbol * Access.access * PrimOpId.strPrimInfo
-> Modules.Functor * EntPath.entVar
***************
*** 69,73 ****
(*** extract inl_info from a list of bindings *)
! val strPrimElemInBinds : Bindings.binding list -> PrimOpId.strPrimElem
val getSigSymbols: Modules.Signature -> Symbol.symbol list
--- 69,73 ----
(*** extract inl_info from a list of bindings *)
! val strPrimElemInBinds : Bindings.binding list -> PrimOpId.strPrimInfo
val getSigSymbols: Modules.Signature -> Symbol.symbol list
Index: moduleutil.sml
===================================================================
RCS file: /cvsroot/smlnj/sml-dist/src/compiler/ElabData/modules/moduleutil.sml,v
retrieving revision 1.2.20.5
retrieving revision 1.2.20.6
diff -C2 -d -r1.2.20.5 -r1.2.20.6
*** moduleutil.sml 11 Jul 2006 15:10:14 -0000 1.2.20.5
--- moduleutil.sml 11 Jul 2006 15:35:49 -0000 1.2.20.6
***************
*** 80,84 ****
of STRent entity =>
(STR{sign = sign, rlzn = entity, access = A.selAcc(dacc,slot),
! prim = POI.selStrPrimId (prims, slot)},
entVar)
| _ => bug "getStr: bad entity")
--- 80,84 ----
of STRent entity =>
(STR{sign = sign, rlzn = entity, access = A.selAcc(dacc,slot),
! prim = POI.selStrPrimId(prims, slot)},
entVar)
| _ => bug "getStr: bad entity")
***************
*** 176,180 ****
| strDefToStr(VARstrDef(sign,entPath), entEnv) =
STR{sign=sign,rlzn=EE.lookStrEP(entEnv,entPath),
! access=A.nullAcc, prim=POI.StrE []}
(*
--- 176,180 ----
| strDefToStr(VARstrDef(sign,entPath), entEnv) =
STR{sign=sign,rlzn=EE.lookStrEP(entEnv,entPath),
! access=A.nullAcc, prim=[]}
(*
***************
*** 184,190 ****
*)
datatype strInfo = SIGINFO of EP.entPath (* reverse order! *)
! | STRINFO of strEntity * A.access * POI.strPrimElem
! val bogusInfo = STRINFO (bogusStrEntity, A.nullAcc, POI.StrE [])
fun getStrElem (sym, sign as SIG {elements,...}, sInfo) =
--- 184,190 ----
*)
datatype strInfo = SIGINFO of EP.entPath (* reverse order! *)
! | STRINFO of strEntity * A.access * POI.strPrimInfo
! val bogusInfo = STRINFO (bogusStrEntity, A.nullAcc, [])
fun getStrElem (sym, sign as SIG {elements,...}, sInfo) =
***************
*** 452,456 ****
(** strPrimElemInBinds
! Get a strPrimElem with all the primIds found in a list of bindings
(including those in nested structures)
--- 452,456 ----
(** strPrimElemInBinds
! Get a strPrimElem list with all the primIds found in a list of bindings
(including those in nested structures)
***************
*** 458,477 ****
SigMatch
*)
! fun strPrimElemInBinds [] = POI.StrE []
! | strPrimElemInBinds (bind::rest) =
let
! val strPrims =
(case bind
! of B.STRbind (M.STR { prim, ... }) => prim
! | B.FCTbind (M.FCT { prim, ... }) => prim
| B.VALbind (V.VALvar {prim, ...}) => POI.PrimE prim
| B.CONbind _ => POI.PrimE POI.NonPrim (* still fishy *)
| _ =>
bug "unexpected binding in strPrimElemInBinds")
in
! (case (strPrimElemInBinds rest) of
! (POI.StrE restPrims) =>
! POI.StrE (strPrims :: restPrims)
! | POI.PrimE id => POI.StrE ([POI.PrimE id]))
end (* let *)
--- 458,478 ----
SigMatch
*)
! fun strPrimElemInBinds (bindings) =
let
! fun strPrims bind =
(case bind
! of B.STRbind (M.STR { prim, ... }) => POI.StrE prim
! | B.FCTbind (M.FCT { prim, ... }) => POI.StrE prim
| B.VALbind (V.VALvar {prim, ...}) => POI.PrimE prim
| B.CONbind _ => POI.PrimE POI.NonPrim (* still fishy *)
+ (* GK: Doesn't this throw off the slot number
+ correspondence because CONbinds may
+ or may not have a corresponding slot
+ number (Data cons do not and Exception
+ cons do) *)
| _ =>
bug "unexpected binding in strPrimElemInBinds")
in
! map strPrims bindings
end (* let *)
-------------------------------------------------------------------------
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