1 2012-03-01 Release Manager
5 2011-11-12 Iain Sandoe <iains@gcc.gnu.org>
8 2011-10-29 Iain Sandoe <iains@gcc.gnu.org>
11 * objc-act.c (objc_build_string_object): Remove redundant second
12 call to fix_string_type (). Add a checking assert that we are,
13 indeed, passed a STRING_CST.
15 2011-11-12 Iain Sandoe <iains@gcc.gnu.org>
17 * objc-next-runtime-abi-01.c (objc_eh_personality): Use gcc personality
20 2011-10-26 Release Manager
24 2011-06-27 Release Manager
28 2011-05-21 Nicola Pero <nicola.pero@meta-innovation.com>
30 Backport from mainline
31 2011-05-21 Nicola Pero <nicola.pero@meta-innovation.com>
33 * config-lang.in (gtfiles): Updated order of files to fix building
34 when the gcc/cp directory is missing, as in the case of some
37 2011-03-25 Release Manager
41 2011-03-06 Joseph Myers <joseph@codesourcery.com>
43 * lang-specs.h: Match -save-temps* instead of -save-temps.
45 2011-02-26 Nicola Pero <nicola.pero@meta-innovation.com>
47 * objc-act.c (objc_v2_encode_prop_attr): Rewritten.
49 2011-02-23 Nicola Pero <nicola.pero@meta-innovation.com>
51 * objc-act.c (build_private_template): Do not copy the
52 CLASS_HAS_EXCEPTION_ATTR from the class to the struct.
53 * objc-act.h (CLASS_HAS_EXCEPTION_ATTR): Define using
56 2011-02-22 Nicola Pero <nicola.pero@meta-innovation.com>
59 * objc-act.c (flexible_array_type_p): New.
60 (add_instance_variable): Produce an error if an instance variable
61 uses flexible array members.
62 (encode_array): Do not emit an error if encoding a flexible array
63 type while generating instance variables.
65 2011-02-21 Mike Stump <mikestump@comcast.net>
67 * Make-lang.in (check_objc_parallelize): Refine for 4 processor
70 2011-02-20 Nicola Pero <nicola.pero@meta-innovation.com>
72 * objc-gnu-runtime-abi-01.c (TARGET_64BIT): Removed. Removed
73 usage of padding fields. Do not include tm.h.
74 * objc-act.c (objc_write_global_declaration): Set input_location
75 to BUILTINS_LOCATION while generating runtime metadata.
77 2011-01-20 Nicola Pero <nicola.pero@meta-innovation.com>
80 * objc-act.c (objc_maybe_build_modify_expr): If 'rhs' has side
81 effects, do not use a temporary variable.
83 2011-01-19 Nicola Pero <nicola.pero@meta-innovation.com>
85 * objc-next-runtime-abi-01.c: Updated comments.
86 * objc-next-runtime-abi-02.c: Same.
88 2011-01-19 Nicola Pero <nicola.pero@meta-innovation.com>
90 * objc-act.c (objc_init, generate_struct_by_value_array): Updated
93 2011-01-19 Nicola Pero <nicola.pero@meta-innovation.com>
95 * objc-act.c: Updated comments.
96 * objc-next-runtime-abi-02.c: Same.
97 * objc-runtime-shared-support.c: Same.
98 * objc-runtime-hooks.h: Same.
100 * objc-gnu-runtime-abi-01.c: Same.
102 2011-01-19 Nicola Pero <nicola.pero@meta-innovation.com>
104 * objc-gnu-runtime-abi-01.c (objc_generate_v1_gnu_metadata): Do
105 not generate metadata if there is nothing to put into it.
107 2011-02-17 Iain Sandoe <iains@gcc.gnu.org>
109 * config-lang.in (gtfiles): Updated.
110 * Make-lang.in (START_HDRS): New.
111 (OBJC_OBJS): Added new object files.
112 (objc/objc-act.o): Updated prerequisites.
113 (objc/objc-lang.o): Updated prerequisites.
114 (objc/objc-runtime-shared-support.o): New.
115 (objc/objc-gnu-runtime-abi-01.o): New.
116 (objc/objc-next-runtime-abi-01.o): New.
117 (objc/objc-next-runtime-abi-02.o): New.
118 * objc-runtime-hooks.h: New.
119 * objc-runtime-shared-support.h: New.
120 * objc-runtime-shared-support.c: New.
121 * objc-gnu-runtime-abi-01.c: New.
122 * objc-next-metadata-tags.h: New.
123 * objc-next-runtime-abi-01.c: New.
124 * objc-next-runtime-abi-02.c: New.
125 * objc-lang.c: Include c-lang.h.
126 (LANG_HOOKS_EH_PERSONALITY): Removed.
127 * objc-act.h: Moved many declarations and code from objc-act.c
128 into objc-act.h to make them available outside objc-act.c.
129 (objc_eh_runtime_type): Removed.
130 (objc_eh_personality): Removed.
131 (CLASS_HAS_EXCEPTION_ATTR): New.
132 (OCTI_SUPER_SUPERFIELD_ID): New.
133 (OCTI_V1_PROP_LIST_TEMPL): New.
134 (OCTI_V1_PROP_NAME_ATTR_CHAIN): New.
135 (super_superclassfield_id): New.
136 (objc_prop_list_ptr): New.
137 (prop_names_attr_chain): New.
138 * objc-act.c: Include new runtime headers. Moved many #defines
139 and declarations into objc-act.h and
140 objc-runtime-shared-support.h. Made some corresponding functions
141 non-static, and moved some others into
142 objc-runtime-shared-support.c. Moved metadata generation code
143 into the new runtime hook files.
144 (ivar_offset_hash_list): New.
145 (objc_init): Call generate_struct_value_by_array() before doing
146 any runtime initialization. Create the appropriate runtime hook
148 (init_objc): Removed. Code moved directly into objc_init.
149 (finish_objc): Removed. Code moved directly into
150 objc_write_global_declarations.
151 (objc_write_global_declarations): Do the warn_selector checks
152 before emitting metadata. Use a runtime hook to emit the
153 metadata. Do not emit the metadata or do -gen-decls processing if
154 -fsyntax-only or we are producing a PCH.
155 (build_objc_exception_stuff): Renamed to
156 build_common_objc_exception_stuff. Remove TREE_NOTHROW flag from
157 objc_exception_throw_decl.
158 (synth_module_prologue): Call runtime initialize hook instead of
159 building runtime declarations here. Use the
160 default_constant_string_class_name runtime hook to set the
161 constant string class name.
162 (objc_build_string_object): Call the setup_const_string_class_decl
163 runtime hook instead of setup_string_decl. Call the
164 build_const_string_constructor runtime hook instead of building
165 the string object here.
166 (get_objc_string_decl): Added prop_names_attr case. Removed
167 gcc_unreachable() at the end.
168 (objc_begin_catch_clause): Distinguish between @catch (...) and
169 @catch (id x). Call the begin_catch runtime hook instead of
170 building the CATCH_EXPR here.
171 (objc_finish_catch_clause): Call the finish_catch runtime hook
172 instead of adding the catch here.
173 (objc_finish_try_stmt): Call the finish_try_stmt runtime hook
174 instead of doing it here.
175 (objc_build_throw_stmt): Bail out early for error_mark_node. Call
176 the build_exc_ptr runtime hook instead of objc_build_exc_ptr.
177 Call the build_throw_stmt runtime hook instead of building the
179 (objc_generate_cxx_cdtors): Set has_cxx_cdtors for the GNU runtime
181 (get_arg_type_list): Call the get_arg_type_list_base runtime hook
182 instead of building the list of arguments here.
183 (receiver_is_class_object): Call the receiver_is_class_object
184 runtime hook instead of doing the check here. Call the
185 tag_getclass runtime hook instead of using TAG_GETCLASS.
186 (objc_finish_message_expr): Call the build_objc_method_call
188 (objc_build_protocol_expr): Call the get_protocol_reference
190 (objc_build_selector_expr): Call the build_selector_reference
192 (build_ivar_reference): Call the build_ivar_reference runtime
194 (hash_init): Set up ivar_offset_hash_list.
195 (start_class): Recognize the objc_exception attribute and store
197 (continue_class): Use the class_decl and metaclass_decl runtime
199 (build_objc_property_accessor_helpers): Renamed to
200 build_common_objc_property_accessor_helpers. Do not build
201 objc_copyStruct_decl, objc_getPropertyStruct_decl and
202 objc_setPropertyStruct_decl.
203 (objc_synthesize_getter): Check what struct setter/getter helper
204 is available instead of checking the type of runtime.
205 (get_super_receiver): Use the super_superclassfield_ident runtime
206 hook. Added assert. Use the get_class_super_ref and
207 get_category_super_ref runtime hooks.
208 (objc_v2_encode_prop_attr): New.
210 2011-01-17 Nicola Pero <nicola.pero@meta-innovation.com>
213 * objc-act.c (finish_objc): When calling check_duplicates to check
214 duplicated instance methods, set 'is_class' to 0, not 1.
216 2011-01-14 Ben Elliston <bje@au.ibm.com>
219 * objc-act.c (generate_struct_by_value_array): Do not output a
220 definition for struct_forward_array.
222 2011-01-08 Iain Sandoe <iains@gcc.gnu.org>
224 * objc-act.c (objc_finish_foreach_loop): Mark collection expression
227 2011-01-02 H.J. Lu <hongjiu.lu@intel.com>
229 * objc-act.c (check_that_protocol_is_defined): Fix a typo.
231 2011-01-02 Nicola Pero <nicola.pero@meta-innovation.com>
233 * objc-act.c (check_that_protocol_is_defined): New.
234 (lookup_protocol): Call check_that_protocol_is_defined.
236 2010-12-30 Nicola Pero <nicola.pero@meta-innovation.com>
238 * objc-act.c (objc_types_are_equivalent): Fixed comparing protocol
239 lists. Check them two-ways to fix comparisons when one protocol
240 implements the other one, or when one list contains duplicated
243 2010-12-30 Nicola Pero <nicola.pero@meta-innovation.com>
245 * objc-act.c (objc_add_method): When emitting an error because a
246 method with the same name but conflicting types is found in the
247 same class or category interface, print a note with the location
248 of the original method. Also, improved the error message to
249 clearly state that the conflict is due to conflicting types, and
250 produce it for protocols as well. Emit an error if two identical
251 methods are declared in a protocol, but one is @required and the
252 other one is @optional.
254 2010-12-30 Nicola Pero <nicola.pero@meta-innovation.com>
256 * objc-act.c (start_class): Warn when a class attribute is
258 (objc_declare_protocols): Warn when a protocol attribute in a
259 protocol forward-declaration is ignored.
260 (start_protocol): Warn when a protocol attribute is ignored.
262 2010-12-30 Nicola Pero <nicola.pero@meta-innovation.com>
264 * objc-act.c (objc_set_method_opt): Tidy up error messages. In
265 particular, explicitly mention whether the error is due to the
266 @optional or @required keyword instead of mentioning
267 "@optional/@required".
269 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
272 * objc-act.c (objc_build_synchronized): Check the argument of
273 @synchronized and emit an appropriate error if it is not a valid
274 Objective-C object. Deal gracefully with that case. Updated
275 comments and variable names.
277 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
280 * objc-act.h (PROPERTY_REF_DEPRECATED_GETTER): New.
281 * objc-tree.def (PROPERTY_REF): Increased the number of operands
283 * objc-act.c (objc_finish_message_expr): Added optional argument
284 allowing to return the deprecated method prototype for deprecated
285 methods, instead of immediately emitting the deprecation warning.
286 (objc_maybe_build_component_ref): Do not warn for a deprecated
287 property. When building the getter call, get the deprecated
288 method prototype from objc_finish_message_expr() and put it into
290 (objc_build_class_component_ref): Same change.
291 (finish_class): Mark the getter and setter as deprecated if they
292 are generated from a deprecated property.
293 (objc_gimplify_property_ref): If the getter is deprecated, emit a
295 (objc_build_setter_call, objc_build_message_expr,
296 objc_finish_foreach_loop): Updated call to
297 objc_finish_message_expr.
299 2010-12-28 Nicola Pero <nicola.pero@meta-innovation.com>
302 * objc-act.c (lookup_protocol): Added 'definition_required'
303 argument. If 'definition_required', and the protocol is not
304 defined, emit a warning.
305 (objc_declare_protocols): Updated call to lookup_protocol.
306 (start_protocol): Same change.
307 (check_protocol_recursively): Same change.
308 (objc_build_protocol_expr): Same change.
309 (lookup_and_install_protocols): Added definition_required argument.
310 Pass it to lookup_protocol.
311 (objc_get_protocol_qualified_type): Updated call to
312 lookup_and_install_protocols.
313 (start_class): Updated calls to lookup_and_install_protocols; pass
314 true to 'definition_required' to get the warnings.
315 (start_protocol): Updated calls to lookup_and_install_protocols.
317 2010-12-28 Nicola Pero <nicola.pero@meta-innovation.com>
319 * objc-act.c (objc_start_category_interface): Produce an error if
320 a class extension is found after the class @implementation.
322 2010-12-28 Nicola Pero <nicola.pero@meta-innovation.com>
325 * objc-act.c (encode_method_prototype): Fixed both location and
326 format string of error "type %qT does not have a known size".
328 2010-12-26 Nicola Pero <nicola.pero@meta-innovation.com>
330 * config-lang.in (gtfiles): Added c-family/c-cppbuiltin.c.
332 2010-12-22 Nathan Froyd <froydnj@codesourcery.com>
334 * objc-act.c (next_sjlj_build_enter_and_setjmp): Use prototype_p.
336 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
338 * objc-act.c (objc_init): Call using_eh_for_cleanups.
339 (objc_init_exceptions): Renamed to objc_maybe_warn_exceptions. Do
340 not call using_eh_for_cleanups.
341 (objc_begin_try_stmt): Do not call objc_init_exceptions.
342 (objc_build_throw_stmt): Updated call to
343 objc_maybe_warn_exceptions.
345 2010-12-18 Iain Sandoe <iains@gcc.gnu.org>
347 * objc/objc-act.c (objc_eh_personality): Select personality name on
349 (objc_init_exceptions): New.
350 (objc_begin_try_stmt): Use objc_init_exceptions.
351 (objc_build_throw_stmt): Likewise.
353 2010-12-10 Nicola Pero <nicola.pero@meta-innovation.com>
355 * objc-act.c (objc_in_class_extension): New.
356 (objc_start_category_interface): If -fobjc-std=objc1
357 was specified, produce an error if a class extension is used.
358 (objc_finish_interface): Reset objc_in_class_extension to false.
359 (objc_add_property_declaration): Allow a class extension to extend
360 readonly properties in the main @interface to be readwrite.
361 (start_class): Added code to deal with class extensions. In that
362 case, return the existing interface after adding any additional
363 protocols to it and setting objc_in_class_extension to true.
364 (continue_class): If in a class extension, do not generate the
365 instance variable template.
367 2010-12-08 Nicola Pero <nicola.pero@meta-innovation.com>
369 * objc-act.c (objc_build_throw_stmt): Check that the argument of
370 @throw is an object and emit an error if not.
372 2010-12-08 Nicola Pero <nicola.pero@meta-innovation.com>
374 * objc-act.c (objc_finish_foreach_loop): Use error_at() instead of
375 error() when printing an error about the iterating variable or
376 collection not being an object.
378 2010-12-06 Nicola Pero <nicola.pero@meta-innovation.com>
380 * objc-act.c (objc_finish_foreach_loop): Mark the
381 object_expression as used.
383 2010-12-06 Nicola Pero <nicola.pero@meta-innovation.com>
385 * objc-act.c: Include c-family/c-objc.h.
386 * objc-lang.c: Same change.
387 * Make-lang.in (objc/objc-act.o): Depend on
389 (objc/objc-lang.o): Same change.
390 * config-lang.in (gtfiles): Added c-family/c-objc.h.
392 2010-12-02 Joseph Myers <joseph@codesourcery.com>
394 * lang-specs.h: Don't handle -ftraditional.
396 2010-12-02 Nicola Pero <nicola.pero@meta-innovation.com>
398 * objc-act.c (objc_build_throw_stmt): Return error_mark_node and
399 not NULL_TREE when a @throw is used outside of a @catch block.
401 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
403 * objc-act.c (objc_build_volatilized_type): Removed.
404 (objc_non_volatilized_type): Removed.
405 (objc_type_quals_match): Removed.
406 (local_variables_to_volatilize): New.
407 (objc_volatilize_decl): Add the decl to volatilize to
408 local_variables_to_volatilize, but don't volatilize it yet.
409 (objc_finish_function): New.
410 * objc-act.h (local_variables_to_volatilize): New.
412 2010-11-29 Nicola Pero <nicola.pero@meta-innovation.com>
413 Mike Stump <mikestump@comcast.net>
415 Allow 'make check-objc -j2'
416 * Make-lang.in (lang_checks_parallelized): New.
417 (check_objc_parallelize): New.
419 2010-11-29 Nicola Pero <nicola.pero@meta-innovation.com>
421 * objc-act.c (start_class): When a class is reimplemented,
422 generate an error and avoid adding the class to the list of
423 implemented classes again, but do not return error_mark_node.
425 2010-11-29 Nicola Pero <nicola.pero@meta-innovation.com>
427 * objc-act.c (objc_maybe_build_component_ref): Removed TODO.
429 2010-11-29 Nicola Pero <nicola.pero@meta-innovation.com>
431 * objc-act.c (objc_eh_runtime_type): Avoid ICE if error_mark_node
432 is passed as argument.
433 (objc_begin_catch_clause): Added code to deal with an
434 error_mark_node or NULL_TREE argument. Improved checks for
435 invalid arguments. Added code to traverse typedefs.
437 2010-11-29 Nicola Pero <nicola.pero@meta-innovation.com>
439 * objc-act.c (objc_demangle): Return immediately if the string is
440 too short. Detect names that do not need demangling, and return
443 2010-11-27 Nicola Pero <nicola.pero@meta-innovation.com>
445 Implemented optional properties.
446 * objc-act.h (PROPERTY_OPTIONAL): New.
447 * objc-act.c (objc_add_property_declaration): Set
448 PROPERTY_OPTIONAL if appropriate.
449 (finish_class): When generating definitions of setter and getter
450 methods associated with a property for a protocol, mark them as
451 optional if the property is optional.
452 (maybe_make_artificial_property_decl): Added 'getter_name'
453 argument. Set PROPERTY_OPTIONAL.
454 (objc_maybe_build_component_ref): Updated calls to
455 maybe_make_artificial_property_decl. Added code for optional,
457 (objc_build_class_component_ref): Updated call to
458 maybe_make_artificial_property_decl.
460 2010-11-27 Nicola Pero <nicola.pero@meta-innovation.com>
462 * objc-act.c (objc_build_struct): Fixed loops that save and
463 restore TYPE_OBJC_INFO to iterate over all variants of the type; a
464 special case for the current type is then no longer required.
465 Duplicate TYPE_LANG_SPECIFIC for each type before restoring
467 (objc_get_protocol_qualified_type): Updated comments.
469 2010-11-25 Nicola Pero <nicola.pero@meta-innovation.com>
471 * objc-act.c (objc_build_struct): Install TYPE_OBJC_INTERFACE
472 after finish_struct, not before, otherwise it may be wiped out by
473 it. This fixes spurious warnings when a class has more than 15
476 2010-11-23 Nicola Pero <nicola.pero@meta-innovation.com>
479 * lang-specs.h: Added objective-c-cpp-output. Mapped .mi to
480 objective-c-cpp-output instead of objc-cpp-output. Print a
481 deprecation note every time objc-cpp-output is requested.
483 2010-11-22 Joseph Myers <joseph@codesourcery.com>
485 * objc-act.c (write_symbols): Don't declare here.
487 2010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
490 * objc-act.c (objc_generate_write_barrier): Added assert to make sure
491 this function is only called with the next runtime.
493 2010-11-20 Jakub Jelinek <jakub@redhat.com>
496 * objc-act.c (in_late_binary_op): Remove.
498 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
500 * objc-act.c (objc_start_class_interface): Do not warn that class
501 attributes are unimplemented. Pass the attributes to start_class.
502 (objc_start_category_interface): Updated call to start_class.
503 (objc_start_class_implementation): Same change.
504 (objc_start_category_implementation): Same change.
505 (objc_build_class_component_ref): Warn if the class is deprecated.
506 (build_private_template): Mark the template as deprecated if the
508 (start_class): Added 'attributes' argument. Emit a warning if
509 using a deprecated class as superclass of a class, or original
510 class of a category. Recognize the 'deprecated' attribute when
511 starting and interface, and mark the interface with
512 TREE_DEPRECATED if present. Store attributes in the interface.
514 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
516 * objc-act.c (lookup_protocol): Added 'warn_if_deprecated'
517 argument. If it is 'true' and the protocol is deprecated, emit a
519 (objc_start_protocol): Do not warn that protocol attributes are
520 unimplemented. Pass the attributes to start_protocol.
521 (start_protocol): Added attributes argument. Recognize the
522 'deprecated' attribute and mark the protocols with TREE_DEPRECATED
523 if present. Store attributes in the protocol.
524 (objc_declare_protocols): Added 'attributes' argument. Recognize
525 the 'deprecated' attribute and mark the protocols with
526 TREE_DEPRECATED if present. Store attributes in the protocol.
527 Updated call to lookup_protocol.
528 (objc_build_protocol_expr): Updated call to lookup_protocol.
529 (check_protocol_recursively): Same change.
530 (lookup_and_install_protocols): Same change.
531 * objc-act.h: Updated comments.
533 2010-11-17 Nicola Pero <nicola.pero@meta-innovation.com>
535 * objc-act.c (lookup_method_in_protocol_list): Search methods in
536 PROTOCOL_OPTIONAL_CLS_METHODS / PROTOCOL_OPTIONAL_NST_METHODS if
537 they are not found in PROTOCOL_CLS_METHODS / PROTOCOL_NST_METHODS.
539 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
541 * objc-act.c (objc_build_setter_call): New.
542 (objc_maybe_build_modify_expr): Rewritten to build a compound
544 (objc_build_incr_expr_for_property_ref): Updated calls to
545 objc_maybe_build_modify_expr to call objc_build_setter_call
546 instead. Use build_modify_expr () instead of build2 (MODIFY_EXPR,
547 ...). Use convert () instead of build1 (NOP_EXPR, ...). Use
548 TREE_NO_WARNING on the final compound statement to silence C++
551 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
553 * objc-act.c (objc_build_incr_expr_for_property_ref): New.
554 (objc_create_temporary_var): Moved it towards the beginning of the
555 file so that objc_build_incr_expr_for_property_ref can use it.
557 2010-11-14 Nicola Pero <nicola.pero@meta-innovation.com>
559 * objc-act.c (objc_add_property_declaration): Check that the decl
560 we received from the parser is a FIELD_DECL; reject array and
561 bitfield properties. Convert the warning when a property is
562 readonly and a setter is specified into an error. Convert errors
563 when a property declaration does not match a property declaration
564 in a superclass into warnings.
565 (objc_add_synthesize_declaration_for_property): Use
566 DECL_BIT_FIELD_TYPE to determine the type of an instance variable
567 if it is a bitfield. Throw an error if we are asked to synthesize
568 setters/getters for a bitfield instance variable but the property
569 is not appropriate - it must be assign and nonatomic. If the
570 property is readonly, allow the instance variable type to be a
571 specialization of the property type.
572 (objc_type_valid_for_messaging): Fixed returning 'false' for a
573 Class qualified with a protocol when the 'accept_classes' argument
576 2010-11-13 Nicola Pero <nicola.pero@meta-innovation.com>
578 * objc-act.c (objc_get_protocol_qualified_type): detect cases
579 where we are asked to attach a protocol to something which is not
580 an Objective-C object type, and produce an error.
582 2010-11-11 Nicola Pero <nicola.pero@meta-innovation.com>
584 * objc-act.c (objc_add_property_declaration): Check that the type
585 of a property and of an inherited property match.
586 (objc_maybe_build_component_ref): Tidied up indentation and
588 (objc_common_type): Added new type of check (-5).
589 (objc_add_synthesize_declaration_for_property): Check that the
590 property to synthesize and the instance variable to use have the
593 2010-11-10 Joseph Myers <joseph@codesourcery.com>
595 * objc-act.c (objc_init): Use %' in diagnostic.
596 (objc_set_method_opt): Remove trailing '.' from diagnostic.
598 2010-11-10 Joseph Myers <joseph@codesourcery.com>
600 * objc-act.c (dump_base_name): Don't declare here.
602 2010-11-08 Nicola Pero <nicola.pero@meta-innovation.com>
604 * objc-act.c (objc_add_dynamic_declaration_for_property): Do not
605 search for the @property declation only in the current context,
606 but also in inherited properties. Do not mark the original
607 PROPERTY_DECL in the @interface or @protocol with
609 (check_methods): To check if a method is associated with a
610 @dynamic property, search for the property in IMPL_PROPERTY_DECL.
611 (check_accessible_methods): Same change.
612 * objc-act.h: Updated comment.
614 2010-11-08 Nicola Pero <nicola.pero@meta-innovation.com>
616 * objc-act.c (objc_add_synthesize_declaration_for_property):
617 Iterate over IMPL_PROPERTY_DECL, not CLASS_PROPERTY_DECL, when
618 checking for an existing @synthesize or @dynamic declaration.
619 Search for an inherited @property declaration if none is found in
620 the local interface. If the required instance variable does not
621 exist, return instead of trying to continue to prevent a compiler
622 crash later. Check that the instance variable is not already
623 being used by another @synthesize.
624 (objc_add_dynamic_declaration_for_property): Iterate over
625 IMPL_PROPERTY_DECL, not CLASS_PROPERTY_DECL, when checking for an
626 existing @synthesize or @dynamic declaration.
627 (objc_synthesize_getter): Search for the getter declaration in
628 protocols and superclasses as well.
629 (objc_synthesize_setter): Search for the setter declaration in
630 protocols and superclasses as well.
632 2010-11-08 Nicola Pero <nicola.pero@meta-innovation.com>
634 * objc-act.c (lookup_property): When checking categories, also
635 check the protocols attached to each.
636 (objc_add_property_declaration): Determine the
637 PROPERTY_SETTER_NAME and PROPERTY_GETTER_NAME here. Tidied up
638 error message. Search for an existing property declaration with
639 the same name which would be inherited from the class hiearchy,
640 and produce an error if it has incompatible attributes.
641 (check_methods): Changed second parameter. If the method is a
642 getter or setter for a property, do not warn if it is inherited as
643 opposed to implemented directly in the class.
644 (check_protocol): Updated calls to check_methods.
645 (finish_class): Do not determine the PROPERTY_SETTER_NAME and
646 PROPERTY_GETTER_NAME here; this is now done earlier, in
647 objc_add_property_declaration.
648 * objc-act.h (CLASS_NAME, CLASS_SUPER_NAME): Added comments.
650 2010-11-06 Nicola Pero <nicola.pero@meta-innovation.com>
652 Fixed using the Objective-C 2.0 dot-syntax with self and super.
653 * objc-act.c (OBJC_LOOKUP_NO_INSTANCE_METHODS_OF_ROOT_CLASS): New.
654 (maybe_make_artificial_property_decl): Added 'implementation'
655 argument. Use OBJC_LOOKUP_NO_INSTANCE_METHODS_OF_ROOT_CLASS when
656 looking up getters or setters for a class. If an implementation
657 is specified, search it as well for a getter or setter.
658 (objc_maybe_build_component_ref): Updated calls to
659 maybe_make_artificial_property_decl; added code to deal with
660 'self' and 'super' and with methods declared locally in the
661 implementation. Store the getter call expression in the
662 PROPERTY_REF instead of throwing it away.
663 (objc_build_class_component_ref): Updated calls to
664 maybe_make_artificial_property_decl, and store the getter call
665 expression in PROPERTY_REF instead of throwing it away.
666 (lookup_method_static): Implemented
667 OBJC_LOOKUP_NO_INSTANCE_METHODS_OF_ROOT_CLASS option.
668 (objc_gimplify_property_ref): Do not build the getter method call
669 here; instead use the one stored in the PROPERTY_REF. If it's not
670 there, produce helpful error messages.
671 * objc-tree.def (PROPERTY_REF): Increased the number of operands
672 from 2 to 3. Updated comments.
673 * objc-act.h (PROPERTY_REF_GETTER_CALL): New.
675 2010-11-06 Iain Sandoe <iains@gcc.gnu.org>
678 * objc-act.c (objc_build_string_object): Amend for renamed hook.
679 (objc_string_ref_type_p): New.
680 (objc_check_format_arg): New.
682 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
684 Fixed using the Objective-C 2.0 dot-syntax with class names.
685 * objc-act.c (objc_build_class_component_ref): New.
687 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
689 * objc-act.c (objc_add_dynamic_declaration): Allow @dynamic in a
691 (objc_type_valid_for_messaging): Added 'accept_classes' argument;
692 if set to 'true', return 'true' for Class objects. Do not remove
693 more than on pointer indirection.
694 (objc_add_property_declaration): Only warn about 'assign'
695 semantics for Objective-C objects if warn_property_assign_default;
696 and do not warn if the property is readonly or if the type is a Class.
697 (objc_finish_foreach_loop): Updated calls to
698 objc_type_valid_for_messaging.
700 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
702 Implemented -fobjc-std=objc1 flag.
703 * objc-act.c (objc_start_class_interface): If attributes are
704 specified when flag_objc1_only is set, print an error.
705 (objc_start_category_interface): Same change.
706 (objc_start_protocol): Same change.
707 (objc_add_method_declaration): Same change.
708 (objc_start_method_definition): Same change.
709 (objc_build_keyword_decl): Same change.
710 (objc_set_visibility): If OBJC_IVAR_VIS_PACKAGE is used when
711 flag_objc1_set is set, print an error.
712 (objc_set_method_opt): If flag_objc1_only is set, print an error.
713 (objc_add_property_declaration): Same change.
714 (objc_add_synthesize_declaration): Same change.
715 (objc_add_dynamic_declaration): Same change.
716 (objc_finish_foreach_loop): Same change.
717 (objc_maybe_build_component_ref): If flag_objc1_only is set,
720 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
722 * objc-act.c (maybe_make_artificial_property_decl): New.
723 (objc_maybe_build_component_ref): Call
724 maybe_make_artificial_property_decl if a property can not be
725 found. Do not call objc_finish_message_expr if
726 PROPERTY_HAS_NO_GETTER.
727 * objc-act.h Updated comments.
728 (PROPERTY_HAS_NO_GETTER): New.
729 (PROPERTY_HAS_NO_SETTER): New.
730 * objc-tree.def: Updated comment.
732 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
734 Implemented format and noreturn attributes for Objective-C methods.
735 * objc-act.c (objc_start_method_definition): If method attributes
736 are specified emit a warning and ignore them.
737 (build_objc_method_call): Moved deprecation warnings from here ...
738 (objc_finish_message_expr): to here. Do not emit deprecation
739 warnings if the receiver is of type 'id'.
740 (really_start_method): Install 'deprecation' and 'noreturn'
742 (objc_decl_method_attributes): Carefully filter out the list of
743 attributes, allowing only "noreturn", "format", "sentinel" and
744 "deprecated". In the case of "format", adjust the arguments.
745 Always process the attributes in the same way no matter if
746 "sentinel" is in the list or not.
748 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
750 * objc-act.c (objc_maybe_build_component_ref): Warn about using
751 deprecated properties.
752 (objc_maybe_printable_name): Support PROPERTY_DECL.
754 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
756 Implemented Objective-C 2.0 property accessors.
757 * objc-act.h (enum objc_tree_index): Added OCTI_GET_PROPERTY_DECL,
758 OCTI_SET_PROPERTY_DECL, OCTI_COPY_STRUCT_DECL,
759 OCTI_GET_PROPERTY_STRUCT_DECL and OCTI_SET_PROPERTY_STRUCT_DECL.
760 (objc_getProperty_decl): New.
761 (objc_setProperty_decl): New.
762 (objc_copyStruct_decl): New.
763 (objc_getPropertyStruct_decl): New.
764 (objc_setPropertyStruct_decl): New.
765 * objc-act.c (build_objc_property_accessor_helpers): New.
766 (synth_module_prologue): Call
767 build_objc_property_accessor_helpers.
769 (objc_synthesize_getter): Implemented synthesizing getters that
770 work with properties that are not nonatomic, assign properties.
771 (objc_synthesize_setter): Implemented synthesizing setters that
772 work with properties that are not nonatomic, assign properties.
774 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
776 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
777 * objc-tree.def (PROPERTY_REF): New.
778 * objc-act.h: Added comments for all the PROPERTY_ macros.
779 (PROPERTY_NAME): Use DECL_NAME.
780 (PROPERTY_COPIES): Removed.
781 (PROPERTY_READONLY): Use DECL_LANG_FLAG_0 for it.
782 (PROPERTY_NONATOMIC): New.
783 (objc_property_assign_semantics): Make it a typedef.
784 (PROPERTY_ASSIGN_SEMANTICS): New.
785 (PROPERTY_DYNAMIC): New.
786 (PROPERTY_REF_OBJECT): New.
787 (PROPERTY_REF_PROPERTY_DECL): New.
788 * objc-act.c (CALL_EXPR_OBJC_PROPERTY_GETTER): Removed.
789 (in_objc_property_setter_name_context): Removed.
790 (objc_add_property_declaration): Removed copies and ivar arguments
791 and code supporting them. Fixed recovering when readonly and
792 setter attributes are specified. Removed support for @property in
793 @implementation context. Updated error message. Double-check
794 that a property does not have a DECL_INITIAL. Validate the
795 property assign semantics and emit appropriate errors and
796 warnings. Check for duplicate property declarations. Set
797 DECL_SOURCE_LOCATION, TREE_DEPRECATED, PROPERTY_NONATOMIC,
798 PROPERTY_ASSIGN_SEMANTICS and PROPERTY_DYNAMIC of the new
799 PROPERTY_DECL. Do not set PROPERTY_COPIES. Set
800 PROPERTY_IVAR_NAME to NULL_TREE.
801 (objc_build_getter_call): Renamed to
802 objc_maybe_build_component_ref. If the property is not found in
803 the interface, search in the protocol list. Do not generate the
804 getter call; instead, build and return a PROPERTY_REF.
805 (objc_is_property_ref): New.
806 (objc_setter_func_call): Removed.
807 (get_selector_from_reference): Removed.
808 (is_property): Removed.
809 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
810 Updated to work on a PROPERTY_REF and use the PROPERTY_DECL from
811 the PROPERTY_REF. Generate an error if the property is read-only.
812 (build_property_reference): Removed.
813 (objc_finish_message_expr): Removed check to produce "readonly
814 property can not be set" error when
815 in_objc_property_setter_name_context. We now generate the error
816 earlier, in objc_maybe_build_modify_expr, which will only generate
817 the setter call if the property is readwrite.
818 (check_methods): Recognize dynamic properties.
819 (check_methods_accessible): Same change.
820 (objc_build_property_ivar_name): Removed.
821 (objc_build_property_setter_name): Dropped bool argument. Always
822 add the ':' at the end.
823 (objc_gen_one_property_datum): Removed.
824 (objc_process_getter_setter): Removed.
825 (objc_synthesize_getter): Mark 'klass' argument as unused. Use
826 PROPERTY_GETTER_NAME instead of PROPERTY_NAME. Set the
827 DECL_SOURCE_LOCATION of the new method to be the same as the one
828 for the @synthesize. Always use PROPERTY_IVAR_NAME as it is
829 instead of trying to guess what it should be. Removed use of
830 CLASS_IVARS. Use the location of @synthesize for c_finish_return
831 and c_end_compound_statement.
832 (objc_synthesize_setter): Mark 'klass' argument as unused. Use
833 PROPERTY_SETTER_NAME instead of trying to guess what it should be.
834 Set the DECL_SOURCE_LOCATION of the new method to be the same as
835 the one for the @synthesize. Always use PROPERTY_IVAR_NAME as it
836 is instead of trying to guess what it should be. Removed use of
837 CLASS_IVARS. Use the location of @synthesize for c_finish_return
838 and c_end_compound_statement. Emit an error and keep going,
839 instead of aborting, if the setter prototype does not have the
841 (objc_add_synthesize_declaration_for_property): New.
842 (objc_add_synthesize_declaration): Removed ATTRIBUTE_UNUSED from
843 all arguments. Improved error message. Filled in the rest of the
844 function, which used to be a placeholder, with an actual
846 (objc_add_dynamic_declaration_for_property): New.
847 (objc_add_dynamic_declaration): Removed ATTRIBUTE_UNUSED from all
848 arguments. Improved error message. Filled in the rest of the
849 function, which used to be a placeholder, with an actual
851 (objc_gen_property_data): Rewritten.
852 (finish_class): Added explicit switch cases for
853 CLASS_INTERFACE_TYPE, CATEGORY_INTERFACE_TYPE and
854 PROTOCOL_INTERFACE_TYPE. Added a default switch case which is
855 gcc_unreachable. Rewritten the processing of properties, in
856 particular to not synthesize prototypes for getters and setters if
857 they already exist and to install the getter and setter names into
858 PROPERTY_GETTER_NAME and PROPERTY_SETTER_NAME. Do not generate
859 warnings about setter, getter and ivar property attributes.
860 (objc_lookup_ivar): Removed support for properties.
861 (objc_gimplify_property_ref): New.
862 (objc_gimplify_expr): Use a switch. In case of a PROPERTY_REF, call
863 objc_gimplify_property_ref.
865 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
867 * objc-act.c (objc_add_property_declaration): Added arguments to
868 pass the various property attributes that were parsed with the
869 property declaration. Process arguments to determine the final
870 property attributes and produce error messages as appropriate.
871 Added temporary code to keep the compiler silent about variables
872 set but not used - for new attributes that are only checked but
874 (property_readonly): Removed.
875 (property_setter): Removed.
876 (property_getter): Removed.
877 (property_ivar): Removed.
878 (property_copies): Removed.
879 (objc_set_property_attr): Removed.
880 * objc-act.h (enum property_assign_semantics): New.
882 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
884 * objc-act.c (objc_add_property_variable): Renamed to
885 objc_add_property_declaration. Added location argument. Updated
886 warnings and errors to use it. Use error, not fatal_error, if a
887 property declaration is found outside an interface or
888 implementation context.
890 2010-10-24 Nicola Pero <nicola.pero@meta-innovation.com>
892 * objc-act.c (objc_build_keyword_decl): Updated comments. Do not
893 emit a warning that method parameter attributes are unimplemented.
894 Instead, store them into DECL_ATTRIBUTES of the KEYWORD_DECL.
895 (start_method_def): Copy attributes from each KEYWORD_DECL into
896 the corresponding PARM_DECL.
897 (objc_warn_deprecated_use): Removed.
898 (build_objc_method_call): Call warn_deprecated_use, not
899 objc_warn_deprecated_use.
900 (objc_maybe_printable_name): Do not try to get the identifier name
901 of DECLs that we don't recognize. Immediately return NULL for them.
902 (objc_printable_name): Removed C++-specific case, which is no
903 longer used. Updated comments.
905 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
907 * objc-act.c (OBJC_GEN_METHOD_LABEL): Updated comments.
908 (objc_demangle): Return NULL if demangling can not be done because
909 the string to demangle is not an Objective-C mangled method name.
910 Be smarter in demangling method names so that at least for methods
911 with no arguments we are able to almost always demangle '_' correctly.
913 (objc_maybe_printable_name): New.
914 (objc_printable_name): Call objc_maybe_printable_name. If it
915 returns NULL, call cxx_printable_name in Objective-C++.
917 2010-10-21 Iain Sandoe <iains@gcc.gnu.org>
919 Based on the CFString implementation in FSF apple/trunk branch.
921 * objc/objc-act.c (objc_build_string_object): Handle CFStrings.
923 2010-10-21 Nicola Pero <nicola.pero@meta-innovation.com>
925 * objc-act.c (get_objc_string_decl): Use a switch instead of a
926 chain of ifs. Use gcc_unreachable instead of abort.
927 (add_objc_string): Same change.
928 (generate_protocol_list): Same change - twice.
929 (synth_id_with_class_suffix): Same change.
930 (build_keyword_selector): Same change - twice.
931 (objc_build_message_expr): Same change.
932 (objc_build_selector_expr): Same change.
933 (check_methods): Same change - and added missing gcc_unreachable
935 (check_methods_accessible): Same change - twice, and added missing
936 gcc_unreachable for default case in one of them.
937 (start_class): Same change - and added missing gcc_unreachable for
939 (continue_class): Same change.
940 (objc_gen_property_data): Same change.
941 (finish_class): Same change.
942 (encode_type_qualifiers): Added missing gcc_unreachable.
943 (encode_type): Small code tidy up to reduce duplicated code. Use
944 gcc_unreachable instead of abort - twice.
945 (encode_gnu_bitfield): Use a switch instead of a chain of ifs -
946 twice. Added missing gcc_unreachable for default case - twice.
947 (dump_interface): Use a switch instead of a chain of ifs.
948 (handle_impent): Same change.
950 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
952 * objc-act.h (objc_inherit_code): Removed.
953 * objc-act.c (objc_inherit_code): Removed.
954 (objc_set_method_type): Removed.
955 (objc_build_method_signature): Added is_class_method argument.
956 Use it instead of the global objc_inherit_code variable.
957 (objc_add_method_declaration): Same change.
958 (objc_start_method_definition): Same change.
959 (objc_generate_cxx_ctor_or_dtor): Updated call to
960 objc_start_method_definition. Do not call objc_set_method_type.
961 (adjust_type_for_id_default): Mark as inline.
962 (objc_synthesize_getter): Updated call to
963 objc_start_method_definition. Do not set objc_inherit_code.
964 (objc_synthesize_setter): Updated call to
965 objc_start_method_definition. Do not set objc_inherit_code.
967 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
969 Merge from 'apple/trunk' branch on FSF servers. Obvious updates
970 to gcc_alloc_xxx calls in hash_init and hash_class_name_enter to
971 get it to compile in the current trunk.
973 2006-01-27 Fariborz Jahanian <fjahanian@apple.com>
976 * objc/objc-act.c (hash_class_name_enter): New.
977 (hash_class_name_lookup): New.
978 (objc_declare_alias): Enter alias name into hash table.
979 (objc_declare_class): Enter class name into hash table.
980 (objc_is_class_name): Do a hash look up of class name.
981 (hash_init): Initialize the two new hash tables.
982 * objc-act.h: Added cls_name_hash_list and als_name_hash_list
983 declarations, removed class_chain and alias_chain.
985 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
987 * objc-lang.c (finish_file): Removed.
988 * objc-act.c (objc_finish_file): Renamed to
989 objc_write_global_declarations. Do not try to instantiate C++
990 templates when compiling Objective-C++ as this is now
991 automatically done before this function is called. Do not check
992 for syntax-only run or PCH generation as this is done by the
994 * objc-act.h (objc_finish_file): Removed.
996 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
998 Implemented parsing @synthesize and @dynamic for
999 Objective-C/Objective-C++.
1000 * objc-act.c (objc_add_synthesize_declaration): New.
1001 (objc_add_dynamic_declaration): New.
1003 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
1005 * objc-act.c (lookup_and_install_protocols): Return NULL if passed
1008 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
1010 Merge from 'apple/trunk' branch on FSF servers.
1012 2006-03-10 Fariborz Jahanian <fjahanian@apple.com>
1015 * objc/objc-act.c (objc_is_class_name): template parameter is not
1016 an objective class name.
1017 (objc_generate_cxx_cdtors): Check for the null
1018 objc_implementation_context.
1020 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
1022 Merge from 'apple/trunk' branch on FSF servers.
1024 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
1027 * objc/objc-act.c (objc_non_volatilized_type): New
1029 2005-10-07 Fariborz Jahanian <fjahanian@apple.com>
1032 * objc-act.c (objc_build_volatilized_type): Build 'volatilzed'
1033 types with proper attribute set and correctly.
1034 (objc_volatilize_decl): Remove unneeded code.
1035 (objc_type_quals_match): Use the new attribute to check on
1037 (hash_init): removed unneeded code.
1039 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
1041 Merge from 'apple/trunk' branch on FSF servers.
1043 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
1046 * objc-act.c (objc_diagnose_private_ivar): New.
1048 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
1050 * objc-act.c: Rename 'objc_public_flag' to objc_ivar_visibility and
1051 make its type 'objc_ivar_visibility_kind'.
1052 (objc_start_class_interface): Update to use visibility enum.
1053 (objc_start_class_implementation): Likewise.
1054 (objc_set_visibility): Update to use visibility enum, warn that
1055 @package is handle as per @public.
1056 (add_instance_variable): Handle OBJC_IVAR_VIS_PACKAGE.
1057 * objc-act.h: Rename 'objc_public_flag' to objc_ivar_visibility and
1058 make its type 'objc_ivar_visibility_kind'.
1060 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
1062 merge from FSF apple 'trunk' branch.
1063 2006 Fariborz Jahanian <fjahanian@apple.com>
1065 Radars 4436866, 4505126, 4506903, 4517826
1066 * objc-act.c (CALL_EXPR_OBJC_PROPERTY_GETTER): New.
1067 property_readonly, property_getter, property_setter, property_ivar,
1068 property_copies, in_objc_property_setter_name_context: New vars.
1069 (objc_set_property_attr): New.
1070 (objc_add_property_variable): New.
1071 (lookup_property_in_list): New.
1072 (lookup_property): New.
1073 (objc_build_getter_call): New.
1074 (objc_setter_func_call): New.
1075 (get_selector_from_reference): New.
1076 (objc_build_setter_call): New.
1078 (build_property_reference): New.
1079 (objc_finish_message_expr): Detect readonly property and warn.
1080 (objc_build_property_ivar_name): New.
1081 (objc_build_property_setter_name): New.
1082 (objc_gen_one_property_datum): New.
1083 (objc_process_getter_setter): New.
1084 (objc_synthesize_getter): New.
1085 (objc_synthesize_setter): New.
1086 (objc_gen_property_data): New.
1087 (finish_class): Generate property data.
1088 (comp_proto_with_proto): Separated from ...
1089 (match_proto_with_proto): ... New.
1090 (objc_lookup_ivar): Handle properties.
1091 * objc-tree.def (PROPERTY_DECL): New tree code.
1092 * objc-act.h: CLASS_LANG_SLOT_ELTS, PROTOCOL_LANG_SLOT_ELTS update size.
1093 (METHOD_PROPERTY_CONTEXT): New.
1094 (PROPERTY_NAME): New.
1095 (PROPERTY_GETTER_NAME): New.
1096 (PROPERTY_SETTER_NAME): New.
1097 (PROPERTY_IVAR_NAME): New.
1098 (PROPERTY_READONLY): New.
1099 (PROPERTY_COPIES): New.
1100 (TOTAL_CLASS_RAW_IVARS): New.
1101 (CLASS_PROPERTY_DECL): New.
1102 (IMPL_PROPERTY_DECL): New.
1103 * objc-lang.c (objc_init_ts): Update fields for property_decl.
1105 2010-10-13 Richard Henderson <rth@redhat.com>
1107 * objc-act.c (objc_eh_personality): Update call to
1108 build_personality_function.
1110 2010-10-13 Iain Sandoe <iains@gcc.gnu.org>
1112 merge from FSF apple 'trunk' branch.
1114 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
1115 Radar 3803157 (method attributes)
1116 * objc/objc-act.h (METHOD_TYPE_ATTRIBUTES): New macro.
1117 * objc/objc-act.c (objc_decl_method_attributes): New.
1118 (objc_add_method_declaration): Process method's attribute.
1119 (objc_start_method_definition): Ditto.
1120 (build_objc_method_call): Inject method attribute into
1121 built function type.
1122 (objc_method_decl): New.
1123 (objc_warn_deprecated)use): New.
1125 2010-10-07 Andi Kleen <ak@linux.intel.com>
1127 * Make-lang.in (cc1obj-dummy): Remove.
1128 (cc1obj-checksum): Change to run checksum over object files
1131 2010-10-07 Nicola Pero <nicola.pero@meta-innovation.com>
1134 * objc-act.c (objc_finish_foreach_loop): Convert return value of
1135 countByEnumeratingWithState:objects:count: to long unsigned int.
1137 2010-10-07 Iain Sandoe <iains@gcc.gnu.org>
1139 * objc-act.c (build_objc_method_call): Replace calls to
1140 build_function_call () with the VEC equivalent. Construct parameter
1143 2010-10-07 Iain Sandoe <iains@gcc.gnu.org>
1145 * objc-act.c (objc_build_message_expr): Call mark_exp_read () to
1146 signal that the receiver has been used.
1148 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
1150 * README: Obsolete file removed.
1152 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
1154 Implemented fast enumeration for Objective-C.
1155 * objc-act.c (build_fast_enumeration_state_template): New.
1156 (TAG_ENUMERATION_MUTATION): New.
1157 (TAG_FAST_ENUMERATION_STATE): New.
1158 (synth_module_prologue): Call build_fast_enumeration_state_template() and set up
1159 objc_enumeration_mutation_decl.
1160 (objc_create_temporary_var): Allow providing a name to temporary
1162 (objc_build_exc_ptr): Updated calls to
1163 objc_create_temporary_var().
1164 (next_sjlj_build_try_catch_finally): Same change.
1165 (objc_finish_foreach_loop): New.
1166 * objc-act.h: Added OCTI_FAST_ENUM_STATE_TEMP,
1167 OCTI_ENUM_MUTATION_DECL, objc_fast_enumeration_state_template,
1168 objc_enumeration_mutation_decl.
1170 Merge from 'apple/trunk' branch on FSF servers.
1172 2006-04-12 Fariborz Jahanian <fjahanian@apple.com>
1175 * objc-act.c (objc_type_valid_for_messaging): New routine to check
1176 for valid objc object types.
1177 (objc_finish_foreach_loop): Check for invalid objc objects in
1180 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
1182 Merge from 'apple/trunk' branch on FSF servers.
1184 2005-10-17 Fariborz Jahanian <fjahanian@apple.com>
1187 * objc-act.c (objc_start_method_definition): Check for
1188 error_mark_node for the selector name and make a quick exit.
1190 2010-10-04 Andi Kleen <ak@linux.intel.com>
1192 * Make-lang.in (cc1obj-dummy, cc1obj): Add + to build rule.
1194 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
1196 merge from FSF 'apple/trunk' branch.
1197 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
1200 * objc/objc-act.c (objc_set_method_opt): New function.
1201 (objc_start_protocol, objc_finish_interface): Reset
1202 objc_method_optional_flag flag.
1203 (objc_add_method_declaration): Pass on the new
1204 flag to objc_add_method.
1205 (objc_add_method): Add optional methods to new chain in
1207 * objc/objc-act.h (CLASS_OPTIONAL_CLS_METHODS,
1208 CLASS_OPTIONAL_NST_METHODS): New macros accessing a protocol
1209 class's optional method chains.
1211 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
1213 Merge from 'apple/trunk' branch on FSF servers.
1215 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
1218 * objc-act.c (objc_declare_class): Pick the right
1221 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
1223 Merge from 'apple/trunk' branch on FSF servers.
1225 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
1228 * objc-act.c (objc_check_global_decl): New
1230 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
1232 * objc-act.c (objc_is_reserved_word): Removed.
1234 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
1236 * objc-act.c (objc_add_method_declaration): Handle and ignore
1238 (objc_start_method_definition): Likewise.
1239 (objc_generate_cxx_ctor_or_dtor): Pass NULL attributes to ctor/dtor.
1240 (objc_build_keyword_decl): Handle and ignore attributes.
1242 2010-09-28 Richard Henderson <rth@redhat.com>
1244 * objc-act.c (objc_eh_personality): Use targetm.except_unwind_info.
1246 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
1248 * objc-act.c (objc_start_class_interface): Handle and ignore attributes.
1249 (objc_start_category_interface): Likewise.
1250 (objc_start_protocol): Likewise.
1252 2010-09-28 Nicola Pero <nicola.pero@meta-innovation.com>
1254 Merge from 'apple/trunk' branch on FSF servers.
1256 2005-08-23 Stuart Hastings <stuart@apple.com>
1257 Ziemowit Laski <zlaski@apple.com>
1260 * objc-act.c (objc_decay_parm_type): New function.
1261 (get_arg_type_list): Decay types for all named arguments.
1262 (objc_push_parm): Rebuild the PARM_DECL if its type has
1265 2010-09-28 Nicola Pero <nicola.pero@meta-innovation.com>
1267 * objc-act.c (encode_type): Fixed encoding enums with the next
1270 2010-09-28 Nicola Pero <nicola.pero@meta-innovation.com>
1272 Merge from 'apple/trunk' branch on FSF servers.
1274 2005-07-18 Ziemowit Laski <zlaski@apple.com>
1277 * objc-act.c (objc_compare_types): A new silent comparison
1278 mode (-4), differing from regular comparison (-3) in that
1279 'false' is returned instead of issuing warnings.
1281 2010-09-28 Nicola Pero <nicola.pero@meta-innovation.com>
1283 * objc-act.c (encode_type): Do not add 'r' with the next runtime.
1284 (encode_aggregate_within): Reorganized code to be more readable.
1285 (encode_aggregate_fields): Updated second argument to be 'bool'
1288 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
1293 * objc-act.c: Improved comments for encoding functions.
1294 (encode_aggregate_within): For the GNU runtime, rewritten some
1295 obsfuscated code to clarify the various cases.
1296 (encode_aggregate): Function removed.
1297 (encode_array): Generate an error if asked to encode an incomplete
1298 array as part of generating instance variables. Else, when
1299 encoding an incomplete array inside a structure, encode it as an
1301 (encode_pointer): For the GNU runtime, fixed encoding 'BOOL *' as
1302 '^c' instead of '*'.
1303 (encode_gnu_bitfield): Encode enumerated types exactly in the same
1304 type as integer types instead of using a hardcoded 'i'. If asked
1305 to encode a non-integer type as a bitfield, do not abort
1306 compilation immediately; instead generate an error, then skip the
1308 (encode_type): Use a 'switch' instead of a sequence of 'if's.
1309 Added a 'default' clause that gets executed if the type can not be
1310 matched, and that encodes it as '?' (unknown) and produces a
1311 warning. For the GNU runtime, encode enumerated types exactly in
1312 the same way as integer types instead of using a hardcoded 'i'.
1313 Encode long double as 'D'. Encode 128-bit integers as 'T' or 't'.
1314 Encode C++ reference types as pointers. Call encode_vector to
1316 (encode_vector): New function.
1318 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
1320 Merge from 'apple/trunk' branch on FSF servers. I modified the
1321 changes to be used only when compiling for the NeXT runtime.
1323 2005-10-10 Fariborz Jahanian <fjahanian@apple.com>
1327 * objc-act.c (encode_type): Remove the hack.
1329 2005-07-20 Ziemowit Laski <zlaski@apple.com>
1332 * objc-act.c (pointee_is_readonly): New function.
1333 (encode_pointer, encode_aggregate_within, encode_type):
1334 Attempt to emulate GCC 3.3 when generating type encodings.
1336 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
1338 Merge from 'apple/trunk' branch on FSF servers.
1340 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
1343 * objc-act.c (objc_have_common_types): New function.
1345 2005-06-22 Ziemowit Laski <zlaski@apple.com>
1348 * objc-act.c (objc_common_type): New function.
1350 2010-09-27 Richard Guenther <rguenther@suse.de>
1352 * objc-act.c (objc_get_class_reference): Use CP_TYPE_CONTEXT.
1353 (objc_is_global_reference_p): Use DECL_FILE_SCOPE_P.
1355 2010-09-26 Nicola Pero <nicola.pero@meta-innovation.com>
1357 * objc-act.c: Removed historical, obsolete comment at the top of
1360 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
1363 * objc-act.c (objc_start_method_definition): Do not abort upon a
1364 'method definition not in @implementation context' error. Return
1367 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
1370 * objc-act.c (objc_get_interface_ivars): New function.
1371 (objc_collecting_ivars): New variable.
1372 (continue_class): Set and reset objc_collecting_ivars for context.
1374 2010-09-15 Nicola Pero <nicola.pero@meta-innovation.com>
1376 Merge from 'apple/trunk' branch on FSF servers.
1378 2006-03-09 Fariborz Jahanian <fjahanian@apple.com>
1381 * objc/objc-act.c (objc_finish_message_expr): Look for message in
1382 @class's protocol list.
1384 2006-02-07 Fariborz Jahanian <fjahanian@apple.com>
1387 * objc/objc-act.c (objc_start_method_definition): Initialize
1388 break/continue labels.
1390 2005-08-22 Ziemowit Laski <zlaski@apple.com>
1393 * objc-act.c (objc_compare_types): Compare function
1394 pointers; indicate success if the right-hand side has
1395 a return type that is covariant, and the argument types
1396 contravariant, with those of the left side.
1398 2005-08-22 Ziemowit Laski <zlaski@apple.com>
1401 * objc-act.c (objc_get_protocol_qualified_type): When looking
1402 at a typedef, retrieve the precise type it describes (rather
1403 than merely looking up a class by name).
1405 2010-09-10 Nicola Pero <nicola.pero@meta-innovation.com>
1407 * objc/objc-act.c (objc_begin_try_stmt): Generate an error if
1408 -fobjc-exceptions was not used. (objc_build_throw_stmt): Same
1411 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
1413 * objc-act.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
1415 2010-07-10 Iain Sandoe <iains@gcc.gnu.org>
1418 * objc-act.c: build_objc_string_decl() remove declaration.
1419 (finish_var_decl): Remove forcing of var output and marking
1421 (init_def_list): Use integer_zero_node.
1422 (init_objc_symtab): Use integer_zero_node, make the short
1423 integer type specific on relevant nodes.
1424 (generate_objc_symtab_decl): Remove call to
1425 forward_declare_categories(). Use null_pointer_node where
1427 (build_module_descriptor): Comment and mark this item as
1429 (generate_static_references): Use gcc_unreachable instead of
1431 (diagnose_missing_method): New.
1432 (build_next_selector_translation_table): New.
1433 (build_gnu_selector_translation_table): New.
1434 (add_objc_string): Merge code from build_objc_string_decl...
1435 ... and delete build_objc_string_decl().
1436 (generate_dispatch_table): Make integer types explicit.
1437 (generate_category): Pass implent and arrange for the data
1438 to be extracted within the routine. Do not start new vars,
1439 but finish the ones collcted during parsing.
1440 (generate_shared_structures): Likewise.
1441 (finish_objc): Reorder code so that we finish variables before
1442 referencing them. Save the global data before calling meta-data
1443 creation routines, and pass the current reference to the two
1444 main routines. Only call generate_objc_image_info () for the
1446 (generate_classref_translation_entry): Comment on and make this
1447 item DECL_PRESERVE_P.
1448 (handle_class_ref): Use varpool interfaces, comment on and make
1449 this item DECL_PRESERVE_P.
1450 (handle_impent): Likewise.
1451 (generate_objc_image_info): Only generate when the content is
1452 non-zero. Make integer types explict.
1454 2010-07-03 Nathan Froyd <froydnj@codesourcery.com>
1457 * objc-act.c (build_sized_array_type): New function.
1458 (add_objc_string): Use it.
1459 (generate_protocol_list): Likewise.
1460 (generate_objc_image_info): Likewise.
1461 (add_field_decl): New function.
1462 (objc_build_struct): Use a VEC rather than building a TREE_LIST.
1463 (generate_struct_by_value_array): Use add_field_decl.
1464 (build_objc_symtab_template): Likewise.
1465 (build_module_descriptor): Likewise.
1466 (build_objc_exception_stuff): Likewise.
1467 (build_protocol_template): Likewise.
1468 (build_method_prototype_list_template): Likewise.
1469 (build_method_prototype_template): Likewise.
1470 (build_category_template): Likewise.
1471 (build_selector_template): Likewise.
1472 (build_class_template): Likewise.
1473 (build_super_template): Likewise.
1474 (build_ivar_template): Likewise.
1475 (build_ivar_list_template): Likewise.
1476 (build_method_list_template): Likewise.
1477 (build_method_template): Likewise.
1479 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
1481 * objc-act.c: Do not include except.h.
1483 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
1485 * objc-act.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Use typed GC
1488 * objc-act.c (objc_volatilize_decl): Likewise.
1489 (objc_build_string_object): Likewise.
1490 (hash_init): Likewise.
1491 (hash_enter): Likewise.
1492 (hash_add_attr): Likewise.
1493 (add_class): Likewise.
1494 (start_class): Likewise.
1496 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
1498 * objc-act.c: Update include path for moved files.
1499 * objc-lang.c: Likewise.
1500 * config-lang.in: Update paths in gtfiles for files in c-family/.
1502 2010-06-01 Nathan Froyd <froydnj@codesourcery.com>
1504 * objc-act.c (build_next_objc_exception_stuff): Give setjmp a
1505 varargs type instead of a zero-argument type.
1507 2010-05-30 Nathan Froyd <froydnj@codesourcery.com>
1509 * objc-act.c (synth_module_prologue): Use build_function_type_list
1510 instead of build_function_type.
1511 (build_module_initializer_routine): Likewise.
1512 (build_next_objc_exception_stuff): Likewise.
1513 (build_objc_exception_stuff): Likewise.
1515 2010-05-27 Joseph Myers <joseph@codesourcery.com>
1517 * objc-act.c: Include diagnostic-core.h instead of diagnostic.h.
1518 * Make-lang.in (objc/objc-act.o): Update dependencies.
1520 2010-05-25 Steven Bosscher <steven@gcc.gnu.org>
1522 * objc-act.h: Do not include gimple.h.
1523 * objc-act.c: Do not include rtl.h, expr.h, libfuncs.h, and tm_p.h.
1524 Include gimple.h. Explain why except.h has to be included.
1525 * objc-lang.c: Do not include diagnostics.h.
1526 * Make-lang.in: Update dependencies.
1528 2010-05-25 Nathan Froyd <froydnj@codesourcery.com>
1530 * objc-act.c (objc_build_constructor): Adjust OBJCPLUS impedance
1531 mismatch code for VECs.
1533 2010-05-25 Nathan Froyd <froydnj@codesourcery.com>
1535 * objc-act.c (objc_build_constructor): Take a VEC instead of a tree.
1536 Use build_constructor instead of build_constructor_from_list.
1537 (objc_build_string_object): Build a VEC argument for
1538 objc_build_constructor.
1539 (init_def_list): Likewise.
1540 (init_objc_symtab): Likewise.
1541 (init_module_descriptor): Likewise.
1542 (generate_static_references): Likewise.
1543 (build_selector_translation_table): Likewise.
1544 (build_descriptor_table_initializer): Likewise.
1545 (generate_descriptor_table): Likewise.
1546 (build_protocol_initializer): Likewise.
1547 (build_ivar_list_initializer): Likewise.
1548 (generate_ivars_list): Likewise.
1549 (build_dispatch_table_initializer): Likewise.
1550 (generate_dispatch_table): Likewise.
1551 (generate_protocol_list): Likewise.
1552 (build_category_initializer): Likewise.
1553 (build_shared_structure_initializer): Likewise.
1554 (generate_objc_image_info): Likewise.
1556 2010-04-30 Iain Sandoe <iains@gcc.gnu.org>
1559 * objc-act.c (encode_aggregate_within): Encode structure tags
1560 with template args for ObjC++.
1562 2010-04-30 Steven Bosscher <steven@gcc.gnu.org>
1564 * objc-act.c: Do not include varray.h.
1566 2010-04-07 Jakub Jelinek <jakub@redhat.com>
1569 * objc-act.c (finish_var_decl, objc_begin_catch_clause,
1570 really_start_method, get_super_receiver, handle_class_ref): Set
1571 DECL_READ_P in addition to TREE_USED.
1573 2010-04-07 Iain Sandoe <iains@gcc.gnu.org>
1576 * objc-act.c (objc_init): Warn that -fobjc-gc is ignored for
1577 -fgnu-runtime and set flag_objc_gc to zero.
1579 2010-04-07 Iain Sandoe <iains@gcc.gnu.org>
1582 * objc-act.c (build_module_initializer_routine): Make the argument
1583 to objc_start_function NULL_TREE when compiling ObjC++.
1585 2010-02-18 Iain Sandoe <iain.sandoe@sandoe-acoustics.co.uk>
1586 Mike Stump <mikestump@comcast.net>
1589 * objc-act.c (finish_var_decl): Set the generated symbols as "used".
1591 2009-12-17 Shujing Zhao <pearly.zhao@oracle.com>
1593 * objc-act.c (objc_substitute_decl, build_ivar_reference,
1594 get_super_receiver): Update build_indirect_ref calls.
1596 2009-11-28 Jakub Jelinek <jakub@redhat.com>
1598 * objc-act.c (generate_shared_structures): Remove unused sc_spec and
1599 decl_specs variables.
1600 (objc_build_message_expr): Remove unused loc variable.
1601 (objc_finish_message_expr): Remove unused saved_rtype variable.
1602 (encode_field_decl): Remove unused type variable.
1605 * objc-act.c (objc_build_struct): INIT_TYPE_OBJC_INFO for
1606 type variants that don't have it initialized yet.
1608 2009-09-14 Jan Hubicka <jh@suse.cz>
1610 * objc-act.c (objc_add_static_instance): Do not set DECL_COMMON.
1612 2009-09-14 Richard Henderson <rth@redhat.com>
1614 * objc-act.c (objc_init_exceptions): Don't call
1615 default_init_unwind_resume_libfunc.
1616 (objc_build_exc_ptr): Use __builtin_eh_pointer.
1618 2009-09-13 Richard Guenther <rguenther@suse.de>
1619 Rafael Avila de Espindola <espindola@google.com>
1621 * objc-act.c (objc_eh_runtime_type): Export.
1622 (objc_init_exceptions): Remove. Move warning code ...
1623 (objc_begin_try_stmt): ... here
1624 (objc_build_throw_stmt): ... and here.
1625 (objc_eh_personality_decl): New.
1626 (objc_eh_personality): New function.
1627 * objc-act.h (objc_eh_runtime_type): Declare.
1628 (objc_eh_personality): Likewise.
1629 * objc-lang.c (LANG_HOOKS_EH_RUNTIME_TYPE): Define.
1630 (LANG_HOOKS_EH_PERSONALITY): Likewise.
1632 2009-09-03 Diego Novillo <dnovillo@google.com>
1634 * objc-lang.c (lang_hooks): Remove const qualifier.
1636 2009-08-20 Richard Guenther <rguenther@suse.de>
1638 * objc-act.c: Include c-lang.h
1639 * Make-lang.in (objc/objc-act.o): Add c-lang.h dependency.
1641 2009-07-17 Aldy Hernandez <aldyh@redhat.com>
1642 Manuel López-Ibáñez <manu@gcc.gnu.org>
1645 * objc-act.c: Add location argument to all calls to
1646 build_fold_addr_expr.
1648 2009-07-14 Taras Glek <tglek@mozilla.com>
1649 Rafael Espindola <espindola@google.com>
1651 * Make-lang.in (objc.install-plugin): New target for
1652 installing plugin headers.
1654 2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
1656 * objc-act.c (next_sjlj_build_catch_list): Replace EXPR_LOCUS by
1659 2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
1661 * objc-act.c: Replace %J by an explicit location. Update all
1664 2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
1666 * objc-act.c: Replace %H by an explicit location. Update all
1669 2009-06-22 Steven Bosscher <steven@gcc.gnu.org>
1672 * objc-act.c (objc_build_message_args): Return if ARGS is the
1675 2009-06-19 Ian Lance Taylor <iant@google.com>
1677 * objc-act.c (objc_in_struct, objc_struct_types): Remove.
1678 (objc_struct_info): New static variable.
1679 (objc_start_struct): Pass &objc_struct_info, not &objc_in_struct
1680 and &objc_struct_types, to start_struct.
1681 (objc_finish_struct): Likewise for finish_struct.
1683 2009-06-15 Ian Lance Taylor <iant@google.com>
1685 * objc-act.c (objc_start_function): Don't set
1686 label_context_stack_se or label_context_stack_vm.
1688 2009-06-12 Aldy Hernandez <aldyh@redhat.com>
1690 * objc-act.c (finish_var_decl): Pass location to finish_decl.
1691 (objc_get_parm_info): Same.
1692 (get_super_receiver): Same.
1693 * objc-act.c (objc_build_component_ref): Pass location to
1695 (build_module_initializer_routine): Pass location to
1696 c_end_compound_stmt.
1697 (objc_generate_static_init_call): Pass location to build_stmt.
1698 (build_typed_selector_reference): New location argument.
1699 (build_selector_reference): Same.
1700 (objc_substitute_decl): Pass location to build_array_ref.
1701 (next_sjlj_build_try_catch_finally): Pass location to build_stmt.
1702 (objc_begin_catch_clause): Same.
1703 (objc_finish_try_stmt): Same.
1704 (objc_finish_catch_clause): Pass location to c_end_compound_stmt.
1705 (objc_build_throw_stmt): New argument.
1706 (generate_shared_structures): Pass location to build_c_cast.
1707 (objc_build_message_expr): Use local location.
1708 (objc_finish_message_expr): Use input_location.
1709 (build_objc_method_call): New argument.
1710 (objc_build_selector_expr): Same.
1711 (get_super_receiver): Pass location to build_c_cast,
1712 build_modify_expr, build_compound_expr.
1713 * objc-act.c: Add location to all calls to start_struct, build_decl,
1716 2009-06-09 Ian Lance Taylor <iant@google.com>
1718 * objc-act.c (objc_gimplify_expr): Change return type to int.
1719 * objc-act.h: Update declaration.
1721 2009-06-08 Alexandre Oliva <aoliva@redhat.com>
1723 * objc-act.c (objc_init): Skip print_struct_values during
1724 -fcompare-debug-second.
1726 2009-06-03 Ian Lance Taylor <iant@google.com>
1728 * Make-lang.in (cc1obj-checksum.o): Depend upon $(CONFIG_H) and
1731 2009-05-27 Ian Lance Taylor <iant@google.com>
1733 * Make-lang.in (cc1obj-dummy$(exeext)): Change $(COMPILER) to
1735 (cc1obj$(exeext)): Likewise.
1737 2009-05-26 Ian Lance Taylor <iant@google.com>
1739 * Make-lang.in (cc1obj-dummy$(exeext)): Use $(COMPILER).
1740 (cc1obj$(exeext)): Likewise.
1742 2009-05-20 Ian Lance Taylor <iant@google.com>
1744 * objc-act.c (objc_generate_cxx_ctor_or_dtor): Pass NULL rather
1745 than NULL_TREE to build_special_member_call.
1747 2009-05-10 Ian Lance Taylor <iant@google.com>
1749 * objc-act.c (objc_building_struct): New static variable.
1750 (objc_in_struct, objc_struct_types): New static variables.
1751 (objc_start_struct, objc_finish_struct): New static functions.
1752 (generate_struct_by_value_array): Call objc_start_struct instead
1753 of start_struct, and call objc_finish_struct instead of
1755 (objc_build_struct, build_objc_symtab_template): Likewise.
1756 (build_module_descriptor): Likewise.
1757 (build_next_objc_exception_stuff): Likewise.
1758 (build_protocol_template): Likewise.
1759 (build_method_prototype_list_template): Likewise.
1760 (build_method_prototype_template): Likewise.
1761 (build_category_template, build_selector_template): Likewise.
1762 (build_class_template, build_super_template): Likewise.
1763 (build_ivar_template, build_ivar_list_template): Likewise.
1764 (build_method_list_template): Likewise.
1765 (build_method_template): Likewise.
1767 2009-05-10 Joseph Myers <joseph@codesourcery.com>
1769 * objc-act.c: Include intl.h.
1770 (objc_lookup_protocol): Use complete sentences for diagnostics
1771 with %qE for identifiers and translating results of
1772 gen_type_name_0 to locale character set.
1773 (objc_check_decl, check_protocol_recursively,
1774 lookup_and_install_protocols, objc_build_string_object,
1775 objc_get_class_reference, objc_declare_alias, objc_declare_class,
1776 objc_get_class_ivars, error_with_ivar, check_duplicates,
1777 objc_finish_message_expr, objc_build_protocol_expr,
1778 objc_build_selector_expr, build_ivar_reference, objc_add_method,
1779 add_category, add_instance_variable, objc_is_public,
1780 check_methods, check_methods_accessible, check_protocol,
1781 start_class, finish_class, start_protocol, really_start_method,
1782 get_super_receiver, objc_lookup_ivar): Use %E and %qE for
1783 identifiers in diagnostics. Translate generated text to locale
1784 character set as needed.
1785 (check_protocol, check_protocols): Change name parameter to type
1787 (lang_report_error_function): Remove.
1789 2009-04-27 Ian Lance Taylor <iant@google.com>
1791 * objc-act.c (objc_gimplify_expr): Add casts to enum type.
1793 2009-04-24 Ian Lance Taylor <iant@google.com>
1795 * objc-act.c (get_super_receiver): Update calls to
1796 build_modify_expr to pass new argument.
1798 2009-04-21 Taras Glek <tglek@mozilla.com>
1800 * objc-act.c: Update GTY annotations to new syntax
1801 * objc-act.h: Likewise
1803 2009-04-21 Joseph Myers <joseph@codesourcery.com>
1805 * ChangeLog: Add copyright and license notices.
1807 2009-04-20 Ian Lance Taylor <iant@google.com>
1809 * objc-act.c (objc_rewrite_function_call): Change parameter from
1810 params to first_param. Change all callers.
1812 2009-03-30 Dominique d'Humieres <dominiq@lps.ens.fr>
1815 * objc-act.c (in_late_binary_op): Define for Objective-C++.
1817 2009-03-29 Joseph Myers <joseph@codesourcery.com>
1825 * objc-act.c (objc_finish_try_stmt): Set in_late_binary_op.
1827 2008-12-05 Sebastian Pop <sebastian.pop@amd.com>
1830 * Make-lang.in (cc1obj-dummy, cc1obj): Add BACKENDLIBS,
1833 2008-10-06 Aldy Hernandez <aldyh@redhat.com>
1835 * objc-act.c (objc_build_string_object): Pass location to
1837 (init_def_list): Same.
1838 (init_objc_symtab): Same.
1839 (init_module_descriptor): Same.
1840 (build_module_initializer_routine): Same.
1841 (generate_static_references): Same.
1842 (build_typed_selector_reference): Same.
1843 (add_objc_string): Same.
1844 (objc_substitute_decl): Same.
1845 (objc_build_ivar_assignment): Same.
1846 (objc_build_global_assignment): Same.
1847 (objc_build_strong_cast_assignment): Same.
1848 (generate_protocols): Same.
1849 (build_protocol_initializer): Same.
1850 (build_dispatch_table_initializer): Same.
1851 (generate_protocol_list): Same.
1852 (build_category_initializer): Same.
1853 (build_shared_structure_initializer): Same.
1854 (generate_shared_structures): Same.
1855 (objc_build_protocol_expr): Same.
1856 (build_ivar_reference): Same.
1857 (get_super_receiver): Same.
1859 2008-09-23 Aldy Hernandez <aldyh@redhat.com>
1861 * objc-act.c (next_sjlj_build_enter_and_setjmp): Call
1862 c_common_truthvalue_conversion with location.
1863 (next_sjlj_build_catch_list): Same.
1864 (next_sjlj_build_try_catch_finally): Same.
1866 2008-09-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
1869 * objc-lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): Don't define.
1870 * objc-act.h (objc_get_callee_fndecl): Remove prototype.
1871 * objc-act.c (objc_get_callee_fndecl): Kill.
1873 2008-09-17 Jan Hubicka <jh@suse.cz>
1876 * objc/objc-act.c (objc_finish_method_definition): Do not set
1879 2008-09-01 Aldy Hernandez <aldyh@redhat.com>
1881 * objc-act.c (build_typed_selector_reference): Pass input_location to
1882 build_unary_op calls.
1883 (build_selector_reference): Same, but to build_array_ref.
1884 (objc_substitute_decl): Same.
1885 (build_ivar_reference): Same, but to build_indirect_ref.
1886 (get_super_receiver): Same.
1888 2008-07-28 Richard Guenther <rguenther@suse.de>
1890 Merge from gimple-tuples-branch.
1892 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
1894 * Make-lang.in (objc-lang.o): Depend on GIMPLE_H.
1895 (objc-act.o): Rename TREE_GIMPLE_H to GIMPLE_H.
1896 * objc-act.h: Include gimple.h instead of tree-gimple.h.
1897 * ipa-reference.c: Same.
1899 2007-11-10 Aldy Hernandez <aldyh@redhat.com>
1901 * objc-act.c (objc_gimplify_expr): Change pre and post to sequences.
1902 * objc-act.h (objc_gimplify_expr): Change prototype accordingly.
1904 2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1906 * objc-act.c: Fix comment typos.
1908 2008-07-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1910 * objc-act.c (objc_start_class_interface,
1911 objc_start_category_interface, objc_start_class_implementation,
1912 objc_start_category_implementation, objc_build_struct,
1913 generate_static_references, build_private_template,
1914 lookup_category, objc_add_method, add_category,
1915 add_instance_variable, objc_is_public, conforms_to_protocol,
1916 start_class, continue_class, finish_class): Avoid C++ keywords.
1918 2008-07-14 Jason Merrill <jason@redhat.com>
1921 * objc-act.c (objc_build_constructor): Update C++ tweak.
1923 2007-07-14 Rafael Ávila de Espíndola <espindola@google.com>
1925 * objc-act.c (synth_module_prologue): Use TREE_NO_WARNING instead
1926 of DECL_IN_SYSTEM_HEADER.
1928 2008-07-11 Ian Lance Taylor <iant@google.com>
1930 * objc-act.c (objc_is_reserved_word): Always check for RID_CLASS,
1931 etc., not just when OBJCPLUS is defined.
1933 2008-06-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1935 * objc-act.c (setup_string_decl, objc_build_string_object,
1936 hash_interface, eq_interface, objc_begin_try_stmt,
1937 encode_method_prototype, build_ivar_list_initializer,
1938 objc_build_encode_expr): Fix for -Wc++-compat.
1940 2008-05-12 Tomas Bily <tbily@suse.cz>
1942 * objc-act.c (objc_generate_write_barrier, objc_finish_message_expr):
1945 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1947 * objc-act.c (objc_build_string_object): Don't set TREE_INVARIANT.
1949 2008-04-03 Tom Tromey <tromey@redhat.com>
1951 * Make-lang.in (objc_OBJS): New variable.
1953 2008-03-27 Tom Tromey <tromey@redhat.com>
1955 * Make-lang.in: Revert automatic dependency patch.
1957 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
1960 * objc-act.c (objc_build_component_ref): Fix call to
1961 finish_class_member_access_expr.
1962 (objc_generate_cxx_ctor_or_dtor): Fix call to
1963 build_special_member_call.
1965 2008-03-25 Andrew Pinski <pinskia@gmail.com>
1968 * objc-act.c (encode_type): Handle when type is error_mark_node.
1969 (objc_push_parm): Handle when the type of parm is error_mark_node.
1971 2008-03-25 Tom Tromey <tromey@redhat.com>
1973 * Make-lang.in (objc_OBJS): New variable.
1974 (cc1obj-checksum.o, objc/objc-lang.o, objc/objc-act.o): Remove.
1976 2008-03-21 Andreas Tobler <a.tobler@schweiz.org>
1979 * objc-act.c (objc_generate_cxx_ctor_or_dtor): Rename IS_AGGR_TYPE to
1981 (objc_generate_cxx_cdtors): Likewise.
1982 (add_instance_variable): Likewise.
1984 2008-02-26 Tom Tromey <tromey@redhat.com>
1986 * objc-act.c (objc_init): Remove old location code.
1988 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1991 * Make-lang.in (cc1obj-dummy, cc1obj): Add $(GMPLIBS).
1993 2007-07-30 Nick Clifton <nickc@redhat.com>
1995 * Make-lang.in: Change copyright header to refer to version 3 of
1996 the GNU General Public License and to point readers at the
1997 COPYING3 file and the FSF's license web page.
1998 * lang-specs.h, objc-act.c, objc-tree.def, objc-act.h,
1999 config-lang.in, objc-lang.c: Likewise.
2001 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2003 * objc-act.c (objc_get_callee_fndecl): Constify.
2004 * objc-act.h (objc_get_callee_fndecl): Likewise.
2006 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2008 * objc-act.c (volatilized_hash, volatilized_eq, string_hash,
2009 string_eq): Constify.
2011 2007-04-04 Stuart Hastings <stuart@apple.com>
2014 * objc/objc-act.c (next_sjlj_build_catch_list): Delete volatile from rethrow decl.
2016 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
2018 * Make-lang.in: Add dummy lang.install-pdf target.
2020 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
2022 * objc/objc-act.c: Fix comment typos.
2024 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
2025 Brooks Moses <brooks.moses@codesourcery.com>
2026 Lee Millward <lee.millward@codesourcery.com>
2028 * objc-act.c (receiver_is_class_object): Use new CALL_EXPR accessors.
2029 (objc_get_callee_fndecl): Likewise.
2031 2007-01-23 Andrew Pinski <pinskia@gmail.com>
2034 * objc-act.c (objc_add_static_instance): Mark the decl as
2037 2007-01-20 Andrew Pinski <pinskia@gmail.com>
2040 * objc-act.c (hash_interface): Use IDENTIFIER_HASH_VALUE instead
2041 of htab_hash_pointer.
2042 (lookup_interface): Likewise.
2043 (add_class): Likewise.
2045 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
2047 * objc-act.c (objc_build_volatilized_type): Keep track of
2049 (objc_get_protocol_qualified_type): Ditto.
2051 2006-11-02 Andreas Tobler <a.tobler@schweiz.org>
2053 * objc-act.c (objc_finish_file): Remove ifdef clause for OBJCPLUS and
2054 content where we called cp_finish_file.
2056 2006-10-23 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
2058 * objc-act.c (synth_module_prologue): Replace calls to
2059 builtin_function with add_builtin_function.
2060 (build_next_objc_exception_stuff): Replace calls to
2061 builtin_function with add_builtin_function.
2062 (build_objc_exception_stuff): Replace calls to
2063 builtin_function with add_builtin_function.
2065 2006-10-10 Brooks Moses <bmoses@stanford.edu>
2067 * Make-lang.in: Added empty "objc.pdf" target.
2069 2006-09-26 Andrew Pinski <pinskia@physics.uc.edu>
2072 * objc-act.c (objc_push_parm): If we change the type of the
2073 decl, relayout the decl.
2075 2006-09-19 Eric Christopher <echristo@apple.com>
2077 * objc-act.c (JBLEN): Rename to OBJC_JBLEN,
2078 default to something innocuous.
2079 (build_next_objc_exception_stuff): Rename JBLEN.
2081 2006-07-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2083 * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
2085 2006-07-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2088 * objc-act.c (lookup_and_install_protocols): Skip error_mark_nodes.
2090 2006-06-06 Mike Stump <mrs@apple.com>
2092 * objc-act.c: Remove prototype for objc_build_volatilized_type.
2094 2006-05-24 Mike Stump <mrs@apple.com>
2096 * objc-act.c (build_next_objc_exception_stuff): Use JBLEN instead of _JBLEN.
2098 2006-05-05 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2101 * objc-act.c (objc_is_public): Return early on invalid type.
2103 2006-03-02 Fariborz Jahanian <fjahanian@apple.com>
2105 * objc-act.c (init_module_descriptor): Remove file name from
2107 (gen_type_name_0): Fix ICE when issuing warning.
2109 2006-02-20 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
2110 * Make-lang.in (OBJC): Remove
2111 (OBJECTIVE-C): Remove
2112 (objective-c): Remove
2113 (.PHONY): Remove objective-c and ObjC
2115 2005-12-14 Andrew Pinski <pinskia@physics.uc.edu>
2118 * objc/objc-act.c (encode_type): Encode Complex types as 'j' followed
2121 2005-12-12 Andrew Pinski <pinskia@physics.uc.edu>
2124 * objc-act.c (encode_array): Handle arrays to zero sized types.
2126 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
2128 * Make-lang.in (objc.all.build, objc.install-normal): Remove.
2130 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
2132 * Make-lang.in: Remove all dependencies on s-gtype.
2134 2005-12-02 Richard Guenther <rguenther@suse.de>
2136 * objc-act.c (objc_build_exc_ptr, next_sjlj_build_enter_and_setjmp
2137 next_sjlj_build_exc_extract, next_sjlj_build_catch_list,
2138 next_sjlj_build_try_catch_finally, objc_begin_catch_clause,
2139 build_objc_method_call, objc_rewrite_function_call): Use buildN
2142 2005-10-20 Geoffrey Keating <geoffk@apple.com>
2144 * objc-act.c (synth_module_prologue): Clear TREE_NOTHROW
2145 on objc_msgSend and like builtin functions.
2147 2005-10-17 Andreas Krebbel <krebbel1@de.ibm.com>
2149 * objc-act.c (objc_build_component_ref): Adjust call to
2150 finish_class_member_access_expr due to a changed prototype.
2152 2005-08-31 Andrew Pinski <pinskia@physics.uc.edu>
2155 * objc-act.c (generate_strings): Remove and move code to
2157 (add_objc_string): here when creating a new string decl.
2158 (finish_objc): Don't call generate_strings.
2160 2005-08-31 Andrew Pinski <pinskia@physics.uc.edu>
2163 * objc-act.c (next_sjlj_build_try_catch_finally): Set
2164 TREE_SIDE_EFFECTS on catch_seq after building it.
2166 2005-08-09 Andrew Pinski <pinskia@physics.uc.edu>
2168 part of PR objc/21992
2169 * objc-act.c (handle_class_ref): The ref decl is always referenced.
2171 2005-07-20 Giovanni Bajo <giovannibajo@libero.it>
2173 Make CONSTRUCTOR use VEC to store initializers.
2174 * objc-act.c (objc_build_constructor): Use build_constructor_from_list
2175 instead of build_constructor.
2177 2005-07-08 Daniel Berlin <dberlin@dberlin.org>
2179 * objc-act.c (objc_push_parm): DECL_ARG_TYPE_AS_WRITTEN is
2181 * objc-act.h (KEYWORD_ARG_NAME): Use decl_non_common.
2182 (KEYWORD_KEY_NAME): Use decl_minimal.
2183 (METHOD_SEL_NAME): Ditto..
2184 (METHOD_SEL_ARGS): Use decl_non_common.
2185 (METHOD_ADD_ARGS): Ditto.
2186 (METHOD_ADD_ARGS_ELLIPSIS_P): Use decl_common.
2187 (METHOD_DEFINITION): Ditto.
2188 (METHOD_ENCODING): Ditto.
2189 * objc-lang.c: (objc_init_ts): New function.
2191 2005-07-07 Ziemowit Laski <zlaski@apple.com>
2193 * objc-act.c (objc_build_struct): Pass in an actual @interface
2194 instead of its name, and annotate the struct created (and all
2195 existing variants thereof) with the @interface.
2196 (objc_compare_types): Treat forward-declared ObjC classes
2197 as stand-alone (root) classes for purposes of type comparisons.
2198 (build_private_template): Move some code to objc_build_struct().
2200 2005-07-07 Ziemowit Laski <zlaski@apple.com>
2203 * objc-act.c (objc_build_string_object): For GNU-style constants,
2204 use the @interface type rather than the built-in type.
2206 2005-07-03 Kazu Hirata <kazu@codesourcery.com>
2208 * Make-lang.in (cc1plus-checksum.c): Use
2209 build/genchecksum$(build_exeext), not build/genchecksum$(exeext).
2211 2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
2213 * objc-act.c: Use %q to quote in diagnostics.
2215 2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
2217 * objc-act.c: Use '+' flag instead of %J. Use 'q' flag for
2220 2005-06-30 Ziemowit Laski <zlaski@apple.com>
2222 * objc-act.c (objc_build_volatilized_type): New function.
2223 (objc_volatilize_decl): Call objc_build_volatilized_type()
2224 instead of build_qualified_type().
2226 2005-06-29 Ziemowit Laski <zlaski@apple.com>
2228 * objc-act.c (objc_build_internal_const_str_type): New function.
2229 (check_string_class_template): Use objc_get_class_ivars() instead
2230 of TYPE_FIELDS() to retrieve ivar list.
2231 (AT_LEAST_AS_LARGE_AS): Check the size of each field's type rather
2232 than the field itself.
2233 (objc_build_string_object): Synthesize a "__builtin_ObjCString"
2234 type and use it to lay out compile-time string objects.
2235 * objc-act.h (OCTI_INTERNAL_CNST_STR_TYPE, internal_const_str_type):
2238 2005-06-28 Paul Brook <paul@codesourcery.com>
2240 * objc-act.c (objc_init_exceptions): Call
2241 default_init_unwind_resume_libfunc.
2243 2005-06-27 Ziemowit Laski <zlaski@apple.com>
2245 * objc-act.c (objc_build_struct): Save the TYPE_OBJC_INFO
2246 portion of TYPE_LANG_SPECIFIC info for all variants of
2247 a class before calling finish_struct(), and restore
2248 same TYPE_OBJC_INFO afterwards.
2250 2005-06-25 Kelley Cook <kcook@gcc.gnu.org>
2252 * all files: Update FSF address in copyright headers.
2254 2005-06-15 Joseph S. Myers <joseph@codesourcery.com>
2256 * objc-act.c (my_build_string_pointer): New.
2257 (objc_get_class_reference, get_super_receiver): Call
2258 my_build_string_pointer instead of my_build_string when building
2261 2005-05-25 Mike Stump <mrs@mrs.kithrup.com>
2263 * objc-act.c (volatilized_hash): Avoid warnings on 64-bit
2266 2005-05-24 Ziemowit Laski <zlaski@apple.com>
2268 * objc-act.c (objc_build_struct): New function.
2269 (objc_derived_from_p): Likewise.
2270 (objc_build_component_ref): Likewise.
2271 (objc_copy_binfo): Likewise.
2272 (objc_xref_basetypes): Likewise.
2273 (objc_lookup_protocol): Likewise.
2274 (objc_compare_protocols): Likewise.
2275 (objc_volatilize_decl): Likewise.
2276 (encode_aggregate_fields): Likewise.
2277 (volatilized_hash): Likewise.
2278 (volatilized_eq): Likewise.
2279 (objc_compare_types): Likewise.
2280 (objc_type_quals_match): Likewise.
2281 (DERIVED_FROM_P): New ObjC macro, corresponding to C++ macro
2283 (get_class_ivars): Add second parameter indicating if entire
2284 hierarchy is desired.
2285 (struct volatilized_type): New type.
2286 (volatilized_htab): New hash table.
2287 (objc_types_compatible_p, objc_comptypes): Remove functions.
2288 (synth_module_prologue): Do not initialize 'unused_list'.
2289 (objc_get_class_reference): Fix ObjC++ impedance mismatches.
2290 (objc_declare_alias): Implement as a typedef.
2291 (objc_substitute_decl, objc_gimplify_expr): Reformat.
2292 (objc_get_class_ivars): Adjust call to get_class_ivars().
2293 (next_sjlj_build_enter_and_setjmp, synth_forward_declarations,
2294 build_ivar_reference, get_super_receiver): Call
2295 objc_build_component_ref() instead of build_component_ref().
2296 (objc_begin_catch_clause): Use DERIVED_FROM_P() instead of
2298 (build_private_template): Call objc_build_struct() instead of
2299 start_struct() and finish_struct().
2300 (hash_init): Initialize volatilized_htab.
2301 (objc_is_public): Adjust calls to objc_get_ivars(); adjust
2302 ObjC++ impedance mismatches.
2303 (encode_aggregate_within): Streamline by calling
2304 encode_aggregate_fields().
2305 * objc-act.h (objc_types_compatible_p): Remove prototype.
2306 (OCTI_UNUSED_LIST, unused_list): Remove slot.
2307 * objc-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Remove.
2309 2005-05-18 Geoffrey Keating <geoffk@apple.com>
2311 * Make-lang.in (cc1obj-dummy): New.
2312 (cc1obj-checksum.c): New.
2313 (cc1obj-checksum.o): New.
2314 (cc1obj): Add cc1obj-checksum.o.
2316 2005-05-18 Mike Stump <mrs@apple.com>
2319 * objc-act.c (struct interface_tuple): Mark it up for GC.
2320 (interface_htab): It is really a struct interface_tuple.
2322 2005-05-17 Ziemowit Laski <zlaski@apple.com>
2323 Mike Stump <mrs@apple.com>
2325 Yet more Objective-C++...
2327 * objc-act.c (objc_finish_try_stmt): Add return value.
2328 (objc_build_synchronized): Likewise.
2330 * objc-act.c (objc_is_gcable_type): Add.
2331 (objc_substitute_decl): Add.
2332 (objc_build_ivar_assignment): Add.
2333 (objc_build_global_assignment): Add.
2334 (objc_build_strong_cast_assignment): Add.
2335 (objc_is_ivar_reference_p): Add.
2336 (objc_is_global_reference_p): Add.
2337 (objc_generate_write_barrier): Add.
2338 (objc_rewrite_function_call): Add.
2339 (objc_gimplify_expr): Add Objective-C++ support.
2340 * objc-act.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Likewise.
2341 (SIZEOF_OBJC_TYPE_LANG_SPECIFIC): Add.
2342 (INIT_TYPE_OBJC_INFO): Add Objective-C++ support.
2343 (DUP_TYPE_OBJC_INFO): Likewise.
2344 (struct imp_entry): Add field has_cxx_cdtors.
2345 (struct imp_entry *imp_list): Add OCTI_UMSG_FAST_DECL,
2346 OCTI_METH_LIST_TEMPL, OCTI_METH_PROTO_LIST_TEMPL,
2347 OCTI_IVAR_LIST_TEMPL, OCTI_ASSIGN_IVAR_DECL,
2348 OCTI_ASSIGN_IVAR_FAST_DECL, OCTI_ASSIGN_GLOBAL_DECL,
2349 OCTI_ASSIGN_STRONGCAST_DECL.
2350 (umsg_fast_decl): Add.
2351 (objc_assign_ivar_decl): Add.
2352 (objc_assign_ivar_fast_decl): Add.
2353 (objc_assign_global_decl): Add.
2354 (objc_assign_strong_cast_decl): Add.
2355 (objc_method_list_ptr): Add.
2356 (objc_method_proto_list_ptr): Add.
2357 (objc_ivar_list_ptr): Add.
2359 * objc-act.c (should_call_super_dealloc): Add.
2360 (OBJC_VERSION): Bump to 6.
2361 (objc_is_gcable_type): Add.
2362 (objc_substitute_decl): Add.
2363 (objc_build_ivar_assignment): Add.
2364 (objc_build_global_assignment): Add.
2365 (objc_build_strong_cast_assignment): Add.
2366 (objc_is_gcable_p): Add.
2367 (objc_is_ivar_reference_p): Add.
2368 (objc_is_global_reference_p): Add.
2369 (generate_shared_structures): Add flags parameter.
2370 (objc_generate_cxx_ctor_or_dtor): Add.
2371 (objc_generate_cxx_cdtors): Add.
2372 (add_class): Add name parameter.
2373 (objc_types_share_size_and_alignment): Add.
2374 (comp_proto_with_proto): Add strict parameter.
2375 (CLS_HAS_CXX_STRUCTORS): Add.
2376 (TAG_ASSIGNIVAR): Add.
2377 (TAG_ASSIGNGLOBAL): Add.
2378 (TAG_ASSIGNSTRONGCAST): Add.
2379 (TAG_MSGSEND_FAST): Add.
2380 (TAG_ASSIGNIVAR_FAST): Add.
2381 (TAG_CXX_CONSTRUCT): Add.
2382 (TAG_CXX_DESTRUCT): Add.
2383 (OBJC_LOOKUP_CLASS): Add.
2384 (OBJC_LOOKUP_NO_SUPER): Add.
2385 (objc_finish_file): Add pch support.
2386 (objc_finish_implementation): Add Objective-C++ support.
2387 (synth_module_prologue): Likewise.
2388 (synth_module_prologue): Add fast dispatching.
2389 (objc_get_class_reference): Add Objective-C++ support.
2390 (objc_generate_write_barrier): Likewise.
2391 (next_sjlj_build_enter_and_setjmp): Likewise.
2392 (objc_begin_try_stmt): Likewise.
2393 (build_next_objc_exception_stuff): Add fast ivar support.
2394 (build_private_template): Mark the record as used so debug
2395 information is generated.
2396 (build_protocol_template): Add Objective-C++ support.
2397 (objc_method_parm_type) Likewise.
2398 (objc_generate_cxx_ctor_or_dtor): Likewise.
2399 (objc_generate_cxx_cdtors): Likewise.
2400 (build_protocol_initializer): Likewise.
2401 (build_category_template): Likewise.
2402 (build_class_template): Likewise.
2403 (build_method_list_template): Likewise.
2404 (build_category_initializer): Likewise.
2405 (build_shared_structure_initializer): Likewise.
2406 (objc_finish_message_expr): Likewise.
2407 (build_objc_method_call): Add fast dispatch support.
2408 (lookup_method_static): Add support to end search at superclasses.
2409 (add_method_to_hash_list): Add strict parameter to
2410 comp_proto_with_proto.
2411 (objc_add_method): Likewise.
2412 (objc_add_method): Also set the interface_value.
2413 (add_instance_variable): Add Objective-C++ support.
2414 (objc_is_public): Likewise.
2415 (start_class): Likewise.
2416 (continue_class): Likewise.
2417 (encode_aggregate_within): Likewise.
2418 (start_method_def): Likewise.
2419 (objc_start_function): Clear current_function_returns_value
2420 and current_function_returns_null.
2421 (really_start_method): Add Objective-C++ support.
2422 (objc_finish_method_definition): Add warning for missing
2424 (finish_objc): Add Objective-C++ support.
2425 (generate_objc_image_info): Likewise.
2426 (objc_lookup_ivar): Likewise.
2427 * objc-act.h (TYPE_HAS_OBJC_INFO): Likewise.
2428 (INIT_TYPE_OBJC_INFO): Likewise.
2429 (DUP_TYPE_OBJC_INFO): Likewise.
2431 2005-04-23 DJ Delorie <dj@redhat.com>
2433 * objc-act.c: Adjust warning() callers.
2435 2005-04-21 Roger Sayle <roger@eyesopen.com>
2437 * objc-act.h (METHOD_ADD_ARGS_ELLIPSIS_P): New macro for accessing
2438 this field of an objc method decl.
2439 * objc-act.c (build_method_decl): Take an additional "ellipsis"
2440 argument, and set METHOD_ADD_ARGS_ELLIPSIS_P as appropriate.
2441 (objc_build_method_signature): Accept additional "ellipsis"
2442 argument and pass it to build_method_decl.
2443 (get_arg_type_list, start_method_def, gen_method_decl): Use
2444 the new METHOD_ADD_ARGS_ELLIPSIS_P instead of examining the
2445 TREE_OVERFLOW field of a TREE_LIST node.
2447 2005-04-20 Joseph S. Myers <joseph@codesourcery.com>
2450 * objc-act.c (objc_start_function): Create stack level for context
2451 of identifiers with variably modified type.
2453 2005-03-30 Joseph S. Myers <joseph@codesourcery.com>
2457 * objc-act.c (objc_start_function): Push context on
2458 label_context_stack.
2460 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
2462 * objc-act.c (next_sjlj_build_enter_and_setjmp,
2463 next_sjlj_build_catch_list, next_sjlj_build_try_catch_finally):
2464 Call c_common_truthvalue_conversion.
2466 2005-02-25 Joseph S. Myers <joseph@codesourcery.com>
2468 * Make-lang.in (objc/objc-parse.o-warn, objc/objc-parse.o,
2469 objc/objc-parse.c, objc/objc-parse.y): Remove
2470 (OBJC_OBJS, objc.srcextra, objc.tags, objc.mostlyclean,
2471 objc.distclean, objc.maintainer-clean): Update for new parser.
2472 * config-lang.in (gtfiles): Update for new parser.
2474 2005-01-29 Kazu Hirata <kazu@cs.umass.edu>
2476 * lang-specs.h, objc-act.c, objc-act.h, objc-lang.c: Update
2479 2005-01-27 Matt Austern <austern@apple.com>
2481 * objc-act.c (objc_finish_file): In ObjC++ mode, set at_eof before
2482 calling instantiate_pending_templates.
2484 2005-01-26 Alexander Malmberg <alexander@malmberg.org>
2487 * objc-act.c (build_selector_translation_table): Use
2488 input_location in the diagnostic for the GNU runtime or if
2489 TREE_PURPOSE (chain) is NULL.
2491 2005-01-25 Alexander Malmberg <alexander@malmberg.org>
2494 * objc-act.c (objc_types_compatible_p): New function.
2495 * objc-act.h (objc_types_compatible_p): Declare.
2496 * objc-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.
2498 2005-01-16 Ziemowit Laski <zlaski@apple.com>
2500 * objc-act.c (objc_push_parm): Call c_type_promotes_to()
2503 2005-01-15 Ziemowit Laski <zlaski@apple.com>
2506 * objc-act.c (get_arg_type_list): Decay function arguments into
2508 (objc_push_parm): Likewise; bring PARM_DECL construction closer
2509 in line with what the C front-end does.
2510 (objc_get_parm_info): Call pushdecl() and finish_decl() on
2511 each PARM_DECL, like the C front-end does.
2512 (start_method_def): Remove redundant ARRAY_TYPE decay.
2513 (objc_start_function): Bring closer in line with what the
2514 C front-end does for functions.
2516 2005-01-14 Mike Stump <mrs@apple.com>
2518 * lang-specs.h ("@objective-c"): Use cc1obj when -E is used so
2519 that -fobjc-exceptions is accepted.
2521 2004-12-30 Ziemowit Laski <zlaski@apple.com>
2524 * objc-act.c (get_arg_type_list, start_method_def): Decay
2525 array arguments into pointers.
2526 (gen_type_name_0): Learn to pretty-print array types.
2528 2004-12-15 Ziemowit Laski <zlaski@apple.com>
2530 * objc-act.c (build_private_template): Change to return 'void'; do
2531 not set ivar_context, uprivate_record or objc_instance_type.
2532 (objc_comptypes, gen_type_name_0): For types 'id' and 'Class',
2533 retrieve protocol list from the pointee rather than the pointer itself;
2534 check TYPE_HAS_OBJC_INFO(...) precondition before accessing
2535 TYPE_OBJC_PROTOCOL_LIST.
2536 (objc_get_protocol_qualified_type): For types 'id' and 'Class',
2537 construct a variant of the pointee as well as the pointer, and
2538 store protocol information in the former. When creating variants
2539 of RECORD_TYPEs, clone their TYPE_LANG_SPECIFIC fields and propagate
2540 TYPE_OBJC_INTERFACE information.
2541 (objc_declare_class): If a TYPE_DECL is looked up, retrieve the
2542 underlying RECORD_TYPE to check for presence of TYPE_OBJC_INTERFACE;
2543 for newly-created RECORD_TYPEs, create a tentative TYPE_OBJC_INTERFACE
2544 holding an IDENTIFIER_NODE.
2545 (objc_finish_message_expr): Check TYPE_HAS_OBJC_INFO(...) before
2546 accessing TYPE_OBJC_PROTOCOL_LIST; Use TYPE_OBJC_INTERFACE instead
2547 of calling lookup_interface(); allow for TYPE_OBJC_INTERFACE holding
2548 an IDENTIFIER_NODE (meaning a @class forward-declaration only).
2549 (objc_is_public): Check TYPE_OBJC_INTERFACE instead of calling
2551 (continue_class): For @implementations, set ivar_context,
2552 uprivate_record and objc_instance_type, for @interfaces, call
2553 build_private_template().
2554 (encode_pointer): Check TYPE_HAS_OBJC_INFO(...) before accessing
2555 TYPE_OBJC_INTERFACE.
2556 (objc_types_are_equivalent): Check TYPE_HAS_OBJC_INFO(...) before
2557 accessing TYPE_OBJC_PROTOCOL_LIST.
2558 * objc-act.h (OBJC_INFO_SLOT_ELTS, TYPE_OBJC_INFO, INIT_TYPE_OBJC_INFO,
2559 DUP_TYPE_OBJC_INFO, ALLOC_OBJC_TYPE_LANG_SPECIFIC,
2560 SIZEOF_OBJC_TYPE_LANG_SPECIFIC): New macros.
2561 (TYPE_OBJC_INTERFACE): Replaces TREE_STATIC_INSTANCE and now points
2562 to an actual @interface; stored in TYPE_LANG_SPECIFIC(...).
2563 (TYPE_OBJC_PROTOCOL_LIST): Replaces TYPE_PROTOCOL_LIST; stored in
2564 TYPE_LANG_SPECIFIC(...).
2565 (TREE_STATIC_INSTANCE, TYPE_PROTOCOL_LIST): Delete.
2566 (IS_ID, IS_CLASS, IS_PROTOCOL_QUALIFIED_UNTYPED, IS_SUPER,
2567 TYPED_OBJECT): Check for POINTER_TYPE rather than POINTER_TYPE_P;
2568 adjust for use of TYPE_OBJC_INTERFACE and TYPE_OBJC_PROTOCOL_LIST
2569 instead of TREE_STATIC_INSTANCE and TYPE_PROTOCOL_LIST.
2571 2004-11-29 Joseph Myers <joseph@codesourcery.com>
2574 * Make-lang.in (objc/objc-act.o): Update dependencies.
2575 * objc-act.c (objc_finish_file): Call
2576 maybe_apply_pending_pragma_weaks if not OBJCPLUS.
2578 2004-11-09 Andrew Pinski <pinskia@physics.uc.edu>
2581 * obj-act.c (encode_type): 96bits doubles are encoded the
2582 same way as 64bit and 128bit doubles are.
2584 2004-11-09 Joseph S. Myers <joseph@codesourcery.com>
2586 * objc-act.c: Use %q, %< and %> for quoting in diagnostics.
2588 2004-11-08 Andrew Pinski <pinskia@physics.uc.edu>
2591 * objc-act.c (generate_method_descriptors): Remove setting
2592 the new decls' type to variable_length_type.
2593 (generate_ivar_lists): Likewise.
2594 (generate_dispatch_tables): Likewise.
2596 2004-10-30 Ziemowit Laski <zlaski@apple.com>
2598 * objc-act.c (objc_lookup_ivar): The new OTHER parameter
2599 contains the result of the ID lookup by the C or C++
2600 front-end; in class methods, use OTHER if it exists;
2601 in instance methods, use OTHER only if it is locally
2604 2004-10-26 Ziemowit Laski <zlaski@apple.com>
2606 * objc-act.c (finish_class): Do not synthesize bogus
2607 'extern objc_object *_Foo;' declarations for @interface Foo.
2609 2004-10-25 Ziemowit Laski <zlaski@apple.com>
2610 David Ayers <d.ayers@inode.at>
2612 * objc-act.c (objc_comptypes): Use IS_PROTOCOL_QUALIFIED_UNTYPED
2613 instead of IS_PROTOCOL_QUALIFIED_ID; add comparisons for:
2614 'Class <Protocol> != id <Protocol>'; 'Class <Protocol> != <class> *';
2615 'Class <Protocol> == id' and 'Class <Protocol> == Class'.
2616 (objc_is_id): Add test for 'super'.
2617 (objc_finish_message_expr): Allow for messaging of 'Class <Proto>'
2618 receivers; if class methods are not found in protocol lists, search
2619 for instance methods therein and warn if one is found. Look in
2620 global hash tables for suitable method as a last resort when messaging
2621 'id <Proto>', 'Class <Proto>' and invalid receiver types.
2622 (objc_add_method): Insert instance methods listed in protocols into
2623 the global class method hash table.
2624 * objc-act.h (IS_PROTOCOL_QUALIFIED_ID): Rename to
2625 IS_PROTOCOL_QUALIFIED_UNTYPED and allow for 'Class <Proto>' in
2626 addition to 'id <Proto>'.
2628 2004-10-21 Andrew Pinski <pinskia@physics.uc.edu>
2631 * objc-act.c (objc_build_string_object): Create a CONST_DECL
2632 for the NeXT runtime case.
2634 2004-10-02 Kazu Hirata <kazu@cs.umass.edu>
2636 * objc-act.c: Fix comment typos.
2638 2004-09-24 Ziemowit Laski <zlaski@apple.com>
2640 * objc-act.c (init_objc_symtab, init_module_descriptor,
2641 build_shared_structure_initializer): When initializing 'long'
2642 fields, ensure that the initializer value is also 'long'.
2644 2004-09-24 Zack Weinberg <zack@codesourcery.com>
2646 * objc-act.c: Change annotate_with_locus to SET_EXPR_LOCATION
2648 (objc_init): Only set input_line to 0 #ifndef USE_MAPPED_LOCATION.
2649 (build_selector_translation_table): Use %J in diagnostic
2650 instead of diddling input_line. Fix spelling.
2652 2004-09-21 Ziemowit Laski <zlaski@apple.com>
2654 * objc-act.c (objc_fold_objc_type_ref): New function.
2655 * objc-act.h (objc_fold_objc_type_ref): New prototype.
2657 2004-09-09 Joseph S. Myers <jsm@polyomino.org.uk>
2659 * objc-act.c (objc_start_function, really_start_method,
2660 objc_get_parm_info, start_method_def): Update to new arg_info
2663 2004-09-07 Ziemowit Laski <zlaski@apple.com>
2665 * Make-lang.in (objc/objc-parse.o): Depend on $(C_COMMON_H) instead of
2667 (objc/objc-act.o): Depend on $(HASHTAB_H).
2668 * objc-act.c: Include hashtab.h; in ObjC++ mode, include cp-tree.h and
2669 objcp-decl.h instead of c-tree.h.
2670 (build_module_descriptor, get_class_ivars, synth_id_with_class_suffix,
2671 error_with_ivar, gen_method_decl, gen_declaration, setup_string_decl,
2672 build_protocol_template): Adjust prototypes.
2673 (build_module_initializer_routine, start_class, continue_class,
2674 finish_class, start_method_def, objc_start_function, start_protocol,
2675 build_method_decl, objc_add_method, add_instance_variable,
2676 build_ivar_reference, is_ivar, is_private, get_super_receiver,
2677 build_selector_table_decl, objc_push_parm, objc_get_parm_info,
2678 gen_type_name, gen_type_name_0, start_var_decl, finish_var_decl,
2679 create_field_decl): New prototypes.
2680 (objc_expand_function_end, comp_method_with_proto, objc_expr_last,
2681 gen_declaration_1, gen_declarator, is_complex_decl, adorn_decl,
2682 define_decl, create_builtin_decl, gen_declspecs): Remove prototypes.
2683 (TYPE_ID): Rename to OBJECT_TYPEDEF_NAME.
2684 (CLASS_TYPEDEF_NAME): New.
2685 (TAG_EXECCLASS): Change from a global variable to a #define.
2686 (TAG_RETURN_STRUCT): Delete.
2687 (TAG_GNUINIT): New, holds '__objc_gnu_init' name.
2688 (objc_inherit_code, objc_public_flag): New, moved from c-parse.in.
2689 (string_descriptor): New struct.
2690 (string_htab): New hash table.
2691 (string_hash, string_eq): New prototypes.
2692 (generate_struct_by_value_array): Call create_field_decl() instead of
2693 create_builtin_decl().
2694 (objc_init): Do not initialize objc_ellipsis_node or TAG_EXECCLASS;
2695 In ObjC++ mode, call cxx_init() instead of c_objc_common_init().
2696 (objc_finish_file): In ObjC++, call instantiate_pending_templates()
2697 and cp_finish_file().
2698 (define_decl, get_static_reference, get_protocol_reference,
2699 create_builtin_decl): Remove functions.
2700 (objc_start_class_interface, objc_start_category_interface,
2701 objc_start_protocol, objc_continue_interface, objc_finish_interface,
2702 objc_start_class_implementation, objc_start_category_implementation,
2703 objc_continue_implementation, objc_finish_implementation,
2704 objc_set_visibility, objc_set_method_type,
2705 objc_build_method_signature, objc_add_method_declaration,
2706 objc_start_method_definition, objc_add_instance_variable,
2707 objc_get_protocol_qualified_type, create_field_decl,
2708 start_var_decl, finish_var_decl): New functions.
2709 (setup_string_decl): Simplify since it is only called once.
2710 (synth_module_prologue): Call build_class_template(); predefine 'id'
2711 and 'Class' as typedefs; rename 'temp_type' to 'type'; disable debug
2712 hooks for duration of function; fix GNU runtime messenger signatures
2713 to correspond to reality; forward-declare '__objc_exec_class' for the
2714 GNU runtime; call build_selector_table_decl(); in ObjC++ mode, generate
2715 'extern "C" { ... }' wrappers around synthesized declarations; call
2716 build_protocol_template() and build_category_template().
2717 (string_hash, string_eq): New functions.
2718 (objc_build_string_object): Check metaclass correctness only once;
2719 store string literals in hash table.
2720 (objc_build_constructor): Do not convert initializer elements;
2721 adjust for ObjC++ impedance mismatch.
2722 (build_objc_symtab_template): Call create_field_decl() instead of
2723 create_builtin_decl().
2724 (init_objc_symtab): Add missing conversion to initializer element.
2725 (build_metadata_decl): Call start_var_decl() instead of define_decl().
2726 (generate_objc_symtab_decl): Do not call build_category_template();
2727 call start_var_decl() and finish_var_decl() instead of start_decl()
2729 (build_module_descriptor): Call create_field_decl() instead of
2730 grokfield(); call start_var_decl() and finish_var_decl() instead of
2731 start_decl() and finish_decl(); always mark module descriptor as
2732 used; move GNU runtime-specific functionality to
2733 build_module_initializer_routine().
2734 (build_module_initializer_routine): New function, broken off of
2735 build_module_descriptor().
2736 (objc_static_init_needed_p, objc_generate_static_init_call): New
2738 (generate_static_references, generate_strings,
2739 build_selector_translation_table, generate_descriptor_table,
2740 generate_ivars_list, generate_dispatch_table, generate_category): Call
2741 start_var_decl() and finish_var_decl() instead of start_decl() and
2742 finish_decl(); build a type directly instead of via groktypename().
2743 (build_selector_reference_decl, build_selector_table_decl,
2744 build_class_reference_decl, build_protocol_reference,
2745 generate_objc_image_info): Call start_var_decl() instead of
2747 (build_selector_reference): For GNU runtime, do not call
2748 build_selector_reference_decl().
2749 (build_selector, build_typed_selector_reference): Always convert
2750 result to the selector type.
2751 (add_objc_string): Cast return value to 'char *'.
2752 (build_method_prototype_template, build_selector_template,
2753 build_method_template): Use actual selector type for fields
2754 pointing to selectors.
2755 (finish_objc): For GNU runtime, call
2756 build_module_initializer_routine() after build_module_descriptor().
2757 (generate_protocol_list, generate_shared_structures): Call
2758 start_var_decl() and finish_var_decl() instead of start_decl() and
2759 finish_decl(); build a type directly instead of via
2761 (synth_id_with_class_suffix): Return a string.
2762 (get_arg_type_list): For instance methods, use the instance type for
2763 'self'; do not call groktypename_in_parm_context().
2764 (build_objc_string_decl): Squash redeclaration errors in ObjC++.
2765 (objc_is_class_name): Use OBJC_TYPE_NAME instead of TYPE_NAME;
2766 handle RECORD_TYPEs in ObjC as well as ObjC++.
2767 (objc_is_id): New function.
2768 (objc_is_object_ptr): Return the canonical type node.
2769 (objc_get_class_ivars): Simplify using get_class_ivars().
2770 (get_class_ivars): Remove second parameter; create a fresh copy
2771 of the ivar list for each call; do not check for existence of
2773 (objc_eh_runtime_type): Mark #ifndef OBJCPLUS.
2774 (objc_init_exceptions): When using SJLJ-style exceptions, require
2775 the use of '-fobjc-exceptions' flag; do not require it for DWARF-style
2777 (objc_build_exc_ptr, next_sjlj_build_try_catch_finally): Use
2778 objc_object_type instead of objc_id_type.
2779 (objc_begin_catch_clause): Convert the incoming PARM_DECL into
2780 a VAR_DECL before placing it in the appropriate scope; do not
2781 call define_decl(); adjust call to c_begin_compound_stmt();
2782 use objc_object_type instead of objc_id_type.
2783 (build_next_objc_exception_stuff): Call create_field_decl() instead
2784 of create_builtin_decl(); construct type directly instead of calling
2785 groktypename(); use OBJC_VOID_AT_END to mark end of function parameters.
2786 (build_private_template): Adjust call to get_class_ivars(); build
2787 a type directly instead of via groktypename().
2788 (build_protocol_template, build_method_prototype_list_template,
2789 build_method_prototype_template, build_category_template,
2790 build_selector_template, build_class_template, build_super_template,
2791 build_ivar_template, build_ivar_list_template,
2792 build_method_list_template, build_method_template):
2793 Call create_field_decl() instead of grokfield().
2794 (objc_method_parm_type): Do not call groktypename().
2795 (generate_descriptor_table): Call start_var_decl() and
2796 finish_var_decl() instead of start_decl() and finish_decl().
2797 (generate_method_descriptors, build_protocol_initializer,
2798 generate_dispatch_tables, build_category_initializer,
2799 build_shared_structure_initializer): Do not call groktypename().
2800 (generate_protocols): Call start_var_decl() and finish_var_decl()
2801 instead of start_decl() and finish_decl(); do not call groktypename().
2802 (error_with_ivar): Remove last parameter.
2803 (check_ivars): Do not iterate ovar CLASS_RAW_IVARS lists in addition
2804 to CLASS_IVARS lists; adjust calls to error_with_ivar().
2805 (generate_ivar_lists): Convert one of the initializer elements; do
2806 not call groktypename().
2807 (get_arg_type_list, start_method_def, gen_method_def): Account for
2808 new representation of variable arguments and '...' in Objective-C
2809 methods; add Objective-C++ impedance matching code.
2810 (is_objc_type_qualifier): Remove function.
2811 (adjust_type_for_id_default): Simplify; there is no longer a need to
2812 wade through declspecs.
2813 (lookup_interface, start_class, continue_class,
2814 finish_class, start_method_def, start_protocol, build_method_decl,
2815 objc_add_method, add_instance_variable, build_ivar_reference,
2816 is_ivar, is_private, get_super_receiver, objc_build_finally_epilogue):
2817 Make into static functions.
2818 (receiver_is_class_object): Use new IS_CLASS() macro.
2819 (objc_build_message_expr): Tweak ObjC++ message argument handling;
2820 call objc_finish_message_expr() instead of finish_message_expr().
2821 (finish_message_expr): Rename to objc_finish_message_expr(); use
2822 OBJC_TYPE_NAME and OBJC_SET_TYPE_NAME macros instead of TYPE_NAME.
2823 call gen_type_name() instead of gen_declaration(); call objc_is_id()
2824 instead of using IS_ID and IS_CLASS; Use objc_class_name instead of
2825 calling get_identifier("Class"); handle CONVERT_EXPRs in receiver.
2826 (build_objc_method_call, warn_with_method): Do not call groktypename().
2827 (build_ivar_reference): Call convert() instead of clobbering in a
2829 (hash_init): Initialize string_htab hash table.
2830 (add_instance_variable): Simplify parameter list; do not call grokfield();
2831 do not populate CLASS_IVARS list.
2832 (start_class): Check for the existence of super class, if one was specified.
2833 (continue_class): Use CLASS_RAW_IVARS rather than CLASS_IVARS; do not
2834 call build_class_template(); adjust call to get_class_ivars(); call
2835 build_decl(), pushdecl() and finish_decl() instead of define_decl().
2836 (finish_class): Call build_decl(), pushdecl() and finish_decl() instead
2838 (add_protocols): Use PROTOCOL_BINFO_ELTS for the tree vector size.
2839 (start_protocol): Do not call build_protocol_template(); use
2840 PROTOCOL_BINFO_ELTS for the tree vector size.
2841 (encode_type_qualifiers): Do not handle the 'const' qualifier here.
2842 (encode_pointer): Encode 'const char *' as 'r*', for backwards
2844 (encode_array): Use HOST_WIDE_INT_PRINT_DEC instead of "%ld".
2845 (encode_type): Handle the 'const' qualifier here.
2846 (objc_parmlist): New global variable, sued by objc_push_parm and
2847 objc_get_parm_info().
2848 (objc_push_parm, objc_get_parm_info): New functions.
2849 (objc_expr_last): Remove function.
2850 (synth_self_and_ucmd_args): For instance methods, use the instance
2851 type for 'self'; call objc_push_parm() instead of push_parm_decl().
2852 (start_method_def): Do not call push_scope(), declare_parm_level(),
2853 pop_scope(), push_parm_decl(), store_parm_decls() or objc_expr_last();
2854 just use objc_push_parm() and objc_get_parm_info().
2855 (comp_method_with_proto): Remove function.
2856 (objc_types_are_equivalent): Strip away indirections before comparing
2858 (comp_proto_with_proto): Do not call groktypename(); types are no
2859 longer in raw declspec format.
2860 (objc_start_function): New function.
2861 (really_start_method): Call comp_proto_with_proto() instead of
2862 comp_method_with_proto(); call objc_start_function() instead of
2863 hand-crafting a function declarator.
2864 (continue_method_def, objc_expand_function_end): Remove functions.
2865 (get_super_receiver): Call objc_get_current_scope() instead of
2866 get_current_scope(); reference 'super_class' field (instead of
2868 (finish_method_def): Rename to objc_finish_method_definition() and
2869 add a function decl parameter; move method encoding call from
2870 objc_expand_function_end().
2871 (is_complex_decl, adorn_decl, gen_declarator, gen_declspecs,
2872 gen_declaration_1): Remove functions.
2873 (tmpbuf, RAW_DECLSPEC): Remove.
2874 (gen_declaration): Remove second parameter; simplify to deal
2875 with TYPE_P nodes instead of raw declspecs.
2876 (gen_type_name, gen_type_name_0): New functions.
2877 (gen_method_decl): Remove second parameter; call gen_type_name()
2878 instead of gen_declaration_1().
2879 (dump_interface): Adjust calls to gen_declaration() and
2880 gen_method_decl(); do not allocate a separate string buffer.
2881 (init_objc): Allocate a larger string buffer to accommodate
2882 dump_interface(); adjust call to build_module_descriptor();
2883 add call to build_module_initializer_routine() for the GNU
2885 (generate_classref_translation_entry): Do not call start_decl(); call
2886 finish_var_decl() instead of finish_decl(); call convert() instead of
2888 * objc-act.h (CLASS_OWN_IVARS): Remove accessor.
2889 (CLASS_BINFO_ELTS): Reduce from 6 to 5, now that CLASS_OWN_IVARS is
2891 (OCTI_GNU_INIT_DECL, GNU_INIT_decl): New.
2892 (OCTI_ELLIPSIS_NODE, objc_ellipsis_node): Remove.
2893 (OCTI_ID_ID, id_type, objc_id_id): Rename to OCTI_ID_NAME,
2894 objc_object_type and objc_object_name, respectively.
2895 (OCTI_CLS_REF, OCTI_CLASS_NAME, objc_class_reference,
2896 objc_class_name): New.
2897 (IS_CLASS): New macro.
2898 (IS_ID, IS_SUPER): Robustify.
2899 (OCTI_EXECCLASS_DECL, execclass_decl): New.
2900 (finish_file, start_class, continue_class, finish_class,
2901 start_method_def, continue_method_def, finish_method_def,
2902 start_protocol, finish_protocol, objc_build_throw_stmt,
2903 objc_build_try_catch_finally_stmt, objc_build_synchronized_prologue,
2904 objc_build_synchronized_epilogue, objc_build_try_prologue,
2905 objc_build_try_epilogue, objc_build_catch_stmt, objc_build_catch_epilogue,
2906 objc_build_finally_prologue, objc_build_finally_epilogue,
2907 is_ivar, is_private, is_public, add_instance_variable, objc_add_method,
2908 get_super_receiver, objc_clear_super_receiver, get_class_ivars_from_name,
2909 get_class_reference, get_static_reference, get_object_reference,
2910 build_message_expr, finish_message_expr, build_selector_expr,
2911 build_ivar_reference, build_keyword_decl, build_method_decl,
2912 build_protocol_expr, build_objc_string_object, objc_declare_alias,
2913 objc_declare_class, objc_declare_protocols, objc_comptypes,
2914 objc_check_decl, build_encode_expr): Remove prototypes.
2915 (imp_count, cat_count): Make GGC-aware.
2916 (OBJC_SET_TYPE_NAME): New macro.
2918 2004-09-03 Ziemowit Laski <zlaski@apple.com>
2920 * config-lang.in: Update copyright notice.
2921 (lang_requires): Indicate that ObjC requires C to be built first.
2923 2004-09-01 Ziemowit Laski <zlaski@apple.com>
2925 * objc-act.c (objc_check_decl): Use OBJC_TYPE_NAME macro instead of
2927 (build_objc_string_object): Rename to objc_build_string_object().
2928 (get_class_reference): Rename to objc_get_class_reference().
2929 (get_class_ivars_from_name): Rename to objc_get_class_ivars().
2930 (next_sjlj_build_catch_list, get_super_receiver): Call
2931 objc_get_class_reference() instead of get_class_reference().
2932 (build_keyword_decl): Rename to objc_build_keyword_decl().
2933 (build_message_expr): Rename to objc_build_message_expr().
2934 (build_protocol_expr): Rename to objc_build_protocol_expr().
2935 (build_selector_expr): Rename to objc_build_selector_expr().
2936 (build_encode_expr): Rename to objc_build_encode_expr().
2937 * objc-act.h (get_class_ivars_from_name): Rename prototype to
2938 objc_get_class_ivars().
2939 (get_class_reference): Rename prototype to objc_get_class_reference().
2940 (build_message_expr): Rename prototype to objc_build_message_expr().
2941 (build_selector_expr): Rename prototype to objc_build_selector_expr().
2942 (build_keyword_decl): Rename prototype to objc_build_keyword_decl().
2943 (build_protocol_expr): Rename prototype to objc_build_prototype_expr().
2944 (build_objc_string_object): Rename prototype to
2945 objc_build_string_object().
2947 2004-09-01 Ziemowit Laski <zlaski@apple.com>
2949 * objc-act.c (lookup_interface): Make function 'static' and add a
2951 (objc_check_decl, get_class_reference, objc_declare_alias,
2952 objc_declare_class, objc_is_object_ptr): Call objc_is_class_name()
2953 instead of is_class_name().
2954 (get_super_receiver, objc_clear_super_receiver): Call
2955 objc_get_current_scope() instead of get_current_scope().
2956 (is_class_name): Rename to objc_is_class_name.
2957 (lookup_objc_ivar): Rename to objc_lookup_ivar.
2959 2004-08-28 Ziemowit Laski <zlaski@apple.com>
2961 * objc-act.c (objc_is_reserved_word): New function.
2963 2004-08-15 Ziemowit Laski <zlaski@apple.com>
2965 * Make-lang.in (objc/objc-lang.o): Depend on $(C_PRETTY_PRINT_H),
2966 $(DIAGNOSTIC_H), c-objc-common.h and gtype-objc.h, but not on toplev.h.
2967 (objc/objc-parse.o): Do not depend on gtype-objc.h.
2968 * objc-act.c: Do not include gtype-objc.h.
2969 (finish_file): Rename to objc_finish_file().
2970 * objc-act.h (finish_file): Update copyright notice; remove prototype.
2971 * objc-lang.c: Update copyright notice; include diagnostic.h,
2972 c-objc-common.h, c-pretty-print.h and gtype-objc.h; do not include
2974 (finish_file): New hook routine.
2975 (LANG_HOOKS_FINISH, LANG_HOOKS_INIT_OPTIONS,
2976 LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
2977 LANG_HOOKS_MISSING_ARGUMENT, LANG_HOOKS_POST_OPTIONS,
2978 LANG_HOOKS_GET_ALIAS_SET, LANG_HOOKS_SAFE_FROM_P,
2979 LANG_HOOKS_EXPAND_EXPR, LANG_HOOKS_MARK_ADDRESSABLE,
2980 LANG_HOOKS_PARSE_FILE, LANG_HOOKS_TRUTHVALUE_CONVERSION,
2981 LANG_HOOKS_FINISH_INCOMPLETE_DECL, LANG_HOOKS_UNSAFE_FOR_REEVAL,
2982 LANG_HOOKS_STATICP, LANG_HOOKS_SET_DECL_ASSEMBLER_NAME,
2983 LANG_HOOKS_NO_BODY_BLOCKS, LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL,
2984 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_FUNCTION_ENTER_NESTED,
2985 LANG_HOOKS_FUNCTION_LEAVE_NESTED, LANG_HOOKS_DUP_LANG_SPECIFIC_DECL,
2986 LANG_HOOKS_DECL_UNINIT, LANG_HOOKS_RTL_EXPAND_STMT,
2987 LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
2988 LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
2989 LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS,
2990 LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
2991 LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING,
2992 LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS,
2993 LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
2994 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_TYPE_FOR_MODE,
2995 LANG_HOOKS_TYPE_FOR_SIZE, LANG_HOOKS_SIGNED_TYPE,
2996 LANG_HOOKS_UNSIGNED_TYPE, LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE,
2997 LANG_HOOKS_INCOMPLETE_TYPE_ERROR, LANG_HOOKS_TYPE_PROMOTES_TO,
2998 LANG_HOOKS_REGISTER_BUILTIN_TYPE, LANG_HOOKS_WRITE_GLOBALS):
2999 Move to c-objc-common.h.
3002 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
3003 Free Software Foundation, Inc.
3005 Copying and distribution of this file, with or without modification,
3006 are permitted in any medium without royalty provided the copyright
3007 notice and this notice are preserved.