1 2016-08-12 Marek Polacek <polacek@redhat.com>
4 * objc-encoding.c (encode_type): Add FALLTHRU.
6 2016-06-07 David Malcolm <dmalcolm@redhat.com>
8 * objc-act.c (objc_build_component_ref): Update call
9 to build_component_ref for added param, passing UNKNOWN_LOCATION.
11 2016-04-18 Michael Matz <matz@suse.de>
13 * objc-act.c (objc_build_struct): Use SET_DECL_ALIGN.
15 2016-02-12 Jakub Jelinek <jakub@redhat.com>
17 * objc-act.c: Spelling fixes - behaviour -> behavior and
18 neighbour -> neighbor.
19 * objc-map.h: Likewise.
21 2016-01-04 Jakub Jelinek <jakub@redhat.com>
23 Update copyright years.
25 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
27 * objc-act.c: Remove unused header files.
28 * objc-encoding.c: Likewise.
29 * objc-gnu-runtime-abi-01.c: Likewise.
30 * objc-lang.c: Likewise.
31 * objc-map.c: Likewise.
32 * objc-next-runtime-abi-01.c: Likewise.
33 * objc-next-runtime-abi-02.c: Likewise.
34 * objc-runtime-shared-support.c: Likewise.
36 2015-11-09 Alan Modra <amodra@gmail.com>
38 * objc-encoding.c (encode_aggregate_within): Cast obstack_next_free
41 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
43 * objc-lang.c: Reorder #include's and remove duplicates.
44 * objc-map.c: Likewise.
46 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
48 * objc-act.h, objc-next-runtime-abi-02.c, objc-runtime-hooks.h:
49 Remove useless typedefs.
51 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
53 * objc-map.h: Fix double word typos.
55 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
57 * objc-act.c: Adjust includes.
58 * objc-encoding.c: Likewise.
59 * objc-gnu-runtime-abi-01.c: Likewise.
60 * objc-lang.c: Likewise.
61 * objc-map.c: Likewise.
62 * objc-next-runtime-abi-01.c: Likewise.
63 * objc-next-runtime-abi-02.c: Likewise.
64 * objc-runtime-shared-support.c: Likewise.
66 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
68 * objc-act.c: Remove ipa-ref.h and plugin-api.h from include list.
70 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
72 * objc-act.c (objc_string_hasher): Inherit from ggc_ptr_hash
73 rather than ggc_hasher.
75 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
77 * objc-act.c (decl_name_hash): Inherit from nofree_ptr_hash rather
78 than typed_noop_remove. Remove redudant typedefs.
80 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
82 * objc-act.c: Do not include input.h, line-map.h or is-a.h.
83 * objc-encoding.c: Likewise.
84 * objc-gnu-runtime-abi-01.c: Likewise.
85 * objc-lang.c: Likewise.
86 * objc-map.c: Likewise.
87 * objc-next-runtime-abi-01.c: Likewise.
88 * objc-next-runtime-abi-02.c: Likewise.
89 * objc-runtime-shared-support.c: Likewise.
91 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
93 * objc-act.c : Adjust include files.
94 * objc-encoding.c : Likewise.
95 * objc-gnu-runtime-abi-01.c : Likewise.
96 * objc-lang.c : Likewise.
97 * objc-map.c : Likewise.
98 * objc-next-runtime-abi-01.c : Likewise.
99 * objc-next-runtime-abi-02.c : Likewise.
100 * objc-runtime-shared-support.c : Likewise.
102 2015-06-08 Aldy Hernandez <aldyh@redhat.com>
104 * objc-runtime-shared-support.c (build_module_descriptor): Set
105 TREE_USED on UOBJC_MODULES_decl.
107 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
109 * objc-act.c (objc_write_global_declarations): Adjust comment.
110 * objc-gnu-runtime-abi-01.c (build_selector_table_decl): Set
113 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
115 * objc-act.c: Adjust includes for restructured coretypes.h.
116 * objc-encoding.c: Likewise.
117 * objc-gnu-runtime-abi-01.c: Likewise.
118 * objc-lang.c: Likewise.
119 * objc-map.c: Likewise.
120 * objc-next-runtime-abi-01.c: Likewise.
121 * objc-next-runtime-abi-02.c: Likewise.
122 * objc-runtime-shared-support.c: Likewise.
124 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
126 * Make-lang.in (objc.mostlyclean): Remove cc1obj.
128 2015-04-18 Trevor Saunders <tsaunders@mozilla.com>
130 * objc-act.c: Adjust for hash_table changes.
132 2015-01-09 Michael Collison <michael.collison@linaro.org>
134 * objc-act.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
135 input.h, alias.h, symtab.h, options, fold-const.h,
136 wide-int.h, and inchash.h due to flattening of tree.h.
137 * objc-encoding.c: Ditto.
138 * objc-gnu-runtime-abi-01.c: Ditto.
139 * objc-lang.c: Ditto.
141 * objc-next-runtime-abi-01.c: Ditto.
142 * objc-next-runtime-abi-02.c: Ditto.
143 * objc-runtime-shared-support.c: Ditto.
145 2015-01-05 Jakub Jelinek <jakub@redhat.com>
147 Update copyright years.
149 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
151 * objc-act.c: Adjust include files.
153 2014-10-22 Alan Modra <amodra@gmail.com>
155 * objc-encoding.c (encode_array): Cast result of obstack_base.
156 (encode_type): Likewise.
158 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
160 * objc-act.c: Adjust include files.
162 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
164 * objc-act.c: use hash_table instead of hashtab.
166 2014-09-15 Jakub Jelinek <jakub@redhat.com>
168 * Make-lang.in (check_objc_parallelize): Change to just an upper
171 2014-07-14 Jan Hubicka <hubicka@ucw.cz>
173 * objc-act.c (objc_common_tree_size): New function.
174 * objc-act.h (KEYWORD_KEY_NAME, KEYWORD_ARG_NAME): Add type
176 (INSTANCE_METHOD_OR_CLASS_METHOD_DECL_CHECK): New macro.
177 (METHOD_SEL_NAME, METHOD_SEL_ARGS, METHOD_ADD_ARGS,
178 METHOD_ADD_ARGS_ELLIPSIS_P, METHOD_DEFINITION, METHOD_ENCODING,
179 METHOD_TYPE_ATTRIBUTES, METHOD_PROPERTY_CONTEXT): Add type checking.
180 (METHOD_SEL_ARGS): Use decl_common.size instead of
181 decl_non_common.result.
182 (PROPERTY_NAME, PROPERTY_GETTER_NAME, PROPERTY_SETTER_NAME,
183 PROPERTY_READONLY, PROPERTY_NONATOMIC, PROPERTY_ASSIGN_SEMANTICS,
184 PROPERTY_IVAR_NAME, PROPERTY_DYNAMIC, PROPERTY_HAS_NO_GETTER,
185 PROPERTY_HAS_NO_SETTER, PROPERTY_OPTIONAL): Add type checking.
186 (objc_common_tree_size): Declare.
187 * objc-lang.c (LANG_HOOKS_TREE_SIZE): New macro.
189 2014-06-24 Jan Hubicka <hubicka@ucw.cz>
191 * objc-act.c (objc_xref_basetypes): Set TYPE_BINFO of type variants,
194 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
196 * objc-act.c: Adjust.
198 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
200 * objc-act.c (objc_build_string_object): Adjust.
201 (continue_class): Likewise.
202 * objc-act.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Likewise.
203 * objc-map.c (objc_map_alloc_ggc): Likewise.
204 (objc_map_private_resize): Likewise.
205 * objc-next-runtime-abi-02.c (objc_next_runtime_abi_02_init):
207 (hash_name_enter): Likewise.
209 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
210 Mike Stump <mikestump@comcast.net>
211 Richard Sandiford <rdsandiford@googlemail.com>
213 * objc-act.c: Include wide-int.h.
214 (objc_decl_method_attributes): Use wide-int interfaces.
216 2014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
219 * objc-act.c (objc_ivar_visibility, objc_default_ivar_visibility): Add.
220 (objc_init): Initialize objc_default_ivar_visibility.
221 (objc_start_class_interface): Use objc_default_ivar_visibility.
222 (objc_start_class_implementation): Likewise.
223 (objc_lookup_ivar): Implement -fno-local-ivars.
225 2014-01-31 Marek Polacek <polacek@redhat.com>
228 * objc-next-runtime-abi-02.c (build_throw_stmt): Pass vNULL to
229 build_function_call_vec.
230 (finish_catch): Likewise.
231 (next_runtime_abi_02_get_class_reference): Likewise.
232 * objc-next-runtime-abi-01.c (build_objc_method_call): Pass vNULL to
233 build_function_call_vec.
234 (build_throw_stmt): Likewise.
235 * objc-gnu-runtime-abi-01.c: (build_objc_method_call): Pass vNULL to
236 build_function_call_vec.
237 (build_throw_stmt): Likewise.
239 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
241 Update copyright years
243 2013-12-04 Joseph Myers <joseph@codesourcery.com>
246 * objc-act.c (objc_synthesize_getter): Update calls to
247 c_sizeof_or_alignof_type.
249 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
251 * objc/objc-act.c: Add required include files from gimple.h.
253 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
255 * objc-encoding.c: Replace tree_low_cst (..., 1) with tree_to_uhwi
258 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
260 * objc-next-runtime-abi-02.c: Replace tree_low_cst (..., 0) with
261 tree_to_shwi throughout.
263 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
265 * objc-act.c: Include only gimplify.h and gimple.h as needed.
267 2013-11-14 Diego Novillo <dnovillo@google.com>
269 * objc-act.c: Include stringpool.h.
270 Include stor-layout.h.
272 * objc-encoding.c: Include stringpool.h.
273 Include stor-layout.h.
274 * objc-gnu-runtime-abi-01.c: Include stringpool.h.
275 * objc-next-runtime-abi-01.c:
276 Include stringpool.h.
277 * objc-next-runtime-abi-02.c: Include stringpool.h.
278 * objc-runtime-shared-support.c: Include stringpool.h.
280 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
282 * objc-act.c: Include gimplify.h.
284 2013-11-07 Andrew MacLeod <amacleod@redhat.com>
286 * objc-act.c (objc_push_parm): Handle atomic qualifier.
288 2013-09-25 Tom Tromey <tromey@redhat.com>
290 * Make-lang.in (START_HDRS, cc1obj-checksum.o, objc/objc-lang.o)
291 (objc/objc-runtime-shared-support.o)
292 (objc/objc-gnu-runtime-abi-01.o, objc/objc-next-runtime-abi-01.o)
293 (objc/objc-next-runtime-abi-02.o, objc/objc-act.o)
294 (objc/objc-encoding.o, objc/objc-map.o): Remove.
296 2013-09-14 Iain Sandoe <iain@codesourcery.com>
299 * objc-next-runtime-abi-01.c (generate_objc_image_info): Remove.
300 (objc_generate_v1_next_metadata): Remove generation of ImageInfo.
301 * objc-next-runtime-abi-02.c (generate_v2_objc_image_info): Remove.
302 (objc_generate_v2_next_metadata): Remove generation of ImageInfo.
304 2013-07-21 OndÅej BÃlka <neleai@seznam.cz>
306 * objc-act.c: Fix typos.
307 * objc-encoding.c: Likewise.
308 * objc-gnu-runtime-abi-01.c: Likewise.
309 * objc-next-runtime-abi-01.c: Likewise.
310 * objc-next-runtime-abi-02.c: Likewise.
312 2013-05-22 Paolo Carlini <paolo.carlini@oracle.com>
314 * objc-next-runtime-abi-02.c (build_v2_build_objc_method_call):
315 Fix build_conditional_expr call.
317 2013-05-16 Jason Merrill <jason@redhat.com>
319 * Make-lang.in (cc1obj$(exeext)): Use link mutex.
321 2012-11-20 Diego Novillo <dnovillo@google.com>
323 * objc-act.c: Replace all vec<T, A>() initializers with vNULL.
325 2012-11-16 Diego Novillo <dnovillo@google.com>
327 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
329 * objc-act.c: Use new vec API in vec.h.
330 * objc-act.h: Likewise.
331 * objc-gnu-runtime-abi-01.c: Likewise.
332 * objc-next-runtime-abi-01.c: Likewise.
333 * objc-next-runtime-abi-02.c: Likewise.
334 * objc-runtime-hooks.h: Likewise.
335 * objc-runtime-shared-support.c: Likewise.
336 * objc-runtime-shared-support.h: Likewise.
338 2012-10-01 Lawrence Crowl <crowl@google.com>
340 * Make-lang.in (OBJC_OBJS): Add dependence on hash-table.o.
341 (objc-act.o): Add dependence on hash-table.h.
342 * objc-act.c (objc_detect_field_duplicates): Change to new type-safe
345 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
347 * Make-ang.in: Adjust for move of C front-end files.
348 * config-lang.in: Likewise.
349 * objc-encoding.c: Look for cp-tree.h in cp/, and for c-tree.h
351 * objc-runtime-shared-support.c: Likewise.
352 * objc-next-runtime-abi-01.c: Likewise.
353 * objc-next-runtime-abi-02.c: Likewise.
354 * objc-gnu-runtime-abi-01.c: Likewise.
355 * objc-act.c: Likewise.
356 * objc-lang.c: Likewise.
358 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
360 * objc-next-runtime-abi-01.c: Do not include tm.h and output.h.
361 Include c-family/c-target.h.
362 (handle_next_class_ref): Rewrite to emit top-level asm statements.
363 (handle_next_impent): Likewise.
364 * objc/Make-lang.in: Fix dependencies for objc-next-runtime-abi-01.o.
366 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
368 * objc-act.c: Do not include output.h.
370 2012-05-17 Paolo Carlini <paolo.carlini@oracle.com>
373 * objc-act.c (objc_get_class_reference, objc_build_message_expr):
374 Use build_min_nt_loc.
376 2012-04-20 Jan Hubicka <jh@suse.cz>
378 * objc-act.c (mark_referenced_methods); Use
379 cgraph_mark_force_output_node.
381 2012-03-21 Steven Bosscher <steven@gcc.gnu.org>
383 * objc-act (objc_build_ivar_assignment): Do not call assemble_external.
384 (objc_build_global_assignment): Likewise.
385 (objc_build_strong_cast_assignment): Likewise.
386 * objc-next-runtime-abi-01.c: Cleanup commented-out assemble_external.
387 * objc-next-runtime-abi-02.c: Likewise.
388 * objc-gnu-runtime-abi-01.c: Likewise.
390 2012-03-05 Jason Merrill <jason@redhat.com>
392 * objc-map.c (objc_map_private_resize, objc_map_alloc_ggc): Don't
393 call _stat functions without MEM_STAT_INFO.
395 2011-11-12 Iain Sandoe <iains@gcc.gnu.org>
397 * objc-next-runtime-abi-01.c (objc_eh_personality): Use gcc personality
400 2011-10-29 Iain Sandoe <iains@gcc.gnu.org>
403 * objc-act.c (objc_build_string_object): Remove redundant second
404 call to fix_string_type (). Add a checking assert that we are,
405 indeed, passed a STRING_CST.
407 2011-10-18 Mikael Pettersson <mikpe@it.uu.se>
410 * objc-act.c (check_duplicates): Cast TREE_VEC_LENGTH result to
411 size_t to avoid signed/unsigned
413 (insert_method_into_method_map): Likewise.
415 2011-10-14 Nicola Pero <nicola.pero@meta-innovation.com>
417 * objc-map.h: New file.
418 * objc-map.c: New file.
419 * config-lang.in (gtfiles): Added objc-map.h.
420 * Make-lang.in (OBJC_OBJS): Added objc-map.o.
421 (objc/objc-map.o): New rule.
422 (objc/objc-act.o): Depend on objc/objc-map.h.
423 * objc-next-runtime-abi-02.c: Added a TODO comment.
424 * objc-act.c: Include objc-map.h.
425 (nst_method_hash_list, cls_method_hash_list): Removed.
426 (instance_method_map, class_method_map): New.
427 (cls_name_hash_list, als_name_hash_list): Removed.
428 (class_name_map, alias_name_map): Removed.
429 (ivar_offset_hash_list): Removed.
430 (hash_class_name_enter, hash_class_name_lookup, hash_enter,
431 hash_lookup, hash_add_attr, add_method_to_hash_list): Removed.
432 (interface_hash_init): New.
433 (objc_init): Call interface_hash_init.
434 (objc_write_global_declarations): Iterate over class_method_map
435 and instance_method_map instead of cls_method_hash_list and
436 nst_method_hash_list.
437 (objc_declare_alias): Use alias_name_map instead of
439 (objc_is_class_name): Use class_name_map and alias_name_map
440 instead of cls_name_hash_list and als_name_hash_list.
441 (interface_tuple, interface_htab, hash_interface, eq_interface):
443 (interface_map): New.
444 (add_class): Renamed to add_interface. Use interface_map instead
446 (lookup_interface): Use interface_map instead of interface_htab.
447 (check_duplicates): Changed first argument to be a tree,
448 potentially a TREE_VEC, instead of a hash. Changed implementation
450 (lookup_method_in_hash_lists): Use class_method_map and
451 instance_method_map instead of cls_method_hash_list and
452 nst_method_hash_list.
453 (objc_build_selector_expr): Likewise.
454 (hash_func): Removed.
455 (hash_init): Create instance_method_map, class_method_map,
456 class_name_map, and alias_name_map. Do not create
457 nst_method_hash_list, cls_method_hash_list, cls_name_hash_list,
458 als_name_hash_list, and ivar_offset_hash_list.
459 (insert_method_into_method_map): New.
460 (objc_add_method): Use insert_method_into_method_map instead of
461 add_method_to_hash_list.
462 (start_class): Call add_interface instead of add_class.
463 * objc-act.h (cls_name_hash_list, als_name_hash_list,
464 nst_method_hash_list, cls_method_hash_list): Removed.
466 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
468 * objc-next-runtime-abi-01.c (objc_build_exc_ptr): Delete old
469 interface with two parallel arrays to hold standard builtin
470 declarations, and replace it with a function based interface that
471 can support creating builtins on the fly in the future. Change
472 all uses, and poison the old names. Make sure 0 is not a
473 legitimate builtin index.
474 * objc-next-runtime-abi-02.c (objc_build_exc_ptr): Ditto.
475 * objc-gnu-runtime-abi-01.c (objc_build_exc_ptr): Ditto.
477 2011-07-19 Richard Guenther <rguenther@suse.de>
479 * objc-next-runtime-abi-02.c (objc_v2_build_ivar_ref):
480 Use fold_build_pointer_plus.
481 (objc2_build_ehtype_initializer): Likewise.
483 2011-07-11 Nicola Pero <nicola.pero@meta-innovation.com>
485 * objc-encoding.h (obstack.h): Do not include.
486 (util_obstack, util_firstobj): Do not declare.
487 (encode_field_decl): Updated prototype to return a tree and take a
488 single tree argument. Updated comments.
489 * objc-encoding.c (util_obstack, util_firstobj): Made static.
490 (objc_encoding_init): New.
491 (encode_field_decl): Existing function renamed to encode_field and
492 made static. New encode_field_decl wrapper function added.
493 (encode_aggregate_fields): Update call to encode_field_decl to
495 * objc-next-runtime-abi-02.c (obstack.h): Do not include.
496 (util_obstack, util_firstobj): Do not declare.
497 (build_v2_ivar_list_initializer): Updated call to
499 * objc-runtime-shared-support.c (obstack.h): Do not include.
500 (util_obstack, util_firstobj): Do not declare.
501 (build_ivar_list_initializer): Updated call to encode_field_decl.
502 * objc-act.c (objc_init): Use objc_encoding_init.
503 * Make-lang.in (objc/objc-runtime-shared-support.o): Do not depend
505 (objc/objc-gnu-runtime-abi-01.o): Likewise.
506 (objc/objc-next-runtime-abi-01.o): Likewise.
507 (objc/objc-next-runtime-abi-02.o): Likewise.
508 (objc/objc-act.o): Likewise.
510 2011-07-04 Nicola Pero <nicola.pero@meta-innovation.com>
512 Refactored encoding code into objc-encoding.h and objc-encoding.c.
513 * objc-act.c (util_obstack, util_firstobj, encode_type_qualifiers,
514 encode_type, generating_instance_variables, objc_method_parm_type,
515 objc_encoded_type_size, encode_method_prototype,
516 objc_build_encode_expr, pointee_is_readonly, encode_pointer,
517 encode_array, encode_vector, encode_aggregate_fields,
518 encode_aggregate_within, encode_next_bitfield,
519 encode_gnu_bitfield, encode_field_decl,
520 objc_v2_encode_property_attr): Moved to objc-encoding.h and
521 objc-encoding.c. No change in the actual code.
522 Include objc-encoding.h.
523 (objc_init): Added TODO.
524 (objc_build_property_setter_name): Made non-static so it can be
525 called from objc-encoding.c.
526 * objc-act.h (OBJC_ENCODE_INLINE_DEFS,
527 OBJC_ENCODE_DONT_INLINE_DEFS): Moved to objc-encoding.h.
528 * objc-runtime-shared-support.h (objc_v2_encode_property_attr,
529 encode_method_prototype, encode_field_decl,
530 generating_instance_variables): Moved to objc-encoding.h.
531 (objc_build_property_setter_name): Declare.
532 * objc-encoding.c: New.
533 * objc-encoding.h: New.
534 * objc-gnu-runtime-abi-01.c: Include objc-encoding.h.
535 * objc-next-runtime-abi-01.c: Likewise.
536 * objc-next-runtime-abi-02.c: Likewise.
537 * objc-runtime-shared-support.c: Likewise.
538 * Make-lang.in (OBJC_OBJS): Added objc-encoding.o.
539 (objc/objc-lang.o): Reordered dependencies.
540 (objc/objc-runtime-shared-support.o): Reordered dependencies.
541 Added dependencies on objc-encoding.h and on $(GGC_H),
542 $(DIAGNOSTIC_CORE_H), $(FLAGS_H) and input.h.
543 (objc/objc-gnu-runtime-abi-01.o): Likewise.
544 (objc/objc-next-runtime-abi-01.o): Likewise.
545 (objc/objc-next-runtime-abi-02.o): Likewise.
546 (objc/objc-act.o): Reordered dependencies. Added dependency on
548 (objc/objc-encoding.o): New rule.
550 * objc-encoding.c (encode_type): Use "%<%T%>" format when printing
551 warning "unknown type %<%T%> found during Objective-C encoding"
552 instead of using gen_type_name.
554 2011-06-05 Nicola Pero <nicola.pero@meta-innovation.com>
556 * objc-act.c (receiver_is_class_object): Expanded comment.
557 (objc_finish_message_expr): Likewise.
559 2011-06-02 Nicola Pero <nicola.pero@meta-innovation.com>
562 * objc-act.c (objc_finish_message_expr): Warn if messaging a class
563 that was only declared using @class without an @interface. Warn
564 if messaging an instance of a class that was only declared using
565 @class without an @interface, unless the receiver was also typed
566 with a protocol list.
568 2011-06-01 Nicola Pero <nicola.pero@meta-innovation.com>
570 * objc-act.c (objc_decl_method_attributes): Implement nonnull
571 attribute for Objective-C methods.
573 2011-05-21 Nicola Pero <nicola.pero@meta-innovation.com>
575 * config-lang.in (gtfiles): Updated order of files to fix building
576 when the gcc/cp directory is missing, as in the case of some
579 2011-05-20 Nathan Froyd <froydnj@codesourcery.com>
581 * objc-act.c (objc_compare_types): Use function_args_iterator
582 instead of TYPE_ARG_TYPES to compare function argument types.
584 2011-05-13 Toon Moene <toon@moene.org>
586 * objc-next-runtime-abi-02.c (newabi_append_ro):
587 Add const qualifier to constant variable pointer declaration.
589 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
591 * objc-act.h (CLASS_NAME, CLASS_SUPER_NAME): Use proper accessors.
592 (CLASS_NST_METHODS, CLASS_CLS_METHODS): Likewise.
593 (PROTOCOL_NAME, PROTOCOL_NST_METHODS, PROTOCOL_CLS_METHODS): Likewise.
595 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
597 * objc-runtime-shared-support.h (get_arg_type_list): Delete.
598 (build_function_type_for_method): Declare.
599 * objc-runtime-hooks.h (struct _objc_runtime_hooks_r): Change
600 type of get_arg_type_base_list field.
601 * objc-act.h (OBJC_VOID_AT_END): Delete.
602 * objc-act.c (get_arg_type_list): Delete.
603 (build_function_type_for_method): New function.
604 (objc_decl_method_attributes): Call build_function_type_for_method.
605 (really_start_method): Likewise.
606 * objc-gnu-runtime-abi-01.c
607 (gnu_runtime_abi_01_get_type_arg_list_base): Change prototype and
608 adjust function accordingly. Update header comment.
609 (build_objc_method_call): Call build_function_type_for_method.
610 * objc-next-runtime-abi-01.c
611 (next_runtime_abi_01_get_type_arg_list_base): Change prototype and
612 adjust function accordingly. Update header comment.
613 (build_objc_method_call): Call build_function_type_for_method.
614 * objc-next-runtime-abi-02.c
615 (next_runtime_abi_02_get_type_arg_list_base): Change prototype and
616 adjust function accordingly. Update header comment.
617 (objc_copy_to_temp_side_effect_params): Take fntype instead of a
618 typelist. Use function_args_iterator for traversing fntype.
619 (build_v2_build_objc_method_call): Adjust call to it.
620 Call build_function_type_for_method
622 2011-05-05 Joseph Myers <joseph@codesourcery.com>
624 * objc-act.c (objc_start_method_definition): Add parameter expr.
625 Update call to start_method_def.
626 (objc_generate_cxx_ctor_or_dtor, objc_synthesize_getter,
627 objc_synthesize_setter) Update calls to
628 objc_start_method_definition.
629 (objc_get_parm_info): Add parameter expr. Update call to
631 (start_method_def): Add parameter expr. Update call to
633 * objc-gnu-runtime-abi-01.c (build_module_initializer_routine):
634 Update call to objc_get_parm_info.
635 * objc-runtime-shared-support.h (objc_get_parm_info): Add extra
638 2011-04-26 Jason Merrill <jason@redhat.com>
640 * objc-act.c (objc_fold_objc_type_ref): Remove.
641 * objc-act.h: Remove prototype.
643 2011-04-21 Nathan Froyd <froydnj@codesourcery.com>
645 * objc-act.c (synth_module_prologue): Call build_function_type_list
646 instead of build_function_type.
647 * objc-next-runtime-abi-02.c (next_runtime_02_initialize):
650 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
652 * objc-act.c (ivar_of_class): New.
653 (objc_is_public): Use ivar_of_class.
655 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
657 * objc-act.c (objc_get_interface_ivars): Removed.
658 (objc_detect_field_duplicates): New.
659 (hash_instance_variable): New.
660 (eq_instance_variable): New.
662 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
664 * objc-act.c (objc_declare_protocols): Renamed to
665 objc_declare_protocol. Changed first argument to be an identifier
666 instead of a tree chain of identifiers, so that callers don't have
667 to create a temporary tree chain.
669 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
671 * objc-act.c (objc_declare_class): Changed to take a single
672 identifier as argument instead of a tree list. This means callers
673 don't have to build temporary tree lists to call this function.
674 (synth_module_prologue): Updated calls to objc_declare_class.
676 2011-04-13 Nicola Pero <nicola.pero@meta-innovation.com>
678 * objc-act.c (build_keyword_selector): Use get_identifier_with_length
679 instead of get_identifier.
681 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
683 * objc-lang.c (objc_init_ts): Move code for this function...
684 * objc-act.c (objc_common_init_ts): ...here. Define.
685 * objc-act.h (objc_common_init_ts): Declare.
687 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
689 * objc-act.c (objc_build_message_expr): Accept two arguments
690 instead of one so that callers can simply pass the arguments
691 without having to create a temporary chain to hold them.
693 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
695 * objc-act.c (comp_proto_with_proto): Do not create and use
696 inefficient temporary argument lists. Compare the arguments
697 directly. (match_proto_with_proto): Removed; incorporated into
698 comp_proto_with_proto ().
700 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
702 * objc-act.c (printable_ivar_name): New.
703 (add_instance_variable): Call printable_ivar_name() when an error
704 message needs to be printed. Do not prepare the instance variable
705 for printing unless there is an actual error.
707 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
709 * objc-act.c (objc_is_class_name, objc_is_id): For efficiency,
710 avoid calling identifier_global_value() multiple times.
712 2011-04-12 Martin Jambor <mjambor@suse.cz>
714 * objc-act.c (mark_referenced_methods): Call cgraph_get_create_node
715 instead of cgraph_node.
717 2011-04-06 Joseph Myers <joseph@codesourcery.com>
719 * objc-act.c: Include c-target.h instead of target.h.
720 * Make-lang.in (objc/objc-act.o): Update dependencies.
722 2011-03-06 Joseph Myers <joseph@codesourcery.com>
724 * lang-specs.h: Match -save-temps* instead of -save-temps.
726 2011-02-26 Nicola Pero <nicola.pero@meta-innovation.com>
728 * objc-act.c (objc_v2_encode_prop_attr): Rewritten.
730 2011-02-23 Nicola Pero <nicola.pero@meta-innovation.com>
732 * objc-act.c (build_private_template): Do not copy the
733 CLASS_HAS_EXCEPTION_ATTR from the class to the struct.
734 * objc-act.h (CLASS_HAS_EXCEPTION_ATTR): Define using
737 2011-02-22 Nicola Pero <nicola.pero@meta-innovation.com>
740 * objc-act.c (flexible_array_type_p): New.
741 (add_instance_variable): Produce an error if an instance variable
742 uses flexible array members.
743 (encode_array): Do not emit an error if encoding a flexible array
744 type while generating instance variables.
746 2011-02-21 Mike Stump <mikestump@comcast.net>
748 * Make-lang.in (check_objc_parallelize): Refine for 4 processor
751 2011-02-20 Nicola Pero <nicola.pero@meta-innovation.com>
753 * objc-gnu-runtime-abi-01.c (TARGET_64BIT): Removed. Removed
754 usage of padding fields. Do not include tm.h.
755 * objc-act.c (objc_write_global_declaration): Set input_location
756 to BUILTINS_LOCATION while generating runtime metadata.
758 2011-01-20 Nicola Pero <nicola.pero@meta-innovation.com>
761 * objc-act.c (objc_maybe_build_modify_expr): If 'rhs' has side
762 effects, do not use a temporary variable.
764 2011-01-19 Nicola Pero <nicola.pero@meta-innovation.com>
766 * objc-next-runtime-abi-01.c: Updated comments.
767 * objc-next-runtime-abi-02.c: Same.
769 2011-01-19 Nicola Pero <nicola.pero@meta-innovation.com>
771 * objc-act.c (objc_init, generate_struct_by_value_array): Updated
774 2011-01-19 Nicola Pero <nicola.pero@meta-innovation.com>
776 * objc-act.c: Updated comments.
777 * objc-next-runtime-abi-02.c: Same.
778 * objc-runtime-shared-support.c: Same.
779 * objc-runtime-hooks.h: Same.
781 * objc-gnu-runtime-abi-01.c: Same.
783 2011-01-19 Nicola Pero <nicola.pero@meta-innovation.com>
785 * objc-gnu-runtime-abi-01.c (objc_generate_v1_gnu_metadata): Do
786 not generate metadata if there is nothing to put into it.
788 2011-02-17 Iain Sandoe <iains@gcc.gnu.org>
790 * config-lang.in (gtfiles): Updated.
791 * Make-lang.in (START_HDRS): New.
792 (OBJC_OBJS): Added new object files.
793 (objc/objc-act.o): Updated prerequisites.
794 (objc/objc-lang.o): Updated prerequisites.
795 (objc/objc-runtime-shared-support.o): New.
796 (objc/objc-gnu-runtime-abi-01.o): New.
797 (objc/objc-next-runtime-abi-01.o): New.
798 (objc/objc-next-runtime-abi-02.o): New.
799 * objc-runtime-hooks.h: New.
800 * objc-runtime-shared-support.h: New.
801 * objc-runtime-shared-support.c: New.
802 * objc-gnu-runtime-abi-01.c: New.
803 * objc-next-metadata-tags.h: New.
804 * objc-next-runtime-abi-01.c: New.
805 * objc-next-runtime-abi-02.c: New.
806 * objc-lang.c: Include c-lang.h.
807 (LANG_HOOKS_EH_PERSONALITY): Removed.
808 * objc-act.h: Moved many declarations and code from objc-act.c
809 into objc-act.h to make them available outside objc-act.c.
810 (objc_eh_runtime_type): Removed.
811 (objc_eh_personality): Removed.
812 (CLASS_HAS_EXCEPTION_ATTR): New.
813 (OCTI_SUPER_SUPERFIELD_ID): New.
814 (OCTI_V1_PROP_LIST_TEMPL): New.
815 (OCTI_V1_PROP_NAME_ATTR_CHAIN): New.
816 (super_superclassfield_id): New.
817 (objc_prop_list_ptr): New.
818 (prop_names_attr_chain): New.
819 * objc-act.c: Include new runtime headers. Moved many #defines
820 and declarations into objc-act.h and
821 objc-runtime-shared-support.h. Made some corresponding functions
822 non-static, and moved some others into
823 objc-runtime-shared-support.c. Moved metadata generation code
824 into the new runtime hook files.
825 (ivar_offset_hash_list): New.
826 (objc_init): Call generate_struct_value_by_array() before doing
827 any runtime initialization. Create the appropriate runtime hook
829 (init_objc): Removed. Code moved directly into objc_init.
830 (finish_objc): Removed. Code moved directly into
831 objc_write_global_declarations.
832 (objc_write_global_declarations): Do the warn_selector checks
833 before emitting metadata. Use a runtime hook to emit the
834 metadata. Do not emit the metadata or do -gen-decls processing if
835 -fsyntax-only or we are producing a PCH.
836 (build_objc_exception_stuff): Renamed to
837 build_common_objc_exception_stuff. Remove TREE_NOTHROW flag from
838 objc_exception_throw_decl.
839 (synth_module_prologue): Call runtime initialize hook instead of
840 building runtime declarations here. Use the
841 default_constant_string_class_name runtime hook to set the
842 constant string class name.
843 (objc_build_string_object): Call the setup_const_string_class_decl
844 runtime hook instead of setup_string_decl. Call the
845 build_const_string_constructor runtime hook instead of building
846 the string object here.
847 (get_objc_string_decl): Added prop_names_attr case. Removed
848 gcc_unreachable() at the end.
849 (objc_begin_catch_clause): Distinguish between @catch (...) and
850 @catch (id x). Call the begin_catch runtime hook instead of
851 building the CATCH_EXPR here.
852 (objc_finish_catch_clause): Call the finish_catch runtime hook
853 instead of adding the catch here.
854 (objc_finish_try_stmt): Call the finish_try_stmt runtime hook
855 instead of doing it here.
856 (objc_build_throw_stmt): Bail out early for error_mark_node. Call
857 the build_exc_ptr runtime hook instead of objc_build_exc_ptr.
858 Call the build_throw_stmt runtime hook instead of building the
860 (objc_generate_cxx_cdtors): Set has_cxx_cdtors for the GNU runtime
862 (get_arg_type_list): Call the get_arg_type_list_base runtime hook
863 instead of building the list of arguments here.
864 (receiver_is_class_object): Call the receiver_is_class_object
865 runtime hook instead of doing the check here. Call the
866 tag_getclass runtime hook instead of using TAG_GETCLASS.
867 (objc_finish_message_expr): Call the build_objc_method_call
869 (objc_build_protocol_expr): Call the get_protocol_reference
871 (objc_build_selector_expr): Call the build_selector_reference
873 (build_ivar_reference): Call the build_ivar_reference runtime
875 (hash_init): Set up ivar_offset_hash_list.
876 (start_class): Recognize the objc_exception attribute and store
878 (continue_class): Use the class_decl and metaclass_decl runtime
880 (build_objc_property_accessor_helpers): Renamed to
881 build_common_objc_property_accessor_helpers. Do not build
882 objc_copyStruct_decl, objc_getPropertyStruct_decl and
883 objc_setPropertyStruct_decl.
884 (objc_synthesize_getter): Check what struct setter/getter helper
885 is available instead of checking the type of runtime.
886 (get_super_receiver): Use the super_superclassfield_ident runtime
887 hook. Added assert. Use the get_class_super_ref and
888 get_category_super_ref runtime hooks.
889 (objc_v2_encode_prop_attr): New.
891 2011-01-17 Nicola Pero <nicola.pero@meta-innovation.com>
894 * objc-act.c (finish_objc): When calling check_duplicates to check
895 duplicated instance methods, set 'is_class' to 0, not 1.
897 2011-01-14 Ben Elliston <bje@au.ibm.com>
900 * objc-act.c (generate_struct_by_value_array): Do not output a
901 definition for struct_forward_array.
903 2011-01-08 Iain Sandoe <iains@gcc.gnu.org>
905 * objc-act.c (objc_finish_foreach_loop): Mark collection expression
908 2011-01-02 H.J. Lu <hongjiu.lu@intel.com>
910 * objc-act.c (check_that_protocol_is_defined): Fix a typo.
912 2011-01-02 Nicola Pero <nicola.pero@meta-innovation.com>
914 * objc-act.c (check_that_protocol_is_defined): New.
915 (lookup_protocol): Call check_that_protocol_is_defined.
917 2010-12-30 Nicola Pero <nicola.pero@meta-innovation.com>
919 * objc-act.c (objc_types_are_equivalent): Fixed comparing protocol
920 lists. Check them two-ways to fix comparisons when one protocol
921 implements the other one, or when one list contains duplicated
924 2010-12-30 Nicola Pero <nicola.pero@meta-innovation.com>
926 * objc-act.c (objc_add_method): When emitting an error because a
927 method with the same name but conflicting types is found in the
928 same class or category interface, print a note with the location
929 of the original method. Also, improved the error message to
930 clearly state that the conflict is due to conflicting types, and
931 produce it for protocols as well. Emit an error if two identical
932 methods are declared in a protocol, but one is @required and the
933 other one is @optional.
935 2010-12-30 Nicola Pero <nicola.pero@meta-innovation.com>
937 * objc-act.c (start_class): Warn when a class attribute is
939 (objc_declare_protocols): Warn when a protocol attribute in a
940 protocol forward-declaration is ignored.
941 (start_protocol): Warn when a protocol attribute is ignored.
943 2010-12-30 Nicola Pero <nicola.pero@meta-innovation.com>
945 * objc-act.c (objc_set_method_opt): Tidy up error messages. In
946 particular, explicitly mention whether the error is due to the
947 @optional or @required keyword instead of mentioning
948 "@optional/@required".
950 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
953 * objc-act.c (objc_build_synchronized): Check the argument of
954 @synchronized and emit an appropriate error if it is not a valid
955 Objective-C object. Deal gracefully with that case. Updated
956 comments and variable names.
958 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
961 * objc-act.h (PROPERTY_REF_DEPRECATED_GETTER): New.
962 * objc-tree.def (PROPERTY_REF): Increased the number of operands
964 * objc-act.c (objc_finish_message_expr): Added optional argument
965 allowing to return the deprecated method prototype for deprecated
966 methods, instead of immediately emitting the deprecation warning.
967 (objc_maybe_build_component_ref): Do not warn for a deprecated
968 property. When building the getter call, get the deprecated
969 method prototype from objc_finish_message_expr() and put it into
971 (objc_build_class_component_ref): Same change.
972 (finish_class): Mark the getter and setter as deprecated if they
973 are generated from a deprecated property.
974 (objc_gimplify_property_ref): If the getter is deprecated, emit a
976 (objc_build_setter_call, objc_build_message_expr,
977 objc_finish_foreach_loop): Updated call to
978 objc_finish_message_expr.
980 2010-12-28 Nicola Pero <nicola.pero@meta-innovation.com>
983 * objc-act.c (lookup_protocol): Added 'definition_required'
984 argument. If 'definition_required', and the protocol is not
985 defined, emit a warning.
986 (objc_declare_protocols): Updated call to lookup_protocol.
987 (start_protocol): Same change.
988 (check_protocol_recursively): Same change.
989 (objc_build_protocol_expr): Same change.
990 (lookup_and_install_protocols): Added definition_required argument.
991 Pass it to lookup_protocol.
992 (objc_get_protocol_qualified_type): Updated call to
993 lookup_and_install_protocols.
994 (start_class): Updated calls to lookup_and_install_protocols; pass
995 true to 'definition_required' to get the warnings.
996 (start_protocol): Updated calls to lookup_and_install_protocols.
998 2010-12-28 Nicola Pero <nicola.pero@meta-innovation.com>
1000 * objc-act.c (objc_start_category_interface): Produce an error if
1001 a class extension is found after the class @implementation.
1003 2010-12-28 Nicola Pero <nicola.pero@meta-innovation.com>
1006 * objc-act.c (encode_method_prototype): Fixed both location and
1007 format string of error "type %qT does not have a known size".
1009 2010-12-26 Nicola Pero <nicola.pero@meta-innovation.com>
1011 * config-lang.in (gtfiles): Added c-family/c-cppbuiltin.c.
1013 2010-12-22 Nathan Froyd <froydnj@codesourcery.com>
1015 * objc-act.c (next_sjlj_build_enter_and_setjmp): Use prototype_p.
1017 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
1019 * objc-act.c (objc_init): Call using_eh_for_cleanups.
1020 (objc_init_exceptions): Renamed to objc_maybe_warn_exceptions. Do
1021 not call using_eh_for_cleanups.
1022 (objc_begin_try_stmt): Do not call objc_init_exceptions.
1023 (objc_build_throw_stmt): Updated call to
1024 objc_maybe_warn_exceptions.
1026 2010-12-18 Iain Sandoe <iains@gcc.gnu.org>
1028 * objc/objc-act.c (objc_eh_personality): Select personality name on
1030 (objc_init_exceptions): New.
1031 (objc_begin_try_stmt): Use objc_init_exceptions.
1032 (objc_build_throw_stmt): Likewise.
1034 2010-12-10 Nicola Pero <nicola.pero@meta-innovation.com>
1036 * objc-act.c (objc_in_class_extension): New.
1037 (objc_start_category_interface): If -fobjc-std=objc1
1038 was specified, produce an error if a class extension is used.
1039 (objc_finish_interface): Reset objc_in_class_extension to false.
1040 (objc_add_property_declaration): Allow a class extension to extend
1041 readonly properties in the main @interface to be readwrite.
1042 (start_class): Added code to deal with class extensions. In that
1043 case, return the existing interface after adding any additional
1044 protocols to it and setting objc_in_class_extension to true.
1045 (continue_class): If in a class extension, do not generate the
1046 instance variable template.
1048 2010-12-08 Nicola Pero <nicola.pero@meta-innovation.com>
1050 * objc-act.c (objc_build_throw_stmt): Check that the argument of
1051 @throw is an object and emit an error if not.
1053 2010-12-08 Nicola Pero <nicola.pero@meta-innovation.com>
1055 * objc-act.c (objc_finish_foreach_loop): Use error_at() instead of
1056 error() when printing an error about the iterating variable or
1057 collection not being an object.
1059 2010-12-06 Nicola Pero <nicola.pero@meta-innovation.com>
1061 * objc-act.c (objc_finish_foreach_loop): Mark the
1062 object_expression as used.
1064 2010-12-06 Nicola Pero <nicola.pero@meta-innovation.com>
1066 * objc-act.c: Include c-family/c-objc.h.
1067 * objc-lang.c: Same change.
1068 * Make-lang.in (objc/objc-act.o): Depend on
1070 (objc/objc-lang.o): Same change.
1071 * config-lang.in (gtfiles): Added c-family/c-objc.h.
1073 2010-12-02 Joseph Myers <joseph@codesourcery.com>
1075 * lang-specs.h: Don't handle -ftraditional.
1077 2010-12-02 Nicola Pero <nicola.pero@meta-innovation.com>
1079 * objc-act.c (objc_build_throw_stmt): Return error_mark_node and
1080 not NULL_TREE when a @throw is used outside of a @catch block.
1082 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
1084 * objc-act.c (objc_build_volatilized_type): Removed.
1085 (objc_non_volatilized_type): Removed.
1086 (objc_type_quals_match): Removed.
1087 (local_variables_to_volatilize): New.
1088 (objc_volatilize_decl): Add the decl to volatilize to
1089 local_variables_to_volatilize, but don't volatilize it yet.
1090 (objc_finish_function): New.
1091 * objc-act.h (local_variables_to_volatilize): New.
1093 2010-11-29 Nicola Pero <nicola.pero@meta-innovation.com>
1094 Mike Stump <mikestump@comcast.net>
1096 Allow 'make check-objc -j2'
1097 * Make-lang.in (lang_checks_parallelized): New.
1098 (check_objc_parallelize): New.
1100 2010-11-29 Nicola Pero <nicola.pero@meta-innovation.com>
1102 * objc-act.c (start_class): When a class is reimplemented,
1103 generate an error and avoid adding the class to the list of
1104 implemented classes again, but do not return error_mark_node.
1106 2010-11-29 Nicola Pero <nicola.pero@meta-innovation.com>
1108 * objc-act.c (objc_maybe_build_component_ref): Removed TODO.
1110 2010-11-29 Nicola Pero <nicola.pero@meta-innovation.com>
1112 * objc-act.c (objc_eh_runtime_type): Avoid ICE if error_mark_node
1113 is passed as argument.
1114 (objc_begin_catch_clause): Added code to deal with an
1115 error_mark_node or NULL_TREE argument. Improved checks for
1116 invalid arguments. Added code to traverse typedefs.
1118 2010-11-29 Nicola Pero <nicola.pero@meta-innovation.com>
1120 * objc-act.c (objc_demangle): Return immediately if the string is
1121 too short. Detect names that do not need demangling, and return
1124 2010-11-27 Nicola Pero <nicola.pero@meta-innovation.com>
1126 Implemented optional properties.
1127 * objc-act.h (PROPERTY_OPTIONAL): New.
1128 * objc-act.c (objc_add_property_declaration): Set
1129 PROPERTY_OPTIONAL if appropriate.
1130 (finish_class): When generating definitions of setter and getter
1131 methods associated with a property for a protocol, mark them as
1132 optional if the property is optional.
1133 (maybe_make_artificial_property_decl): Added 'getter_name'
1134 argument. Set PROPERTY_OPTIONAL.
1135 (objc_maybe_build_component_ref): Updated calls to
1136 maybe_make_artificial_property_decl. Added code for optional,
1137 readonly properties.
1138 (objc_build_class_component_ref): Updated call to
1139 maybe_make_artificial_property_decl.
1141 2010-11-27 Nicola Pero <nicola.pero@meta-innovation.com>
1143 * objc-act.c (objc_build_struct): Fixed loops that save and
1144 restore TYPE_OBJC_INFO to iterate over all variants of the type; a
1145 special case for the current type is then no longer required.
1146 Duplicate TYPE_LANG_SPECIFIC for each type before restoring
1148 (objc_get_protocol_qualified_type): Updated comments.
1150 2010-11-25 Nicola Pero <nicola.pero@meta-innovation.com>
1152 * objc-act.c (objc_build_struct): Install TYPE_OBJC_INTERFACE
1153 after finish_struct, not before, otherwise it may be wiped out by
1154 it. This fixes spurious warnings when a class has more than 15
1157 2010-11-23 Nicola Pero <nicola.pero@meta-innovation.com>
1160 * lang-specs.h: Added objective-c-cpp-output. Mapped .mi to
1161 objective-c-cpp-output instead of objc-cpp-output. Print a
1162 deprecation note every time objc-cpp-output is requested.
1164 2010-11-22 Joseph Myers <joseph@codesourcery.com>
1166 * objc-act.c (write_symbols): Don't declare here.
1168 2010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
1171 * objc-act.c (objc_generate_write_barrier): Added assert to make sure
1172 this function is only called with the next runtime.
1174 2010-11-20 Jakub Jelinek <jakub@redhat.com>
1177 * objc-act.c (in_late_binary_op): Remove.
1179 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
1181 * objc-act.c (objc_start_class_interface): Do not warn that class
1182 attributes are unimplemented. Pass the attributes to start_class.
1183 (objc_start_category_interface): Updated call to start_class.
1184 (objc_start_class_implementation): Same change.
1185 (objc_start_category_implementation): Same change.
1186 (objc_build_class_component_ref): Warn if the class is deprecated.
1187 (build_private_template): Mark the template as deprecated if the
1188 class is deprecated.
1189 (start_class): Added 'attributes' argument. Emit a warning if
1190 using a deprecated class as superclass of a class, or original
1191 class of a category. Recognize the 'deprecated' attribute when
1192 starting and interface, and mark the interface with
1193 TREE_DEPRECATED if present. Store attributes in the interface.
1195 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
1197 * objc-act.c (lookup_protocol): Added 'warn_if_deprecated'
1198 argument. If it is 'true' and the protocol is deprecated, emit a
1199 deprecation warning.
1200 (objc_start_protocol): Do not warn that protocol attributes are
1201 unimplemented. Pass the attributes to start_protocol.
1202 (start_protocol): Added attributes argument. Recognize the
1203 'deprecated' attribute and mark the protocols with TREE_DEPRECATED
1204 if present. Store attributes in the protocol.
1205 (objc_declare_protocols): Added 'attributes' argument. Recognize
1206 the 'deprecated' attribute and mark the protocols with
1207 TREE_DEPRECATED if present. Store attributes in the protocol.
1208 Updated call to lookup_protocol.
1209 (objc_build_protocol_expr): Updated call to lookup_protocol.
1210 (check_protocol_recursively): Same change.
1211 (lookup_and_install_protocols): Same change.
1212 * objc-act.h: Updated comments.
1214 2010-11-17 Nicola Pero <nicola.pero@meta-innovation.com>
1216 * objc-act.c (lookup_method_in_protocol_list): Search methods in
1217 PROTOCOL_OPTIONAL_CLS_METHODS / PROTOCOL_OPTIONAL_NST_METHODS if
1218 they are not found in PROTOCOL_CLS_METHODS / PROTOCOL_NST_METHODS.
1220 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
1222 * objc-act.c (objc_build_setter_call): New.
1223 (objc_maybe_build_modify_expr): Rewritten to build a compound
1225 (objc_build_incr_expr_for_property_ref): Updated calls to
1226 objc_maybe_build_modify_expr to call objc_build_setter_call
1227 instead. Use build_modify_expr () instead of build2 (MODIFY_EXPR,
1228 ...). Use convert () instead of build1 (NOP_EXPR, ...). Use
1229 TREE_NO_WARNING on the final compound statement to silence C++
1232 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
1234 * objc-act.c (objc_build_incr_expr_for_property_ref): New.
1235 (objc_create_temporary_var): Moved it towards the beginning of the
1236 file so that objc_build_incr_expr_for_property_ref can use it.
1238 2010-11-14 Nicola Pero <nicola.pero@meta-innovation.com>
1240 * objc-act.c (objc_add_property_declaration): Check that the decl
1241 we received from the parser is a FIELD_DECL; reject array and
1242 bitfield properties. Convert the warning when a property is
1243 readonly and a setter is specified into an error. Convert errors
1244 when a property declaration does not match a property declaration
1245 in a superclass into warnings.
1246 (objc_add_synthesize_declaration_for_property): Use
1247 DECL_BIT_FIELD_TYPE to determine the type of an instance variable
1248 if it is a bitfield. Throw an error if we are asked to synthesize
1249 setters/getters for a bitfield instance variable but the property
1250 is not appropriate - it must be assign and nonatomic. If the
1251 property is readonly, allow the instance variable type to be a
1252 specialization of the property type.
1253 (objc_type_valid_for_messaging): Fixed returning 'false' for a
1254 Class qualified with a protocol when the 'accept_classes' argument
1257 2010-11-13 Nicola Pero <nicola.pero@meta-innovation.com>
1259 * objc-act.c (objc_get_protocol_qualified_type): detect cases
1260 where we are asked to attach a protocol to something which is not
1261 an Objective-C object type, and produce an error.
1263 2010-11-11 Nicola Pero <nicola.pero@meta-innovation.com>
1265 * objc-act.c (objc_add_property_declaration): Check that the type
1266 of a property and of an inherited property match.
1267 (objc_maybe_build_component_ref): Tidied up indentation and
1269 (objc_common_type): Added new type of check (-5).
1270 (objc_add_synthesize_declaration_for_property): Check that the
1271 property to synthesize and the instance variable to use have the
1274 2010-11-10 Joseph Myers <joseph@codesourcery.com>
1276 * objc-act.c (objc_init): Use %' in diagnostic.
1277 (objc_set_method_opt): Remove trailing '.' from diagnostic.
1279 2010-11-10 Joseph Myers <joseph@codesourcery.com>
1281 * objc-act.c (dump_base_name): Don't declare here.
1283 2010-11-08 Nicola Pero <nicola.pero@meta-innovation.com>
1285 * objc-act.c (objc_add_dynamic_declaration_for_property): Do not
1286 search for the @property declation only in the current context,
1287 but also in inherited properties. Do not mark the original
1288 PROPERTY_DECL in the @interface or @protocol with
1290 (check_methods): To check if a method is associated with a
1291 @dynamic property, search for the property in IMPL_PROPERTY_DECL.
1292 (check_accessible_methods): Same change.
1293 * objc-act.h: Updated comment.
1295 2010-11-08 Nicola Pero <nicola.pero@meta-innovation.com>
1297 * objc-act.c (objc_add_synthesize_declaration_for_property):
1298 Iterate over IMPL_PROPERTY_DECL, not CLASS_PROPERTY_DECL, when
1299 checking for an existing @synthesize or @dynamic declaration.
1300 Search for an inherited @property declaration if none is found in
1301 the local interface. If the required instance variable does not
1302 exist, return instead of trying to continue to prevent a compiler
1303 crash later. Check that the instance variable is not already
1304 being used by another @synthesize.
1305 (objc_add_dynamic_declaration_for_property): Iterate over
1306 IMPL_PROPERTY_DECL, not CLASS_PROPERTY_DECL, when checking for an
1307 existing @synthesize or @dynamic declaration.
1308 (objc_synthesize_getter): Search for the getter declaration in
1309 protocols and superclasses as well.
1310 (objc_synthesize_setter): Search for the setter declaration in
1311 protocols and superclasses as well.
1313 2010-11-08 Nicola Pero <nicola.pero@meta-innovation.com>
1315 * objc-act.c (lookup_property): When checking categories, also
1316 check the protocols attached to each.
1317 (objc_add_property_declaration): Determine the
1318 PROPERTY_SETTER_NAME and PROPERTY_GETTER_NAME here. Tidied up
1319 error message. Search for an existing property declaration with
1320 the same name which would be inherited from the class hiearchy,
1321 and produce an error if it has incompatible attributes.
1322 (check_methods): Changed second parameter. If the method is a
1323 getter or setter for a property, do not warn if it is inherited as
1324 opposed to implemented directly in the class.
1325 (check_protocol): Updated calls to check_methods.
1326 (finish_class): Do not determine the PROPERTY_SETTER_NAME and
1327 PROPERTY_GETTER_NAME here; this is now done earlier, in
1328 objc_add_property_declaration.
1329 * objc-act.h (CLASS_NAME, CLASS_SUPER_NAME): Added comments.
1331 2010-11-06 Nicola Pero <nicola.pero@meta-innovation.com>
1333 Fixed using the Objective-C 2.0 dot-syntax with self and super.
1334 * objc-act.c (OBJC_LOOKUP_NO_INSTANCE_METHODS_OF_ROOT_CLASS): New.
1335 (maybe_make_artificial_property_decl): Added 'implementation'
1336 argument. Use OBJC_LOOKUP_NO_INSTANCE_METHODS_OF_ROOT_CLASS when
1337 looking up getters or setters for a class. If an implementation
1338 is specified, search it as well for a getter or setter.
1339 (objc_maybe_build_component_ref): Updated calls to
1340 maybe_make_artificial_property_decl; added code to deal with
1341 'self' and 'super' and with methods declared locally in the
1342 implementation. Store the getter call expression in the
1343 PROPERTY_REF instead of throwing it away.
1344 (objc_build_class_component_ref): Updated calls to
1345 maybe_make_artificial_property_decl, and store the getter call
1346 expression in PROPERTY_REF instead of throwing it away.
1347 (lookup_method_static): Implemented
1348 OBJC_LOOKUP_NO_INSTANCE_METHODS_OF_ROOT_CLASS option.
1349 (objc_gimplify_property_ref): Do not build the getter method call
1350 here; instead use the one stored in the PROPERTY_REF. If it's not
1351 there, produce helpful error messages.
1352 * objc-tree.def (PROPERTY_REF): Increased the number of operands
1353 from 2 to 3. Updated comments.
1354 * objc-act.h (PROPERTY_REF_GETTER_CALL): New.
1356 2010-11-06 Iain Sandoe <iains@gcc.gnu.org>
1359 * objc-act.c (objc_build_string_object): Amend for renamed hook.
1360 (objc_string_ref_type_p): New.
1361 (objc_check_format_arg): New.
1363 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
1365 Fixed using the Objective-C 2.0 dot-syntax with class names.
1366 * objc-act.c (objc_build_class_component_ref): New.
1368 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
1370 * objc-act.c (objc_add_dynamic_declaration): Allow @dynamic in a
1372 (objc_type_valid_for_messaging): Added 'accept_classes' argument;
1373 if set to 'true', return 'true' for Class objects. Do not remove
1374 more than on pointer indirection.
1375 (objc_add_property_declaration): Only warn about 'assign'
1376 semantics for Objective-C objects if warn_property_assign_default;
1377 and do not warn if the property is readonly or if the type is a Class.
1378 (objc_finish_foreach_loop): Updated calls to
1379 objc_type_valid_for_messaging.
1381 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
1383 Implemented -fobjc-std=objc1 flag.
1384 * objc-act.c (objc_start_class_interface): If attributes are
1385 specified when flag_objc1_only is set, print an error.
1386 (objc_start_category_interface): Same change.
1387 (objc_start_protocol): Same change.
1388 (objc_add_method_declaration): Same change.
1389 (objc_start_method_definition): Same change.
1390 (objc_build_keyword_decl): Same change.
1391 (objc_set_visibility): If OBJC_IVAR_VIS_PACKAGE is used when
1392 flag_objc1_set is set, print an error.
1393 (objc_set_method_opt): If flag_objc1_only is set, print an error.
1394 (objc_add_property_declaration): Same change.
1395 (objc_add_synthesize_declaration): Same change.
1396 (objc_add_dynamic_declaration): Same change.
1397 (objc_finish_foreach_loop): Same change.
1398 (objc_maybe_build_component_ref): If flag_objc1_only is set,
1401 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
1403 * objc-act.c (maybe_make_artificial_property_decl): New.
1404 (objc_maybe_build_component_ref): Call
1405 maybe_make_artificial_property_decl if a property can not be
1406 found. Do not call objc_finish_message_expr if
1407 PROPERTY_HAS_NO_GETTER.
1408 * objc-act.h Updated comments.
1409 (PROPERTY_HAS_NO_GETTER): New.
1410 (PROPERTY_HAS_NO_SETTER): New.
1411 * objc-tree.def: Updated comment.
1413 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
1415 Implemented format and noreturn attributes for Objective-C methods.
1416 * objc-act.c (objc_start_method_definition): If method attributes
1417 are specified emit a warning and ignore them.
1418 (build_objc_method_call): Moved deprecation warnings from here ...
1419 (objc_finish_message_expr): to here. Do not emit deprecation
1420 warnings if the receiver is of type 'id'.
1421 (really_start_method): Install 'deprecation' and 'noreturn'
1423 (objc_decl_method_attributes): Carefully filter out the list of
1424 attributes, allowing only "noreturn", "format", "sentinel" and
1425 "deprecated". In the case of "format", adjust the arguments.
1426 Always process the attributes in the same way no matter if
1427 "sentinel" is in the list or not.
1429 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
1431 * objc-act.c (objc_maybe_build_component_ref): Warn about using
1432 deprecated properties.
1433 (objc_maybe_printable_name): Support PROPERTY_DECL.
1435 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
1437 Implemented Objective-C 2.0 property accessors.
1438 * objc-act.h (enum objc_tree_index): Added OCTI_GET_PROPERTY_DECL,
1439 OCTI_SET_PROPERTY_DECL, OCTI_COPY_STRUCT_DECL,
1440 OCTI_GET_PROPERTY_STRUCT_DECL and OCTI_SET_PROPERTY_STRUCT_DECL.
1441 (objc_getProperty_decl): New.
1442 (objc_setProperty_decl): New.
1443 (objc_copyStruct_decl): New.
1444 (objc_getPropertyStruct_decl): New.
1445 (objc_setPropertyStruct_decl): New.
1446 * objc-act.c (build_objc_property_accessor_helpers): New.
1447 (synth_module_prologue): Call
1448 build_objc_property_accessor_helpers.
1450 (objc_synthesize_getter): Implemented synthesizing getters that
1451 work with properties that are not nonatomic, assign properties.
1452 (objc_synthesize_setter): Implemented synthesizing setters that
1453 work with properties that are not nonatomic, assign properties.
1455 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
1457 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
1458 * objc-tree.def (PROPERTY_REF): New.
1459 * objc-act.h: Added comments for all the PROPERTY_ macros.
1460 (PROPERTY_NAME): Use DECL_NAME.
1461 (PROPERTY_COPIES): Removed.
1462 (PROPERTY_READONLY): Use DECL_LANG_FLAG_0 for it.
1463 (PROPERTY_NONATOMIC): New.
1464 (objc_property_assign_semantics): Make it a typedef.
1465 (PROPERTY_ASSIGN_SEMANTICS): New.
1466 (PROPERTY_DYNAMIC): New.
1467 (PROPERTY_REF_OBJECT): New.
1468 (PROPERTY_REF_PROPERTY_DECL): New.
1469 * objc-act.c (CALL_EXPR_OBJC_PROPERTY_GETTER): Removed.
1470 (in_objc_property_setter_name_context): Removed.
1471 (objc_add_property_declaration): Removed copies and ivar arguments
1472 and code supporting them. Fixed recovering when readonly and
1473 setter attributes are specified. Removed support for @property in
1474 @implementation context. Updated error message. Double-check
1475 that a property does not have a DECL_INITIAL. Validate the
1476 property assign semantics and emit appropriate errors and
1477 warnings. Check for duplicate property declarations. Set
1478 DECL_SOURCE_LOCATION, TREE_DEPRECATED, PROPERTY_NONATOMIC,
1479 PROPERTY_ASSIGN_SEMANTICS and PROPERTY_DYNAMIC of the new
1480 PROPERTY_DECL. Do not set PROPERTY_COPIES. Set
1481 PROPERTY_IVAR_NAME to NULL_TREE.
1482 (objc_build_getter_call): Renamed to
1483 objc_maybe_build_component_ref. If the property is not found in
1484 the interface, search in the protocol list. Do not generate the
1485 getter call; instead, build and return a PROPERTY_REF.
1486 (objc_is_property_ref): New.
1487 (objc_setter_func_call): Removed.
1488 (get_selector_from_reference): Removed.
1489 (is_property): Removed.
1490 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
1491 Updated to work on a PROPERTY_REF and use the PROPERTY_DECL from
1492 the PROPERTY_REF. Generate an error if the property is read-only.
1493 (build_property_reference): Removed.
1494 (objc_finish_message_expr): Removed check to produce "readonly
1495 property can not be set" error when
1496 in_objc_property_setter_name_context. We now generate the error
1497 earlier, in objc_maybe_build_modify_expr, which will only generate
1498 the setter call if the property is readwrite.
1499 (check_methods): Recognize dynamic properties.
1500 (check_methods_accessible): Same change.
1501 (objc_build_property_ivar_name): Removed.
1502 (objc_build_property_setter_name): Dropped bool argument. Always
1503 add the ':' at the end.
1504 (objc_gen_one_property_datum): Removed.
1505 (objc_process_getter_setter): Removed.
1506 (objc_synthesize_getter): Mark 'klass' argument as unused. Use
1507 PROPERTY_GETTER_NAME instead of PROPERTY_NAME. Set the
1508 DECL_SOURCE_LOCATION of the new method to be the same as the one
1509 for the @synthesize. Always use PROPERTY_IVAR_NAME as it is
1510 instead of trying to guess what it should be. Removed use of
1511 CLASS_IVARS. Use the location of @synthesize for c_finish_return
1512 and c_end_compound_statement.
1513 (objc_synthesize_setter): Mark 'klass' argument as unused. Use
1514 PROPERTY_SETTER_NAME instead of trying to guess what it should be.
1515 Set the DECL_SOURCE_LOCATION of the new method to be the same as
1516 the one for the @synthesize. Always use PROPERTY_IVAR_NAME as it
1517 is instead of trying to guess what it should be. Removed use of
1518 CLASS_IVARS. Use the location of @synthesize for c_finish_return
1519 and c_end_compound_statement. Emit an error and keep going,
1520 instead of aborting, if the setter prototype does not have the
1522 (objc_add_synthesize_declaration_for_property): New.
1523 (objc_add_synthesize_declaration): Removed ATTRIBUTE_UNUSED from
1524 all arguments. Improved error message. Filled in the rest of the
1525 function, which used to be a placeholder, with an actual
1527 (objc_add_dynamic_declaration_for_property): New.
1528 (objc_add_dynamic_declaration): Removed ATTRIBUTE_UNUSED from all
1529 arguments. Improved error message. Filled in the rest of the
1530 function, which used to be a placeholder, with an actual
1532 (objc_gen_property_data): Rewritten.
1533 (finish_class): Added explicit switch cases for
1534 CLASS_INTERFACE_TYPE, CATEGORY_INTERFACE_TYPE and
1535 PROTOCOL_INTERFACE_TYPE. Added a default switch case which is
1536 gcc_unreachable. Rewritten the processing of properties, in
1537 particular to not synthesize prototypes for getters and setters if
1538 they already exist and to install the getter and setter names into
1539 PROPERTY_GETTER_NAME and PROPERTY_SETTER_NAME. Do not generate
1540 warnings about setter, getter and ivar property attributes.
1541 (objc_lookup_ivar): Removed support for properties.
1542 (objc_gimplify_property_ref): New.
1543 (objc_gimplify_expr): Use a switch. In case of a PROPERTY_REF, call
1544 objc_gimplify_property_ref.
1546 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
1548 * objc-act.c (objc_add_property_declaration): Added arguments to
1549 pass the various property attributes that were parsed with the
1550 property declaration. Process arguments to determine the final
1551 property attributes and produce error messages as appropriate.
1552 Added temporary code to keep the compiler silent about variables
1553 set but not used - for new attributes that are only checked but
1555 (property_readonly): Removed.
1556 (property_setter): Removed.
1557 (property_getter): Removed.
1558 (property_ivar): Removed.
1559 (property_copies): Removed.
1560 (objc_set_property_attr): Removed.
1561 * objc-act.h (enum property_assign_semantics): New.
1563 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
1565 * objc-act.c (objc_add_property_variable): Renamed to
1566 objc_add_property_declaration. Added location argument. Updated
1567 warnings and errors to use it. Use error, not fatal_error, if a
1568 property declaration is found outside an interface or
1569 implementation context.
1571 2010-10-24 Nicola Pero <nicola.pero@meta-innovation.com>
1573 * objc-act.c (objc_build_keyword_decl): Updated comments. Do not
1574 emit a warning that method parameter attributes are unimplemented.
1575 Instead, store them into DECL_ATTRIBUTES of the KEYWORD_DECL.
1576 (start_method_def): Copy attributes from each KEYWORD_DECL into
1577 the corresponding PARM_DECL.
1578 (objc_warn_deprecated_use): Removed.
1579 (build_objc_method_call): Call warn_deprecated_use, not
1580 objc_warn_deprecated_use.
1581 (objc_maybe_printable_name): Do not try to get the identifier name
1582 of DECLs that we don't recognize. Immediately return NULL for them.
1583 (objc_printable_name): Removed C++-specific case, which is no
1584 longer used. Updated comments.
1586 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
1588 * objc-act.c (OBJC_GEN_METHOD_LABEL): Updated comments.
1589 (objc_demangle): Return NULL if demangling can not be done because
1590 the string to demangle is not an Objective-C mangled method name.
1591 Be smarter in demangling method names so that at least for methods
1592 with no arguments we are able to almost always demangle '_' correctly.
1594 (objc_maybe_printable_name): New.
1595 (objc_printable_name): Call objc_maybe_printable_name. If it
1596 returns NULL, call cxx_printable_name in Objective-C++.
1598 2010-10-21 Iain Sandoe <iains@gcc.gnu.org>
1600 Based on the CFString implementation in FSF apple/trunk branch.
1602 * objc/objc-act.c (objc_build_string_object): Handle CFStrings.
1604 2010-10-21 Nicola Pero <nicola.pero@meta-innovation.com>
1606 * objc-act.c (get_objc_string_decl): Use a switch instead of a
1607 chain of ifs. Use gcc_unreachable instead of abort.
1608 (add_objc_string): Same change.
1609 (generate_protocol_list): Same change - twice.
1610 (synth_id_with_class_suffix): Same change.
1611 (build_keyword_selector): Same change - twice.
1612 (objc_build_message_expr): Same change.
1613 (objc_build_selector_expr): Same change.
1614 (check_methods): Same change - and added missing gcc_unreachable
1616 (check_methods_accessible): Same change - twice, and added missing
1617 gcc_unreachable for default case in one of them.
1618 (start_class): Same change - and added missing gcc_unreachable for
1620 (continue_class): Same change.
1621 (objc_gen_property_data): Same change.
1622 (finish_class): Same change.
1623 (encode_type_qualifiers): Added missing gcc_unreachable.
1624 (encode_type): Small code tidy up to reduce duplicated code. Use
1625 gcc_unreachable instead of abort - twice.
1626 (encode_gnu_bitfield): Use a switch instead of a chain of ifs -
1627 twice. Added missing gcc_unreachable for default case - twice.
1628 (dump_interface): Use a switch instead of a chain of ifs.
1629 (handle_impent): Same change.
1631 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
1633 * objc-act.h (objc_inherit_code): Removed.
1634 * objc-act.c (objc_inherit_code): Removed.
1635 (objc_set_method_type): Removed.
1636 (objc_build_method_signature): Added is_class_method argument.
1637 Use it instead of the global objc_inherit_code variable.
1638 (objc_add_method_declaration): Same change.
1639 (objc_start_method_definition): Same change.
1640 (objc_generate_cxx_ctor_or_dtor): Updated call to
1641 objc_start_method_definition. Do not call objc_set_method_type.
1642 (adjust_type_for_id_default): Mark as inline.
1643 (objc_synthesize_getter): Updated call to
1644 objc_start_method_definition. Do not set objc_inherit_code.
1645 (objc_synthesize_setter): Updated call to
1646 objc_start_method_definition. Do not set objc_inherit_code.
1648 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
1650 Merge from 'apple/trunk' branch on FSF servers. Obvious updates
1651 to gcc_alloc_xxx calls in hash_init and hash_class_name_enter to
1652 get it to compile in the current trunk.
1654 2006-01-27 Fariborz Jahanian <fjahanian@apple.com>
1657 * objc/objc-act.c (hash_class_name_enter): New.
1658 (hash_class_name_lookup): New.
1659 (objc_declare_alias): Enter alias name into hash table.
1660 (objc_declare_class): Enter class name into hash table.
1661 (objc_is_class_name): Do a hash look up of class name.
1662 (hash_init): Initialize the two new hash tables.
1663 * objc-act.h: Added cls_name_hash_list and als_name_hash_list
1664 declarations, removed class_chain and alias_chain.
1666 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
1668 * objc-lang.c (finish_file): Removed.
1669 * objc-act.c (objc_finish_file): Renamed to
1670 objc_write_global_declarations. Do not try to instantiate C++
1671 templates when compiling Objective-C++ as this is now
1672 automatically done before this function is called. Do not check
1673 for syntax-only run or PCH generation as this is done by the
1675 * objc-act.h (objc_finish_file): Removed.
1677 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
1679 Implemented parsing @synthesize and @dynamic for
1680 Objective-C/Objective-C++.
1681 * objc-act.c (objc_add_synthesize_declaration): New.
1682 (objc_add_dynamic_declaration): New.
1684 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
1686 * objc-act.c (lookup_and_install_protocols): Return NULL if passed
1689 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
1691 Merge from 'apple/trunk' branch on FSF servers.
1693 2006-03-10 Fariborz Jahanian <fjahanian@apple.com>
1696 * objc/objc-act.c (objc_is_class_name): template parameter is not
1697 an objective class name.
1698 (objc_generate_cxx_cdtors): Check for the null
1699 objc_implementation_context.
1701 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
1703 Merge from 'apple/trunk' branch on FSF servers.
1705 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
1708 * objc/objc-act.c (objc_non_volatilized_type): New
1710 2005-10-07 Fariborz Jahanian <fjahanian@apple.com>
1713 * objc-act.c (objc_build_volatilized_type): Build 'volatilzed'
1714 types with proper attribute set and correctly.
1715 (objc_volatilize_decl): Remove unneeded code.
1716 (objc_type_quals_match): Use the new attribute to check on
1718 (hash_init): removed unneeded code.
1720 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
1722 Merge from 'apple/trunk' branch on FSF servers.
1724 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
1727 * objc-act.c (objc_diagnose_private_ivar): New.
1729 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
1731 * objc-act.c: Rename 'objc_public_flag' to objc_ivar_visibility and
1732 make its type 'objc_ivar_visibility_kind'.
1733 (objc_start_class_interface): Update to use visibility enum.
1734 (objc_start_class_implementation): Likewise.
1735 (objc_set_visibility): Update to use visibility enum, warn that
1736 @package is handle as per @public.
1737 (add_instance_variable): Handle OBJC_IVAR_VIS_PACKAGE.
1738 * objc-act.h: Rename 'objc_public_flag' to objc_ivar_visibility and
1739 make its type 'objc_ivar_visibility_kind'.
1741 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
1743 merge from FSF apple 'trunk' branch.
1744 2006 Fariborz Jahanian <fjahanian@apple.com>
1746 Radars 4436866, 4505126, 4506903, 4517826
1747 * objc-act.c (CALL_EXPR_OBJC_PROPERTY_GETTER): New.
1748 property_readonly, property_getter, property_setter, property_ivar,
1749 property_copies, in_objc_property_setter_name_context: New vars.
1750 (objc_set_property_attr): New.
1751 (objc_add_property_variable): New.
1752 (lookup_property_in_list): New.
1753 (lookup_property): New.
1754 (objc_build_getter_call): New.
1755 (objc_setter_func_call): New.
1756 (get_selector_from_reference): New.
1757 (objc_build_setter_call): New.
1759 (build_property_reference): New.
1760 (objc_finish_message_expr): Detect readonly property and warn.
1761 (objc_build_property_ivar_name): New.
1762 (objc_build_property_setter_name): New.
1763 (objc_gen_one_property_datum): New.
1764 (objc_process_getter_setter): New.
1765 (objc_synthesize_getter): New.
1766 (objc_synthesize_setter): New.
1767 (objc_gen_property_data): New.
1768 (finish_class): Generate property data.
1769 (comp_proto_with_proto): Separated from ...
1770 (match_proto_with_proto): ... New.
1771 (objc_lookup_ivar): Handle properties.
1772 * objc-tree.def (PROPERTY_DECL): New tree code.
1773 * objc-act.h: CLASS_LANG_SLOT_ELTS, PROTOCOL_LANG_SLOT_ELTS update size.
1774 (METHOD_PROPERTY_CONTEXT): New.
1775 (PROPERTY_NAME): New.
1776 (PROPERTY_GETTER_NAME): New.
1777 (PROPERTY_SETTER_NAME): New.
1778 (PROPERTY_IVAR_NAME): New.
1779 (PROPERTY_READONLY): New.
1780 (PROPERTY_COPIES): New.
1781 (TOTAL_CLASS_RAW_IVARS): New.
1782 (CLASS_PROPERTY_DECL): New.
1783 (IMPL_PROPERTY_DECL): New.
1784 * objc-lang.c (objc_init_ts): Update fields for property_decl.
1786 2010-10-13 Richard Henderson <rth@redhat.com>
1788 * objc-act.c (objc_eh_personality): Update call to
1789 build_personality_function.
1791 2010-10-13 Iain Sandoe <iains@gcc.gnu.org>
1793 merge from FSF apple 'trunk' branch.
1795 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
1796 Radar 3803157 (method attributes)
1797 * objc/objc-act.h (METHOD_TYPE_ATTRIBUTES): New macro.
1798 * objc/objc-act.c (objc_decl_method_attributes): New.
1799 (objc_add_method_declaration): Process method's attribute.
1800 (objc_start_method_definition): Ditto.
1801 (build_objc_method_call): Inject method attribute into
1802 built function type.
1803 (objc_method_decl): New.
1804 (objc_warn_deprecated)use): New.
1806 2010-10-07 Andi Kleen <ak@linux.intel.com>
1808 * Make-lang.in (cc1obj-dummy): Remove.
1809 (cc1obj-checksum): Change to run checksum over object files
1812 2010-10-07 Nicola Pero <nicola.pero@meta-innovation.com>
1815 * objc-act.c (objc_finish_foreach_loop): Convert return value of
1816 countByEnumeratingWithState:objects:count: to long unsigned int.
1818 2010-10-07 Iain Sandoe <iains@gcc.gnu.org>
1820 * objc-act.c (build_objc_method_call): Replace calls to
1821 build_function_call () with the VEC equivalent. Construct parameter
1824 2010-10-07 Iain Sandoe <iains@gcc.gnu.org>
1826 * objc-act.c (objc_build_message_expr): Call mark_exp_read () to
1827 signal that the receiver has been used.
1829 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
1831 * README: Obsolete file removed.
1833 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
1835 Implemented fast enumeration for Objective-C.
1836 * objc-act.c (build_fast_enumeration_state_template): New.
1837 (TAG_ENUMERATION_MUTATION): New.
1838 (TAG_FAST_ENUMERATION_STATE): New.
1839 (synth_module_prologue): Call build_fast_enumeration_state_template() and set up
1840 objc_enumeration_mutation_decl.
1841 (objc_create_temporary_var): Allow providing a name to temporary
1843 (objc_build_exc_ptr): Updated calls to
1844 objc_create_temporary_var().
1845 (next_sjlj_build_try_catch_finally): Same change.
1846 (objc_finish_foreach_loop): New.
1847 * objc-act.h: Added OCTI_FAST_ENUM_STATE_TEMP,
1848 OCTI_ENUM_MUTATION_DECL, objc_fast_enumeration_state_template,
1849 objc_enumeration_mutation_decl.
1851 Merge from 'apple/trunk' branch on FSF servers.
1853 2006-04-12 Fariborz Jahanian <fjahanian@apple.com>
1856 * objc-act.c (objc_type_valid_for_messaging): New routine to check
1857 for valid objc object types.
1858 (objc_finish_foreach_loop): Check for invalid objc objects in
1861 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
1863 Merge from 'apple/trunk' branch on FSF servers.
1865 2005-10-17 Fariborz Jahanian <fjahanian@apple.com>
1868 * objc-act.c (objc_start_method_definition): Check for
1869 error_mark_node for the selector name and make a quick exit.
1871 2010-10-04 Andi Kleen <ak@linux.intel.com>
1873 * Make-lang.in (cc1obj-dummy, cc1obj): Add + to build rule.
1875 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
1877 merge from FSF 'apple/trunk' branch.
1878 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
1881 * objc/objc-act.c (objc_set_method_opt): New function.
1882 (objc_start_protocol, objc_finish_interface): Reset
1883 objc_method_optional_flag flag.
1884 (objc_add_method_declaration): Pass on the new
1885 flag to objc_add_method.
1886 (objc_add_method): Add optional methods to new chain in
1888 * objc/objc-act.h (CLASS_OPTIONAL_CLS_METHODS)
1889 (CLASS_OPTIONAL_NST_METHODS): New macros accessing a protocol
1890 class's optional method chains.
1892 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
1894 Merge from 'apple/trunk' branch on FSF servers.
1896 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
1899 * objc-act.c (objc_declare_class): Pick the right
1902 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
1904 Merge from 'apple/trunk' branch on FSF servers.
1906 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
1909 * objc-act.c (objc_check_global_decl): New
1911 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
1913 * objc-act.c (objc_is_reserved_word): Removed.
1915 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
1917 * objc-act.c (objc_add_method_declaration): Handle and ignore
1919 (objc_start_method_definition): Likewise.
1920 (objc_generate_cxx_ctor_or_dtor): Pass NULL attributes to ctor/dtor.
1921 (objc_build_keyword_decl): Handle and ignore attributes.
1923 2010-09-28 Richard Henderson <rth@redhat.com>
1925 * objc-act.c (objc_eh_personality): Use targetm.except_unwind_info.
1927 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
1929 * objc-act.c (objc_start_class_interface): Handle and ignore attributes.
1930 (objc_start_category_interface): Likewise.
1931 (objc_start_protocol): Likewise.
1933 2010-09-28 Nicola Pero <nicola.pero@meta-innovation.com>
1935 Merge from 'apple/trunk' branch on FSF servers.
1937 2005-08-23 Stuart Hastings <stuart@apple.com>
1938 Ziemowit Laski <zlaski@apple.com>
1941 * objc-act.c (objc_decay_parm_type): New function.
1942 (get_arg_type_list): Decay types for all named arguments.
1943 (objc_push_parm): Rebuild the PARM_DECL if its type has
1946 2010-09-28 Nicola Pero <nicola.pero@meta-innovation.com>
1948 * objc-act.c (encode_type): Fixed encoding enums with the next
1951 2010-09-28 Nicola Pero <nicola.pero@meta-innovation.com>
1953 Merge from 'apple/trunk' branch on FSF servers.
1955 2005-07-18 Ziemowit Laski <zlaski@apple.com>
1958 * objc-act.c (objc_compare_types): A new silent comparison
1959 mode (-4), differing from regular comparison (-3) in that
1960 'false' is returned instead of issuing warnings.
1962 2010-09-28 Nicola Pero <nicola.pero@meta-innovation.com>
1964 * objc-act.c (encode_type): Do not add 'r' with the next runtime.
1965 (encode_aggregate_within): Reorganized code to be more readable.
1966 (encode_aggregate_fields): Updated second argument to be 'bool'
1969 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
1974 * objc-act.c: Improved comments for encoding functions.
1975 (encode_aggregate_within): For the GNU runtime, rewritten some
1976 obsfuscated code to clarify the various cases.
1977 (encode_aggregate): Function removed.
1978 (encode_array): Generate an error if asked to encode an incomplete
1979 array as part of generating instance variables. Else, when
1980 encoding an incomplete array inside a structure, encode it as an
1982 (encode_pointer): For the GNU runtime, fixed encoding 'BOOL *' as
1983 '^c' instead of '*'.
1984 (encode_gnu_bitfield): Encode enumerated types exactly in the same
1985 type as integer types instead of using a hardcoded 'i'. If asked
1986 to encode a non-integer type as a bitfield, do not abort
1987 compilation immediately; instead generate an error, then skip the
1989 (encode_type): Use a 'switch' instead of a sequence of 'if's.
1990 Added a 'default' clause that gets executed if the type can not be
1991 matched, and that encodes it as '?' (unknown) and produces a
1992 warning. For the GNU runtime, encode enumerated types exactly in
1993 the same way as integer types instead of using a hardcoded 'i'.
1994 Encode long double as 'D'. Encode 128-bit integers as 'T' or 't'.
1995 Encode C++ reference types as pointers. Call encode_vector to
1997 (encode_vector): New function.
1999 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
2001 Merge from 'apple/trunk' branch on FSF servers. I modified the
2002 changes to be used only when compiling for the NeXT runtime.
2004 2005-10-10 Fariborz Jahanian <fjahanian@apple.com>
2008 * objc-act.c (encode_type): Remove the hack.
2010 2005-07-20 Ziemowit Laski <zlaski@apple.com>
2013 * objc-act.c (pointee_is_readonly): New function.
2014 (encode_pointer, encode_aggregate_within, encode_type):
2015 Attempt to emulate GCC 3.3 when generating type encodings.
2017 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
2019 Merge from 'apple/trunk' branch on FSF servers.
2021 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
2024 * objc-act.c (objc_have_common_types): New function.
2026 2005-06-22 Ziemowit Laski <zlaski@apple.com>
2029 * objc-act.c (objc_common_type): New function.
2031 2010-09-27 Richard Guenther <rguenther@suse.de>
2033 * objc-act.c (objc_get_class_reference): Use CP_TYPE_CONTEXT.
2034 (objc_is_global_reference_p): Use DECL_FILE_SCOPE_P.
2036 2010-09-26 Nicola Pero <nicola.pero@meta-innovation.com>
2038 * objc-act.c: Removed historical, obsolete comment at the top of
2041 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
2044 * objc-act.c (objc_start_method_definition): Do not abort upon a
2045 'method definition not in @implementation context' error. Return
2048 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
2051 * objc-act.c (objc_get_interface_ivars): New function.
2052 (objc_collecting_ivars): New variable.
2053 (continue_class): Set and reset objc_collecting_ivars for context.
2055 2010-09-15 Nicola Pero <nicola.pero@meta-innovation.com>
2057 Merge from 'apple/trunk' branch on FSF servers.
2059 2006-03-09 Fariborz Jahanian <fjahanian@apple.com>
2062 * objc/objc-act.c (objc_finish_message_expr): Look for message in
2063 @class's protocol list.
2065 2006-02-07 Fariborz Jahanian <fjahanian@apple.com>
2068 * objc/objc-act.c (objc_start_method_definition): Initialize
2069 break/continue labels.
2071 2005-08-22 Ziemowit Laski <zlaski@apple.com>
2074 * objc-act.c (objc_compare_types): Compare function
2075 pointers; indicate success if the right-hand side has
2076 a return type that is covariant, and the argument types
2077 contravariant, with those of the left side.
2079 2005-08-22 Ziemowit Laski <zlaski@apple.com>
2082 * objc-act.c (objc_get_protocol_qualified_type): When looking
2083 at a typedef, retrieve the precise type it describes (rather
2084 than merely looking up a class by name).
2086 2010-09-10 Nicola Pero <nicola.pero@meta-innovation.com>
2088 * objc/objc-act.c (objc_begin_try_stmt): Generate an error if
2089 -fobjc-exceptions was not used. (objc_build_throw_stmt): Same
2092 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
2094 * objc-act.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
2096 2010-07-10 Iain Sandoe <iains@gcc.gnu.org>
2099 * objc-act.c: build_objc_string_decl() remove declaration.
2100 (finish_var_decl): Remove forcing of var output and marking
2102 (init_def_list): Use integer_zero_node.
2103 (init_objc_symtab): Use integer_zero_node, make the short
2104 integer type specific on relevant nodes.
2105 (generate_objc_symtab_decl): Remove call to
2106 forward_declare_categories(). Use null_pointer_node where
2108 (build_module_descriptor): Comment and mark this item as
2110 (generate_static_references): Use gcc_unreachable instead of
2112 (diagnose_missing_method): New.
2113 (build_next_selector_translation_table): New.
2114 (build_gnu_selector_translation_table): New.
2115 (add_objc_string): Merge code from build_objc_string_decl...
2116 ... and delete build_objc_string_decl().
2117 (generate_dispatch_table): Make integer types explicit.
2118 (generate_category): Pass implent and arrange for the data
2119 to be extracted within the routine. Do not start new vars,
2120 but finish the ones collcted during parsing.
2121 (generate_shared_structures): Likewise.
2122 (finish_objc): Reorder code so that we finish variables before
2123 referencing them. Save the global data before calling meta-data
2124 creation routines, and pass the current reference to the two
2125 main routines. Only call generate_objc_image_info () for the
2127 (generate_classref_translation_entry): Comment on and make this
2128 item DECL_PRESERVE_P.
2129 (handle_class_ref): Use varpool interfaces, comment on and make
2130 this item DECL_PRESERVE_P.
2131 (handle_impent): Likewise.
2132 (generate_objc_image_info): Only generate when the content is
2133 non-zero. Make integer types explict.
2135 2010-07-03 Nathan Froyd <froydnj@codesourcery.com>
2138 * objc-act.c (build_sized_array_type): New function.
2139 (add_objc_string): Use it.
2140 (generate_protocol_list): Likewise.
2141 (generate_objc_image_info): Likewise.
2142 (add_field_decl): New function.
2143 (objc_build_struct): Use a VEC rather than building a TREE_LIST.
2144 (generate_struct_by_value_array): Use add_field_decl.
2145 (build_objc_symtab_template): Likewise.
2146 (build_module_descriptor): Likewise.
2147 (build_objc_exception_stuff): Likewise.
2148 (build_protocol_template): Likewise.
2149 (build_method_prototype_list_template): Likewise.
2150 (build_method_prototype_template): Likewise.
2151 (build_category_template): Likewise.
2152 (build_selector_template): Likewise.
2153 (build_class_template): Likewise.
2154 (build_super_template): Likewise.
2155 (build_ivar_template): Likewise.
2156 (build_ivar_list_template): Likewise.
2157 (build_method_list_template): Likewise.
2158 (build_method_template): Likewise.
2160 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
2162 * objc-act.c: Do not include except.h.
2164 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
2166 * objc-act.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Use typed GC
2169 * objc-act.c (objc_volatilize_decl): Likewise.
2170 (objc_build_string_object): Likewise.
2171 (hash_init): Likewise.
2172 (hash_enter): Likewise.
2173 (hash_add_attr): Likewise.
2174 (add_class): Likewise.
2175 (start_class): Likewise.
2177 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
2179 * objc-act.c: Update include path for moved files.
2180 * objc-lang.c: Likewise.
2181 * config-lang.in: Update paths in gtfiles for files in c-family/.
2183 2010-06-01 Nathan Froyd <froydnj@codesourcery.com>
2185 * objc-act.c (build_next_objc_exception_stuff): Give setjmp a
2186 varargs type instead of a zero-argument type.
2188 2010-05-30 Nathan Froyd <froydnj@codesourcery.com>
2190 * objc-act.c (synth_module_prologue): Use build_function_type_list
2191 instead of build_function_type.
2192 (build_module_initializer_routine): Likewise.
2193 (build_next_objc_exception_stuff): Likewise.
2194 (build_objc_exception_stuff): Likewise.
2196 2010-05-27 Joseph Myers <joseph@codesourcery.com>
2198 * objc-act.c: Include diagnostic-core.h instead of diagnostic.h.
2199 * Make-lang.in (objc/objc-act.o): Update dependencies.
2201 2010-05-25 Steven Bosscher <steven@gcc.gnu.org>
2203 * objc-act.h: Do not include gimple.h.
2204 * objc-act.c: Do not include rtl.h, expr.h, libfuncs.h, and tm_p.h.
2205 Include gimple.h. Explain why except.h has to be included.
2206 * objc-lang.c: Do not include diagnostics.h.
2207 * Make-lang.in: Update dependencies.
2209 2010-05-25 Nathan Froyd <froydnj@codesourcery.com>
2211 * objc-act.c (objc_build_constructor): Adjust OBJCPLUS impedance
2212 mismatch code for VECs.
2214 2010-05-25 Nathan Froyd <froydnj@codesourcery.com>
2216 * objc-act.c (objc_build_constructor): Take a VEC instead of a tree.
2217 Use build_constructor instead of build_constructor_from_list.
2218 (objc_build_string_object): Build a VEC argument for
2219 objc_build_constructor.
2220 (init_def_list): Likewise.
2221 (init_objc_symtab): Likewise.
2222 (init_module_descriptor): Likewise.
2223 (generate_static_references): Likewise.
2224 (build_selector_translation_table): Likewise.
2225 (build_descriptor_table_initializer): Likewise.
2226 (generate_descriptor_table): Likewise.
2227 (build_protocol_initializer): Likewise.
2228 (build_ivar_list_initializer): Likewise.
2229 (generate_ivars_list): Likewise.
2230 (build_dispatch_table_initializer): Likewise.
2231 (generate_dispatch_table): Likewise.
2232 (generate_protocol_list): Likewise.
2233 (build_category_initializer): Likewise.
2234 (build_shared_structure_initializer): Likewise.
2235 (generate_objc_image_info): Likewise.
2237 2010-04-30 Iain Sandoe <iains@gcc.gnu.org>
2240 * objc-act.c (encode_aggregate_within): Encode structure tags
2241 with template args for ObjC++.
2243 2010-04-30 Steven Bosscher <steven@gcc.gnu.org>
2245 * objc-act.c: Do not include varray.h.
2247 2010-04-07 Jakub Jelinek <jakub@redhat.com>
2250 * objc-act.c (finish_var_decl, objc_begin_catch_clause,
2251 really_start_method, get_super_receiver, handle_class_ref): Set
2252 DECL_READ_P in addition to TREE_USED.
2254 2010-04-07 Iain Sandoe <iains@gcc.gnu.org>
2257 * objc-act.c (objc_init): Warn that -fobjc-gc is ignored for
2258 -fgnu-runtime and set flag_objc_gc to zero.
2260 2010-04-07 Iain Sandoe <iains@gcc.gnu.org>
2263 * objc-act.c (build_module_initializer_routine): Make the argument
2264 to objc_start_function NULL_TREE when compiling ObjC++.
2266 2010-02-18 Iain Sandoe <iain.sandoe@sandoe-acoustics.co.uk>
2267 Mike Stump <mikestump@comcast.net>
2270 * objc-act.c (finish_var_decl): Set the generated symbols as "used".
2272 2009-12-17 Shujing Zhao <pearly.zhao@oracle.com>
2274 * objc-act.c (objc_substitute_decl, build_ivar_reference,
2275 get_super_receiver): Update build_indirect_ref calls.
2277 2009-11-28 Jakub Jelinek <jakub@redhat.com>
2279 * objc-act.c (generate_shared_structures): Remove unused sc_spec and
2280 decl_specs variables.
2281 (objc_build_message_expr): Remove unused loc variable.
2282 (objc_finish_message_expr): Remove unused saved_rtype variable.
2283 (encode_field_decl): Remove unused type variable.
2286 * objc-act.c (objc_build_struct): INIT_TYPE_OBJC_INFO for
2287 type variants that don't have it initialized yet.
2289 2009-09-14 Jan Hubicka <jh@suse.cz>
2291 * objc-act.c (objc_add_static_instance): Do not set DECL_COMMON.
2293 2009-09-14 Richard Henderson <rth@redhat.com>
2295 * objc-act.c (objc_init_exceptions): Don't call
2296 default_init_unwind_resume_libfunc.
2297 (objc_build_exc_ptr): Use __builtin_eh_pointer.
2299 2009-09-13 Richard Guenther <rguenther@suse.de>
2300 Rafael Avila de Espindola <espindola@google.com>
2302 * objc-act.c (objc_eh_runtime_type): Export.
2303 (objc_init_exceptions): Remove. Move warning code ...
2304 (objc_begin_try_stmt): ... here
2305 (objc_build_throw_stmt): ... and here.
2306 (objc_eh_personality_decl): New.
2307 (objc_eh_personality): New function.
2308 * objc-act.h (objc_eh_runtime_type): Declare.
2309 (objc_eh_personality): Likewise.
2310 * objc-lang.c (LANG_HOOKS_EH_RUNTIME_TYPE): Define.
2311 (LANG_HOOKS_EH_PERSONALITY): Likewise.
2313 2009-09-03 Diego Novillo <dnovillo@google.com>
2315 * objc-lang.c (lang_hooks): Remove const qualifier.
2317 2009-08-20 Richard Guenther <rguenther@suse.de>
2319 * objc-act.c: Include c-lang.h
2320 * Make-lang.in (objc/objc-act.o): Add c-lang.h dependency.
2322 2009-07-17 Aldy Hernandez <aldyh@redhat.com>
2323 Manuel López-Ibáñez <manu@gcc.gnu.org>
2326 * objc-act.c: Add location argument to all calls to
2327 build_fold_addr_expr.
2329 2009-07-14 Taras Glek <tglek@mozilla.com>
2330 Rafael Espindola <espindola@google.com>
2332 * Make-lang.in (objc.install-plugin): New target for
2333 installing plugin headers.
2335 2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
2337 * objc-act.c (next_sjlj_build_catch_list): Replace EXPR_LOCUS by
2340 2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
2342 * objc-act.c: Replace %J by an explicit location. Update all
2345 2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
2347 * objc-act.c: Replace %H by an explicit location. Update all
2350 2009-06-22 Steven Bosscher <steven@gcc.gnu.org>
2353 * objc-act.c (objc_build_message_args): Return if ARGS is the
2356 2009-06-19 Ian Lance Taylor <iant@google.com>
2358 * objc-act.c (objc_in_struct, objc_struct_types): Remove.
2359 (objc_struct_info): New static variable.
2360 (objc_start_struct): Pass &objc_struct_info, not &objc_in_struct
2361 and &objc_struct_types, to start_struct.
2362 (objc_finish_struct): Likewise for finish_struct.
2364 2009-06-15 Ian Lance Taylor <iant@google.com>
2366 * objc-act.c (objc_start_function): Don't set
2367 label_context_stack_se or label_context_stack_vm.
2369 2009-06-12 Aldy Hernandez <aldyh@redhat.com>
2371 * objc-act.c (finish_var_decl): Pass location to finish_decl.
2372 (objc_get_parm_info): Same.
2373 (get_super_receiver): Same.
2374 * objc-act.c (objc_build_component_ref): Pass location to
2376 (build_module_initializer_routine): Pass location to
2377 c_end_compound_stmt.
2378 (objc_generate_static_init_call): Pass location to build_stmt.
2379 (build_typed_selector_reference): New location argument.
2380 (build_selector_reference): Same.
2381 (objc_substitute_decl): Pass location to build_array_ref.
2382 (next_sjlj_build_try_catch_finally): Pass location to build_stmt.
2383 (objc_begin_catch_clause): Same.
2384 (objc_finish_try_stmt): Same.
2385 (objc_finish_catch_clause): Pass location to c_end_compound_stmt.
2386 (objc_build_throw_stmt): New argument.
2387 (generate_shared_structures): Pass location to build_c_cast.
2388 (objc_build_message_expr): Use local location.
2389 (objc_finish_message_expr): Use input_location.
2390 (build_objc_method_call): New argument.
2391 (objc_build_selector_expr): Same.
2392 (get_super_receiver): Pass location to build_c_cast,
2393 build_modify_expr, build_compound_expr.
2394 * objc-act.c: Add location to all calls to start_struct, build_decl,
2397 2009-06-09 Ian Lance Taylor <iant@google.com>
2399 * objc-act.c (objc_gimplify_expr): Change return type to int.
2400 * objc-act.h: Update declaration.
2402 2009-06-08 Alexandre Oliva <aoliva@redhat.com>
2404 * objc-act.c (objc_init): Skip print_struct_values during
2405 -fcompare-debug-second.
2407 2009-06-03 Ian Lance Taylor <iant@google.com>
2409 * Make-lang.in (cc1obj-checksum.o): Depend upon $(CONFIG_H) and
2412 2009-05-27 Ian Lance Taylor <iant@google.com>
2414 * Make-lang.in (cc1obj-dummy$(exeext)): Change $(COMPILER) to
2416 (cc1obj$(exeext)): Likewise.
2418 2009-05-26 Ian Lance Taylor <iant@google.com>
2420 * Make-lang.in (cc1obj-dummy$(exeext)): Use $(COMPILER).
2421 (cc1obj$(exeext)): Likewise.
2423 2009-05-20 Ian Lance Taylor <iant@google.com>
2425 * objc-act.c (objc_generate_cxx_ctor_or_dtor): Pass NULL rather
2426 than NULL_TREE to build_special_member_call.
2428 2009-05-10 Ian Lance Taylor <iant@google.com>
2430 * objc-act.c (objc_building_struct): New static variable.
2431 (objc_in_struct, objc_struct_types): New static variables.
2432 (objc_start_struct, objc_finish_struct): New static functions.
2433 (generate_struct_by_value_array): Call objc_start_struct instead
2434 of start_struct, and call objc_finish_struct instead of
2436 (objc_build_struct, build_objc_symtab_template): Likewise.
2437 (build_module_descriptor): Likewise.
2438 (build_next_objc_exception_stuff): Likewise.
2439 (build_protocol_template): Likewise.
2440 (build_method_prototype_list_template): Likewise.
2441 (build_method_prototype_template): Likewise.
2442 (build_category_template, build_selector_template): Likewise.
2443 (build_class_template, build_super_template): Likewise.
2444 (build_ivar_template, build_ivar_list_template): Likewise.
2445 (build_method_list_template): Likewise.
2446 (build_method_template): Likewise.
2448 2009-05-10 Joseph Myers <joseph@codesourcery.com>
2450 * objc-act.c: Include intl.h.
2451 (objc_lookup_protocol): Use complete sentences for diagnostics
2452 with %qE for identifiers and translating results of
2453 gen_type_name_0 to locale character set.
2454 (objc_check_decl, check_protocol_recursively,
2455 lookup_and_install_protocols, objc_build_string_object,
2456 objc_get_class_reference, objc_declare_alias, objc_declare_class,
2457 objc_get_class_ivars, error_with_ivar, check_duplicates,
2458 objc_finish_message_expr, objc_build_protocol_expr,
2459 objc_build_selector_expr, build_ivar_reference, objc_add_method,
2460 add_category, add_instance_variable, objc_is_public,
2461 check_methods, check_methods_accessible, check_protocol,
2462 start_class, finish_class, start_protocol, really_start_method,
2463 get_super_receiver, objc_lookup_ivar): Use %E and %qE for
2464 identifiers in diagnostics. Translate generated text to locale
2465 character set as needed.
2466 (check_protocol, check_protocols): Change name parameter to type
2468 (lang_report_error_function): Remove.
2470 2009-04-27 Ian Lance Taylor <iant@google.com>
2472 * objc-act.c (objc_gimplify_expr): Add casts to enum type.
2474 2009-04-24 Ian Lance Taylor <iant@google.com>
2476 * objc-act.c (get_super_receiver): Update calls to
2477 build_modify_expr to pass new argument.
2479 2009-04-21 Taras Glek <tglek@mozilla.com>
2481 * objc-act.c: Update GTY annotations to new syntax
2482 * objc-act.h: Likewise
2484 2009-04-21 Joseph Myers <joseph@codesourcery.com>
2486 * ChangeLog: Add copyright and license notices.
2488 2009-04-20 Ian Lance Taylor <iant@google.com>
2490 * objc-act.c (objc_rewrite_function_call): Change parameter from
2491 params to first_param. Change all callers.
2493 2009-03-30 Dominique d'Humieres <dominiq@lps.ens.fr>
2496 * objc-act.c (in_late_binary_op): Define for Objective-C++.
2498 2009-03-29 Joseph Myers <joseph@codesourcery.com>
2506 * objc-act.c (objc_finish_try_stmt): Set in_late_binary_op.
2508 2008-12-05 Sebastian Pop <sebastian.pop@amd.com>
2511 * Make-lang.in (cc1obj-dummy, cc1obj): Add BACKENDLIBS,
2514 2008-10-06 Aldy Hernandez <aldyh@redhat.com>
2516 * objc-act.c (objc_build_string_object): Pass location to
2518 (init_def_list): Same.
2519 (init_objc_symtab): Same.
2520 (init_module_descriptor): Same.
2521 (build_module_initializer_routine): Same.
2522 (generate_static_references): Same.
2523 (build_typed_selector_reference): Same.
2524 (add_objc_string): Same.
2525 (objc_substitute_decl): Same.
2526 (objc_build_ivar_assignment): Same.
2527 (objc_build_global_assignment): Same.
2528 (objc_build_strong_cast_assignment): Same.
2529 (generate_protocols): Same.
2530 (build_protocol_initializer): Same.
2531 (build_dispatch_table_initializer): Same.
2532 (generate_protocol_list): Same.
2533 (build_category_initializer): Same.
2534 (build_shared_structure_initializer): Same.
2535 (generate_shared_structures): Same.
2536 (objc_build_protocol_expr): Same.
2537 (build_ivar_reference): Same.
2538 (get_super_receiver): Same.
2540 2008-09-23 Aldy Hernandez <aldyh@redhat.com>
2542 * objc-act.c (next_sjlj_build_enter_and_setjmp): Call
2543 c_common_truthvalue_conversion with location.
2544 (next_sjlj_build_catch_list): Same.
2545 (next_sjlj_build_try_catch_finally): Same.
2547 2008-09-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
2550 * objc-lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): Don't define.
2551 * objc-act.h (objc_get_callee_fndecl): Remove prototype.
2552 * objc-act.c (objc_get_callee_fndecl): Kill.
2554 2008-09-17 Jan Hubicka <jh@suse.cz>
2557 * objc/objc-act.c (objc_finish_method_definition): Do not set
2560 2008-09-01 Aldy Hernandez <aldyh@redhat.com>
2562 * objc-act.c (build_typed_selector_reference): Pass input_location to
2563 build_unary_op calls.
2564 (build_selector_reference): Same, but to build_array_ref.
2565 (objc_substitute_decl): Same.
2566 (build_ivar_reference): Same, but to build_indirect_ref.
2567 (get_super_receiver): Same.
2569 2008-07-28 Richard Guenther <rguenther@suse.de>
2571 Merge from gimple-tuples-branch.
2573 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
2575 * Make-lang.in (objc-lang.o): Depend on GIMPLE_H.
2576 (objc-act.o): Rename TREE_GIMPLE_H to GIMPLE_H.
2577 * objc-act.h: Include gimple.h instead of tree-gimple.h.
2578 * ipa-reference.c: Same.
2580 2007-11-10 Aldy Hernandez <aldyh@redhat.com>
2582 * objc-act.c (objc_gimplify_expr): Change pre and post to sequences.
2583 * objc-act.h (objc_gimplify_expr): Change prototype accordingly.
2585 2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2587 * objc-act.c: Fix comment typos.
2589 2008-07-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2591 * objc-act.c (objc_start_class_interface,
2592 objc_start_category_interface, objc_start_class_implementation,
2593 objc_start_category_implementation, objc_build_struct,
2594 generate_static_references, build_private_template,
2595 lookup_category, objc_add_method, add_category,
2596 add_instance_variable, objc_is_public, conforms_to_protocol,
2597 start_class, continue_class, finish_class): Avoid C++ keywords.
2599 2008-07-14 Jason Merrill <jason@redhat.com>
2602 * objc-act.c (objc_build_constructor): Update C++ tweak.
2604 2007-07-14 Rafael Ávila de Espíndola <espindola@google.com>
2606 * objc-act.c (synth_module_prologue): Use TREE_NO_WARNING instead
2607 of DECL_IN_SYSTEM_HEADER.
2609 2008-07-11 Ian Lance Taylor <iant@google.com>
2611 * objc-act.c (objc_is_reserved_word): Always check for RID_CLASS,
2612 etc., not just when OBJCPLUS is defined.
2614 2008-06-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2616 * objc-act.c (setup_string_decl, objc_build_string_object,
2617 hash_interface, eq_interface, objc_begin_try_stmt,
2618 encode_method_prototype, build_ivar_list_initializer,
2619 objc_build_encode_expr): Fix for -Wc++-compat.
2621 2008-05-12 Tomas Bily <tbily@suse.cz>
2623 * objc-act.c (objc_generate_write_barrier, objc_finish_message_expr):
2626 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
2628 * objc-act.c (objc_build_string_object): Don't set TREE_INVARIANT.
2630 2008-04-03 Tom Tromey <tromey@redhat.com>
2632 * Make-lang.in (objc_OBJS): New variable.
2634 2008-03-27 Tom Tromey <tromey@redhat.com>
2636 * Make-lang.in: Revert automatic dependency patch.
2638 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
2641 * objc-act.c (objc_build_component_ref): Fix call to
2642 finish_class_member_access_expr.
2643 (objc_generate_cxx_ctor_or_dtor): Fix call to
2644 build_special_member_call.
2646 2008-03-25 Andrew Pinski <pinskia@gmail.com>
2649 * objc-act.c (encode_type): Handle when type is error_mark_node.
2650 (objc_push_parm): Handle when the type of parm is error_mark_node.
2652 2008-03-25 Tom Tromey <tromey@redhat.com>
2654 * Make-lang.in (objc_OBJS): New variable.
2655 (cc1obj-checksum.o, objc/objc-lang.o, objc/objc-act.o): Remove.
2657 2008-03-21 Andreas Tobler <a.tobler@schweiz.org>
2660 * objc-act.c (objc_generate_cxx_ctor_or_dtor): Rename IS_AGGR_TYPE to
2662 (objc_generate_cxx_cdtors): Likewise.
2663 (add_instance_variable): Likewise.
2665 2008-02-26 Tom Tromey <tromey@redhat.com>
2667 * objc-act.c (objc_init): Remove old location code.
2669 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2672 * Make-lang.in (cc1obj-dummy, cc1obj): Add $(GMPLIBS).
2674 2007-07-30 Nick Clifton <nickc@redhat.com>
2676 * Make-lang.in: Change copyright header to refer to version 3 of
2677 the GNU General Public License and to point readers at the
2678 COPYING3 file and the FSF's license web page.
2679 * lang-specs.h, objc-act.c, objc-tree.def, objc-act.h,
2680 config-lang.in, objc-lang.c: Likewise.
2682 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2684 * objc-act.c (objc_get_callee_fndecl): Constify.
2685 * objc-act.h (objc_get_callee_fndecl): Likewise.
2687 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2689 * objc-act.c (volatilized_hash, volatilized_eq, string_hash,
2690 string_eq): Constify.
2692 2007-04-04 Stuart Hastings <stuart@apple.com>
2695 * objc/objc-act.c (next_sjlj_build_catch_list): Delete volatile from rethrow decl.
2697 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
2699 * Make-lang.in: Add dummy lang.install-pdf target.
2701 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
2703 * objc/objc-act.c: Fix comment typos.
2705 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
2706 Brooks Moses <brooks.moses@codesourcery.com>
2707 Lee Millward <lee.millward@codesourcery.com>
2709 * objc-act.c (receiver_is_class_object): Use new CALL_EXPR accessors.
2710 (objc_get_callee_fndecl): Likewise.
2712 2007-01-23 Andrew Pinski <pinskia@gmail.com>
2715 * objc-act.c (objc_add_static_instance): Mark the decl as
2718 2007-01-20 Andrew Pinski <pinskia@gmail.com>
2721 * objc-act.c (hash_interface): Use IDENTIFIER_HASH_VALUE instead
2722 of htab_hash_pointer.
2723 (lookup_interface): Likewise.
2724 (add_class): Likewise.
2726 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
2728 * objc-act.c (objc_build_volatilized_type): Keep track of
2730 (objc_get_protocol_qualified_type): Ditto.
2732 2006-11-02 Andreas Tobler <a.tobler@schweiz.org>
2734 * objc-act.c (objc_finish_file): Remove ifdef clause for OBJCPLUS and
2735 content where we called cp_finish_file.
2737 2006-10-23 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
2739 * objc-act.c (synth_module_prologue): Replace calls to
2740 builtin_function with add_builtin_function.
2741 (build_next_objc_exception_stuff): Replace calls to
2742 builtin_function with add_builtin_function.
2743 (build_objc_exception_stuff): Replace calls to
2744 builtin_function with add_builtin_function.
2746 2006-10-10 Brooks Moses <bmoses@stanford.edu>
2748 * Make-lang.in: Added empty "objc.pdf" target.
2750 2006-09-26 Andrew Pinski <pinskia@physics.uc.edu>
2753 * objc-act.c (objc_push_parm): If we change the type of the
2754 decl, relayout the decl.
2756 2006-09-19 Eric Christopher <echristo@apple.com>
2758 * objc-act.c (JBLEN): Rename to OBJC_JBLEN,
2759 default to something innocuous.
2760 (build_next_objc_exception_stuff): Rename JBLEN.
2762 2006-07-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2764 * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
2766 2006-07-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2769 * objc-act.c (lookup_and_install_protocols): Skip error_mark_nodes.
2771 2006-06-06 Mike Stump <mrs@apple.com>
2773 * objc-act.c: Remove prototype for objc_build_volatilized_type.
2775 2006-05-24 Mike Stump <mrs@apple.com>
2777 * objc-act.c (build_next_objc_exception_stuff): Use JBLEN instead of _JBLEN.
2779 2006-05-05 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2782 * objc-act.c (objc_is_public): Return early on invalid type.
2784 2006-03-02 Fariborz Jahanian <fjahanian@apple.com>
2786 * objc-act.c (init_module_descriptor): Remove file name from
2788 (gen_type_name_0): Fix ICE when issuing warning.
2790 2006-02-20 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
2791 * Make-lang.in (OBJC): Remove
2792 (OBJECTIVE-C): Remove
2793 (objective-c): Remove
2794 (.PHONY): Remove objective-c and ObjC
2796 2005-12-14 Andrew Pinski <pinskia@physics.uc.edu>
2799 * objc/objc-act.c (encode_type): Encode Complex types as 'j' followed
2802 2005-12-12 Andrew Pinski <pinskia@physics.uc.edu>
2805 * objc-act.c (encode_array): Handle arrays to zero sized types.
2807 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
2809 * Make-lang.in (objc.all.build, objc.install-normal): Remove.
2811 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
2813 * Make-lang.in: Remove all dependencies on s-gtype.
2815 2005-12-02 Richard Guenther <rguenther@suse.de>
2817 * objc-act.c (objc_build_exc_ptr, next_sjlj_build_enter_and_setjmp
2818 next_sjlj_build_exc_extract, next_sjlj_build_catch_list,
2819 next_sjlj_build_try_catch_finally, objc_begin_catch_clause,
2820 build_objc_method_call, objc_rewrite_function_call): Use buildN
2823 2005-10-20 Geoffrey Keating <geoffk@apple.com>
2825 * objc-act.c (synth_module_prologue): Clear TREE_NOTHROW
2826 on objc_msgSend and like builtin functions.
2828 2005-10-17 Andreas Krebbel <krebbel1@de.ibm.com>
2830 * objc-act.c (objc_build_component_ref): Adjust call to
2831 finish_class_member_access_expr due to a changed prototype.
2833 2005-08-31 Andrew Pinski <pinskia@physics.uc.edu>
2836 * objc-act.c (generate_strings): Remove and move code to
2838 (add_objc_string): here when creating a new string decl.
2839 (finish_objc): Don't call generate_strings.
2841 2005-08-31 Andrew Pinski <pinskia@physics.uc.edu>
2844 * objc-act.c (next_sjlj_build_try_catch_finally): Set
2845 TREE_SIDE_EFFECTS on catch_seq after building it.
2847 2005-08-09 Andrew Pinski <pinskia@physics.uc.edu>
2849 part of PR objc/21992
2850 * objc-act.c (handle_class_ref): The ref decl is always referenced.
2852 2005-07-20 Giovanni Bajo <giovannibajo@libero.it>
2854 Make CONSTRUCTOR use VEC to store initializers.
2855 * objc-act.c (objc_build_constructor): Use build_constructor_from_list
2856 instead of build_constructor.
2858 2005-07-08 Daniel Berlin <dberlin@dberlin.org>
2860 * objc-act.c (objc_push_parm): DECL_ARG_TYPE_AS_WRITTEN is
2862 * objc-act.h (KEYWORD_ARG_NAME): Use decl_non_common.
2863 (KEYWORD_KEY_NAME): Use decl_minimal.
2864 (METHOD_SEL_NAME): Ditto..
2865 (METHOD_SEL_ARGS): Use decl_non_common.
2866 (METHOD_ADD_ARGS): Ditto.
2867 (METHOD_ADD_ARGS_ELLIPSIS_P): Use decl_common.
2868 (METHOD_DEFINITION): Ditto.
2869 (METHOD_ENCODING): Ditto.
2870 * objc-lang.c: (objc_init_ts): New function.
2872 2005-07-07 Ziemowit Laski <zlaski@apple.com>
2874 * objc-act.c (objc_build_struct): Pass in an actual @interface
2875 instead of its name, and annotate the struct created (and all
2876 existing variants thereof) with the @interface.
2877 (objc_compare_types): Treat forward-declared ObjC classes
2878 as stand-alone (root) classes for purposes of type comparisons.
2879 (build_private_template): Move some code to objc_build_struct().
2881 2005-07-07 Ziemowit Laski <zlaski@apple.com>
2884 * objc-act.c (objc_build_string_object): For GNU-style constants,
2885 use the @interface type rather than the built-in type.
2887 2005-07-03 Kazu Hirata <kazu@codesourcery.com>
2889 * Make-lang.in (cc1plus-checksum.c): Use
2890 build/genchecksum$(build_exeext), not build/genchecksum$(exeext).
2892 2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
2894 * objc-act.c: Use %q to quote in diagnostics.
2896 2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
2898 * objc-act.c: Use '+' flag instead of %J. Use 'q' flag for
2901 2005-06-30 Ziemowit Laski <zlaski@apple.com>
2903 * objc-act.c (objc_build_volatilized_type): New function.
2904 (objc_volatilize_decl): Call objc_build_volatilized_type()
2905 instead of build_qualified_type().
2907 2005-06-29 Ziemowit Laski <zlaski@apple.com>
2909 * objc-act.c (objc_build_internal_const_str_type): New function.
2910 (check_string_class_template): Use objc_get_class_ivars() instead
2911 of TYPE_FIELDS() to retrieve ivar list.
2912 (AT_LEAST_AS_LARGE_AS): Check the size of each field's type rather
2913 than the field itself.
2914 (objc_build_string_object): Synthesize a "__builtin_ObjCString"
2915 type and use it to lay out compile-time string objects.
2916 * objc-act.h (OCTI_INTERNAL_CNST_STR_TYPE, internal_const_str_type):
2919 2005-06-28 Paul Brook <paul@codesourcery.com>
2921 * objc-act.c (objc_init_exceptions): Call
2922 default_init_unwind_resume_libfunc.
2924 2005-06-27 Ziemowit Laski <zlaski@apple.com>
2926 * objc-act.c (objc_build_struct): Save the TYPE_OBJC_INFO
2927 portion of TYPE_LANG_SPECIFIC info for all variants of
2928 a class before calling finish_struct(), and restore
2929 same TYPE_OBJC_INFO afterwards.
2931 2005-06-25 Kelley Cook <kcook@gcc.gnu.org>
2933 * all files: Update FSF address in copyright headers.
2935 2005-06-15 Joseph S. Myers <joseph@codesourcery.com>
2937 * objc-act.c (my_build_string_pointer): New.
2938 (objc_get_class_reference, get_super_receiver): Call
2939 my_build_string_pointer instead of my_build_string when building
2942 2005-05-25 Mike Stump <mrs@mrs.kithrup.com>
2944 * objc-act.c (volatilized_hash): Avoid warnings on 64-bit
2947 2005-05-24 Ziemowit Laski <zlaski@apple.com>
2949 * objc-act.c (objc_build_struct): New function.
2950 (objc_derived_from_p): Likewise.
2951 (objc_build_component_ref): Likewise.
2952 (objc_copy_binfo): Likewise.
2953 (objc_xref_basetypes): Likewise.
2954 (objc_lookup_protocol): Likewise.
2955 (objc_compare_protocols): Likewise.
2956 (objc_volatilize_decl): Likewise.
2957 (encode_aggregate_fields): Likewise.
2958 (volatilized_hash): Likewise.
2959 (volatilized_eq): Likewise.
2960 (objc_compare_types): Likewise.
2961 (objc_type_quals_match): Likewise.
2962 (DERIVED_FROM_P): New ObjC macro, corresponding to C++ macro
2964 (get_class_ivars): Add second parameter indicating if entire
2965 hierarchy is desired.
2966 (struct volatilized_type): New type.
2967 (volatilized_htab): New hash table.
2968 (objc_types_compatible_p, objc_comptypes): Remove functions.
2969 (synth_module_prologue): Do not initialize 'unused_list'.
2970 (objc_get_class_reference): Fix ObjC++ impedance mismatches.
2971 (objc_declare_alias): Implement as a typedef.
2972 (objc_substitute_decl, objc_gimplify_expr): Reformat.
2973 (objc_get_class_ivars): Adjust call to get_class_ivars().
2974 (next_sjlj_build_enter_and_setjmp, synth_forward_declarations,
2975 build_ivar_reference, get_super_receiver): Call
2976 objc_build_component_ref() instead of build_component_ref().
2977 (objc_begin_catch_clause): Use DERIVED_FROM_P() instead of
2979 (build_private_template): Call objc_build_struct() instead of
2980 start_struct() and finish_struct().
2981 (hash_init): Initialize volatilized_htab.
2982 (objc_is_public): Adjust calls to objc_get_ivars(); adjust
2983 ObjC++ impedance mismatches.
2984 (encode_aggregate_within): Streamline by calling
2985 encode_aggregate_fields().
2986 * objc-act.h (objc_types_compatible_p): Remove prototype.
2987 (OCTI_UNUSED_LIST, unused_list): Remove slot.
2988 * objc-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Remove.
2990 2005-05-18 Geoffrey Keating <geoffk@apple.com>
2992 * Make-lang.in (cc1obj-dummy): New.
2993 (cc1obj-checksum.c): New.
2994 (cc1obj-checksum.o): New.
2995 (cc1obj): Add cc1obj-checksum.o.
2997 2005-05-18 Mike Stump <mrs@apple.com>
3000 * objc-act.c (struct interface_tuple): Mark it up for GC.
3001 (interface_htab): It is really a struct interface_tuple.
3003 2005-05-17 Ziemowit Laski <zlaski@apple.com>
3004 Mike Stump <mrs@apple.com>
3006 Yet more Objective-C++...
3008 * objc-act.c (objc_finish_try_stmt): Add return value.
3009 (objc_build_synchronized): Likewise.
3011 * objc-act.c (objc_is_gcable_type): Add.
3012 (objc_substitute_decl): Add.
3013 (objc_build_ivar_assignment): Add.
3014 (objc_build_global_assignment): Add.
3015 (objc_build_strong_cast_assignment): Add.
3016 (objc_is_ivar_reference_p): Add.
3017 (objc_is_global_reference_p): Add.
3018 (objc_generate_write_barrier): Add.
3019 (objc_rewrite_function_call): Add.
3020 (objc_gimplify_expr): Add Objective-C++ support.
3021 * objc-act.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Likewise.
3022 (SIZEOF_OBJC_TYPE_LANG_SPECIFIC): Add.
3023 (INIT_TYPE_OBJC_INFO): Add Objective-C++ support.
3024 (DUP_TYPE_OBJC_INFO): Likewise.
3025 (struct imp_entry): Add field has_cxx_cdtors.
3026 (struct imp_entry *imp_list): Add OCTI_UMSG_FAST_DECL,
3027 OCTI_METH_LIST_TEMPL, OCTI_METH_PROTO_LIST_TEMPL,
3028 OCTI_IVAR_LIST_TEMPL, OCTI_ASSIGN_IVAR_DECL,
3029 OCTI_ASSIGN_IVAR_FAST_DECL, OCTI_ASSIGN_GLOBAL_DECL,
3030 OCTI_ASSIGN_STRONGCAST_DECL.
3031 (umsg_fast_decl): Add.
3032 (objc_assign_ivar_decl): Add.
3033 (objc_assign_ivar_fast_decl): Add.
3034 (objc_assign_global_decl): Add.
3035 (objc_assign_strong_cast_decl): Add.
3036 (objc_method_list_ptr): Add.
3037 (objc_method_proto_list_ptr): Add.
3038 (objc_ivar_list_ptr): Add.
3040 * objc-act.c (should_call_super_dealloc): Add.
3041 (OBJC_VERSION): Bump to 6.
3042 (objc_is_gcable_type): Add.
3043 (objc_substitute_decl): Add.
3044 (objc_build_ivar_assignment): Add.
3045 (objc_build_global_assignment): Add.
3046 (objc_build_strong_cast_assignment): Add.
3047 (objc_is_gcable_p): Add.
3048 (objc_is_ivar_reference_p): Add.
3049 (objc_is_global_reference_p): Add.
3050 (generate_shared_structures): Add flags parameter.
3051 (objc_generate_cxx_ctor_or_dtor): Add.
3052 (objc_generate_cxx_cdtors): Add.
3053 (add_class): Add name parameter.
3054 (objc_types_share_size_and_alignment): Add.
3055 (comp_proto_with_proto): Add strict parameter.
3056 (CLS_HAS_CXX_STRUCTORS): Add.
3057 (TAG_ASSIGNIVAR): Add.
3058 (TAG_ASSIGNGLOBAL): Add.
3059 (TAG_ASSIGNSTRONGCAST): Add.
3060 (TAG_MSGSEND_FAST): Add.
3061 (TAG_ASSIGNIVAR_FAST): Add.
3062 (TAG_CXX_CONSTRUCT): Add.
3063 (TAG_CXX_DESTRUCT): Add.
3064 (OBJC_LOOKUP_CLASS): Add.
3065 (OBJC_LOOKUP_NO_SUPER): Add.
3066 (objc_finish_file): Add pch support.
3067 (objc_finish_implementation): Add Objective-C++ support.
3068 (synth_module_prologue): Likewise.
3069 (synth_module_prologue): Add fast dispatching.
3070 (objc_get_class_reference): Add Objective-C++ support.
3071 (objc_generate_write_barrier): Likewise.
3072 (next_sjlj_build_enter_and_setjmp): Likewise.
3073 (objc_begin_try_stmt): Likewise.
3074 (build_next_objc_exception_stuff): Add fast ivar support.
3075 (build_private_template): Mark the record as used so debug
3076 information is generated.
3077 (build_protocol_template): Add Objective-C++ support.
3078 (objc_method_parm_type) Likewise.
3079 (objc_generate_cxx_ctor_or_dtor): Likewise.
3080 (objc_generate_cxx_cdtors): Likewise.
3081 (build_protocol_initializer): Likewise.
3082 (build_category_template): Likewise.
3083 (build_class_template): Likewise.
3084 (build_method_list_template): Likewise.
3085 (build_category_initializer): Likewise.
3086 (build_shared_structure_initializer): Likewise.
3087 (objc_finish_message_expr): Likewise.
3088 (build_objc_method_call): Add fast dispatch support.
3089 (lookup_method_static): Add support to end search at superclasses.
3090 (add_method_to_hash_list): Add strict parameter to
3091 comp_proto_with_proto.
3092 (objc_add_method): Likewise.
3093 (objc_add_method): Also set the interface_value.
3094 (add_instance_variable): Add Objective-C++ support.
3095 (objc_is_public): Likewise.
3096 (start_class): Likewise.
3097 (continue_class): Likewise.
3098 (encode_aggregate_within): Likewise.
3099 (start_method_def): Likewise.
3100 (objc_start_function): Clear current_function_returns_value
3101 and current_function_returns_null.
3102 (really_start_method): Add Objective-C++ support.
3103 (objc_finish_method_definition): Add warning for missing
3105 (finish_objc): Add Objective-C++ support.
3106 (generate_objc_image_info): Likewise.
3107 (objc_lookup_ivar): Likewise.
3108 * objc-act.h (TYPE_HAS_OBJC_INFO): Likewise.
3109 (INIT_TYPE_OBJC_INFO): Likewise.
3110 (DUP_TYPE_OBJC_INFO): Likewise.
3112 2005-04-23 DJ Delorie <dj@redhat.com>
3114 * objc-act.c: Adjust warning() callers.
3116 2005-04-21 Roger Sayle <roger@eyesopen.com>
3118 * objc-act.h (METHOD_ADD_ARGS_ELLIPSIS_P): New macro for accessing
3119 this field of an objc method decl.
3120 * objc-act.c (build_method_decl): Take an additional "ellipsis"
3121 argument, and set METHOD_ADD_ARGS_ELLIPSIS_P as appropriate.
3122 (objc_build_method_signature): Accept additional "ellipsis"
3123 argument and pass it to build_method_decl.
3124 (get_arg_type_list, start_method_def, gen_method_decl): Use
3125 the new METHOD_ADD_ARGS_ELLIPSIS_P instead of examining the
3126 TREE_OVERFLOW field of a TREE_LIST node.
3128 2005-04-20 Joseph S. Myers <joseph@codesourcery.com>
3131 * objc-act.c (objc_start_function): Create stack level for context
3132 of identifiers with variably modified type.
3134 2005-03-30 Joseph S. Myers <joseph@codesourcery.com>
3138 * objc-act.c (objc_start_function): Push context on
3139 label_context_stack.
3141 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
3143 * objc-act.c (next_sjlj_build_enter_and_setjmp,
3144 next_sjlj_build_catch_list, next_sjlj_build_try_catch_finally):
3145 Call c_common_truthvalue_conversion.
3147 2005-02-25 Joseph S. Myers <joseph@codesourcery.com>
3149 * Make-lang.in (objc/objc-parse.o-warn, objc/objc-parse.o,
3150 objc/objc-parse.c, objc/objc-parse.y): Remove
3151 (OBJC_OBJS, objc.srcextra, objc.tags, objc.mostlyclean,
3152 objc.distclean, objc.maintainer-clean): Update for new parser.
3153 * config-lang.in (gtfiles): Update for new parser.
3155 2005-01-29 Kazu Hirata <kazu@cs.umass.edu>
3157 * lang-specs.h, objc-act.c, objc-act.h, objc-lang.c: Update
3160 2005-01-27 Matt Austern <austern@apple.com>
3162 * objc-act.c (objc_finish_file): In ObjC++ mode, set at_eof before
3163 calling instantiate_pending_templates.
3165 2005-01-26 Alexander Malmberg <alexander@malmberg.org>
3168 * objc-act.c (build_selector_translation_table): Use
3169 input_location in the diagnostic for the GNU runtime or if
3170 TREE_PURPOSE (chain) is NULL.
3172 2005-01-25 Alexander Malmberg <alexander@malmberg.org>
3175 * objc-act.c (objc_types_compatible_p): New function.
3176 * objc-act.h (objc_types_compatible_p): Declare.
3177 * objc-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.
3179 2005-01-16 Ziemowit Laski <zlaski@apple.com>
3181 * objc-act.c (objc_push_parm): Call c_type_promotes_to()
3184 2005-01-15 Ziemowit Laski <zlaski@apple.com>
3187 * objc-act.c (get_arg_type_list): Decay function arguments into
3189 (objc_push_parm): Likewise; bring PARM_DECL construction closer
3190 in line with what the C front-end does.
3191 (objc_get_parm_info): Call pushdecl() and finish_decl() on
3192 each PARM_DECL, like the C front-end does.
3193 (start_method_def): Remove redundant ARRAY_TYPE decay.
3194 (objc_start_function): Bring closer in line with what the
3195 C front-end does for functions.
3197 2005-01-14 Mike Stump <mrs@apple.com>
3199 * lang-specs.h ("@objective-c"): Use cc1obj when -E is used so
3200 that -fobjc-exceptions is accepted.
3202 2004-12-30 Ziemowit Laski <zlaski@apple.com>
3205 * objc-act.c (get_arg_type_list, start_method_def): Decay
3206 array arguments into pointers.
3207 (gen_type_name_0): Learn to pretty-print array types.
3209 2004-12-15 Ziemowit Laski <zlaski@apple.com>
3211 * objc-act.c (build_private_template): Change to return 'void'; do
3212 not set ivar_context, uprivate_record or objc_instance_type.
3213 (objc_comptypes, gen_type_name_0): For types 'id' and 'Class',
3214 retrieve protocol list from the pointee rather than the pointer itself;
3215 check TYPE_HAS_OBJC_INFO(...) precondition before accessing
3216 TYPE_OBJC_PROTOCOL_LIST.
3217 (objc_get_protocol_qualified_type): For types 'id' and 'Class',
3218 construct a variant of the pointee as well as the pointer, and
3219 store protocol information in the former. When creating variants
3220 of RECORD_TYPEs, clone their TYPE_LANG_SPECIFIC fields and propagate
3221 TYPE_OBJC_INTERFACE information.
3222 (objc_declare_class): If a TYPE_DECL is looked up, retrieve the
3223 underlying RECORD_TYPE to check for presence of TYPE_OBJC_INTERFACE;
3224 for newly-created RECORD_TYPEs, create a tentative TYPE_OBJC_INTERFACE
3225 holding an IDENTIFIER_NODE.
3226 (objc_finish_message_expr): Check TYPE_HAS_OBJC_INFO(...) before
3227 accessing TYPE_OBJC_PROTOCOL_LIST; Use TYPE_OBJC_INTERFACE instead
3228 of calling lookup_interface(); allow for TYPE_OBJC_INTERFACE holding
3229 an IDENTIFIER_NODE (meaning a @class forward-declaration only).
3230 (objc_is_public): Check TYPE_OBJC_INTERFACE instead of calling
3232 (continue_class): For @implementations, set ivar_context,
3233 uprivate_record and objc_instance_type, for @interfaces, call
3234 build_private_template().
3235 (encode_pointer): Check TYPE_HAS_OBJC_INFO(...) before accessing
3236 TYPE_OBJC_INTERFACE.
3237 (objc_types_are_equivalent): Check TYPE_HAS_OBJC_INFO(...) before
3238 accessing TYPE_OBJC_PROTOCOL_LIST.
3239 * objc-act.h (OBJC_INFO_SLOT_ELTS, TYPE_OBJC_INFO, INIT_TYPE_OBJC_INFO,
3240 DUP_TYPE_OBJC_INFO, ALLOC_OBJC_TYPE_LANG_SPECIFIC,
3241 SIZEOF_OBJC_TYPE_LANG_SPECIFIC): New macros.
3242 (TYPE_OBJC_INTERFACE): Replaces TREE_STATIC_INSTANCE and now points
3243 to an actual @interface; stored in TYPE_LANG_SPECIFIC(...).
3244 (TYPE_OBJC_PROTOCOL_LIST): Replaces TYPE_PROTOCOL_LIST; stored in
3245 TYPE_LANG_SPECIFIC(...).
3246 (TREE_STATIC_INSTANCE, TYPE_PROTOCOL_LIST): Delete.
3247 (IS_ID, IS_CLASS, IS_PROTOCOL_QUALIFIED_UNTYPED, IS_SUPER,
3248 TYPED_OBJECT): Check for POINTER_TYPE rather than POINTER_TYPE_P;
3249 adjust for use of TYPE_OBJC_INTERFACE and TYPE_OBJC_PROTOCOL_LIST
3250 instead of TREE_STATIC_INSTANCE and TYPE_PROTOCOL_LIST.
3252 2004-11-29 Joseph Myers <joseph@codesourcery.com>
3255 * Make-lang.in (objc/objc-act.o): Update dependencies.
3256 * objc-act.c (objc_finish_file): Call
3257 maybe_apply_pending_pragma_weaks if not OBJCPLUS.
3259 2004-11-09 Andrew Pinski <pinskia@physics.uc.edu>
3262 * obj-act.c (encode_type): 96bits doubles are encoded the
3263 same way as 64bit and 128bit doubles are.
3265 2004-11-09 Joseph S. Myers <joseph@codesourcery.com>
3267 * objc-act.c: Use %q, %< and %> for quoting in diagnostics.
3269 2004-11-08 Andrew Pinski <pinskia@physics.uc.edu>
3272 * objc-act.c (generate_method_descriptors): Remove setting
3273 the new decls' type to variable_length_type.
3274 (generate_ivar_lists): Likewise.
3275 (generate_dispatch_tables): Likewise.
3277 2004-10-30 Ziemowit Laski <zlaski@apple.com>
3279 * objc-act.c (objc_lookup_ivar): The new OTHER parameter
3280 contains the result of the ID lookup by the C or C++
3281 front-end; in class methods, use OTHER if it exists;
3282 in instance methods, use OTHER only if it is locally
3285 2004-10-26 Ziemowit Laski <zlaski@apple.com>
3287 * objc-act.c (finish_class): Do not synthesize bogus
3288 'extern objc_object *_Foo;' declarations for @interface Foo.
3290 2004-10-25 Ziemowit Laski <zlaski@apple.com>
3291 David Ayers <d.ayers@inode.at>
3293 * objc-act.c (objc_comptypes): Use IS_PROTOCOL_QUALIFIED_UNTYPED
3294 instead of IS_PROTOCOL_QUALIFIED_ID; add comparisons for:
3295 'Class <Protocol> != id <Protocol>'; 'Class <Protocol> != <class> *';
3296 'Class <Protocol> == id' and 'Class <Protocol> == Class'.
3297 (objc_is_id): Add test for 'super'.
3298 (objc_finish_message_expr): Allow for messaging of 'Class <Proto>'
3299 receivers; if class methods are not found in protocol lists, search
3300 for instance methods therein and warn if one is found. Look in
3301 global hash tables for suitable method as a last resort when messaging
3302 'id <Proto>', 'Class <Proto>' and invalid receiver types.
3303 (objc_add_method): Insert instance methods listed in protocols into
3304 the global class method hash table.
3305 * objc-act.h (IS_PROTOCOL_QUALIFIED_ID): Rename to
3306 IS_PROTOCOL_QUALIFIED_UNTYPED and allow for 'Class <Proto>' in
3307 addition to 'id <Proto>'.
3309 2004-10-21 Andrew Pinski <pinskia@physics.uc.edu>
3312 * objc-act.c (objc_build_string_object): Create a CONST_DECL
3313 for the NeXT runtime case.
3315 2004-10-02 Kazu Hirata <kazu@cs.umass.edu>
3317 * objc-act.c: Fix comment typos.
3319 2004-09-24 Ziemowit Laski <zlaski@apple.com>
3321 * objc-act.c (init_objc_symtab, init_module_descriptor,
3322 build_shared_structure_initializer): When initializing 'long'
3323 fields, ensure that the initializer value is also 'long'.
3325 2004-09-24 Zack Weinberg <zack@codesourcery.com>
3327 * objc-act.c: Change annotate_with_locus to SET_EXPR_LOCATION
3329 (objc_init): Only set input_line to 0 #ifndef USE_MAPPED_LOCATION.
3330 (build_selector_translation_table): Use %J in diagnostic
3331 instead of diddling input_line. Fix spelling.
3333 2004-09-21 Ziemowit Laski <zlaski@apple.com>
3335 * objc-act.c (objc_fold_objc_type_ref): New function.
3336 * objc-act.h (objc_fold_objc_type_ref): New prototype.
3338 2004-09-09 Joseph S. Myers <jsm@polyomino.org.uk>
3340 * objc-act.c (objc_start_function, really_start_method,
3341 objc_get_parm_info, start_method_def): Update to new arg_info
3344 2004-09-07 Ziemowit Laski <zlaski@apple.com>
3346 * Make-lang.in (objc/objc-parse.o): Depend on $(C_COMMON_H) instead of
3348 (objc/objc-act.o): Depend on $(HASHTAB_H).
3349 * objc-act.c: Include hashtab.h; in ObjC++ mode, include cp-tree.h and
3350 objcp-decl.h instead of c-tree.h.
3351 (build_module_descriptor, get_class_ivars, synth_id_with_class_suffix,
3352 error_with_ivar, gen_method_decl, gen_declaration, setup_string_decl,
3353 build_protocol_template): Adjust prototypes.
3354 (build_module_initializer_routine, start_class, continue_class,
3355 finish_class, start_method_def, objc_start_function, start_protocol,
3356 build_method_decl, objc_add_method, add_instance_variable,
3357 build_ivar_reference, is_ivar, is_private, get_super_receiver,
3358 build_selector_table_decl, objc_push_parm, objc_get_parm_info,
3359 gen_type_name, gen_type_name_0, start_var_decl, finish_var_decl,
3360 create_field_decl): New prototypes.
3361 (objc_expand_function_end, comp_method_with_proto, objc_expr_last,
3362 gen_declaration_1, gen_declarator, is_complex_decl, adorn_decl,
3363 define_decl, create_builtin_decl, gen_declspecs): Remove prototypes.
3364 (TYPE_ID): Rename to OBJECT_TYPEDEF_NAME.
3365 (CLASS_TYPEDEF_NAME): New.
3366 (TAG_EXECCLASS): Change from a global variable to a #define.
3367 (TAG_RETURN_STRUCT): Delete.
3368 (TAG_GNUINIT): New, holds '__objc_gnu_init' name.
3369 (objc_inherit_code, objc_public_flag): New, moved from c-parse.in.
3370 (string_descriptor): New struct.
3371 (string_htab): New hash table.
3372 (string_hash, string_eq): New prototypes.
3373 (generate_struct_by_value_array): Call create_field_decl() instead of
3374 create_builtin_decl().
3375 (objc_init): Do not initialize objc_ellipsis_node or TAG_EXECCLASS;
3376 In ObjC++ mode, call cxx_init() instead of c_objc_common_init().
3377 (objc_finish_file): In ObjC++, call instantiate_pending_templates()
3378 and cp_finish_file().
3379 (define_decl, get_static_reference, get_protocol_reference,
3380 create_builtin_decl): Remove functions.
3381 (objc_start_class_interface, objc_start_category_interface,
3382 objc_start_protocol, objc_continue_interface, objc_finish_interface,
3383 objc_start_class_implementation, objc_start_category_implementation,
3384 objc_continue_implementation, objc_finish_implementation,
3385 objc_set_visibility, objc_set_method_type,
3386 objc_build_method_signature, objc_add_method_declaration,
3387 objc_start_method_definition, objc_add_instance_variable,
3388 objc_get_protocol_qualified_type, create_field_decl,
3389 start_var_decl, finish_var_decl): New functions.
3390 (setup_string_decl): Simplify since it is only called once.
3391 (synth_module_prologue): Call build_class_template(); predefine 'id'
3392 and 'Class' as typedefs; rename 'temp_type' to 'type'; disable debug
3393 hooks for duration of function; fix GNU runtime messenger signatures
3394 to correspond to reality; forward-declare '__objc_exec_class' for the
3395 GNU runtime; call build_selector_table_decl(); in ObjC++ mode, generate
3396 'extern "C" { ... }' wrappers around synthesized declarations; call
3397 build_protocol_template() and build_category_template().
3398 (string_hash, string_eq): New functions.
3399 (objc_build_string_object): Check metaclass correctness only once;
3400 store string literals in hash table.
3401 (objc_build_constructor): Do not convert initializer elements;
3402 adjust for ObjC++ impedance mismatch.
3403 (build_objc_symtab_template): Call create_field_decl() instead of
3404 create_builtin_decl().
3405 (init_objc_symtab): Add missing conversion to initializer element.
3406 (build_metadata_decl): Call start_var_decl() instead of define_decl().
3407 (generate_objc_symtab_decl): Do not call build_category_template();
3408 call start_var_decl() and finish_var_decl() instead of start_decl()
3410 (build_module_descriptor): Call create_field_decl() instead of
3411 grokfield(); call start_var_decl() and finish_var_decl() instead of
3412 start_decl() and finish_decl(); always mark module descriptor as
3413 used; move GNU runtime-specific functionality to
3414 build_module_initializer_routine().
3415 (build_module_initializer_routine): New function, broken off of
3416 build_module_descriptor().
3417 (objc_static_init_needed_p, objc_generate_static_init_call): New
3419 (generate_static_references, generate_strings,
3420 build_selector_translation_table, generate_descriptor_table,
3421 generate_ivars_list, generate_dispatch_table, generate_category): Call
3422 start_var_decl() and finish_var_decl() instead of start_decl() and
3423 finish_decl(); build a type directly instead of via groktypename().
3424 (build_selector_reference_decl, build_selector_table_decl,
3425 build_class_reference_decl, build_protocol_reference,
3426 generate_objc_image_info): Call start_var_decl() instead of
3428 (build_selector_reference): For GNU runtime, do not call
3429 build_selector_reference_decl().
3430 (build_selector, build_typed_selector_reference): Always convert
3431 result to the selector type.
3432 (add_objc_string): Cast return value to 'char *'.
3433 (build_method_prototype_template, build_selector_template,
3434 build_method_template): Use actual selector type for fields
3435 pointing to selectors.
3436 (finish_objc): For GNU runtime, call
3437 build_module_initializer_routine() after build_module_descriptor().
3438 (generate_protocol_list, generate_shared_structures): Call
3439 start_var_decl() and finish_var_decl() instead of start_decl() and
3440 finish_decl(); build a type directly instead of via
3442 (synth_id_with_class_suffix): Return a string.
3443 (get_arg_type_list): For instance methods, use the instance type for
3444 'self'; do not call groktypename_in_parm_context().
3445 (build_objc_string_decl): Squash redeclaration errors in ObjC++.
3446 (objc_is_class_name): Use OBJC_TYPE_NAME instead of TYPE_NAME;
3447 handle RECORD_TYPEs in ObjC as well as ObjC++.
3448 (objc_is_id): New function.
3449 (objc_is_object_ptr): Return the canonical type node.
3450 (objc_get_class_ivars): Simplify using get_class_ivars().
3451 (get_class_ivars): Remove second parameter; create a fresh copy
3452 of the ivar list for each call; do not check for existence of
3454 (objc_eh_runtime_type): Mark #ifndef OBJCPLUS.
3455 (objc_init_exceptions): When using SJLJ-style exceptions, require
3456 the use of '-fobjc-exceptions' flag; do not require it for DWARF-style
3458 (objc_build_exc_ptr, next_sjlj_build_try_catch_finally): Use
3459 objc_object_type instead of objc_id_type.
3460 (objc_begin_catch_clause): Convert the incoming PARM_DECL into
3461 a VAR_DECL before placing it in the appropriate scope; do not
3462 call define_decl(); adjust call to c_begin_compound_stmt();
3463 use objc_object_type instead of objc_id_type.
3464 (build_next_objc_exception_stuff): Call create_field_decl() instead
3465 of create_builtin_decl(); construct type directly instead of calling
3466 groktypename(); use OBJC_VOID_AT_END to mark end of function parameters.
3467 (build_private_template): Adjust call to get_class_ivars(); build
3468 a type directly instead of via groktypename().
3469 (build_protocol_template, build_method_prototype_list_template,
3470 build_method_prototype_template, build_category_template,
3471 build_selector_template, build_class_template, build_super_template,
3472 build_ivar_template, build_ivar_list_template,
3473 build_method_list_template, build_method_template):
3474 Call create_field_decl() instead of grokfield().
3475 (objc_method_parm_type): Do not call groktypename().
3476 (generate_descriptor_table): Call start_var_decl() and
3477 finish_var_decl() instead of start_decl() and finish_decl().
3478 (generate_method_descriptors, build_protocol_initializer,
3479 generate_dispatch_tables, build_category_initializer,
3480 build_shared_structure_initializer): Do not call groktypename().
3481 (generate_protocols): Call start_var_decl() and finish_var_decl()
3482 instead of start_decl() and finish_decl(); do not call groktypename().
3483 (error_with_ivar): Remove last parameter.
3484 (check_ivars): Do not iterate ovar CLASS_RAW_IVARS lists in addition
3485 to CLASS_IVARS lists; adjust calls to error_with_ivar().
3486 (generate_ivar_lists): Convert one of the initializer elements; do
3487 not call groktypename().
3488 (get_arg_type_list, start_method_def, gen_method_def): Account for
3489 new representation of variable arguments and '...' in Objective-C
3490 methods; add Objective-C++ impedance matching code.
3491 (is_objc_type_qualifier): Remove function.
3492 (adjust_type_for_id_default): Simplify; there is no longer a need to
3493 wade through declspecs.
3494 (lookup_interface, start_class, continue_class,
3495 finish_class, start_method_def, start_protocol, build_method_decl,
3496 objc_add_method, add_instance_variable, build_ivar_reference,
3497 is_ivar, is_private, get_super_receiver, objc_build_finally_epilogue):
3498 Make into static functions.
3499 (receiver_is_class_object): Use new IS_CLASS() macro.
3500 (objc_build_message_expr): Tweak ObjC++ message argument handling;
3501 call objc_finish_message_expr() instead of finish_message_expr().
3502 (finish_message_expr): Rename to objc_finish_message_expr(); use
3503 OBJC_TYPE_NAME and OBJC_SET_TYPE_NAME macros instead of TYPE_NAME.
3504 call gen_type_name() instead of gen_declaration(); call objc_is_id()
3505 instead of using IS_ID and IS_CLASS; Use objc_class_name instead of
3506 calling get_identifier("Class"); handle CONVERT_EXPRs in receiver.
3507 (build_objc_method_call, warn_with_method): Do not call groktypename().
3508 (build_ivar_reference): Call convert() instead of clobbering in a
3510 (hash_init): Initialize string_htab hash table.
3511 (add_instance_variable): Simplify parameter list; do not call grokfield();
3512 do not populate CLASS_IVARS list.
3513 (start_class): Check for the existence of super class, if one was specified.
3514 (continue_class): Use CLASS_RAW_IVARS rather than CLASS_IVARS; do not
3515 call build_class_template(); adjust call to get_class_ivars(); call
3516 build_decl(), pushdecl() and finish_decl() instead of define_decl().
3517 (finish_class): Call build_decl(), pushdecl() and finish_decl() instead
3519 (add_protocols): Use PROTOCOL_BINFO_ELTS for the tree vector size.
3520 (start_protocol): Do not call build_protocol_template(); use
3521 PROTOCOL_BINFO_ELTS for the tree vector size.
3522 (encode_type_qualifiers): Do not handle the 'const' qualifier here.
3523 (encode_pointer): Encode 'const char *' as 'r*', for backwards
3525 (encode_array): Use HOST_WIDE_INT_PRINT_DEC instead of "%ld".
3526 (encode_type): Handle the 'const' qualifier here.
3527 (objc_parmlist): New global variable, sued by objc_push_parm and
3528 objc_get_parm_info().
3529 (objc_push_parm, objc_get_parm_info): New functions.
3530 (objc_expr_last): Remove function.
3531 (synth_self_and_ucmd_args): For instance methods, use the instance
3532 type for 'self'; call objc_push_parm() instead of push_parm_decl().
3533 (start_method_def): Do not call push_scope(), declare_parm_level(),
3534 pop_scope(), push_parm_decl(), store_parm_decls() or objc_expr_last();
3535 just use objc_push_parm() and objc_get_parm_info().
3536 (comp_method_with_proto): Remove function.
3537 (objc_types_are_equivalent): Strip away indirections before comparing
3539 (comp_proto_with_proto): Do not call groktypename(); types are no
3540 longer in raw declspec format.
3541 (objc_start_function): New function.
3542 (really_start_method): Call comp_proto_with_proto() instead of
3543 comp_method_with_proto(); call objc_start_function() instead of
3544 hand-crafting a function declarator.
3545 (continue_method_def, objc_expand_function_end): Remove functions.
3546 (get_super_receiver): Call objc_get_current_scope() instead of
3547 get_current_scope(); reference 'super_class' field (instead of
3549 (finish_method_def): Rename to objc_finish_method_definition() and
3550 add a function decl parameter; move method encoding call from
3551 objc_expand_function_end().
3552 (is_complex_decl, adorn_decl, gen_declarator, gen_declspecs,
3553 gen_declaration_1): Remove functions.
3554 (tmpbuf, RAW_DECLSPEC): Remove.
3555 (gen_declaration): Remove second parameter; simplify to deal
3556 with TYPE_P nodes instead of raw declspecs.
3557 (gen_type_name, gen_type_name_0): New functions.
3558 (gen_method_decl): Remove second parameter; call gen_type_name()
3559 instead of gen_declaration_1().
3560 (dump_interface): Adjust calls to gen_declaration() and
3561 gen_method_decl(); do not allocate a separate string buffer.
3562 (init_objc): Allocate a larger string buffer to accommodate
3563 dump_interface(); adjust call to build_module_descriptor();
3564 add call to build_module_initializer_routine() for the GNU
3566 (generate_classref_translation_entry): Do not call start_decl(); call
3567 finish_var_decl() instead of finish_decl(); call convert() instead of
3569 * objc-act.h (CLASS_OWN_IVARS): Remove accessor.
3570 (CLASS_BINFO_ELTS): Reduce from 6 to 5, now that CLASS_OWN_IVARS is
3572 (OCTI_GNU_INIT_DECL, GNU_INIT_decl): New.
3573 (OCTI_ELLIPSIS_NODE, objc_ellipsis_node): Remove.
3574 (OCTI_ID_ID, id_type, objc_id_id): Rename to OCTI_ID_NAME,
3575 objc_object_type and objc_object_name, respectively.
3576 (OCTI_CLS_REF, OCTI_CLASS_NAME, objc_class_reference,
3577 objc_class_name): New.
3578 (IS_CLASS): New macro.
3579 (IS_ID, IS_SUPER): Robustify.
3580 (OCTI_EXECCLASS_DECL, execclass_decl): New.
3581 (finish_file, start_class, continue_class, finish_class,
3582 start_method_def, continue_method_def, finish_method_def,
3583 start_protocol, finish_protocol, objc_build_throw_stmt,
3584 objc_build_try_catch_finally_stmt, objc_build_synchronized_prologue,
3585 objc_build_synchronized_epilogue, objc_build_try_prologue,
3586 objc_build_try_epilogue, objc_build_catch_stmt, objc_build_catch_epilogue,
3587 objc_build_finally_prologue, objc_build_finally_epilogue,
3588 is_ivar, is_private, is_public, add_instance_variable, objc_add_method,
3589 get_super_receiver, objc_clear_super_receiver, get_class_ivars_from_name,
3590 get_class_reference, get_static_reference, get_object_reference,
3591 build_message_expr, finish_message_expr, build_selector_expr,
3592 build_ivar_reference, build_keyword_decl, build_method_decl,
3593 build_protocol_expr, build_objc_string_object, objc_declare_alias,
3594 objc_declare_class, objc_declare_protocols, objc_comptypes,
3595 objc_check_decl, build_encode_expr): Remove prototypes.
3596 (imp_count, cat_count): Make GGC-aware.
3597 (OBJC_SET_TYPE_NAME): New macro.
3599 2004-09-03 Ziemowit Laski <zlaski@apple.com>
3601 * config-lang.in: Update copyright notice.
3602 (lang_requires): Indicate that ObjC requires C to be built first.
3604 2004-09-01 Ziemowit Laski <zlaski@apple.com>
3606 * objc-act.c (objc_check_decl): Use OBJC_TYPE_NAME macro instead of
3608 (build_objc_string_object): Rename to objc_build_string_object().
3609 (get_class_reference): Rename to objc_get_class_reference().
3610 (get_class_ivars_from_name): Rename to objc_get_class_ivars().
3611 (next_sjlj_build_catch_list, get_super_receiver): Call
3612 objc_get_class_reference() instead of get_class_reference().
3613 (build_keyword_decl): Rename to objc_build_keyword_decl().
3614 (build_message_expr): Rename to objc_build_message_expr().
3615 (build_protocol_expr): Rename to objc_build_protocol_expr().
3616 (build_selector_expr): Rename to objc_build_selector_expr().
3617 (build_encode_expr): Rename to objc_build_encode_expr().
3618 * objc-act.h (get_class_ivars_from_name): Rename prototype to
3619 objc_get_class_ivars().
3620 (get_class_reference): Rename prototype to objc_get_class_reference().
3621 (build_message_expr): Rename prototype to objc_build_message_expr().
3622 (build_selector_expr): Rename prototype to objc_build_selector_expr().
3623 (build_keyword_decl): Rename prototype to objc_build_keyword_decl().
3624 (build_protocol_expr): Rename prototype to objc_build_prototype_expr().
3625 (build_objc_string_object): Rename prototype to
3626 objc_build_string_object().
3628 2004-09-01 Ziemowit Laski <zlaski@apple.com>
3630 * objc-act.c (lookup_interface): Make function 'static' and add a
3632 (objc_check_decl, get_class_reference, objc_declare_alias,
3633 objc_declare_class, objc_is_object_ptr): Call objc_is_class_name()
3634 instead of is_class_name().
3635 (get_super_receiver, objc_clear_super_receiver): Call
3636 objc_get_current_scope() instead of get_current_scope().
3637 (is_class_name): Rename to objc_is_class_name.
3638 (lookup_objc_ivar): Rename to objc_lookup_ivar.
3640 2004-08-28 Ziemowit Laski <zlaski@apple.com>
3642 * objc-act.c (objc_is_reserved_word): New function.
3644 2004-08-15 Ziemowit Laski <zlaski@apple.com>
3646 * Make-lang.in (objc/objc-lang.o): Depend on $(C_PRETTY_PRINT_H),
3647 $(DIAGNOSTIC_H), c-objc-common.h and gtype-objc.h, but not on toplev.h.
3648 (objc/objc-parse.o): Do not depend on gtype-objc.h.
3649 * objc-act.c: Do not include gtype-objc.h.
3650 (finish_file): Rename to objc_finish_file().
3651 * objc-act.h (finish_file): Update copyright notice; remove prototype.
3652 * objc-lang.c: Update copyright notice; include diagnostic.h,
3653 c-objc-common.h, c-pretty-print.h and gtype-objc.h; do not include
3655 (finish_file): New hook routine.
3656 (LANG_HOOKS_FINISH, LANG_HOOKS_INIT_OPTIONS,
3657 LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
3658 LANG_HOOKS_MISSING_ARGUMENT, LANG_HOOKS_POST_OPTIONS,
3659 LANG_HOOKS_GET_ALIAS_SET, LANG_HOOKS_SAFE_FROM_P,
3660 LANG_HOOKS_EXPAND_EXPR, LANG_HOOKS_MARK_ADDRESSABLE,
3661 LANG_HOOKS_PARSE_FILE, LANG_HOOKS_TRUTHVALUE_CONVERSION,
3662 LANG_HOOKS_FINISH_INCOMPLETE_DECL, LANG_HOOKS_UNSAFE_FOR_REEVAL,
3663 LANG_HOOKS_STATICP, LANG_HOOKS_SET_DECL_ASSEMBLER_NAME,
3664 LANG_HOOKS_NO_BODY_BLOCKS, LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL,
3665 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_FUNCTION_ENTER_NESTED,
3666 LANG_HOOKS_FUNCTION_LEAVE_NESTED, LANG_HOOKS_DUP_LANG_SPECIFIC_DECL,
3667 LANG_HOOKS_DECL_UNINIT, LANG_HOOKS_RTL_EXPAND_STMT,
3668 LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
3669 LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
3670 LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS,
3671 LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
3672 LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING,
3673 LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS,
3674 LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
3675 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_TYPE_FOR_MODE,
3676 LANG_HOOKS_TYPE_FOR_SIZE, LANG_HOOKS_SIGNED_TYPE,
3677 LANG_HOOKS_UNSIGNED_TYPE, LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE,
3678 LANG_HOOKS_INCOMPLETE_TYPE_ERROR, LANG_HOOKS_TYPE_PROMOTES_TO,
3679 LANG_HOOKS_REGISTER_BUILTIN_TYPE, LANG_HOOKS_WRITE_GLOBALS):
3680 Move to c-objc-common.h.
3683 Copyright (C) 2004-2016 Free Software Foundation, Inc.
3685 Copying and distribution of this file, with or without modification,
3686 are permitted in any medium without royalty provided the copyright
3687 notice and this notice are preserved.