@@ -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_locality ~poly p.prim_native_repr_res in
154
145
let arg_modes = List. map (to_modify_mode ~poly ) p.prim_native_repr_args in
@@ -428,40 +419,6 @@ let lookup_primitive loc poly pos p =
428
419
| "%unbox_float" -> Primitive (Punbox_float , 1 )
429
420
| "%box_float" -> Primitive (Pbox_float mode, 1 )
430
421
| "%get_header" -> Primitive (Pget_header mode, 1 )
431
- (* unboxed pairs of void *)
432
- | "%make_unboxed_pair_o_o" ->
433
- Primitive (Pmake_unboxed_product [Punboxed_product []; Punboxed_product []], 2 )
434
- | "%unboxed_pair_field_0_o_o" ->
435
- Primitive (Punboxed_product_field (0 , [Punboxed_product []; Punboxed_product []]), 1 )
436
- | "%unboxed_pair_field_1_o_o" ->
437
- Primitive (Punboxed_product_field (1 , [Punboxed_product []; Punboxed_product []]), 1 )
438
- (* unboxed pairs of values *)
439
- | "%make_unboxed_pair_v_v" ->
440
- Primitive (Pmake_unboxed_product [Pvalue Pgenval ; Pvalue Pgenval ], 2 )
441
- | "%unboxed_pair_field_0_v_v" ->
442
- Primitive (Punboxed_product_field (0 , [Pvalue Pgenval ; Pvalue Pgenval ]), 1 )
443
- | "%unboxed_pair_field_1_v_v" ->
444
- Primitive (Punboxed_product_field (1 , [Pvalue Pgenval ; Pvalue Pgenval ]), 1 )
445
- (* unboxed pairs of immediates *)
446
- | "%make_unboxed_pair_i_i" ->
447
- Primitive (Pmake_unboxed_product [Pvalue Pintval ; Pvalue Pintval ], 2 )
448
- | "%unboxed_pair_field_0_i_i" ->
449
- Primitive (Punboxed_product_field (0 , [Pvalue Pintval ; Pvalue Pintval ]), 1 )
450
- | "%unboxed_pair_field_1_i_i" ->
451
- Primitive (Punboxed_product_field (1 , [Pvalue Pintval ; Pvalue Pintval ]), 1 )
452
- (* unboxed pairs of (unboxed pairs of values) *)
453
- | "%make_unboxed_pair_vup_vup" ->
454
- Primitive (Pmake_unboxed_product [layout_unboxed_pair_of_values; layout_unboxed_pair_of_values], 2 )
455
- | "%unboxed_pair_field_0_vup_vup" ->
456
- Primitive (Punboxed_product_field (0 , two_unboxed_pairs_of_values), 1 )
457
- | "%unboxed_pair_field_1_vup_vup" ->
458
- Primitive (Punboxed_product_field (1 , two_unboxed_pairs_of_values), 1 )
459
- (* unboxed triples (void, int, void) *)
460
- | "%make_unboxed_triple_o_i_o" ->
461
- Primitive (Pmake_unboxed_product [Punboxed_product []; Pvalue Pintval ; Punboxed_product []], 3 )
462
- (* void is special as the external is declared to have one parameter
463
- but the primitive takes zero arguments *)
464
- | "%void" -> Void
465
422
| s when String. length s > 0 && s.[0 ] = '%' ->
466
423
raise(Error (loc, Unknown_builtin_primitive s))
467
424
| _ -> External p
@@ -889,7 +846,6 @@ let lambda_of_prim prim_name prim loc args arg_exps =
889
846
ap_region_close = pos;
890
847
ap_mode = alloc_heap;
891
848
}
892
- | Void , _ -> Lprim (Pmake_unboxed_product [] , [] , loc)
893
849
| (Raise _ | Raise_with_backtrace
894
850
| Lazy_force _ | Loc _ | Primitive _ | Sys_argv | Comparison _
895
851
| Send _ | Send_self _ | Send_cache _ | Frame_pointers | Identity
@@ -918,7 +874,6 @@ let check_primitive_arity loc p =
918
874
| Frame_pointers -> p.prim_arity = 0
919
875
| Identity -> p.prim_arity = 1
920
876
| Apply _ | Revapply _ -> p.prim_arity = 2
921
- | Void -> true
922
877
in
923
878
if not ok then raise(Error (loc, Wrong_arity_builtin_primitive p.prim_name))
924
879
@@ -1040,7 +995,7 @@ let primitive_needs_event_after = function
1040
995
lambda_primitive_needs_event_after (comparison_primitive comp knd)
1041
996
| Lazy_force _ | Send _ | Send_self _ | Send_cache _
1042
997
| Apply _ | Revapply _ -> true
1043
- | Raise _ | Raise_with_backtrace | Loc _ | Frame_pointers | Identity | Void -> false
998
+ | Raise _ | Raise_with_backtrace | Loc _ | Frame_pointers | Identity -> false
1044
999
1045
1000
let transl_primitive_application loc p env ty mode path exp args arg_exps pos =
1046
1001
let prim =
0 commit comments