CVS: sml-dist/src/compiler/ElabData/basics primopid.sig, 1.1.2.5, 1.1.2.6 primopid.sml, 1.1.2.8, 1.1.2.9
George Kuan <[email protected]> Mon, 24 Jul 2006 16:09:03 -0700
| Newsgroups | gmane.comp.lang.sml.smlnj.commits |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/smlnj/sml-dist/src/compiler/ElabData/basics
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv6867/basics
Modified Files:
Tag: primop-branch-2
primopid.sig primopid.sml
Log Message:
StrPrimInfo selectors now return [] or NonPrim by default if StrPrimInfo is empty -- probably wrong but this is what InlInfo did before
Index: primopid.sig
===================================================================
RCS file: /cvsroot/smlnj/sml-dist/src/compiler/ElabData/basics/Attic/primopid.sig,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -C2 -d -r1.1.2.5 -r1.1.2.6
*** primopid.sig 18 Jul 2006 14:15:35 -0000 1.1.2.5
--- primopid.sig 24 Jul 2006 23:08:58 -0000 1.1.2.6
***************
*** 23,27 ****
val selValPrimFromStrPrim : strPrimElem list * int -> primId
! val ppPrim : primId -> unit
val ppStrInfo : strPrimInfo -> unit
--- 23,27 ----
val selValPrimFromStrPrim : strPrimElem list * int -> primId
! val ppPrim : primId -> string
val ppStrInfo : strPrimInfo -> unit
Index: primopid.sml
===================================================================
RCS file: /cvsroot/smlnj/sml-dist/src/compiler/ElabData/basics/Attic/primopid.sml,v
retrieving revision 1.1.2.8
retrieving revision 1.1.2.9
diff -C2 -d -r1.1.2.8 -r1.1.2.9
*** primopid.sml 18 Jul 2006 19:46:35 -0000 1.1.2.8
--- primopid.sml 24 Jul 2006 23:08:58 -0000 1.1.2.9
***************
*** 34,38 ****
(* Select the prim ids for a substructure *)
! fun selStrPrimId(elems, slot) =
(case List.nth(elems, slot)
of StrE elems' => elems'
--- 34,39 ----
(* Select the prim ids for a substructure *)
! fun selStrPrimId([], slot) = []
! | selStrPrimId(elems, slot) =
(case List.nth(elems, slot)
of StrE elems' => elems'
***************
*** 44,63 ****
(* Select the prim id for a value component *)
! fun selValPrimFromStrPrim(elems, slot) =
! (case List.nth(elems, slot)
of PrimE(id) => id
| _ =>
bug "PrimOpId.selValPrimFromStrPrim: unexpected StrE"
! ) handle Subscript => bug "PrimOpId.selValPrimFromStrPrim Subscript"
(* This bug occurs if we got a substructure's
strPrimElem instead of an expected value component's
primId *)
! fun ppPrim NonPrim = print "<NonPrim>"
! | ppPrim (Prim p) = print ("<PrimE "^p^">")
fun ppStrInfo strelems =
let fun ppElem [] = ()
! | ppElem ((PrimE p)::xs) = (ppPrim p; ppElem xs)
| ppElem ((StrE s)::xs) = (ppStrInfo s; ppElem xs)
in (print "[ "; ppElem strelems; print " ]\n")
--- 45,65 ----
(* Select the prim id for a value component *)
! fun selValPrimFromStrPrim([], slot) = NonPrim
! | selValPrimFromStrPrim(elems, slot) =
! (print ("selValPrim "^(Int.toString slot)^"\n"); (case List.nth(elems, slot)
of PrimE(id) => id
| _ =>
bug "PrimOpId.selValPrimFromStrPrim: unexpected StrE"
! ) handle Subscript => bug "PrimOpId.selValPrimFromStrPrim Subscript")
(* This bug occurs if we got a substructure's
strPrimElem instead of an expected value component's
primId *)
! fun ppPrim NonPrim = "<NonPrim>"
! | ppPrim (Prim p) = ("<PrimE "^p^">")
fun ppStrInfo strelems =
let fun ppElem [] = ()
! | ppElem ((PrimE p)::xs) = (print (ppPrim p); ppElem xs)
| ppElem ((StrE s)::xs) = (ppStrInfo s; ppElem xs)
in (print "[ "; ppElem strelems; print " ]\n")
-------------------------------------------------------------------------
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