This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] [2/5] Types reference counting [garbage-collector]


>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Jan> a types garbage collector implementation.  This part is directly
Jan> dependent on the `base' patch.

Jan> +/* Unify type_group of all the type structures found while crawling the
Jan> +   type_group_link_table tree from the starting point type.  DATA contains
Jan> +   type_group_link reference of the starting point type.  Only during the first

I think both of these should read "starting point TYPE", since they
are referring to the value of the variable "type".

Jan> +/* Delete all the instances on TYPE_CHAIN of TYPE, including their referenced
Jan> +   main_type.  TYPE must be a reclaimable type - neither permanent nor objfile
Jan> +   associated.  */
Jan> +
Jan> +static void
Jan> +delete_type_chain (struct type *type)
Jan> +{
Jan> +  struct type *type_iter, *type_iter_to_free;
Jan> +
Jan> +  gdb_assert (TYPE_OBJFILE (type) == NULL);

We don't check that TYPE is reclaimable here, but it seems like we
could.  This isn't very important to me, but I thought I'd see what
you think.

This patch is ok with the comment fix.  Feel free to put in the
reclaimable check if you want.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]