summaryrefslogtreecommitdiff
path: root/src/value.ml
diff options
context:
space:
mode:
Diffstat (limited to 'src/value.ml')
-rw-r--r--src/value.ml9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/value.ml b/src/value.ml
index 6ccecac0..6c2e0839 100644
--- a/src/value.ml
+++ b/src/value.ml
@@ -170,6 +170,10 @@ let coerce_tuple = function
| V_tuple vs -> vs
| _ -> assert false
+let coerce_list = function
+ | V_list vs -> vs
+ | _ -> assert false
+
let coerce_listlike = function
| V_tuple vs -> vs
| V_list vs -> vs
@@ -282,6 +286,10 @@ let value_append = function
| [v1; v2] -> V_vector (coerce_gv v1 @ coerce_gv v2)
| _ -> failwith "value append"
+let value_append_list = function
+ | [v1; v2] -> V_list (coerce_list v1 @ coerce_list v2)
+ | _ -> failwith "value_append_list"
+
let value_slice = function
| [v1; v2; v3] -> V_vector (Sail_lib.slice (coerce_gv v1, coerce_int v2, coerce_int v3))
| _ -> failwith "value slice"
@@ -647,6 +655,7 @@ let primops =
("update_subrange", value_update_subrange);
("slice", value_slice);
("append", value_append);
+ ("append_list", value_append_list);
("not", value_not);
("not_vec", value_not_vec);
("and_vec", value_and_vec);