@@ -17,6 +17,7 @@ type atom =
17
17
| Value_int
18
18
| Unboxed_float
19
19
| Unboxed_int of Lambda .boxed_integer
20
+ | Unboxed_vector of Lambda .boxed_vector
20
21
21
22
let rec fold_left_layout (f : 'acc -> 'e -> atom -> 'acc ) (acc : 'acc )
22
23
(expr : Clambda.ulambda ) (layout : Clambda_primitives.layout ) : 'acc =
@@ -28,6 +29,7 @@ let rec fold_left_layout (f : 'acc -> 'e -> atom -> 'acc) (acc : 'acc)
28
29
closure."
29
30
| Punboxed_float -> f acc expr Unboxed_float
30
31
| Punboxed_int bi -> f acc expr (Unboxed_int bi)
32
+ | Punboxed_vector bv -> f acc expr (Unboxed_vector bv)
31
33
| Pvalue Pintval -> f acc expr Value_int
32
34
| Pvalue _ -> f acc expr Value
33
35
| Punboxed_product layouts ->
@@ -59,6 +61,7 @@ let print_atom ppf = function
59
61
| Unboxed_int Pint32 -> Format. fprintf ppf " unboxed_int32"
60
62
| Unboxed_int Pint64 -> Format. fprintf ppf " unboxed_int64"
61
63
| Unboxed_int Pnativeint -> Format. fprintf ppf " unboxed_nativeint"
64
+ | Unboxed_vector Pvec128 -> Format. fprintf ppf " unboxed_vec128"
62
65
63
66
let equal_decomposition = ( = )
64
67
@@ -80,6 +83,7 @@ let rec decompose (layout : Lambda.layout) : _ decomposition' =
80
83
closure."
81
84
| Punboxed_float -> Gc_invisible (() , Unboxed_float )
82
85
| Punboxed_int bi -> Gc_invisible (() , Unboxed_int bi)
86
+ | Punboxed_vector bv -> Gc_invisible (() , Unboxed_vector bv)
83
87
| Pvalue Pintval -> Gc_invisible (() , Value_int )
84
88
| Pvalue _ -> Gc_visible (() , Value )
85
89
| Punboxed_product l -> Product (Array. of_list (List. map decompose l))
@@ -105,7 +109,9 @@ let rec fold_decompose (f1 : 'acc -> 'a -> atom -> 'acc * 'b)
105
109
acc, Product elts
106
110
107
111
let atom_size (layout : atom ) =
108
- match layout with Value | Value_int | Unboxed_float | Unboxed_int _ -> 1
112
+ match layout with
113
+ | Value | Value_int | Unboxed_float | Unboxed_int _ -> 1
114
+ | Unboxed_vector Pvec128 -> 2
109
115
110
116
let assign_invisible_offsets init_pos (var , dec ) =
111
117
let f_visible acc () _layout = acc, () in
0 commit comments