Commit | Line | Data |
---|---|---|
7f918cf1 CE |
1 | (* Copyright (C) 2009 Matthew Fluet. |
2 | * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh | |
3 | * Jagannathan, and Stephen Weeks. | |
4 | * Copyright (C) 1997-2000 NEC Research Institute. | |
5 | * | |
6 | * MLton is released under a BSD-style license. | |
7 | * See the file MLton-LICENSE for details. | |
8 | *) | |
9 | ||
10 | signature ABSTRACT_VALUE_STRUCTS = | |
11 | sig | |
12 | structure Sxml: SXML | |
13 | structure Ssa: SSA | |
14 | end | |
15 | ||
16 | signature ABSTRACT_VALUE = | |
17 | sig | |
18 | include ABSTRACT_VALUE_STRUCTS | |
19 | ||
20 | structure Lambda: | |
21 | sig | |
22 | type t | |
23 | ||
24 | val dest: t -> Sxml.Lambda.t | |
25 | val layout: t -> Layout.t | |
26 | end | |
27 | ||
28 | structure Lambdas: | |
29 | sig | |
30 | type t | |
31 | ||
32 | val equals: t * t -> bool | |
33 | val plist: t -> PropertyList.t | |
34 | val toList: t -> Lambda.t list | |
35 | end | |
36 | ||
37 | type t | |
38 | ||
39 | datatype dest = | |
40 | Array of t | |
41 | | Lambdas of Lambdas.t | |
42 | | Ref of t | |
43 | | Tuple of t vector | |
44 | | Type of Sxml.Type.t (* type doesn't contain any arrows *) | |
45 | | Vector of t | |
46 | | Weak of t | |
47 | ||
48 | val addHandler: t * (Lambda.t -> unit) -> unit | |
49 | val coerce: {from: t, to: t} -> unit | |
50 | val ssaType: t -> Ssa.Type.t option ref | |
51 | val deArray: t -> t | |
52 | val deRef: t -> t | |
53 | val deVector: t -> t | |
54 | val deWeak: t -> t | |
55 | val dest: t -> dest | |
56 | (* Destroy info associated with Sxml.Type used to keep track of arrows. *) | |
57 | val destroy: unit -> unit | |
58 | val equals: t * t -> bool | |
59 | val fromType: Sxml.Type.t -> t | |
60 | val isEmpty: t -> bool (* no possible values correspond to me *) | |
61 | val lambda: Sxml.Lambda.t * Sxml.Type.t (* The type of the lambda. *) -> t | |
62 | val layout: t -> Layout.t | |
63 | val primApply: {prim: Sxml.Type.t Sxml.Prim.t, | |
64 | args: t vector, | |
65 | resultTy: Sxml.Type.t} -> t | |
66 | val select: t * int -> t | |
67 | val serialValue: Sxml.Type.t -> t | |
68 | (* In tuple vs, there must be one argument that is not Type _. *) | |
69 | val tuple: t vector -> t | |
70 | val ty: t -> Sxml.Type.t | |
71 | val typeIsFirstOrder: Sxml.Type.t -> bool | |
72 | val unify: t * t -> unit | |
73 | end |