aboutsummaryrefslogtreecommitdiff
path: root/src/tac2ffi.ml
diff options
context:
space:
mode:
Diffstat (limited to 'src/tac2ffi.ml')
-rw-r--r--src/tac2ffi.ml12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/tac2ffi.ml b/src/tac2ffi.ml
index a0c51783ed..c3f535c1bc 100644
--- a/src/tac2ffi.ml
+++ b/src/tac2ffi.ml
@@ -122,6 +122,18 @@ let list r = {
r_id = false;
}
+let of_closure cls = ValCls cls
+
+let to_closure = function
+| ValCls cls -> cls
+| ValExt _ | ValInt _ | ValBlk _ | ValStr _ | ValOpn _ -> assert false
+
+let closure = {
+ r_of = of_closure;
+ r_to = to_closure;
+ r_id = false;
+}
+
let of_ext tag c =
ValExt (tag, c)