aboutsummaryrefslogtreecommitdiff
path: root/gcc/java
AgeCommit message (Collapse)AuthorFilesLines
1999-03-23Warning fixes:Kaveh R. Ghazi8-466/+483
* gjavah.c (print_c_decl): Remove unused argument `flags'. * jcf-dump.c (print_access_flags): Add braces around if-else. * jvspec.c (lang_specific_driver): Wrap variable `len' in macro COMBINE_INPUTS. * lex.c (build_wfl_node): Add static prototype. * lex.h (build_wfl_node): Remove static prototype. * parse.y: Include lex.c early enough to declare everything needed. Ensure calls to `build_wfl_node' pass the proper arguments. (create_class): Remove unused variable `super_decl'. (get_printable_method_name): Initialize variable `name'. From-SVN: r25921
1999-03-22Changelog: Fixed 1999-03-22 typos.Alexandre Petit-Bianco2-3/+9
Mon Mar 22 20:14:26 1999 Alexandre Petit-Bianco <apbianco@cygnus.com> * Changelog: Fixed 1999-03-22 typos. * lang.c (lang_decode_option): Fixed typo in error string in the XARG section. (Grr, typos.) From-SVN: r25908
1999-03-22Makefile.in: (JAVA_OBJS) Added entry xref.o.Alexandre Petit-Bianco6-1/+149
1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com> * Makefile.in: (JAVA_OBJS) Added entry xref.o. (xref.o): New rule. * java-tree.h (flag_emit_xref): Declared extern. * lang.c: (xref.h): Included. (flag_emit_xref): New global variable. (lang_decode_option): Added support for -fxref. * xref.c: Created. * xref.h: Likewise. From-SVN: r25907
1999-03-21Makefile.in (xgcc$(exeext)): Add intl.o to list of files to be linked with.Manfred Hollstein1-0/+5
gcc/ChangeLog: 1999-03-21 Manfred Hollstein <manfred@s-direktnet.de> * Makefile.in (xgcc$(exeext)): Add intl.o to list of files to be linked with. gcc/f/ChangeLog: 1999-03-21 Manfred Hollstein <manfred@s-direktnet.de> * Makefile.in (g77$(exeext)): Depend on intl.o. Link in intl.o. gcc/java/ChangeLog: 1999-03-21 Manfred Hollstein <manfred@s-direktnet.de> * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be linked with. gcc/po/ChangeLog: 1999-03-21 Manfred Hollstein <manfred@s-direktnet.de> * POTFILES.in: Track latest file renamings. 1999-03-01 Manfred Hollstein <manfred@s-direktnet.de> * POTFILES.in: Remove files which do not exist anymore in egcs. Fix names of those files which are now living in egcs's libiberty/include directories. From-SVN: r25881
1999-03-21*** empty log message ***Manfred Hollstein1-2/+2
From-SVN: r25880
1999-03-21Makefile.in (jcf-dump.o): Depend on $(CONFIG_H) $(srcdir)/../system.h and ↵Kaveh R. Ghazi22-160/+411
$(JAVA_TREE_H). * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H) $(srcdir)/../system.h and $(JAVA_TREE_H). (jcf-io.o): Depend on $(JAVA_TREE_H). (mangle.o): Likewise. * check-init.c (check_cond_init): Add static prototype. * class.c (build_java_method_type, hashUtf8String, make_field_value, get_dispatch_vector, get_dispatch_table, append_gpp_mangled_type, mangle_static_field): Likewise. (strLengthUtf8): Hide unused definition. (hashUtf8String): Const-ify. (make_field_value): Un-ANSI-fy. * constants.c: Move inclusion of jcf.h above java-tree.h. (set_constant_entry, find_class_or_string_constant, find_name_and_type_constant, get_tag_node, build_constant_data_ref): Add static prototype. * decl.c (push_jvm_slot, builtin_function, lookup_name_current_level): Likewise. (builtin_function): Const-ify. * except.c (expand_start_java_handler, expand_end_java_handler): Add static prototype. * expr.c (flush_quick_stack, push_value, pop_value, java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr, build_java_ret, expand_java_multianewarray, expand_java_arraystore, expand_java_arrayload, expand_java_array_length, build_java_monitor, expand_java_pushc, expand_java_return, expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label, expand_compare, expand_test, expand_cond, expand_java_goto, expand_java_call, expand_java_ret, pop_arguments, expand_invoke, expand_java_field_op, java_push_constant_from_pool): Likewise. (decode_newarray_type, expand_iinc): Un-ANSI-fy. (build_java_arraynull_check): Mark parameters `node' and `type' with ATTRIBUTE_UNUSED. (note_label): Likewise for parameter `current_pc'. (expand_java_call, expand_java_ret): Hide unused definition. * java-tree.h (make_class, build_constants_constructor, java_set_exception_lang_code, pop_labeled_block, emit_handlers, init_outgoing_cpool, register_class, emit_register_classes, java_layout_seen_class_methods): Prototype. (unicode_mangling_length): Const-ify. (append_gpp_mangled_name, append_gpp_mangled_classtype, emit_unicode_mangled_name, format_int, format_uint, jcf_trim_old_input, jcf_print_utf8, jcf_print_char, jcf_print_utf8_replace, open_class): Prototype. * jcf-dump.c: Include "config.h", not <config.h>. Don't include <stdio.h>. Include tree.h/java-tree.h. (utf8_equal_string usage, process_class): Add static prototype. (open_class): Don't prototype this here. (utf8_equal_string): Match arguments to format specifiers. (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH, TABLE_SWITCH, disassemble_method): Likewise. * jcf-io.c: Include tree.h/java-tree.h. (open_class, find_classfile, jcf_print_utf8, jcf_print_utf8_replace): Const-ify. * jcf-parse.c (parse_zip_file_entries, process_zip_dir, parse_class_file): Add static prototype. (find_in_current_zip): Match definition to existing static prototype. * jcf-write.c: Include jcf.h before tree.h/java-tree.h. (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label, finish_jcf_block, define_jcf_label, get_jcf_label_here, put_linenumber, localvar_alloc, localvar_free, get_access_flags, write_chunks, adjust_typed_op, generate_bytecode_conditional, generate_bytecode_return, perform_relocations, init_jcf_state, init_jcf_method, release_jcf_state, generate_classfile): Add static prototype. (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED. (make_class_file_name): Const-ify. * jcf.h (find_classfile): Const-ify. * jv-scan.c (reset_report): Remove prototype. * jvgenmain.c: Include jcf.h/tree.h/java-tree.h. (error): Rewrite to allow varargs. * lang.c (lang_f_options): Const-ify. * lex.c (java_parse_escape_sequence): Add static prototype. (java_allocate_new_line): Match definition to existing static prototype. * mangle.c Include tree.h/java-tree.h. (unicode_mangling_length, emit_unicode_mangled_name, append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify. * parse.h (jdep_code): Remove trailing comma in enumeration. (java_get_line_col): Move prototype outside of !JC1_LITE test. (reset_report): Add prototype. * verify.c (push_pending_label, merge_types): Add static prototypes. * zipfile.h (opendir_in_zip, open_in_zip): Prototype. From-SVN: r25878
1999-03-19parse.y (find_applicable_accessible_methods_list): Extend the search to ↵Alexandre Petit-Bianco1-374/+374
superinterfaces when relevant. 1999-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (find_applicable_accessible_methods_list): Extend the search to superinterfaces when relevant. (search_applicable_methods_list): New function. (Previous check didn't have the right path in the `#line' directives.) From-SVN: r25863
1999-03-19parse.y (find_applicable_accessible_methods_list): Extend the search to ↵Alexandre Petit-Bianco1-449/+481
superinterfaces when relevant. 1999-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (find_applicable_accessible_methods_list): Extend the search to superinterfaces when relevant. (search_applicable_methods_list): New function. (parse.c wasn't part of the last check-in.) From-SVN: r25862
1999-03-19[multiple changes]Alexandre Petit-Bianco3-25/+80
1999-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (find_applicable_accessible_methods_list): Extend the search to superinterfaces when relevant. (search_applicable_methods_list): New function. 1999-03-18 Alexandre Petit-Bianco <apbianco@cygnus.com> * class.c (unmangle_classname): Implemented stricter testing before setting the QUALIFIED_P flag on an identifier. From-SVN: r25861
1999-03-16parse.y (java_complete_lhs): Call force_evaluation_order after patch_newarray.Per Bothner1-0/+6
� * parse.y (java_complete_lhs): Call force_evaluation_order after patch_newarray. (patch_binop): Don't call fold if there are side effects. From-SVN: r25808
1999-03-16parse.y (java_complete_lhs): Call force_evaluation_order after patch_newarray.Per Bothner1-2/+6
x * parse.y (java_complete_lhs): Call force_evaluation_order after patch_newarray. (patch_binop): Don't call fold if there are side effects. From-SVN: r25807
1999-03-16parse.y (java_complete_lhs): Call force_evaluation_order after patch_newarray.Per Bothner1-2/+6
* parse.y (java_complete_lhs): Call force_evaluation_order after patch_newarray. (patch_binop): Don't call fold if there are side effects. From-SVN: r25806
1999-03-15parse.y (java_stabilize_reference): Use save_expr instead of building a ↵Alexandre Petit-Bianco3-6/+20
SAVE_EXPR node. 1999-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (java_stabilize_reference): Use save_expr instead of building a SAVE_EXPR node. (java_complete_lhs): Patch the resulting string of the `+=' operator (if necessary) and complete the RHS after having built the cast. From-SVN: r25797
1999-03-15class.c (make_class): Don't set CLASS_P here (because this function is also ↵Per Bothner1-0/+17
called by... * class.c (make_class): Don't set CLASS_P here (because this function is also called by build_java_array_type). (push_class): Set CLASS_P here instead. * parse.h (TYPE_CLASS_P): Check for TYPE_ARRAY_P is redundant. * jcf-dump.c (print_access_flags): Take extra parameter to indicate context. If the context is class, perfer "super" over "synchronized". * jcf-write.c (generate_classfile): Don't add ACC_SUPER if interface. * parse.y (create_class): Don't call parser_check_super here; it is not robust. Always wait until later. * parse.y (method_header): For interfaces, set ACC_ABSTRACT (to match what JDK 1.2 does), but don't set ACC_PUBLIC. From-SVN: r25785
1999-03-15class.c (make_class): Don't set CLASS_P here (because this function is also ↵Per Bothner4-32/+21
called by... d * class.c (make_class): Don't set CLASS_P here (because this function is also called by build_java_array_type). (push_class): Set CLASS_P here instead. * parse.h (TYPE_CLASS_P): Check for TYPE_ARRAY_P is redundant. * jcf-dump.c (print_access_flags): Take extra parameter to indicate context. If the context is class, perfer "super" over "synchronized". * jcf-write.c (generate_classfile): Don't add ACC_SUPER if interface. * parse.y (create_class): Don't call parser_check_super here; it is not robust. Always wait until later. * parse.y (method_header): For interfaces, set ACC_ABSTRACT (to match what JDK 1.2 does), but don't set ACC_PUBLIC. From-SVN: r25784
1999-03-15class.c (make_class): Don't set CLASS_P here (because this function is also ↵Per Bothner1-1/+3
called by... a * class.c (make_class): Don't set CLASS_P here (because this function is also called by build_java_array_type). (push_class): Set CLASS_P here instead. * parse.h (TYPE_CLASS_P): Check for TYPE_ARRAY_P is redundant. * jcf-dump.c (print_access_flags): Take extra parameter to indicate context. If the context is class, perfer "super" over "synchronized". * jcf-write.c (generate_classfile): Don't add ACC_SUPER if interface. * parse.y (create_class): Don't call parser_check_super here; it is not robust. Always wait until later. * parse.y (method_header): For interfaces, set ACC_ABSTRACT (to match what JDK 1.2 does), but don't set ACC_PUBLIC. From-SVN: r25783
1999-03-15class.c (make_class): Don't set CLASS_P here (because this function is also ↵Per Bothner1-1/+1
called by... T * class.c (make_class): Don't set CLASS_P here (because this function is also called by build_java_array_type). (push_class): Set CLASS_P here instead. * parse.h (TYPE_CLASS_P): Check for TYPE_ARRAY_P is redundant. * jcf-dump.c (print_access_flags): Take extra parameter to indicate context. If the context is class, perfer "super" over "synchronized". * jcf-write.c (generate_classfile): Don't add ACC_SUPER if interface. * parse.y (create_class): Don't call parser_check_super here; it is not robust. Always wait until later. * parse.y (method_header): For interfaces, set ACC_ABSTRACT (to match what JDK 1.2 does), but don't set ACC_PUBLIC. From-SVN: r25782
1999-03-13lex.c (java_read_char): UNGET invalid non-initial utf8 character.Per Bothner1-0/+5
� * lex.c (java_read_char): UNGET invalid non-initial utf8 character. * lex.h (UNGETC): Change misleading macro. From-SVN: r25754
1999-03-13lex.c (java_read_char): UNGET invalid non-initial utf8 character.Per Bothner2-3/+14
h * lex.c (java_read_char): UNGET invalid non-initial utf8 character. * lex.h (UNGETC): Change misleading macro. From-SVN: r25753
1999-03-12parse.y (java_stabilize_reference): Return NODE when patching a COMPOUND_EXPR.Alexandre Petit-Bianco5-300/+417
1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (java_stabilize_reference): Return NODE when patching a COMPOUND_EXPR. (java_complete_lhs): Put parenthesis around truth values. 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com> * class.c (layout_class_method): Don't make rtl for interface methods. * parse.h (GET_TYPE_NAME): New macro. * parse.y (if_then_statement:): Fixed indentation. (if_then_else_statement:): Likewise. (for_statement:): Fixed spacing. (try_statement:): Fixed indentation. (create_interface): Don't force interfaces to be abstract. (method_header): Abstract methods are OK in interfaces. (declare_local_variables): Fixed typo in comment. (java_complete_expand_method): Fixed indentation. (resolve_qualified_expression_name): Use GET_TYPE_NAME to report non accessible fields. (java_stabilize_reference): New function. (java_complete_lhs): Fixed indentation. Use java_stabilize_reference in compound assignement. Insert the cast. If not processing `+' fix string constants before processing binop. From-SVN: r25733
1999-03-12Warning fixes:Kaveh R. Ghazi11-90/+47
* constants.c (find_class_or_string_constant): Cast variable `j' to a `jword' when comparing against one. * expr.c (java_lang_expand_expr): Remove unused variables `has_finally_p' and `op0'. * gjavah.c (print_field_info): Cast a value to jint when comparing against one. Likewise for a jlong. (add_namelet): Likewise cast a `sizeof' to an int when comparing against a signed quantity. * jcf-dump.c (print_signature_type): Remove unused variable `digit'. (print_signature): Don't needlessly dereference variable `str' * jcf-reader.c (get_attribute): Mark variables `max_stack' and `max_locals' with ATTRIBUTE_UNUSED. (jcf_parse_class): Likewise for variable `index'. * parse.h (reverse_jdep_list): Remove static prototype. * parse.y (build_jump_to_finally): Remove prototype and definition. (reverse_jdep_list): Add static prototype. * typeck.c (convert_ieee_real_to_integer): Remove unused variables `assignment' and `expr_decl'. * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'. From-SVN: r25731
1999-03-12jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes...Andrew Haley2-1/+6
1999-03-12 Andrew Haley <aph@cygnus.com> * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes; we'll need a directory separator and a null character. From-SVN: r25726
1999-03-10jcf-write.c (generate_bytecode_insns): Handle __builtin_fmod, for %.Per Bothner1-0/+4
8 * jcf-write.c (generate_bytecode_insns): Handle __builtin_fmod, for %. From-SVN: r25683
1999-03-10jcf-write.c (generate_bytecode_insns): Handle __builtin_fmod, for %.Per Bothner1-0/+7
� * jcf-write.c (generate_bytecode_insns): Handle __builtin_fmod, for %. From-SVN: r25682
1999-03-08lex.c (java_parse_end_comment): Take extra parameter (next char).Per Bothner4-17/+33
� * lex.c (java_parse_end_comment): Take extra parameter (next char). * class.c (build_utf8_ref): Fix possible name class/ambiguity. * class.c (layout_class_method): A static method in a base class is never overridden, so treat it like it doesn't exist. However, do complain about private non-static method overriding public static method. * parse.y: Don't set unused INITIALIZED_P flag. * java-tree.h (INITIALIZED_P): Removed no-longer needed flag. * parse.y (find_expr_with_wfl): Optimize tail-calls. (build_array_from_name): Re-order &index[string] to &string[index]. * parse.y (java_complete_tree): Don't call patch_assignment if rhs is error_mark (it might catch more errors, but it is more likely to lose). From-SVN: r25641
1999-03-08*** empty log message ***Per Bothner2-74/+30
From-SVN: r25640
1999-03-06Makefile.in (jcf-parse.o): Depend on $(PARSE_H).Kaveh R. Ghazi13-122/+200
* Makefile.in (jcf-parse.o): Depend on $(PARSE_H). (parse-scan.o): Depend on toplev.h. * class.c (make_method_value): Add prototype. Make it static. Remove unused second argument, caller changed. * expr.c (java_lang_expand_expr): Remove unused variable `return_label'. * java-tree.h: Don't prototype find_in_current_zip. Add prototypes for verify_constant_pool, start_java_method, end_java_method, give_name_to_locals, expand_byte_code, open_in_zip, set_constant_value, find_constant1, find_constant2, find_utf8_constant, find_string_constant, find_class_constant, find_fieldref_index, find_methodref_index, write_constant_pool, count_constant_pool_bytes and encode_newarray_type. * jcf-dump.c: Remove unused variable `LONG_temp'. * jcf-parse.c: Include parse.h. (jcf_parse_source): Remove unused parameter, all callers changed. (jcf_figure_file_type): Add static prototype. (find_in_current_zip): Likewise. Also remove unused parameter, all callers changed. (read_class): Initialize variable `saved_pos'. * jcf-reader.c (jcf_parse_preamble): Mark variables `minor_version' and `major_version' with ATTRIBUTE_UNUSED. * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE. (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE. (java_parse_doc_section): Initialize variable `seen_star'. (java_lex): Wrap variable `number_beginning' in !JC1_LITE. (java_lex_error): Mark parameters `msg' and `forward' with ATTRIBUTE_UNUSED. (java_get_line_col): Mark parameters `filename' and `line' with ATTRIBUTE_UNUSED. * parse-scan.y: Include toplev.h. (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED. * parse.h: use `struct JCF', not plain `JCF'. (java_parser_context_save_global, java_expand_classes java_parser_context_restore_global, java_parse): Add prototypes. * typeck.c (convert_ieee_real_to_integer): Remove unused variable `node'. From-SVN: r25616
1999-02-26check-init.c (check_init): COPYN takes word count, not bit count.Per Bothner1-0/+4
0 * check-init.c (check_init): COPYN takes word count, not bit count. From-SVN: r25471
1999-02-26check-init.c (check_init): COPYN takes word count, not bit count.Per Bothner1-1/+1
� * check-init.c (check_init): COPYN takes word count, not bit count. From-SVN: r25470
1999-02-26typeck.c (convert_ieee_real_to_integer): Use save_expr instead of explicit ↵Per Bothner1-0/+10
build_decl. � * typeck.c (convert_ieee_real_to_integer): Use save_expr instead of explicit build_decl. (Avoids crash in reload when optimizing.) * decl.c (complete_start_java_method): Handle synchronized method even when compiling from bytecode. From-SVN: r25469
1999-02-26typeck.c (convert_ieee_real_to_integer): Use save_expr instead of explicit ↵Per Bothner2-38/+34
build_decl. � * typeck.c (convert_ieee_real_to_integer): Use save_expr instead of explicit build_decl. (Avoids crash in reload when optimizing.) * decl.c (complete_start_java_method): Handle synchronized method even when compiling from bytecode. From-SVN: r25468
1999-02-26gjavah.c (add_class_decl): Only generate `#include' if outer class is not ↵Tom Tromey2-20/+92
the name of the class we are... * gjavah.c (add_class_decl): Only generate `#include' if outer class is not the name of the class we are processing. Correctly append `.h' in #include. (process_file): Clean up newlines around generated `#include's. (decode_signature_piece): Correctly handle inner classes. (struct include): New structure. (all_includes): New global. (print_include): New function. (add_class_decl): Use it. (process_file): Likewise. (add_class_decl): Generate include for java-array.h if array seen. (process_file): Don't generate java-array.h include. From-SVN: r25460
1999-02-26gjavah.c (add_namelet): Check for standard package names here.Tom Tromey2-14/+22
* gjavah.c (add_namelet): Check for standard package names here. (add_class_decl): Don't check for standard package names here. From-SVN: r25456
1999-02-25parse.y (read_import_dir): Use `|=', not `+=', to set `found'.Tom Tromey3-14/+23
* parse.y (read_import_dir): Use `|=', not `+=', to set `found'. When reading a zip file, only use strncmp if both strings are bigger than the buffer length. Initialize `k' when looping through zip file. From-SVN: r25439
1999-02-24gjavah.c (struct namelet): New structure.Tom Tromey2-51/+284
* gjavah.c (struct namelet): New structure. (add_namelet): New function. (print_namelet): New function. (print_class_decls): Use add_namelet and print_namelet to generate namespaces and not classes. (method_printed): New global. (HANDLE_END_METHOD): Examine method_printed. (print_method_info): Set method_printed when required. Print error if function to be ignored is marked virtual. Handle $finit$ method. (METHOD_IS_FINAL): New macro. (print_field_info): Use it. (HANDLE_METHOD): Clear method_printed. (method_pass): New global. (HANDLE_END_FIELD): Call add_class_decl on the first pass. (process_file): Do two passes over both fields and methods. (HANDLE_METHOD): Examine method_pass. (root): New global. (add_class_decl): New function. (print_class_decls): Don't scan over entire constant pool. From-SVN: r25403
1999-02-23jvspec.c (lang_specific_driver): Recognize -fsyntax-only and disable linking ↵Tom Tromey2-0/+12
in that case. * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and disable linking in that case. From-SVN: r25389
1999-02-22jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f, not 0x1f.Tom Tromey2-1/+6
* jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f, not 0x1f. From-SVN: r25369
1999-02-21decl.c (build_result_decl): New method.Per Bothner6-58/+128
d * decl.c (build_result_decl), java-tree.h: New method. (complete_start_java_method): Handle synchronized methods. Don't build DECL_RESULT here. (Ordering dependency problem.) (start_java_method): Call build_result_decl here instead ... * parse.y (java_complete_expand_method): ... and here. (expand_start_java_method): Don't call complete_start_java_method here. (java_complete_expand_method): Call it here instead. * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Moved to .. * java-tree.h: ... here. * expr.c (force_evaluation_order): Fix typo, don't handle ARRAY_REF. * parse.y (java_complete_lhs): Don't call force_evaluation_order for ARRAY_REF - it doesn't work when array bounds are checked. (patch_array_ref): Handle it here instead. From-SVN: r25346
1999-02-21decl.c (build_result_decl): New method.Per Bothner1-1/+20
* decl.c (build_result_decl), java-tree.h: New method. (complete_start_java_method): Handle synchronized methods. Don't build DECL_RESULT here. (Ordering dependency problem.) (start_java_method): Call build_result_decl here instead ... * parse.y (java_complete_expand_method): ... and here. (expand_start_java_method): Don't call complete_start_java_method here. (java_complete_expand_method): Call it here instead. * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Moved to .. * java-tree.h: ... here. * expr.c (force_evaluation_order): Fix typo, don't handle ARRAY_REF. * parse.y (java_complete_lhs): Don't call force_evaluation_order for ARRAY_REF - it doesn't work when array bounds are checked. (patch_array_ref): Handle it here instead. From-SVN: r25345
1999-02-21decl.c (build_result_decl): New method.Per Bothner1-0/+15
� * decl.c (build_result_decl), java-tree.h: New method. (complete_start_java_method): Handle synchronized methods. Don't build DECL_RESULT here. (Ordering dependency problem.) (start_java_method): Call build_result_decl here instead ... * parse.y (java_complete_expand_method): ... and here. (expand_start_java_method): Don't call complete_start_java_method here. (java_complete_expand_method): Call it here instead. * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Moved to .. * java-tree.h: ... here. * expr.c (force_evaluation_order): Fix typo, don't handle ARRAY_REF. * parse.y (java_complete_lhs): Don't call force_evaluation_order for ARRAY_REF - it doesn't work when array bounds are checked. (patch_array_ref): Handle it here instead. From-SVN: r25344
1999-02-21jcf-write.c (generate_classfile): Emit "Exceptions" attribute.Per Bothner1-0/+4
* jcf-write.c (generate_classfile): Emit "Exceptions" attribute. From-SVN: r25343
1999-02-19Ooops -forgot ChangeLog.Per Bothner1-0/+18
From-SVN: r25329
1999-02-19Force left-to-right evaluation of binary operations etc.Per Bothner2-34/+59
d Force left-to-right evaluation of binary operations etc. * expr.c (force_evaluation_order), java-tree.h: New function. * parse.y (java_complete_lhs): Pass binary operations, procedure calls, and ARRAY_REFs to force_evaluation_order. (various): Set TREE_SIDE_EFFECTS more carefully. Tolerate random (non-UTF8) encoding in comments without complaining. * lex.c (java_read_char): Return 0xFFFE if bad UTF8 encoding. (java_is_eol): Handle '\r' followed by '\n' instead of vice versa. * parse.y (resolve_qualified_expression_name): Handle error_mark. (java_complete_node case EXPR_WITH_FILE_LOCATION): Likewise. * parse.y (java_complete_lhs): Ignore an empty statement in a COMPOUND_EXPR. Don't complain about empty statement after return. From-SVN: r25328
1999-02-19Force left-to-right evaluation of binary operations etc.Per Bothner1-0/+1
T Force left-to-right evaluation of binary operations etc. * expr.c (force_evaluation_order), java-tree.h: New function. * parse.y (java_complete_lhs): Pass binary operations, procedure calls, and ARRAY_REFs to force_evaluation_order. (various): Set TREE_SIDE_EFFECTS more carefully. Tolerate random (non-UTF8) encoding in comments without complaining. * lex.c (java_read_char): Return 0xFFFE if bad UTF8 encoding. (java_is_eol): Handle '\r' followed by '\n' instead of vice versa. * parse.y (resolve_qualified_expression_name): Handle error_mark. (java_complete_node case EXPR_WITH_FILE_LOCATION): Likewise. * parse.y (java_complete_lhs): Ignore an empty statement in a COMPOUND_EXPR. Don't complain about empty statement after return. From-SVN: r25327
1999-02-19Force left-to-right evaluation of binary operations etc.Per Bothner1-0/+47
Force left-to-right evaluation of binary operations etc. * expr.c (force_evaluation_order), java-tree.h: New function. * parse.y (java_complete_lhs): Pass binary operations, procedure calls, and ARRAY_REFs to force_evaluation_order. (various): Set TREE_SIDE_EFFECTS more carefully. Tolerate random (non-UTF8) encoding in comments without complaining. * lex.c (java_read_char): Return 0xFFFE if bad UTF8 encoding. (java_is_eol): Handle '\r' followed by '\n' instead of vice versa. * parse.y (resolve_qualified_expression_name): Handle error_mark. (java_complete_node case EXPR_WITH_FILE_LOCATION): Likewise. * parse.y (java_complete_lhs): Ignore an empty statement in a COMPOUND_EXPR. Don't complain about empty statement after return. From-SVN: r25326
1999-02-19parse.y (obtain_incomplete_type): Don't wrap unknown types in TREE_LIST - ↵Per Bothner1-1/+6
just chain the POINTER_TYPEs together. a * parse.y (obtain_incomplete_type): Don't wrap unknown types in TREE_LIST - just chain the POINTER_TYPEs together. (resolve_class): If type already resolved, return decl. After resolving, update TREE_TYPE(class_type), and name (if array). * parse.h (do_resolve_class), parse.y: Make non-static. * class.c (maybe_layout_super_class): Take this_class argument. Do do_resolve_class if necessary. (layout_class, layout_class_methods): Adjust calls appropriately. * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED, JDEP_RESOLVED_P): Redefined for new TREE_LIST-less convention. * typeck.c (build_java_array_type): Don't call layout_class. From-SVN: r25325
1999-02-19parse.y (obtain_incomplete_type): Don't wrap unknown types in TREE_LIST - ↵Per Bothner3-29/+86
just chain the POINTER_TYPEs together. d * parse.y (obtain_incomplete_type): Don't wrap unknown types in TREE_LIST - just chain the POINTER_TYPEs together. (resolve_class): If type already resolved, return decl. After resolving, update TREE_TYPE(class_type), and name (if array). * parse.h (do_resolve_class), parse.y: Make non-static. * class.c (maybe_layout_super_class): Take this_class argument. Do do_resolve_class if necessary. (layout_class, layout_class_methods): Adjust calls appropriately. * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED, JDEP_RESOLVED_P): Redefined for new TREE_LIST-less convention. * typeck.c (build_java_array_type): Don't call layout_class. From-SVN: r25324
1999-02-19parse.y (obtain_incomplete_type): Don't wrap unknown types in TREE_LIST - ↵Per Bothner1-10/+14
just chain the POINTER_TYPEs together. T * parse.y (obtain_incomplete_type): Don't wrap unknown types in TREE_LIST - just chain the POINTER_TYPEs together. (resolve_class): If type already resolved, return decl. After resolving, update TREE_TYPE(class_type), and name (if array). * parse.h (do_resolve_class), parse.y: Make non-static. * class.c (maybe_layout_super_class): Take this_class argument. Do do_resolve_class if necessary. (layout_class, layout_class_methods): Adjust calls appropriately. * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED, JDEP_RESOLVED_P): Redefined for new TREE_LIST-less convention. * typeck.c (build_java_array_type): Don't call layout_class. From-SVN: r25323
1999-02-19parse.y (obtain_incomplete_type): Don't wrap unknown types in TREE_LIST - ↵Per Bothner1-0/+14
just chain the POINTER_TYPEs together. * parse.y (obtain_incomplete_type): Don't wrap unknown types in TREE_LIST - just chain the POINTER_TYPEs together. (resolve_class): If type already resolved, return decl. After resolving, update TREE_TYPE(class_type), and name (if array). * parse.h (do_resolve_class), parse.y: Make non-static. * class.c (maybe_layout_super_class): Take this_class argument. Do do_resolve_class if necessary. (layout_class, layout_class_methods): Adjust calls appropriately. * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED, JDEP_RESOLVED_P): Redefined for new TREE_LIST-less convention. * typeck.c (build_java_array_type): Don't call layout_class. From-SVN: r25322
1999-02-19parse.y (check_pkg_class_access): Allow private class access within the same ↵Alexandre Petit-Bianco1-0/+8
package. � * parse.y (check_pkg_class_access): Allow private class access within the same package. (strip_out_static_field_access_decl): New function. (patch_unaryop): Call strip_out_static_field_access_decl on ++/-- operator argument before testing its nature. From-SVN: r25318