summaryrefslogtreecommitdiff
path: root/asmcomp/asmgen.mli
diff options
context:
space:
mode:
authorFabrice Le Fessant <Fabrice.Le_fessant@inria.fr>2012-04-18 08:50:26 +0000
committerFabrice Le Fessant <Fabrice.Le_fessant@inria.fr>2012-04-18 08:50:26 +0000
commit905143bfa21672fef20e55ebe7a8233cd26881c5 (patch)
tree13eea7a06c6dcea2416011ad873e337380c19acf /asmcomp/asmgen.mli
parent3930c2fd79e43bd02e3bc79d6b047f3aeab0effe (diff)
downloadocaml-905143bfa21672fef20e55ebe7a8233cd26881c5.tar.gz
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
Diffstat (limited to 'asmcomp/asmgen.mli')
-rw-r--r--asmcomp/asmgen.mli12
1 files changed, 12 insertions, 0 deletions
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