File tree 1 file changed +17
-11
lines changed
1 file changed +17
-11
lines changed Original file line number Diff line number Diff line change @@ -2715,18 +2715,24 @@ let trans_visitor
2715
2715
mov tmp (Il. Cell src_tag);
2716
2716
for i = 0 to n-1
2717
2717
do
2718
- (iflog (fun _ ->
2719
- annotate (Printf. sprintf " tag case #%i" i)));
2720
- let jmps =
2721
- trans_compare_simple Il. JNE (Il. Cell tmp) (imm (Int64. of_int i))
2722
- in
2723
2718
let ttup = get_nth_tag_tup cx ttag i in
2724
- iter_tup_parts
2725
- (get_element_ptr_dyn ty_params)
2726
- (get_variant_ptr dst_union i)
2727
- (get_variant_ptr src_union i)
2728
- ttup f;
2729
- List. iter patch jmps
2719
+ if Array. length ttup <> 0
2720
+ then
2721
+ begin
2722
+ (iflog (fun _ ->
2723
+ annotate (Printf. sprintf " tag case #%i" i)));
2724
+ let jmps =
2725
+ trans_compare_simple Il. JNE
2726
+ (Il. Cell tmp) (imm (Int64. of_int i))
2727
+ in
2728
+ let ttup = get_nth_tag_tup cx ttag i in
2729
+ iter_tup_parts
2730
+ (get_element_ptr_dyn ty_params)
2731
+ (get_variant_ptr dst_union i)
2732
+ (get_variant_ptr src_union i)
2733
+ ttup f;
2734
+ List. iter patch jmps
2735
+ end
2730
2736
done ;
2731
2737
2732
2738
and seq_unit_ty (seq :Ast.ty ) : Ast.ty =
You can’t perform that action at this time.
0 commit comments