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/FLINT/plambda/plambda.sig
ViewVC logotype

Diff of /sml/trunk/compiler/FLINT/plambda/plambda.sig

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

revision 4539, Sat Apr 21 17:13:52 2018 UTC revision 4540, Wed Apr 25 17:06:35 2018 UTC
# Line 1  Line 1 
1  (* plambda.sig  (* plambda.sig
2   *   *
3   * COPYRIGHT (c) 2017 The Fellowship of SML/NJ (http://www.smlnj.org)   * COPYRIGHT (c) 2018 The Fellowship of SML/NJ (http://www.smlnj.org)
4   * All rights reserved.   * All rights reserved.
5   *)   *)
6    
7  signature PLAMBDA = sig  signature PLAMBDA =
8      sig
9    
10  type tkind = PLambdaType.tkind  type tkind = PLambdaType.tkind
11  type tyc = PLambdaType.tyc  type tyc = PLambdaType.tyc
12  type lty = PLambdaType.lty  type lty = PLambdaType.lty
13  type lvar = LambdaVar.lvar  type lvar = LambdaVar.lvar
14    
15      (*
16       * dataconstr records the name of the constructor, the corresponding conrep,
17       * and the lambda type lty; value carrying data constructors would have
18       * arrow type.
19       *)
20  type dataconstr = Symbol.symbol * Access.conrep * lty  type dataconstr = Symbol.symbol * Access.conrep * lty
21    
22      (*
23       * con: used to specify all possible switching statements. Efficient switch
24       * generation can be applied to DATAcon and INTcon. Otherwise, it is just a
25       * shorthand for binary branch trees. In the future, we probably should make
26       * it more general, including constants of any numerical types.
27       *)
28  datatype con  datatype con
29    = DATAcon of dataconstr * tyc list * lvar    = DATAcon of dataconstr * tyc list * lvar
30    (* 64BIT: replace INTcon, INT32con, INTINFcon, WORDcon, WORD32con with
31          | INTcon of int IntConst.t        (* sz = 0 for IntInf.int *)
32          | WORDcon of int IntConst.t
33    *)
34    | INTcon of int    | INTcon of int
35    | INT32con of Int32.int    | INT32con of Int32.int
36    | INTINFcon of IntInf.int             (* only used with in matchcomp *)    | INTINFcon of IntInf.int             (* only used with in matchcomp *)
# Line 23  Line 39 
39    | STRINGcon of string    | STRINGcon of string
40    | VLENcon of int    | VLENcon of int
41    
42      (*
43       * lexp: the universal typed intermediate language. TFN, TAPP is abstraction
44       * and application on type constructors. Structure abstractions and functor
45       * abstractions are represented as normal structure and functor definitions
46       * with its component properly PACKed. FN defines normal function, FIX defines
47       * a set of recursive functions, LET(v,e1,e2) is a syntactic sugar for exprs
48       * of forms like APP(FN(v,_,e2), e1); the type of v will be that of e1.
49       * APP is the function application. STRECD and STRSEL are structure record
50       * selection, VECTOR and VCTSEL are vector record and vector selection.
51       * ETAG, RAISE, and HANDLE are for exceptions.
52       *)
53  datatype lexp  datatype lexp
54    = VAR of lvar    = VAR of lvar
55    (* 64BIT: replace INT, INT32, WORD, and WORD32 with
56          | INT of int IntConst.t   (* sz = 0 for IntInf.int *)
57          | WORD of int IntConst.t
58    *)
59    | INT of int    | INT of int
60    | INT32 of Int32.int    | INT32 of Int32.int
61    | WORD of word    | WORD of word
62    | WORD32 of Word32.word    | WORD32 of Word32.word
63    | REAL of RealLit.t        | REAL of int RealConst.t
64    | STRING of string    | STRING of string
65    | PRIM of Primop.primop * lty * tyc list    | PRIM of Primop.primop * lty * tyc list
66    | GENOP of dict * Primop.primop * lty * tyc list    | GENOP of dict * Primop.primop * lty * tyc list
# Line 61  Line 92 
92  withtype dict = {default: lexp, table: (tyc list * lexp) list}  withtype dict = {default: lexp, table: (tyc list * lexp) list}
93    
94  end (* signature PLAMBDA *)  end (* signature PLAMBDA *)
   

Legend:
Removed from v.4539  
changed lines
  Added in v.4540

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