Skip to content

Commit efa471f

Browse files
committed
---
yaml --- r: 694 b: refs/heads/master c: 71d49a2 h: refs/heads/master v: v3
1 parent 528af30 commit efa471f

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: c5f4789d5b75d3098665b17d318144cb7c54f42a
2+
refs/heads/master: 71d49a20a7f76602501e274cc089758b58d225ce

trunk/src/boot/me/trans.ml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2715,18 +2715,24 @@ let trans_visitor
27152715
mov tmp (Il.Cell src_tag);
27162716
for i = 0 to n-1
27172717
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
27232718
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
27302736
done;
27312737

27322738
and seq_unit_ty (seq:Ast.ty) : Ast.ty =

0 commit comments

Comments
 (0)