Skip to content

Commit

Permalink
Recursively drop a type's parts if the type uses any typarams, since …
Browse files Browse the repository at this point in the history
…those typarams may represent types that actually require dropping.
  • Loading branch information
froystig committed Sep 7, 2010
1 parent cf62b54 commit 5e5112d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/boot/me/trans.ml
Expand Up @@ -2883,11 +2883,13 @@ let trans_visitor
patch null_jmp;
note_drop_step ty "drop_ty: done box-drop path";

| MEM_interior when type_points_to_heap ty ->
note_drop_step ty "drop_ty heap-referencing path";
| MEM_interior
when type_points_to_heap ty || (n_used_type_params ty > 0) ->
note_drop_step ty "drop_ty possibly-heap-referencing path";
iter_ty_parts ty_params cell ty
(drop_ty ty_params) curr_iso;
note_drop_step ty "drop_ty: done heap-referencing path";
note_drop_step ty
"drop_ty: done possibly-heap-referencing path";


| MEM_interior ->
Expand Down

0 comments on commit 5e5112d

Please sign in to comment.