2016-02-18 07:11:59 -08:00
|
|
|
(**************************************************************************)
|
|
|
|
(* *)
|
|
|
|
(* OCaml *)
|
|
|
|
(* *)
|
|
|
|
(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
|
|
|
|
(* *)
|
|
|
|
(* Copyright 1996 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. *)
|
|
|
|
(* *)
|
|
|
|
(**************************************************************************)
|
1995-12-15 02:18:29 -08:00
|
|
|
|
2019-03-13 03:46:37 -07:00
|
|
|
(** Lambda simplification.
|
2018-09-12 00:51:47 -07:00
|
|
|
|
|
|
|
{b Warning:} this module is unstable and part of
|
2018-09-12 06:36:40 -07:00
|
|
|
{{!Compiler_libs}compiler-libs}.
|
2018-09-12 00:51:47 -07:00
|
|
|
|
|
|
|
*)
|
2017-06-01 14:02:12 -07:00
|
|
|
|
2011-07-20 02:17:07 -07:00
|
|
|
(* Elimination of useless Llet(Alias) bindings.
|
|
|
|
Transformation of let-bound references into variables.
|
|
|
|
Simplification over staticraise/staticcatch constructs.
|
|
|
|
Generation of tail-call annotations if -annot is set. *)
|
1995-12-15 02:18:29 -08:00
|
|
|
|
|
|
|
open Lambda
|
|
|
|
|
2019-03-13 03:46:37 -07:00
|
|
|
val simplify_lambda: lambda -> lambda
|
2011-07-20 02:17:07 -07:00
|
|
|
|
2015-12-23 08:24:52 -08:00
|
|
|
val split_default_wrapper
|
2016-12-08 09:47:02 -08:00
|
|
|
: id:Ident.t
|
2016-11-03 06:24:14 -07:00
|
|
|
-> kind:function_kind
|
2018-11-23 06:34:05 -08:00
|
|
|
-> params:(Ident.t * Lambda.value_kind) list
|
|
|
|
-> return:Lambda.value_kind
|
2016-11-03 06:24:14 -07:00
|
|
|
-> body:lambda
|
|
|
|
-> attr:function_attribute
|
2020-03-17 07:59:42 -07:00
|
|
|
-> loc:Lambda.scoped_location
|
2015-12-23 08:24:52 -08:00
|
|
|
-> (Ident.t * lambda) list
|