Skip to content

Commit 6470fdd

Browse files
committed
---
yaml --- r: 1130 b: refs/heads/master c: d7cbeba h: refs/heads/master v: v3
1 parent 9b28c49 commit 6470fdd

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
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: 6443179bcab63c440203a321297d32f5b2a2f8e0
2+
refs/heads/master: d7cbeba731716f176f4c116cfe92f3ec246e1396

trunk/src/boot/me/semant.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2425,7 +2425,7 @@ and referent_type
24252425
Some parent_tags
24262426
when boxed
24272427
&& parent_tags <> []
2428-
&& List.mem ttag parent_tags
2428+
&& (list_count ttag parent_tags) > 1
24292429
&& is_back_edge ttag (List.hd parent_tags) ->
24302430
Il.StructTy [| word; Il.OpaqueTy |]
24312431
| _ -> tag ttag

trunk/src/boot/util/common.ml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,13 @@ let rec list_drop n ls =
380380
else list_drop (n-1) (List.tl ls)
381381
;;
382382

383+
let rec list_count elem lst =
384+
match lst with
385+
[] -> 0
386+
| h::t when h = elem -> 1 + (list_count elem t)
387+
| _::t -> list_count elem t
388+
;;
389+
383390

384391
(*
385392
* Auxiliary pair functions.

0 commit comments

Comments
 (0)