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

Diff of /sml/trunk/compiler/FLINT/flint/flint.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  (* flint.sig  (* flint.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    
# Line 17  Line 17 
17  type fflag = LtyDef.fflag  type fflag = LtyDef.fflag
18  type rflag = LtyDef.rflag  type rflag = LtyDef.rflag
19    
20      (* specifies what kind of inlining behavior is desired for the function *)
 (* what kind of inlining behavior is desired for the function *)  
21  datatype ilhint  datatype ilhint
22    = IH_SAFE                             (* only inline if trivially size-safe *)    = IH_SAFE                             (* only inline if trivially size-safe *)
23    | IH_ALWAYS                           (* inline whenever possible *)    | IH_ALWAYS                           (* inline whenever possible *)
24    | IH_UNROLL                           (* only inline once within itself *)    | IH_UNROLL                           (* only inline once within itself *)
25    (* call-site dependent inlining:    (* call-site dependent inlining:
26     *     #1 < sum (map2 (fn (a,w) => (known a) * w) (actuals, #2) *)       *     #1 < sum (map2 (fn (a,w) => (known a) * w) (actuals, #2)
27         *)
28    | IH_MAYBE of int * int list    | IH_MAYBE of int * int list
29    
30  (* what kind of recursive function (aka loop) is this *)  (* what kind of recursive function (aka loop) is this *)
31  (* the distinction between LK_LOOP and LK_UNKNOWN is not clear  (* the distinction between LK_LOOP and LK_UNKNOWN is not clear
32   * and might get dropped so that we only need `tail:bool' *)     * and might get dropped so that we only need `tail:bool'
33       *)
34  datatype loopkind  datatype loopkind
35    = LK_UNKNOWN                          (* something else *)    = LK_UNKNOWN                          (* something else *)
36    | LK_LOOP                             (* loop wrapped in a preheader *)    | LK_LOOP                             (* loop wrapped in a preheader *)
# Line 41  Line 42 
42    | CC_FUN of fflag                     (* it's a function *)    | CC_FUN of fflag                     (* it's a function *)
43    
44  (** classifying various kinds of functions *)  (** classifying various kinds of functions *)
45  type fkind      type fkind = {
46   = {inline: ilhint,                     (* when should it be inlined *)          inline: ilhint,                 (* when should it be inlined *)
47      known : bool,                       (* are all the call sites known *)      known : bool,                       (* are all the call sites known *)
48      cconv : cconv,                      (* calling convention *)      cconv : cconv,                      (* calling convention *)
49      isrec : (lty list * loopkind) option} (* is it recursive *)          isrec : (lty list * loopkind) option (* is it recursive *)
50          }
51    
52  (* additional attributes for type abstractions *)  (* additional attributes for type abstractions *)
53  type tfkind      type tfkind = {inline: ilhint}
  = {inline: ilhint}  
54    
55  (** classifying various kinds of records *)  (** classifying various kinds of records *)
56  datatype rkind  datatype rkind
# Line 72  Line 73 
73   *)   *)
74  datatype con  datatype con
75    = DATAcon of dcon * tyc list * lvar    = DATAcon of dcon * tyc list * lvar
76    (* 64BIT: replace INTcon, INT32con, WORDcon, and WORD32con with
77          | INTcon of int IntConst.t        (* sz = 0 for IntInf.int *)
78          | WORDcon of int IntConst.t
79    *)
80    | INTcon of int                          (* should use InfInf.int *)    | INTcon of int                          (* should use InfInf.int *)
81    | INT32con of Int32.int    | INT32con of Int32.int
82    | WORDcon of word    | WORDcon of word
# Line 82  Line 87 
87  (** simple values, including variables and static constants. *)  (** simple values, including variables and static constants. *)
88  datatype value  datatype value
89    = VAR of lvar    = VAR of lvar
90  (* BIT64: REAL32: replace INT, INT32, and REAL with  (* 64BIT: replace INT, INT32, WORD, and WORD32 with
91    | INT of {v : IntInf.int, sz : int}        | INT of int IntConst.t   (* sz = 0 for IntInf.int *)
92    | REAL of {v : RealLit.t, sz : int}        | WORD of int IntConst.t
93  *)  *)
94    | INT of int                            (* should use InfInf.int *)    | INT of int                            (* should use InfInf.int *)
95    | INT32 of Int32.int    | INT32 of Int32.int
96    | WORD of word    | WORD of word
97    | WORD32 of Word32.word    | WORD32 of Word32.word
98    | REAL of RealLit.t        | REAL of int RealConst.t
99    | STRING of string    | STRING of string
100    
101  (** the definitions of the lambda expressions *)  (** the definitions of the lambda expressions *)

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