1999-04-02 Mark Mitchell <mark@codesourcery.com>
* tinfo.h (__class_type_info): Fix illegal declaration.
* cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
* cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
(IDENTIFIER_CLASS_VALUE): Improve documentation.
(is_properly_derived_from): Declare.
(invalidate_class_lookup_cache): Likewise.
(maybe_maybe_note_name_used_in_class): Likewise.
(note_name_declared_in_class): Likewise.
(push_using_decl): Remove duplicate declaration.
(id_in_current_class): Remove declaration.
(push_class_binding): Change prototype.
(clear_identitifer_class_values): Declare.
* call.c (is_properly_derived_from): Make it global.
(build_new_function_call): Be careful about updating candidates.
(build_new_method_call): Handle COMPONENT_REFs. Don't crash when
asked to make illegal calls.
* class.c: Include splay-tree.h.
(class_stack_node): Add names_used slot.
(check_member_decl_is_same_in_complete_scope): Remove.
(add_method): Fix comment. Push the declaration into class
scope.
(finish_struct_1): When popping the class, pop the bindings too.
Remove check for data member/function member conflict.
(finish_struct): Remove calls to
check_member_decl_is_same_in_complete_scope. Change calls to
popclass.
(pushclass): Clear names_used in the class stack entry.
Use invalidate_class_lookup_cache to remove cached entries, rather
than magic values with popclass. Clear IDENTIFIER_CLASS_VALUE
before entering a new class. Remove dead code. Don't mess with
current_function_decl when pushing declarations.
(invalidate_class_lookup_cache): New function, split out from ...
(popclass): Here. Clean up names_used on our way out.
(instantiate_type): Adjust.
(build_self_reference): Don't push the declaration here.
(maybe_note_name_used_in_class): New function.
(note_name_declared_in_class): Likewise.
* decl.c (add_binding): Change prototype.
(find_class_binding_level): New function.
(innermost_nonclass_level): Likewise.
(current_binding_level): Update documentation.
(inner_binding_level): Remove. Replace with current_binding_level
throughout.
(push_binding_level): Remove special handling of
class_binding_level.
(pop_binding_level): Likewise. Use find_class_binding_level.
(suspend_binding_level): Likewise.
(global_bindings_p): Use innermost_nonclass_level.
(toplevel_bindings_p): Likewise.
(namespace_bindings_p): Likewise.
(pseudo_global_level_p): Likewise.
(push_binding): Clear INHERITED_VALUE_BINDING_P.
(add_binding): Check for illegal multiple declarations. Return a
value indicating whether or not the new binding was legal.
(push_local_binding): Skip over class binding levels. Check
return value from add_binding.
(push_class_binding): Set INHERITED_VALUE_BINDING_P. Call
note_name_declared_in_class.
(pushlevel_class): Remove "fake out the rest of the compiler"
code.
(poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
(clear_identifier_class_values): New function.
(pop_from_top_level): Use it.
(pop_everything): Tweak.
(maybe_process_template_type_declaration): Don't push the
declaration for the template here.
(pushtag): Don't push tag declarations into class scope here.
(pushdecl): Apply DeMorgan's law for readability.
(pushdecl_class_level): Remove special-case code for
TYPE_BEING_DEFINED. Handle OVERLOADs and anonymous unions.
(push_class_level_bindng): Deal with inherited bindings.
(lookup_name_real): Remove special-case code for
TYPE_BEING_DEFINED, and some implicit typename magic.
(grokdeclarator): Handle COMPONENT_REF for a template function.
(build_enumerator): Don't call pushdecl_class_level here.
(id_in_current_class): Remove.
* decl2.c (grokfield): Don't call pushdecl_class_level or
check_template_shadow.
* errfn.c (cp_file_of): Don't declare.
(cp_line_of): Likewise.
* error.c (dump_decl): Handle an OVERLOAD.
(cp_file_of): Likewise.
(cp_line_of): Likewise.
* init.c (build_member_call): Handle a COMPONENT_REF.
* lex.c (do_identifier): Call maybe_note_name_used_in_class, not
pushdecl_class_level.
* method.c (hack_identifier): Build COMPONENT_REFs for references
to member templates as well as member functions. Remove dead
code.
* parse.y (left_curly): Remove.
(nonnested_type): Call maybe_note_name_used_in_class, not
pushdecl_class_level.
* parse.c: Regenerated.
(nested_name_specifier_1): Likewise.
* pt.c (check_explicit_specialization): Adjust, for robustness.
(check_template_shadow): Handle OVERLOADs.
(build_template_decl): Set DECL_CONSTRUCTOR_P on the
TEMPLATE_DECL, if appropriate.
* search.c (envelope_add_decl): Remove.
(dfs_pushdecls): Likewise.
(dfs_compress_decls): Likewise.
(dfs_push_decls): New function.
(dfs_push_type_decls): Likewise.
(setup_class_bindings): Likewise.
(template_self_reference_p): Likewise.
(lookup_field_r): Use it.
(looup_member): Remove old comment. Deal with ambiguity.
(push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
and remove envelope processing.
* semantics.c (begin_class_definition): Let pushclass push
declarations for base classes.
(finish_member_declaration): Push declarations into class scope.
* typeck.c (build_component_ref): Just put an OVERLOAD into the
COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
(build_x_function_call): Deal with OVERLOAD. Handle template-ids.
* Makefile.in (class.o): Depend on splay-tree.h.
Donn Terry [Fri, 2 Apr 1999 14:56:49 +0000 (14:56 +0000)]
configure.in: Set and substitute quoted_cc_set_by_configure.
* configure.in: Set and substitute quoted_cc_set_by_configure.
* configure: Rebuilt.
* Makefile.in (SUBDIR_FLAGS_TO_PASS): Fix quoting problem with ``.
Jan Hubicka [Fri, 2 Apr 1999 10:44:02 +0000 (12:44 +0200)]
i386.c (print_operand_address, case REG): Do not use ESI addressing mode for the K6.
* i386.c (print_operand_address, case REG): Do not use ESI addressing
mode for the K6.
* i386.c (print_operand_address, case MULT): Use more efficient
encoding (mult (reg) (const_int 2)).
Move over patch from Bernd Schmidt from GC branch:
* emit-rtl.c (gen_rtx_CONST_DOUBLE): New function.
(gen_rtx): Call it. Tidy cases.
* rtl.h (gen_rtx_CONST_DOUBLE): Prototype it.
* gengenrtl.c: Add commentary.
(special_rtx): Also match CONST_DOUBLE.
(gencode): Emit call to memset instead of bzero.
Michael Hayes [Thu, 1 Apr 1999 17:02:51 +0000 (17:02 +0000)]
c4x.md (ashlhi3, [...]): Force operand 1 into a register if shift count not constant.
* config/c4x/c4x.md (ashlhi3, lshrhi3, ashrhi3): Force operand 1
into a register if shift count not constant.
(ashlhi3_reg, lshrhi3_reg, ashrhi3_reg): Ensure that operand 1
is a register.
Michael Hayes [Thu, 1 Apr 1999 16:40:38 +0000 (16:40 +0000)]
c4x.md (*db): Enable pattern if TARGET_LOOP_UNSIGNED is non-zero.
* config/c4x/c4x.md (*db): Enable pattern if TARGET_LOOP_UNSIGNED
is non-zero.
(movstrqi_small, movstrqi_large, *cmpstrqi): Add + modifier to address
register constraints.
(*movhi_clobber+1): Modify splitter pattern to handle destination
register that is used in the source address.
(*xorhi3_clobber): Replace AND with XOR in call to legitimize_operands.
Michael Hayes [Thu, 1 Apr 1999 16:02:07 +0000 (16:02 +0000)]
c4x.c (c4x_emit_move_sequence): Force invalid QImode constants into memory if...
* config/c4x/c4x.c (c4x_emit_move_sequence): Force invalid QImode
constants into memory if we get called directly from gen_move_insn
rather than emit_move_insn.
(c4x_legitimize_address): Fix up LABEL_REF addresses.
Jeffrey A Law [Thu, 1 Apr 1999 01:19:07 +0000 (01:19 +0000)]
inclhack.def (zzz_ki_syscalls, zzz_time): Fix trigger string to only match on hpux11.
* fixinc/inclhack.def (zzz_ki_syscalls, zzz_time): Fix trigger
string to only match on hpux11.
* fixinc/fixincl.x, fixinc/inclhack.sh, fixinc/fixinc.sh: Rebuilt.
Tom Tromey [Wed, 31 Mar 1999 11:46:42 +0000 (11:46 +0000)]
gjavah.c (print_field_info): Allow constants of other types.
* gjavah.c (print_field_info): Allow constants of other types.
(print_include): Generate include when new name is proper prefix
of already printed name.
(add_namelet): Likewise.
(cxx_keyword_subst): New function.
(print_method_info): Use it.
(print_field_name): New function.
(get_field_name): New function.
(print_field_info): Use get_field_name and print_field_name.
Kaveh R. Ghazi [Wed, 31 Mar 1999 10:56:35 +0000 (10:56 +0000)]
configure.in (extra_includes): Don't attempt to calculate the location of the gcc src or obj directories.
* configure.in (extra_includes): Don't attempt to calculate the
location of the gcc src or obj directories. Instead rely on
precomputed variables, $topsrcdir and $r, to obtain these values.
Set -I flags appropriately.
Kaveh R. Ghazi [Wed, 31 Mar 1999 08:05:08 +0000 (08:05 +0000)]
Makefile.in (keyword.h): Generate using gperf language 'C'...
* Makefile.in (keyword.h): Generate using gperf language 'C', not
'KR-C', so gperf uses the `const' keyword on strings.
* keyword.gperf (java_keyword): Const-ify a char*.
Kaveh R. Ghazi [Wed, 31 Mar 1999 07:51:10 +0000 (07:51 +0000)]
Makefile.in (hash.h): Generate using gperf language 'C'...
* Makefile.in (hash.h): Generate using gperf language 'C', not
'KR-C', so gperf uses the `const' keyword on strings.
* gxx.gperf (resword): Const-ify a char*.
Kaveh R. Ghazi [Wed, 31 Mar 1999 07:48:00 +0000 (07:48 +0000)]
Makefile.in (hash.h): Generate using gperf language 'C'...
* Makefile.in (hash.h): Generate using gperf language 'C', not
'KR-C', so gperf uses the `const' keyword on strings.
* gperf (resword): Const-ify a char*.
Kaveh R. Ghazi [Wed, 31 Mar 1999 07:43:52 +0000 (07:43 +0000)]
Makefile.in (c-gperf.h): Generate using gperf language 'C'...
* Makefile.in (c-gperf.h): Generate using gperf language 'C', not
'KR-C', so gperf uses the `const' keyword on strings.
* c-parse.gperf (resword): Const-ify a char*.
Mark Mitchell [Tue, 30 Mar 1999 20:52:33 +0000 (20:52 +0000)]
alias.c (alias_set_compare): Remove.
* alias.c (alias_set_compare): Remove.
(record_alias_subset): Use splay_tree_compare_ints instaed of
alias_set_compare.
(init_alias_once): Likewise.
* cse.c: Include splay-tree.h.
(reg_qty): Remove.
(reg_tick): Likewise.
(reg_table): Likewise.
(cse_reg_info): New structure.
(cse_reg_info_free_list): New variable.
(cse_reg_info_tree): Likewise.
(cached_regno): Likewise.
(cached_cse_reg_info): Likewise.
(all_minus_one): Remove.
(consec_ints): Likewise.
(GET_CSE_REG_INFO): New macro.
(REG_TICK): Likewise. Use throughout instead of reg_tick.
(REG_IN_TABLE): Likewise. Use throughout instead of reg_in_table.
(REG_QTY): Likewise. Use throughout instead of reg_qty.
(get_cse_reg_info): New function.
(free_cse_reg_info): Likewise.
(new_basic_block): Reinitialize cse_reg_info_tree instead of
reg_tick, all_minus_one, and consec_ints.
* Makefile.in (cse.o): Depend on splay-tree.h
* splay-tree.h (splay_tree_compare_ints): Declare.
* splay-tree.c (splay_tree_compare_ints): Define.
Tom Tromey [Tue, 30 Mar 1999 16:12:25 +0000 (16:12 +0000)]
cplus-dem.c (consume_count): If `count' wraps, return 0 and don't advance input pointer.
* cplus-dem.c (consume_count): If `count' wraps, return 0 and
don't advance input pointer.
(demangle_class_name): If consume_count didn't find a count, do
nothing. Don't bother with `strlen' sanity check; consume_count
does it for us.
Tue Mar 30 11:31:53 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (patch_bc_statement): Fixed identation and a bogus
`printf' format.
Tue Mar 30 11:29:29 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (patch_assignment): Allow static variables in other
classes to be assigned.
Jerry Quinn [Mon, 29 Mar 1999 10:52:29 +0000 (10:52 +0000)]
pa.h (HAVE_PRE_INCREMENT): Disable when optimizing for a PA8000 class machine.
* pa.h (HAVE_PRE_INCREMENT): Disable when optimizing for a PA8000
class machine.
(HAVE_PRE_DECREMENT, HAVE_POST_INCREMENT): Likewise.
(HAVE_POST_DECREMENT): Likewise.
Kaveh R. Ghazi [Sun, 28 Mar 1999 19:22:10 +0000 (19:22 +0000)]
Warning fixes:
* class.c (maybe_add_interface): Remove unused variable
`interface_binfo'.
(make_class_data): Use = for assignment, not ==. Likewise.
(emit_register_classes): Remove unused variable `decl'.
* lex.c: Fix comment so as not to contain an embedded `/*'.
* verify.c (verify_jvm_instructions): Remove unused variable
`self_type'.