summaryrefslogtreecommitdiffstats
path: root/gcc/java/jcf-write.c
Commit message (Collapse)AuthorAgeFilesLines
...
* 2003-03-16 Mohan Embar <gnustuff@thisiscool.com>aph2003-04-101-8/+17
| | | | | | | | | | | | | | | | | | | | | | | * Make-lang.in: added win32-host.c * jcf.h: defined macro JCF_OPEN_EXACT_CASE which resolves to open() on non-Win32 platforms and Win32-specific jcf_open_exact_case() on Win32 * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE when trying .java and .class files * win32-host.c: added to repository. Defines Win32-specific jcf_open_exact_case() 2003-04-10 Andrew Haley <aph@redhat.com> * jcf-write.c (struct jcf_partial): num_jsrs: new field. (maybe_free_localvar): Renamed from localvar_free. Add new arg, really. (generate_bytecode_insns): Set new variable, jsrs. Only free local vars if no jsr insns have been emittted. Call maybe_free_localvar, not localvar_free. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65430 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-03-10 Ranjit Mathew <rmathew@hotmail.com>aph2003-03-101-8/+30
| | | | | | | | | | | | * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR and DIR_SEPARATOR_2 for a target. Correct minor typos. * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR and DIR_SEPARATOR_2 for a target into account. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64110 138bc75d-0d04-0410-961f-82ee72b054a4
* * jcf-write.c (generate_classfile): Check whether class istromey2003-02-261-2/+2
| | | | | | | deprecated before writing attribute count. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63482 138bc75d-0d04-0410-961f-82ee72b054a4
* * lang-options.h: Added -Wdeprecated.tromey2003-02-241-1/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gcj.texi (Warnings): Document -Wdeprecated. * java-tree.h (flag_deprecated): Declare. * lang.c (lang_W_options): Added deprecated. (flag_deprecated): New global. * chartables.h: Rebuilt. * gen-table.pl (process_one): Look at whitespace. (print_tables): Define LETTER_SPACE, LETTER_MASK. * parse.h (CLEAR_DEPRECATED): New macro. (CHECK_DEPRECATED_NO_RESET): New macro. * jcf-parse.c (handle_deprecated): New function. (HANDLE_DEPRECATED_ATTRIBUTE): New define. * jcf-reader.c (get_attribute): Handle Deprecated attribute. * parse.y (resolve_type_during_patch): Check deprecation. (jdep_resolve_class): Likewise. (process_imports): Likewise. (resolve_expression_name): Likewise. (check_deprecation): Strip arrays from decl. Check flag_deprecated. (patch_method_invocation): Also check the particular constructor for deprecation. (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop. * jcf-write.c (append_deprecated_attribute): New function. (generate_classfile): Generate deprecated attribute when appropriate. * lex.c (java_parse_doc_section): Return type now void. Rewrote. (java_lex) [case '*']: Simplify logic. (java_start_char_p): Use LETTER_MASK. (java_part_char_p): Likewise. (java_space_char_p): New function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63350 138bc75d-0d04-0410-961f-82ee72b054a4
* * jcf-write.c (generate_bytecode_conditional): Typo fixes.tromey2003-01-291-2/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62061 138bc75d-0d04-0410-961f-82ee72b054a4
* * check-init.c: Fix comment typos.kazu2003-01-181-5/+5
| | | | | | | | | | | | | | | | | | | | | | * class.c: Likewise. * constants.c: Likewise. * decl.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * java-except.h: Likewise. * java-tree.h: Likewise. * javaop.h: Likewise. * jcf-dump.c: Likewise. * jcf-io.c: Likewise. * jcf-parse.c: Likewise. * jcf-write.c: Likewise. * lang.c: Likewise. * mangle.c: Likewise. * typeck.c: Likewise. * verify.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61477 138bc75d-0d04-0410-961f-82ee72b054a4
* * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).ghazi2003-01-181-0/+1
| | | | | | | * jcf-write.c: Include "tm_p.h". git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61476 138bc75d-0d04-0410-961f-82ee72b054a4
* * arm.h (CONDITIONAL_REGISTER_USAGE): Avoid signed/unsignedghazi2003-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | warning. * emit-rtl.c (gen_rtx_REG, set_mem_attributes_minus_bitpos, init_emit_once): Likewise. * flow.c (mark_regs_live_at_end, calculate_global_regs_live): Likewise. * function.c (assign_stack_temp_for_type): Likewise. * loop.c (loop_invariant_p): Likewise. * recog.c (push_operand): Likewise. * regclass.c (init_reg_sets_1): Likewise. * reload.c (update_auto_inc_notes): Likewise. * reload1.c (reload_as_needed, emit_input_reload_insns): Likewise. * stmt.c (expand_asm_operands): Likewise. * stor-layout.c (start_record_layout): Likewise. cp: * class.c (layout_virtual_bases): Avoid signed/unsigned warning. java: * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned warning. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61389 138bc75d-0d04-0410-961f-82ee72b054a4
* * All Files: Convert to ISO C style function definitions.ghazi2003-01-121-168/+66
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61218 138bc75d-0d04-0410-961f-82ee72b054a4
* * All Files: Remove PARAMS macro.ghazi2003-01-091-70/+65
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61133 138bc75d-0d04-0410-961f-82ee72b054a4
* * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,ghazi2003-01-091-1/+0
| | | | | | | | jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or `__STDC__' macros. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61131 138bc75d-0d04-0410-961f-82ee72b054a4
* * Make-lang.in, boehm.c, buffer.c,neroden2003-01-011-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | buffer.h, builtins.c, class.c, config-lang.in, constants.c, convert.h, decl.c, except.c, expr.c, java-except.h, java-tree.h, javaop.def, jcf-parse.c, jcf-write.c, jv-scan.c, jvgenmain.c, jvspec.c, keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c, lex.c, lex.h, mangle.c, mangle_name.c, parse-scan.y, parse.h, parse.y, typeck.c, verify.c, xref.c, xref.h: Replace "GNU CC" with "GCC" in the copyright header. * check-init.c, gjavah.c, javaop.h, jcf-depend.c, jcf-dump.c, jcf-io.c, jcf-path.c, jcf-reader.c, jcf.h, zextract.c, zipfile.h: These files are "part of GCC". Also say "GCC" not "GNU CC". git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@60747 138bc75d-0d04-0410-961f-82ee72b054a4
* * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle casetromey2002-12-201-2/+6
| | | | | | | | where minimum case value is Integer.MIN_VALUE. Fixes PR java/8955. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@60372 138bc75d-0d04-0410-961f-82ee72b054a4
* Merge basic-improvements-branch to trunkzack2002-12-161-0/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@60174 138bc75d-0d04-0410-961f-82ee72b054a4
* 2002-11-22 Ranjit Mathew <rmathew@hotmail.com>tromey2002-11-221-0/+9
| | | | | | | | | | | Andrew Haley <aph@redhat.com> * gcc/java/jcf-write.c (write_classfile): Remove target class file, if it exists, before renaming the temporary class file to it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59386 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/rth2002-09-161-13/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * real.c, real.h: Rewrite from scratch. * Makefile.in (simplify-rtx.o): Depend on TREE_H. (paranoia): New target. * builtins.c (fold_builtin_inf): Use new real.h interface. * c-common.c (builtin_define_with_hex_fp_value): Likewise. * c-lex.c (interpret_float): Likewise. * emit-rtl.c (gen_lowpart_common): Likewise. * optabs.c (expand_float): Use real_2expN. * config/ia64/ia64.md (divsi3, udivsi3): Likewise. * defaults.h (INTEL_EXTENDED_IEEE_FORMAT): New. (FLOAT_WORDS_BIG_ENDIAN): New. * cse.c (find_comparison_args): Don't pass FLOAT_STORE_FLAG_VALUE directly to REAL_VALUE_NEGATIVE. * loop.c (canonicalize_condition): Likewise. * simplify-rtx.c: Include tree.h. (simplify_unary_operation): Don't handle FIX and UNSIGNED_FIX with floating-point result modes. * toplev.c (backend_init): Call init_real_once. * fold-const.c (force_fit_type): Don't call CHECK_FLOAT_VALUE. * tree.c (build_real): Likewise. * config/alpha/alpha.c, config/vax/vax.c (float_strings, float_values, inited_float_values, check_float_value): Remove. * config/alpha/alpha.h, config/m68hc11/m68hc11.h, config/m88k/m88k.h, config/vax/vax.h (CHECK_FLOAT_VALUE): Remove. * doc/tm.texi (CHECK_FLOAT_VALUE): Remove. gcc/f/ * target.c (ffetarget_real1): Don't pass FFETARGET_ATOF_ directly to ffetarget_make_real1. (ffetarget_real2): Similarly. * target.h (ffetarget_cvt_r1_to_rv_, ffetarget_cvt_rv_to_r2_, ffetarget_cvt_r2_to_rv_): Use new real.h interface and simplify. gcc/java/ * jcf-parse.c (get_constant): Runtime check for IEEE format; use new real.h interface. * jcf-write.c (find_constant_index): Use new real.h interface. * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL. contrib/ * paranoia.cc: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57198 138bc75d-0d04-0410-961f-82ee72b054a4
* 2002-08-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>bryce2002-08-091-0/+4
| | | | | | | | * jcf-write.c (get_access_flags): Return correct access flags for private and protected inner classes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56146 138bc75d-0d04-0410-961f-82ee72b054a4
* * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.tromey2002-06-111-3/+5
| | | | | | | | | | | | | | | | | | | | | | | * parse-scan.y (statement_without_trailing_substatement): Added assert_statement. (assert_statement): New rule. * java-tree.h (struct lang_type) [assertions]: New field. (TYPE_USES_ASSERTIONS): New macro. (CLASS_USES_ASSERTIONS): Likewise. (FIELD_SYNTHETIC): New define. * lex.c (java_lval;): Added ASSERT_TK. * parse.y (ASSERT_TK): Added. (statement_without_trailing_substatement): Added assert_statement. (assert_statement): New rule. (build_assertion): New function. (maybe_generate_pre_expand_clinit): Create and initialize $assertionsDisabled. (lookup_package_type): Removed decl. * keyword.h: Rebuilt. * keyword.gperf (assert): New token. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54516 138bc75d-0d04-0410-961f-82ee72b054a4
* * jcf-write.c (perform_relocations): Optmize a goto to a goto.tromey2002-06-041-0/+31
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54264 138bc75d-0d04-0410-961f-82ee72b054a4
* Merge from pch-branch up to tag pch-commit-20020603.geoffk2002-06-041-6/+5
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54232 138bc75d-0d04-0410-961f-82ee72b054a4
* * jcf-write.c (write_classfile): Unlink the temporary file if itmmitchel2002-05-141-4/+5
| | | | | | | | cannot be renamed. Use concat to build up the name of the temporary file git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53439 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/jcf-write.c (write_classfile): Write the file to ammitchel2002-05-081-3/+15
| | | | | | | | | | | | | temporary file and then rename it. * libjava/Makefile.am (all_java_source_files): New variable. (all_java_class_files): Likewise. .java.class: New rule. (CLEANFILES): Remove tmp-list. * libjava/Makefile.in: Regenerated. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53298 138bc75d-0d04-0410-961f-82ee72b054a4
* 2002-04-19 Andrew Haley <aph@redhat.com>aph2002-04-221-5/+10
| | | | | | | | | | | | | * jcf-write.c (push_long_const): lo, hi: New variables. Use rshift_double to extract the high part of a 64-bit long. Use WORD_TO_INT to extract the low part. * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned HOST_WIDE_INT for num. Use JPOOL_UINT to get it. CONSTANT_Double: Use JPOOL_UINT to get both halve of a double. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@52618 138bc75d-0d04-0410-961f-82ee72b054a4
* * jcf-write.c (generate_bytecode_insns): Only write const_0 if notmark2002-04-171-1/+2
| | | | | | | negative zero. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@52427 138bc75d-0d04-0410-961f-82ee72b054a4
* * jcf-write.c (write_classfile): Improve error strings.bryce2002-03-121-2/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@50649 138bc75d-0d04-0410-961f-82ee72b054a4
* * java-tree.h (TYPE_STRICTFP): New macro.tromey2002-02-181-1/+5
| | | | | | | | | | | | | | | | | | | | | | | (struct lang_type) [strictfp]: New field. (CLASS_STRICTFP): New macro. (METHOD_STRICTFP): New macro. (struct lang_decl) [strictfp]: New field. * parse.y (method_header): Disallow strictfp constructor or abstract method. (STRICT_TK): Move before MODIFIER_TK. * parse.h (CLASS_MODIFIERS): Added ACC_STRICT. (METHOD_MODIFIERS): Likewise. (INTERFACE_MODIFIERS): Likewise. * jcf-write.c (get_access_flags): Likewise. * class.c (set_class_decl_access_flags): Recognize ACC_STRICT. (add_method_1): Likewise. (get_access_flags_from_decl): Likewise. * jcf-dump.c (print_access_flags): Print in standard order. Also, recognize strictfp flag. * jcf.h (ACC_STRICT): New define. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49834 138bc75d-0d04-0410-961f-82ee72b054a4
* For PR java/4509:tromey2001-12-211-2/+7
| | | | | | | | | | | | | * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute CAN_COMPLETE_NORMALLY for the node. * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't generate code for second branch if first branch can't complete normally. (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to the loop head if the loop body can't complete normally. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48233 138bc75d-0d04-0410-961f-82ee72b054a4
* For PR java/4766:tromey2001-12-211-38/+82
| | | | | | | | * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle case where `finally' clause can't complete normally. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48232 138bc75d-0d04-0410-961f-82ee72b054a4
* * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,jsm282001-12-161-2/+2
| | | | | | | | jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix spelling errors. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48075 138bc75d-0d04-0410-961f-82ee72b054a4
* * decl.c (complete_start_java_method): Now generate TRY_FINALLY_EXPRbothner2001-12-041-74/+3
| | | | | | | | | | instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR. * jcf-write.c (generate_bytecode_insns): Remove support for CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used. * check-init.c (check_init): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47587 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-decl.c (duplicate_decls, parmlist_tags_warning): Removeneil2001-12-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | trailing period from diagnostics. * c-lex.c (cb_file_change): Similarly. * cppmacro.c (check_trad_stringification): Similarly. * gcc.c (do_spec_1): Similarly. * genattr.c (main): Similarly. * genattrtab.c (main, operate_exp, make_length_attrs): Similarly. * gencodes.c (main): Similarly. * genconfig.c (main): Similarly. * genconstants.c (main): Similarly. * genemit.c (main): Similarly. * genextract.c (main): Similarly. * genopinit.c (main): Similarly. * genoutput.c (main): Similarly. * genpeep.c (main): Similarly. * genrecog.c (main): Similarly. * mips-tfile.c (add_file, error): Similarly. * profile.c (init_branch_prob): Similarly. * reload1.c (spill_failure): Similarly. * stmt.c (parse_output_constraint): Similarly. * varasm.c (assemble_variable): Similarly. cp: * class.c (finish_struct): Similarly. * decl.c (check_tag_decl): Similarly. * lex.c (cxx_set_yydebug): Similarly. * typeck2.c (friendly_abort): Similarly. java: * expr.c (expand_byte_code): Similarly. * jcf-parse.c (load_class, jcf_parse): Similarly. * jcf-write.c (generate_classfile): Similarly. * lex.c (java_lex): Similarly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47517 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix for PR java/1401:tromey2001-11-191-1/+60
| | | | | | | | | | * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where arg0 is null. (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case correctly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47156 138bc75d-0d04-0410-961f-82ee72b054a4
* Patch for PR java/1414:tromey2001-11-081-1/+2
| | | | | | | | | | * parse.y (case_label_list): New global. (goal): Register case_label_list with GC. (java_complete_lhs): Save new case on case_label_list. (patch_switch_statement): Check for duplicate case labels. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46845 138bc75d-0d04-0410-961f-82ee72b054a4
* * parse.y (patch_synchronized_statement): Use a TRY_FINALLY_EXPRbothner2001-10-111-13/+2
| | | | | | | | | | | | rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair. The former is simpler, and jcf-write.c handles it better. (java_complete_lhs): No longer need to handle CLEANUP_POINT_EXPR or WITH_CLEANUP_EXPR. * jcf-write.c: Revert Alex's change from 2000-10-18. It is no longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46209 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix for PR java/4489:tromey2001-10-081-2/+4
| | | | | | | | * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always force a new label when computing `body_block'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46092 138bc75d-0d04-0410-961f-82ee72b054a4
* * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Calltromey2001-09-171-0/+1
| | | | | | | NOTE_PUSH for single-case push. Fixes PR java/4189. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45655 138bc75d-0d04-0410-961f-82ee72b054a4
* 2001-09-05 Alexandre Petit-Bianco <apbianco@redhat.com>apbianco2001-09-071-2/+2
| | | | | | | | | | | | | | | | * jcf-write.c (generate_classfile): Issue an error in case of field/initial value mismatch. * parse.y (analyze_clinit_body): Keep <clinit> if an array is being initialized and we're generating bytecode. (java_complete_lhs): In MODIFY_EXPR section: added comments, set DECL_INITIAL properly when appropriate. Fixes PR java/4230 Fixes PR java/4204 (http://gcc.gnu.org/ml/gcc-patches/2001-09/msg00247.html ) git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45474 138bc75d-0d04-0410-961f-82ee72b054a4
* * jcf-write.c (generate_classfile): Check that field is primitivebothner2001-08-311-1/+3
| | | | | | | or string before emitting ConstantValue attribute. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45306 138bc75d-0d04-0410-961f-82ee72b054a4
* * jcf-write.c (generate_classfile): Don't write ConstantValuebothner2001-08-301-1/+4
| | | | | | | | | | | attribute if field is not final, for compatibility with jdk. * jcf-write.c (generate_classfile): Convert ConstantValue values to correct type. Work-around for front-end bug. * class.c (set_constant_value): Error if constant has wrong type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45298 138bc75d-0d04-0410-961f-82ee72b054a4
* * jcf-write.c (generate_bytecode_insns): For increments andbothner2001-08-281-14/+6
| | | | | | | decrements just recurse to push constant. Improvement on Mark's patch. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45241 138bc75d-0d04-0410-961f-82ee72b054a4
* * jcf-write.c (generate_bytecode_insns): Generate an integer tommitchel2001-08-281-2/+9
| | | | | | | real conversion for increments and decrements of reals. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45230 138bc75d-0d04-0410-961f-82ee72b054a4
* 2001-08-16 Alexandre Petit-Bianco <apbianco@redhat.com>apbianco2001-08-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jcf-parse.c (load_class): New locals saved and class_loaded. If loading a class_or_name fails, try considering an innerclass name and load the enclosing context. * parse.y (resolve_inner_class): New function. (find_as_inner_class): Added leading comment. (register_incomplete_type): Keep the current context as enclosing context for JDEP_FIELD dependencies. (do_resolve_class): Locals new_class_decl and super initialized to NULL. Call resolve_inner_class, explore the enclosing context superclass if necessary. Fixes PR java/4007 2001-08-12 Alexandre Petit-Bianco <apbianco@redhat.com> * decl.c (init_decl_processing): exception_type_node, class_not_found_type_node, and no_class_def_found_type_node initialized. predef_filenames augmented accordingly. instinit_identifier_node initialized. * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed. * java-tree.h (enum java_tree_index): New entries JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE, JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE. (exception_type_node): New macro. (class_not_found_type_node): Likewise. (no_class_def_found_type_node): Likewise. (instinit_identifier_node): Likewise. (PREDEF_FILENAMES_SIZE): Adjusted. (TYPE_HAS_FINAL_VARIABLE): Fixed typo. (struct lang_type): Fixed typo in bitfield name. (DECL_INSTINIT_P): New macro. (ID_INSTINIT_P): Likewise. * jcf-write.c (generate_classfile): instinit$ bears the Synthetic attribute. * parse.y (encapsulate_with_try_catch): New function. (generate_instinit): Likewise. (build_instinit_invocation): Likewise. (ctors_unchecked_throws_clause_p): Likewise. (add_instance_initializer): Deleted. (build_instance_initializer): Likewise. (in_instance_initializer): Likewise. (check_method_redefinition): instinit$ not to be verified. (java_complete_expand_methods): Generate instinit$, simplified code. (build_dot_class_method): Eliminated unnecessary locals. Use encapsulate_with_try_catch, removed unnecessary code. (fix_constructors): New local iii. Use build_instinit_invocation. (patch_method_invocation): Added comment. (maybe_use_access_method): Don't consider instinit$. (find_applicable_accessible_methods_list): Shorten the search for instinit$ too. (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed. (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer. (patch_throw_statement): Likewise. Fixed typo. 2001-08-09 Alexandre Petit-Bianco <apbianco@redhat.com> * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and `poplevel' in the right order. (http://gcc.gnu.org/ml/gcc-patches/2001-08/msg01061.html ) git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44982 138bc75d-0d04-0410-961f-82ee72b054a4
* *** empty log message ***apbianco2001-08-011-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44528 138bc75d-0d04-0410-961f-82ee72b054a4
* * java-tree.def (JAVA_EXC_OBJ_EXPR): New.rth2001-05-131-1/+1
| | | | | | | | | | | | | | * expr.c (java_lang_expand_expr): Expand it. (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of calling build_exception_object_ref. * parse.y (catch_clause_parameter): Likewise. (build_dot_class_method): Likewise. (try_reference_assignconv): Likewise. * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR. * jcf-write.c (generate_bytecode_insns): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@42030 138bc75d-0d04-0410-961f-82ee72b054a4
* cp:ghazi2001-05-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | * call.c: NULL_PTR -> NULL. * class.c: Likewise. * cvt.c: Likewise. * decl.c: Likewise. * decl2.c: Likewise. * except.c: Likewise. * init.c: Likewise. * rtti.c: Likewise. * search.c: Likewise. * tree.c: Likewise. * typeck.c: Likewise. * typeck2.c: Likewise. f: * com.c: NULL_PTR -> NULL. java: * decl.c: NULL_PTR -> NULL. * jcf-write.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41762 138bc75d-0d04-0410-961f-82ee72b054a4
* * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):bothner2001-04-261-14/+14
| | | | | | | | | | | | | | Fix thinko: If a single case, use if_icmpeq, not ifeq. * constants.c (find_methodref_with_class_index): New function. (find_methodref_index): Use find_methodref_with_class_index. * java-tree.h (find_methodref_with_class_index): New declaration. * jcf-write.c (generate_bytecode_insns case CALL_EXPR): Don't change DECL_CONTEXT, instead use new find_methodref_with_class_index function. If context changed from interface to class, don't use invokeinterface. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41601 138bc75d-0d04-0410-961f-82ee72b054a4
* * java-tree.h (CONSTANT_VALUE_P): New macro.bothner2001-04-041-5/+1
| | | | | | | | | | | | | | * jcf-write.c (generate_classfile): Use CONSTANT_VALUE_P. * parse.y (maybe_build_class_init_for_field): New static function. (resolve_expression_name, resolve_field_access): Use maybe_build_class_init_for_field instead of build_class_init This does not do the init if the field is compile-time-constant. (resolve_field_access): Simplify. * parse.y (fold_constant_for_init): Merge test into switch. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41094 138bc75d-0d04-0410-961f-82ee72b054a4
* IA-64 ABI Exception Handling.rth2001-03-281-5/+3
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40924 138bc75d-0d04-0410-961f-82ee72b054a4
* * java-tree.h (throw_node): Define as a single member ofrth2001-03-281-2/+1
| | | | | | | | | | | | | | | java_global_trees instead of a separate array. (JTI_THROW_NODE): New. * decl.c (throw_node): Don't declare. (init_decl_processing): Init a scalar throw_node. Don't register it for gc. * check-init.c (check_init): Reference scalar throw_node. * expr.c (build_java_athrow): Likewise. * jcf-write.c (generate_bytecode_insns): Likewise. * parse.h (BUILD_THROW): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40922 138bc75d-0d04-0410-961f-82ee72b054a4
* ebothner2001-03-241-42/+36
| | | | | | | | | | | | | | | | | | | | * verify.c (verify_jvm_instructions): Replace 3 pop_type by POP_TYPE macro for better error pin-pointing. * java-tree.h: Fix typo in comment. * jcf-write.c (generate_bytecode_insns): Changes to TRY_FINALLY_EXPR. Don't include jsr/goto in exception range. Check if start and end of exception range are the same (also TRY_EXPR). Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false. However, do emit the following goto even if try_block is empty. Defer freeing exception_decl until after the finalizer, to make sure the local isn't reused in the finalizer. Fixes PR java/1208. * parse.y (java_complete_lhs): If the try-clause is empty, just return the finally-clause and vice versa. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40801 138bc75d-0d04-0410-961f-82ee72b054a4
OpenPOWER on IntegriCloud