@@ -94,7 +94,6 @@ type prim =
94
94
| Identity
95
95
| Apply of Lambda .region_close * Lambda .layout
96
96
| Revapply of Lambda .region_close * Lambda .layout
97
- | Void
98
97
99
98
let units_with_used_primitives = Hashtbl. create 7
100
99
let add_used_primitive loc env path =
@@ -141,14 +140,6 @@ let to_modify_mode ~poly = function
141
140
| None -> assert false
142
141
| Some mode -> transl_modify_mode mode
143
142
144
- let layout_unboxed_pair_of_values =
145
- Punboxed_product [Pvalue Pgenval ; Pvalue Pgenval ]
146
-
147
- let two_unboxed_pairs_of_values =
148
- [ layout_unboxed_pair_of_values;
149
- layout_unboxed_pair_of_values;
150
- ]
151
-
152
143
let lookup_primitive loc poly pos p =
153
144
let mode = to_alloc_mode ~poly p.prim_native_repr_res in
154
145
let arg_modes = List. map (to_modify_mode ~poly ) p.prim_native_repr_args in
@@ -427,40 +418,6 @@ let lookup_primitive loc poly pos p =
427
418
| "%array_of_iarray" -> Primitive (Parray_of_iarray , 1 )
428
419
| "%unbox_float" -> Primitive (Punbox_float , 1 )
429
420
| "%box_float" -> Primitive (Pbox_float mode, 1 )
430
- (* unboxed pairs of void *)
431
- | "%make_unboxed_pair_o_o" ->
432
- Primitive (Pmake_unboxed_product [Punboxed_product []; Punboxed_product []], 2 )
433
- | "%unboxed_pair_field_0_o_o" ->
434
- Primitive (Punboxed_product_field (0 , [Punboxed_product []; Punboxed_product []]), 1 )
435
- | "%unboxed_pair_field_1_o_o" ->
436
- Primitive (Punboxed_product_field (1 , [Punboxed_product []; Punboxed_product []]), 1 )
437
- (* unboxed pairs of values *)
438
- | "%make_unboxed_pair_v_v" ->
439
- Primitive (Pmake_unboxed_product [Pvalue Pgenval ; Pvalue Pgenval ], 2 )
440
- | "%unboxed_pair_field_0_v_v" ->
441
- Primitive (Punboxed_product_field (0 , [Pvalue Pgenval ; Pvalue Pgenval ]), 1 )
442
- | "%unboxed_pair_field_1_v_v" ->
443
- Primitive (Punboxed_product_field (1 , [Pvalue Pgenval ; Pvalue Pgenval ]), 1 )
444
- (* unboxed pairs of immediates *)
445
- | "%make_unboxed_pair_i_i" ->
446
- Primitive (Pmake_unboxed_product [Pvalue Pintval ; Pvalue Pintval ], 2 )
447
- | "%unboxed_pair_field_0_i_i" ->
448
- Primitive (Punboxed_product_field (0 , [Pvalue Pintval ; Pvalue Pintval ]), 1 )
449
- | "%unboxed_pair_field_1_i_i" ->
450
- Primitive (Punboxed_product_field (1 , [Pvalue Pintval ; Pvalue Pintval ]), 1 )
451
- (* unboxed pairs of (unboxed pairs of values) *)
452
- | "%make_unboxed_pair_vup_vup" ->
453
- Primitive (Pmake_unboxed_product [layout_unboxed_pair_of_values; layout_unboxed_pair_of_values], 2 )
454
- | "%unboxed_pair_field_0_vup_vup" ->
455
- Primitive (Punboxed_product_field (0 , two_unboxed_pairs_of_values), 1 )
456
- | "%unboxed_pair_field_1_vup_vup" ->
457
- Primitive (Punboxed_product_field (1 , two_unboxed_pairs_of_values), 1 )
458
- (* unboxed triples (void, int, void) *)
459
- | "%make_unboxed_triple_o_i_o" ->
460
- Primitive (Pmake_unboxed_product [Punboxed_product []; Pvalue Pintval ; Punboxed_product []], 3 )
461
- (* void is special as the external is declared to have one parameter
462
- but the primitive takes zero arguments *)
463
- | "%void" -> Void
464
421
| s when String. length s > 0 && s.[0 ] = '%' ->
465
422
raise(Error (loc, Unknown_builtin_primitive s))
466
423
| _ -> External p
@@ -888,7 +845,6 @@ let lambda_of_prim prim_name prim loc args arg_exps =
888
845
ap_region_close = pos;
889
846
ap_mode = alloc_heap;
890
847
}
891
- | Void , _ -> Lprim (Pmake_unboxed_product [] , [] , loc)
892
848
| (Raise _ | Raise_with_backtrace
893
849
| Lazy_force _ | Loc _ | Primitive _ | Sys_argv | Comparison _
894
850
| Send _ | Send_self _ | Send_cache _ | Frame_pointers | Identity
@@ -917,7 +873,6 @@ let check_primitive_arity loc p =
917
873
| Frame_pointers -> p.prim_arity = 0
918
874
| Identity -> p.prim_arity = 1
919
875
| Apply _ | Revapply _ -> p.prim_arity = 2
920
- | Void -> true
921
876
in
922
877
if not ok then raise(Error (loc, Wrong_arity_builtin_primitive p.prim_name))
923
878
@@ -1039,7 +994,7 @@ let primitive_needs_event_after = function
1039
994
lambda_primitive_needs_event_after (comparison_primitive comp knd)
1040
995
| Lazy_force _ | Send _ | Send_self _ | Send_cache _
1041
996
| Apply _ | Revapply _ -> true
1042
- | Raise _ | Raise_with_backtrace | Loc _ | Frame_pointers | Identity | Void -> false
997
+ | Raise _ | Raise_with_backtrace | Loc _ | Frame_pointers | Identity -> false
1043
998
1044
999
let transl_primitive_application loc p env ty mode path exp args arg_exps pos =
1045
1000
let prim =
0 commit comments