summaryrefslogtreecommitdiff
path: root/asmcomp/split.ml
diff options
context:
space:
mode:
authorFabrice Le Fessant <Fabrice.Le_fessant@inria.fr>2014-05-09 12:01:21 +0000
committerFabrice Le Fessant <Fabrice.Le_fessant@inria.fr>2014-05-09 12:01:21 +0000
commit457958a9e6ed855935beeea8720e854049864503 (patch)
treef8a9dbad4fae58a7d65a162a294883ce5697afc4 /asmcomp/split.ml
parentb6500cc2a4ab8a50565247976da0ce17b3940587 (diff)
downloadocaml-457958a9e6ed855935beeea8720e854049864503.tar.gz
Add reset functions to make modules reentrant when used through compiler-libs
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14770 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'asmcomp/split.ml')
-rw-r--r--asmcomp/split.ml7
1 files changed, 6 insertions, 1 deletions
diff --git a/asmcomp/split.ml b/asmcomp/split.ml
index 9e076e6481..919c980dce 100644
--- a/asmcomp/split.ml
+++ b/asmcomp/split.ml
@@ -195,8 +195,13 @@ let set_repres i =
(* Entry point *)
-let fundecl f =
+let reset () =
equiv_classes := Reg.Map.empty;
+ exit_subst := []
+
+let fundecl f =
+ reset ();
+
let new_args = Array.copy f.fun_args in
let (new_body, sub_body) = rename f.fun_body (Some Reg.Map.empty) in
repres_regs new_args;