diff options
Diffstat (limited to 'gcc/objc')
-rw-r--r-- | gcc/objc/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/objc/objc-act.c | 4 | ||||
-rw-r--r-- | gcc/objc/objc-act.h | 3 | ||||
-rw-r--r-- | gcc/objc/objc-map.c | 10 | ||||
-rw-r--r-- | gcc/objc/objc-next-runtime-abi-02.c | 4 |
5 files changed, 21 insertions, 11 deletions
diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog index bcc5b82..73a41b6 100644 --- a/gcc/objc/ChangeLog +++ b/gcc/objc/ChangeLog @@ -1,3 +1,14 @@ +2014-05-17 Trevor Saunders <tsaunders@mozilla.com> + + * objc-act.c (objc_build_string_object): Adjust. + (continue_class): Likewise. + * objc-act.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Likewise. + * objc-map.c (objc_map_alloc_ggc): Likewise. + (objc_map_private_resize): Likewise. + * objc-next-runtime-abi-02.c (objc_next_runtime_abi_02_init): + Likewise. + (hash_name_enter): Likewise. + 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com> Mike Stump <mikestump@comcast.net> Richard Sandiford <rdsandiford@googlemail.com> diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index ff5d1e5..03b4150 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -3199,7 +3199,7 @@ objc_build_string_object (tree string) if (!desc) { - *loc = desc = ggc_alloc_string_descriptor (); + *loc = desc = ggc_alloc<string_descriptor> (); desc->literal = string; desc->constructor = (*runtime.build_const_string_constructor) (input_location, string, length); @@ -7032,7 +7032,7 @@ continue_class (tree klass) uprivate_record = CLASS_STATIC_TEMPLATE (implementation_template); objc_instance_type = build_pointer_type (uprivate_record); - imp_entry = ggc_alloc_imp_entry (); + imp_entry = ggc_alloc<struct imp_entry> (); imp_entry->next = imp_list; imp_entry->imp_context = klass; diff --git a/gcc/objc/objc-act.h b/gcc/objc/objc-act.h index 0c7fa04..7e1e265 100644 --- a/gcc/objc/objc-act.h +++ b/gcc/objc/objc-act.h @@ -192,8 +192,7 @@ typedef enum objc_property_assign_semantics { #define SIZEOF_OBJC_TYPE_LANG_SPECIFIC sizeof (struct lang_type) #define ALLOC_OBJC_TYPE_LANG_SPECIFIC(NODE) \ do { \ - TYPE_LANG_SPECIFIC (NODE) \ - = ggc_alloc_cleared_lang_type (sizeof (struct lang_type)); \ + TYPE_LANG_SPECIFIC (NODE) = ggc_cleared_alloc<struct lang_type> (); \ } while (0) #define TYPE_HAS_OBJC_INFO(TYPE) \ diff --git a/gcc/objc/objc-map.c b/gcc/objc/objc-map.c index 386d2c5..aaee729 100644 --- a/gcc/objc/objc-map.c +++ b/gcc/objc/objc-map.c @@ -56,7 +56,7 @@ next_power_of_two (size_t x) objc_map_t objc_map_alloc_ggc (size_t initial_capacity) { - objc_map_t map = (objc_map_t) ggc_internal_cleared_vec_alloc (1, sizeof (struct objc_map_private)); + objc_map_t map = ggc_cleared_alloc<objc_map_private> (); if (map == NULL) OUT_OF_MEMORY; @@ -67,8 +67,8 @@ objc_map_alloc_ggc (size_t initial_capacity) map->maximum_load_factor = 70; map->max_number_of_non_empty_slots = (initial_capacity * map->maximum_load_factor) / 100; - map->slots = (tree *)ggc_internal_cleared_vec_alloc (initial_capacity, sizeof (tree)); - map->values = (tree *)ggc_internal_cleared_vec_alloc (initial_capacity, sizeof (tree)); + map->slots = ggc_cleared_vec_alloc<tree> (initial_capacity); + map->values = ggc_cleared_vec_alloc<tree> (initial_capacity); if (map->slots == NULL) OUT_OF_MEMORY; @@ -112,8 +112,8 @@ objc_map_private_resize (objc_map_t map, size_t new_number_of_slots) map->max_number_of_non_empty_slots = (map->number_of_slots * map->maximum_load_factor) / 100; - map->slots = (tree *)ggc_internal_cleared_vec_alloc (map->number_of_slots, sizeof (tree)); - map->values = (tree *)ggc_internal_cleared_vec_alloc (map->number_of_slots, sizeof (tree)); + map->slots = ggc_cleared_vec_alloc<tree> (map->number_of_slots); + map->values = ggc_cleared_vec_alloc<tree> (map->number_of_slots); if (map->slots == NULL) OUT_OF_MEMORY; diff --git a/gcc/objc/objc-next-runtime-abi-02.c b/gcc/objc/objc-next-runtime-abi-02.c index ee43d2d..85033a3 100644 --- a/gcc/objc/objc-next-runtime-abi-02.c +++ b/gcc/objc/objc-next-runtime-abi-02.c @@ -238,7 +238,7 @@ static GTY ((length ("SIZEHASHTABLE"))) hash *extern_names; bool objc_next_runtime_abi_02_init (objc_runtime_hooks *rthooks) { - extern_names = ggc_alloc_cleared_vec_hash (SIZEHASHTABLE); + extern_names = ggc_cleared_vec_alloc<hash> (SIZEHASHTABLE); if (flag_objc_exceptions && flag_objc_sjlj_exceptions) { @@ -857,7 +857,7 @@ hash_name_enter (hash *hashlist, tree id) hash obj; int slot = IDENTIFIER_HASH_VALUE (DECL_NAME (id)) % SIZEHASHTABLE; - obj = ggc_alloc_hashed_entry (); + obj = ggc_alloc<hashed_entry> (); obj->list = 0; obj->next = hashlist[slot]; obj->key = id; |