Age | Commit message (Collapse) | Author | Files | Lines |
|
General Public License...
* Make-lang.in: Change copyright header to refer to version 3 of the GNU General
Public License and to point readers at the COPYING3 file and the FSF's license
web page.
* lang-specs.h, objc-act.c, objc-tree.def, objc-act.h, config-lang.in,
objc-lang.c: Likewise.
From-SVN: r127155
|
|
* attribs.c (hash_attr, eq_attr, init_attributes): Constify.
* builtins.c (validate_arg, builtin_mathfn_code,
validate_arglist): Likewise.
* calls.c (call_expr_flags): Likewise.
* combine.c (reg_nonzero_bits_for_combine,
reg_num_sign_bit_copies_for_combine, get_last_value,
reg_truncated_to_mode): Likewise.
* emit-rtl.c (subreg_lowpart_p): Likewise.
* expr.c (highest_pow2_factor_for_target,
categorize_ctor_elements_1, categorize_ctor_elements,
count_type_elements, contains_packed_reference,
highest_pow2_factor, highest_pow2_factor_for_target): Likewise.
* fold-const.c (may_negate_without_overflow_p, int_const_binop,
fold_convertible_p, operand_equal_p, tree_swap_operands_p,
native_encode_int, native_encode_real, native_encode_complex,
native_encode_vector, native_encode_expr, native_interpret_int,
native_interpret_real, native_interpret_complex,
native_interpret_vector, native_interpret_expr): Likewise.
* function.c (use_register_for_decl): Likewise.
* gimplify.c (get_name): Likewise.
* langhooks-def.h (lhd_return_null_const_tree): New.
(LANG_HOOKS_GET_CALLEE_FNDECL): Use it.
* langhooks.c (lhd_return_null_const_tree): New.
* langhooks.h (lang_get_callee_fndecl): Constify.
* output.h (constructor_static_from_elts_p): Likewise.
* rtl-factoring.c (gen_symbol_ref_rtx_for_label): Likewise.
* rtl.h (nonzero_bits, num_sign_bit_copies, truncated_to_mode,
subreg_lowpart_p, noop_move_p, struct rtl_hooks): Likewise.
* rtlanal.c (cached_nonzero_bits, nonzero_bits1,
cached_num_sign_bit_copies, num_sign_bit_copies1, noop_move_p,
nonzero_bits, num_sign_bit_copies, truncated_to_mode): Likewise.
* rtlhooks-def.h (reg_nonzero_bits_general,
reg_num_sign_bit_copies_general, reg_truncated_to_mode_general):
Likewise.
* rtlhooks.c (reg_num_sign_bit_copies_general,
reg_nonzero_bits_general, reg_truncated_to_mode_general):
Likewise.
* stmt.c (warn_if_unused_value, is_body_block): Likewise.
* stor-layout.c (mode_for_size_tree): Likewise.
* tree-ssa-loop-im.c (memref_eq): Likewise.
* tree-ssa-loop-ivopts.c (tree_int_cst_sign_bit): Likewise.
* tree.c (contains_placeholder_p, type_list_equal,
simple_cst_equal, get_callee_fndecl, operand_equal_for_phi_arg_p):
Likewise.
* tree.h (tree_int_cst_sign_bit, may_negate_without_overflow_p,
mode_for_size_tree, categorize_ctor_elements, count_type_elements,
contains_placeholder_p, contains_packed_reference,
get_callee_fndecl, operand_equal_for_phi_arg_p,
warn_if_unused_value, is_body_block, native_encode_expr,
native_interpret_expr, fold_convertible_p, operand_equal_p,
int_const_binop, tree_swap_operands_p, builtin_mathfn_code,
validate_arglist, simple_cst_equal, type_list_equal,
use_register_for_decl, call_expr_flags, get_name,
highest_pow2_factor): Likewise.
(const_call_expr_arg_iterator_d,
init_const_call_expr_arg_iterator, next_const_call_expr_arg,
first_const_call_expr_arg, more_const_call_expr_args_p,
FOR_EACH_CONST_CALL_EXPR_ARG): New.
* varasm.c (constructor_static_from_elts_p): Constify.
cp:
* parser.c (eof_token): Un-constify.
(cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
casts.
java:
* lang.c (java_get_callee_fndecl): Constify.
objc:
* objc-act.c (objc_get_callee_fndecl): Constify.
* objc-act.h (objc_get_callee_fndecl): Likewise.
From-SVN: r127036
|
|
2005-07-08 Daniel Berlin <dberlin@dberlin.org>
* Makefile.in (TREE_H): Add treestruct.def.
(c-decl.o): Add pointer-set.h
* c-decl.c (diagnose_mismatched_decls): Don't attempt to look at
visibility on regular DECL's.
(merge_decls): Fix the copying of decl nodes of various types for
the new structures. Don't update RTL, section name, weak status,
etc, on DECL's without RTL.
(grokdeclarator): DECL_ARG_TYPE_AS_WRITTEN is gone.
Don't check volatile on non-variable types.
(store_parm_decls_oldstyle): Use pointer_set instead of DECL_WEAK
to check whether we have seen arguments.
* c-objc-common.c (c_tree_printer): Reverse order of tests so that
flag is checked before field (flag is common, field is not).
* dwarf2out.c (decl_ultimate_origin): Only DECL's with
TS_DECL_COMMON could have an origin.
(add_location_or_const_value_attribute): Don't check section name
on non-var/function decls.
(dwarf2out_var_location): Reverse order of tests.
* emit-rtl.c (set_reg_attrs_for_parm): DECL_CHECK is dead, replace
with DECL_WRTL_CHECK.
* expmed.c (make_tree): rtl is now in decl_with_rtl.
* fold-const.c (fold_binary): Don't check weakness on
non-var/function decls.
(tree_expr_nonzero_p): Ditto.
(fold_checksum_tree): Use tree_decl_extra as sizeof
buffer.
* ggc-page.c (extra_order_size_table): Add sizes for
tree_decl_non_common, tree_parm_decl, tree_var_decl, and
tree_field_decl.
* gimplify.c (gimplify_bind_expr): Only set
DECL_SEEN_IN_BIND_EXPR_P on VAR_DECL.
* integrate.c (copy_decl_for_inlining): Don't set RTL on decl's
without RTL.
* langhooks-def.h (LANG_HOOK_INIT_TS): New.
* langhooks.h (init_ts). New langhook.
* passes.c (rest_of_decl_compilation): Reverse order of tests.
* print-tree.c (print_node): Update to only print fields that
exist in the structures the passed decl has.
* toplev.c (wrapup_global_declarations): Don't reset
DECL_DEFER_OUTPUT on DECL's that don't contain it.
* tree-browser.c (browse_tree): DECL_ARG_TYPE_AS_WRITTEN removed.
* tree-inline.c (remap_decl): Ditto.
* tree-outof-ssa.c (create_temp): Reverse order of tests.
* tree-pretty-print.c (print_declaration): Don't print
DECL_REGISTER on things that don't contain it.
* tree-vrp.c (expr_computes_nonzero): Don't check weakness on
non-var/function decls.
* tree.c (tree_contains_struct): New structure.
(init_priority_for_decl): New hashtable.
(tree_int_map): New structure.
(tree_int_map_eq): New function.
(tree_int_map_marked_p): Ditto.
(tree_int_map_hash): Ditto.
(tree_map): Move to tree.h.
(tree_map_eq): Externalize.
(tree_map_hash): Ditto.
(tree_map_marked_p): Ditto.
(init_ttree): Set up tree_contains_struct and call langhook.
(decl_assembler_name): Use DECL_NON_COMMON_CHECK..
(tree_code_size): Update for new structures.
(tree_node_structure): Update for new structures.
(make_node_stat): Don't try to set DECL_IN_SYSTEM_HEADER on decls
without the field.
(copy_node_stat): Copy init priority.
(build_decl_stat): Ditto for visibility.
(ts_enum_names): New.
(tree_contains_struct_check_failed): New function.
(decl_init_priority_lookup): Ditto.
(decl_init_priority_insert): Ditto.
* treestruct.def: New file.
* tree.h (CODE_CONTAINS_STRUCT): New macro.
(CONTAINS_STRUCT_CHECK): Ditto.
(tree_contains_struct_check_failed): New prototype.
(DECL_CHECK): Removed.
(DECL_MINIMAL_CHECK): New.
(DECL_COMMON_CHECK): Ditto.
(DECL_WRTL_CHECK): Ditto.
(DECL_NON_COMMON_CHECK): Ditto.
(DECL_WITH_VIS_CHECK): Ditto.
(VAR_OR_FUNCTION_DECL_P): Ditto
(struct tree_decl_minimal): New structure.
(struct tree_decl_common): Ditto.
(struct tree_decl_with_rtl): Ditto.
(struct tree_decl_with_vis): Ditto.
(struct tree_decl_non_common): Ditto.
(struct tree_field_decl): Ditto.
(struct tree_parm_decl): Ditto.
(struct tree_var_decl): Ditto.
(struct tree_function_decl): Ditto.
(struct tree_const_decl): Ditto.
(struct tree_result_decl): Ditto.
(union tree_node): Add new structures.
* var-tracking.c (track_expr_p): Reverse order of tests.
* doc/c-tree.texi: Add documentation on DECL node internal structure.
2005-07-08 Daniel Berlin <dberlin@dberlin.org>
* utils.c (create_param_decl): DECL_ARG_TYPE_AS_WRITTEN is
removed.
2005-07-08 Daniel Berlin <dberlin@dberlin.org>
* Make-lang.in: Add gt-cp-lang.h.
(cp-lang.o): Ditto.
* class.c (create_vtable_ptr): Stop setting DECL_ASSEMBLER_NAME on
the field.
* config-lang.in: Add cp-lang.c to gtfiles.
* cp-lang.c: Include hashtab.h.
(cp_init_ts): New function.
(LANG_HOOK_INIT_TS): Use macro.
(decl_shadowed_for_var_lookup): New function.
(decl_shadowed_for_var_insert): Ditto.
* cp-tree.h (THUNK_FUNCTION_CHECK): Use decl_common.
(NON_THUNK_FUNCTION_CHECK): Ditto.
(DECL_NAMESPACE_ASSOCIATIONS): Use decl_non_common.
(DECL_INIT_PRIORITY): Ditto.
(DECL_HAS_SHADOWED_FOR_VAR_P): Ditto.
(DECL_SHADOWED_FOR_VAR): Use hashtable.
(SET_DECL_SHADOWED_FOR_VAR): Ditto.
* decl.c (duplicate_decls): Update for new/updated structures.
(poplevel): Use SET_DECL_SHADOWED_FOR_VAR.
* decl2.c (start_static_initialization_or_destruction): Deal with
priority.
* pt.c (tsubst_decl): Check TS_DECL_WRTL before doing
SET_DECL_RTL.
* tree.c (handle_init_priority_attribute): Handle priority.
2005-07-08 Daniel Berlin <dberlin@dberlin.org>
* objc-act.c (objc_push_parm): DECL_ARG_TYPE_AS_WRITTEN is
removed.
* objc-act.h (KEYWORD_ARG_NAME): Use decl_non_common.
(KEYWORD_KEY_NAME): Use decl_minimal.
(METHOD_SEL_NAME): Ditto..
(METHOD_SEL_ARGS): Use decl_non_common.
(METHOD_ADD_ARGS): Ditto.
(METHOD_ADD_ARGS_ELLIPSIS_P): Use decl_common.
(METHOD_DEFINITION): Ditto.
(METHOD_ENCODING): Ditto.
* objc-lang.c: (objc_init_ts): New function.
2005-07-08 Daniel Berlin <dberlin@dberlin.org>
* trans-decl.c (create_function_arglist): DECL_ARG_TYPE_AS_WRITTEN
is removed.
From-SVN: r101799
|
|
have type "__builtin_ObjCString".
[gcc/ChangeLog]
2005-06-29 Ziemowit Laski <zlaski@apple.com>
* config/darwin.c (machopic_select_section): constant ObjC string
objects now always have type "__builtin_ObjCString".
[gcc/objc/ChangeLog]
2005-06-29 Ziemowit Laski <zlaski@apple.com>
* objc-act.c (objc_build_internal_const_str_type): New function.
(check_string_class_template): Use objc_get_class_ivars() instead
of TYPE_FIELDS() to retrieve ivar list.
(AT_LEAST_AS_LARGE_AS): Check the size of each field's type rather
than the field itself.
(objc_build_string_object): Synthesize a "__builtin_ObjCString"
type and use it to lay out compile-time string objects.
* objc-act.h (OCTI_INTERNAL_CNST_STR_TYPE, internal_const_str_type):
New.
[gcc/testsuite/ChangeLog]
2005-06-29 Ziemowit Laski <zlaski@apple.com>
* obj-c++.dg/const-str-1[0-1].mm: New.
* objc.dg/const-str-1[0-1].m: New.
From-SVN: r101437
|
|
From-SVN: r101309
|
|
* objc-act.c (objc_build_struct): New function.
(objc_derived_from_p): Likewise.
(objc_build_component_ref): Likewise.
(objc_copy_binfo): Likewise.
(objc_xref_basetypes): Likewise.
(objc_lookup_protocol): Likewise.
(objc_compare_protocols): Likewise.
(objc_volatilize_decl): Likewise.
(encode_aggregate_fields): Likewise.
(volatilized_hash): Likewise.
(volatilized_eq): Likewise.
(objc_compare_types): Likewise.
(objc_type_quals_match): Likewise.
(DERIVED_FROM_P): New ObjC macro, corresponding to C++ macro
of same name.
(get_class_ivars): Add second parameter indicating if entire
hierarchy is desired.
(struct volatilized_type): New type.
(volatilized_htab): New hash table.
(objc_types_compatible_p, objc_comptypes): Remove functions.
(synth_module_prologue): Do not initialize 'unused_list'.
(objc_get_class_reference): Fix ObjC++ impedance mismatches.
(objc_declare_alias): Implement as a typedef.
(objc_substitute_decl, objc_gimplify_expr): Reformat.
(objc_get_class_ivars): Adjust call to get_class_ivars().
(next_sjlj_build_enter_and_setjmp, synth_forward_declarations,
build_ivar_reference, get_super_receiver): Call
objc_build_component_ref() instead of build_component_ref().
(objc_begin_catch_clause): Use DERIVED_FROM_P() instead of
objc_comptypes().
(build_private_template): Call objc_build_struct() instead of
start_struct() and finish_struct().
(hash_init): Initialize volatilized_htab.
(objc_is_public): Adjust calls to objc_get_ivars(); adjust
ObjC++ impedance mismatches.
(encode_aggregate_within): Streamline by calling
encode_aggregate_fields().
* objc-act.h (objc_types_compatible_p): Remove prototype.
(OCTI_UNUSED_LIST, unused_list): Remove slot.
* objc-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Remove.
From-SVN: r100123
|
|
* objc-act.c (objc_finish_try_stmt): Add return value.
(objc_build_synchronized): Likewise.
* objc-act.c (objc_is_gcable_type): Add.
(objc_substitute_decl): Add.
(objc_build_ivar_assignment): Add.
(objc_build_global_assignment): Add.
(objc_build_strong_cast_assignment): Add.
(objc_is_ivar_reference_p): Add.
(objc_is_global_reference_p): Add.
(objc_generate_write_barrier): Add.
(objc_rewrite_function_call): Add.
(objc_gimplify_expr): Add Objective-C++ support.
* objc-act.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Likewise.
(SIZEOF_OBJC_TYPE_LANG_SPECIFIC): Add.
(INIT_TYPE_OBJC_INFO): Add Objective-C++ support.
(DUP_TYPE_OBJC_INFO): Likewise.
(struct imp_entry): Add field has_cxx_cdtors.
(struct imp_entry *imp_list): Add OCTI_UMSG_FAST_DECL,
OCTI_METH_LIST_TEMPL, OCTI_METH_PROTO_LIST_TEMPL,
OCTI_IVAR_LIST_TEMPL, OCTI_ASSIGN_IVAR_DECL,
OCTI_ASSIGN_IVAR_FAST_DECL, OCTI_ASSIGN_GLOBAL_DECL,
OCTI_ASSIGN_STRONGCAST_DECL.
(umsg_fast_decl): Add.
(objc_assign_ivar_decl): Add.
(objc_assign_ivar_fast_decl): Add.
(objc_assign_global_decl): Add.
(objc_assign_strong_cast_decl): Add.
(objc_method_list_ptr): Add.
(objc_method_proto_list_ptr): Add.
(objc_ivar_list_ptr): Add.
* objc-act.c (should_call_super_dealloc): Add.
(OBJC_VERSION): Bump to 6.
(objc_is_gcable_type): Add.
(objc_substitute_decl): Add.
(objc_build_ivar_assignment): Add.
(objc_build_global_assignment): Add.
(objc_build_strong_cast_assignment): Add.
(objc_is_gcable_p): Add.
(objc_is_ivar_reference_p): Add.
(objc_is_global_reference_p): Add.
(generate_shared_structures): Add flags parameter.
(objc_generate_cxx_ctor_or_dtor): Add.
(objc_generate_cxx_cdtors): Add.
(add_class): Add name parameter.
(objc_types_share_size_and_alignment): Add.
(comp_proto_with_proto): Add strict parameter.
(CLS_HAS_CXX_STRUCTORS): Add.
(TAG_ASSIGNIVAR): Add.
(TAG_ASSIGNGLOBAL): Add.
(TAG_ASSIGNSTRONGCAST): Add.
(TAG_MSGSEND_FAST): Add.
(TAG_ASSIGNIVAR_FAST): Add.
(TAG_CXX_CONSTRUCT): Add.
(TAG_CXX_DESTRUCT): Add.
(OBJC_LOOKUP_CLASS): Add.
(OBJC_LOOKUP_NO_SUPER): Add.
(objc_finish_file): Add pch support.
(objc_finish_implementation): Add Objective-C++ support.
(synth_module_prologue): Likewise.
(synth_module_prologue): Add fast dispatching.
(objc_get_class_reference): Add Objective-C++ support.
(objc_generate_write_barrier): Likewise.
(next_sjlj_build_enter_and_setjmp): Likewise.
(objc_begin_try_stmt): Likewise.
(build_next_objc_exception_stuff): Add fast ivar support.
(build_private_template): Mark the record as used so debug
information is generated.
(build_protocol_template): Add Objective-C++ support.
(objc_method_parm_type) Likewise.
(objc_generate_cxx_ctor_or_dtor): Likewise.
(objc_generate_cxx_cdtors): Likewise.
(build_protocol_initializer): Likewise.
(build_category_template): Likewise.
(build_class_template): Likewise.
(build_method_list_template): Likewise.
(build_category_initializer): Likewise.
(build_shared_structure_initializer): Likewise.
(objc_finish_message_expr): Likewise.
(build_objc_method_call): Add fast dispatch support.
(lookup_method_static): Add support to end search at superclasses.
(add_method_to_hash_list): Add strict parameter to
comp_proto_with_proto.
(objc_add_method): Likewise.
(objc_add_method): Also set the interface_value.
(add_instance_variable): Add Objective-C++ support.
(objc_is_public): Likewise.
(start_class): Likewise.
(continue_class): Likewise.
(encode_aggregate_within): Likewise.
(start_method_def): Likewise.
(objc_start_function): Clear current_function_returns_value
and current_function_returns_null.
(really_start_method): Add Objective-C++ support.
(objc_finish_method_definition): Add warning for missing
[super dealloc].
(finish_objc): Add Objective-C++ support.
(generate_objc_image_info): Likewise.
(objc_lookup_ivar): Likewise.
* objc-act.h (TYPE_HAS_OBJC_INFO): Likewise.
(INIT_TYPE_OBJC_INFO): Likewise.
(DUP_TYPE_OBJC_INFO): Likewise.
From-SVN: r99857
|
|
* c-common.h (objc_build_method_signature): Update prototype.
* stub-objc.c (objc_build_method_signature): Update the stub
implementation to accept and ignore additional parameter.
* c-parser.c (c_parser_objc_method_decl): Reorgnize to pass
the value of ellipsis to objc_build_method_signature instead
of setting TREE_OVERFLOW on the parms TREE_LIST node.
* objc-act.h (METHOD_ADD_ARGS_ELLIPSIS_P): New macro for accessing
this field of an objc method decl.
* objc-act.c (build_method_decl): Take an additional "ellipsis"
argument, and set METHOD_ADD_ARGS_ELLIPSIS_P as appropriate.
(objc_build_method_signature): Accept additional "ellipsis"
argument and pass it to build_method_decl.
(get_arg_type_list, start_method_def, gen_method_decl): Use
the new METHOD_ADD_ARGS_ELLIPSIS_P instead of examining the
TREE_OVERFLOW field of a TREE_LIST node.
From-SVN: r98528
|
|
2005-04-13 Dale Johannesen <dalej@apple.com>
* objc/Make-lang.in (objc-lang.o): Depend on tree-gimple.h.
(objc-act.o): Ditto.
* objc/objc-act.c (objc_gimplify_expr): New.
(objc_get_callee_fndecl): New.
* objc/objc-act.h: Include tree-gimple.h. Declare new functions.
* objc/objc-lang.c (LANG_HOOKS_GIMPLIFY_EXPR): Define.
(LANG_HOOKS_GET_CALLEE_FNDECL): Define.
From-SVN: r98105
|
|
* lang-specs.h, objc-act.c, objc-act.h, objc-lang.c: Update
copyright.
From-SVN: r94408
|
|
2005-01-25 Alexander Malmberg <alexander@malmberg.org>
PR objc/18408
* objc-act.c (objc_types_compatible_p): New function.
* objc-act.h (objc_types_compatible_p): Declare.
* objc-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.
From-SVN: r94199
|
|
[gcc/objc/ChangeLog]
2004-12-15 Ziemowit Laski <zlaski@apple.com>
* objc-act.c (build_private_template): Change to return 'void'; do
not set ivar_context, uprivate_record or objc_instance_type.
(objc_comptypes, gen_type_name_0): For types 'id' and 'Class',
retrieve protocol list from the pointee rather than the pointer itself;
check TYPE_HAS_OBJC_INFO(...) precondition before accessing
TYPE_OBJC_PROTOCOL_LIST.
(objc_get_protocol_qualified_type): For types 'id' and 'Class',
construct a variant of the pointee as well as the pointer, and
store protocol information in the former. When creating variants
of RECORD_TYPEs, clone their TYPE_LANG_SPECIFIC fields and propagate
TYPE_OBJC_INTERFACE information.
(objc_declare_class): If a TYPE_DECL is looked up, retrieve the
underlying RECORD_TYPE to check for presence of TYPE_OBJC_INTERFACE;
for newly-created RECORD_TYPEs, create a tentative TYPE_OBJC_INTERFACE
holding an IDENTIFIER_NODE.
(objc_finish_message_expr): Check TYPE_HAS_OBJC_INFO(...) before
accessing TYPE_OBJC_PROTOCOL_LIST; Use TYPE_OBJC_INTERFACE instead
of calling lookup_interface(); allow for TYPE_OBJC_INTERFACE holding
an IDENTIFIER_NODE (meaning a @class forward-declaration only).
(objc_is_public): Check TYPE_OBJC_INTERFACE instead of calling
lookup_interface().
(continue_class): For @implementations, set ivar_context,
uprivate_record and objc_instance_type, for @interfaces, call
build_private_template().
(encode_pointer): Check TYPE_HAS_OBJC_INFO(...) before accessing
TYPE_OBJC_INTERFACE.
(objc_types_are_equivalent): Check TYPE_HAS_OBJC_INFO(...) before
accessing TYPE_OBJC_PROTOCOL_LIST.
* objc-act.h (OBJC_INFO_SLOT_ELTS, TYPE_OBJC_INFO, INIT_TYPE_OBJC_INFO,
DUP_TYPE_OBJC_INFO, ALLOC_OBJC_TYPE_LANG_SPECIFIC,
SIZEOF_OBJC_TYPE_LANG_SPECIFIC): New macros.
(TYPE_OBJC_INTERFACE): Replaces TREE_STATIC_INSTANCE and now points
to an actual @interface; stored in TYPE_LANG_SPECIFIC(...).
(TYPE_OBJC_PROTOCOL_LIST): Replaces TYPE_PROTOCOL_LIST; stored in
TYPE_LANG_SPECIFIC(...).
(TREE_STATIC_INSTANCE, TYPE_PROTOCOL_LIST): Delete.
(IS_ID, IS_CLASS, IS_PROTOCOL_QUALIFIED_UNTYPED, IS_SUPER,
TYPED_OBJECT): Check for POINTER_TYPE rather than POINTER_TYPE_P;
adjust for use of TYPE_OBJC_INTERFACE and TYPE_OBJC_PROTOCOL_LIST
instead of TREE_STATIC_INSTANCE and TYPE_PROTOCOL_LIST.
From-SVN: r92239
|
|
[gcc/ChangeLog]
2004-10-25 David Ayers <d.ayers@inode.at>
* c-common.h: Remove RID_ID.
* c-parse.in: Remove OBJECTNAME and references to RID_ID.
(typespec_reserved_attr): Add rule for TYPENAME
non_empty_protocolrefs.
(yylexname): Remove special handling of RID_ID.
[gcc/objc/ChangeLog]
2004-10-25 Ziemowit Laski <zlaski@apple.com>
David Ayers <d.ayers@inode.at>
* objc-act.c (objc_comptypes): Use IS_PROTOCOL_QUALIFIED_UNTYPED
instead of IS_PROTOCOL_QUALIFIED_ID; add comparisons for:
'Class <Protocol> != id <Protocol>'; 'Class <Protocol> != <class> *';
'Class <Protocol> == id' and 'Class <Protocol> == Class'.
(objc_is_id): Add test for 'super'.
(objc_finish_message_expr): Allow for messaging of 'Class <Proto>'
receivers; if class methods are not found in protocol lists, search
for instance methods therein and warn if one is found. Look in
global hash tables for suitable method as a last resort when messaging
'id <Proto>', 'Class <Proto>' and invalid receiver types.
(objc_add_method): Insert instance methods listed in protocols into
the global class method hash table.
* objc-act.h (IS_PROTOCOL_QUALIFIED_ID): Rename to
IS_PROTOCOL_QUALIFIED_UNTYPED and allow for 'Class <Proto>' in
addition to 'id <Proto>'.
[gcc/testsuite/ChangeLog]
2004-10-25 David Ayers <d.ayers@inode.at>
Ziemowit Laski <zlaski@apple.com>
* objc.dg/call-super-2.m: Add messages to 'Class <Proto>'; update
diagnostics when messaging 'id <Proto>'.
* objc.dg/class-protocol-1.m: New test.
* objc.dg/desig-init-1.m: Add message to an invalid receiver using
a non-existent method signature.
* objc.dg/method-5.m, objc.dg/method-6.m, objc.dg/proto-hier-1.m:
Update diagnostics when messaging with non-existent method signature.
* objc.dg/proto-hier-2.m: Adjust wording of diagnostic.
* objc.dg/proto-lossage-1.m, objc.dg/proto-lossage-4.m: Messages to
invalid receivers are now resolved as if messaging 'id'; remove
extraneous diagnostics.
From-SVN: r89562
|
|
[gcc/objc/ChangeLog]
2004-09-21 Ziemowit Laski <zlaski@apple.com>
* objc-act.c (objc_fold_objc_type_ref): New function.
* objc-act.h (objc_fold_objc_type_ref): New prototype.
From-SVN: r87838
|
|
[gcc/ChangeLog]
2004-09-07 Ziemowit Laski <zlaski@apple.com>
* Makefile.in (c-parse.o): Depend on $(C_COMMON_H).
* c-parse.in: Include c-common.h instead of objc-act.h.
(ivar_decl_list, ivar_decls, ivar_decl, ivars, ivar_declarator,
myparms, myparm): Remove %type declarations.
(methodtype, optparms, OBJC_TYPE_QUAL, objc_quals, objc_qual,
objc_typename, objc_try_catch_stmt, optellipsis): Add %type
declarations.
(objc_inherit_code, objc_public_flag): Remove.
(typespec_nonreserved_nonattr): Call
objc_get_protocol_qualified_type() instead of get_static_reference()
and get_protocol_reference().
(stmt_nocomp): Call grokparm() on @catch parameter.
(objcdef): Move semantic action to objc_finish_implementation().
(classdef): Move semantic action to objc_start_class_interface(),
objc_continue_interface(), objc_finish_interface(),
objc_start_class_implementation(), objc_continue_implementation(),
objc_start_category_interface() and
objc_start_category_implementation().
(protocoldef): Move semantic actions to objc_start_protocol() and
objc_finish_interface().
(ivar_decl_list): Remove nonterminal.
(visibility_spec): Move semantic actions to objc_set_visibility().
(ivar_decls): Remove assignment to $$.
(ivar_decl): Rephrase in terms of component_decl; call
objc_add_instance_variable().
(ivars, ivar_declarator): Remove nonterminals.
(opt_semi): New nonterminal.
(methodtype): Remove semantic actions.
(methoddef): Move semantic actions to objc_set_method_type(),
objc_start_method_definition() and objc_finish_method_definition().
(methodproto): Move semantic actions to objc_set_method_type() and
objc_add_method_declaration().
(methoddecl): Use objc_typename instead of typename; move semantic
actions to objc_build_method_signature().
(optarglist, myxdecls, mydecl, myparms, myparm): Remove nonterminals.
(optparmlist): Express in terms of optparms and optellipsis.
(optparms, optellipsis, objc_qual, objc_quals, objc_typename): New
nonterminals.
(keyworddecl): Use objc_typename instead of typename.
(rid_to_yy): Mark RID_IN, RID_OUT, RID_INOUT, RID_BYCOPY, RID_BYREF
and RID_ONEWAY as returning OBJC_TYPE_QUAL to yyparse().
[gcc/objc/ChangeLog]
2004-09-07 Ziemowit Laski <zlaski@apple.com>
* Make-lang.in (objc/objc-parse.o): Depend on $(C_COMMON_H) instead of
objc/objc-act.h.
(objc/objc-act.o): Depend on $(HASHTAB_H).
* objc-act.c: Include hashtab.h; in ObjC++ mode, include cp-tree.h and
objcp-decl.h instead of c-tree.h.
(build_module_descriptor, get_class_ivars, synth_id_with_class_suffix,
error_with_ivar, gen_method_decl, gen_declaration, setup_string_decl,
build_protocol_template): Adjust prototypes.
(build_module_initializer_routine, start_class, continue_class,
finish_class, start_method_def, objc_start_function, start_protocol,
build_method_decl, objc_add_method, add_instance_variable,
build_ivar_reference, is_ivar, is_private, get_super_receiver,
build_selector_table_decl, objc_push_parm, objc_get_parm_info,
gen_type_name, gen_type_name_0, start_var_decl, finish_var_decl,
create_field_decl): New prototypes.
(objc_expand_function_end, comp_method_with_proto, objc_expr_last,
gen_declaration_1, gen_declarator, is_complex_decl, adorn_decl,
define_decl, create_builtin_decl, gen_declspecs): Remove prototypes.
(TYPE_ID): Rename to OBJECT_TYPEDEF_NAME.
(CLASS_TYPEDEF_NAME): New.
(TAG_EXECCLASS): Change from a global variable to a #define.
(TAG_RETURN_STRUCT): Delete.
(TAG_GNUINIT): New, holds '__objc_gnu_init' name.
(objc_inherit_code, objc_public_flag): New, moved from c-parse.in.
(string_descriptor): New struct.
(string_htab): New hash table.
(string_hash, string_eq): New prototypes.
(generate_struct_by_value_array): Call create_field_decl() instead of
create_builtin_decl().
(objc_init): Do not initialize objc_ellipsis_node or TAG_EXECCLASS;
In ObjC++ mode, call cxx_init() instead of c_objc_common_init().
(objc_finish_file): In ObjC++, call instantiate_pending_templates()
and cp_finish_file().
(define_decl, get_static_reference, get_protocol_reference,
create_builtin_decl): Remove functions.
(objc_start_class_interface, objc_start_category_interface,
objc_start_protocol, objc_continue_interface, objc_finish_interface,
objc_start_class_implementation, objc_start_category_implementation,
objc_continue_implementation, objc_finish_implementation,
objc_set_visibility, objc_set_method_type,
objc_build_method_signature, objc_add_method_declaration,
objc_start_method_definition, objc_add_instance_variable,
objc_get_protocol_qualified_type, create_field_decl,
start_var_decl, finish_var_decl): New functions.
(setup_string_decl): Simplify since it is only called once.
(synth_module_prologue): Call build_class_template(); predefine 'id'
and 'Class' as typedefs; rename 'temp_type' to 'type'; disable debug
hooks for duration of function; fix GNU runtime messenger signatures
to correspond to reality; forward-declare '__objc_exec_class' for the
GNU runtime; call build_selector_table_decl(); in ObjC++ mode, generate
'extern "C" { ... }' wrappers around synthesized declarations; call
build_protocol_template() and build_category_template().
(string_hash, string_eq): New functions.
(objc_build_string_object): Check metaclass correctness only once;
store string literals in hash table.
(objc_build_constructor): Do not convert initializer elements;
adjust for ObjC++ impedance mismatch.
(build_objc_symtab_template): Call create_field_decl() instead of
create_builtin_decl().
(init_objc_symtab): Add missing conversion to initializer element.
(build_metadata_decl): Call start_var_decl() instead of define_decl().
(generate_objc_symtab_decl): Do not call build_category_template();
call start_var_decl() and finish_var_decl() instead of start_decl()
and finish_decl().
(build_module_descriptor): Call create_field_decl() instead of
grokfield(); call start_var_decl() and finish_var_decl() instead of
start_decl() and finish_decl(); always mark module descriptor as
used; move GNU runtime-specific functionality to
build_module_initializer_routine().
(build_module_initializer_routine): New function, broken off of
build_module_descriptor().
(objc_static_init_needed_p, objc_generate_static_init_call): New
functions.
(generate_static_references, generate_strings,
build_selector_translation_table, generate_descriptor_table,
generate_ivars_list, generate_dispatch_table, generate_category): Call
start_var_decl() and finish_var_decl() instead of start_decl() and
finish_decl(); build a type directly instead of via groktypename().
(build_selector_reference_decl, build_selector_table_decl,
build_class_reference_decl, build_protocol_reference,
generate_objc_image_info): Call start_var_decl() instead of
build_decl().
(build_selector_reference): For GNU runtime, do not call
build_selector_reference_decl().
(build_selector, build_typed_selector_reference): Always convert
result to the selector type.
(add_objc_string): Cast return value to 'char *'.
(build_method_prototype_template, build_selector_template,
build_method_template): Use actual selector type for fields
pointing to selectors.
(finish_objc): For GNU runtime, call
build_module_initializer_routine() after build_module_descriptor().
(generate_protocol_list, generate_shared_structures): Call
start_var_decl() and finish_var_decl() instead of start_decl() and
finish_decl(); build a type directly instead of via
groktypename().
(synth_id_with_class_suffix): Return a string.
(get_arg_type_list): For instance methods, use the instance type for
'self'; do not call groktypename_in_parm_context().
(build_objc_string_decl): Squash redeclaration errors in ObjC++.
(objc_is_class_name): Use OBJC_TYPE_NAME instead of TYPE_NAME;
handle RECORD_TYPEs in ObjC as well as ObjC++.
(objc_is_id): New function.
(objc_is_object_ptr): Return the canonical type node.
(objc_get_class_ivars): Simplify using get_class_ivars().
(get_class_ivars): Remove second parameter; create a fresh copy
of the ivar list for each call; do not check for existence of
super class.
(objc_eh_runtime_type): Mark #ifndef OBJCPLUS.
(objc_init_exceptions): When using SJLJ-style exceptions, require
the use of '-fobjc-exceptions' flag; do not require it for DWARF-style
exceptions.
(objc_build_exc_ptr, next_sjlj_build_try_catch_finally): Use
objc_object_type instead of objc_id_type.
(objc_begin_catch_clause): Convert the incoming PARM_DECL into
a VAR_DECL before placing it in the appropriate scope; do not
call define_decl(); adjust call to c_begin_compound_stmt();
use objc_object_type instead of objc_id_type.
(build_next_objc_exception_stuff): Call create_field_decl() instead
of create_builtin_decl(); construct type directly instead of calling
groktypename(); use OBJC_VOID_AT_END to mark end of function parameters.
(build_private_template): Adjust call to get_class_ivars(); build
a type directly instead of via groktypename().
(build_protocol_template, build_method_prototype_list_template,
build_method_prototype_template, build_category_template,
build_selector_template, build_class_template, build_super_template,
build_ivar_template, build_ivar_list_template,
build_method_list_template, build_method_template):
Call create_field_decl() instead of grokfield().
(objc_method_parm_type): Do not call groktypename().
(generate_descriptor_table): Call start_var_decl() and
finish_var_decl() instead of start_decl() and finish_decl().
(generate_method_descriptors, build_protocol_initializer,
generate_dispatch_tables, build_category_initializer,
build_shared_structure_initializer): Do not call groktypename().
(generate_protocols): Call start_var_decl() and finish_var_decl()
instead of start_decl() and finish_decl(); do not call groktypename().
(error_with_ivar): Remove last parameter.
(check_ivars): Do not iterate ovar CLASS_RAW_IVARS lists in addition
to CLASS_IVARS lists; adjust calls to error_with_ivar().
(generate_ivar_lists): Convert one of the initializer elements; do
not call groktypename().
(get_arg_type_list, start_method_def, gen_method_def): Account for
new representation of variable arguments and '...' in Objective-C
methods; add Objective-C++ impedance matching code.
(is_objc_type_qualifier): Remove function.
(adjust_type_for_id_default): Simplify; there is no longer a need to
wade through declspecs.
(lookup_interface, start_class, continue_class,
finish_class, start_method_def, start_protocol, build_method_decl,
objc_add_method, add_instance_variable, build_ivar_reference,
is_ivar, is_private, get_super_receiver, objc_build_finally_epilogue):
Make into static functions.
(receiver_is_class_object): Use new IS_CLASS() macro.
(objc_build_message_expr): Tweak ObjC++ message argument handling;
call objc_finish_message_expr() instead of finish_message_expr().
(finish_message_expr): Rename to objc_finish_message_expr(); use
OBJC_TYPE_NAME and OBJC_SET_TYPE_NAME macros instead of TYPE_NAME.
call gen_type_name() instead of gen_declaration(); call objc_is_id()
instead of using IS_ID and IS_CLASS; Use objc_class_name instead of
calling get_identifier("Class"); handle CONVERT_EXPRs in receiver.
(build_objc_method_call, warn_with_method): Do not call groktypename().
(build_ivar_reference): Call convert() instead of clobbering in a
type.
(hash_init): Initialize string_htab hash table.
(add_instance_variable): Simplify parameter list; do not call grokfield();
do not populate CLASS_IVARS list.
(start_class): Check for the existence of super class, if one was specified.
(continue_class): Use CLASS_RAW_IVARS rather than CLASS_IVARS; do not
call build_class_template(); adjust call to get_class_ivars(); call
build_decl(), pushdecl() and finish_decl() instead of define_decl().
(finish_class): Call build_decl(), pushdecl() and finish_decl() instead
of define_decl().
(add_protocols): Use PROTOCOL_BINFO_ELTS for the tree vector size.
(start_protocol): Do not call build_protocol_template(); use
PROTOCOL_BINFO_ELTS for the tree vector size.
(encode_type_qualifiers): Do not handle the 'const' qualifier here.
(encode_pointer): Encode 'const char *' as 'r*', for backwards
compatibility.
(encode_array): Use HOST_WIDE_INT_PRINT_DEC instead of "%ld".
(encode_type): Handle the 'const' qualifier here.
(objc_parmlist): New global variable, sued by objc_push_parm and
objc_get_parm_info().
(objc_push_parm, objc_get_parm_info): New functions.
(objc_expr_last): Remove function.
(synth_self_and_ucmd_args): For instance methods, use the instance
type for 'self'; call objc_push_parm() instead of push_parm_decl().
(start_method_def): Do not call push_scope(), declare_parm_level(),
pop_scope(), push_parm_decl(), store_parm_decls() or objc_expr_last();
just use objc_push_parm() and objc_get_parm_info().
(comp_method_with_proto): Remove function.
(objc_types_are_equivalent): Strip away indirections before comparing
underlying types.
(comp_proto_with_proto): Do not call groktypename(); types are no
longer in raw declspec format.
(objc_start_function): New function.
(really_start_method): Call comp_proto_with_proto() instead of
comp_method_with_proto(); call objc_start_function() instead of
hand-crafting a function declarator.
(continue_method_def, objc_expand_function_end): Remove functions.
(get_super_receiver): Call objc_get_current_scope() instead of
get_current_scope(); reference 'super_class' field (instead of
'class').
(finish_method_def): Rename to objc_finish_method_definition() and
add a function decl parameter; move method encoding call from
objc_expand_function_end().
(is_complex_decl, adorn_decl, gen_declarator, gen_declspecs,
gen_declaration_1): Remove functions.
(tmpbuf, RAW_DECLSPEC): Remove.
(gen_declaration): Remove second parameter; simplify to deal
with TYPE_P nodes instead of raw declspecs.
(gen_type_name, gen_type_name_0): New functions.
(gen_method_decl): Remove second parameter; call gen_type_name()
instead of gen_declaration_1().
(dump_interface): Adjust calls to gen_declaration() and
gen_method_decl(); do not allocate a separate string buffer.
(init_objc): Allocate a larger string buffer to accommodate
dump_interface(); adjust call to build_module_descriptor();
add call to build_module_initializer_routine() for the GNU
runtime.
(generate_classref_translation_entry): Do not call start_decl(); call
finish_var_decl() instead of finish_decl(); call convert() instead of
build_c_cast().
* objc-act.h (CLASS_OWN_IVARS): Remove accessor.
(CLASS_BINFO_ELTS): Reduce from 6 to 5, now that CLASS_OWN_IVARS is
gone.
(OCTI_GNU_INIT_DECL, GNU_INIT_decl): New.
(OCTI_ELLIPSIS_NODE, objc_ellipsis_node): Remove.
(OCTI_ID_ID, id_type, objc_id_id): Rename to OCTI_ID_NAME,
objc_object_type and objc_object_name, respectively.
(OCTI_CLS_REF, OCTI_CLASS_NAME, objc_class_reference,
objc_class_name): New.
(IS_CLASS): New macro.
(IS_ID, IS_SUPER): Robustify.
(OCTI_EXECCLASS_DECL, execclass_decl): New.
(finish_file, start_class, continue_class, finish_class,
start_method_def, continue_method_def, finish_method_def,
start_protocol, finish_protocol, objc_build_throw_stmt,
objc_build_try_catch_finally_stmt, objc_build_synchronized_prologue,
objc_build_synchronized_epilogue, objc_build_try_prologue,
objc_build_try_epilogue, objc_build_catch_stmt, objc_build_catch_epilogue,
objc_build_finally_prologue, objc_build_finally_epilogue,
is_ivar, is_private, is_public, add_instance_variable, objc_add_method,
get_super_receiver, objc_clear_super_receiver, get_class_ivars_from_name,
get_class_reference, get_static_reference, get_object_reference,
build_message_expr, finish_message_expr, build_selector_expr,
build_ivar_reference, build_keyword_decl, build_method_decl,
build_protocol_expr, build_objc_string_object, objc_declare_alias,
objc_declare_class, objc_declare_protocols, objc_comptypes,
objc_check_decl, build_encode_expr): Remove prototypes.
(imp_count, cat_count): Make GGC-aware.
(OBJC_SET_TYPE_NAME): New macro.
From-SVN: r87168
|
|
[gcc/ChangeLog]
2004-09-01 Ziemowit Laski <zlaski@apple.com>
* c-parse.in (primary): Call objc_build_message_expr(),
objc_build_selector_expr(), objc_build_protocol_expr(),
objc_build_encode_expr() and objc_build_string_object() instead of
build_message_expr(), build_selector_expr(), build_protocol_expr(),
build_encode_expr() and build_objc_string_object(), respectively.
(component_decl_list2): Call objc_get_class_ivars() instead of
get_class_ivars_from_name().
(keyworddecl): Call objc_build_keyword_decl() instead of
build_keyword_decl().
(receiver): Call objc_get_class_reference() instead of
get_class_reference().
(reswords): Add blank line before @@ifobjc section, for clarity.
[gcc/objc/ChangeLog]
2004-09-01 Ziemowit Laski <zlaski@apple.com>
* objc-act.c (objc_check_decl): Use OBJC_TYPE_NAME macro instead of
TYPE_NAME.
(build_objc_string_object): Rename to objc_build_string_object().
(get_class_reference): Rename to objc_get_class_reference().
(get_class_ivars_from_name): Rename to objc_get_class_ivars().
(next_sjlj_build_catch_list, get_super_receiver): Call
objc_get_class_reference() instead of get_class_reference().
(build_keyword_decl): Rename to objc_build_keyword_decl().
(build_message_expr): Rename to objc_build_message_expr().
(build_protocol_expr): Rename to objc_build_protocol_expr().
(build_selector_expr): Rename to objc_build_selector_expr().
(build_encode_expr): Rename to objc_build_encode_expr().
* objc-act.h (get_class_ivars_from_name): Rename prototype to
objc_get_class_ivars().
(get_class_reference): Rename prototype to objc_get_class_reference().
(build_message_expr): Rename prototype to objc_build_message_expr().
(build_selector_expr): Rename prototype to objc_build_selector_expr().
(build_keyword_decl): Rename prototype to objc_build_keyword_decl().
(build_protocol_expr): Rename prototype to objc_build_prototype_expr().
(build_objc_string_object): Rename prototype to
objc_build_string_object().
From-SVN: r86950
|
|
* c-decl.c (c_init_decl_processing): Adjust
build_common_tree_nodes call.
* expmed.c (const_mult_add_overflow_p): Use
build_distinct_type_copy.
* stor-layout.c (early_type_list): Remove.
(layout_type): Don't append to early_type_list.
(initialize_sizetypes): Add signed_p argument.
(set_sizetype): Overwrite the stub type nodes directly.
* tree.c (copy_node_stat): Clear a type's value cache here ...
(build_distinct_type): ... not here.
(build_common_tree_nodes): Add signed_sizetype argument. Adjust.
* tree.h (initialize_sizetypes): Add signed_p argument.
(build_common_tree_nodes): Likewise.
* ada/utils.c (gnat_init_decl_processing): Adjust
build_common_tree_nodes call.
* cp/decl.c (cxx_init_decl_processing): Adjust
build_common_tree_nodes call.
* fortran/f95-lang.c (gfc_init_decl_processing): Adjust
build_common_tree_nodes call.
* java/decl.c (java_init_decl_processing): Adjust
initialize_sizetypes call.
* objc/objc-act.c (get_static_reference): Use
build_variant_type_copy.
(get_protocol_reference): Likewise.
* objc/objc-act.h (TREE_STATIC_TEMPLATE): Use TREE_PRIVATE.
* treelang/treetree.c (treelang_init_decl_processing): Adjust
build_common_tree_nodes call.
From-SVN: r86493
|
|
[gcc/ChangeLog]
2004-08-15 Ziemowit Laski <zlaski@apple.com>
* Makefile.in (C_PRETTY_PRINT_H): Add c-pretty-print.h.
(c-lang.o): Depend on c-objc-common.h.
(c-objc-common.o): Depend on $(C_PRETTY_PRINT_H) and
c-objc-common.h; remove duplicate $(C_TREE_H) dependency.
* c-lang.c: Include c-objc-common.h.
(LANG_HOOKS_FINISH, LANG_HOOKS_INIT_OPTIONS,
LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
LANG_HOOKS_MISSING_ARGUMENT, LANG_HOOKS_POST_OPTIONS,
LANG_HOOKS_GET_ALIAS_SET, LANG_HOOKS_SAFE_FROM_P,
LANG_HOOKS_EXPAND_EXPR, LANG_HOOKS_MARK_ADDRESSABLE,
LANG_HOOKS_PARSE_FILE, LANG_HOOKS_TRUTHVALUE_CONVERSION,
LANG_HOOKS_FINISH_INCOMPLETE_DECL, LANG_HOOKS_UNSAFE_FOR_REEVAL,
LANG_HOOKS_STATICP, LANG_HOOKS_SET_DECL_ASSEMBLER_NAME,
LANG_HOOKS_NO_BODY_BLOCKS, LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL,
LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_FUNCTION_ENTER_NESTED,
LANG_HOOKS_FUNCTION_LEAVE_NESTED, LANG_HOOKS_DUP_LANG_SPECIFIC_DECL,
LANG_HOOKS_DECL_UNINIT, LANG_HOOKS_RTL_EXPAND_STMT,
LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS,
LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING,
LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS,
LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_TYPE_FOR_MODE,
LANG_HOOKS_TYPE_FOR_SIZE, LANG_HOOKS_SIGNED_TYPE,
LANG_HOOKS_UNSIGNED_TYPE, LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE,
LANG_HOOKS_INCOMPLETE_TYPE_ERROR, LANG_HOOKS_TYPE_PROMOTES_TO,
LANG_HOOKS_REGISTER_BUILTIN_TYPE, LANG_HOOKS_WRITE_GLOBALS):
Move to c-objc-common.h.
* c-objc-common.c: Include c-objc-common.h.
* c-objc-common.h: New file.
[gcc/objc/ChangeLog]
2004-08-15 Ziemowit Laski <zlaski@apple.com>
* Make-lang.in (objc/objc-lang.o): Depend on $(C_PRETTY_PRINT_H),
$(DIAGNOSTIC_H), c-objc-common.h and gtype-objc.h, but not on toplev.h.
(objc/objc-parse.o): Do not depend on gtype-objc.h.
* objc-act.c: Do not include gtype-objc.h.
(finish_file): Rename to objc_finish_file().
* objc-act.h (finish_file): Update copyright notice; remove prototype.
* objc-lang.c: Update copyright notice; include diagnostic.h,
c-objc-common.h, c-pretty-print.h and gtype-objc.h; do not include
toplev.h.
(finish_file): New hook routine.
(LANG_HOOKS_FINISH, LANG_HOOKS_INIT_OPTIONS,
LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
LANG_HOOKS_MISSING_ARGUMENT, LANG_HOOKS_POST_OPTIONS,
LANG_HOOKS_GET_ALIAS_SET, LANG_HOOKS_SAFE_FROM_P,
LANG_HOOKS_EXPAND_EXPR, LANG_HOOKS_MARK_ADDRESSABLE,
LANG_HOOKS_PARSE_FILE, LANG_HOOKS_TRUTHVALUE_CONVERSION,
LANG_HOOKS_FINISH_INCOMPLETE_DECL, LANG_HOOKS_UNSAFE_FOR_REEVAL,
LANG_HOOKS_STATICP, LANG_HOOKS_SET_DECL_ASSEMBLER_NAME,
LANG_HOOKS_NO_BODY_BLOCKS, LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL,
LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_FUNCTION_ENTER_NESTED,
LANG_HOOKS_FUNCTION_LEAVE_NESTED, LANG_HOOKS_DUP_LANG_SPECIFIC_DECL,
LANG_HOOKS_DECL_UNINIT, LANG_HOOKS_RTL_EXPAND_STMT,
LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS,
LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING,
LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS,
LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_TYPE_FOR_MODE,
LANG_HOOKS_TYPE_FOR_SIZE, LANG_HOOKS_SIGNED_TYPE,
LANG_HOOKS_UNSIGNED_TYPE, LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE,
LANG_HOOKS_INCOMPLETE_TYPE_ERROR, LANG_HOOKS_TYPE_PROMOTES_TO,
LANG_HOOKS_REGISTER_BUILTIN_TYPE, LANG_HOOKS_WRITE_GLOBALS):
Move to c-objc-common.h.
From-SVN: r86037
|
|
* c-tree.h (TYPE_ACTUAL_ARG_TYPES): Use TYPE_LANG_SLOT_1.
* dwarf2out.c (add_data_member_location_attribute): Check for
TREE_BINFO.
* tree.c (tree_node_kinds): Add "binfos".
(binfo_lang_slots): New.
(make_node_stat): Add TREE_BINFO.
(make_tree_binfo_stat): New.
(tree_node_structure): Add TREE_BINFO.
* tree.def (TREE_BINFO): New.
* tree.h (REC_OR_UNION_CHECK): Rename to ...
(RECORD_OR_UNION_CHECK): ... here.
(NOT_RECORD_OR_UNION_CHECK): New.
(TRE_VIA_VIRTUAL): Allow TREE_LIST or TREE_BINFO.
(TYPE_FIELDS, TYPE_METHODS, TYPE_VFIELD): Adjust for
RECORD_OR_UNION_CHECK.
(TYPE_BINFO): Use RECORD_OR_UNION_CHECK.
(TYPE_LANG_SLOT_1): New.
(BINFO_TYPE, BINFO_OFFSET, BINFO_VTABLE, BINFO_VIRTUALS,
BINFO_BASETYPES, TYPE_BINFO_BASETYPES, BINFO_VPTR_FIELD,
BINFO_BASEACCESSES, BINFO_INHERITANCE_CHAIN): Adjust.
(BINFO_ELTS): Remove.
(BINFO_LANG_SLOT): New.
(struct tree_binfo): New.
(binfo_lang_slots): Declare.
(enum tree_node_structure_enum): Add TS_BINFO.
(union tree_node): Add binfo.
(make_tree_binfo_stat): Declare.
(make_tree_binfo): New.
(enum tree_node_kind): Add binfo_kind.
* cp/call.c (enforce_access): Expect TREE_BINFO.
* cp/class.c (binfo_ctor_vtable): Check TREE_BINFO.
* cp/cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
(BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
Adjust.
(BINFO_LANG_ELTS): Remove.
(BINFO_LANG_SLOTS): New.
(TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
(CLASSTYPE_TEMPLATE_INFO): Adjust.
* cp/pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
* cp/search.c (lookup_member): Check TREE_BINFO.
* cp/semantics.c (perform_or_defer_access_check): Likewise.
(check_accessibility_of_qualified_id): Check
deferred_access_no_check.
* cp/tree.c (make_binfo): Use make_tree_binfo.
* java/class.c (make_class): Use make_tree_binfo.
(set_super_info, add_interface_do): Likewise.
* java/java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
* objc/objc-act.c (start_class, objc_declare_protocols,
start_protocols): Use TYPE_LANG_SLOT_1.
* objc/objc-act.h (CLASS_BINFO_ELTS, PROTOCOL_BINFO_ELTS): Rename
to ...
(CLASS_LANG_SLOT_ELTS, PROTOCOL_LANG_SLOT_ELTS): ... here.
(CLASS_IVARS, CLASS_RAW_IVARS, CLASS_STATIC_TEMPLATE,
CLASS_CATEGORY_LIST, CLASS_PROTOCOL_LIST, CLASS_OWN_IVARS,
PROTOCOL_LIST, PROTOCOL_FORWARD_DECL): Use TYPE_LANG_SLOT_1.
From-SVN: r84110
|
|
* c-decl.c (c_in_iteration_stmt, c_in_case_stmt): Remove.
(c_break_label, c_cont_label): New.
(start_function): Update initializations.
(c_push_function_context): Update saves.
(c_pop_function_context): Update restores.
* c-parse.in: Update expected conflicts.
(stmt_count, compstmt_count): Remove. Remove all updates.
(if_prefix, simple_if, do_stmt_start): Remove.
(lineno_labeled_stmt): Remove.
(lineno_labels): New.
(c99_block_lineno_labeled_stmt): Use it.
(lineno_stmt, lineno_label): Don't clear EXPR_LOCUS before calling
annotate_with_locus.
(select_or_iter_stmt): Replace by ...
(condition, if_statement_1, if_statement_2, if_statement,
start_break, start_continue, while_statement, do_statement,
for_cond_expr, for_incr_expr, for_statement, switch_statement): New.
(stmt): Split out ...
(stmt_nocomp): ... this. Use c_finish_bc_stmt, c_finish_goto_label,
c_finish_goto_ptr.
* c-semantics.c (add_stmt): Don't add line numbers to labels.
* c-tree.h: Update prototypes.
(struct language_function): Remove x_in_iteration_stmt, x_in_case_stmt;
add x_break_label, x_cont_label, x_switch_stack.
(c_switch_stack): Declare.
* c-typeck.c (c_finish_goto_label, c_finish_goto_ptr): New.
(c_finish_return): Return the statement.
(c_switch_stack): Rename from switch_stack; export.
(if_elt, if_stack, if_stack_space, if_stack_pointer): Remove.
(c_begin_if_stmt, c_finish_if_cond, c_finish_then, c_begin_else,
c_finish_else): Remove.
(c_finish_if_stmt): Rewrite to perform the entire operation.
(c_begin_while_stmt, c_finish_while_stmt_cond, c_finish_while_stmt,
c_begin_for_stmt, c_finish_for_stmt_init, c_finish_for_stmt_cond,
c_finish_for_stmt_incr, c_finish_for_stmt): Remove.
(c_finish_loop): New.
(c_finish_bc_stmt): New.
(c_finish_expr_stmt): Return the statement. Split out...
(c_process_expr_stmt): ... this. Don't add locus to error marks.
* gimplify.c (gimplify_cond_expr): Accept NULL type statements.
* tree-gimple.c (is_gimple_stmt): Likewise.
* tree-pretty-print.c (dump_generic_node <COND_EXPR>): Likewise.
(print_struct_decl): Delete empty compound statement.
* objc/objc-act.c (objc_build_throw_stmt): Return the statement.
* objc/objc-act.h: Update decl.
From-SVN: r83620
|
|
2004-06-20 David Ayers <d.ayers@inode.at>
* objc/objc-act.h (get_object_reference): Rename to
get_protocol_reference.
(super_type): Rename to objc_super_type.
(selector_type): Rename to objc_selector_type.
(id_type): Rename to objc_id_type.
(instance_type): Rename to objc_instance_type.
(protocol_type): Rename to objc_protocol_type.
(IS_ID): Update reference to id_type.
* objc/objc-act.c (get_object_reference): Rename to
get_protocol_reference; add documentation; update references to
id_type.
(lookup_method_in_protocol_list): Rename class_meth to
is_class; add documentation.
(finish_message_expr): Rename is_class to class_tree.
(synth_module_prologue, objc_is_object_ptr, objc_build_exc_ptr,
next_sjlj_build_try_catch_finally, objc_begin_catch_clause,
build_next_objc_exception_stuff, get_arg_type_list,
build_objc_method_call): Update references to id_type.
(synth_module_prologue, build_objc_symtab_template,
build_selector_reference_decl, build_selector,
build_selector_translation_table, build_typed_selector_reference,
get_arg_type_list, synth_self_and_ucmd_args, get_arg_type_list,
synth_self_and_ucmd_args): Update references to selector_type.
(build_private_template, build_ivar_reference): Update references
to instance_type.
(synth_module_prologue, build_protocol_reference,
build_protocol_expr, start_protocol): Update references to
protocol_type.
(synth_module_prologue, get_arg_type_list, build_objc_method_call):
Update references to super_type.
* c-parse.in: (typespec_nonreserved_nonattr): Update
references to get_object_reference.
* objc/objc-tree.def: Add C mode identifier sequence.
From-SVN: r83425
|
|
* c-common.c (flag_objc_sjlj_exceptions): New.
* c-common.h (flag_objc_sjlj_exceptions): Declare.
* c-opts.c (c_common_handle_option): Set it.
(c_common_post_options): Handle interation of different
objective-c exception and runtime switches.
* c-decl.c (c_eh_initialized_p): New.
(finish_decl): Use it instead of local eh_initialized_p.
* c-parse.in (nested_function, notype_nested_function): Record
the result of compstmt.
(compstmt_or_error): Likewise.
(compstmt): Don't add_stmt the result.
(stmt): Don't return anything. Rewrite objc try and sync rules.
(objc_try_stmt, objc_catch_list): Remove.
(objc_catch_block, objc_finally_block): Remove.
(objc_catch_prefix, objc_catch_clause, objc_opt_catch_list): New.
(objc_try_catch_clause, objc_finally_clause): New.
(objc_try_catch_stmt): Rewrite.
* c-tree.h (c_eh_initialized_p): Declare.
* c-opt (fobjc-sjlj-exceptions): New.
* except.c (output_function_exception_table): Don't call cgraph
on non-decls.
* objc/objc-act.c (UTAG_EXCDATA_VAR, UTAG_CAUGHTEXC_VAR,
UTAG_RETHROWEXC_VAR, UTAG_EVALONCE_VAR, struct val_stack,
catch_count_stack, exc_binding_stack, if_nesting_count,
blk_nesting_count, objc_enter_block, objc_exit_block,
objc_declare_variable, val_stack_push, val_stack_pop,
objc_build_try_enter_fragment, objc_build_extract_expr,
objc_build_try_exit_fragment, objc_build_extract_fragment,
objc_build_try_prologue, objc_build_try_epilogue,
objc_build_catch_stmt, objc_build_catch_epilogue,
objc_build_finally_prologue, objc_build_finally_epilogue,
objc_build_try_catch_finally_stmt, objc_build_synchronized_prologue,
objc_build_synchronized_epilogue): Remove.
(objc_create_temporary_var, struct objc_try_context, cur_try_context,
objc_eh_runtime_type, objc_init_exceptions, objc_build_exc_ptr,
next_sjlj_build_try_exit, next_sjlj_build_enter_and_setjmp,
next_sjlj_build_exc_extract, next_sjlj_build_catch_list,
next_sjlj_build_try_catch_finally, objc_begin_try_stmt,
objc_begin_catch_clause, objc_finish_catch_clause,
objc_build_finally_clause, objc_finish_try_stmt,
objc_build_synchronized): New.
(objc_is_object_id, objc_is_class_id): New.
(objc_comptypes): Use them.
(build_next_objc_exception_stuff): Break NeXT sjlj out from
build_objc_exception_stuff.
(synth_module_prologue): Update to match.
(objc_build_throw_stmt): Use cur_try_context to decide if
we're in a @catch.
* objc/objc-act.h: Update prototypes.
(OCTI_EXCEPTION_BLK_STACK, objc_exception_block_stack): Remove.
testsuite/
* objc.dg/sync-1.m: New.
* objc.dg/try-catch-1.m: Don't force next runtime.
* objc.dg/try-catch-3.m, objc.dg/try-catch-4.m: Likewise.
* objc.dg/try-catch-2.m: Likewise. Enable everywhere. Remove
shadowed catch clause.
* objc.dg/try-catch-5.m: New.
From-SVN: r83332
|
|
* c-parse.in (OFFSETOF, offsetof_member_designator): New.
(primary): Handle offsetof. Add error productions for faux functions.
Move component_ref objc checking to build_component_ref.
(reswords): Add offsetof.
(rid_to_yy): Add offsetof.
* c-tree.h (build_offsetof): Declare.
* c-common.h (objc_is_public): Declare.
* c-typeck.c (build_component_ref): Check objc_is_public.
(build_offsetof): New.
* stub-objc.c (objc_is_public): New.
* objc/objc-act.c, objc/objc-act.h (objc_is_public): Rename
from is_public.
* ginclude/stddef.h (offsetof): Use __builtin_offsetof.
* doc/extend.texi (Offsetof): Move from C++ section to C section
and rewrite for __builtin_offsetof.
cp/
* lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
* parser.c (struct cp_parser): Remove in_offsetof.
(cp_parser_new): Don't set it.
(cp_parser_unary_expression): Don't check it.
(cp_parser_postfix_open_square_expression): Split out from ...
(cp_parser_postfix_expression): ... here.
(cp_parser_postfix_dot_deref_expression): Likewise.
(cp_parser_builtin_offsetof): New.
(cp_parser_primary_expression): Use it.
testsuite/
* g++.dg/template/dependent-expr4.C: Use __builtin_offsetof.
From-SVN: r82549
|
|
* c-tree.h: Forward declare struct c_binding. Declare
c_override_bindings_to_false. Update prototypes.
(struct lang_identifier): Update comments. Change fields to be
struct c_binding *.
(IDENTIFIER_SYMBOL_VALUE, IDENTIFIER_TAG_VALUE)
(IDENTIFIER_LABEL_VALUE, C_DECL_INVISIBLE)
(KEEP_NO, KEEP_YES, KEEP_MAYBE): Delete.
(C_DECL_IN_EXTERNAL_SCOPE, C_DECL_DECLARED_BUILTIN): New.
* c-common.h: Update prototypes.
* c-decl.c (struct c_scope): Update commentary. Remove names,
names_last, parms, parms_last, tags, and shadowed fields. Add
bindings and depth fields.
(scope_freelist): Move to more appropriate location.
(c_print_identifier): Update for changes to struct lang_identifier.
(objc_mark_locals_volatile): Update for new bindings structures.
(global_bindings_p): Honor c_override_global_bindings_to_false.
(pushlevel): Rename to push_scope; take no arguments; use the
scope_freelist; initialize scope->depth and check for overflow.
(poplevel): Rename to pop_scope; totally rewritten for new bindings
structures.
(diagnose_mismatched_decls): Use C_DECL_DECLARED_BUILTIN, not
C_DECL_INVISIBLE, for certain decisions. Adjust some diagnostics.
Improve some commentary. Adjust handling of forward parm decls.
(merge_decls): Set C_DECL_DECLARED_BUILTIN when appropriate.
Preserve C_DECL_IN_EXTERNAL_SCOPE.
(warn_if_shadowing): Correct indentation. Improve diagnostics.
(pushdecl): Remove unnecessary assertion. Short-circuit anonymous
decls. Rewrite for new bindings structures. Improve commentary.
Eliminate the copy_node call.
(implicit_decl_warning): Use the "diag" idiom (as seen in
locate_old_decl) to reduce code duplication; call locate_old_decl
if appropriate. Relocate to remove need for forward declaration.
(implicitly_declare): Adjust for new bindings structures. Kludge
around Objective-C not-really-builtin functions.
(undeclared_variable): Improve diagnostics. If current_function_decl
is nonnull but current_function_scope is null, use current_scope.
Use bind.
(lookup_tag): Adjust for new bindings structures. Kludge around
Objective-C's tag declarations that wind up in the external scope.
(lookup_name): Adjust for new bindings structures. Kludge around
c-common.c's pseudo-typedefs that wind up in the external scope.
(lookup_name_current_level): Rename lookup_name_in_scope; take a
second argument indicating the scope to examine; rewrite for
new bindings structures.
(c_init_decl_processing): Adjust for renamed functions. Do not
initialize current_file_decl, first_builtin_decl, last_builtin_decl.
First scope pushed is the external scope, not the global scope.
(builtin_function): Use bind, not pushdecl. Adjust other bits
for new data structures. Keep track of builtins that should be
made visible automatically.
(start_decl): Adjust diagnostics. Remove unnecessary call to
expand_decl.
(grokparms): Return 0 if arg_types is error_mark_node.
(get_parm_info): Rename "void_at_end" argument to "ellipsis", with
reversed sense. Rewrite for new bindings structures. Do not
leave any decls in the scope, to prevent pop_scope from doing
contradictory things with them.
(finish_struct, finish_enum): Remove redundant diagnostics.
(build_enumerator): Don't cascade diagnostics for error_mark_node.
Mark location where -pedantic changes the meaning of the program.
(store_parm_decls_newstyle, store_parm_decls_oldstyle): Load the
parameter decls into the function's scope structure using bind.
Warn here about function definitions in the wrong style.
Adjust diagnostics.
(store_parm_decls): Correct the determination of whether a
function was defined with a prototype.
(c_write_global_declarations): Operate on all file decls and on
the external scope. Split body of the loop to...
(c_write_global_declarations_1): ... this new function, to avoid
code duplication.
(truly_local_externals, first_builtin_decl, last_builtin_decl)
(make_scope, pop_scope, in_parm_level_p, set_block)
(any_external_decl, record_external_decl, bind_label, getdecls)
(link_hash_hash, link_hash_eq, merge_translation_unit_decls)
(c_reset_state): Delete.
(visible_builtins, c_override_global_bindings_to_false)
(c_binding, I_SYMBOL_BINDING, I_SYMBOL_DECL, I_TAG_BINDING)
(I_TAG_DECL, I_LABEL_BINDING, I_LABEL_DECL, file_scope)
(external_scope, binding_freelist, bind, free_binding_and_advance)
(push_file_scope, pop_file_scope): New.
(pushtag, pushdecl_top_level, lookup_label, declare_label)
(define_label, c_make_fname_decl, finish_decl)
(mark_forward_parm_decls, build_compound_literal)
(grokdeclarator, start_function, check_for_loop_decls)
(identifier_global_value, record_builtin_type): Minor adjustments
for new bindings structures. Improve diagnostics and commentary.
* c-objc-common.c (start_cdtor, finish_cdtor): Adjust calls to
pushlevel/poplevel respectively.
(c_objc_common_finish_file): Don't call merge_translation_unit_decls.
* c-opts.c (c_common_parse_file): Remove spurious ATTRIBUTE_UNUSED.
Warn about YYDEBUG not being defined only if -dy. Remove no-longer-
correct loop over multiple translation units; call fatal_error if
requested to compile more than one file at once. (This disables
IMA temporarily - an up-front error being preferable to a crash.)
* c-parse.in (pushlevel, poplevel rules): Rename push_scope, pop_scope.
(all actions): Adjust calls to pushlevel/poplevel.
(parsing_iso_function_signature): Delete.
(extdef_1): Fold into extdef.
(old_style_parm_decls_1): Fold into old_style_parm_decls. Don't
warn here about function definitions in the wrong style.
(after_tyle_declarator, parm_declarator_starttypename)
(parm_declarator_nostarttypename, notype_declarator): Remove
commented-out productions.
(parmlist_1, parmlist_2): Use make_node, not tree_cons, to create
an empty TREE_LIST node. Adjust calls to get_parm_info.
(parmlist_2 : ELLIPSIS): Tag the arg-info block with error_mark_node
to suppress -Wold-style-definition after this error.
(c_parse_file): Don't clear the binding stack or call
finish_fname_decls here. Correct comment.
* c-typeck.c (same_translation_unit_p): Export.
(common_type): Use c_override_global_bindings_to_false, not
pushlevel/poplevel/declare_parm_level.
* c-lang.c: Override LANG_HOOKS_CLEAR_BINDING_STACK,
LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_POPLEVEL, LANG_HOOKS_SET_BLOCK,
and LANG_HOOKS_GETDECLS with do-nothing stubs.
* objc/objc-lang.c: Likewise.
* objc/objc-act.c: Adjust all calls to pushlevel, poplevel,
get_parm_info.
(OBJC_VOID_AT_END): Delete; replace all uses
with void_list_node.
(generate_forward_declaration_to_string_table): Delete.
* objc/objc-act.h (OCTI_STRG_DECL, UOBJC_STRINGS_decl): Delete.
* coverage.c (create_coverage): Don't pushdecl anything.
* langhooks.c (lhd_clear_binding_stack): Call
lang_hooks.decls.poplevel, not poplevel.
* tree.c (list_length): If ENABLE_TREE_CHECKING, abort on a
circular list rather than going into an infinite loop.
cp:
* cp-lang.c (c_reset_state): Delete.
(push_file_scope, pop_file_scope): New stubs.
* parser.c (c_parse_file): Call sorry() here if called more than once.
testsuite:
* gcc.dg/Wold-style-definition-1.c, gcc.dg/builtins-30.c
* gcc.dg/unused-4.c, gcc.dg/noncompile/label-1.c
* gcc.dg/noncompile/label-lineno-1.c, objc.dg/naming-1.m:
Adjust error regexps.
* gcc.dg/Wshadow-2.c, gcc.dg/noncompile/incomplete-3.c
* gcc.dg/noncompile/undeclared-1.c: New test cases.
* gcc.dg/decl-5.c, gcc.dg/redecl-1.c: Remove XFAIL.
* gcc.dg/local1.c: Add explanatory comment.
From-SVN: r79883
|
|
2003-10-14 Ziemowit Laski <zlaski@apple.com>
* c-parse.in (methoddef, methodproto): Call objc_add_method()
instead of add_method().
* objc/objc-act.c (objc_check_decl): Do not check for
constant_string_type.
(add_method): Rename to objc_add_method().
(really_start_method): Call objc_add_method() instead of
add_method().
* objc/objc-act.h (add_method): Rename to objc_add_method().
From-SVN: r72506
|
|
2003-09-24 Ziemowit Laski <zlaski@apple.com>
MERGE OF objc-improvements-branch into MAINLINE.
See 'gcc/ChangeLog' and 'gcc/testsuite/ChangeLog' for
the gory details.
From-SVN: r71748
|
|
* objc/objc-act.c: Convert to ISO C90 prototypes.
* objc/objc-act.h: Likewise.
From-SVN: r71371
|
|
* objc/objc-act.h (CLASS_SUPER_NAME): Add a little typechecking.
(TYPE_PROTOCOL_LIST): Share use of type.context with C frontend.
(SET_TYPE_PROTOCOL_LIST): New.
* objc/objc-act.c (get_static_reference): Use SET_TYPE_PROTOCOL_LIST.
(get_object_reference): Likewise.
From-SVN: r69364
|
|
* c-common.h (c_common_init, c_common_post_options): Update.
* c-objc-common.c (c_objc_common_init): Update for new prototype.
* c-opts.c (saved_lineno): New.
(c_common_post_options, c_common_init): Update prototypes,
move call to cpp_read_main_file from latter to former.
* c-tree.h (c_ojbc_common_init): Update.
* langhooks-def.h (lhd_post_options): New.
(LANG_HOOKS_INIT, LANG_HOOKS_POST_OPTIONS): Update.
* langhooks.c (lhd_post_options): New.
* langhooks.h (struct lang_hooks): Update post_options and init hooks.
* toplev.c (no_backend): New.
(process_options): Call post_options hook and set main_input_filename
and input_filename here.
(lang_dependent_init, do_compile): post_options hook moved to
process_options.
* objc/objc-act.c (objc_init): Update prototype.
* objc/objc-act.h (objc_init): Update prototype.
ada:
* misc.c (gnat_init): Update for new prototype.
cp:
* cp-tree.h (cxx_init): Update prototype.
* lex.c (cxx_init): Similarly.
f:
* com.c (ffe_init): Update prototype; move code to ffe_post_options.
(ffe_post_options): New.
java:
* lang.c (java_init): Update prototype, move code to java_post_options.
(java_post_options): Similarly.
treelang:
* tree1.c (in_fname): Fix type.
(treelang_init): Update prototype and use of in_fname.
* treelang.h (in_fname): Fix type.
* treetree.c (tree_code_if_start, tree_code_if_else,
tree_code_if_end, tree_code_create_function_prototype,
tree_code_create_function_initial, tree_code_create_funciton_wrapup,
tree_code_create_variable, tree_code_output_expression_statement)
: Fix prototypes and use of filenames.
* treetree.h: Similarly.
From-SVN: r64001
|
|
2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
* cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
cp/lang-options.h, cp/lang-specs.h, cp/lex.h,
cp/ptree.c, cp/repo.c,
java/jcf-reader.c, java/jvgenmain.c,
java/keyword.gperf, java/lang-options.h,
java/mangle.c, java/mangle_name.c,
java/xref.c, java/zextract.c,java/zipfile.h,
objc/Make-lang.in, objc/config-lang.in,
objc/lang-specs.h, objc/objc-act.h: Fix
Copyright years.
From-SVN: r60783
|
|
* objc/Make-lang.in, objc/config-lang.in, objc/lang-options.h,
objc/lang-specs.h, objc/objc-act.c, objc/objc-act.h,
objc/objc-lang.c, objc/objc-tree.def: Replace "GNU CC" with
"GCC" in the copyright header.
From-SVN: r60742
|
|
[gcc]
2002-08-19 Ziemowit Laski <zlaski@apple.com>
* objc/objc-act.c (build_ivar_chain): Remove.
(objc_copy_list): Likewise.
(get_class_ivars): Inline call to removed build_ivar_chain
function. Save off a clean copy of ivars in the CLASS_OWN_IVARS
slot; use that slot (rather than CLASS_IVARS) when accessing
ivars for base classes. Call copy_list and chainon instead of
objc_copy_list.
(build_private_template): Call get_class_ivars instead of
build_ivar_chain.
(start_class): Allocate room for the CLASS_OWN_IVARS slot.
(continue_class): Call get_class_ivars instead of
build_ivar_chain.
(encode_field_decl): Check for DECL_BIT_FIELD_TYPE instead
of DECL_BIT_FIELD (which may have been cleared).
* objc/objc-act.h (CLASS_OWN_IVARS): New accessor macro.
[gcc/testsuite]
2002-08-19 Ziemowit Laski <zlaski@apple.com>
* objc.dg/bitfield-1.m: New test.
* objc.dg/bitfield-2.m: New test.
From-SVN: r56451
|
|
* Makefile.in (c-opts.o, c-common.o, C_AND_OBJC_OBJS): Update.
* c-common.c: Don't include tree-inline.h.
(c_common_init_options, c_common_post_options): Move to c-opts.c.
* c-common.h (c_common_decode_option): New.
* c-decl.c (c_decode_option): Remove.
* c-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
* c-opts.c: New file.
* c-tree.h (c_decode_option): Remove.
* doc/passes.texi: Update.
* objc/objc-act.c (objc_decode_option): Remove.
* objc/objc-act.h (objc_decode_option): Remove.
* objc/ojbc-lang.c (LANG_HOOKS_DECODE_OPTION): Use
c_common_decode_option.
cp:
* Make-lang.in (CXX_C_OBJS): Update.
* cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
* cp-tree.h (cxx_decode_option): Remove.
* decl2.c (compare_options, lang_f_options, unsupported_options,
cxx_decode_option): Remove.
testsuite:
* objc.dg/const-str-2.m: Update.
* gcc.dg/cpp/c++98.c: Change to C extension.
* gcc.dg/cpp/c++98-pedantic.c: Similarly.
* gcc.dg/cpp/cpp.exp: Process .C extensions too.
From-SVN: r56105
|
|
2002-07-02 Ziemowit Laski <zlaski@apple.com>
* c-parse.in (designator): Enable designated initializers if ObjC.
(objcmessageexpr): Remove references to objc_receiver_context.
* objc/objc-act.h (objc_receiver_context): Remove decl.
* objc/objc-act.c (objc_receiver_context): Remove.
(lookup_objc_ivar): Test objc_method_context instead of
objc_receiver_context.
2002-07-02 Ziemowit Laski <zlaski@apple.com>
* objc.dg/desig-init-1.m: New test.
From-SVN: r55192
|
|
From-SVN: r54232
|
|
* Makefile.in: Update.
* c-common.c: Include langhooks.h.
(inline_forbidden_p): Use new hook.
* diagnostic.c: Include langhooks.h.
(format_with_decl, announce_function,
default_print_error_function): Use new hook.
* dwarf2out.c (dwarf2_name): Use new hook.
* function.c: Include langhooks.h.
(init_function_start): Use new hook.
* langhooks-def.h (lhd_decl_printable_name): New.
(LANGHOOKS_DECL_PRINTABLE_NAME): New.
(LANGHOOKS_INITIALIZER): Update.
* langhooks.c (lhd_decl_printable_name): New.
* langhooks.h (struct lang_hooks): New hook.
* toplev.c (decl_name, decl_printable_name): Remove.
(open_dump_file): Use new hook.
(process_options): Remove old hook.
* tree.h (decl_printable_name): Remove.
ada:
* misc.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
(gnat_init): Remove old hook.
cp:
* cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
* cp-tree.h (lang_printable_name): Rename.
* error.c (lang_decl_name): Use new hook.
* lex.c (cxx_init): Remove old hook.
* pt.c (tsubst_expr): Use new hook.
* tree.c (lang_printable_name): Rename.
f:
* com.c (lang_printable_name): Rename.
(LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
(ffe_init): Don't use old hook.
java:
* decl.c (start_java_method): Use new hook.
* lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
(java_init): Remove old hook.
objc:
* objc-act.c (objc_init): Remove old hook.
(objc_printable_name): Export.
* objc-act.h (objc_printable_name): New.
* objc-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
From-SVN: r51066
|
|
* objc/Make-lang.in: Update copyright.
(OBJC_OBJS): Add objc-lang.o.
(objc-lang.o): New rule.
* objc/config-lang.in: Fix file description and update
copyright.
* objc/objc-act.c: Do not include langhooks.h and
langhooks-def.h
(lang_hooks): Move (along with LANG_HOOKS...) to objc-lang.c.
(objc_post_options): Move to objc-lang.c.
(objc_init_options): Move to objc-lang.c.
(objc_init): Make non-static.
(HASHFUNCTION): Remove macro.
(hash_func): New function.
(hash_enter): Replace HASHFUNCTION with hash_func.
(hash_lookup): Replace HASHFUNCTION with hash_func.
(maybe_objc_tree_codes): New function.
(init_objc): Move ObjC tree code initialization to
maybe_objc_tree_codes().
* objc/objc-act.h (GCC_OBJC_ACT_H): New include guard.
(objc_init): New public prototype.
(objc_decode_option): New public prototype.
(maybe_add_objc_tree_codes): New public prototype.
* objc/objc-lang.c: New file.
(lang_hooks): Moved from objc-act.c.
(objc_post_options): Moved from objc-act.c.
(objc_init_options): Moved from objc-act.c.
From-SVN: r47575
|
|
2001-10-03 Ziemowit Laski <zlaski@apple.com>
* c-parse.in (objc_inherit_code, objc_pq_context,
objc_public_flag): Make static.
(objc_interface_context, objc_implementation_context,
objc_method_context, objc_ivar_chain, objc_ivar_context): Move to
global tree array in objc/objc-act.[ch].
(methoddef): Remove unnecessary code.
* objc/objc-act.c: (hashed_attribute, hashed_entry, imp_entry):
Hoist struct definitions to objc-act.h.
(nst_method_hash_list, cls_method_hash_list, imp_list, imp_count,
cat_count): Place declaration in objc-act.h.
(objc_tree_index): Move enumeration to objc-act.h.
(objc_global_trees): Place declaration and macro accessors in
objc-act.h.
(implementation_context): Remove duplicate; use
objc_implementation_context instead:
(method_context): Remove duplicate; use objc_method_context
instead.
(objc_ellipsis_node, objc_method_prototype_template,
implemented_classes, function_type): Move global vars to
objc_global_trees.
(init_objc): Use LAST_BASE_TREE_CODE instead of LAST_CODE.
(build_message_expr): Move actual construction of ObjC message
send nodes to finish_message_expr.
(finish_message_expr): New routine, contains code formerly in
build_message_expr.
* objc/objc-act.h (finish_message_expr): New prototype.
(objc_ivar_chain, objc_method_context, objc_ellipsis_node): Remove
declarations; these vars are now part of objc_global_trees.
(objc_tree_index, objc_global_trees): Move definitions from
objc-act.c.
* objc/objc-tree.def: Update copyright info.
From-SVN: r46000
|
|
contextualizing Objective-C class name lookup by the...
2001-08-01 Ziemowit Laski <zlaski@apple.com>
* c-parse.in (OBJC_NEED_RAW_IDENTIFIER): Define macro and flag for
contextualizing Objective-C class name lookup by the lexer.
(typespec_reserved_nonattr): Disable ObjC class name lookup after
seeing a TYPESPEC.
(protocoldef): Add support for forward @protocol declarations.
(yylexname): Suppress ObjC class name lookup in certain contexts;
re-enable after lookup is complete.
(_yylex): Re-enable ObjC class name lookup when certain
punctuation marks are seen.
* objc/objc-act.c (check_protocol_recursively): New function used
for finding circular dependencies in protocols.
(objc_declare_protocols): New function for handling forward
@protocol declarations.
(receiver_is_class_object): Detect the case when 'self' is used
inside of a class method.
(build_message_expr): Issue a warning if class method is desired
but instance method is found instead.
(conforms_to_protocol): Streamline.
(objc_comptypes): Detect the fact that 'Bar<Foo> foo' conforms to
protocol Foo, even if 'Bar foo' does not.
(check_protocols): Streamline.
(start_protocol): Add checks for circular and duplicate protocol
definitions.
(encode_aggregate_within): For typedefs of structs, encode the
underlying struct.
* objc/objc-act.h (PROTOCOL_DEFINED): New tree accessor.
(objc_declare_protocols): New prototype.
From-SVN: r44536
|
|
* splay-tree.c (splay_tree_predecessor): Fix typo in comment.
Convert the C front-end to use function-at-a-time mode.
* c-common.h: Include splay-tree.h.
(C_DECLARED_LABEL_FLAG): New macro.
(struct language_function): Add x_scope_stmt_stack and
x_function_name_declared_p.
(RECHAIN_STMTS): Move definition.
(lang_statment_code_p): Likewise.
(lang_expand_stmt): Likewise.
(lang_expand_decl_stmt): New variable.
(lang_expand_function_end): Likewise.
(current_scope_stmt_stack): New function.
(add_decl_stmt): Likewise.
(add_scope_stmt): Likewise.
(mark_stmt_tree): Likewise.
(struct c_lang_decl): New structure.
(DECL_SAVED_TREE): Define.
(c_mark_lang_decl): New function.
(c_expand_start_cond): Change prototype.
(c_finish_then): New function.
(c_finish_else): Likewise.
(current_function_name_declared): Remove.
(set_current_function_name_declared): Likewise.
(mark_c_language_function): Declare.
(case_compare): Likewise.
(c_add_case_label): Likewise.
(c_expand_expr): Likewise.
(c_safe_from_p): Likewise.
* c-common.c (lang_expand_function_end): New variable.
(struct if_elt): Add if_stmt.
(c_expand_start_cond): Add the if-statement to the statement-tree,
rather than generating RTL.
(c_finish_then): New function.
(c_expand_start_else): Don't generate RTL.
(c_finish_else): New function.
(c_expand_expr_stmt): Don't generate RTL.
(statement_code_p): Add SCOPE_STMT.
(case_compare): New function.
(c_add_case_label): Likewise.
(mark_stmt_tree): Likewise.
(c_mark_lang_decl): Likewise.
(mark_c_language_function): Likewise.
(c_expand_expr): Likewise.
(c_safe_from_p): Likewise.
* c-decl.c (c_stmt_tree): New variable
(c_scope_stmt_stack): Likewise.
(c_function_name_declared_p): Likewise.
(lang_expand_expr_stmt): Remove.
(poplevel): Don't call output_inline_function for nested
functions.
(pushdecl): Don't set DECL_CONTEXT for a local declaration of an
`extern' function.
(redeclaration_error_message): Change means of computing whether
or not a function is nested.
(lookup_label): Don't call label_rtx.
(init_decl_processing): Add more GC roots.
(start_decl): Add DECL_STMTs to the statement-tree, rather than
calling rest_of_decl_compilation.
(finish_decl): Don't call expand_decl.
(store_parm_decls): Begin the statement-tree, but don't generate
RTL.
(finish_function): Tie off the statement-tree. Call c_expand_body
if appropriate.
(c_expand_body): New function.
(push_c_function_context): Save more information.
(pop_c_function_contxt): Likewise.
(copy_lang_decl): Now that we use DECL_LANG_SPECIFIC, copy it.
(lang_mark_tree): Mark it.
(current_stmt_tree): Adjust.
(current_scope_stmt_stack): New function.
(do_case): Remove.
(set_current_name_declared): Likewise.
(c_begin_compound_stmt): Define.
(c_expand_decl_stmt): Likewise.
* c-lang.c: Include rtl.h and expr.h.
(lang_init): Set more language-specific hooks.
* c-lex.c: Include expr.h.
* c-parse.in: Changes throughout to add statements to the
statement-tree, rather than generating RTL after every statement.
* c-semantics.c (lang_expand_decl_stmt): Define.
(add_decl_stmt): New function.
(add_scope_stmt): Likewise.
(finish_stmt_tree): Tweak.
(genrtl_expr_stmt): Likewise.
(genrtl_decl_stmt): Handle local labels, and call
lang_expand_decl_stmt if required.
(genrtl_for_stmt): Fix line-number handling.
(genrtl_case_label): Handle cleanups.
(genrtl_asm_stmt): Don't call combine_strings.
(genrtl_compound_stmt): Simplify.
(expand_stmt): Handle SCOPE_STMTs.
* c-tree.h (struct lang_decl): New structure.
(C_DECLARED_LABEL_FLAG): Remove.
(c_begin_compound_stmt): Declare.
(c_expand_decl_stmt): Likewise.
(c_expand_start_case): Rename to c_start_case.
(c_finish_case): New function.
* c-typeck.c (start_init): Tweak setting of
constructor_incremental.
(c_expand_asm_operands): Tweak error-handling. Add to the
statement-tree.
(c_expand_return): Add to the statement-tree.
(c_expand_start_case): Rename to ...
(c_start_case): ... this.
(struct c_switch): New type.
(switch_stack): New variable.
(do_case): Simplify.
(c_finish_case): New function.
* dependence.c: Include expr.h.
(enum dependence_type): Change spelling of enumerals.
(check_node_dependence): Adjust.
* expr.h (lang_safe_from_p): Declare.
(safe_from_p): Likewise.
* expr.c (lang_safe_from_p): New variable.
(safe_from_p): Give it external linkage. Use lang_safe_from_p.
* stmt.c (expand_expr_stmt): Avoid clobberring of last_expr_type.
* toplev.c (rest_of_decl_compilation): Robustify.
* tree.c (contains_placeholder_p): Likewise.
* Makefile.in: Update dependencies.
* objc/objc-act.h: Adjust calculation of value for dummy_tree_code.
* objc/objc-act.c: Include rtl.h, expr.h, and c-common.h.
(objc_expand_function_end): New function.
(finish_method_def): Use it.
(init_objc): Initialize more language-specific hooks.
* objc/Make-lang.in: Update dependencies.
* cp-tree.h (struct cp_language_function): Remove
x_scope_stmt_stack and name_declared.
(current_scope_stmt_stack): Remove.
(function_name_declared_p): New macro.
(struct lang_decl_flags): Use c_lang_decl as a base class.
(context): Remove.
(struct lang_decl): Replace saved_tree with context.
(DECL_FRIEND_CONTEXT): Adjust accordingly.
(SET_DECL_FRIEND_CONTEXT): Likewise.
(DECL_VIRTUAL_CONTEXT): Likewise.
(DECL_SAVED_TREE): Remove.
(C_DECLARED_LABEL_FLAG): Likewise.
(cplus_expand_expr_stmt): Don't declare.
(add_decl_stmt): Likewise.
(add_scope_stmt): Likewise.
* decl.c (mark_stmt_tree): Remove.
(case_compare): Likewise.
(finish_case_label): Use c_add_case_label.
(init_decl_processing): Set more language-specific hooks.
(build_enumerator): Fix typo in comment.
(cplus_expand_expr_stmt): Remove.
(mark_lang_function): Use mark_c_language_function.
(lang_mark_tree): Use c_mark_lang_decl.
* decl2.c: Change order of inclusion.
* except.c: Likewise.
* expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
back on c_expand_expr.
* friend.c: Include expr.h.
* init.c: Change order of inclusion.
* Makefile.in: Update dependencies.
* lex.h (free_lang_decl_chain): Remove.
* optimize.c (maybe_clone_body): Use function_name_declared_p.
* pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
it doesn't exist.
(instantiate_decl): Use function_name_declared_p.
* semantics.c (lang_expand_expr_stmt): Remove.
(set_current_function_name_declared): Likewise.
(current_function_name_declared): Likewise.
(begin_compound_stmt): Use function_name_declared_p.
(add_decl_stmt): Remove.
(setup_vtbl_ptr): Use function_name_declared_p.
(add_scope_stmt): Remove.
(current_scope_stmt_stack): New function.
(cp_expand_stmt): Don't handle SCOPE_STMTs.
(expand_body): Use function_name_declared_p.
* tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
* typeck.c: Change order of includes.
(convert_sequence): Remove.
From-SVN: r36464
|
|
* objc/objc-act.c: Include ggc.h.
(objc_tree_index, objc_global_trees): Convert most of the
static tree variables into a static array with previous names
as defines.
(objc_ellipsis_node): New variable.
(lang_init): Call objc_act_parse_init and c_parse_init.
Create objc_ellipsis_node.
(build_selector_translation_table): Use objc_ellipsis_node instead
of (tree)1.
(hack_method_prototype): Likewise.
(get_arg_type_list): Likewise.
(start_method_def): Likewise.
(continue_method_def): Likewise.
(gen_method_decl): Likewise.
(ggc_mark_imp_list): New function.
(ggc_mark_hash_table): New function.
(objc_act_parse_init): New function.
* objc/objc-act.h (objc_ellipsis_node): Add extern variable.
* c-parse.in (c_parse_init): For objc add roots of objc specific
local tree variables.
* objc/objc-parse.y: Rebuilt.
* objc/objc-parse.c: Rebuilt.
(opt_parm_list): Use objc_ellipsis_node instead of (tree)1.
* Object.m (strlen): Provide prototype on all 64bit platforms,
not only alpha.
* sarray.c (memcpy): Likewise.
* encoding.c (objc_layout_finish_structure): Don't use
ROUND_TYPE_ALIGN on sparc.
From-SVN: r33092
|
|
* c-common.c: PROTO -> PARAMS.
* c-common.h: Likewise.
* c-decl.c: Likewise.
* c-iterate.c: Likewise.
* c-lang.c: Likewise.
* c-lex.c: Likewise.
* c-lex.h: Likewise.
* c-parse.in: Likewise.
* c-pragma.c: Likewise.
* c-pragma.h: Likewise.
* c-tree.h: Likewise.
* c-typeck.c: Likewise.
* objc/objc-act.c: Likewise.
* objc/objc-act.h: Likewise.
From-SVN: r31362
|
|
From-SVN: r9962
|
|
From-SVN: r8747
|
|
PROTOCOL_FORWARD_DECL, TYPE_PROTOCOL_LIST): Rearrange use of type
members to avoid use of noncopied_parts.
From-SVN: r4108
|
|
Add support for protocols, classes, and
strings. Update the runtime targets for the new GNU runtimes as
well as existing NeXT runtimes.
From-SVN: r4069
|
|
From-SVN: r3271
|
|
From-SVN: r135
|