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 1954, Thu Jul 6 16:35:38 2006 UTC revision 1955, Thu Jul 6 20:10:33 2006 UTC
# Line 11  Line 11 
11  structure PrimOpId : PRIMOPID =  structure PrimOpId : PRIMOPID =
12  struct  struct
13    
14      fun bug s = ErrorMsg.impossible ("PrimOpId: " ^ s)    (* in the front end, primops are identified by a primop number *)
15      datatype primId = Prim of string | NonPrim
16    
17      datatype strPrimElem = PrimE of primId
18                           | StrE of strPrimInfo
19    
20      datatype primId = Prim of int | NonPrim    withtype strPrimInfo = strPrimElem list
     datatype strElemPrimIds = PrimE of primId  
                             | StrE of strInfo  
     withtype strInfo = strElemPrimIds list  
21    
22      fun bug s = ErrorMsg.impossible ("PrimOpId: " ^ s)
23    
24      fun isPrimop (Prim _) = true      fun isPrimop (Prim _) = true
25        | isPrimop NonPrim  = false        | isPrimop NonPrim  = false
26    
27      fun isPrimCallcc (Prim("callcc" | "capture")) = true
28        | isPrimCallcc _ = false
29    
30      fun isPrimCast (Prim "cast") = true
31        | isPrimCast _ = false
32    
33      val selStrPrimId = nth
34    
35  (*  (*
36      fun selStrInfo (StrE l, i) =      fun selStrInfo (StrE l, i) =
37          (List.nth (l, i) handle Subscript => bug "Wrong field in List")          (List.nth (l, i) handle Subscript => bug "Wrong field in List")

Legend:
Removed from v.1954  
changed lines
  Added in v.1955

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