diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2015-08-21 15:21:36 +0200 |
---|---|---|
committer | Bernhard Schommer <bernhardschommer@gmail.com> | 2015-08-21 15:21:36 +0200 |
commit | 8d2e4a51d56b7f4d3673a5132edd1adb37a14295 (patch) | |
tree | ae812b2aea814c14c2c64a32c46ae14791e9dc25 /lib | |
parent | 5f798720574bf9d694da271e3e8bf699a4726497 (diff) | |
download | compcert-8d2e4a51d56b7f4d3673a5132edd1adb37a14295.tar.gz compcert-8d2e4a51d56b7f4d3673a5132edd1adb37a14295.zip |
Added symbol functions for printing of the location for global variables.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Camlcoq.ml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Camlcoq.ml b/lib/Camlcoq.ml index 68c095f0..5eb52e88 100644 --- a/lib/Camlcoq.ml +++ b/lib/Camlcoq.ml @@ -284,6 +284,7 @@ let coqint_of_camlint64 : int64 -> Integers.Int64.int = Z.of_uint64 type atom = positive let atom_of_string = (Hashtbl.create 17 : (string, atom) Hashtbl.t) +let atom_of_stamp = (Hashtbl.create 17: (int, atom) Hashtbl.t) let string_of_atom = (Hashtbl.create 17 : (atom, string) Hashtbl.t) let next_atom = ref Coq_xH @@ -297,6 +298,12 @@ let intern_string s = Hashtbl.add string_of_atom a s; a +let add_stamp s a = + Hashtbl.add atom_of_stamp s a + +let stamp_atom s = + Hashtbl.find atom_of_stamp s + let extern_atom a = try Hashtbl.find string_of_atom a |