1 2010-12-02 Joseph Myers <joseph@codesourcery.com>
3 * lang-specs.h: Don't handle -ftraditional.
5 2010-12-02 Nicola Pero <nicola.pero@meta-innovation.com>
7 * objc-act.c (objc_build_throw_stmt): Return error_mark_node and
8 not NULL_TREE when a @throw is used outside of a @catch block.
10 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
12 * objc-act.c (objc_build_volatilized_type): Removed.
13 (objc_non_volatilized_type): Removed.
14 (objc_type_quals_match): Removed.
15 (local_variables_to_volatilize): New.
16 (objc_volatilize_decl): Add the decl to volatilize to
17 local_variables_to_volatilize, but don't volatilize it yet.
18 (objc_finish_function): New.
19 * objc-act.h (local_variables_to_volatilize): New.
21 2010-11-29 Nicola Pero <nicola.pero@meta-innovation.com>
22 Mike Stump <mikestump@comcast.net>
24 Allow 'make check-objc -j2'
25 * Make-lang.in (lang_checks_parallelized): New.
26 (check_objc_parallelize): New.
28 2010-11-29 Nicola Pero <nicola.pero@meta-innovation.com>
30 * objc-act.c (start_class): When a class is reimplemented,
31 generate an error and avoid adding the class to the list of
32 implemented classes again, but do not return error_mark_node.
34 2010-11-29 Nicola Pero <nicola.pero@meta-innovation.com>
36 * objc-act.c (objc_maybe_build_component_ref): Removed TODO.
38 2010-11-29 Nicola Pero <nicola.pero@meta-innovation.com>
40 * objc-act.c (objc_eh_runtime_type): Avoid ICE if error_mark_node
41 is passed as argument.
42 (objc_begin_catch_clause): Added code to deal with an
43 error_mark_node or NULL_TREE argument. Improved checks for
44 invalid arguments. Added code to traverse typedefs.
46 2010-11-29 Nicola Pero <nicola.pero@meta-innovation.com>
48 * objc-act.c (objc_demangle): Return immediately if the string is
49 too short. Detect names that do not need demangling, and return
52 2010-11-27 Nicola Pero <nicola.pero@meta-innovation.com>
54 Implemented optional properties.
55 * objc-act.h (PROPERTY_OPTIONAL): New.
56 * objc-act.c (objc_add_property_declaration): Set
57 PROPERTY_OPTIONAL if appropriate.
58 (finish_class): When generating definitions of setter and getter
59 methods associated with a property for a protocol, mark them as
60 optional if the property is optional.
61 (maybe_make_artificial_property_decl): Added 'getter_name'
62 argument. Set PROPERTY_OPTIONAL.
63 (objc_maybe_build_component_ref): Updated calls to
64 maybe_make_artificial_property_decl. Added code for optional,
66 (objc_build_class_component_ref): Updated call to
67 maybe_make_artificial_property_decl.
69 2010-11-27 Nicola Pero <nicola.pero@meta-innovation.com>
71 * objc-act.c (objc_build_struct): Fixed loops that save and
72 restore TYPE_OBJC_INFO to iterate over all variants of the type; a
73 special case for the current type is then no longer required.
74 Duplicate TYPE_LANG_SPECIFIC for each type before restoring
76 (objc_get_protocol_qualified_type): Updated comments.
78 2010-11-25 Nicola Pero <nicola.pero@meta-innovation.com>
80 * objc-act.c (objc_build_struct): Install TYPE_OBJC_INTERFACE
81 after finish_struct, not before, otherwise it may be wiped out by
82 it. This fixes spurious warnings when a class has more than 15
85 2010-11-23 Nicola Pero <nicola.pero@meta-innovation.com>
88 * lang-specs.h: Added objective-c-cpp-output. Mapped .mi to
89 objective-c-cpp-output instead of objc-cpp-output. Print a
90 deprecation note every time objc-cpp-output is requested.
92 2010-11-22 Joseph Myers <joseph@codesourcery.com>
94 * objc-act.c (write_symbols): Don't declare here.
96 2010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
99 * objc-act.c (objc_generate_write_barrier): Added assert to make sure
100 this function is only called with the next runtime.
102 2010-11-20 Jakub Jelinek <jakub@redhat.com>
105 * objc-act.c (in_late_binary_op): Remove.
107 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
109 * objc-act.c (objc_start_class_interface): Do not warn that class
110 attributes are unimplemented. Pass the attributes to start_class.
111 (objc_start_category_interface): Updated call to start_class.
112 (objc_start_class_implementation): Same change.
113 (objc_start_category_implementation): Same change.
114 (objc_build_class_component_ref): Warn if the class is deprecated.
115 (build_private_template): Mark the template as deprecated if the
117 (start_class): Added 'attributes' argument. Emit a warning if
118 using a deprecated class as superclass of a class, or original
119 class of a category. Recognize the 'deprecated' attribute when
120 starting and interface, and mark the interface with
121 TREE_DEPRECATED if present. Store attributes in the interface.
123 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
125 * objc-act.c (lookup_protocol): Added 'warn_if_deprecated'
126 argument. If it is 'true' and the protocol is deprecated, emit a
128 (objc_start_protocol): Do not warn that protocol attributes are
129 unimplemented. Pass the attributes to start_protocol.
130 (start_protocol): Added attributes argument. Recognize the
131 'deprecated' attribute and mark the protocols with TREE_DEPRECATED
132 if present. Store attributes in the protocol.
133 (objc_declare_protocols): Added 'attributes' argument. Recognize
134 the 'deprecated' attribute and mark the protocols with
135 TREE_DEPRECATED if present. Store attributes in the protocol.
136 Updated call to lookup_protocol.
137 (objc_build_protocol_expr): Updated call to lookup_protocol.
138 (check_protocol_recursively): Same change.
139 (lookup_and_install_protocols): Same change.
140 * objc-act.h: Updated comments.
142 2010-11-17 Nicola Pero <nicola.pero@meta-innovation.com>
144 * objc-act.c (lookup_method_in_protocol_list): Search methods in
145 PROTOCOL_OPTIONAL_CLS_METHODS / PROTOCOL_OPTIONAL_NST_METHODS if
146 they are not found in PROTOCOL_CLS_METHODS / PROTOCOL_NST_METHODS.
148 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
150 * objc-act.c (objc_build_setter_call): New.
151 (objc_maybe_build_modify_expr): Rewritten to build a compound
153 (objc_build_incr_expr_for_property_ref): Updated calls to
154 objc_maybe_build_modify_expr to call objc_build_setter_call
155 instead. Use build_modify_expr () instead of build2 (MODIFY_EXPR,
156 ...). Use convert () instead of build1 (NOP_EXPR, ...). Use
157 TREE_NO_WARNING on the final compound statement to silence C++
160 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
162 * objc-act.c (objc_build_incr_expr_for_property_ref): New.
163 (objc_create_temporary_var): Moved it towards the beginning of the
164 file so that objc_build_incr_expr_for_property_ref can use it.
166 2010-11-14 Nicola Pero <nicola.pero@meta-innovation.com>
168 * objc-act.c (objc_add_property_declaration): Check that the decl
169 we received from the parser is a FIELD_DECL; reject array and
170 bitfield properties. Convert the warning when a property is
171 readonly and a setter is specified into an error. Convert errors
172 when a property declaration does not match a property declaration
173 in a superclass into warnings.
174 (objc_add_synthesize_declaration_for_property): Use
175 DECL_BIT_FIELD_TYPE to determine the type of an instance variable
176 if it is a bitfield. Throw an error if we are asked to synthesize
177 setters/getters for a bitfield instance variable but the property
178 is not appropriate - it must be assign and nonatomic. If the
179 property is readonly, allow the instance variable type to be a
180 specialization of the property type.
181 (objc_type_valid_for_messaging): Fixed returning 'false' for a
182 Class qualified with a protocol when the 'accept_classes' argument
185 2010-11-13 Nicola Pero <nicola.pero@meta-innovation.com>
187 * objc-act.c (objc_get_protocol_qualified_type): detect cases
188 where we are asked to attach a protocol to something which is not
189 an Objective-C object type, and produce an error.
191 2010-11-11 Nicola Pero <nicola.pero@meta-innovation.com>
193 * objc-act.c (objc_add_property_declaration): Check that the type
194 of a property and of an inherited property match.
195 (objc_maybe_build_component_ref): Tidied up indentation and
197 (objc_common_type): Added new type of check (-5).
198 (objc_add_synthesize_declaration_for_property): Check that the
199 property to synthesize and the instance variable to use have the
202 2010-11-10 Joseph Myers <joseph@codesourcery.com>
204 * objc-act.c (objc_init): Use %' in diagnostic.
205 (objc_set_method_opt): Remove trailing '.' from diagnostic.
207 2010-11-10 Joseph Myers <joseph@codesourcery.com>
209 * objc-act.c (dump_base_name): Don't declare here.
211 2010-11-08 Nicola Pero <nicola.pero@meta-innovation.com>
213 * objc-act.c (objc_add_dynamic_declaration_for_property): Do not
214 search for the @property declation only in the current context,
215 but also in inherited properties. Do not mark the original
216 PROPERTY_DECL in the @interface or @protocol with
218 (check_methods): To check if a method is associated with a
219 @dynamic property, search for the property in IMPL_PROPERTY_DECL.
220 (check_accessible_methods): Same change.
221 * objc-act.h: Updated comment.
223 2010-11-08 Nicola Pero <nicola.pero@meta-innovation.com>
225 * objc-act.c (objc_add_synthesize_declaration_for_property):
226 Iterate over IMPL_PROPERTY_DECL, not CLASS_PROPERTY_DECL, when
227 checking for an existing @synthesize or @dynamic declaration.
228 Search for an inherited @property declaration if none is found in
229 the local interface. If the required instance variable does not
230 exist, return instead of trying to continue to prevent a compiler
231 crash later. Check that the instance variable is not already
232 being used by another @synthesize.
233 (objc_add_dynamic_declaration_for_property): Iterate over
234 IMPL_PROPERTY_DECL, not CLASS_PROPERTY_DECL, when checking for an
235 existing @synthesize or @dynamic declaration.
236 (objc_synthesize_getter): Search for the getter declaration in
237 protocols and superclasses as well.
238 (objc_synthesize_setter): Search for the setter declaration in
239 protocols and superclasses as well.
241 2010-11-08 Nicola Pero <nicola.pero@meta-innovation.com>
243 * objc-act.c (lookup_property): When checking categories, also
244 check the protocols attached to each.
245 (objc_add_property_declaration): Determine the
246 PROPERTY_SETTER_NAME and PROPERTY_GETTER_NAME here. Tidied up
247 error message. Search for an existing property declaration with
248 the same name which would be inherited from the class hiearchy,
249 and produce an error if it has incompatible attributes.
250 (check_methods): Changed second parameter. If the method is a
251 getter or setter for a property, do not warn if it is inherited as
252 opposed to implemented directly in the class.
253 (check_protocol): Updated calls to check_methods.
254 (finish_class): Do not determine the PROPERTY_SETTER_NAME and
255 PROPERTY_GETTER_NAME here; this is now done earlier, in
256 objc_add_property_declaration.
257 * objc-act.h (CLASS_NAME, CLASS_SUPER_NAME): Added comments.
259 2010-11-06 Nicola Pero <nicola.pero@meta-innovation.com>
261 Fixed using the Objective-C 2.0 dot-syntax with self and super.
262 * objc-act.c (OBJC_LOOKUP_NO_INSTANCE_METHODS_OF_ROOT_CLASS): New.
263 (maybe_make_artificial_property_decl): Added 'implementation'
264 argument. Use OBJC_LOOKUP_NO_INSTANCE_METHODS_OF_ROOT_CLASS when
265 looking up getters or setters for a class. If an implementation
266 is specified, search it as well for a getter or setter.
267 (objc_maybe_build_component_ref): Updated calls to
268 maybe_make_artificial_property_decl; added code to deal with
269 'self' and 'super' and with methods declared locally in the
270 implementation. Store the getter call expression in the
271 PROPERTY_REF instead of throwing it away.
272 (objc_build_class_component_ref): Updated calls to
273 maybe_make_artificial_property_decl, and store the getter call
274 expression in PROPERTY_REF instead of throwing it away.
275 (lookup_method_static): Implemented
276 OBJC_LOOKUP_NO_INSTANCE_METHODS_OF_ROOT_CLASS option.
277 (objc_gimplify_property_ref): Do not build the getter method call
278 here; instead use the one stored in the PROPERTY_REF. If it's not
279 there, produce helpful error messages.
280 * objc-tree.def (PROPERTY_REF): Increased the number of operands
281 from 2 to 3. Updated comments.
282 * objc-act.h (PROPERTY_REF_GETTER_CALL): New.
284 2010-11-06 Iain Sandoe <iains@gcc.gnu.org>
287 * objc-act.c (objc_build_string_object): Amend for renamed hook.
288 (objc_string_ref_type_p): New.
289 (objc_check_format_arg): New.
291 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
293 Fixed using the Objective-C 2.0 dot-syntax with class names.
294 * objc-act.c (objc_build_class_component_ref): New.
296 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
298 * objc-act.c (objc_add_dynamic_declaration): Allow @dynamic in a
300 (objc_type_valid_for_messaging): Added 'accept_classes' argument;
301 if set to 'true', return 'true' for Class objects. Do not remove
302 more than on pointer indirection.
303 (objc_add_property_declaration): Only warn about 'assign'
304 semantics for Objective-C objects if warn_property_assign_default;
305 and do not warn if the property is readonly or if the type is a Class.
306 (objc_finish_foreach_loop): Updated calls to
307 objc_type_valid_for_messaging.
309 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
311 Implemented -fobjc-std=objc1 flag.
312 * objc-act.c (objc_start_class_interface): If attributes are
313 specified when flag_objc1_only is set, print an error.
314 (objc_start_category_interface): Same change.
315 (objc_start_protocol): Same change.
316 (objc_add_method_declaration): Same change.
317 (objc_start_method_definition): Same change.
318 (objc_build_keyword_decl): Same change.
319 (objc_set_visibility): If OBJC_IVAR_VIS_PACKAGE is used when
320 flag_objc1_set is set, print an error.
321 (objc_set_method_opt): If flag_objc1_only is set, print an error.
322 (objc_add_property_declaration): Same change.
323 (objc_add_synthesize_declaration): Same change.
324 (objc_add_dynamic_declaration): Same change.
325 (objc_finish_foreach_loop): Same change.
326 (objc_maybe_build_component_ref): If flag_objc1_only is set,
329 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
331 * objc-act.c (maybe_make_artificial_property_decl): New.
332 (objc_maybe_build_component_ref): Call
333 maybe_make_artificial_property_decl if a property can not be
334 found. Do not call objc_finish_message_expr if
335 PROPERTY_HAS_NO_GETTER.
336 * objc-act.h Updated comments.
337 (PROPERTY_HAS_NO_GETTER): New.
338 (PROPERTY_HAS_NO_SETTER): New.
339 * objc-tree.def: Updated comment.
341 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
343 Implemented format and noreturn attributes for Objective-C methods.
344 * objc-act.c (objc_start_method_definition): If method attributes
345 are specified emit a warning and ignore them.
346 (build_objc_method_call): Moved deprecation warnings from here ...
347 (objc_finish_message_expr): to here. Do not emit deprecation
348 warnings if the receiver is of type 'id'.
349 (really_start_method): Install 'deprecation' and 'noreturn'
351 (objc_decl_method_attributes): Carefully filter out the list of
352 attributes, allowing only "noreturn", "format", "sentinel" and
353 "deprecated". In the case of "format", adjust the arguments.
354 Always process the attributes in the same way no matter if
355 "sentinel" is in the list or not.
357 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
359 * objc-act.c (objc_maybe_build_component_ref): Warn about using
360 deprecated properties.
361 (objc_maybe_printable_name): Support PROPERTY_DECL.
363 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
365 Implemented Objective-C 2.0 property accessors.
366 * objc-act.h (enum objc_tree_index): Added OCTI_GET_PROPERTY_DECL,
367 OCTI_SET_PROPERTY_DECL, OCTI_COPY_STRUCT_DECL,
368 OCTI_GET_PROPERTY_STRUCT_DECL and OCTI_SET_PROPERTY_STRUCT_DECL.
369 (objc_getProperty_decl): New.
370 (objc_setProperty_decl): New.
371 (objc_copyStruct_decl): New.
372 (objc_getPropertyStruct_decl): New.
373 (objc_setPropertyStruct_decl): New.
374 * objc-act.c (build_objc_property_accessor_helpers): New.
375 (synth_module_prologue): Call
376 build_objc_property_accessor_helpers.
378 (objc_synthesize_getter): Implemented synthesizing getters that
379 work with properties that are not nonatomic, assign properties.
380 (objc_synthesize_setter): Implemented synthesizing setters that
381 work with properties that are not nonatomic, assign properties.
383 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
385 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
386 * objc-tree.def (PROPERTY_REF): New.
387 * objc-act.h: Added comments for all the PROPERTY_ macros.
388 (PROPERTY_NAME): Use DECL_NAME.
389 (PROPERTY_COPIES): Removed.
390 (PROPERTY_READONLY): Use DECL_LANG_FLAG_0 for it.
391 (PROPERTY_NONATOMIC): New.
392 (objc_property_assign_semantics): Make it a typedef.
393 (PROPERTY_ASSIGN_SEMANTICS): New.
394 (PROPERTY_DYNAMIC): New.
395 (PROPERTY_REF_OBJECT): New.
396 (PROPERTY_REF_PROPERTY_DECL): New.
397 * objc-act.c (CALL_EXPR_OBJC_PROPERTY_GETTER): Removed.
398 (in_objc_property_setter_name_context): Removed.
399 (objc_add_property_declaration): Removed copies and ivar arguments
400 and code supporting them. Fixed recovering when readonly and
401 setter attributes are specified. Removed support for @property in
402 @implementation context. Updated error message. Double-check
403 that a property does not have a DECL_INITIAL. Validate the
404 property assign semantics and emit appropriate errors and
405 warnings. Check for duplicate property declarations. Set
406 DECL_SOURCE_LOCATION, TREE_DEPRECATED, PROPERTY_NONATOMIC,
407 PROPERTY_ASSIGN_SEMANTICS and PROPERTY_DYNAMIC of the new
408 PROPERTY_DECL. Do not set PROPERTY_COPIES. Set
409 PROPERTY_IVAR_NAME to NULL_TREE.
410 (objc_build_getter_call): Renamed to
411 objc_maybe_build_component_ref. If the property is not found in
412 the interface, search in the protocol list. Do not generate the
413 getter call; instead, build and return a PROPERTY_REF.
414 (objc_is_property_ref): New.
415 (objc_setter_func_call): Removed.
416 (get_selector_from_reference): Removed.
417 (is_property): Removed.
418 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
419 Updated to work on a PROPERTY_REF and use the PROPERTY_DECL from
420 the PROPERTY_REF. Generate an error if the property is read-only.
421 (build_property_reference): Removed.
422 (objc_finish_message_expr): Removed check to produce "readonly
423 property can not be set" error when
424 in_objc_property_setter_name_context. We now generate the error
425 earlier, in objc_maybe_build_modify_expr, which will only generate
426 the setter call if the property is readwrite.
427 (check_methods): Recognize dynamic properties.
428 (check_methods_accessible): Same change.
429 (objc_build_property_ivar_name): Removed.
430 (objc_build_property_setter_name): Dropped bool argument. Always
431 add the ':' at the end.
432 (objc_gen_one_property_datum): Removed.
433 (objc_process_getter_setter): Removed.
434 (objc_synthesize_getter): Mark 'klass' argument as unused. Use
435 PROPERTY_GETTER_NAME instead of PROPERTY_NAME. Set the
436 DECL_SOURCE_LOCATION of the new method to be the same as the one
437 for the @synthesize. Always use PROPERTY_IVAR_NAME as it is
438 instead of trying to guess what it should be. Removed use of
439 CLASS_IVARS. Use the location of @synthesize for c_finish_return
440 and c_end_compound_statement.
441 (objc_synthesize_setter): Mark 'klass' argument as unused. Use
442 PROPERTY_SETTER_NAME instead of trying to guess what it should be.
443 Set the DECL_SOURCE_LOCATION of the new method to be the same as
444 the one for the @synthesize. Always use PROPERTY_IVAR_NAME as it
445 is instead of trying to guess what it should be. Removed use of
446 CLASS_IVARS. Use the location of @synthesize for c_finish_return
447 and c_end_compound_statement. Emit an error and keep going,
448 instead of aborting, if the setter prototype does not have the
450 (objc_add_synthesize_declaration_for_property): New.
451 (objc_add_synthesize_declaration): Removed ATTRIBUTE_UNUSED from
452 all arguments. Improved error message. Filled in the rest of the
453 function, which used to be a placeholder, with an actual
455 (objc_add_dynamic_declaration_for_property): New.
456 (objc_add_dynamic_declaration): Removed ATTRIBUTE_UNUSED from all
457 arguments. Improved error message. Filled in the rest of the
458 function, which used to be a placeholder, with an actual
460 (objc_gen_property_data): Rewritten.
461 (finish_class): Added explicit switch cases for
462 CLASS_INTERFACE_TYPE, CATEGORY_INTERFACE_TYPE and
463 PROTOCOL_INTERFACE_TYPE. Added a default switch case which is
464 gcc_unreachable. Rewritten the processing of properties, in
465 particular to not synthesize prototypes for getters and setters if
466 they already exist and to install the getter and setter names into
467 PROPERTY_GETTER_NAME and PROPERTY_SETTER_NAME. Do not generate
468 warnings about setter, getter and ivar property attributes.
469 (objc_lookup_ivar): Removed support for properties.
470 (objc_gimplify_property_ref): New.
471 (objc_gimplify_expr): Use a switch. In case of a PROPERTY_REF, call
472 objc_gimplify_property_ref.
474 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
476 * objc-act.c (objc_add_property_declaration): Added arguments to
477 pass the various property attributes that were parsed with the
478 property declaration. Process arguments to determine the final
479 property attributes and produce error messages as appropriate.
480 Added temporary code to keep the compiler silent about variables
481 set but not used - for new attributes that are only checked but
483 (property_readonly): Removed.
484 (property_setter): Removed.
485 (property_getter): Removed.
486 (property_ivar): Removed.
487 (property_copies): Removed.
488 (objc_set_property_attr): Removed.
489 * objc-act.h (enum property_assign_semantics): New.
491 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
493 * objc-act.c (objc_add_property_variable): Renamed to
494 objc_add_property_declaration. Added location argument. Updated
495 warnings and errors to use it. Use error, not fatal_error, if a
496 property declaration is found outside an interface or
497 implementation context.
499 2010-10-24 Nicola Pero <nicola.pero@meta-innovation.com>
501 * objc-act.c (objc_build_keyword_decl): Updated comments. Do not
502 emit a warning that method parameter attributes are unimplemented.
503 Instead, store them into DECL_ATTRIBUTES of the KEYWORD_DECL.
504 (start_method_def): Copy attributes from each KEYWORD_DECL into
505 the corresponding PARM_DECL.
506 (objc_warn_deprecated_use): Removed.
507 (build_objc_method_call): Call warn_deprecated_use, not
508 objc_warn_deprecated_use.
509 (objc_maybe_printable_name): Do not try to get the identifier name
510 of DECLs that we don't recognize. Immediately return NULL for them.
511 (objc_printable_name): Removed C++-specific case, which is no
512 longer used. Updated comments.
514 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
516 * objc-act.c (OBJC_GEN_METHOD_LABEL): Updated comments.
517 (objc_demangle): Return NULL if demangling can not be done because
518 the string to demangle is not an Objective-C mangled method name.
519 Be smarter in demangling method names so that at least for methods
520 with no arguments we are able to almost always demangle '_' correctly.
522 (objc_maybe_printable_name): New.
523 (objc_printable_name): Call objc_maybe_printable_name. If it
524 returns NULL, call cxx_printable_name in Objective-C++.
526 2010-10-21 Iain Sandoe <iains@gcc.gnu.org>
528 Based on the CFString implementation in FSF apple/trunk branch.
530 * objc/objc-act.c (objc_build_string_object): Handle CFStrings.
532 2010-10-21 Nicola Pero <nicola.pero@meta-innovation.com>
534 * objc-act.c (get_objc_string_decl): Use a switch instead of a
535 chain of ifs. Use gcc_unreachable instead of abort.
536 (add_objc_string): Same change.
537 (generate_protocol_list): Same change - twice.
538 (synth_id_with_class_suffix): Same change.
539 (build_keyword_selector): Same change - twice.
540 (objc_build_message_expr): Same change.
541 (objc_build_selector_expr): Same change.
542 (check_methods): Same change - and added missing gcc_unreachable
544 (check_methods_accessible): Same change - twice, and added missing
545 gcc_unreachable for default case in one of them.
546 (start_class): Same change - and added missing gcc_unreachable for
548 (continue_class): Same change.
549 (objc_gen_property_data): Same change.
550 (finish_class): Same change.
551 (encode_type_qualifiers): Added missing gcc_unreachable.
552 (encode_type): Small code tidy up to reduce duplicated code. Use
553 gcc_unreachable instead of abort - twice.
554 (encode_gnu_bitfield): Use a switch instead of a chain of ifs -
555 twice. Added missing gcc_unreachable for default case - twice.
556 (dump_interface): Use a switch instead of a chain of ifs.
557 (handle_impent): Same change.
559 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
561 * objc-act.h (objc_inherit_code): Removed.
562 * objc-act.c (objc_inherit_code): Removed.
563 (objc_set_method_type): Removed.
564 (objc_build_method_signature): Added is_class_method argument.
565 Use it instead of the global objc_inherit_code variable.
566 (objc_add_method_declaration): Same change.
567 (objc_start_method_definition): Same change.
568 (objc_generate_cxx_ctor_or_dtor): Updated call to
569 objc_start_method_definition. Do not call objc_set_method_type.
570 (adjust_type_for_id_default): Mark as inline.
571 (objc_synthesize_getter): Updated call to
572 objc_start_method_definition. Do not set objc_inherit_code.
573 (objc_synthesize_setter): Updated call to
574 objc_start_method_definition. Do not set objc_inherit_code.
576 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
578 Merge from 'apple/trunk' branch on FSF servers. Obvious updates
579 to gcc_alloc_xxx calls in hash_init and hash_class_name_enter to
580 get it to compile in the current trunk.
582 2006-01-27 Fariborz Jahanian <fjahanian@apple.com>
585 * objc/objc-act.c (hash_class_name_enter): New.
586 (hash_class_name_lookup): New.
587 (objc_declare_alias): Enter alias name into hash table.
588 (objc_declare_class): Enter class name into hash table.
589 (objc_is_class_name): Do a hash look up of class name.
590 (hash_init): Initialize the two new hash tables.
591 * objc-act.h: Added cls_name_hash_list and als_name_hash_list
592 declarations, removed class_chain and alias_chain.
594 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
596 * objc-lang.c (finish_file): Removed.
597 * objc-act.c (objc_finish_file): Renamed to
598 objc_write_global_declarations. Do not try to instantiate C++
599 templates when compiling Objective-C++ as this is now
600 automatically done before this function is called. Do not check
601 for syntax-only run or PCH generation as this is done by the
603 * objc-act.h (objc_finish_file): Removed.
605 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
607 Implemented parsing @synthesize and @dynamic for
608 Objective-C/Objective-C++.
609 * objc-act.c (objc_add_synthesize_declaration): New.
610 (objc_add_dynamic_declaration): New.
612 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
614 * objc-act.c (lookup_and_install_protocols): Return NULL if passed
617 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
619 Merge from 'apple/trunk' branch on FSF servers.
621 2006-03-10 Fariborz Jahanian <fjahanian@apple.com>
624 * objc/objc-act.c (objc_is_class_name): template parameter is not
625 an objective class name.
626 (objc_generate_cxx_cdtors): Check for the null
627 objc_implementation_context.
629 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
631 Merge from 'apple/trunk' branch on FSF servers.
633 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
636 * objc/objc-act.c (objc_non_volatilized_type): New
638 2005-10-07 Fariborz Jahanian <fjahanian@apple.com>
641 * objc-act.c (objc_build_volatilized_type): Build 'volatilzed'
642 types with proper attribute set and correctly.
643 (objc_volatilize_decl): Remove unneeded code.
644 (objc_type_quals_match): Use the new attribute to check on
646 (hash_init): removed unneeded code.
648 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
650 Merge from 'apple/trunk' branch on FSF servers.
652 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
655 * objc-act.c (objc_diagnose_private_ivar): New.
657 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
659 * objc-act.c: Rename 'objc_public_flag' to objc_ivar_visibility and
660 make its type 'objc_ivar_visibility_kind'.
661 (objc_start_class_interface): Update to use visibility enum.
662 (objc_start_class_implementation): Likewise.
663 (objc_set_visibility): Update to use visibility enum, warn that
664 @package is handle as per @public.
665 (add_instance_variable): Handle OBJC_IVAR_VIS_PACKAGE.
666 * objc-act.h: Rename 'objc_public_flag' to objc_ivar_visibility and
667 make its type 'objc_ivar_visibility_kind'.
669 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
671 merge from FSF apple 'trunk' branch.
672 2006 Fariborz Jahanian <fjahanian@apple.com>
674 Radars 4436866, 4505126, 4506903, 4517826
675 * objc-act.c (CALL_EXPR_OBJC_PROPERTY_GETTER): New.
676 property_readonly, property_getter, property_setter, property_ivar,
677 property_copies, in_objc_property_setter_name_context: New vars.
678 (objc_set_property_attr): New.
679 (objc_add_property_variable): New.
680 (lookup_property_in_list): New.
681 (lookup_property): New.
682 (objc_build_getter_call): New.
683 (objc_setter_func_call): New.
684 (get_selector_from_reference): New.
685 (objc_build_setter_call): New.
687 (build_property_reference): New.
688 (objc_finish_message_expr): Detect readonly property and warn.
689 (objc_build_property_ivar_name): New.
690 (objc_build_property_setter_name): New.
691 (objc_gen_one_property_datum): New.
692 (objc_process_getter_setter): New.
693 (objc_synthesize_getter): New.
694 (objc_synthesize_setter): New.
695 (objc_gen_property_data): New.
696 (finish_class): Generate property data.
697 (comp_proto_with_proto): Separated from ...
698 (match_proto_with_proto): ... New.
699 (objc_lookup_ivar): Handle properties.
700 * objc-tree.def (PROPERTY_DECL): New tree code.
701 * objc-act.h: CLASS_LANG_SLOT_ELTS, PROTOCOL_LANG_SLOT_ELTS update size.
702 (METHOD_PROPERTY_CONTEXT): New.
703 (PROPERTY_NAME): New.
704 (PROPERTY_GETTER_NAME): New.
705 (PROPERTY_SETTER_NAME): New.
706 (PROPERTY_IVAR_NAME): New.
707 (PROPERTY_READONLY): New.
708 (PROPERTY_COPIES): New.
709 (TOTAL_CLASS_RAW_IVARS): New.
710 (CLASS_PROPERTY_DECL): New.
711 (IMPL_PROPERTY_DECL): New.
712 * objc-lang.c (objc_init_ts): Update fields for property_decl.
714 2010-10-13 Richard Henderson <rth@redhat.com>
716 * objc-act.c (objc_eh_personality): Update call to
717 build_personality_function.
719 2010-10-13 Iain Sandoe <iains@gcc.gnu.org>
721 merge from FSF apple 'trunk' branch.
723 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
724 Radar 3803157 (method attributes)
725 * objc/objc-act.h (METHOD_TYPE_ATTRIBUTES): New macro.
726 * objc/objc-act.c (objc_decl_method_attributes): New.
727 (objc_add_method_declaration): Process method's attribute.
728 (objc_start_method_definition): Ditto.
729 (build_objc_method_call): Inject method attribute into
731 (objc_method_decl): New.
732 (objc_warn_deprecated)use): New.
734 2010-10-07 Andi Kleen <ak@linux.intel.com>
736 * Make-lang.in (cc1obj-dummy): Remove.
737 (cc1obj-checksum): Change to run checksum over object files
740 2010-10-07 Nicola Pero <nicola.pero@meta-innovation.com>
743 * objc-act.c (objc_finish_foreach_loop): Convert return value of
744 countByEnumeratingWithState:objects:count: to long unsigned int.
746 2010-10-07 Iain Sandoe <iains@gcc.gnu.org>
748 * objc-act.c (build_objc_method_call): Replace calls to
749 build_function_call () with the VEC equivalent. Construct parameter
752 2010-10-07 Iain Sandoe <iains@gcc.gnu.org>
754 * objc-act.c (objc_build_message_expr): Call mark_exp_read () to
755 signal that the receiver has been used.
757 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
759 * README: Obsolete file removed.
761 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
763 Implemented fast enumeration for Objective-C.
764 * objc-act.c (build_fast_enumeration_state_template): New.
765 (TAG_ENUMERATION_MUTATION): New.
766 (TAG_FAST_ENUMERATION_STATE): New.
767 (synth_module_prologue): Call build_fast_enumeration_state_template() and set up
768 objc_enumeration_mutation_decl.
769 (objc_create_temporary_var): Allow providing a name to temporary
771 (objc_build_exc_ptr): Updated calls to
772 objc_create_temporary_var().
773 (next_sjlj_build_try_catch_finally): Same change.
774 (objc_finish_foreach_loop): New.
775 * objc-act.h: Added OCTI_FAST_ENUM_STATE_TEMP,
776 OCTI_ENUM_MUTATION_DECL, objc_fast_enumeration_state_template,
777 objc_enumeration_mutation_decl.
779 Merge from 'apple/trunk' branch on FSF servers.
781 2006-04-12 Fariborz Jahanian <fjahanian@apple.com>
784 * objc-act.c (objc_type_valid_for_messaging): New routine to check
785 for valid objc object types.
786 (objc_finish_foreach_loop): Check for invalid objc objects in
789 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
791 Merge from 'apple/trunk' branch on FSF servers.
793 2005-10-17 Fariborz Jahanian <fjahanian@apple.com>
796 * objc-act.c (objc_start_method_definition): Check for
797 error_mark_node for the selector name and make a quick exit.
799 2010-10-04 Andi Kleen <ak@linux.intel.com>
801 * Make-lang.in (cc1obj-dummy, cc1obj): Add + to build rule.
803 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
805 merge from FSF 'apple/trunk' branch.
806 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
809 * objc/objc-act.c (objc_set_method_opt): New function.
810 (objc_start_protocol, objc_finish_interface): Reset
811 objc_method_optional_flag flag.
812 (objc_add_method_declaration): Pass on the new
813 flag to objc_add_method.
814 (objc_add_method): Add optional methods to new chain in
816 * objc/objc-act.h (CLASS_OPTIONAL_CLS_METHODS,
817 CLASS_OPTIONAL_NST_METHODS): New macros accessing a protocol
818 class's optional method chains.
820 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
822 Merge from 'apple/trunk' branch on FSF servers.
824 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
827 * objc-act.c (objc_declare_class): Pick the right
830 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
832 Merge from 'apple/trunk' branch on FSF servers.
834 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
837 * objc-act.c (objc_check_global_decl): New
839 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
841 * objc-act.c (objc_is_reserved_word): Removed.
843 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
845 * objc-act.c (objc_add_method_declaration): Handle and ignore
847 (objc_start_method_definition): Likewise.
848 (objc_generate_cxx_ctor_or_dtor): Pass NULL attributes to ctor/dtor.
849 (objc_build_keyword_decl): Handle and ignore attributes.
851 2010-09-28 Richard Henderson <rth@redhat.com>
853 * objc-act.c (objc_eh_personality): Use targetm.except_unwind_info.
855 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
857 * objc-act.c (objc_start_class_interface): Handle and ignore attributes.
858 (objc_start_category_interface): Likewise.
859 (objc_start_protocol): Likewise.
861 2010-09-28 Nicola Pero <nicola.pero@meta-innovation.com>
863 Merge from 'apple/trunk' branch on FSF servers.
865 2005-08-23 Stuart Hastings <stuart@apple.com>
866 Ziemowit Laski <zlaski@apple.com>
869 * objc-act.c (objc_decay_parm_type): New function.
870 (get_arg_type_list): Decay types for all named arguments.
871 (objc_push_parm): Rebuild the PARM_DECL if its type has
874 2010-09-28 Nicola Pero <nicola.pero@meta-innovation.com>
876 * objc-act.c (encode_type): Fixed encoding enums with the next
879 2010-09-28 Nicola Pero <nicola.pero@meta-innovation.com>
881 Merge from 'apple/trunk' branch on FSF servers.
883 2005-07-18 Ziemowit Laski <zlaski@apple.com>
886 * objc-act.c (objc_compare_types): A new silent comparison
887 mode (-4), differing from regular comparison (-3) in that
888 'false' is returned instead of issuing warnings.
890 2010-09-28 Nicola Pero <nicola.pero@meta-innovation.com>
892 * objc-act.c (encode_type): Do not add 'r' with the next runtime.
893 (encode_aggregate_within): Reorganized code to be more readable.
894 (encode_aggregate_fields): Updated second argument to be 'bool'
897 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
902 * objc-act.c: Improved comments for encoding functions.
903 (encode_aggregate_within): For the GNU runtime, rewritten some
904 obsfuscated code to clarify the various cases.
905 (encode_aggregate): Function removed.
906 (encode_array): Generate an error if asked to encode an incomplete
907 array as part of generating instance variables. Else, when
908 encoding an incomplete array inside a structure, encode it as an
910 (encode_pointer): For the GNU runtime, fixed encoding 'BOOL *' as
912 (encode_gnu_bitfield): Encode enumerated types exactly in the same
913 type as integer types instead of using a hardcoded 'i'. If asked
914 to encode a non-integer type as a bitfield, do not abort
915 compilation immediately; instead generate an error, then skip the
917 (encode_type): Use a 'switch' instead of a sequence of 'if's.
918 Added a 'default' clause that gets executed if the type can not be
919 matched, and that encodes it as '?' (unknown) and produces a
920 warning. For the GNU runtime, encode enumerated types exactly in
921 the same way as integer types instead of using a hardcoded 'i'.
922 Encode long double as 'D'. Encode 128-bit integers as 'T' or 't'.
923 Encode C++ reference types as pointers. Call encode_vector to
925 (encode_vector): New function.
927 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
929 Merge from 'apple/trunk' branch on FSF servers. I modified the
930 changes to be used only when compiling for the NeXT runtime.
932 2005-10-10 Fariborz Jahanian <fjahanian@apple.com>
936 * objc-act.c (encode_type): Remove the hack.
938 2005-07-20 Ziemowit Laski <zlaski@apple.com>
941 * objc-act.c (pointee_is_readonly): New function.
942 (encode_pointer, encode_aggregate_within, encode_type):
943 Attempt to emulate GCC 3.3 when generating type encodings.
945 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
947 Merge from 'apple/trunk' branch on FSF servers.
949 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
952 * objc-act.c (objc_have_common_types): New function.
954 2005-06-22 Ziemowit Laski <zlaski@apple.com>
957 * objc-act.c (objc_common_type): New function.
959 2010-09-27 Richard Guenther <rguenther@suse.de>
961 * objc-act.c (objc_get_class_reference): Use CP_TYPE_CONTEXT.
962 (objc_is_global_reference_p): Use DECL_FILE_SCOPE_P.
964 2010-09-26 Nicola Pero <nicola.pero@meta-innovation.com>
966 * objc-act.c: Removed historical, obsolete comment at the top of
969 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
972 * objc-act.c (objc_start_method_definition): Do not abort upon a
973 'method definition not in @implementation context' error. Return
976 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
979 * objc-act.c (objc_get_interface_ivars): New function.
980 (objc_collecting_ivars): New variable.
981 (continue_class): Set and reset objc_collecting_ivars for context.
983 2010-09-15 Nicola Pero <nicola.pero@meta-innovation.com>
985 Merge from 'apple/trunk' branch on FSF servers.
987 2006-03-09 Fariborz Jahanian <fjahanian@apple.com>
990 * objc/objc-act.c (objc_finish_message_expr): Look for message in
991 @class's protocol list.
993 2006-02-07 Fariborz Jahanian <fjahanian@apple.com>
996 * objc/objc-act.c (objc_start_method_definition): Initialize
997 break/continue labels.
999 2005-08-22 Ziemowit Laski <zlaski@apple.com>
1002 * objc-act.c (objc_compare_types): Compare function
1003 pointers; indicate success if the right-hand side has
1004 a return type that is covariant, and the argument types
1005 contravariant, with those of the left side.
1007 2005-08-22 Ziemowit Laski <zlaski@apple.com>
1010 * objc-act.c (objc_get_protocol_qualified_type): When looking
1011 at a typedef, retrieve the precise type it describes (rather
1012 than merely looking up a class by name).
1014 2010-09-10 Nicola Pero <nicola.pero@meta-innovation.com>
1016 * objc/objc-act.c (objc_begin_try_stmt): Generate an error if
1017 -fobjc-exceptions was not used. (objc_build_throw_stmt): Same
1020 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
1022 * objc-act.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
1024 2010-07-10 Iain Sandoe <iains@gcc.gnu.org>
1027 * objc-act.c: build_objc_string_decl() remove declaration.
1028 (finish_var_decl): Remove forcing of var output and marking
1030 (init_def_list): Use integer_zero_node.
1031 (init_objc_symtab): Use integer_zero_node, make the short
1032 integer type specific on relevant nodes.
1033 (generate_objc_symtab_decl): Remove call to
1034 forward_declare_categories(). Use null_pointer_node where
1036 (build_module_descriptor): Comment and mark this item as
1038 (generate_static_references): Use gcc_unreachable instead of
1040 (diagnose_missing_method): New.
1041 (build_next_selector_translation_table): New.
1042 (build_gnu_selector_translation_table): New.
1043 (add_objc_string): Merge code from build_objc_string_decl...
1044 ... and delete build_objc_string_decl().
1045 (generate_dispatch_table): Make integer types explicit.
1046 (generate_category): Pass implent and arrange for the data
1047 to be extracted within the routine. Do not start new vars,
1048 but finish the ones collcted during parsing.
1049 (generate_shared_structures): Likewise.
1050 (finish_objc): Reorder code so that we finish variables before
1051 referencing them. Save the global data before calling meta-data
1052 creation routines, and pass the current reference to the two
1053 main routines. Only call generate_objc_image_info () for the
1055 (generate_classref_translation_entry): Comment on and make this
1056 item DECL_PRESERVE_P.
1057 (handle_class_ref): Use varpool interfaces, comment on and make
1058 this item DECL_PRESERVE_P.
1059 (handle_impent): Likewise.
1060 (generate_objc_image_info): Only generate when the content is
1061 non-zero. Make integer types explict.
1063 2010-07-03 Nathan Froyd <froydnj@codesourcery.com>
1066 * objc-act.c (build_sized_array_type): New function.
1067 (add_objc_string): Use it.
1068 (generate_protocol_list): Likewise.
1069 (generate_objc_image_info): Likewise.
1070 (add_field_decl): New function.
1071 (objc_build_struct): Use a VEC rather than building a TREE_LIST.
1072 (generate_struct_by_value_array): Use add_field_decl.
1073 (build_objc_symtab_template): Likewise.
1074 (build_module_descriptor): Likewise.
1075 (build_objc_exception_stuff): Likewise.
1076 (build_protocol_template): Likewise.
1077 (build_method_prototype_list_template): Likewise.
1078 (build_method_prototype_template): Likewise.
1079 (build_category_template): Likewise.
1080 (build_selector_template): Likewise.
1081 (build_class_template): Likewise.
1082 (build_super_template): Likewise.
1083 (build_ivar_template): Likewise.
1084 (build_ivar_list_template): Likewise.
1085 (build_method_list_template): Likewise.
1086 (build_method_template): Likewise.
1088 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
1090 * objc-act.c: Do not include except.h.
1092 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
1094 * objc-act.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Use typed GC
1097 * objc-act.c (objc_volatilize_decl): Likewise.
1098 (objc_build_string_object): Likewise.
1099 (hash_init): Likewise.
1100 (hash_enter): Likewise.
1101 (hash_add_attr): Likewise.
1102 (add_class): Likewise.
1103 (start_class): Likewise.
1105 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
1107 * objc-act.c: Update include path for moved files.
1108 * objc-lang.c: Likewise.
1109 * config-lang.in: Update paths in gtfiles for files in c-family/.
1111 2010-06-01 Nathan Froyd <froydnj@codesourcery.com>
1113 * objc-act.c (build_next_objc_exception_stuff): Give setjmp a
1114 varargs type instead of a zero-argument type.
1116 2010-05-30 Nathan Froyd <froydnj@codesourcery.com>
1118 * objc-act.c (synth_module_prologue): Use build_function_type_list
1119 instead of build_function_type.
1120 (build_module_initializer_routine): Likewise.
1121 (build_next_objc_exception_stuff): Likewise.
1122 (build_objc_exception_stuff): Likewise.
1124 2010-05-27 Joseph Myers <joseph@codesourcery.com>
1126 * objc-act.c: Include diagnostic-core.h instead of diagnostic.h.
1127 * Make-lang.in (objc/objc-act.o): Update dependencies.
1129 2010-05-25 Steven Bosscher <steven@gcc.gnu.org>
1131 * objc-act.h: Do not include gimple.h.
1132 * objc-act.c: Do not include rtl.h, expr.h, libfuncs.h, and tm_p.h.
1133 Include gimple.h. Explain why except.h has to be included.
1134 * objc-lang.c: Do not include diagnostics.h.
1135 * Make-lang.in: Update dependencies.
1137 2010-05-25 Nathan Froyd <froydnj@codesourcery.com>
1139 * objc-act.c (objc_build_constructor): Adjust OBJCPLUS impedance
1140 mismatch code for VECs.
1142 2010-05-25 Nathan Froyd <froydnj@codesourcery.com>
1144 * objc-act.c (objc_build_constructor): Take a VEC instead of a tree.
1145 Use build_constructor instead of build_constructor_from_list.
1146 (objc_build_string_object): Build a VEC argument for
1147 objc_build_constructor.
1148 (init_def_list): Likewise.
1149 (init_objc_symtab): Likewise.
1150 (init_module_descriptor): Likewise.
1151 (generate_static_references): Likewise.
1152 (build_selector_translation_table): Likewise.
1153 (build_descriptor_table_initializer): Likewise.
1154 (generate_descriptor_table): Likewise.
1155 (build_protocol_initializer): Likewise.
1156 (build_ivar_list_initializer): Likewise.
1157 (generate_ivars_list): Likewise.
1158 (build_dispatch_table_initializer): Likewise.
1159 (generate_dispatch_table): Likewise.
1160 (generate_protocol_list): Likewise.
1161 (build_category_initializer): Likewise.
1162 (build_shared_structure_initializer): Likewise.
1163 (generate_objc_image_info): Likewise.
1165 2010-04-30 Iain Sandoe <iains@gcc.gnu.org>
1168 * objc-act.c (encode_aggregate_within): Encode structure tags
1169 with template args for ObjC++.
1171 2010-04-30 Steven Bosscher <steven@gcc.gnu.org>
1173 * objc-act.c: Do not include varray.h.
1175 2010-04-07 Jakub Jelinek <jakub@redhat.com>
1178 * objc-act.c (finish_var_decl, objc_begin_catch_clause,
1179 really_start_method, get_super_receiver, handle_class_ref): Set
1180 DECL_READ_P in addition to TREE_USED.
1182 2010-04-07 Iain Sandoe <iains@gcc.gnu.org>
1185 * objc-act.c (objc_init): Warn that -fobjc-gc is ignored for
1186 -fgnu-runtime and set flag_objc_gc to zero.
1188 2010-04-07 Iain Sandoe <iains@gcc.gnu.org>
1191 * objc-act.c (build_module_initializer_routine): Make the argument
1192 to objc_start_function NULL_TREE when compiling ObjC++.
1194 2010-02-18 Iain Sandoe <iain.sandoe@sandoe-acoustics.co.uk>
1195 Mike Stump <mikestump@comcast.net>
1198 * objc-act.c (finish_var_decl): Set the generated symbols as "used".
1200 2009-12-17 Shujing Zhao <pearly.zhao@oracle.com>
1202 * objc-act.c (objc_substitute_decl, build_ivar_reference,
1203 get_super_receiver): Update build_indirect_ref calls.
1205 2009-11-28 Jakub Jelinek <jakub@redhat.com>
1207 * objc-act.c (generate_shared_structures): Remove unused sc_spec and
1208 decl_specs variables.
1209 (objc_build_message_expr): Remove unused loc variable.
1210 (objc_finish_message_expr): Remove unused saved_rtype variable.
1211 (encode_field_decl): Remove unused type variable.
1214 * objc-act.c (objc_build_struct): INIT_TYPE_OBJC_INFO for
1215 type variants that don't have it initialized yet.
1217 2009-09-14 Jan Hubicka <jh@suse.cz>
1219 * objc-act.c (objc_add_static_instance): Do not set DECL_COMMON.
1221 2009-09-14 Richard Henderson <rth@redhat.com>
1223 * objc-act.c (objc_init_exceptions): Don't call
1224 default_init_unwind_resume_libfunc.
1225 (objc_build_exc_ptr): Use __builtin_eh_pointer.
1227 2009-09-13 Richard Guenther <rguenther@suse.de>
1228 Rafael Avila de Espindola <espindola@google.com>
1230 * objc-act.c (objc_eh_runtime_type): Export.
1231 (objc_init_exceptions): Remove. Move warning code ...
1232 (objc_begin_try_stmt): ... here
1233 (objc_build_throw_stmt): ... and here.
1234 (objc_eh_personality_decl): New.
1235 (objc_eh_personality): New function.
1236 * objc-act.h (objc_eh_runtime_type): Declare.
1237 (objc_eh_personality): Likewise.
1238 * objc-lang.c (LANG_HOOKS_EH_RUNTIME_TYPE): Define.
1239 (LANG_HOOKS_EH_PERSONALITY): Likewise.
1241 2009-09-03 Diego Novillo <dnovillo@google.com>
1243 * objc-lang.c (lang_hooks): Remove const qualifier.
1245 2009-08-20 Richard Guenther <rguenther@suse.de>
1247 * objc-act.c: Include c-lang.h
1248 * Make-lang.in (objc/objc-act.o): Add c-lang.h dependency.
1250 2009-07-17 Aldy Hernandez <aldyh@redhat.com>
1251 Manuel López-Ibáñez <manu@gcc.gnu.org>
1254 * objc-act.c: Add location argument to all calls to
1255 build_fold_addr_expr.
1257 2009-07-14 Taras Glek <tglek@mozilla.com>
1258 Rafael Espindola <espindola@google.com>
1260 * Make-lang.in (objc.install-plugin): New target for
1261 installing plugin headers.
1263 2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
1265 * objc-act.c (next_sjlj_build_catch_list): Replace EXPR_LOCUS by
1268 2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
1270 * objc-act.c: Replace %J by an explicit location. Update all
1273 2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
1275 * objc-act.c: Replace %H by an explicit location. Update all
1278 2009-06-22 Steven Bosscher <steven@gcc.gnu.org>
1281 * objc-act.c (objc_build_message_args): Return if ARGS is the
1284 2009-06-19 Ian Lance Taylor <iant@google.com>
1286 * objc-act.c (objc_in_struct, objc_struct_types): Remove.
1287 (objc_struct_info): New static variable.
1288 (objc_start_struct): Pass &objc_struct_info, not &objc_in_struct
1289 and &objc_struct_types, to start_struct.
1290 (objc_finish_struct): Likewise for finish_struct.
1292 2009-06-15 Ian Lance Taylor <iant@google.com>
1294 * objc-act.c (objc_start_function): Don't set
1295 label_context_stack_se or label_context_stack_vm.
1297 2009-06-12 Aldy Hernandez <aldyh@redhat.com>
1299 * objc-act.c (finish_var_decl): Pass location to finish_decl.
1300 (objc_get_parm_info): Same.
1301 (get_super_receiver): Same.
1302 * objc-act.c (objc_build_component_ref): Pass location to
1304 (build_module_initializer_routine): Pass location to
1305 c_end_compound_stmt.
1306 (objc_generate_static_init_call): Pass location to build_stmt.
1307 (build_typed_selector_reference): New location argument.
1308 (build_selector_reference): Same.
1309 (objc_substitute_decl): Pass location to build_array_ref.
1310 (next_sjlj_build_try_catch_finally): Pass location to build_stmt.
1311 (objc_begin_catch_clause): Same.
1312 (objc_finish_try_stmt): Same.
1313 (objc_finish_catch_clause): Pass location to c_end_compound_stmt.
1314 (objc_build_throw_stmt): New argument.
1315 (generate_shared_structures): Pass location to build_c_cast.
1316 (objc_build_message_expr): Use local location.
1317 (objc_finish_message_expr): Use input_location.
1318 (build_objc_method_call): New argument.
1319 (objc_build_selector_expr): Same.
1320 (get_super_receiver): Pass location to build_c_cast,
1321 build_modify_expr, build_compound_expr.
1322 * objc-act.c: Add location to all calls to start_struct, build_decl,
1325 2009-06-09 Ian Lance Taylor <iant@google.com>
1327 * objc-act.c (objc_gimplify_expr): Change return type to int.
1328 * objc-act.h: Update declaration.
1330 2009-06-08 Alexandre Oliva <aoliva@redhat.com>
1332 * objc-act.c (objc_init): Skip print_struct_values during
1333 -fcompare-debug-second.
1335 2009-06-03 Ian Lance Taylor <iant@google.com>
1337 * Make-lang.in (cc1obj-checksum.o): Depend upon $(CONFIG_H) and
1340 2009-05-27 Ian Lance Taylor <iant@google.com>
1342 * Make-lang.in (cc1obj-dummy$(exeext)): Change $(COMPILER) to
1344 (cc1obj$(exeext)): Likewise.
1346 2009-05-26 Ian Lance Taylor <iant@google.com>
1348 * Make-lang.in (cc1obj-dummy$(exeext)): Use $(COMPILER).
1349 (cc1obj$(exeext)): Likewise.
1351 2009-05-20 Ian Lance Taylor <iant@google.com>
1353 * objc-act.c (objc_generate_cxx_ctor_or_dtor): Pass NULL rather
1354 than NULL_TREE to build_special_member_call.
1356 2009-05-10 Ian Lance Taylor <iant@google.com>
1358 * objc-act.c (objc_building_struct): New static variable.
1359 (objc_in_struct, objc_struct_types): New static variables.
1360 (objc_start_struct, objc_finish_struct): New static functions.
1361 (generate_struct_by_value_array): Call objc_start_struct instead
1362 of start_struct, and call objc_finish_struct instead of
1364 (objc_build_struct, build_objc_symtab_template): Likewise.
1365 (build_module_descriptor): Likewise.
1366 (build_next_objc_exception_stuff): Likewise.
1367 (build_protocol_template): Likewise.
1368 (build_method_prototype_list_template): Likewise.
1369 (build_method_prototype_template): Likewise.
1370 (build_category_template, build_selector_template): Likewise.
1371 (build_class_template, build_super_template): Likewise.
1372 (build_ivar_template, build_ivar_list_template): Likewise.
1373 (build_method_list_template): Likewise.
1374 (build_method_template): Likewise.
1376 2009-05-10 Joseph Myers <joseph@codesourcery.com>
1378 * objc-act.c: Include intl.h.
1379 (objc_lookup_protocol): Use complete sentences for diagnostics
1380 with %qE for identifiers and translating results of
1381 gen_type_name_0 to locale character set.
1382 (objc_check_decl, check_protocol_recursively,
1383 lookup_and_install_protocols, objc_build_string_object,
1384 objc_get_class_reference, objc_declare_alias, objc_declare_class,
1385 objc_get_class_ivars, error_with_ivar, check_duplicates,
1386 objc_finish_message_expr, objc_build_protocol_expr,
1387 objc_build_selector_expr, build_ivar_reference, objc_add_method,
1388 add_category, add_instance_variable, objc_is_public,
1389 check_methods, check_methods_accessible, check_protocol,
1390 start_class, finish_class, start_protocol, really_start_method,
1391 get_super_receiver, objc_lookup_ivar): Use %E and %qE for
1392 identifiers in diagnostics. Translate generated text to locale
1393 character set as needed.
1394 (check_protocol, check_protocols): Change name parameter to type
1396 (lang_report_error_function): Remove.
1398 2009-04-27 Ian Lance Taylor <iant@google.com>
1400 * objc-act.c (objc_gimplify_expr): Add casts to enum type.
1402 2009-04-24 Ian Lance Taylor <iant@google.com>
1404 * objc-act.c (get_super_receiver): Update calls to
1405 build_modify_expr to pass new argument.
1407 2009-04-21 Taras Glek <tglek@mozilla.com>
1409 * objc-act.c: Update GTY annotations to new syntax
1410 * objc-act.h: Likewise
1412 2009-04-21 Joseph Myers <joseph@codesourcery.com>
1414 * ChangeLog: Add copyright and license notices.
1416 2009-04-20 Ian Lance Taylor <iant@google.com>
1418 * objc-act.c (objc_rewrite_function_call): Change parameter from
1419 params to first_param. Change all callers.
1421 2009-03-30 Dominique d'Humieres <dominiq@lps.ens.fr>
1424 * objc-act.c (in_late_binary_op): Define for Objective-C++.
1426 2009-03-29 Joseph Myers <joseph@codesourcery.com>
1434 * objc-act.c (objc_finish_try_stmt): Set in_late_binary_op.
1436 2008-12-05 Sebastian Pop <sebastian.pop@amd.com>
1439 * Make-lang.in (cc1obj-dummy, cc1obj): Add BACKENDLIBS,
1442 2008-10-06 Aldy Hernandez <aldyh@redhat.com>
1444 * objc-act.c (objc_build_string_object): Pass location to
1446 (init_def_list): Same.
1447 (init_objc_symtab): Same.
1448 (init_module_descriptor): Same.
1449 (build_module_initializer_routine): Same.
1450 (generate_static_references): Same.
1451 (build_typed_selector_reference): Same.
1452 (add_objc_string): Same.
1453 (objc_substitute_decl): Same.
1454 (objc_build_ivar_assignment): Same.
1455 (objc_build_global_assignment): Same.
1456 (objc_build_strong_cast_assignment): Same.
1457 (generate_protocols): Same.
1458 (build_protocol_initializer): Same.
1459 (build_dispatch_table_initializer): Same.
1460 (generate_protocol_list): Same.
1461 (build_category_initializer): Same.
1462 (build_shared_structure_initializer): Same.
1463 (generate_shared_structures): Same.
1464 (objc_build_protocol_expr): Same.
1465 (build_ivar_reference): Same.
1466 (get_super_receiver): Same.
1468 2008-09-23 Aldy Hernandez <aldyh@redhat.com>
1470 * objc-act.c (next_sjlj_build_enter_and_setjmp): Call
1471 c_common_truthvalue_conversion with location.
1472 (next_sjlj_build_catch_list): Same.
1473 (next_sjlj_build_try_catch_finally): Same.
1475 2008-09-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
1478 * objc-lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): Don't define.
1479 * objc-act.h (objc_get_callee_fndecl): Remove prototype.
1480 * objc-act.c (objc_get_callee_fndecl): Kill.
1482 2008-09-17 Jan Hubicka <jh@suse.cz>
1485 * objc/objc-act.c (objc_finish_method_definition): Do not set
1488 2008-09-01 Aldy Hernandez <aldyh@redhat.com>
1490 * objc-act.c (build_typed_selector_reference): Pass input_location to
1491 build_unary_op calls.
1492 (build_selector_reference): Same, but to build_array_ref.
1493 (objc_substitute_decl): Same.
1494 (build_ivar_reference): Same, but to build_indirect_ref.
1495 (get_super_receiver): Same.
1497 2008-07-28 Richard Guenther <rguenther@suse.de>
1499 Merge from gimple-tuples-branch.
1501 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
1503 * Make-lang.in (objc-lang.o): Depend on GIMPLE_H.
1504 (objc-act.o): Rename TREE_GIMPLE_H to GIMPLE_H.
1505 * objc-act.h: Include gimple.h instead of tree-gimple.h.
1506 * ipa-reference.c: Same.
1508 2007-11-10 Aldy Hernandez <aldyh@redhat.com>
1510 * objc-act.c (objc_gimplify_expr): Change pre and post to sequences.
1511 * objc-act.h (objc_gimplify_expr): Change prototype accordingly.
1513 2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1515 * objc-act.c: Fix comment typos.
1517 2008-07-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1519 * objc-act.c (objc_start_class_interface,
1520 objc_start_category_interface, objc_start_class_implementation,
1521 objc_start_category_implementation, objc_build_struct,
1522 generate_static_references, build_private_template,
1523 lookup_category, objc_add_method, add_category,
1524 add_instance_variable, objc_is_public, conforms_to_protocol,
1525 start_class, continue_class, finish_class): Avoid C++ keywords.
1527 2008-07-14 Jason Merrill <jason@redhat.com>
1530 * objc-act.c (objc_build_constructor): Update C++ tweak.
1532 2007-07-14 Rafael Ávila de Espíndola <espindola@google.com>
1534 * objc-act.c (synth_module_prologue): Use TREE_NO_WARNING instead
1535 of DECL_IN_SYSTEM_HEADER.
1537 2008-07-11 Ian Lance Taylor <iant@google.com>
1539 * objc-act.c (objc_is_reserved_word): Always check for RID_CLASS,
1540 etc., not just when OBJCPLUS is defined.
1542 2008-06-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1544 * objc-act.c (setup_string_decl, objc_build_string_object,
1545 hash_interface, eq_interface, objc_begin_try_stmt,
1546 encode_method_prototype, build_ivar_list_initializer,
1547 objc_build_encode_expr): Fix for -Wc++-compat.
1549 2008-05-12 Tomas Bily <tbily@suse.cz>
1551 * objc-act.c (objc_generate_write_barrier, objc_finish_message_expr):
1554 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1556 * objc-act.c (objc_build_string_object): Don't set TREE_INVARIANT.
1558 2008-04-03 Tom Tromey <tromey@redhat.com>
1560 * Make-lang.in (objc_OBJS): New variable.
1562 2008-03-27 Tom Tromey <tromey@redhat.com>
1564 * Make-lang.in: Revert automatic dependency patch.
1566 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
1569 * objc-act.c (objc_build_component_ref): Fix call to
1570 finish_class_member_access_expr.
1571 (objc_generate_cxx_ctor_or_dtor): Fix call to
1572 build_special_member_call.
1574 2008-03-25 Andrew Pinski <pinskia@gmail.com>
1577 * objc-act.c (encode_type): Handle when type is error_mark_node.
1578 (objc_push_parm): Handle when the type of parm is error_mark_node.
1580 2008-03-25 Tom Tromey <tromey@redhat.com>
1582 * Make-lang.in (objc_OBJS): New variable.
1583 (cc1obj-checksum.o, objc/objc-lang.o, objc/objc-act.o): Remove.
1585 2008-03-21 Andreas Tobler <a.tobler@schweiz.org>
1588 * objc-act.c (objc_generate_cxx_ctor_or_dtor): Rename IS_AGGR_TYPE to
1590 (objc_generate_cxx_cdtors): Likewise.
1591 (add_instance_variable): Likewise.
1593 2008-02-26 Tom Tromey <tromey@redhat.com>
1595 * objc-act.c (objc_init): Remove old location code.
1597 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1600 * Make-lang.in (cc1obj-dummy, cc1obj): Add $(GMPLIBS).
1602 2007-07-30 Nick Clifton <nickc@redhat.com>
1604 * Make-lang.in: Change copyright header to refer to version 3 of
1605 the GNU General Public License and to point readers at the
1606 COPYING3 file and the FSF's license web page.
1607 * lang-specs.h, objc-act.c, objc-tree.def, objc-act.h,
1608 config-lang.in, objc-lang.c: Likewise.
1610 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1612 * objc-act.c (objc_get_callee_fndecl): Constify.
1613 * objc-act.h (objc_get_callee_fndecl): Likewise.
1615 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1617 * objc-act.c (volatilized_hash, volatilized_eq, string_hash,
1618 string_eq): Constify.
1620 2007-04-04 Stuart Hastings <stuart@apple.com>
1623 * objc/objc-act.c (next_sjlj_build_catch_list): Delete volatile from rethrow decl.
1625 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
1627 * Make-lang.in: Add dummy lang.install-pdf target.
1629 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
1631 * objc/objc-act.c: Fix comment typos.
1633 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
1634 Brooks Moses <brooks.moses@codesourcery.com>
1635 Lee Millward <lee.millward@codesourcery.com>
1637 * objc-act.c (receiver_is_class_object): Use new CALL_EXPR accessors.
1638 (objc_get_callee_fndecl): Likewise.
1640 2007-01-23 Andrew Pinski <pinskia@gmail.com>
1643 * objc-act.c (objc_add_static_instance): Mark the decl as
1646 2007-01-20 Andrew Pinski <pinskia@gmail.com>
1649 * objc-act.c (hash_interface): Use IDENTIFIER_HASH_VALUE instead
1650 of htab_hash_pointer.
1651 (lookup_interface): Likewise.
1652 (add_class): Likewise.
1654 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
1656 * objc-act.c (objc_build_volatilized_type): Keep track of
1658 (objc_get_protocol_qualified_type): Ditto.
1660 2006-11-02 Andreas Tobler <a.tobler@schweiz.org>
1662 * objc-act.c (objc_finish_file): Remove ifdef clause for OBJCPLUS and
1663 content where we called cp_finish_file.
1665 2006-10-23 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
1667 * objc-act.c (synth_module_prologue): Replace calls to
1668 builtin_function with add_builtin_function.
1669 (build_next_objc_exception_stuff): Replace calls to
1670 builtin_function with add_builtin_function.
1671 (build_objc_exception_stuff): Replace calls to
1672 builtin_function with add_builtin_function.
1674 2006-10-10 Brooks Moses <bmoses@stanford.edu>
1676 * Make-lang.in: Added empty "objc.pdf" target.
1678 2006-09-26 Andrew Pinski <pinskia@physics.uc.edu>
1681 * objc-act.c (objc_push_parm): If we change the type of the
1682 decl, relayout the decl.
1684 2006-09-19 Eric Christopher <echristo@apple.com>
1686 * objc-act.c (JBLEN): Rename to OBJC_JBLEN,
1687 default to something innocuous.
1688 (build_next_objc_exception_stuff): Rename JBLEN.
1690 2006-07-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1692 * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
1694 2006-07-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1697 * objc-act.c (lookup_and_install_protocols): Skip error_mark_nodes.
1699 2006-06-06 Mike Stump <mrs@apple.com>
1701 * objc-act.c: Remove prototype for objc_build_volatilized_type.
1703 2006-05-24 Mike Stump <mrs@apple.com>
1705 * objc-act.c (build_next_objc_exception_stuff): Use JBLEN instead of _JBLEN.
1707 2006-05-05 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1710 * objc-act.c (objc_is_public): Return early on invalid type.
1712 2006-03-02 Fariborz Jahanian <fjahanian@apple.com>
1714 * objc-act.c (init_module_descriptor): Remove file name from
1716 (gen_type_name_0): Fix ICE when issuing warning.
1718 2006-02-20 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
1719 * Make-lang.in (OBJC): Remove
1720 (OBJECTIVE-C): Remove
1721 (objective-c): Remove
1722 (.PHONY): Remove objective-c and ObjC
1724 2005-12-14 Andrew Pinski <pinskia@physics.uc.edu>
1727 * objc/objc-act.c (encode_type): Encode Complex types as 'j' followed
1730 2005-12-12 Andrew Pinski <pinskia@physics.uc.edu>
1733 * objc-act.c (encode_array): Handle arrays to zero sized types.
1735 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
1737 * Make-lang.in (objc.all.build, objc.install-normal): Remove.
1739 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
1741 * Make-lang.in: Remove all dependencies on s-gtype.
1743 2005-12-02 Richard Guenther <rguenther@suse.de>
1745 * objc-act.c (objc_build_exc_ptr, next_sjlj_build_enter_and_setjmp
1746 next_sjlj_build_exc_extract, next_sjlj_build_catch_list,
1747 next_sjlj_build_try_catch_finally, objc_begin_catch_clause,
1748 build_objc_method_call, objc_rewrite_function_call): Use buildN
1751 2005-10-20 Geoffrey Keating <geoffk@apple.com>
1753 * objc-act.c (synth_module_prologue): Clear TREE_NOTHROW
1754 on objc_msgSend and like builtin functions.
1756 2005-10-17 Andreas Krebbel <krebbel1@de.ibm.com>
1758 * objc-act.c (objc_build_component_ref): Adjust call to
1759 finish_class_member_access_expr due to a changed prototype.
1761 2005-08-31 Andrew Pinski <pinskia@physics.uc.edu>
1764 * objc-act.c (generate_strings): Remove and move code to
1766 (add_objc_string): here when creating a new string decl.
1767 (finish_objc): Don't call generate_strings.
1769 2005-08-31 Andrew Pinski <pinskia@physics.uc.edu>
1772 * objc-act.c (next_sjlj_build_try_catch_finally): Set
1773 TREE_SIDE_EFFECTS on catch_seq after building it.
1775 2005-08-09 Andrew Pinski <pinskia@physics.uc.edu>
1777 part of PR objc/21992
1778 * objc-act.c (handle_class_ref): The ref decl is always referenced.
1780 2005-07-20 Giovanni Bajo <giovannibajo@libero.it>
1782 Make CONSTRUCTOR use VEC to store initializers.
1783 * objc-act.c (objc_build_constructor): Use build_constructor_from_list
1784 instead of build_constructor.
1786 2005-07-08 Daniel Berlin <dberlin@dberlin.org>
1788 * objc-act.c (objc_push_parm): DECL_ARG_TYPE_AS_WRITTEN is
1790 * objc-act.h (KEYWORD_ARG_NAME): Use decl_non_common.
1791 (KEYWORD_KEY_NAME): Use decl_minimal.
1792 (METHOD_SEL_NAME): Ditto..
1793 (METHOD_SEL_ARGS): Use decl_non_common.
1794 (METHOD_ADD_ARGS): Ditto.
1795 (METHOD_ADD_ARGS_ELLIPSIS_P): Use decl_common.
1796 (METHOD_DEFINITION): Ditto.
1797 (METHOD_ENCODING): Ditto.
1798 * objc-lang.c: (objc_init_ts): New function.
1800 2005-07-07 Ziemowit Laski <zlaski@apple.com>
1802 * objc-act.c (objc_build_struct): Pass in an actual @interface
1803 instead of its name, and annotate the struct created (and all
1804 existing variants thereof) with the @interface.
1805 (objc_compare_types): Treat forward-declared ObjC classes
1806 as stand-alone (root) classes for purposes of type comparisons.
1807 (build_private_template): Move some code to objc_build_struct().
1809 2005-07-07 Ziemowit Laski <zlaski@apple.com>
1812 * objc-act.c (objc_build_string_object): For GNU-style constants,
1813 use the @interface type rather than the built-in type.
1815 2005-07-03 Kazu Hirata <kazu@codesourcery.com>
1817 * Make-lang.in (cc1plus-checksum.c): Use
1818 build/genchecksum$(build_exeext), not build/genchecksum$(exeext).
1820 2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
1822 * objc-act.c: Use %q to quote in diagnostics.
1824 2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
1826 * objc-act.c: Use '+' flag instead of %J. Use 'q' flag for
1829 2005-06-30 Ziemowit Laski <zlaski@apple.com>
1831 * objc-act.c (objc_build_volatilized_type): New function.
1832 (objc_volatilize_decl): Call objc_build_volatilized_type()
1833 instead of build_qualified_type().
1835 2005-06-29 Ziemowit Laski <zlaski@apple.com>
1837 * objc-act.c (objc_build_internal_const_str_type): New function.
1838 (check_string_class_template): Use objc_get_class_ivars() instead
1839 of TYPE_FIELDS() to retrieve ivar list.
1840 (AT_LEAST_AS_LARGE_AS): Check the size of each field's type rather
1841 than the field itself.
1842 (objc_build_string_object): Synthesize a "__builtin_ObjCString"
1843 type and use it to lay out compile-time string objects.
1844 * objc-act.h (OCTI_INTERNAL_CNST_STR_TYPE, internal_const_str_type):
1847 2005-06-28 Paul Brook <paul@codesourcery.com>
1849 * objc-act.c (objc_init_exceptions): Call
1850 default_init_unwind_resume_libfunc.
1852 2005-06-27 Ziemowit Laski <zlaski@apple.com>
1854 * objc-act.c (objc_build_struct): Save the TYPE_OBJC_INFO
1855 portion of TYPE_LANG_SPECIFIC info for all variants of
1856 a class before calling finish_struct(), and restore
1857 same TYPE_OBJC_INFO afterwards.
1859 2005-06-25 Kelley Cook <kcook@gcc.gnu.org>
1861 * all files: Update FSF address in copyright headers.
1863 2005-06-15 Joseph S. Myers <joseph@codesourcery.com>
1865 * objc-act.c (my_build_string_pointer): New.
1866 (objc_get_class_reference, get_super_receiver): Call
1867 my_build_string_pointer instead of my_build_string when building
1870 2005-05-25 Mike Stump <mrs@mrs.kithrup.com>
1872 * objc-act.c (volatilized_hash): Avoid warnings on 64-bit
1875 2005-05-24 Ziemowit Laski <zlaski@apple.com>
1877 * objc-act.c (objc_build_struct): New function.
1878 (objc_derived_from_p): Likewise.
1879 (objc_build_component_ref): Likewise.
1880 (objc_copy_binfo): Likewise.
1881 (objc_xref_basetypes): Likewise.
1882 (objc_lookup_protocol): Likewise.
1883 (objc_compare_protocols): Likewise.
1884 (objc_volatilize_decl): Likewise.
1885 (encode_aggregate_fields): Likewise.
1886 (volatilized_hash): Likewise.
1887 (volatilized_eq): Likewise.
1888 (objc_compare_types): Likewise.
1889 (objc_type_quals_match): Likewise.
1890 (DERIVED_FROM_P): New ObjC macro, corresponding to C++ macro
1892 (get_class_ivars): Add second parameter indicating if entire
1893 hierarchy is desired.
1894 (struct volatilized_type): New type.
1895 (volatilized_htab): New hash table.
1896 (objc_types_compatible_p, objc_comptypes): Remove functions.
1897 (synth_module_prologue): Do not initialize 'unused_list'.
1898 (objc_get_class_reference): Fix ObjC++ impedance mismatches.
1899 (objc_declare_alias): Implement as a typedef.
1900 (objc_substitute_decl, objc_gimplify_expr): Reformat.
1901 (objc_get_class_ivars): Adjust call to get_class_ivars().
1902 (next_sjlj_build_enter_and_setjmp, synth_forward_declarations,
1903 build_ivar_reference, get_super_receiver): Call
1904 objc_build_component_ref() instead of build_component_ref().
1905 (objc_begin_catch_clause): Use DERIVED_FROM_P() instead of
1907 (build_private_template): Call objc_build_struct() instead of
1908 start_struct() and finish_struct().
1909 (hash_init): Initialize volatilized_htab.
1910 (objc_is_public): Adjust calls to objc_get_ivars(); adjust
1911 ObjC++ impedance mismatches.
1912 (encode_aggregate_within): Streamline by calling
1913 encode_aggregate_fields().
1914 * objc-act.h (objc_types_compatible_p): Remove prototype.
1915 (OCTI_UNUSED_LIST, unused_list): Remove slot.
1916 * objc-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Remove.
1918 2005-05-18 Geoffrey Keating <geoffk@apple.com>
1920 * Make-lang.in (cc1obj-dummy): New.
1921 (cc1obj-checksum.c): New.
1922 (cc1obj-checksum.o): New.
1923 (cc1obj): Add cc1obj-checksum.o.
1925 2005-05-18 Mike Stump <mrs@apple.com>
1928 * objc-act.c (struct interface_tuple): Mark it up for GC.
1929 (interface_htab): It is really a struct interface_tuple.
1931 2005-05-17 Ziemowit Laski <zlaski@apple.com>
1932 Mike Stump <mrs@apple.com>
1934 Yet more Objective-C++...
1936 * objc-act.c (objc_finish_try_stmt): Add return value.
1937 (objc_build_synchronized): Likewise.
1939 * objc-act.c (objc_is_gcable_type): Add.
1940 (objc_substitute_decl): Add.
1941 (objc_build_ivar_assignment): Add.
1942 (objc_build_global_assignment): Add.
1943 (objc_build_strong_cast_assignment): Add.
1944 (objc_is_ivar_reference_p): Add.
1945 (objc_is_global_reference_p): Add.
1946 (objc_generate_write_barrier): Add.
1947 (objc_rewrite_function_call): Add.
1948 (objc_gimplify_expr): Add Objective-C++ support.
1949 * objc-act.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Likewise.
1950 (SIZEOF_OBJC_TYPE_LANG_SPECIFIC): Add.
1951 (INIT_TYPE_OBJC_INFO): Add Objective-C++ support.
1952 (DUP_TYPE_OBJC_INFO): Likewise.
1953 (struct imp_entry): Add field has_cxx_cdtors.
1954 (struct imp_entry *imp_list): Add OCTI_UMSG_FAST_DECL,
1955 OCTI_METH_LIST_TEMPL, OCTI_METH_PROTO_LIST_TEMPL,
1956 OCTI_IVAR_LIST_TEMPL, OCTI_ASSIGN_IVAR_DECL,
1957 OCTI_ASSIGN_IVAR_FAST_DECL, OCTI_ASSIGN_GLOBAL_DECL,
1958 OCTI_ASSIGN_STRONGCAST_DECL.
1959 (umsg_fast_decl): Add.
1960 (objc_assign_ivar_decl): Add.
1961 (objc_assign_ivar_fast_decl): Add.
1962 (objc_assign_global_decl): Add.
1963 (objc_assign_strong_cast_decl): Add.
1964 (objc_method_list_ptr): Add.
1965 (objc_method_proto_list_ptr): Add.
1966 (objc_ivar_list_ptr): Add.
1968 * objc-act.c (should_call_super_dealloc): Add.
1969 (OBJC_VERSION): Bump to 6.
1970 (objc_is_gcable_type): Add.
1971 (objc_substitute_decl): Add.
1972 (objc_build_ivar_assignment): Add.
1973 (objc_build_global_assignment): Add.
1974 (objc_build_strong_cast_assignment): Add.
1975 (objc_is_gcable_p): Add.
1976 (objc_is_ivar_reference_p): Add.
1977 (objc_is_global_reference_p): Add.
1978 (generate_shared_structures): Add flags parameter.
1979 (objc_generate_cxx_ctor_or_dtor): Add.
1980 (objc_generate_cxx_cdtors): Add.
1981 (add_class): Add name parameter.
1982 (objc_types_share_size_and_alignment): Add.
1983 (comp_proto_with_proto): Add strict parameter.
1984 (CLS_HAS_CXX_STRUCTORS): Add.
1985 (TAG_ASSIGNIVAR): Add.
1986 (TAG_ASSIGNGLOBAL): Add.
1987 (TAG_ASSIGNSTRONGCAST): Add.
1988 (TAG_MSGSEND_FAST): Add.
1989 (TAG_ASSIGNIVAR_FAST): Add.
1990 (TAG_CXX_CONSTRUCT): Add.
1991 (TAG_CXX_DESTRUCT): Add.
1992 (OBJC_LOOKUP_CLASS): Add.
1993 (OBJC_LOOKUP_NO_SUPER): Add.
1994 (objc_finish_file): Add pch support.
1995 (objc_finish_implementation): Add Objective-C++ support.
1996 (synth_module_prologue): Likewise.
1997 (synth_module_prologue): Add fast dispatching.
1998 (objc_get_class_reference): Add Objective-C++ support.
1999 (objc_generate_write_barrier): Likewise.
2000 (next_sjlj_build_enter_and_setjmp): Likewise.
2001 (objc_begin_try_stmt): Likewise.
2002 (build_next_objc_exception_stuff): Add fast ivar support.
2003 (build_private_template): Mark the record as used so debug
2004 information is generated.
2005 (build_protocol_template): Add Objective-C++ support.
2006 (objc_method_parm_type) Likewise.
2007 (objc_generate_cxx_ctor_or_dtor): Likewise.
2008 (objc_generate_cxx_cdtors): Likewise.
2009 (build_protocol_initializer): Likewise.
2010 (build_category_template): Likewise.
2011 (build_class_template): Likewise.
2012 (build_method_list_template): Likewise.
2013 (build_category_initializer): Likewise.
2014 (build_shared_structure_initializer): Likewise.
2015 (objc_finish_message_expr): Likewise.
2016 (build_objc_method_call): Add fast dispatch support.
2017 (lookup_method_static): Add support to end search at superclasses.
2018 (add_method_to_hash_list): Add strict parameter to
2019 comp_proto_with_proto.
2020 (objc_add_method): Likewise.
2021 (objc_add_method): Also set the interface_value.
2022 (add_instance_variable): Add Objective-C++ support.
2023 (objc_is_public): Likewise.
2024 (start_class): Likewise.
2025 (continue_class): Likewise.
2026 (encode_aggregate_within): Likewise.
2027 (start_method_def): Likewise.
2028 (objc_start_function): Clear current_function_returns_value
2029 and current_function_returns_null.
2030 (really_start_method): Add Objective-C++ support.
2031 (objc_finish_method_definition): Add warning for missing
2033 (finish_objc): Add Objective-C++ support.
2034 (generate_objc_image_info): Likewise.
2035 (objc_lookup_ivar): Likewise.
2036 * objc-act.h (TYPE_HAS_OBJC_INFO): Likewise.
2037 (INIT_TYPE_OBJC_INFO): Likewise.
2038 (DUP_TYPE_OBJC_INFO): Likewise.
2040 2005-04-23 DJ Delorie <dj@redhat.com>
2042 * objc-act.c: Adjust warning() callers.
2044 2005-04-21 Roger Sayle <roger@eyesopen.com>
2046 * objc-act.h (METHOD_ADD_ARGS_ELLIPSIS_P): New macro for accessing
2047 this field of an objc method decl.
2048 * objc-act.c (build_method_decl): Take an additional "ellipsis"
2049 argument, and set METHOD_ADD_ARGS_ELLIPSIS_P as appropriate.
2050 (objc_build_method_signature): Accept additional "ellipsis"
2051 argument and pass it to build_method_decl.
2052 (get_arg_type_list, start_method_def, gen_method_decl): Use
2053 the new METHOD_ADD_ARGS_ELLIPSIS_P instead of examining the
2054 TREE_OVERFLOW field of a TREE_LIST node.
2056 2005-04-20 Joseph S. Myers <joseph@codesourcery.com>
2059 * objc-act.c (objc_start_function): Create stack level for context
2060 of identifiers with variably modified type.
2062 2005-03-30 Joseph S. Myers <joseph@codesourcery.com>
2066 * objc-act.c (objc_start_function): Push context on
2067 label_context_stack.
2069 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
2071 * objc-act.c (next_sjlj_build_enter_and_setjmp,
2072 next_sjlj_build_catch_list, next_sjlj_build_try_catch_finally):
2073 Call c_common_truthvalue_conversion.
2075 2005-02-25 Joseph S. Myers <joseph@codesourcery.com>
2077 * Make-lang.in (objc/objc-parse.o-warn, objc/objc-parse.o,
2078 objc/objc-parse.c, objc/objc-parse.y): Remove
2079 (OBJC_OBJS, objc.srcextra, objc.tags, objc.mostlyclean,
2080 objc.distclean, objc.maintainer-clean): Update for new parser.
2081 * config-lang.in (gtfiles): Update for new parser.
2083 2005-01-29 Kazu Hirata <kazu@cs.umass.edu>
2085 * lang-specs.h, objc-act.c, objc-act.h, objc-lang.c: Update
2088 2005-01-27 Matt Austern <austern@apple.com>
2090 * objc-act.c (objc_finish_file): In ObjC++ mode, set at_eof before
2091 calling instantiate_pending_templates.
2093 2005-01-26 Alexander Malmberg <alexander@malmberg.org>
2096 * objc-act.c (build_selector_translation_table): Use
2097 input_location in the diagnostic for the GNU runtime or if
2098 TREE_PURPOSE (chain) is NULL.
2100 2005-01-25 Alexander Malmberg <alexander@malmberg.org>
2103 * objc-act.c (objc_types_compatible_p): New function.
2104 * objc-act.h (objc_types_compatible_p): Declare.
2105 * objc-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.
2107 2005-01-16 Ziemowit Laski <zlaski@apple.com>
2109 * objc-act.c (objc_push_parm): Call c_type_promotes_to()
2112 2005-01-15 Ziemowit Laski <zlaski@apple.com>
2115 * objc-act.c (get_arg_type_list): Decay function arguments into
2117 (objc_push_parm): Likewise; bring PARM_DECL construction closer
2118 in line with what the C front-end does.
2119 (objc_get_parm_info): Call pushdecl() and finish_decl() on
2120 each PARM_DECL, like the C front-end does.
2121 (start_method_def): Remove redundant ARRAY_TYPE decay.
2122 (objc_start_function): Bring closer in line with what the
2123 C front-end does for functions.
2125 2005-01-14 Mike Stump <mrs@apple.com>
2127 * lang-specs.h ("@objective-c"): Use cc1obj when -E is used so
2128 that -fobjc-exceptions is accepted.
2130 2004-12-30 Ziemowit Laski <zlaski@apple.com>
2133 * objc-act.c (get_arg_type_list, start_method_def): Decay
2134 array arguments into pointers.
2135 (gen_type_name_0): Learn to pretty-print array types.
2137 2004-12-15 Ziemowit Laski <zlaski@apple.com>
2139 * objc-act.c (build_private_template): Change to return 'void'; do
2140 not set ivar_context, uprivate_record or objc_instance_type.
2141 (objc_comptypes, gen_type_name_0): For types 'id' and 'Class',
2142 retrieve protocol list from the pointee rather than the pointer itself;
2143 check TYPE_HAS_OBJC_INFO(...) precondition before accessing
2144 TYPE_OBJC_PROTOCOL_LIST.
2145 (objc_get_protocol_qualified_type): For types 'id' and 'Class',
2146 construct a variant of the pointee as well as the pointer, and
2147 store protocol information in the former. When creating variants
2148 of RECORD_TYPEs, clone their TYPE_LANG_SPECIFIC fields and propagate
2149 TYPE_OBJC_INTERFACE information.
2150 (objc_declare_class): If a TYPE_DECL is looked up, retrieve the
2151 underlying RECORD_TYPE to check for presence of TYPE_OBJC_INTERFACE;
2152 for newly-created RECORD_TYPEs, create a tentative TYPE_OBJC_INTERFACE
2153 holding an IDENTIFIER_NODE.
2154 (objc_finish_message_expr): Check TYPE_HAS_OBJC_INFO(...) before
2155 accessing TYPE_OBJC_PROTOCOL_LIST; Use TYPE_OBJC_INTERFACE instead
2156 of calling lookup_interface(); allow for TYPE_OBJC_INTERFACE holding
2157 an IDENTIFIER_NODE (meaning a @class forward-declaration only).
2158 (objc_is_public): Check TYPE_OBJC_INTERFACE instead of calling
2160 (continue_class): For @implementations, set ivar_context,
2161 uprivate_record and objc_instance_type, for @interfaces, call
2162 build_private_template().
2163 (encode_pointer): Check TYPE_HAS_OBJC_INFO(...) before accessing
2164 TYPE_OBJC_INTERFACE.
2165 (objc_types_are_equivalent): Check TYPE_HAS_OBJC_INFO(...) before
2166 accessing TYPE_OBJC_PROTOCOL_LIST.
2167 * objc-act.h (OBJC_INFO_SLOT_ELTS, TYPE_OBJC_INFO, INIT_TYPE_OBJC_INFO,
2168 DUP_TYPE_OBJC_INFO, ALLOC_OBJC_TYPE_LANG_SPECIFIC,
2169 SIZEOF_OBJC_TYPE_LANG_SPECIFIC): New macros.
2170 (TYPE_OBJC_INTERFACE): Replaces TREE_STATIC_INSTANCE and now points
2171 to an actual @interface; stored in TYPE_LANG_SPECIFIC(...).
2172 (TYPE_OBJC_PROTOCOL_LIST): Replaces TYPE_PROTOCOL_LIST; stored in
2173 TYPE_LANG_SPECIFIC(...).
2174 (TREE_STATIC_INSTANCE, TYPE_PROTOCOL_LIST): Delete.
2175 (IS_ID, IS_CLASS, IS_PROTOCOL_QUALIFIED_UNTYPED, IS_SUPER,
2176 TYPED_OBJECT): Check for POINTER_TYPE rather than POINTER_TYPE_P;
2177 adjust for use of TYPE_OBJC_INTERFACE and TYPE_OBJC_PROTOCOL_LIST
2178 instead of TREE_STATIC_INSTANCE and TYPE_PROTOCOL_LIST.
2180 2004-11-29 Joseph Myers <joseph@codesourcery.com>
2183 * Make-lang.in (objc/objc-act.o): Update dependencies.
2184 * objc-act.c (objc_finish_file): Call
2185 maybe_apply_pending_pragma_weaks if not OBJCPLUS.
2187 2004-11-09 Andrew Pinski <pinskia@physics.uc.edu>
2190 * obj-act.c (encode_type): 96bits doubles are encoded the
2191 same way as 64bit and 128bit doubles are.
2193 2004-11-09 Joseph S. Myers <joseph@codesourcery.com>
2195 * objc-act.c: Use %q, %< and %> for quoting in diagnostics.
2197 2004-11-08 Andrew Pinski <pinskia@physics.uc.edu>
2200 * objc-act.c (generate_method_descriptors): Remove setting
2201 the new decls' type to variable_length_type.
2202 (generate_ivar_lists): Likewise.
2203 (generate_dispatch_tables): Likewise.
2205 2004-10-30 Ziemowit Laski <zlaski@apple.com>
2207 * objc-act.c (objc_lookup_ivar): The new OTHER parameter
2208 contains the result of the ID lookup by the C or C++
2209 front-end; in class methods, use OTHER if it exists;
2210 in instance methods, use OTHER only if it is locally
2213 2004-10-26 Ziemowit Laski <zlaski@apple.com>
2215 * objc-act.c (finish_class): Do not synthesize bogus
2216 'extern objc_object *_Foo;' declarations for @interface Foo.
2218 2004-10-25 Ziemowit Laski <zlaski@apple.com>
2219 David Ayers <d.ayers@inode.at>
2221 * objc-act.c (objc_comptypes): Use IS_PROTOCOL_QUALIFIED_UNTYPED
2222 instead of IS_PROTOCOL_QUALIFIED_ID; add comparisons for:
2223 'Class <Protocol> != id <Protocol>'; 'Class <Protocol> != <class> *';
2224 'Class <Protocol> == id' and 'Class <Protocol> == Class'.
2225 (objc_is_id): Add test for 'super'.
2226 (objc_finish_message_expr): Allow for messaging of 'Class <Proto>'
2227 receivers; if class methods are not found in protocol lists, search
2228 for instance methods therein and warn if one is found. Look in
2229 global hash tables for suitable method as a last resort when messaging
2230 'id <Proto>', 'Class <Proto>' and invalid receiver types.
2231 (objc_add_method): Insert instance methods listed in protocols into
2232 the global class method hash table.
2233 * objc-act.h (IS_PROTOCOL_QUALIFIED_ID): Rename to
2234 IS_PROTOCOL_QUALIFIED_UNTYPED and allow for 'Class <Proto>' in
2235 addition to 'id <Proto>'.
2237 2004-10-21 Andrew Pinski <pinskia@physics.uc.edu>
2240 * objc-act.c (objc_build_string_object): Create a CONST_DECL
2241 for the NeXT runtime case.
2243 2004-10-02 Kazu Hirata <kazu@cs.umass.edu>
2245 * objc-act.c: Fix comment typos.
2247 2004-09-24 Ziemowit Laski <zlaski@apple.com>
2249 * objc-act.c (init_objc_symtab, init_module_descriptor,
2250 build_shared_structure_initializer): When initializing 'long'
2251 fields, ensure that the initializer value is also 'long'.
2253 2004-09-24 Zack Weinberg <zack@codesourcery.com>
2255 * objc-act.c: Change annotate_with_locus to SET_EXPR_LOCATION
2257 (objc_init): Only set input_line to 0 #ifndef USE_MAPPED_LOCATION.
2258 (build_selector_translation_table): Use %J in diagnostic
2259 instead of diddling input_line. Fix spelling.
2261 2004-09-21 Ziemowit Laski <zlaski@apple.com>
2263 * objc-act.c (objc_fold_objc_type_ref): New function.
2264 * objc-act.h (objc_fold_objc_type_ref): New prototype.
2266 2004-09-09 Joseph S. Myers <jsm@polyomino.org.uk>
2268 * objc-act.c (objc_start_function, really_start_method,
2269 objc_get_parm_info, start_method_def): Update to new arg_info
2272 2004-09-07 Ziemowit Laski <zlaski@apple.com>
2274 * Make-lang.in (objc/objc-parse.o): Depend on $(C_COMMON_H) instead of
2276 (objc/objc-act.o): Depend on $(HASHTAB_H).
2277 * objc-act.c: Include hashtab.h; in ObjC++ mode, include cp-tree.h and
2278 objcp-decl.h instead of c-tree.h.
2279 (build_module_descriptor, get_class_ivars, synth_id_with_class_suffix,
2280 error_with_ivar, gen_method_decl, gen_declaration, setup_string_decl,
2281 build_protocol_template): Adjust prototypes.
2282 (build_module_initializer_routine, start_class, continue_class,
2283 finish_class, start_method_def, objc_start_function, start_protocol,
2284 build_method_decl, objc_add_method, add_instance_variable,
2285 build_ivar_reference, is_ivar, is_private, get_super_receiver,
2286 build_selector_table_decl, objc_push_parm, objc_get_parm_info,
2287 gen_type_name, gen_type_name_0, start_var_decl, finish_var_decl,
2288 create_field_decl): New prototypes.
2289 (objc_expand_function_end, comp_method_with_proto, objc_expr_last,
2290 gen_declaration_1, gen_declarator, is_complex_decl, adorn_decl,
2291 define_decl, create_builtin_decl, gen_declspecs): Remove prototypes.
2292 (TYPE_ID): Rename to OBJECT_TYPEDEF_NAME.
2293 (CLASS_TYPEDEF_NAME): New.
2294 (TAG_EXECCLASS): Change from a global variable to a #define.
2295 (TAG_RETURN_STRUCT): Delete.
2296 (TAG_GNUINIT): New, holds '__objc_gnu_init' name.
2297 (objc_inherit_code, objc_public_flag): New, moved from c-parse.in.
2298 (string_descriptor): New struct.
2299 (string_htab): New hash table.
2300 (string_hash, string_eq): New prototypes.
2301 (generate_struct_by_value_array): Call create_field_decl() instead of
2302 create_builtin_decl().
2303 (objc_init): Do not initialize objc_ellipsis_node or TAG_EXECCLASS;
2304 In ObjC++ mode, call cxx_init() instead of c_objc_common_init().
2305 (objc_finish_file): In ObjC++, call instantiate_pending_templates()
2306 and cp_finish_file().
2307 (define_decl, get_static_reference, get_protocol_reference,
2308 create_builtin_decl): Remove functions.
2309 (objc_start_class_interface, objc_start_category_interface,
2310 objc_start_protocol, objc_continue_interface, objc_finish_interface,
2311 objc_start_class_implementation, objc_start_category_implementation,
2312 objc_continue_implementation, objc_finish_implementation,
2313 objc_set_visibility, objc_set_method_type,
2314 objc_build_method_signature, objc_add_method_declaration,
2315 objc_start_method_definition, objc_add_instance_variable,
2316 objc_get_protocol_qualified_type, create_field_decl,
2317 start_var_decl, finish_var_decl): New functions.
2318 (setup_string_decl): Simplify since it is only called once.
2319 (synth_module_prologue): Call build_class_template(); predefine 'id'
2320 and 'Class' as typedefs; rename 'temp_type' to 'type'; disable debug
2321 hooks for duration of function; fix GNU runtime messenger signatures
2322 to correspond to reality; forward-declare '__objc_exec_class' for the
2323 GNU runtime; call build_selector_table_decl(); in ObjC++ mode, generate
2324 'extern "C" { ... }' wrappers around synthesized declarations; call
2325 build_protocol_template() and build_category_template().
2326 (string_hash, string_eq): New functions.
2327 (objc_build_string_object): Check metaclass correctness only once;
2328 store string literals in hash table.
2329 (objc_build_constructor): Do not convert initializer elements;
2330 adjust for ObjC++ impedance mismatch.
2331 (build_objc_symtab_template): Call create_field_decl() instead of
2332 create_builtin_decl().
2333 (init_objc_symtab): Add missing conversion to initializer element.
2334 (build_metadata_decl): Call start_var_decl() instead of define_decl().
2335 (generate_objc_symtab_decl): Do not call build_category_template();
2336 call start_var_decl() and finish_var_decl() instead of start_decl()
2338 (build_module_descriptor): Call create_field_decl() instead of
2339 grokfield(); call start_var_decl() and finish_var_decl() instead of
2340 start_decl() and finish_decl(); always mark module descriptor as
2341 used; move GNU runtime-specific functionality to
2342 build_module_initializer_routine().
2343 (build_module_initializer_routine): New function, broken off of
2344 build_module_descriptor().
2345 (objc_static_init_needed_p, objc_generate_static_init_call): New
2347 (generate_static_references, generate_strings,
2348 build_selector_translation_table, generate_descriptor_table,
2349 generate_ivars_list, generate_dispatch_table, generate_category): Call
2350 start_var_decl() and finish_var_decl() instead of start_decl() and
2351 finish_decl(); build a type directly instead of via groktypename().
2352 (build_selector_reference_decl, build_selector_table_decl,
2353 build_class_reference_decl, build_protocol_reference,
2354 generate_objc_image_info): Call start_var_decl() instead of
2356 (build_selector_reference): For GNU runtime, do not call
2357 build_selector_reference_decl().
2358 (build_selector, build_typed_selector_reference): Always convert
2359 result to the selector type.
2360 (add_objc_string): Cast return value to 'char *'.
2361 (build_method_prototype_template, build_selector_template,
2362 build_method_template): Use actual selector type for fields
2363 pointing to selectors.
2364 (finish_objc): For GNU runtime, call
2365 build_module_initializer_routine() after build_module_descriptor().
2366 (generate_protocol_list, generate_shared_structures): Call
2367 start_var_decl() and finish_var_decl() instead of start_decl() and
2368 finish_decl(); build a type directly instead of via
2370 (synth_id_with_class_suffix): Return a string.
2371 (get_arg_type_list): For instance methods, use the instance type for
2372 'self'; do not call groktypename_in_parm_context().
2373 (build_objc_string_decl): Squash redeclaration errors in ObjC++.
2374 (objc_is_class_name): Use OBJC_TYPE_NAME instead of TYPE_NAME;
2375 handle RECORD_TYPEs in ObjC as well as ObjC++.
2376 (objc_is_id): New function.
2377 (objc_is_object_ptr): Return the canonical type node.
2378 (objc_get_class_ivars): Simplify using get_class_ivars().
2379 (get_class_ivars): Remove second parameter; create a fresh copy
2380 of the ivar list for each call; do not check for existence of
2382 (objc_eh_runtime_type): Mark #ifndef OBJCPLUS.
2383 (objc_init_exceptions): When using SJLJ-style exceptions, require
2384 the use of '-fobjc-exceptions' flag; do not require it for DWARF-style
2386 (objc_build_exc_ptr, next_sjlj_build_try_catch_finally): Use
2387 objc_object_type instead of objc_id_type.
2388 (objc_begin_catch_clause): Convert the incoming PARM_DECL into
2389 a VAR_DECL before placing it in the appropriate scope; do not
2390 call define_decl(); adjust call to c_begin_compound_stmt();
2391 use objc_object_type instead of objc_id_type.
2392 (build_next_objc_exception_stuff): Call create_field_decl() instead
2393 of create_builtin_decl(); construct type directly instead of calling
2394 groktypename(); use OBJC_VOID_AT_END to mark end of function parameters.
2395 (build_private_template): Adjust call to get_class_ivars(); build
2396 a type directly instead of via groktypename().
2397 (build_protocol_template, build_method_prototype_list_template,
2398 build_method_prototype_template, build_category_template,
2399 build_selector_template, build_class_template, build_super_template,
2400 build_ivar_template, build_ivar_list_template,
2401 build_method_list_template, build_method_template):
2402 Call create_field_decl() instead of grokfield().
2403 (objc_method_parm_type): Do not call groktypename().
2404 (generate_descriptor_table): Call start_var_decl() and
2405 finish_var_decl() instead of start_decl() and finish_decl().
2406 (generate_method_descriptors, build_protocol_initializer,
2407 generate_dispatch_tables, build_category_initializer,
2408 build_shared_structure_initializer): Do not call groktypename().
2409 (generate_protocols): Call start_var_decl() and finish_var_decl()
2410 instead of start_decl() and finish_decl(); do not call groktypename().
2411 (error_with_ivar): Remove last parameter.
2412 (check_ivars): Do not iterate ovar CLASS_RAW_IVARS lists in addition
2413 to CLASS_IVARS lists; adjust calls to error_with_ivar().
2414 (generate_ivar_lists): Convert one of the initializer elements; do
2415 not call groktypename().
2416 (get_arg_type_list, start_method_def, gen_method_def): Account for
2417 new representation of variable arguments and '...' in Objective-C
2418 methods; add Objective-C++ impedance matching code.
2419 (is_objc_type_qualifier): Remove function.
2420 (adjust_type_for_id_default): Simplify; there is no longer a need to
2421 wade through declspecs.
2422 (lookup_interface, start_class, continue_class,
2423 finish_class, start_method_def, start_protocol, build_method_decl,
2424 objc_add_method, add_instance_variable, build_ivar_reference,
2425 is_ivar, is_private, get_super_receiver, objc_build_finally_epilogue):
2426 Make into static functions.
2427 (receiver_is_class_object): Use new IS_CLASS() macro.
2428 (objc_build_message_expr): Tweak ObjC++ message argument handling;
2429 call objc_finish_message_expr() instead of finish_message_expr().
2430 (finish_message_expr): Rename to objc_finish_message_expr(); use
2431 OBJC_TYPE_NAME and OBJC_SET_TYPE_NAME macros instead of TYPE_NAME.
2432 call gen_type_name() instead of gen_declaration(); call objc_is_id()
2433 instead of using IS_ID and IS_CLASS; Use objc_class_name instead of
2434 calling get_identifier("Class"); handle CONVERT_EXPRs in receiver.
2435 (build_objc_method_call, warn_with_method): Do not call groktypename().
2436 (build_ivar_reference): Call convert() instead of clobbering in a
2438 (hash_init): Initialize string_htab hash table.
2439 (add_instance_variable): Simplify parameter list; do not call grokfield();
2440 do not populate CLASS_IVARS list.
2441 (start_class): Check for the existence of super class, if one was specified.
2442 (continue_class): Use CLASS_RAW_IVARS rather than CLASS_IVARS; do not
2443 call build_class_template(); adjust call to get_class_ivars(); call
2444 build_decl(), pushdecl() and finish_decl() instead of define_decl().
2445 (finish_class): Call build_decl(), pushdecl() and finish_decl() instead
2447 (add_protocols): Use PROTOCOL_BINFO_ELTS for the tree vector size.
2448 (start_protocol): Do not call build_protocol_template(); use
2449 PROTOCOL_BINFO_ELTS for the tree vector size.
2450 (encode_type_qualifiers): Do not handle the 'const' qualifier here.
2451 (encode_pointer): Encode 'const char *' as 'r*', for backwards
2453 (encode_array): Use HOST_WIDE_INT_PRINT_DEC instead of "%ld".
2454 (encode_type): Handle the 'const' qualifier here.
2455 (objc_parmlist): New global variable, sued by objc_push_parm and
2456 objc_get_parm_info().
2457 (objc_push_parm, objc_get_parm_info): New functions.
2458 (objc_expr_last): Remove function.
2459 (synth_self_and_ucmd_args): For instance methods, use the instance
2460 type for 'self'; call objc_push_parm() instead of push_parm_decl().
2461 (start_method_def): Do not call push_scope(), declare_parm_level(),
2462 pop_scope(), push_parm_decl(), store_parm_decls() or objc_expr_last();
2463 just use objc_push_parm() and objc_get_parm_info().
2464 (comp_method_with_proto): Remove function.
2465 (objc_types_are_equivalent): Strip away indirections before comparing
2467 (comp_proto_with_proto): Do not call groktypename(); types are no
2468 longer in raw declspec format.
2469 (objc_start_function): New function.
2470 (really_start_method): Call comp_proto_with_proto() instead of
2471 comp_method_with_proto(); call objc_start_function() instead of
2472 hand-crafting a function declarator.
2473 (continue_method_def, objc_expand_function_end): Remove functions.
2474 (get_super_receiver): Call objc_get_current_scope() instead of
2475 get_current_scope(); reference 'super_class' field (instead of
2477 (finish_method_def): Rename to objc_finish_method_definition() and
2478 add a function decl parameter; move method encoding call from
2479 objc_expand_function_end().
2480 (is_complex_decl, adorn_decl, gen_declarator, gen_declspecs,
2481 gen_declaration_1): Remove functions.
2482 (tmpbuf, RAW_DECLSPEC): Remove.
2483 (gen_declaration): Remove second parameter; simplify to deal
2484 with TYPE_P nodes instead of raw declspecs.
2485 (gen_type_name, gen_type_name_0): New functions.
2486 (gen_method_decl): Remove second parameter; call gen_type_name()
2487 instead of gen_declaration_1().
2488 (dump_interface): Adjust calls to gen_declaration() and
2489 gen_method_decl(); do not allocate a separate string buffer.
2490 (init_objc): Allocate a larger string buffer to accommodate
2491 dump_interface(); adjust call to build_module_descriptor();
2492 add call to build_module_initializer_routine() for the GNU
2494 (generate_classref_translation_entry): Do not call start_decl(); call
2495 finish_var_decl() instead of finish_decl(); call convert() instead of
2497 * objc-act.h (CLASS_OWN_IVARS): Remove accessor.
2498 (CLASS_BINFO_ELTS): Reduce from 6 to 5, now that CLASS_OWN_IVARS is
2500 (OCTI_GNU_INIT_DECL, GNU_INIT_decl): New.
2501 (OCTI_ELLIPSIS_NODE, objc_ellipsis_node): Remove.
2502 (OCTI_ID_ID, id_type, objc_id_id): Rename to OCTI_ID_NAME,
2503 objc_object_type and objc_object_name, respectively.
2504 (OCTI_CLS_REF, OCTI_CLASS_NAME, objc_class_reference,
2505 objc_class_name): New.
2506 (IS_CLASS): New macro.
2507 (IS_ID, IS_SUPER): Robustify.
2508 (OCTI_EXECCLASS_DECL, execclass_decl): New.
2509 (finish_file, start_class, continue_class, finish_class,
2510 start_method_def, continue_method_def, finish_method_def,
2511 start_protocol, finish_protocol, objc_build_throw_stmt,
2512 objc_build_try_catch_finally_stmt, objc_build_synchronized_prologue,
2513 objc_build_synchronized_epilogue, objc_build_try_prologue,
2514 objc_build_try_epilogue, objc_build_catch_stmt, objc_build_catch_epilogue,
2515 objc_build_finally_prologue, objc_build_finally_epilogue,
2516 is_ivar, is_private, is_public, add_instance_variable, objc_add_method,
2517 get_super_receiver, objc_clear_super_receiver, get_class_ivars_from_name,
2518 get_class_reference, get_static_reference, get_object_reference,
2519 build_message_expr, finish_message_expr, build_selector_expr,
2520 build_ivar_reference, build_keyword_decl, build_method_decl,
2521 build_protocol_expr, build_objc_string_object, objc_declare_alias,
2522 objc_declare_class, objc_declare_protocols, objc_comptypes,
2523 objc_check_decl, build_encode_expr): Remove prototypes.
2524 (imp_count, cat_count): Make GGC-aware.
2525 (OBJC_SET_TYPE_NAME): New macro.
2527 2004-09-03 Ziemowit Laski <zlaski@apple.com>
2529 * config-lang.in: Update copyright notice.
2530 (lang_requires): Indicate that ObjC requires C to be built first.
2532 2004-09-01 Ziemowit Laski <zlaski@apple.com>
2534 * objc-act.c (objc_check_decl): Use OBJC_TYPE_NAME macro instead of
2536 (build_objc_string_object): Rename to objc_build_string_object().
2537 (get_class_reference): Rename to objc_get_class_reference().
2538 (get_class_ivars_from_name): Rename to objc_get_class_ivars().
2539 (next_sjlj_build_catch_list, get_super_receiver): Call
2540 objc_get_class_reference() instead of get_class_reference().
2541 (build_keyword_decl): Rename to objc_build_keyword_decl().
2542 (build_message_expr): Rename to objc_build_message_expr().
2543 (build_protocol_expr): Rename to objc_build_protocol_expr().
2544 (build_selector_expr): Rename to objc_build_selector_expr().
2545 (build_encode_expr): Rename to objc_build_encode_expr().
2546 * objc-act.h (get_class_ivars_from_name): Rename prototype to
2547 objc_get_class_ivars().
2548 (get_class_reference): Rename prototype to objc_get_class_reference().
2549 (build_message_expr): Rename prototype to objc_build_message_expr().
2550 (build_selector_expr): Rename prototype to objc_build_selector_expr().
2551 (build_keyword_decl): Rename prototype to objc_build_keyword_decl().
2552 (build_protocol_expr): Rename prototype to objc_build_prototype_expr().
2553 (build_objc_string_object): Rename prototype to
2554 objc_build_string_object().
2556 2004-09-01 Ziemowit Laski <zlaski@apple.com>
2558 * objc-act.c (lookup_interface): Make function 'static' and add a
2560 (objc_check_decl, get_class_reference, objc_declare_alias,
2561 objc_declare_class, objc_is_object_ptr): Call objc_is_class_name()
2562 instead of is_class_name().
2563 (get_super_receiver, objc_clear_super_receiver): Call
2564 objc_get_current_scope() instead of get_current_scope().
2565 (is_class_name): Rename to objc_is_class_name.
2566 (lookup_objc_ivar): Rename to objc_lookup_ivar.
2568 2004-08-28 Ziemowit Laski <zlaski@apple.com>
2570 * objc-act.c (objc_is_reserved_word): New function.
2572 2004-08-15 Ziemowit Laski <zlaski@apple.com>
2574 * Make-lang.in (objc/objc-lang.o): Depend on $(C_PRETTY_PRINT_H),
2575 $(DIAGNOSTIC_H), c-objc-common.h and gtype-objc.h, but not on toplev.h.
2576 (objc/objc-parse.o): Do not depend on gtype-objc.h.
2577 * objc-act.c: Do not include gtype-objc.h.
2578 (finish_file): Rename to objc_finish_file().
2579 * objc-act.h (finish_file): Update copyright notice; remove prototype.
2580 * objc-lang.c: Update copyright notice; include diagnostic.h,
2581 c-objc-common.h, c-pretty-print.h and gtype-objc.h; do not include
2583 (finish_file): New hook routine.
2584 (LANG_HOOKS_FINISH, LANG_HOOKS_INIT_OPTIONS,
2585 LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
2586 LANG_HOOKS_MISSING_ARGUMENT, LANG_HOOKS_POST_OPTIONS,
2587 LANG_HOOKS_GET_ALIAS_SET, LANG_HOOKS_SAFE_FROM_P,
2588 LANG_HOOKS_EXPAND_EXPR, LANG_HOOKS_MARK_ADDRESSABLE,
2589 LANG_HOOKS_PARSE_FILE, LANG_HOOKS_TRUTHVALUE_CONVERSION,
2590 LANG_HOOKS_FINISH_INCOMPLETE_DECL, LANG_HOOKS_UNSAFE_FOR_REEVAL,
2591 LANG_HOOKS_STATICP, LANG_HOOKS_SET_DECL_ASSEMBLER_NAME,
2592 LANG_HOOKS_NO_BODY_BLOCKS, LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL,
2593 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_FUNCTION_ENTER_NESTED,
2594 LANG_HOOKS_FUNCTION_LEAVE_NESTED, LANG_HOOKS_DUP_LANG_SPECIFIC_DECL,
2595 LANG_HOOKS_DECL_UNINIT, LANG_HOOKS_RTL_EXPAND_STMT,
2596 LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
2597 LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
2598 LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS,
2599 LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
2600 LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING,
2601 LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS,
2602 LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
2603 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_TYPE_FOR_MODE,
2604 LANG_HOOKS_TYPE_FOR_SIZE, LANG_HOOKS_SIGNED_TYPE,
2605 LANG_HOOKS_UNSIGNED_TYPE, LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE,
2606 LANG_HOOKS_INCOMPLETE_TYPE_ERROR, LANG_HOOKS_TYPE_PROMOTES_TO,
2607 LANG_HOOKS_REGISTER_BUILTIN_TYPE, LANG_HOOKS_WRITE_GLOBALS):
2608 Move to c-objc-common.h.
2611 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
2613 Copying and distribution of this file, with or without modification,
2614 are permitted in any medium without royalty provided the copyright
2615 notice and this notice are preserved.