Import Upstream version 20180207
[hcoop/debian/mlton.git] / mlton / backend / object-type.sig
1 (* Copyright (C) 2004-2007 Henry Cejtin, Matthew Fluet, Suresh
2 * Jagannathan, and Stephen Weeks.
3 *
4 * MLton is released under a BSD-style license.
5 * See the file MLton-LICENSE for details.
6 *)
7
8 signature OBJECT_TYPE =
9 sig
10 structure ObjptrTycon: OBJPTR_TYCON
11 structure Runtime: RUNTIME
12
13 type ty
14 datatype t =
15 Array of {elt: ty,
16 hasIdentity: bool}
17 | Normal of {hasIdentity: bool,
18 ty: ty}
19 | Stack
20 | Weak of ty option (* in Weak (SOME t), must have Type.isPointer t *)
21
22 val basic: unit -> (ObjptrTycon.t * t) vector
23 val isOk: t -> bool
24 val layout: t -> Layout.t
25 val toRuntime: t -> Runtime.RObjectType.t
26 end