From 905143bfa21672fef20e55ebe7a8233cd26881c5 Mon Sep 17 00:00:00 2001 From: Fabrice Le Fessant Date: Wed, 18 Apr 2012 08:50:26 +0000 Subject: Add hooks in Asmgen Add hooks in Asmgen to allow external developers to add new passes on the typedtree, lambda, clambda and cmm trees. A library 'ocamlopt.cm{a/xa}' is installed, with optmain.cm{x/o}, so that developers can create new ocamlopt executables containing these new passes. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12370 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02 --- asmcomp/asmgen.mli | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'asmcomp/asmgen.mli') diff --git a/asmcomp/asmgen.mli b/asmcomp/asmgen.mli index f71cba8f7c..cc249a9e9d 100644 --- a/asmcomp/asmgen.mli +++ b/asmcomp/asmgen.mli @@ -23,3 +23,15 @@ val compile_phrase : type error = Assembler_error of string exception Error of error val report_error: Format.formatter -> error -> unit + +type 'a hook = ('a -> 'a) + +val add_typedtree_hook : + (Typedtree.structure * Typedtree.module_coercion) hook -> unit +val add_lambda_hook : (int * Lambda.lambda) hook -> unit +val add_clambda_hook : Clambda.ulambda hook -> unit +val add_cmm_hook : Cmm.fundecl hook -> unit + +val eval_typedtree_hooks : + (Typedtree.structure * Typedtree.module_coercion) hook +val eval_lambda_hooks : (int * Lambda.lambda) hook -- cgit v1.2.1