1. 11 Sep, 2012 1 commit
    • Remove unnecessary VEC function overloads. · f32682ca
      Several VEC member functions that accept an element 'T' used to have
      two overloads: one taking 'T', the second taking 'T *'.
      
      This used to be needed because of the interface dichotomy between
      vectors of objects and vectors of pointers.  In the past, vectors of
      pointers would use pass-by-value semantics, but vectors of objects
      would use pass-by-reference semantics.  This is no longer necessary,
      but the distinction had remained.
      
      The main side-effect of this change is some code reduction in code
      that manipulates vectors of objects.  For instance,
      
      -  struct iterator_use *iuse;
      -
      -  iuse = VEC_safe_push (iterator_use, heap, iterator_uses, NULL);
      -  iuse->iterator = iterator;
      -  iuse->ptr = ptr;
      +  struct iterator_use iuse = {iterator, ptr};
      +  VEC_safe_push (iterator_use, heap, iterator_uses, iuse);
      
      Compile time performance was not affected.
      
      Tested on x86_64 and ppc64.
      
      Also built all-gcc on all targets using VEC routines: arm, bfin, c6x,
      epiphany, ia64, mips, sh, spu, and vms.
      
      2012-09-10  Diego Novillo  <dnovillo@google.com>
      
      	* vec.h (vec_t::quick_push): Remove overload that accepts 'T *'.
      	Update all users.
      	(vec_t::safe_push): Likewise.
      	(vec_t::quick_insert): Likewise.
      	(vec_t::lower_bound): Likewise.
      	(vec_t::safe_insert): Likewise.
      	(vec_t::replace): Change second argument to 'T &'.
      
      From-SVN: r191165
      Diego Novillo committed
  2. 15 Aug, 2012 1 commit
    • backport: As described in http://gcc.gnu.org/ml/gcc/2012-08/msg00015.html... · 0823efed
      Merge from cxx-conversion branch (http://gcc.gnu.org/wiki/cxx-conversion).
      
      As described in http://gcc.gnu.org/ml/gcc/2012-08/msg00015.html, this patch
      changes the default bootstrap process so that stage 1 always builds with a C++
      compiler.
      
      Other than the bootstrap change, the patch makes no functional changes to the
      compiler.  Everything should build as it does now in trunk.  The main
      changes in this patch are:
      
      1- Configuration changes.
      2- Re-write of VEC.
      3- Re-write of gengtype to support C++ templates and
         user-provided marking functions.
      4- New hash table class.
      5- Re-write double_int.
      6- Implement tree macros as inline functions so they can be
         called from gdb.
      
      As discussed before, several of these changes do not fully change
      the call sites to use the new APIs.
      
      The bootstrap changes have already been tested on a wide range of
      targets (http://gcc.gnu.org/wiki/CppBuildStatus).  Additionally,
      I have tested the merged trunk on: x86_64-unknown-linux-gnu,
      mips64el-unknown-linux-gnu, powerpc64-unknown-linux-gnu,
      i686-pc-linux-gnu, and ia64-unknown-linux-gnu.
      
      ChangeLog
      2012-08-14   Diego Novillo  <dnovillo@google.com>
      
      	Merge from cxx-conversion branch.
      
      	* Makefile.tpl (STAGE[+id+]_CXXFLAGS): Remove
      	POSTSTAGE1_CONFIGURE_FLAGS.
      	* Makefile.in: Regenerate.
      	* configure.ac (ENABLE_BUILD_WITH_CXX): Remove.  Update all users.
      	Force C++ when bootstrapping.
      	* configure: Regenerate.
      
      
      libcpp/ChangeLog
      2012-08-14   Diego Novillo  <dnovillo@google.com>
      
      	Merge from cxx-conversion branch.  Configury.
      
      	* Makefile.in: Remove all handlers of ENABLE_BUILD_WITH_CXX.
      	* configure.ac: Likewise.
      	* configure: Regenerate.
      
      2012-08-14   Lawrence Crowl  <crowl@google.com>
      
      	Merge from cxx-conversion branch.  New C++ hash table.
      
      	* include/symtab.h (typedef struct ht hash_table): Change the typedef
      	name to cpp_hash_table.  Update all users of the typedef.
      
      gcc/ChangeLog
      2012-08-14   Diego Novillo  <dnovillo@google.com>
      
      	Merge from cxx-conversion branch.  Configury.
      
      	* configure.ac (CXX_FOR_BUILD): Define and substitute.
      	(BUILD_CXXFLAGS): Define.
      	Remove all handlers of ENABLE_BUILD_WITH_CXX.
      	Force all build to be with C++.
      	* Makefile.in (BUILD_CXXFLAGS): Use it.
      	Remove all handlers of ENABLE_BUILD_WITH_CXX.
      	* configure: Regenerate.
      	* config.in: Regenerate.
      	* doc/install.texi: Remove documentation for --enable-build-with-cxx
      	and --enable-build-poststage1-with-cxx.
      
      2012-08-14   Diego Novillo  <dnovillo@google.com>
      
      	Merge from cxx-conversion branch.  Re-implement VEC in C++.
      
      	* vec.c (vec_heap_free): Convert into a template function.
      	(vec_gc_o_reserve_1): Make extern.
      	(vec_gc_p_reserve): Remove.
      	(vec_gc_p_reserve_exact): Remove.
      	(vec_gc_o_reserve): Remove.
      	(vec_gc_o_reserve_exact): Remove.
      	(vec_heap_o_reserve_1): Make extern.
      	(vec_heap_p_reserve): Remove.
      	(vec_heap_p_reserve_exact): Remove.
      	(vec_heap_o_reserve): Remove.
      	(vec_heap_o_reserve_exact): Remove.
      	(vec_stack_p_reserve): Remove.
      	(vec_stack_p_reserve_exact): Remove.
      	* vec.h (VEC_CHECK_INFO, VEC_CHECK_DECL, VEC_CHECK_PASS,
      	VEC_ASSERT, VEC_ASSERT_FAIL, vec_assert_fail): Move earlier
      	in the file.
      	(VEC): Define to vec_t<T>.
      	(vec_allocation_t): Define.
      	(struct vec_prefix): Move earlier in the file.
      	(vec_t<T>): New template.
      	(DEF_VEC_I, DEF_VECL_ALLOC_I, DEF_VEC_P, DEF_VEC_ALLOC_P,
      	DEF_VEC_O, DEF_VEC_ALLOC_P, DEF_VEC_O, DEF_VEC_ALLOC_O,
      	DEF_VEC_ALLOC_P_STACK, DEF_VEC_ALLOC_O_STACK,
      	DEF_VEC_ALLOC_I_STACK): Expand to 'struct vec_swallow_trailing_semi'.
      	(DEF_VEC_A): Provide template instantiations for
      	GC/PCH markers that do not traverse the vector.
      	(vec_stack_p_reserve): Remove.
      	(vec_stack_p_reserve_exact): Remove.
      	(vec_stack_p_reserve_exact_1): Remove.
      	(vec_stack_o_reserve): Remove.
      	(vec_stack_o_reserve_exact): Remove.
      	(vec_stack_free): Re-write as a template function.
      	(vec_reserve): New template function.
      	(vec_reserve_exact): New template function.
      	(vec_heap_free): New template function if GATHER_STATISTICS is
      	defined.  Otherwise, macro that expands to free().
      	(VEC_length_1): New template function.
      	(VEC_length): Call it.
      	(VEC_empty_1): New template function.
      	(VEC_empty): Call it.
      	(VEC_address_1): New template function.
      	(VEC_address): Call it.
      	(VEC_last_1): New template function.
      	(VEC_last): Call it.  Change return type to T&.
      	Change all users that used VEC_Os.
      	(VEC_index_1): New template function.
      	(VEC_index): Call it.  Return a T& instead of a T*.
      	Update all callers that were using VEC_O before.
      	(VEC_iterate_1): New template function.
      	(VEC_iterate): Call it.
      	(VEC_embedded_size_1): New template function.
      	(VEC_embedded_size): Call it.
      	(VEC_embedded_init_1): New template function.
      	(VEC_embedded_init): Call it.
      	(VEC_alloc_1): New template function.
      	(VEC_alloc): Call it.  If A is 'stack', call XALLOCAVAR to
      	do the allocation.
      	(VEC_free_1): New template function.
      	(VEC_free): Call it.
      	(VEC_copy_1): New template function.
      	(VEC_copy): Call it.
      	(VEC_space_1): New template function
      	(VEC_space): Call it.
      	(VEC_reserve_1): New template function.
      	(VEC_reserve): Call it.
      	(VEC_reserve_exact_1): New template function.
      	(VEC_reserve_exact): Call it.
      	(VEC_splice_1): New template function.
      	(VEC_splice): Call it.
      	(VEC_safe_splice_1): New template function.
      	(VEC_safe_splice): Call it.
      	(VEC_quick_push_1): New template function.  Create two overloads, one
      	accepting T, the other accepting T *.  Update all callers
      	where T and T * are ambiguous.
      	(VEC_quick_push): Call it.
      	(VEC_safe_push_1): New template function. Create two overloads, one
      	accepting T, the other accepting T *.  Update all callers
      	where T and T * are ambiguous.
      	(VEC_safe_push): Call it.
      	(VEC_pop_1): New template function.
      	(VEC_pop): Call it.
      	(VEC_truncate_1): New template function.
      	(VEC_truncate): Call it.
      	(VEC_safe_grow_1): New template function.
      	(VEC_safe_grow): Call it.
      	(VEC_safe_grow_cleared_1): New template function.
      	(VEC_safe_grow_cleared): Call it.
      	(VEC_replace_1): New template function.
      	(VEC_replace): Call it.  Always accept T instead of T*.
      	Update all callers that used VEC_Os.
      	(VEC_quick_insert_1): New template function.
      	(VEC_quick_insert): Call it.
      	(VEC_safe_insert_1): New template function.
      	(VEC_safe_insert): Call it.
      	(VEC_ordered_remove_1): New template function.
      	(VEC_ordered_remove): Call it.
      	(VEC_unordered_remove_1): New template function.
      	(VEC_unordered_remove): Call it.
      	(VEC_block_remove_1): New template function.
      	(VEC_block_remove): Call it.
      	(VEC_lower_bound_1): New template function.
      	(VEC_lower_bound): Call it.
      	(VEC_OP): Remove.
      	(DEF_VEC_FUNC_P): Remove.
      	(DEF_VEC_ALLOC_FUNC_P): Remove.
      	(DEF_VEC_NONALLOC_FUNCS_P): Remove.
      	(DEF_VEC_FUNC_O): Remove.
      	(DEF_VEC_ALLOC_FUNC_O): Remove.
      	(DEF_VEC_NONALLOC_FUNCS_O): Remove.
      	(DEF_VEC_ALLOC_FUNC_I): Remove.
      	(DEF_VEC_NONALLOC_FUNCS_I): Remove.
      	(DEF_VEC_ALLOC_FUNC_P_STACK): Remove.
      	(DEF_VEC_ALLOC_FUNC_O_STACK): Remove.
      	(DEF_VEC_ALLOC_FUNC_I_STACK): Remove.
      	(vec_reserve_exact): New template function.
      
      	* gengtype-lex.l (DEF_VEC_ALLOC_[IOP]/{EOID}): Remove.
      	* gengtype-parse.c (token_names): Remove DEF_VEC_ALLOC_[IOP].
      	(typedef_name): Emit vec_t<C1> instead of VEC_C1_C2.
      	(def_vec_alloc): Remove.  Update all callers.
      	* gengtype.c (filter_type_name): New.
      	(output_mangled_typename): Call it.
      	(write_func_for_structure): Likewise.
      	(write_types): Likewise.
      	(write_root): Likewise.
      	(write_typed_alloc_def): Likewise.
      	(note_def_vec): Emit vec_t<TYPE_NAME> instead of VEC_TYPE_NAME_base.
      	(note_def_vec_alloc): Remove.
      	* gengtype.h (note_def_vec_alloc): Remove.
      	(DEFVEC_ALLOC): Remove token code.
      
      	* df-scan.c (df_bb_verify): Remove call to df_free_collection_rec
      	inside the insn traversal loop.
      	* gimplify.c (gimplify_compound_lval): Rename STACK to EXPR_STACK.
      	* ipa-inline.c (inline_small_functions): Rename HEAP to EDGE_HEAP.
      	* reg-stack.c (stack): Rename to STACK_PTR.  Update all users.
      	* tree-vrp.c (stack): Rename to EQUIV_STACK.  Update all users.
      
      	* config/bfin/bfin.c (hwloop_optimize): Update some calls to
      	VEC_* for vectors of non-pointers.
      	* config/c6x/c6x.c (try_rename_operands): Likewise.
      	(reshuffle_units): Likewise.
      	* config/mips/mips.c (mips_multi_start): Likewise.
      	(mips_multi_add): Likewise.
      	(mips_multi_copy_insn): Likewise.
      	(mips_multi_set_operand): Likewise.
      	* hw-doloop.c (discover_loop): Likewise.
      	(discover_loops): Likewise.
      	(reorg_loops): Likewise.
      
      2012-08-14   Diego Novillo  <dnovillo@google.com>
      
      	Merge from cxx-conversion branch.  C++ support in gengtype.
      
      	* coretypes.h (gt_pointer_operator): Move from ...
      	* ggc.h: ... here.
      	* doc/gty.texi: Document support for C++ templates and
      	user-provided markers.
      	* gcc/gengtype-lex.l: Update copyright year.
      	Remove support for recognizing DEF_VEC_O, DEF_VEC_P and
      	DEFVEC_I.
      	* gengtype-parse.c: Update copyright year.
      	(token_names): Remove DEF_VEC_O, DEF_VEC_P and DEF_VEC_I.
      	(require_template_declaration): New.
      	(typedef_name): Call it.
      	(type): Replace IS_UNION with KIND. Replace all users.
      	(def_vec): Remove.  Update all users.
      	* gengtype-state.c (type_lineloc): Handle TYPE_USER_STRUCT.
      	(write_state_user_struct_type): New.
      	(write_state_type): Call it.
      	(read_state_user_struct_type): New.
      	(read_state_type): Call it.
      	* gengtype.c: Update copyright year.
      	(dump_pair): Move declaration to the top.
      	(dump_type): Likewise.
      	(dump_type_list): Likewise.
      	(dbgprint_count_type_at): Handle TYPE_USER_STRUCT.
      	(create_user_defined_type): New.
      	(resolve_typedef): Call it.
      	(new_structure): Replace argument ISUNION with KIND.
      	Change users to refer to KIND directly.
      	Update all callers.
      	(find_structure): Likewise.
      	(set_gc_used_type): Handle TYPE_USER_STRUCT.
      	(create_file): Update HDR to include new copyright year.
      	(struct walk_type_data): Add field IN_PTR_FIELD.
      	(output_mangled_typename): Handle TYPE_USER_STRUCT.
      	(walk_type): Set D->IN_PTR_FIELD when walking a TYPE_POINTER.
      	Clear it afterwards.
      	Handle TYPE_USER_STRUCT.
      	(write_types_process_field): Handle TYPE_USER_STRUCT.
      	(get_type_specifier): Move earlier in the file.
      	(write_type_decl): New.
      	(write_marker_function_name): New.
      	(write_user_func_for_structure_ptr): New.
      	(write_user_func_for_structure_body): New.
      	(write_user_marking_functions): New.
      	(write_func_for_structure): Call write_marker_function_name
      	and write_type_decl.
      	Do not call walk_type for TYPE_USER_STRUCT. Emit a call to the user
      	function directly.
      	Call write_user_marking_functions on TYPE_USER_STRUCTs.
      	(write_types_local_user_process_field): New.
      	(write_pch_user_walking_for_structure_body): New.
      	(write_pch_user_walking_functions): New.
      	(write_types_local_process_field): Handle TYPE_USER_STRUCT.
      	(write_local_func_for_structure): Do not call walk_type for
      	TYPE_USER_STRUCT. Instead, emit the call to gt_pch_nx directly.
      	Call write_pch_user_walking_functions for TYPE_USER_STRUCTs.
      	(write_root): Handle TYPE_USER_STRUCT.
      	(vec_prefix_type): Remove.  Update all users.
      	(note_def_vec): Remove.  Update all users.
      	(dump_typekind): Handle TYPE_USER_STRUCT.
      	(dump_type): Initialize SEEN_TYPES, if needed.
      	Handle TYPE_USER_STRUCT.
      	(dump_everything): Do not initialize SEEN_TYPES.
      	* gengtype.h: Update copyright year.
      	(enum typekind): Add TYPE_USER_STRUCT.
      	(union_or_struct_p): Rename from UNION_OR_STRUCT_P.
      	Convert into function.
      	Add an overload taking const_type_p.
      	Update all callers.
      	(new_structure): Change second field to type enum typekind.
      	Update all users.
      	(find_structure): Likewise.
      	(note_def_vec): Remove.
      	(DEFVEC_OP): Remove.
      	(DEFVEC_I): Remove.
      	* ggc-page.c (gt_ggc_mx): Add entry points for marking
      	'const char *&', 'unsigned char *&' and 'unsigned char&'.
      	* ggc-zone.c (gt_ggc_mx): Add entry points for marking
      	'const char *&' and 'unsigned char *&'.
      	* stringpool.c (gt_pch_nx): Add entry points for marking
      	'const char *&', 'unsigned char *&' and 'unsigned char&'.
      	Add an entry point for the overload taking arguments 'unsigned char
      	*', 'gt_pointer_operator' and 'void *'.
      	* vec.h (struct vec_prefix): Remove GTY marker.
      	(struct vec_t): Remove GTY((length)) attribute from field 'vec'.
      	(gt_ggc_mx (vec_t<T> *)): New template function.
      	(gt_pch_nx (vec_t<T> *)): New template function.
      	(gt_pch_nx (vec_t<T *> *, gt_pointer_operator, void *)): New template
      	function.
      	(gt_pch_nx (vec_t<T> *, gt_pointer_operator, void *)): New template
      	function.
      
      	* basic-block.h (struct edge_def): Mark GTY((user)).
      	Remove all GTY markers from fields.
      	(gt_ggc_mx): Declare.
      	(gt_pch_nx): Declare.
      	* tree-cfg.c (gt_ggc_mx): New.
      	(gt_pch_nx): New.
      
      	* gengtype-lex.l (USER_GTY): Add pattern for "user".
      	* gengtype-parse.c (option): Handle USER_GTY.
      	(opts_have): New.
      	(type): Call it.
      	If the keyword 'user' is used, do not walk the fields
      	of the structure.
      	* gengtype.h (USER_GTY): Add.
      	* doc/gty.texi: Update.
      
      2012-08-14   Lawrence Crowl  <crowl@google.com>
      
      	Merge cxx-conversion branch.  Implement C++ hash table.
      
      	* hash-table.h: New. Implementation borrowed from libiberty/hashtab.c.
      	* hash-table.c: Likewise.
      	* tree-ssa-tail-merge.c: Include hash-table.h instead of hashtab.h.
      	(static htab_t same_succ_htab): Change type to hash_table;
      	move specification of helper functions from create call to declaration.
      	Change users to invoke member functions.
      	(same_succ_print_traverse): Make extern ssa_.... Change callers.
      	Remove void* casting.
      	(same_succ_hash): Likewise.
      	(same_succ_equal): Likewise.
      	(same_succ_delete): Likewise.
      	* tree-ssa-threadupdate.c: Include hash-table.h.
      	(struct local_info): Rename to ssa_local_info_t to avoid overloading
      	the type name local_info with the variable name local_info.
      	(static htab_t redirection_data): Change type to hash_table.
      	Move specification of helper functions from create call to declaration.
      	Change users to invoke member functions.
      	(redirection_data_hash): Make extern ssa_.... Change callers.
      	Remove void* casting.
      	(redirection_data_eq): Likewise.
      	(fix_duplicate_block_edges): Likewise.
      	(create_duplicates): Likewise.
      	(fixup_template_block): Likewise.
      	(redirect_edges): Likewise.
      	(lookup_redirection_data): Change types associated with the hash table
      	from void* to their actual type. Remove unnecessary casts.
      	* tree-ssa-ccp.c: Include hash-table.h.
      	(typedef gimple_htab): New.  Uses hash_table.  Replace specific uses
      	of htab_t with gimple_htab.  Change users to invoke member functions.
      	Move specification of helper functions from create call to declaration.
      	* tree-ssa-coalesce.c: Include hash-table.h instead of hashtab.h.
      	(hash_ssa_name_by_var): Make extern. Remove void* casting.
      	(eq_ssa_name_by_var): Likewise.
      	(coalesce_ssa_name): Change type of local static htab_t ssa_name_hash
      	to hash_table. Change users to invoke member functions.
      	Move specification of helper functions from create call to declaration.
      	* coverage.c: Include hash-table.h instead of hashtab.h.
      	(static htab_t counts_hash): Change type to hash_table;
      	move specification of helper functions from create call to declaration.
      	Change users to invoke member functions.
      	(htab_counts_entry_hash): Make extern. Rename with coverage_... instead
      	of htab_... Remove void* casting.
      	(htab_counts_entry_eq): Likewise.
      	(htab_counts_entry_del): Likewise.
      	* tree-ssa-pre.c: Include hash-table.h instead of hashtab.h.
      	(static htab_t expression_to_id): Change type to hash_table.
      	Move specification of helper functions from create call to declaration.
      	Change users to invoke member functions.
      	(static htab_t phi_translate_table): Likewise.
      	(pre_expr_eq): Make extern ssa_.... Change callers.
      	Remove void* casting.
      	(pre_expr_hash): Likewise.
      	(expr_pred_trans_hash): Likewise.
      	(expr_pred_trans_eq): Likewise.
      	(alloc_expression_id): Change types associated with the hash table
      	from void* to their actual type. Remove unnecessary casts.
      	(lookup_expression_id): Likewise.
      	(phi_trans_lookup): Likewise.
      	(phi_trans_add): Likewise.
      	* stringpool.c: Rename uses of libcpp typedef hash_table to
      	cpp_hash_table.
      	* Makefile.in: Add hash-table.o to OBJS-libcommon-target.
      	Add $(HASH_TABLE_H). Add new dependences on $(HASH_TABLE_H).
      
      2012-08-14   Lawrence Crowl  <crowl@google.com>
      
      	Merge from cxx-conversion branch.  Re-write double_int in C++.
      
      	* hash-table.h
      	(typedef double_int): Change to struct (POD).
      	(double_int::make): New overloads for int to double-int conversion.
      	(double_int::mask): New.
      	(double_int::max_value): New.
      	(double_int::min_value): New.
      	(double_int::operator ++): New.
      	(double_int::operator --): New.
      	(double_int::operator *=): New.
      	(double_int::operator +=): New.
      	(double_int::operator -=): New.
      	(double_int::to_signed): New.
      	(double_int::to_unsigned): New.
      	(double_int::fits_unsigned): New.
      	(double_int::fits_signed): New.
      	(double_int::fits): New.
      	(double_int::trailing_zeros): New.
      	(double_int::popcount): New.
      	(double_int::multiple_of): New.
      	(double_int::set_bit): New.
      	(double_int::mul_with_sign): New.
      	(double_int::operator * (binary)): New.
      	(double_int::operator + (binary)): New.
      	(double_int::operator - (binary)): New.
      	(double_int::operator - (unary)): New.
      	(double_int::operator ~ (unary)): New.
      	(double_int::operator & (binary)): New.
      	(double_int::operator | (binary)): New.
      	(double_int::operator ^ (binary)): New.
      	(double_int::and_not): New.
      	(double_int::lshift): New.
      	(double_int::rshift): New.
      	(double_int::alshift): New.
      	(double_int::arshift): New.
      	(double_int::llshift): New.
      	(double_int::lrshift): New.
      	(double_int::lrotate): New.
      	(double_int::rrotate): New.
      	(double_int::div): New.
      	(double_int::sdiv): New.
      	(double_int::udiv): New.
      	(double_int::mod): New.
      	(double_int::smod): New.
      	(double_int::umod): New.
      	(double_int::divmod): New.
      	(double_int::sdivmod): New.
      	(double_int::udivmod): New.
      	(double_int::ext): New.
      	(double_int::zext): New.
      	(double_int::sext): New.
      	(double_int::is_zero): New.
      	(double_int::is_one): New.
      	(double_int::is_minus_one): New.
      	(double_int::is_negative): New.
      	(double_int::cmp): New.
      	(double_int::ucmp): New.
      	(double_int::scmp): New.
      	(double_int::ult): New.
      	(double_int::ugt): New.
      	(double_int::slt): New.
      	(double_int::sgt): New.
      	(double_int::max): New.
      	(double_int::smax): New.
      	(double_int::umax): New.
      	(double_int::min): New.
      	(double_int::smin): New.
      	(double_int::umin): New.
      	(double_int::operator ==): New.
      	(double_int::operator !=): New.
      	(shwi_to_double_int): Change implementation to use member function.
      	(double_int_minus_one): Likewise.
      	(double_int_zero): Likewise.
      	(double_int_one): Likewise.
      	(double_int_two): Likewise.
      	(double_int_ten): Likewise.
      	(uhwi_to_double_int): Likewise.
      	(double_int_to_shwi): Likewise.
      	(double_int_to_uhwi): Likewise.
      	(double_int_fits_in_uhwi_p): Likewise.
      	(double_int_fits_in_shwi_p): Likewise.
      	(double_int_fits_in_hwi_p): Likewise.
      	(double_int_mul): Likewise.
      	(double_int_mul_with_sign): Likewise.
      	(double_int_add): Likewise.
      	(double_int_sub): Likewise.
      	(double_int_neg): Likewise.
      	(double_int_div): Likewise.
      	(double_int_sdiv): Likewise.
      	(double_int_udiv): Likewise.
      	(double_int_mod): Likewise.
      	(double_int_smod): Likewise.
      	(double_int_umod): Likewise.
      	(double_int_divmod): Likewise.
      	(double_int_sdivmod): Likewise.
      	(double_int_udivmod): Likewise.
      	(double_int_multiple_of): Likewise.
      	(double_int_setbit): Likewise.
      	(double_int_ctz): Likewise.
      	(double_int_not): Likewise.
      	(double_int_ior): Likewise.
      	(double_int_and): Likewise.
      	(double_int_and_not): Likewise.
      	(double_int_xor): Likewise.
      	(double_int_lshift): Likewise.
      	(double_int_rshift): Likewise.
      	(double_int_lrotate): Likewise.
      	(double_int_rrotate): Likewise.
      	(double_int_cmp): Likewise.
      	(double_int_scmp): Likewise.
      	(double_int_ucmp): Likewise.
      	(double_int_max): Likewise.
      	(double_int_smax): Likewise.
      	(double_int_umax): Likewise.
      	(double_int_min): Likewise.
      	(double_int_smin): Likewise.
      	(double_int_umin): Likewise.
      	(double_int_ext): Likewise.
      	(double_int_sext): Likewise.
      	(double_int_zext): Likewise.
      	(double_int_mask): Likewise.
      	(double_int_max_value): Likewise.
      	(double_int_min_value): Likewise.
      	(double_int_zero_p): Likewise.
      	(double_int_one_p): Likewise.
      	(double_int_minus_one_p): Likewise.
      	(double_int_equal_p): Likewise.
      	(double_int_popcount): Likewise.
      	* hash-table.c
      	(double_int_mask): Reuse implementation for double_int::mask.
      	(double_int_max_value): Likewise.
      	(double_int_min_value): Likewise.
      	(double_int_ext): Likewise.
      	(double_int_zext): Likewise.
      	(double_int_sext): Likewise.
      	(double_int_mul_with_sign): Likewise.
      	(double_int_divmod): Likewise.
      	(double_int_sdivmod): Likewise.
      	(double_int_udivmod): Likewise.
      	(double_int_div): Likewise.
      	(double_int_sdiv): Likewise.
      	(double_int_udiv): Likewise.
      	(double_int_mod): Likewise.
      	(double_int_smod): Likewise.
      	(double_int_umod): Likewise.
      	(double_int_multiple_of): Likewise.
      	(double_int_lshift): Likewise.
      	(double_int_rshift): Likewise.
      	(double_int_lrotate): Likewise.
      	(double_int_rrotate): Likewise.
      	(double_int_cmp): Likewise.
      	(double_int_ucmp): Likewise.
      	(double_int_scmp): Likewise.
      	(double_int_max): Likewise.
      	(double_int_smax): Likewise.
      	(double_int_umax): Likewise.
      	(double_int_min): Likewise.
      	(double_int_smin): Likewise.
      	(double_int_umin): Likewise.
      	(double_int_min): Likewise.
      	(double_int_min): Likewise.
      	(double_int_min): Likewise.
      	(double_int_min): Likewise.
      	(double_int_min): Likewise.
      	(double_int_min): Likewise.
      	(double_int::alshift): New.
      	(double_int::arshift): New.
      	(double_int::llshift): New.
      	(double_int::lrshift): New.
      	(double_int::ult): New.
      	(double_int::ugt): New.
      	(double_int::slt): New.
      	(double_int::sgt): New.
      	(double_int_setbit): Reuse implementation for double_int::set_bit,
      	which avoids a name conflict with a macro.
      	(double_int_double_int_ctz): Reuse implementation for
      	double_int::trailing_zeros.
      	(double_int_fits_in_shwi_p): Reuse implementation for
      	double_int::fits_signed.
      	(double_int_fits_in_hwi_p): Reuse implementation for double_int::fits.
      	(double_int_mul): Reuse implementation for binary
      	double_int::operator *.
      	(double_int_add): Likewise.
      	(double_int_sub): Likewise.
      	(double_int_neg): Reuse implementation for unary
      	double_int::operator -.
      	(double_int_max_value): Likewise.
      	* fixed-value.c: Change to use member functions introduced above.
      
      2012-08-14   Lawrence Crowl  <crowl@google.com>
      
      	Merge cxx-conversion branch.  Support tree macro calling
      	from gdb.
      
      	* tree.h (tree_check): New.
      	(TREE_CHECK): Use inline function above instead of __extension__.
      	(tree_not_check): New.
      	(TREE_NOT_CHECK): Use inline function above instead of __extension__.
      	(tree_check2): New.
      	(TREE_CHECK2): Use inline function above instead of __extension__.
      	(tree_not_check2): New.
      	(TREE_NOT_CHECK2): Use inline function above instead of __extension__.
      	(tree_check3): New.
      	(TREE_CHECK3): Use inline function above instead of __extension__.
      	(tree_not_check3): New.
      	(TREE_NOT_CHECK3): Use inline function above instead of __extension__.
      	(tree_check4): New.
      	(TREE_CHECK4): Use inline function above instead of __extension__.
      	(tree_not_check4): New.
      	(TREE_NOT_CHECK4): Use inline function above instead of __extension__.
      	(tree_check5): New.
      	(TREE_CHECK5): Use inline function above instead of __extension__.
      	(tree_not_check5): New.
      	(TREE_NOT_CHECK5): Use inline function above instead of __extension__.
      	(contains_struct_check): New.
      	(CONTAINS_STRUCT_CHECK): Use inline function above instead of
      	__extension__.
      	(tree_class_check): New.
      	(TREE_CLASS_CHECK): Use inline function above instead of __extension__.
      	(tree_range_check): New.
      	(TREE_RANGE_CHECK): Use inline function above instead of __extension__.
      	(omp_clause_subcode_check): New.
      	(OMP_CLAUSE_SUBCODE_CHECK): Use inline function above instead of
      	__extension__.
      	(omp_clause_range_check): New.
      	(OMP_CLAUSE_RANGE_CHECK): Use inline function above instead of
      	__extension__.
      	(expr_check): New.
      	(EXPR_CHECK): Use inline function above instead of __extension__.
      	(non_type_check): New.
      	(NON_TYPE_CHECK): Use inline function above instead of __extension__.
      	(tree_vec_elt_check): New.
      	(TREE_VEC_ELT_CHECK): Use inline function above instead of
      	__extension__.
      	(omp_clause_elt_check): New.
      	(OMP_CLAUSE_ELT_CHECK): Use inline function above instead of
      	__extension__.
      	(tree_operand_check): New.
      	(TREE_OPERAND_CHECK): Use inline function above instead of
      	__extension__.
      	(tree_operand_check_code): New.
      	(TREE_OPERAND_CHECK_CODE): Use inline function above instead of
      	__extension__.
      	(TREE_CHAIN): Simplify implementation.
      	(TREE_TYPE): Simplify implementation.
      	(tree_operand_length): Move for compilation dependences.
      	* gdbinit.in: (macro define __FILE__): New.
      	(macro define __LINE__): New.
      	(skip "tree.h"): New.
      
      gcc/cp/ChangeLog
      2012-08-14   Diego Novillo  <dnovillo@google.com>
      
      	Merge from cxx-conversion branch.  Re-write VEC in C++.
      
      	* call.c (add_function_candidate): Remove const qualifier
      	from call to VEC_index.
      
      2012-08-14   Diego Novillo  <dnovillo@google.com>
      
      	Merge from cxx-conversion branch.  Configury.
      
      	* go-c.h: Remove all handlers of ENABLE_BUILD_WITH_CXX.
      	* go-gcc.cc: Likewise.
      	* go-system.h: Likewise.
      
      From-SVN: r190402
      Diego Novillo committed
  3. 29 Jun, 2012 1 commit
    • configure.ac: Skip C if explicitly selected. · d4a10d0a
      toplevel/
      	* configure.ac: Skip C if explicitly selected.
      	* configure: Regenerate.
      
      gcc/
      	* configure.ac: Remove special gtfiles case for C.
      	* configure: Regenerate.
      	* Makefile.in: Remove C front-end hooks and build hooks that
      	will be picked up from c/Make-lang.in now.
      	Add tree-mudflap to C_COMMON_OBJS.
      	* gengtype.c (files_rules): Adjust gt-files for c/c-decl.c.
      	* config/vms/vms.c: Look for c-tree.h in c/.
      	* doc/gty.texi: Remove reference to c-config-lang.in.
      	* doc/sourcebuild.texi: Document the c/ subdirectory.
      
      c/
      	* Make-lang.in: New file, rules migrated from gcc/Makefile.in
      	and add language Makefile hooks.
      	* config-lang.in: New file.
      	* c-config-lang.in: Moved from gcc/config-lang.in to here, and
      	add the required "normal" config-lang.in rules.
      	* c-lang.h: Moved from gcc/ to here.
      	* c-tree.h: Likewise.
      	* c-objc-common.c: Likewise.
      	* c-objc-common.h: Likewise.
      	* c-typeck.c: Likewise.
      	* c-convert.c: Likewise.
      	* c-lang.c: Likewise.
      	* c-aux-info.c: Likewise.
      	* c-errors.c: Likewise.
      	* gccspec.c: Likewise.
      	* c-decl.c: Likewise.  Include gt-c-c-decl.h, not gt-c-decl.h.
      	* c-parser.c: Likewise.  Include gt-c-c-parser.h, not gt-c-parser.h.
      
      c-family/
      	* cppspec.c: Moved from gcc/ to here.
      
      objc/
      	* Make-ang.in: Adjust for move of C front-end files.
      	* config-lang.in: Likewise.
      	* objc-encoding.c: Look for cp-tree.h in cp/, and for c-tree.h
      	and c-lang.h in c/.
      	* objc-runtime-shared-support.c: Likewise.
      	* objc-next-runtime-abi-01.c: Likewise.
      	* objc-next-runtime-abi-02.c: Likewise.
      	* objc-gnu-runtime-abi-01.c: Likewise.
      	* objc-act.c: Likewise.
      	* objc-lang.c: Likewise.
      
      cp/
      	* Make-lang.in: Remove tree-mudflap.o from CXX_AND_OBJCXX_OBJS.
      
      From-SVN: r189080
      Steven Bosscher committed
  4. 19 Jun, 2012 1 commit
    • tm.texi.in (TARGET_OBJC_DECLARE_UNRESOLVED_CLASS_REFERENCE, [...]): Add @hooks. · 70f42967
      gcc/
      	* doc/tm.texi.in (TARGET_OBJC_DECLARE_UNRESOLVED_CLASS_REFERENCE,
      	TARGET_OBJC_DECLARE_CLASS_DEFINITION): Add @hooks.
      	(ASM_DECLARE_CLASS_REFERENCE, ASM_DECLARE_UNRESOLVED_REFERENCE):
      	Remove.
      	* doc/tm.texi: Regenerate.
      	* config/darwin.h (ASM_OUTPUT_LABELREF): Remove special case for
      	.objc_class_name_*.
      	* config/darwin-c.c: Include target.h.
      	(darwin_objc_declare_unresolved_class_reference): New function.
      	(darwin_objc_declare_class_definition): New function.
      	(TARGET_OBJC_DECLARE_UNRESOLVED_CLASS_REFERENCE): Define.
      	(TARGET_OBJC_DECLARE_CLASS_DEFINITION): Define.
      
      c-family/
      	* c-target.def (objc_declare_unresolved_class_reference,
      	objc_declare_class_definition): Add new hooks.
      
      objc/
      	* objc-next-runtime-abi-01.c: Do not include tm.h and output.h.
      	Include c-family/c-target.h.
      	(handle_next_class_ref): Rewrite to emit top-level asm statements.
      	(handle_next_impent): Likewise.
      	* objc/Make-lang.in: Fix dependencies for objc-next-runtime-abi-01.o.
      
      From-SVN: r188793
      Steven Bosscher committed
  5. 31 May, 2012 1 commit
    • output.h (__gcc_host_wide_int__): Move to hwint.h. · be7a421e
      	* output.h (__gcc_host_wide_int__): Move to hwint.h.
      	(decl_default_tls_model): Move to tree.h
      	(dump_file): Move to system.h.
      	(default_stabs_asm_out_destructor, default_stabs_asm_out_constructor,
      	dbxout_int, dbxout_stabd, dbxout_begin_stabn, dbxout_begin_stabn_sline,
      	dbxout_begin_empty_stabs, dbxout_begin_simple_stabs,
      	dbxout_begin_simple_stabs_desc, dbxout_stab_value_zero,
      	dbxout_stab_value_zero, dbxout_stab_value_label_diff,
      	dbxout_stab_value_internal_label,
      	dbxout_stab_value_internal_label_diff): Move from here ...
      	* dbxout.h: ... to here.
      	* system.h (dump_file): Moved here from output.h.
      	* hwint.h (__gcc_host_wide_int__): Moved here from output.h.
      	* tree.h (decl_default_tls_model): Moved here from output.h.
      	* varasm.c (default_stabs_asm_out_destructor,
      	default_stabs_asm_out_constructor): Move from here ...
      	* dbxout.c: ... to here.
      
      	* gcov-dump.c (dump_file): Rename to dump_gcov_file.  Update callers.
      
      	* collect2.h (dump_file): Rename to dump_ld_file.
      	* collect2.c: Likewise.
      	* tlink.c: Likewise.
      
      	* alias.c: Do not include output.h.
      	* auto-inc-dec.c: Likewise.
      	* bt-load.c: Likewise.
      	* caller-save.c: Likewise.
      	* cfg.c: Likewise.
      	* cfgbuild.c: Likewise.
      	* cfgcleanup.c: Likewise.
      	* cfglayout.c: Likewise.
      	* cfgloop.c: Likewise.
      	* cfgloopanal.c: Likewise.
      	* cfgloopmanip.c: Likewise.
      	* cfgrtl.c: Likewise.
      	* cgraph.c: Likewise.
      	* cgraphclones.c: Likewise.
      	* combine-stack-adj.c: Likewise.
      	* combine.c: Likewise.
      	* cprop.c: Likewise.
      	* cse.c: Likewise.
      	* cselib.c: Likewise.
      	* dbgcnt.c: Likewise.
      	* df-problems.c: Likewise.
      	* df-scan.c: Likewise.
      	* dojump.c: Likewise.
      	* fwprop.c: Likewise.
      	* gcse.c: Likewise.
      	* graph.c: Likewise.
      	* haifa-sched.c: Likewise.
      	* hw-doloop.c: Likewise.
      	* ipa-inline-transform.c: Likewise.
      	* ipa-pure-const.c: Likewise.
      	* ipa-reference.c: Likewise.
      	* ipa-utils.c: Likewise.
      	* ira-build.c: Likewise.
      	* ira-emit.c: Likewise.
      	* lcm.c: Likewise.
      	* loop-doloop.c: Likewise.
      	* loop-invariant.c: Likewise.
      	* loop-iv.c: Likewise.
      	* loop-unroll.c: Likewise.
      	* loop-unswitch.c: Likewise.
      	* lto-cgraph.c: Likewise.
      	* lto-section-in.c: Likewise.
      	* lto-streamer-in.c: Likewise.
      	* mcf.c: Likewise.
      	* mode-switching.c: Likewise.
      	* postreload-gcse.c: Likewise.
      	* postreload.c: Likewise.
      	* predict.c: Likewise.
      	* profile.c: Likewise.
      	* ree.c: Likewise.
      	* reg-stack.c: Likewise.
      	* regcprop.c: Likewise.
      	* regmove.c: Likewise.
      	* regstat.c: Likewise.
      	* reload1.c: Likewise.
      	* sched-ebb.c: Likewise.
      	* sel-sched-dump.c: Likewise.
      	* simplify-rtx.c: Likewise.
      	* stor-layout.c: Likewise.
      	* store-motion.c: Likewise.
      	* tracer.c: Likewise.
      	* tree-affine.c: Likewise.
      	* tree-cfg.c: Likewise.
      	* tree-cfgcleanup.c: Likewise.
      	* tree-dfa.c: Likewise.
      	* tree-into-ssa.c: Likewise.
      	* tree-nomudflap.c: Likewise.
      	* tree-optimize.c: Likewise.
      	* tree-pretty-print.c: Likewise.
      	* tree-profile.c: Likewise.
      	* tree-ssa-address.c: Likewise.
      	* tree-ssa-ccp.c: Likewise.
      	* tree-ssa-copy.c: Likewise.
      	* tree-ssa-dom.c: Likewise.
      	* tree-ssa-loop-ch.c: Likewise.
      	* tree-ssa-loop-im.c: Likewise.
      	* tree-ssa-loop-manip.c: Likewise.
      	* tree-ssa-loop-niter.c: Likewise.
      	* tree-ssa-loop-prefetch.c: Likewise.
      	* tree-ssa-loop-unswitch.c: Likewise.
      	* tree-ssa-loop.c: Likewise.
      	* tree-ssa-propagate.c: Likewise.
      	* tree-ssa-structalias.c: Likewise.
      	* tree-ssa-tail-merge.c: Likewise.
      	* tree-ssa-threadedge.c: Likewise.
      	* tree-ssa-threadupdate.c: Likewise.
      	* tree-ssa-uncprop.c: Likewise.
      	* tree-ssa-uninit.c: Likewise.
      	* tree-ssa.c: Likewise.
      	* value-prof.c: Likewise.
      	* var-tracking.c: Likewise.
      	* web.c: Likewise.
      
      	* config/m32r/m32r.c: Include dbxout.h.
      	* config/pa/pa.c: Likewise.
      	* config/rs6000/rs6000.c: Likewise.
      
      	* Makefile.in: Fix dependencies.
      	* config/rs6000/t-rs5000: Likewise.
      
      c-family/
      	* c-ada-spec.c: Do not include output.h.
      	* c-semantics.c: Likewise.
      
      cp/
      	* call.c: Do not include output.h.
      	* class.c: Likewise.
      	* except.c: Likewise.
      	* friend.c: Likewise.
      	* init.c: Likewise.
      	* lex.c: Likewise.
      	* method.c: Likewise.
      	* parser.c: Likewise.
      	* pt.c: Likewise.
      	* rtti.c: Likewise.
      	* search.c: Likewise.
      
      objc/
      	* objc-act.c: Do not include output.h.
      
      fortran/
      	* trans-common.c: Do not include output.h.
      	* trans-decl.c: Likewise.
      
      java/
      	* resource.c: Do not include output.h.
      
      From-SVN: r188082
      Steven Bosscher committed
  6. 17 May, 2012 1 commit
  7. 20 Apr, 2012 1 commit
    • lto-symtab.c (lto_cgraph_replace_node): Merge needed instead of force flags. · ead84f73
      	* lto-symtab.c (lto_cgraph_replace_node): Merge needed instead of force flags.
      	* cgraph.c (cgraph_add_thunk): Use mark_reachable_node.
      	(cgraph_remove_node): Update.
      	(cgraph_mark_needed_node): Remove.
      	(cgraph_mark_force_output_node): New.
      	(dump_cgraph_node): Do not dump needed flag.
      	(cgraph_node_cannot_be_local_p_1): Update.
      	(cgraph_can_remove_if_no_direct_calls_and_refs): Update.
      	* cgraph.h (symtab_node_base): Add force_output flag.
      	(cgraph_node): Remove needed flag.
      	(varpool_node): Remove force_output flag.
      	(cgraph_mark_needed_node): Remove.
      	(cgraph_mark_force_output_node): New.
      	(cgraph_only_called_directly_or_aliased_p,
      	varpool_can_remove_if_no_refs, varpool_all_refs_explicit_p): Update.
      	* ipa-cp.c (ipcp_generate_summary): Remove out of date assert.
      	* cgraphunit.c (cgraph_decide_is_function_needed): rewrite.
      	(cgraph_add_new_function); Update.
      	(cgraph_mark_if_needed); Update.
      	(verify_cgraph_node): Update.
      	(cgraph_analyze_function): Alias target is reachable.
      	(process_function_and_variable_attributes): Update: externally_visible
      	flag makes function reachable.
      	(cgraph_analyze_functions): Update dumping.
      	* lto-cgraph.c (lto_output_node, lto_output_varpool_node,
      	input_overwrite_node, input_varpool_node): Update streaming.
      	* lto-streamer-out.c (produce_symtab): Use force_output.
      	* ipa.c (process_references): Weakrefs must be processed.
      	(cgraph_remove_unreachable_nodes): Likewise; update for new
      	force_output flag.
      	(varpool_externally_visible_p); Weakrefs are externally visible
      	even if they are not.
      	(function_and_variable_visibility): Update; when processing alias
      	pair force the targets to be output.
      	(whole_program_function_and_variable_visility): Use mark_reachable_node.
      	* trans-mem.c (ipa_tm_mark_needed_node): Remove
      	(ipa_tm_mark_force_output_node): New function.
      	(ipa_tm_create_version_alias, ipa_tm_create_version): Update.
      	* gimple-fold.c (can_refer_decl_in_current_unit_p): Be lax about aliases.
      	* varasm.c (mark_decl_referenced): Update.
      	(find_decl_and_mark_needed): Remove.
      	(find_decl): New function.
      	(weak_finish, finish_aliases_1, assemble_alias): Update; do not mark
      	alias targets as needed.
      	(dump_tm_clone_pairs): Update.
      	* tree-inline.c (copy_bb): Update check.
      	* symtab.c (dump_symtab_base): Dump force_output.
      	* tree-ssa-structalias.c (ipa_pta_execute): Use force_output.
      	* passes.c (execute_todo): Fix dumping.
      	* varpool.c (decide_is_variable_needed, varpool_finalize_decl): Update.
      	(varpool_analyze_pending_decls): Alias target is reachable.
      	(varpool_create_variable_alias): Finalize weakrefs.
      
      	* class.c (make_local_function_alias): Do not mark symbol referenced.
      
      	* objc-acct.c (mark_referenced_methods); Use
      	cgraph_mark_force_output_node.
      
      	* gcc-interface/utils.c (gnat_write_global_declarations): Update for new
      	force_output placement.
      
      	* lto/lto-partition.c (partition_cgraph_node_p): Use force_output.
      
      From-SVN: r186624
      Jan Hubicka committed
  8. 21 Mar, 2012 1 commit
  9. 05 Mar, 2012 1 commit
  10. 12 Nov, 2011 1 commit
  11. 29 Oct, 2011 1 commit
  12. 18 Oct, 2011 1 commit
  13. 14 Oct, 2011 1 commit
    • In gcc/: 2011-10-14 Nicola Pero <nicola.pero@meta-innovation.com> · 3cc2dd4b
      In gcc/:
      2011-10-14  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* gengtype.c (files_rules): Added rules for objc/objc-map.h and
      	objc/objc-map.c.
      
      In gcc/objc/:
      2011-10-14  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* objc-map.h: New file.
      	* objc-map.c: New file.	
      	* config-lang.in (gtfiles): Added objc-map.h.
      	* Make-lang.in (OBJC_OBJS): Added objc-map.o.
      	(objc/objc-map.o): New rule.
      	(objc/objc-act.o): Depend on objc/objc-map.h.
      	* objc-next-runtime-abi-02.c: Added a TODO comment.
      	* objc-act.c: Include objc-map.h.
      	(nst_method_hash_list, cls_method_hash_list): Removed.
      	(instance_method_map, class_method_map): New.
      	(cls_name_hash_list, als_name_hash_list): Removed.
      	(class_name_map, alias_name_map): Removed.
      	(ivar_offset_hash_list): Removed.
      	(hash_class_name_enter, hash_class_name_lookup, hash_enter,
      	hash_lookup, hash_add_attr, add_method_to_hash_list): Removed.
      	(interface_hash_init): New.
      	(objc_init): Call interface_hash_init.
      	(objc_write_global_declarations): Iterate over class_method_map
      	and instance_method_map instead of cls_method_hash_list and
      	nst_method_hash_list.
      	(objc_declare_alias): Use alias_name_map instead of
      	cls_name_hash_list.
      	(objc_is_class_name): Use class_name_map and alias_name_map
      	instead of cls_name_hash_list and als_name_hash_list.
      	(interface_tuple, interface_htab, hash_interface, eq_interface):
      	Removed.
      	(interface_map): New.
      	(add_class): Renamed to add_interface.  Use interface_map instead
      	of interface_htab.
      	(lookup_interface): Use interface_map instead of interface_htab.
      	(check_duplicates): Changed first argument to be a tree,
      	potentially a TREE_VEC, instead of a hash.  Changed implementation
      	to match.
      	(lookup_method_in_hash_lists): Use class_method_map and
      	instance_method_map instead of cls_method_hash_list and
      	nst_method_hash_list.
      	(objc_build_selector_expr): Likewise.
      	(hash_func): Removed.
      	(hash_init): Create instance_method_map, class_method_map,
      	class_name_map, and alias_name_map.  Do not create
      	nst_method_hash_list, cls_method_hash_list, cls_name_hash_list,
      	als_name_hash_list, and ivar_offset_hash_list.
      	(insert_method_into_method_map): New.
      	(objc_add_method): Use insert_method_into_method_map instead of
      	add_method_to_hash_list.
      	(start_class): Call add_interface instead of add_class.
      	* objc-act.h (cls_name_hash_list, als_name_hash_list,
      	nst_method_hash_list, cls_method_hash_list): Removed.
      
      In gcc/objcp/:
      2011-10-14  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* Make-lang.in (OBJCXX_OBJS): Added objc-map.o.
      	(objcp/objc-map.o): New rule.
      	(objcp/objcp-act.o): Depend on objc/objc-map.h.
      	* config-lang.in (gtfiles): Added objc-map.h.
      
      From-SVN: r179965
      Nicola Pero committed
  14. 11 Oct, 2011 1 commit
  15. 19 Jul, 2011 1 commit
    • tree.h (fold_build_pointer_plus_loc): New helper function. · 5d49b6a7
      2011-07-19  Richard Guenther  <rguenther@suse.de>
      
      	* tree.h (fold_build_pointer_plus_loc): New helper function.
      	(fold_build_pointer_plus_hwi_loc): Likewise.
      	(fold_build_pointer_plus): Define.
      	(fold_build_pointer_plus_hwi): Likewise.
      
      	* builtins.c (std_gimplify_va_arg_expr): Use fold_build_pointer_plus.
      	(fold_builtin_memory_op): Likewise.
      	(fold_builtin_stpcpy): Likewise.
      	(fold_builtin_memchr): Likewise.
      	(fold_builtin_strstr): Likewise.
      	(fold_builtin_strchr): Likewise.
      	(fold_builtin_strrchr): Likewise.
      	(fold_builtin_strpbrk): Likewise.
      	(fold_builtin_strcat): Likewise.
      	(expand_builtin_memory_chk): Likewise.
      	(fold_builtin_memory_chk): Likewise.
      	* c-typeck.c (build_unary_op): Likewise.
      	* cgraphunit.c (thunk_adjust): Likewise.
      	* fold-const.c (build_range_check): Likewise.
      	(fold_binary_loc): Likewise.
      	* omp-low.c (extract_omp_for_data): Likewise.
      	(expand_omp_for_generic): Likewise.
      	(expand_omp_for_static_nochunk): Likewise.
      	(expand_omp_for_static_chunk): Likewise.
      	* tree-affine.c (add_elt_to_tree): Likewise.
      	* tree-data-ref.c (split_constant_offset_1): Likewise.
      	* tree-loop-distribution.c (generate_memset_zero): Likewise.
      	* tree-mudflap.c (mf_xform_derefs_1): Likewise.
      	* tree-predcom.c (ref_at_iteration): Likewise.
      	* tree-ssa-address.c (tree_mem_ref_addr): Likewise.
      	(add_to_parts): Likewise.
      	(create_mem_ref): Likewise.
      	* tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Likewise.
      	* tree-ssa-loop-niter.c (number_of_iterations_lt_to_ne): Likewise.
      	(number_of_iterations_le): Likewise.
      	* tree-ssa-loop-prefetch.c (issue_prefetch_ref): Likewise.
      	* tree-vect-data-refs.c (vect_analyze_data_refs): Likewise.
      	(vect_create_addr_base_for_vector_ref): Likewise.
      	* tree-vect-loop-manip.c (vect_update_ivs_after_vectorizer): Likewise.
      	(vect_create_cond_for_alias_checks): Likewise.
      	* tree-vrp.c (extract_range_from_assert): Likewise.
      
      	* config/alpha/alpha.c (alpha_va_start): Likewise.
      	(alpha_gimplify_va_arg_1): Likewise.
      	* config/i386/i386.c (ix86_va_start): Likewise.
      	(ix86_gimplify_va_arg): Likewise.
      	* config/ia64/ia64.c (ia64_gimplify_va_arg): Likewise.
      	* config/mep/mep.c (mep_expand_va_start): Likewise.
      	(mep_gimplify_va_arg_expr): Likewise.
      	* config/mips/mips.c (mips_va_start): Likewise.
      	(mips_gimplify_va_arg_expr): Likewise.
      	* config/pa/pa.c (hppa_gimplify_va_arg_expr): Likewise.
      	* config/rs6000/rs6000.c (rs6000_va_start): Likewise.
      	(rs6000_gimplify_va_arg): Likewise.
      	* config/s390/s390.c (s390_va_start): Likewise.
      	(s390_gimplify_va_arg): Likewise.
      	* config/sh/sh.c (sh_va_start): Likewise.
      	(sh_gimplify_va_arg_expr): Likewise.
      	* config/sparc/sparc.c (sparc_gimplify_va_arg): Likewise.
      	* config/spu/spu.c (spu_va_start): Likewise.
      	(spu_gimplify_va_arg_expr): Likewise.
      	* config/stormy16/stormy16.c (xstormy16_expand_builtin_va_start):
      	Likewise.
      	(xstormy16_gimplify_va_arg_expr): Likewise.
      	* config/xtensa/xtensa.c (xtensa_va_start): Likewise.
      	(xtensa_gimplify_va_arg_expr): Likewise.
      
      	c-family/
      	* c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
      	* c-omp.c (c_finish_omp_for): Likewise.
      
      	cp/
      	* call.c (build_special_member_call): Use fold_build_pointer_plus.
      	* class.c (build_base_path): Likewise.
      	(convert_to_base_statically): Likewise.
      	(dfs_accumulate_vtbl_inits): Likewise.
      	* cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise.
      	* except.c (expand_start_catch_block): Likewise.
      	* init.c (expand_virtual_init): Likewise.
      	(build_new_1): Likewise.
      	(build_vec_delete_1): Likewise.
      	(build_vec_delete): Likewise.
      	* rtti.c (build_headof): Likewise.
      	(tinfo_base_init): Likewise.
      	* typeck.c (get_member_function_from_ptrfunc): Likewise.
      	(cp_build_addr_expr_1): Likewise.
      	* typeck2.c (build_m_component_ref): Likewise.
      
      	fortran/
      	* trans-expr.c (fill_with_spaces): Use fold_build_pointer_plus.
      	(gfc_trans_string_copy): Likewise.
      	* trans-intrinsic.c (gfc_conv_intrinsic_repeat): Likewise.
      	* trans-types.c (gfc_get_array_descr_info): Likewise.
      	* trans.c (gfc_build_array_ref): Likewise.
      
      	java/
      	* builtins.c (static): Use fold_build_pointer_plus.
      	* class.c (make_class_data): Likewise.
      	(build_symbol_entry): Likewise.
      	* except.c (build_exception_object_ref): Likewise.
      	* expr.c (build_java_arrayaccess): Likewise.
      	(build_field_ref): Likewise.
      	(build_known_method_ref): Likewise.
      	(build_invokevirtual): Likewise.
      
      	objc/
      	* objc-next-runtime-abi-02.c (objc_v2_build_ivar_ref):
      	Use fold_build_pointer_plus.
      	(objc2_build_ehtype_initializer): Likewise.
      
      From-SVN: r176461
      Richard Guenther committed
  16. 11 Jul, 2011 1 commit
    • In gcc/objc/: 2011-07-11 Nicola Pero <nicola.pero@meta-innovation.com> · a8f18c40
      In gcc/objc/:
      2011-07-11  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* objc-encoding.h (obstack.h): Do not include.
      	(util_obstack, util_firstobj): Do not declare.
      	(encode_field_decl): Updated prototype to return a tree and take a
      	single tree argument.  Updated comments.
      	* objc-encoding.c (util_obstack, util_firstobj): Made static.
      	(objc_encoding_init): New.
      	(encode_field_decl): Existing function renamed to encode_field and
      	made static.  New encode_field_decl wrapper function added.
      	(encode_aggregate_fields): Update call to encode_field_decl to
      	call encode_field.
      	* objc-next-runtime-abi-02.c (obstack.h): Do not include.
      	(util_obstack, util_firstobj): Do not declare.
      	(build_v2_ivar_list_initializer): Updated call to
      	encode_field_decl.
      	* objc-runtime-shared-support.c (obstack.h): Do not include.
      	(util_obstack, util_firstobj): Do not declare.
      	(build_ivar_list_initializer): Updated call to encode_field_decl.
      	* objc-act.c (objc_init): Use objc_encoding_init.
      	* Make-lang.in (objc/objc-runtime-shared-support.o): Do not depend
      	on OBSTACK_H.
      	(objc/objc-gnu-runtime-abi-01.o): Likewise.
      	(objc/objc-next-runtime-abi-01.o): Likewise.
      	(objc/objc-next-runtime-abi-02.o): Likewise.
      	(objc/objc-act.o): Likewise.
      	
      In gcc/objcp/:
      2011-07-11  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* Make-lang.in (objcp/objc-runtime-shared-support.o): Do not
      	depend on OBSTACK_H.
      	(objcp/objc-gnu-runtime-abi-01.o): Likewise.
      	(objcp/objc-next-runtime-abi-01.o): Likewise.
      	(objcp/objc-next-runtime-abi-02.o): Likewise.
      	(objcp/objcp-act.o): Likewise.
      
      From-SVN: r176139
      Nicola Pero committed
  17. 04 Jul, 2011 1 commit
    • In gcc/objc/: 2011-07-04 Nicola Pero <nicola.pero@meta-innovation.com> · f027ee7c
      In gcc/objc/:
      2011-07-04  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	Refactored encoding code into objc-encoding.h and objc-encoding.c.
      	* objc-act.c (util_obstack, util_firstobj, encode_type_qualifiers,
      	encode_type, generating_instance_variables, objc_method_parm_type,
      	objc_encoded_type_size, encode_method_prototype,
      	objc_build_encode_expr, pointee_is_readonly, encode_pointer,
      	encode_array, encode_vector, encode_aggregate_fields,
      	encode_aggregate_within, encode_next_bitfield,
      	encode_gnu_bitfield, encode_field_decl,
      	objc_v2_encode_property_attr): Moved to objc-encoding.h and
      	objc-encoding.c.  No change in the actual code.
      	Include objc-encoding.h.
      	(objc_init): Added TODO.
      	(objc_build_property_setter_name): Made non-static so it can be
      	called from objc-encoding.c.
      	* objc-act.h (OBJC_ENCODE_INLINE_DEFS,
      	OBJC_ENCODE_DONT_INLINE_DEFS): Moved to objc-encoding.h.
      	* objc-runtime-shared-support.h (objc_v2_encode_property_attr,
      	encode_method_prototype, encode_field_decl,
      	generating_instance_variables): Moved to objc-encoding.h.	
      	(objc_build_property_setter_name): Declare.
      	* objc-encoding.c: New.
      	* objc-encoding.h: New.
      	* objc-gnu-runtime-abi-01.c: Include objc-encoding.h.
      	* objc-next-runtime-abi-01.c: Likewise.
      	* objc-next-runtime-abi-02.c: Likewise.	
      	* objc-runtime-shared-support.c: Likewise.
      	* Make-lang.in (OBJC_OBJS): Added objc-encoding.o.
      	(objc/objc-lang.o): Reordered dependencies.
      	(objc/objc-runtime-shared-support.o): Reordered dependencies.
      	Added dependencies on objc-encoding.h and on $(GGC_H),
      	$(DIAGNOSTIC_CORE_H), $(FLAGS_H) and input.h.
      	(objc/objc-gnu-runtime-abi-01.o): Likewise.
      	(objc/objc-next-runtime-abi-01.o): Likewise.
      	(objc/objc-next-runtime-abi-02.o): Likewise.
      	(objc/objc-act.o): Reordered dependencies.  Added dependency on
      	objc-encoding.h.
      	(objc/objc-encoding.o): New rule.
      
      	* objc-encoding.c (encode_type): Use "%<%T%>" format when printing
      	warning "unknown type %<%T%> found during Objective-C encoding"
      	instead of using gen_type_name.
      	
      In gcc/objcp/:
      2011-07-04  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* Make-lang.in (OBJCXX_OBJS): Added objc-encoding.o.
      	(objcp/objcp-lang.o): Reordered dependencies.  Depend on GGC_H.
      	(objcp/objcp-decl.o): Reordered dependencies.
      	(objcp/objc-runtime-shared-support.o): Reordered dependencies.
      	Updated them to be identical to the corresponding new objc/ ones,
      	with the addition of objcp-decl.h.
      	(objcp/objc-runtime-shared-support.o): Likewise.
      	(objcp/objc-gnu-runtime-abi-01.o): Likewise.
      	(objcp/objc-next-runtime-abi-01.o): Likewise.
      	(objcp/objc-next-runtime-abi-02.o): Likewise.
      	(objcp/objcp-act.o): Reordered dependencies.  Added dependency on
      	objc-encoding.h.
      	(objcp/objc-encoding.o): New rule.
      
      From-SVN: r175797
      Nicola Pero committed
  18. 05 Jun, 2011 1 commit
    • In gcc/objc/: 2011-06-05 Nicola Pero <nicola.pero@meta-innovation.com> · 419b55d0
      In gcc/objc/:
      2011-06-05  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* objc-act.c (receiver_is_class_object): Expanded comment.
      	(objc_finish_message_expr): Likewise.
      
      In gcc/testsuite/:
      2011-06-05  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	PR testsuite/49287
      	* objc.dg/gnu-api-2-class.m: Updated testcase silencing compiler
      	warning.
      	* objc.dg/gnu-api-2-objc.m: Likewise.
      	* obj-c++.dg/gnu-api-2-class.mm: Likewise
      	* obj-c++.dg/gnu-api-2-objc.mm: Likewise.
      
      From-SVN: r174657
      Nicola Pero committed
  19. 02 Jun, 2011 1 commit
    • In gcc/objc/: 2011-06-02 Nicola Pero <nicola.pero@meta-innovation.com> · bf79cedb
      In gcc/objc/:
      2011-06-02  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	PR objc/48539
      	* objc-act.c (objc_finish_message_expr): Warn if messaging a class
      	that was only declared using @class without an @interface.  Warn
      	if messaging an instance of a class that was only declared using
      	@class without an @interface, unless the receiver was also typed
      	with a protocol list.
      
      In gcc/testsuite/:
      2011-06-02  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	PR objc/48539
      	* objc.dg/method-5.m: Updated.	
      	* objc.dg/method-19.m: Updated.
      	* objc.dg/method-lookup-1.m: New.	
      	* obj-c++.dg/method-6.mm: Updated.
      	* obj-c++.dg/method-7.mm: Updated.
      	* obj-c++.dg/method-lookup-1.mm: New.
      
      From-SVN: r174575
      Nicola Pero committed
  20. 01 Jun, 2011 1 commit
  21. 21 May, 2011 1 commit
  22. 20 May, 2011 1 commit
  23. 13 May, 2011 1 commit
  24. 11 May, 2011 1 commit
    • split tree_type · 51545682
      split tree_type
      gcc/ada/
      	* gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
      	(TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
      	(TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
      
      gcc/cp/
      	* cp-tree.h (TYPENAME_TYPE_FULLNAME, TYPEOF_TYPE_EXPR): Use
      	TYPE_VALUES_RAW.
      	(UNDERLYING_TYPE_TYPE, DECLTYPE_TYPE_EXPR): Likewise.
      	(DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): Likewise.
      	(TEMPLATE_TYPE_PARM_INDEX): Likewise.
      
      gcc/
      	* ggc-page.c (extra_order_size_table): Use struct
      	tree_type_non_common.
      	* lto-streamer-in.c (unpack_ts_type_value_fields): Rename to...
      	(unpack_ts_type_common_value_fields): ...this.  Update comment.
      	(unpack_value_fields): Adjust for renaming.
      	(lto_input_ts_type_tree_pointers): Split into...
      	(lto_input_ts_type_common_tree_pointer): ...this and...
      	(lto_input_ts_type_non_common_tree_pointers): ...this.
      	(lto_input_tree_pointers): Adjust for above split.
      	* lto-streamer-out.c (pack_ts_type_value_fields): Rename to...
      	(pack_ts_type_common_value_fields): ...this.  Update comment.
      	(lto_output_ts_type_tree_pointers): Split into...
      	(lto_output_ts_type_common_tree_pointers): ...this and...
      	(lto_output_ts_type_non_common_tree_pointers): ...this.
      	(lto_output_tree_pointers): Adjust for above split.
      	* lto-streamer.c (check_handled_ts_structures): Mark TS_TYPE_COMMON,
      	TS_TYPE_WITH_LANG_SPECIFIC, and TS_TYPE_NON_COMMON as handled.
      	* stor-layout.c (vector_type_mode): Adjust location of mode field.
      	* tree.h (MARK_TS_TYPE_COMMON, MARK_TS_TYPE_WITH_LANG_SPECIFIC):
      	Define.
      	(struct tree_type): Split into...
      	(struct tree_type_common: ...this and...
      	(struct tree_type_with_lang_specific): ...this and...
      	(struct tree_type_non_common): ...this.  Adjust accessor macros
      	accordingly.
      	(TYPE_VALUES_RAW): Define.
      	(union tree_node): Update for above changes.
      	* tree.c (tree_node_structure_for_code) [tcc_type]: Return
      	TS_TYPE_NON_COMMON.
      	(initialize_tree_contains_struct) [TS_TYPE]: Use TS_TYPE_COMMON.
      	Add TS_TYPE_WITH_LANG_SPECIFIC and TS_TYPE_NON_COMMON.
      	(tree_code_size) [tcc_type]: Use struct tree_type_non_common.
      	* treestructu.def (TS_TYPE): Remove.
      	(TS_TYPE_COMMON, TS_TYPE_WITH_LANG_SPECIFIC, TS_TYPE_NON_COMMON):
      	Define.
      
      gcc/java/
      	* java-tree.h (TYPE_ARGUMENT_SIGNATURE): Use TYPE_MINVAL.
      
      gcc/lto/
      	* lto.c (lto_ft_type): Use TYPE_MINVAL and TYPE_MAXVAL.  Adjust
      	location of binfo field.
      	(lto_fixup_prevailing_decls): Likewise.
      
      gcc/objc/
      	* objc-act.h (CLASS_NAME, CLASS_SUPER_NAME): Use proper accessors.
      	(CLASS_NST_METHODS, CLASS_CLS_METHODS): Likewise.
      	(PROTOCOL_NAME, PROTOCOL_NST_METHODS, PROTOCOL_CLS_METHODS): Likewise.
      
      From-SVN: r173658
      Nathan Froyd committed
  25. 06 May, 2011 1 commit
    • don't use build_function_type in the ObjC/C++ frontends · 6174da1b
      don't use build_function_type in the ObjC/C++ frontends
      	* objc-runtime-shared-support.h (get_arg_type_list): Delete.
      	(build_function_type_for_method): Declare.
      	* objc-runtime-hooks.h (struct _objc_runtime_hooks_r): Change
      	type of get_arg_type_base_list field.
      	* objc-act.h (OBJC_VOID_AT_END): Delete.
      	* objc-act.c (get_arg_type_list): Delete.
      	(build_function_type_for_method): New function.
      	(objc_decl_method_attributes): Call build_function_type_for_method.
      	(really_start_method): Likewise.
      	* objc-gnu-runtime-abi-01.c
      	(gnu_runtime_abi_01_get_type_arg_list_base): Change prototype and
      	adjust function accordingly.  Update header comment.
      	(build_objc_method_call): Call build_function_type_for_method.
      	* objc-next-runtime-abi-01.c
      	(next_runtime_abi_01_get_type_arg_list_base): Change prototype and
      	adjust function accordingly.  Update header comment.
      	(build_objc_method_call): Call build_function_type_for_method.
      	* objc-next-runtime-abi-02.c
      	(next_runtime_abi_02_get_type_arg_list_base): Change prototype and
      	adjust function accordingly.  Update header comment.
      	(objc_copy_to_temp_side_effect_params): Take fntype instead of a
      	typelist.  Use function_args_iterator for traversing fntype.
      	(build_v2_build_objc_method_call): Adjust call to it.
      	Call build_function_type_for_method
      
      From-SVN: r173465
      Nathan Froyd committed
  26. 05 May, 2011 1 commit
    • c-decl.c (finish_decl): Don't call get_pending_sizes. · a04a722b
      	* c-decl.c (finish_decl): Don't call get_pending_sizes.
      	(grokparm): Add parameter expr.  Pass it to grokdeclarator.
      	(push_parm_decl): Add parameter expr.  Pass it to grokdeclarator.
      	(c_variable_size): Remove.
      	(grokdeclarator): Use save_expr instead of c_variable_size.  Don't
      	call put_pending_sizes.
      	(get_parm_info): Add parameter expr.  Use it to set
      	arg_info->pending_sizes.
      	(store_parm_decls): Use arg_info->pending_sizes instead or calling
      	get_pending_sizes.
      	* c-parser.c (c_parser_parms_declarator): Update call to
      	c_parser_parms_list_declarator.
      	(c_parser_parms_list_declarator): Take parameter expr.  Update
      	call to push_parm_decl.  Update recursive call.  Don't call
      	get_pending_sizes.  Update calls to get_parm_info.
      	(c_parser_objc_method_definition): Update calls to
      	c_parser_objc_method_decl and objc_start_method_definition.
      	(c_parser_objc_methodproto): Update call to
      	c_parser_objc_method_decl.
      	(c_parser_objc_method_decl): Add parameter expr.  Update call to
      	grokparm.
      	(c_parser_objc_try_catch_finally_statement): Update call to
      	grokparm.
      	* c-tree.h (struct c_arg_info.pending_sizes): Change to a tree.
      	(get_parm_info, grokparm, push_parm_decl): Update prototypes.
      
      c-family:
      	* c-objc.h (objc_start_method_definition): Update prototype.
      	* stub-objc.c (objc_start_method_definition): Add extra parameter.
      
      cp:
      	* parser.c (cp_parser_objc_method_definition_list): Update call to
      	objc_start_method_definition.
      
      objc:
      	* objc-act.c (objc_start_method_definition): Add parameter expr.
      	Update call to start_method_def.
      	(objc_generate_cxx_ctor_or_dtor, objc_synthesize_getter,
      	objc_synthesize_setter) Update calls to
      	objc_start_method_definition.
      	(objc_get_parm_info): Add parameter expr.  Update call to
      	get_parm_info.
      	(start_method_def): Add parameter expr.  Update call to
      	objc_get_parm_info.
      	* objc-gnu-runtime-abi-01.c (build_module_initializer_routine):
      	Update call to objc_get_parm_info.
      	* objc-runtime-shared-support.h (objc_get_parm_info): Add extra
      	parameter.
      
      From-SVN: r173422
      Joseph Myers committed
  27. 04 May, 2011 1 commit
  28. 26 Apr, 2011 1 commit
  29. 21 Apr, 2011 1 commit
  30. 15 Apr, 2011 2 commits
    • In gcc/objc/: 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com> · 5678a5a3
      In gcc/objc/:
      2011-04-15  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* objc-act.c (ivar_of_class): New.
      	(objc_is_public): Use ivar_of_class.
      
      From-SVN: r172523
      Nicola Pero committed
    • In gcc/c-family/: 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com> · 0dc33c3c
      In gcc/c-family/:
      2011-04-15  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* c-objc.h (objc_get_interface_ivars): Removed.
      	(objc_detect_field_duplicates): New.	
      	* stub-objc.c: Likewise.
      	
      In gcc/:
      2011-04-15  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* c-decl.c (detect_field_duplicates): Call
      	objc_detect_field_duplicates instead of objc_get_interface_ivars.
      
      In gcc/objc/:
      2011-04-15  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* objc-act.c (objc_get_interface_ivars): Removed.
      	(objc_detect_field_duplicates): New.
      	(hash_instance_variable): New.
      	(eq_instance_variable): New.
      	
      In gcc/objcp/:
      2011-04-15  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* objcp-decl.c (objcp_finish_struct): Use
      	objc_detect_field_duplicates instead of having a local
      	implementation.
      
      In gcc/testsuite/:
      2011-04-15  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* objc.dg/naming-4.m: Updated.
      	* objc.dg/naming-5.m: Updated.	
      	* objc.dg/naming-6.m: New.
      	* objc.dg/naming-7.m: New.	
      	* obj-c++.dg/naming-1.mm: Updated.
      	* obj-c++.dg/naming-2.mm: Updated.
      	* obj-c++.dg/naming-3.mm: New.
      	* obj-c++.dg/naming-4.mm: New.
      
      From-SVN: r172511
      Nicola Pero committed
  31. 14 Apr, 2011 2 commits
    • In gcc/c-family/: 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com> · c59633d9
      In gcc/c-family/:
      2011-04-14  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* stub-objc.c (objc_declare_protocols): Renamed to
      	objc_declare_protocol.
      	* c-objc.h: Likewise.
      	
      In gcc/:
      2011-04-14  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* c-parser.c (c_parser_objc_protocol_definition): Updated for
      	change from objc_declare_protocols() to objc_declare_protocol().
      
      In gcc/objc/:
      2011-04-14  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* objc-act.c (objc_declare_protocols): Renamed to
      	objc_declare_protocol.  Changed first argument to be an identifier
      	instead of a tree chain of identifiers, so that callers don't have
      	to create a temporary tree chain.
      
      In gcc/cp/:
      2011-04-14  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* parser.c (cp_parser_objc_protocol_declaration): Updated for
      	change from objc_declare_protocols() to objc_declare_protocol().
      
      From-SVN: r172444
      Nicola Pero committed
    • In gcc/: 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com> · 32dabdaf
      In gcc/:
      2011-04-14  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* c-parser.c (c_parser_objc_class_declaration): Updated call to
      	objc_declare_class.
      
      In gcc/c-family/:
      2011-04-14  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* stub-objc.c (objc_declare_class): Updated argument name.
      
      In gcc/cp/:
      2011-04-14  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* parser.c (cp_parser_objc_class_declaration): Updated for change
      	in objc_declare_class().
      
      In gcc/objc/:
      2011-04-14  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* objc-act.c (objc_declare_class): Changed to take a single
      	identifier as argument instead of a tree list.  This means callers
      	don't have to build temporary tree lists to call this function.
      	(synth_module_prologue): Updated calls to objc_declare_class.
      
      From-SVN: r172425
      Nicola Pero committed
  32. 13 Apr, 2011 2 commits
    • In gcc/objc/: 2011-04-13 Nicola Pero <nicola.pero@meta-innovation.com> · 1328049a
      In gcc/objc/:
      2011-04-13  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* objc-act.c (build_keyword_selector): Use get_identifier_with_length
      	instead of get_identifier.
      
      From-SVN: r172360
      Nicola Pero committed
    • ada-tree.h (union lang_tree_node): Check for TS_COMMON before calling TREE_CHAIN. · 81f653d6
      gcc/ada/
      	* gcc-interface/ada-tree.h (union lang_tree_node): Check for
      	TS_COMMON before calling TREE_CHAIN.
      	* gcc-interface/misc.c (gnat_init_ts): New function.
      	(LANG_HOOKS_INIT_TS): Define.
      
      gcc/
      	* c-decl.c (union lang_tree_node): Check for TS_COMMON before
      	calling TREE_CHAIN.
      	* print-tree.c (print_node): Likewise.
      	* tree-inline.c (copy_tree_r): Likewise.
      	* c-lang.c (LANG_HOOKS_INIT_TS): Define.
      	* lto-streamer-in.c (lto_input_tree_pointers): Check for TS_TYPED
      	instead of TS_COMMON.
      	* lto-streamer-out.c (lto_output_tree_pointers): Likewise.
      	* tree.c (initialize_tree_contains_struct): Handle TS_TYPED.
      	(copy_node_stat): Zero TREE_CHAIN only if necessary.
      	(MARK_TS_BASE, MARK_TS_TYPED, MARK_TS_COMMON): Move these...
      	(MARK_TS_DECL_COMMON, MARK_TS_DECL_COMMON, MARK_TS_DECL_WRTL):
      	...and these...
      	(MARK_TS_DECL_WITH_VIS, MARK_TS_DECL_NON_COMMON): ...and these...
      	* tree.h: ...here.
      	(TREE_CHAIN): Check for a TS_COMMON structure.
      	(TREE_TYPE): Check for a TS_TYPED structure.
      
      gcc/c-family/
      	* c-common.h (c_common_init_ts): Declare.
      	* c-common.c (c_common_init_ts): Define.
      
      gcc/cp/
      	* cp-lang.c (cp_init_ts): Call cp_common_init_ts.  Move
      	tree_contains_struct initialization to...
      	* cp-objcp-common.c (cp_common_init_ts): ...here.  Use MARK_*
      	macros.
      	* cp-objcp-common.h (cp_common_init_ts): Declare.
      	* cp-tree.h (union lang_tree_node): Check for TS_COMMON before
      	calling TREE_CHAIN.
      
      gcc/fortran/
      	* f95-lang.c (union lang_tree_node): Check for TS_COMMON before
      	calling TREE_CHAIN.
      
      gcc/go/
      	* go-lang.c (union lang_tree_node): Check for TS_COMMON before
      	calling TREE_CHAIN.
      
      gcc/java/
      	* java-tree.h (union lang_tree_node): Check for TS_COMMON before
      	calling TREE_CHAIN.
      
      gcc/lto/
      	* lto-tree.h (union lang_tree_node): Check for TS_COMMON before
      	calling TREE_CHAIN.
      	* lto.c (lto_fixup_common): Likewise.
      
      gcc/objc/
      	* objc-lang.c (objc_init_ts): Move code for this function...
      	* objc-act.c (objc_common_init_ts): ...here. Define.
      	* objc-act.h (objc_common_init_ts): Declare.
      
      gcc/objcp/
      	* objcp-lang.c (objcxx_init_ts): Call objc_common_init_ts and
      	cp_common_init_ts.
      
      From-SVN: r172359
      Nathan Froyd committed
  33. 12 Apr, 2011 5 commits
    • In gcc/: 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com> · eb345401
      In gcc/:
      2011-04-12  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* c-parser.c (c_parser_initelt): Updated call to
      	objc_build_message_expr.
      	(c_parser_postfix_expression): Likewise.
      
      In gcc/c-family/:
      2011-04-12  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* c-objc.h (objc_build_message_expr): Updated prototype.
      	* stub-objc.c (objc_build_message_expr): Likewise.
      	
      In gcc/objc/:
      2011-04-12  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* objc-act.c (objc_build_message_expr): Accept two arguments
      	instead of one so that callers can simply pass the arguments
      	without having to create a temporary chain to hold them.
      
      In gcc/cp/:
      2011-04-12  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* parser.c (cp_parser_objc_message_expression): Updated call
      	to objc_build_message_expr.
      
      From-SVN: r172338
      Nicola Pero committed
    • In gcc/objc/: 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com> · dc2dc512
      In gcc/objc/:
      2011-04-12  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* objc-act.c (comp_proto_with_proto): Do not create and use
      	inefficient temporary argument lists.  Compare the arguments
      	directly.  (match_proto_with_proto): Removed; incorporated into
      	comp_proto_with_proto ().
      
      From-SVN: r172337
      Nicola Pero committed
    • In gcc/objc/: 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com> · cf3caeaf
      In gcc/objc/:
      2011-04-12  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* objc-act.c (printable_ivar_name): New.
      	(add_instance_variable): Call printable_ivar_name() when an error
      	message needs to be printed.  Do not prepare the instance variable
      	for printing unless there is an actual error.
      
      From-SVN: r172328
      Nicola Pero committed
    • In gcc/: 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com> · 0d8a2528
      In gcc/:
      2011-04-12  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* c-parser.c (c_lex_one_token): Rewritten conditional used when
      	compiling Objective-C to be more efficient.
      
      In gcc/objc/:
      2011-04-12  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* objc-act.c (objc_is_class_name, objc_is_id): For efficiency,
      	avoid calling identifier_global_value() multiple times.
      
      From-SVN: r172327
      Nicola Pero committed
    • cgraph.h (cgraph_node): Remove function declaration. · a358e188
      2011-04-12  Martin Jambor  <mjambor@suse.cz>
      
      	* cgraph.h (cgraph_node): Remove function declaration.
      	(cgraph_create_node): Declare.
      	(cgraph_get_create_node): Likewise.
      	* cgraph.c (cgraph_create_node): Renamed to cgraph_create_node_1.
      	Updated all callers.
      	(cgraph_node): Renamed to cgraph_create_node, assert that a node for
      	the decl does not already exist.  Call cgraph_get_create_node instead
      	of cgraph_node.
      	(cgraph_get_create_node): New function.
      	(cgraph_same_body_alias): Update comment.
      	(cgraph_set_call_stmt): Call cgraph_get_node instead of cgraph_node,
      	assert it does not return NULL.
      	(cgraph_update_edges_for_call_stmt): Likewise.
      	(cgraph_clone_edge): Likewise.
      	(cgraph_create_virtual_clone): Likewise.
      	(cgraph_update_edges_for_call_stmt_node): Call cgraph_get_create_node
      	instead of cgraph_node.
      	(cgraph_add_new_function): Call cgraph_create_node or
      	cgraph_get_create_node instead of cgraph_node.
      	* cgraphbuild.c (record_reference): Call cgraph_get_create_node
      	instead of cgraph_node.
      	(record_eh_tables): Likewise.
      	(mark_address): Likewise.
      	(mark_load): Likewise.
      	(build_cgraph_edges): Call cgraph_get_create_node instead
      	of cgraph_node.
      	(rebuild_cgraph_edges): Likewise.
      	* cgraphunit.c (cgraph_finalize_function): Call cgraph_get_create_node
      	instead of cgraph_node.
      	(cgraph_copy_node_for_versioning): Call cgraph_create_node instead of
      	cgraph_node.
      	* lto-symtab.c (lto_symtab_merge_cgraph_nodes_1): Call
      	cgraph_create_node instead of cgraph_node.
      	* c-decl.c (finish_function): Call cgraph_get_create_node instead
      	of cgraph_node.
      	* lto-cgraph.c (input_node): Likewise.
      	* lto-streamer-in.c (input_function): Likewise.
      	* varasm.c (mark_decl_referenced): Likewise.
      	(assemble_alias): Likewise.
      
      gcc/c-family/
      	* c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
      	of cgraph_node.
      
      gcc/cp/
      	* cp/class.c (cp_fold_obj_type_ref): Call cgraph_get_create_node
      	instead of cgraph_node.
      	* cp/decl2.c (cxx_callgraph_analyze_expr): Likewise.
      	(cp_write_global_declarations): Likewise.
      	* cp/optimize.c (maybe_clone_body): Likewise.
      	* cp/semantics.c (maybe_add_lambda_conv_op): Likewise.
      	* cp/mangle.c (mangle_decl): Likewise.
      	* cp/method.c (make_alias_for_thunk): Likewise.
      	(use_thunk): Likewise.
      
      gcc/ada/
      	* gcc-interface/utils.c (end_subprog_body): Call
      	cgraph_get_create_node instead of cgraph_node.
      
      gcc/fortran/
      	* trans-decl.c (gfc_generate_function_code): Call
      	cgraph_get_create_node instead of cgraph_node.
      
      gcc/objc/
      	* objc-act.c (mark_referenced_methods): Call cgraph_get_create_node
      	instead of cgraph_node.
      
      From-SVN: r172307
      Martin Jambor committed