2016-02-18 07:11:59 -08:00
|
|
|
(**************************************************************************)
|
|
|
|
(* *)
|
|
|
|
(* OCaml *)
|
|
|
|
(* *)
|
|
|
|
(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
|
|
|
|
(* *)
|
|
|
|
(* Copyright 1998 Institut National de Recherche en Informatique et *)
|
|
|
|
(* en Automatique. *)
|
|
|
|
(* *)
|
|
|
|
(* All rights reserved. This file is distributed under the terms of *)
|
|
|
|
(* the GNU Lesser General Public License version 2.1, with the *)
|
|
|
|
(* special exception on linking described in the file LICENSE. *)
|
|
|
|
(* *)
|
|
|
|
(**************************************************************************)
|
1998-04-06 02:15:55 -07:00
|
|
|
|
|
|
|
(* Auxiliaries for type-based optimizations, e.g. array kinds *)
|
|
|
|
|
2014-11-17 04:04:32 -08:00
|
|
|
val is_function_type :
|
|
|
|
Env.t -> Types.type_expr -> (Types.type_expr * Types.type_expr) option
|
|
|
|
val is_base_type : Env.t -> Types.type_expr -> Path.t -> bool
|
|
|
|
|
2015-12-18 08:42:40 -08:00
|
|
|
val maybe_pointer_type : Env.t -> Types.type_expr
|
|
|
|
-> Lambda.immediate_or_pointer
|
|
|
|
val maybe_pointer : Typedtree.expression -> Lambda.immediate_or_pointer
|
2014-11-17 04:04:32 -08:00
|
|
|
|
|
|
|
val array_type_kind : Env.t -> Types.type_expr -> Lambda.array_kind
|
1998-04-06 02:15:55 -07:00
|
|
|
val array_kind : Typedtree.expression -> Lambda.array_kind
|
|
|
|
val array_pattern_kind : Typedtree.pattern -> Lambda.array_kind
|
2014-11-17 04:04:32 -08:00
|
|
|
val bigarray_type_kind_and_layout :
|
|
|
|
Env.t -> Types.type_expr -> Lambda.bigarray_kind * Lambda.bigarray_layout
|
2016-03-16 09:23:04 -07:00
|
|
|
val value_kind : Env.t -> Types.type_expr -> Lambda.value_kind
|
2018-11-23 06:34:05 -08:00
|
|
|
val function_return_value_kind : Env.t -> Types.type_expr -> Lambda.value_kind
|
2016-07-25 02:05:58 -07:00
|
|
|
|
2017-09-21 16:04:41 -07:00
|
|
|
val classify_lazy_argument : Typedtree.expression ->
|
|
|
|
[ `Constant_or_function
|
2018-06-05 08:00:32 -07:00
|
|
|
| `Float_that_cannot_be_shortcut
|
2017-09-21 16:04:41 -07:00
|
|
|
| `Identifier of [`Forward_value | `Other]
|
|
|
|
| `Other]
|
2018-11-23 06:34:05 -08:00
|
|
|
|
|
|
|
val value_kind_union :
|
|
|
|
Lambda.value_kind -> Lambda.value_kind -> Lambda.value_kind
|
|
|
|
(** [value_kind_union k1 k2] is a value_kind at least as general as
|
|
|
|
[k1] and [k2] *)
|