diff options
author | Fabrice Le Fessant <Fabrice.Le_fessant@inria.fr> | 2014-05-09 12:01:21 +0000 |
---|---|---|
committer | Fabrice Le Fessant <Fabrice.Le_fessant@inria.fr> | 2014-05-09 12:01:21 +0000 |
commit | 457958a9e6ed855935beeea8720e854049864503 (patch) | |
tree | f8a9dbad4fae58a7d65a162a294883ce5697afc4 /asmcomp/split.ml | |
parent | b6500cc2a4ab8a50565247976da0ce17b3940587 (diff) | |
download | ocaml-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.ml | 7 |
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; |