Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/trunk/compiler/ElabData/basics/primopid.sml
ViewVC logotype

Diff of /sml/trunk/compiler/ElabData/basics/primopid.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1958, Thu Jul 6 23:01:06 2006 UTC revision 1959, Fri Jul 7 20:36:18 2006 UTC
# Line 30  Line 30 
30    fun isPrimCast (Prim "cast") = true    fun isPrimCast (Prim "cast") = true
31      | isPrimCast _ = false      | isPrimCast _ = false
32    
33    val selStrPrimId = List.nth    fun selStrPrimId(StrE elems, slot) = List.nth(elems, slot)
34        | selStrPrimId(PrimE id, slot) =
35            bug "PrimOpId.selStrPrimId: unexpected PrimE"
36            (* This bug happens if we got a primid for a value
37               component when we expected a strPrimElem for a
38               structure *)
39    
40      fun selValPrimFromStrPrim(StrE elems, slot) =
41          (case List.nth(elems, slot)
42            of PrimE(id) => id
43             | _ =>
44               bug "PrimOpId.selValPrimFromStrPrim: unexpected StrE")
45               (* This bug occurs if we got a substructure's
46                  strPrimElem instead of an expected value component's
47                  primId *)
48        | selValPrimFromStrPrim(PrimE _, slot) =
49          bug "PrimOpId.selValPrimFromStrPrim: unexpected PrimE"
50    
51  (*  (*
52      fun selStrInfo (StrE l, i) =      fun selStrInfo (StrE l, i) =

Legend:
Removed from v.1958  
changed lines
  Added in v.1959

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0