CVS: sml-dist/src/compiler/Elaborator/elaborate elabcore.sml, 1.8.4.4, 1.8.4.5 elabmod.sml, 1.2.20.4, 1.2.20.5 elabutil.sml, 1.9.4.5, 1.9.4.6
David MacQueen <[email protected]> Mon, 24 Jul 2006 15:38:57 -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-serv27560/src/compiler/Elaborator/elaborate
Modified Files:
Tag: primop-branch-2
elabcore.sml elabmod.sml elabutil.sml
Log Message:
minor edits -- comments, etc.
Index: elabcore.sml
===================================================================
RCS file: /cvsroot/smlnj/sml-dist/src/compiler/Elaborator/elaborate/elabcore.sml,v
retrieving revision 1.8.4.4
retrieving revision 1.8.4.5
diff -C2 -d -r1.8.4.4 -r1.8.4.5
*** elabcore.sml 18 Jul 2006 19:46:35 -0000 1.8.4.4
--- elabcore.sml 24 Jul 2006 22:38:55 -0000 1.8.4.5
***************
*** 791,796 ****
val pat =
case stripExpAbs exp
! of VARexp(ref(VALvar{prim=dinfo,...}),_) =>
! (case dinfo
of PrimOpId.Prim _ =>
(case pat
--- 791,796 ----
val pat =
case stripExpAbs exp
! of VARexp(ref(VALvar{prim,...}),_) =>
! (case prim
of PrimOpId.Prim _ =>
(case pat
***************
*** 799,811 ****
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
! (* DBM: can the first two cases ever return NONE? *)
fun bindpat(VARpat(VALvar{access=acc, ...})) = A.accLvar acc
| bindpat(CONSTRAINTpat(VARpat(VALvar{access=acc, ...}),_)) =
--- 799,814 ----
CONSTRAINTpat(VARpat(
VALvar{path=path, typ=typ, access=access,
! prim=prim}), ty)
| VARpat(VALvar{path, typ, access, ...}) =>
VARpat(VALvar{path=path, typ=typ, access=access,
! prim=prim})
| _ => pat)
| PrimOpId.NonPrim => pat)
| _ => pat
! (* DBM: The first two cases (single variable pattern)
! * are guaranteed to produce SOME. So bindpat could just
! * as well return a boolean, since the following case does
! * not use the value carried by SOME. *)
fun bindpat(VARpat(VALvar{access=acc, ...})) = A.accLvar acc
| bindpat(CONSTRAINTpat(VARpat(VALvar{access=acc, ...}),_)) =
Index: elabmod.sml
===================================================================
RCS file: /cvsroot/smlnj/sml-dist/src/compiler/Elaborator/elaborate/elabmod.sml,v
retrieving revision 1.2.20.4
retrieving revision 1.2.20.5
diff -C2 -d -r1.2.20.4 -r1.2.20.5
*** elabmod.sml 18 Jul 2006 19:46:35 -0000 1.2.20.4
--- elabmod.sml 24 Jul 2006 22:38:55 -0000 1.2.20.5
***************
*** 58,61 ****
--- 58,63 ----
structure ED = ElabDebug
open Ast Modules
+ open SpecialSymbols (* special symbols *)
+
in
***************
*** 99,105 ****
fun localEntDec(d1, d2) = seqEntDec [d1, d2]
- (* special symbols *)
- open SpecialSymbols
-
fun stripMarkSigb(MarkSigb(sigb',region'),region) =
stripMarkSigb(sigb',region')
--- 101,104 ----
***************
*** 589,596 ****
val dacc = DA.namedAcc(tempStrId, mkv)
! val dinfo = MU.strPrimElemInBinds locations
in M.STR {sign=sign, rlzn=strRlzn, access=dacc,
! prim=dinfo}
end
--- 588,595 ----
val dacc = DA.namedAcc(tempStrId, mkv)
! val prim = MU.strPrimElemInBinds locations
in M.STR {sign=sign, rlzn=strRlzn, access=dacc,
! prim=prim}
end
***************
*** 1133,1148 ****
(* str should be functor application wrapper structure
* with single structure component "resultStr" *)
! if (case str
! of ERRORstr => true
! | _ => (case MU.getStrSymbols str
! of [sym] => S.eq(sym,resultId)
! | _ => false))
! then str
! else (error region' EM.COMPLAIN
! ("structure " ^ S.name(IP.last rpath) ^
! " defined by partially applied functor")
! EM.nullErrorBody;
! ERRORstr)
! else str
val _ = debugmsg "--elabStrbs: elabStr done"
--- 1132,1147 ----
(* str should be functor application wrapper structure
* with single structure component "resultStr" *)
! if (case str
! of ERRORstr => true
! | _ => (case MU.getStrSymbols str
! of [sym] => S.eq(sym,resultId)
! | _ => false))
! then str
! else (error region' EM.COMPLAIN
! ("structure " ^ S.name(IP.last rpath) ^
! " defined by partially applied functor")
! EM.nullErrorBody;
! ERRORstr)
! else str
val _ = debugmsg "--elabStrbs: elabStr done"
***************
*** 1188,1191 ****
--- 1187,1191 ----
* completely and replaced with proper persistent accesses (ZHONG)
*)
+ (* [KM ???] What is the purpose of changing the dynamic access? *)
val (bindStr, strEnt) =
case resStr
***************
*** 1620,1624 ****
of SOME _ => true
| _ => false))
! | _ => (fn _ => false))
val (decl,env') = EC.elabDec(dec, env0, isFree,
--- 1620,1624 ----
of SOME _ => true
| _ => false))
! | _ => (fn _ => false))
val (decl,env') = EC.elabDec(dec, env0, isFree,
Index: elabutil.sml
===================================================================
RCS file: /cvsroot/smlnj/sml-dist/src/compiler/Elaborator/elaborate/elabutil.sml,v
retrieving revision 1.9.4.5
retrieving revision 1.9.4.6
diff -C2 -d -r1.9.4.5 -r1.9.4.6
*** elabutil.sml 11 Jul 2006 23:00:41 -0000 1.9.4.5
--- elabutil.sml 24 Jul 2006 22:38:55 -0000 1.9.4.6
***************
*** 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);
--- 119,125 ----
let val vl = ref (nil: symbol list)
val env = ref(SE.empty: SE.staticEnv)
! fun f (VARpat(v as VALvar{path=SP.SPATH[name],...})) =
! (if S.eq(name, EQUALsym)
! then err WARN "rebinding =" nullErrorBody
else ();
env := SE.bind(name,B.VALbind v,!env);
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV