Skip to content

Commit 1d4b4b3

Browse files
committed
fixes after rebase
1 parent 3e83174 commit 1d4b4b3

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

backend/regalloc/regalloc_invariants.ml

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ let precondition : Cfg_with_layout.t -> unit =
1717
| Const_int _ -> ()
1818
| Const_float _ -> ()
1919
| Const_symbol _ -> ()
20+
| Const_vec128 _ -> ()
2021
| Stackoffset _ -> ()
2122
| Load _ -> ()
2223
| Store _ -> ()

middle_end/flambda2/from_lambda/lambda_to_flambda.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1197,7 +1197,7 @@ let rec cps acc env ccenv (lam : L.lambda) (k : cps_continuation)
11971197
let id = Ident.create_local name in
11981198
let result_layout = L.primitive_result_layout prim in
11991199
(match result_layout with
1200-
| Pvalue _ | Punboxed_float | Punboxed_int _ -> ()
1200+
| Pvalue _ | Punboxed_float | Punboxed_int _ | Punboxed_vector _ -> ()
12011201
| Ptop | Pbottom ->
12021202
Misc.fatal_errorf "Invalid result layout %a for primitive %a"
12031203
Printlambda.layout result_layout Printlambda.primitive prim);

ocaml/lambda/lambda.ml

+3
Original file line numberDiff line numberDiff line change
@@ -650,6 +650,8 @@ let layout_functor = Pvalue Pgenval
650650
let layout_boxed_float = Pvalue Pfloatval
651651
let layout_string = Pvalue Pgenval
652652
let layout_boxedint bi = Pvalue (Pboxedintval bi)
653+
654+
let layout_boxed_vector vi = Pvalue (Pboxedvectorval vi)
653655
let layout_lazy = Pvalue Pgenval
654656
let layout_lazy_contents = Pvalue Pgenval
655657
let layout_any_value = Pvalue Pgenval
@@ -1453,6 +1455,7 @@ let primitive_result_layout (p : primitive) =
14531455
| Punbox_float -> Punboxed_float
14541456
| Pccall { prim_native_repr_res = _, Untagged_int; _} -> layout_int
14551457
| Pccall { prim_native_repr_res = _, Unboxed_float; _} -> layout_boxed_float
1458+
| Pccall { prim_native_repr_res = _, Unboxed_vector v; _} -> layout_boxed_vector v
14561459
| Pccall { prim_native_repr_res = _, Same_as_ocaml_repr s; _} ->
14571460
begin match s with
14581461
| Value -> layout_any_value

ocaml/typing/primitive.ml

+8-5
Original file line numberDiff line numberDiff line change
@@ -301,16 +301,19 @@ let equal_native_repr nr1 nr2 =
301301
match nr1, nr2 with
302302
| Same_as_ocaml_repr s1, Same_as_ocaml_repr s2 -> Sort.equal_const s1 s2
303303
| Same_as_ocaml_repr _,
304-
(Unboxed_float | Unboxed_integer _ | Untagged_int) -> false
304+
(Unboxed_float | Unboxed_integer _ | Untagged_int | Unboxed_vector _) -> false
305305
| Unboxed_float, Unboxed_float -> true
306306
| Unboxed_float,
307-
(Same_as_ocaml_repr _ | Unboxed_integer _ | Untagged_int) -> false
307+
(Same_as_ocaml_repr _ | Unboxed_integer _ | Untagged_int | Unboxed_vector _) -> false
308308
| Unboxed_integer bi1, Unboxed_integer bi2 -> equal_boxed_integer bi1 bi2
309309
| Unboxed_integer _,
310-
(Same_as_ocaml_repr _ | Unboxed_float | Untagged_int) -> false
310+
(Same_as_ocaml_repr _ | Unboxed_float | Untagged_int | Unboxed_vector _) -> false
311311
| Untagged_int, Untagged_int -> true
312312
| Untagged_int,
313-
(Same_as_ocaml_repr _ | Unboxed_float | Unboxed_integer _) -> false
313+
(Same_as_ocaml_repr _ | Unboxed_float | Unboxed_integer _ | Unboxed_vector _) -> false
314+
| Unboxed_vector v1, Unboxed_vector v2 -> equal_boxed_vector v1 v2
315+
| Unboxed_vector _,
316+
(Same_as_ocaml_repr _ | Unboxed_float | Unboxed_integer _ | Untagged_int ) -> false
314317

315318
let equal_effects ef1 ef2 =
316319
match ef1, ef2 with
@@ -334,7 +337,7 @@ let native_name_is_external p =
334337

335338
let sort_of_native_repr = function
336339
| Same_as_ocaml_repr s -> s
337-
| (Unboxed_float | Unboxed_integer _ | Untagged_int) -> Sort.Value
340+
| (Unboxed_float | Unboxed_integer _ | Untagged_int | Unboxed_vector _) -> Sort.Value
338341

339342
let report_error ppf err =
340343
match err with

0 commit comments

Comments
 (0)