12014-10-30 Release Manager 2 3 * GCC 4.9.2 released. 4 52014-07-16 Release Manager 6 7 * GCC 4.9.1 released. 8 92014-04-22 Release Manager 10 11 * GCC 4.9.0 released. 12 132014-01-02 Richard Sandiford <rdsandiford@googlemail.com> 14 15 Update copyright years 16 172014-01-02 Tobias Burnus <burnus@net-b.de> 18 19 * jcf-dump.c (version): Update copyright notice dates. 20 * gcj.texi: Bump @copying's copyright year. 21 222013-12-19 Jakub Jelinek <jakub@redhat.com> 23 24 PR other/59545 25 * class.c (hashUtf8String): Compute hash in unsigned type. 26 * javaop.h (WORD_TO_INT): Avoid signed integer overflow. 27 282013-11-22 Andrew MacLeod <amacleod@redhat.com> 29 30 * java-gimplify.c: Add required include files from gimple.h. 31 322013-11-22 David Malcolm <dmalcolm@redhat.com> 33 34 * class.c (maybe_layout_super_class): Update comment. 35 * decl.c (java_add_stmt): Remove use of input_filename macro. 36 * jcf-parse.c (set_source_filename): Remove use of 37 input_filename macro. 38 (parse_class_file): Remove use of input_line and input_filename 39 macros. 40 (java_parse_file): Remove use of input_filename macro. 41 422013-11-18 Richard Sandiford <rdsandiford@googlemail.com> 43 44 * class.c, expr.c: Replace tree_low_cst (..., 0) with tree_to_shwi 45 throughout. 46 472013-11-18 Richard Sandiford <rdsandiford@googlemail.com> 48 49 * class.c, expr.c: Replace host_integerp (..., 0) with 50 tree_fits_shwi_p throughout. 51 522013-11-14 Andrew MacLeod <amacleod@redhat.com> 53 54 * java-gimplify.c: Include only gimplify.h and gimple.h as needed. 55 562013-11-14 Diego Novillo <dnovillo@google.com> 57 58 * builtins.c: Include stor-layout.h. 59 Include stringpool.h. 60 * class.c: Include stringpool.h. 61 Include stor-layout.h. 62 Include varasm.h. 63 * constants.c: Include stringpool.h. 64 Include stor-layout.h. 65 * decl.c: Include stor-layout.h. 66 Include stringpool.h. 67 Include varasm.h. 68 * except.c: Include stringpool.h. 69 Include stor-layout.h. 70 * expr.c: Include stringpool.h. 71 Include stor-layout.h. 72 * jcf-parse.c: Include stringpool.h. 73 * mangle.c: Include stringpool.h. 74 * resource.c: Include stringpool.h. 75 Include stor-layout.h. 76 * typeck.c: Include stor-layout.h. 77 Include stringpool.h. 78 * verify-glue.c: Include stringpool.h. 79 802013-11-12 Andrew MacLeod <amacleod@redhat.com> 81 82 * java-gimplify.c: Include gimplify.h. 83 842013-11-07 Jeff Law <law@redhat.com> 85 86 * builtins.c (initialize_builtins): Provide __builtin_trap. 87 882013-10-29 David Malcolm <dmalcolm@redhat.com> 89 90 Patch autogenerated by refactor_symtab.py from 91 https://github.com/davidmalcolm/gcc-refactoring-scripts 92 revision 58bb219cc090b2f4516a9297d868c245495ee622 93 94 * decl.c (java_mark_decl_local): Update for conversion of symtab types 95 to a true class hierarchy. 96 972013-10-14 David Malcolm <dmalcolm@redhat.com> 98 99 * lang.c (java_handle_option): Update for introduction of 100 gcc::dump_manager. 101 1022013-09-25 Tom Tromey <tromey@redhat.com> 103 104 * Make-lang.in (jvspec.o): Remove. 105 (CFLAGS-java/jvspec.o): New variable. 106 ($(XGCJ)$(exeext), java_OBJS): Use java/jvspec.o 107 (java/jvspec.o-warn): Rename from jvspec.o-warn. 108 (JAVA_TREE_H, java/jcf-dump.o, java/boehm.o, java/builtins.o) 109 (java/class.o, java/constants.o, java/decl.o, java/except.o) 110 (java/expr.o, java/jcf-depend.o, java/jcf-parse.o) 111 (java/jvgenmain.o, java/lang.o, java/mangle.o, java/mangle_name.o) 112 (java/resource.o java/typeck.o, java/win32-host.o) 113 (java/verify-glue.o, java/verify-impl.o, java/zextract.o) 114 (java/java-gimplify.o, java/jcf-io.o, java/jcf-path.o): Remove. 115 1162013-09-25 Tom Tromey <tromey@redhat.com> 117 118 * Make-lang.in (jvspec.o): Don't use subshell. 119 1202013-06-05 Jan Hubicka <jh@suse.cz> 121 122 * class.c (emit_register_classes_in_jcr_section): Use DECL_PRESERVE_P 123 instead of mark_decl_referenced. 124 1252013-05-29 Jan Hubicka <jh@suse.cz> 126 127 * decl.c (java_mark_decl_local): Update for new symtab flags. 128 1292013-05-22 Matthias Klose <doko@ubuntu.com> 130 131 * jvspec.c (jvgenmain_spec): Add %I to cc1 call. 132 1332013-05-16 Jason Merrill <jason@redhat.com> 134 135 * Make-lang.in (jc1$(exeext)): Use link mutex. 136 1372013-05-06 Jakub Jelinek <jakub@redhat.com> 138 139 PR libgcj/57074 140 * class.c (emit_symbol_table): Use array type of the 141 right size for the_syms_decl and its DECL_INITIAL, instead 142 of symbols_array_type. Set TREE_TYPE (the_syms_decl) to it. 143 (emit_assertion_table): Use array type of the right size 144 for table_decl and its DECL_INITIAL. 145 1462013-04-15 Gerald Pfeifer <gerald@pfeifer.com> 147 148 * gcj.texi (Configure-time Options): Refer to GCC, not gcc. 149 (Resources): Adjust reference to Mauve. 150 Remove link to java.sun.com. 151 Refer to GCC, not gcc. 152 1532013-04-09 Richard Biener <rguenther@suse.de> 154 155 * expr.c (build_java_binop): Pass a type to build_int_cst. 156 1572013-03-22 Kai Tietz <ktietz@redhat.com> 158 159 * lang.c (put_decl_node): Don't iterate over end_params_node. 160 1612013-01-03 Jakub Jelinek <jakub@redhat.com> 162 163 * jcf-dump.c (version): Update copyright notice dates. 164 1652012-11-16 Diego Novillo <dnovillo@google.com> 166 167 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec) 168 169 * boehm.c: Use new vec API in vec.h. 170 * class.c: Likewise. 171 * constants.c: Likewise. 172 * decl.c: Likewise. 173 * expr.c: Likewise. 174 * java-tree.h: Likewise. 175 * jcf-parse.c: Likewise. 176 * resource.c: Likewise. 177 * verify-glue.c: Likewise. 178 1792012-11-15 Jan Hubicka <jh@suse.cz> 180 181 * builtins.c (define_builtin): Accept ECF flags and 182 use set_call_expr_flags. 183 (initialize_builtins): Update. 184 1852012-10-01 Lawrence Crowl <crowl@google.com> 186 187 * Make-lang.in (JAVA_OBJS): Add dependence on hash-table.o. 188 (JCFDUMP_OBJS): Add dependence on hash-table.o. 189 (jcf-io.o): Add dependence on hash-table.h. 190 * jcf-io.c (memoized_class_lookups): Change to use type-safe hash table. 191 1922012-09-24 Lawrence Crowl <crowl@google.com> 193 194 * decl.c (java_init_decl_processing): Change to new double_int API. 195 * jcf-parse.c (get_constant): Likewise. 196 * boehm.c (mark_reference_fields): Likewise. 197 (get_boehm_type_descriptor): Likewise. 198 1992012-07-30 Laurynas Biveinis <laurynas.biveinis@gmail.com> 200 201 * jcf.h (CPool): Use the "atomic" GTY option for the tags field. 202 (bootstrap_method): Likewise for the bootstrap_arguments field. 203 2042012-07-16 Steven Bosscher <steven@gcc.gnu.org> 205 206 * java-gimplify.c: Include dumpfile.h instead of tree-dump.h 207 * Make-lang.in: Fix dependencies. 208 2092012-07-11 Steven Bosscher <steven@gcc.gnu.org> 210 211 * java-tree.h (force_evaluation_order): Remove prototype. 212 * expr.c (force_evaluation_order): Remove unused function. 213 2142012-07-11 Steven Bosscher <steven@gcc.gnu.org> 215 216 * decl.c: Do not include libfuncs.h. 217 * class.c: Do not include defaults.h. 218 * jvgenmain.c: Likewise. 219 * magnle.c: Likewise. 220 * Make-lang.in (decl.o): Fix dependencies. 221 2222012-07-08 Steven Bosscher <steven@gcc.gnu.org> 223 224 * verify.h: Do not include system.h and coretypes.h here. 225 * verify-impl.c: Include them here instead. 226 2272012-07-05 Uros Bizjak <ubizjak@gmail.com> 228 229 * jcf-io.c (read_zip_member): Initialize d_stream. 230 2312012-05-31 Steven Bosscher <steven@gcc.gnu.org> 232 233 * resource.c: Do not include output.h. 234 2352012-05-21 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> 236 237 PR java/52815 238 * class.c (emit_register_classes_in_jcr_section): Revise placement 239 of #ifdef JCR_SECTION_NAME. 240 2412012-04-22 Jan Hubicka <jh@suse.cz> 242 243 * class.c (build_utf8_ref): Do not mark varpool node as needed. 244 2452012-04-20 Jan Hubicka <jh@suse.cz> 246 247 * class.c (make_local_function_alias): Do not mark symbol referenced. 248 2492012-04-11 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 250 251 * jcf-dump.c (print_constant): Cast JPOOL_USHORT2, JPOOL_USHORT1 252 results to long to match formats. 253 2542012-04-11 Andrew Haley <aph@redhat.com> 255 256 * jcf-reader.c (jcf_parse_bootstrap_methods): Add 257 ATTRIBUTE_UNUSED. 258 2592012-04-11 Andrew Haley <aph@redhat.com> 260 261 * jcf.h (bootstrap_method): New. 262 (BootstrapMethods): New. 263 (JCF): Add BootstrapMethods. 264 (enum cpool_tag): Add MethodHandle, MethodType, and InvokeDynamic. 265 * jcf-reader.c (jcf_parse_bootstrap_methods): New. 266 (jcf_parse_constant_pool): Handlers for MethodHandle, MethodType, 267 and InvokeDynamic. 268 (jcf_parse_bootstrap_methods): New. 269 * javaop.def (invokedynamic): New opcode. 270 * jcf-parse.c (get_constant): An unknown constant type should not 271 be an internal error, but a fatal one. Make it so. 272 * jcf-dump.c (HANDLE_BOOTSTRAP_METHODS_ATTRIBUTE): New. 273 (HANDLE_END_BOOTSTRAP_METHODS): New. 274 (print_constant): Handlers for MethodHandle, MethodType, and 275 InvokeDynamic. 276 2772012-04-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 278 279 * class.c (emit_register_classes_in_jcr_section): Set DECL_USER_ALIGN. 280 Clear TREE_READONLY. 281 2822012-03-29 Steven Bosscher <steven@gcc.gnu.org> 283 284 PR java/52730 285 * class.c (emit_register_classes_in_jcr_section): New function. 286 (emit_Jv_RegisterClass_calls): New function, split out from ... 287 (emit_register_classes): ... here. Reorganize. Do not call 288 output_constant. 289 2902012-01-23 Andreas Schwab <schwab@linux-m68k.org> 291 292 * lang.c (java_init_options_struct): Set 293 frontend_set_flag_trapping_math. 294 2952012-01-01 Jakub Jelinek <jakub@redhat.com> 296 297 * jcf-dump.c (version): Update copyright notice dates. 298 2992011-12-03 Matthias Klose <doko@ubuntu.com> 300 301 * expr.c (SPECIAL_WIDE): Fix typo in message. 302 3032011-11-23 Jeffrey A Law (law@cygnus.com) 304 305 * lang.c (java_init_options_struct): Disable optimizations 306 which assume a NULL pointer dereference will cause a fault. 307 3082011-11-07 Richard Henderson <rth@redhat.com> 309 310 * builtins.c (compareAndSwapInt_builtin): Use can_compare_and_swap_p. 311 (compareAndSwapLong_builtin): Likewise. 312 (compareAndSwapObject_builtin): Likewise. 313 (VMSupportsCS8_builtin): Likewise. 314 3152011-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 316 317 * Make-lang.in (jvspec.o): Pass SHLIB instead of SHLIB_LINK. 318 3192011-10-15 Tom Tromey <tromey@redhat.com> 320 Dodji Seketeli <dodji@redhat.com> 321 322 * jcf-parse.c (set_source_filename): Adjust to the new map API. 323 3242011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com> 325 326 * class.c (build_static_field_ref): Delete old interface with two 327 parallel arrays to hold standard builtin declarations, and replace 328 it with a function based interface that can support creating 329 builtins on the fly in the future. Change all uses, and poison 330 the old names. Make sure 0 is not a legitimate builtin index. 331 * decl.c (java_init_decl_processing): Ditto. 332 * except.c (compareAndSwapLong_builtin): Ditto. 333 (compareAndSwapObject_builtin): Ditto. 334 (putVolatile_builtin): Ditto. 335 (define_builtin): Ditto. 336 (check_for_builtin): Ditto. 337 * expr.c (rewrite_arglist_getcaller): Ditto. 338 (expand_java_field_op): Ditto. 339 3402011-08-24 Joseph Myers <joseph@codesourcery.com> 341 342 * Make-lang.in (CFLAGS-java/jcf-io.o, CFLAGS-java/jcf-path.o): 343 New. 344 (java/jcf-io.o, java/jcf-path.o): Remove explicit compilation 345 rules. 346 3472011-08-18 Peter Collingbourne <peter@pcc.me.uk> 348 349 * expr.c (expand_invoke) Use the type of the method rewrite 350 target. 351 3522011-08-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 353 354 * jcf-dump.c (print_constant): Cast first frexp arg. 355 3562011-08-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 357 358 * Make-lang.in ($(XGCJ)$(exeext)): Add $(EXTRA_GCC_LIBS). 359 3602011-07-19 Richard Guenther <rguenther@suse.de> 361 362 * builtins.c (static): Use fold_build_pointer_plus. 363 * class.c (make_class_data): Likewise. 364 (build_symbol_entry): Likewise. 365 * except.c (build_exception_object_ref): Likewise. 366 * expr.c (build_java_arrayaccess): Likewise. 367 (build_field_ref): Likewise. 368 (build_known_method_ref): Likewise. 369 (build_invokevirtual): Likewise. 370 3712011-07-06 Richard Guenther <rguenther@suse.de> 372 373 * decl.c (java_init_decl_processing): 374 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2. 375 3762011-06-21 Andrew MacLeod <amacleod@redhat.com> 377 378 * builtins.c: Add sync_ or SYNC__ to builtin names. 379 * expr.c: Add sync_ or SYNC__ to builtin names. 380 3812011-06-07 Richard Guenther <rguenther@suse.de> 382 383 * decl.c (java_init_decl_processing): Call build_common_nodes, 384 build_common_nodes_2 at the beginning. Remove then duplicate 385 initializations. 386 3872011-06-07 Richard Guenther <rguenther@suse.de> 388 389 * decl.c (java_init_decl_processing): Properly initialize 390 size_type_node. 391 3922011-05-30 Joern Rennecke <joern.rennecke@embecosm.com> 393 394 PR middle-end/46500 395 * expr.c: Include "tm.h" . 396 3972011-05-26 Nathan Froyd <froydnj@codesourcery.com> 398 399 * decl.c (poplevel): Don't access TREE_TYPE of BLOCKs. 400 * expr.c (build_jni_stub): Likewise. 401 4022011-05-24 Joseph Myers <joseph@codesourcery.com> 403 404 * Make-lang.in ($(XGCJ)$(exeext)): Use libcommon-target.a instead 405 of prefix.o. 406 4072011-05-20 Joseph Myers <joseph@codesourcery.com> 408 409 * Make-lang.in ($(XGCJ)$(exeext)): Don't explicitly use intl.o and 410 version.o. 411 (JCFDUMP_OBJS): Remove errors.o, version.o and intl.o. 412 (JVGENMAIN_OBJS): Remove errors.o and intl.o. 413 (java/jcf-dump.o, java/jvgenmain.o): Depend in $(DIAGNOSTIC_H). 414 * jcf-dump.c: Include diagnostic.h. 415 (main): Initialize diagnostics. 416 * jvgenmain.c: Include diagnostic.h. 417 (main): Initialize diagnostics. 418 4192011-05-11 Nathan Froyd <froydnj@codesourcery.com> 420 421 * java-tree.h (TYPE_ARGUMENT_SIGNATURE): Use TYPE_MINVAL. 422 4232011-05-07 Eric Botcazou <ebotcazou@adacore.com> 424 425 * java-tree.h (global_bindings_p): Adjust prototype. 426 * decl.c (global_bindings_p): Return bool. 427 4282011-05-05 Nathan Froyd <froydnj@codesourcery.com> 429 430 * expr.c (expand_java_switch): Call build_case_label. 431 (expand_java_add_case): Likewise. 432 4332011-04-29 Richard Guenther <rguenther@suse.de> 434 435 PR middle-end/48819 436 * constants.c (build_constants_constructor): Use ptr_type_node for 437 temp. 438 4392011-04-20 Jim Meyering <meyering@redhat.com> 440 441 * jcf-parse.c (java_parse_file): Remove useless if-before-free. 442 4432011-04-18 Jim Meyering <meyering@redhat.com> 444 445 * jcf-parse.c: Fix typo in comment. 446 4472011-04-14 Nathan Froyd <froydnj@codesourcery.com> 448 449 * decl.c (poplevel): Use BLOCK_CHAIN and block_chainon. 450 4512011-04-12 Nathan Froyd <froydnj@codesourcery.com> 452 453 * java-tree.h (union lang_tree_node): Check for TS_COMMON before 454 calling TREE_CHAIN. 455 4562011-04-11 Martin Jambor <mjambor@suse.cz> 457 458 * decl.c (java_mark_decl_local): Call cgraph_get_node instead of 459 cgraph_node and handle returned NULL. 460 4612011-03-25 Kai Tietz <ktietz@redhat.com> 462 463 * jcf-parse.c (java_read_sourcefilenames): Use filename_cmp 464 instead of strcmp. 465 (set_source_filename): Likewise. 466 * win32-host.c (jcf_open_exact_case): Likewise. 467 4682011-03-21 Kai Tietz <ktietz@redhat.com> 469 470 PR target/12171 471 * lang.c (java_attribute_table): Adjust table. 472 4732011-02-13 Joseph Myers <joseph@codesourcery.com> 474 475 * jvspec.c (jvgenmain_spec): Remove %{a*}. 476 4772011-01-21 Kai Tietz <kai.tietz@onevision.com> 478 479 PR bootstrap/47215 480 * decl.c (java_init_decl_processing): Remove 481 va_list_type_node related type initializations. 482 4832011-01-11 Kai Tietz <kai.tietz@onevision.com> 484 485 PR bootstrap/47215 486 * decl.c (java_init_decl_processing): Initialize 487 long_integer_type_node. 488 4892011-01-07 Kai Tietz <kai.tietz@onevision.com> 490 491 PR bootstrap/47215 492 * decl.c (java_init_decl_processing): Initialize unsigned_type_node. 493 4942011-01-07 Kai Tietz <kai.tietz@onevision.com> 495 496 * decl.c (java_init_decl_processing): Setup va_list_type_node. 497 4982011-01-03 Jakub Jelinek <jakub@redhat.com> 499 500 * jcf-dump.c (version): Update copyright notice dates. 501 5022010-12-15 Dave Korn <dave.korn.cygwin@gmail.com> 503 504 * decl.c (java_init_decl_processing): Initialise integer_three_node. 505 * lang.c (put_decl_node): Handle nested function decls. 506 5072010-12-07 Joseph Myers <joseph@codesourcery.com> 508 509 * jcf-parse.c: Don't include assert.h. 510 (java_parse_file): Use gcc_assert. 511 5122010-12-03 Joseph Myers <joseph@codesourcery.com> 513 514 * lang.opt (static-libgcj): New option. 515 5162010-12-01 Joseph Myers <joseph@codesourcery.com> 517 518 * jcf-parse.c: Don't include toplev.h. 519 * Make-lang.in (java/jcf-parse.o): Don't depend on toplev.h. 520 5212010-11-30 Joseph Myers <joseph@codesourcery.com> 522 523 * boehm.c: Don't include toplev.h. 524 * Make-lang.in (java/boehm.o): Don't depend on toplev.h. 525 5262010-11-30 Joseph Myers <joseph@codesourcery.com> 527 528 * expr.c, lang.c, mangle.c, mangle_name.c, typeck.c, 529 verify-glue.c: Don't include toplev.h. 530 * Make-lang.in: Dependencies for above files changed to remove 531 toplev.h. 532 5332010-11-29 Joseph Myers <joseph@codesourcery.com> 534 535 * boehm.c: Include "config.h" instead of <config.h>. 536 * builtins.c: Don't include <stdarg.h>. 537 * class.c: Don't include "stdio.h". 538 (O_BINARY): Don't define here. 539 * jcf-depend.c: Don't include <assert.h>. 540 (jcf_dependency_set_dep_file, jcf_dependency_init, 541 jcf_dependency_write): Use gcc_assert. 542 * jcf-io.c (O_BINARY): Don't define here. 543 * jcf-path.c: Don't include "tm.h". 544 (jcf_path_init): Use getenv instead of GET_ENVIRONMENT. 545 * resource.c: Don't include "stdio.h". 546 (O_BINARY): Don't define here. 547 * verify-impl.c: Don't include <stdio.h>. 548 5492010-11-17 Joseph Myers <joseph@codesourcery.com> 550 551 * jcf-parse.c (java_parse_file): Take no arguments. 552 * java-tree.h (java_parse_file): Update prototype. 553 5542010-11-09 Joern Rennecke <amylaar@spamcop.net> 555 Andrew Haley <aph@redhat.com> 556 557 PR java/46386 558 * config/pdp11/t-pdp11 (java/constants.o-warn): Remove. 559 5602010-11-12 Joseph Myers <joseph@codesourcery.com> 561 562 * Make-lang.in (jvspec.o, java/lang.o): Use $(OPTS_H). 563 * lang.c (java_handle_option): Take location_t parameter. 564 5652010-11-10 Joseph Myers <joseph@codesourcery.com> 566 567 * expr.c (expand_java_field_op): Use %' in diagnostic. 568 * jcf-parse.c (java_parse_file): Use %' in diagnostics. 569 * jvspec.c (lang_specific_driver): Use %' in diagnostic. 570 * lang.c (java_post_options): Use %' in diagnostics. 571 5722010-11-06 Joern Rennecke <amylaar@spamcop.net> 573 574 PR middle-end/46314 575 * class.c: Include target.h. 576 (make_local_function_alias): 577 Use targetm.asm_out.generate_internal_label. 578 * expr.c (lookup_label, generate_name): Likewise. 579 5802010-11-03 Joern Rennecke <joern.rennecke@embecosm.com> 581 582 PR bootstrap/44335 583 * jfc-parse.c (target.h): Include. 584 (handle_constant): Use targetm.words_big_endian and 585 targetm.float_words_big_endian. 586 (get_constant): Use targetm.float_words_big_endian. 587 5882010-10-13 Richard Henderson <rth@redhat.com> 589 590 * lang.c (java_eh_personality): Update call to 591 build_personality_function. 592 5932010-10-12 Joseph Myers <joseph@codesourcery.com> 594 595 * Make-lang.in (java/lang.o): Use $(OPTIONS_H) instead of 596 options.h. 597 5982010-10-11 Nathan Froyd <froydnj@codesourcery.com> 599 600 * decl.c (java_init_decl_processing): Use build_function_type_list 601 instead of build_function_type. 602 * jcf-parse.c (java_emit_static_constructor): Likewise. 603 * builtins.c (initialize_builtins): Likewise. 604 6052010-10-08 Joseph Myers <joseph@codesourcery.com> 606 607 * lang.c (java_init_options_struct): New. Split out from 608 java_init_options. 609 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define. 610 6112010-10-04 Andi Kleen <ak@linux.intel.com> 612 613 * Make-lang.in (xgcj, jc1, jcf-dump, jvgenmain): 614 Add + to build rule. 615 6162010-09-29 Joseph Myers <joseph@codesourcery.com> 617 618 * lang.opt: Don't use VarExists. 619 6202010-09-29 Joseph Myers <joseph@codesourcery.com> 621 622 * java-tree.h (flag_filelist_file, flag_assert, flag_jni, 623 flag_force_classes_archive_check, flag_redundant, flag_newer, 624 flag_use_divide_subroutine, flag_use_atomic_builtins, 625 flag_use_boehm_gc, flag_hash_synchronization, 626 flag_check_references, flag_optimize_sci, flag_indirect_classes, 627 flag_indirect_dispatch, flag_store_check, 628 flag_reduced_reflection): Remove. 629 * jcf-dump.c (flag_newer): Remove. 630 * jcf.h (quiet_flag): Remove. 631 * parse.h (quiet_flag): Remove. 632 6332010-09-28 Richard Henderson <rth@redhat.com> 634 635 * lang.c: Include "target.h". 636 (java_eh_personality): Use targetm.except_unwind_info. 637 * Make-lang.in (lang.o): Update deps. 638 6392010-09-27 Andrew Haley <aph@redhat.com> 640 641 PR java/45773 642 * jvgenmain.c (main): Fix arg processing. 643 6442010-09-22 Joseph Myers <joseph@codesourcery.com> 645 646 * jvspec.c (lang_specific_driver): Handle OPT__help instead of 647 OPT_fhelp. 648 * lang.opt (-CLASSPATH, -all-warnings, -bootclasspath, -classpath, 649 -dependencies, -encoding, -extdirs, -include-directory, 650 -include-directory=, -output-class-directory, 651 -output-class-directory=, -resource, -resource=, 652 -user-dependencies): New. 653 6542010-09-16 Richard Guenther <rguenther@suse.de> 655 656 * jcf-parse.c (current_file_list): Remove. 657 (java_parse_file): Use build_translation_unit_decl. Adjust. 658 6592010-09-03 Joseph Myers <joseph@codesourcery.com> 660 661 * lang.opt (d): New. 662 6632010-09-03 H.J. Lu <hongjiu.lu@intel.com> 664 665 PR java/45504 666 * jvgenmain.c (main): Check "-D XXX=YYY". 667 6682010-09-02 Joseph Myers <joseph@codesourcery.com> 669 670 * jvspec.c (jvgenmain_spec): Don't handle -fnew-verifier. 671 6722010-09-02 Joseph Myers <joseph@codesourcery.com> 673 674 * lang.opt (CLASSPATH, bootclasspath, classpath, encoding, 675 fCLASSPATH=): Mark as Java options and as aliases. 676 * jvspec.c (jvgenmain_spec): Don't handle -fCLASSPATH*. 677 (lang_specific_driver): Don't handle options marked as aliases. 678 * lang.c (java_handle_option): Don't handle OPT_fCLASSPATH_. 679 6802010-08-22 Joseph Myers <joseph@codesourcery.com> 681 682 * Make-lang.in (jvspec.o): Update dependencies. 683 * jvspec.c: Include opts.h. 684 (PARAM_ARG): Remove. 685 (find_spec_file): Do not add leading -specs=. 686 (lang_specific_driver): Use cl_decoded_option structures. 687 * lang.opt (C, CLASSPATH, D, bootclasspath, classpath, encoding, 688 extdirs, fmain=, s-bc-abi): New options. 689 6902010-08-20 Nathan Froyd <froydnj@codesourcery.com> 691 692 * class.c: Use FOR_EACH_VEC_ELT. 693 * expr.c: Likewise. 694 * jcf-parse.c: Likewise. 695 * resource.c: Likewise. 696 6972010-08-16 Joseph Myers <joseph@codesourcery.com> 698 699 * lang.opt (MD_, MMD_, version): Mark RejectDriver. 700 7012010-08-05 David Daney <ddaney@caviumnetworks.com> 702 703 * class.c (build_utf8_ref): Fix code formatting from previous commit. 704 7052010-08-05 David Daney <ddaney@caviumnetworks.com> 706 707 * class.c (build_utf8_ref): Make decl DECL_USER_ALIGN. 708 7092010-07-27 Joseph Myers <joseph@codesourcery.com> 710 711 * lang.c (java_handle_option): Update prototype and return value 712 type. 713 7142010-07-27 Joseph Myers <joseph@codesourcery.com> 715 716 * lang.c (java_option_lang_mask): New. 717 (java_init_options): Update prototype. 718 (LANG_HOOKS_OPTION_LANG_MASK): Define. 719 7202010-07-15 Nathan Froyd <froydnj@codesourcery.com> 721 722 * java-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN. 723 * boehm.c: Likewise. 724 * class.c: Likewise. 725 * decl.c: Likewise. 726 * expr.c: Likewise. 727 * jcf-parse.c: Likewise. 728 * typeck.c: Likewise. 729 * verify-glue.c: Likewise. 730 7312010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org> 732 733 * boehm.c: Include diagnostic-core.h in every file that includes 734 toplev.h. 735 * class.c: Likewise. 736 * constants.c: Likewise. 737 * decl.c: Likewise. 738 * except.c: Likewise. 739 * expr.c: Likewise. 740 * jcf-parse.c: Likewise. 741 * mangle.c: Likewise. 742 * mangle_name.c: Likewise. 743 * resource.c: Likewise. 744 * typeck.c: Likewise. 745 * verify-glue.c: Likewise. 746 7472010-07-05 Nathan Froyd <froydnj@codesourcery.com> 748 749 PR bootstrap/44825 750 * class.c (make_class_data): Cast result of VEC_length calls to int. 751 7522010-07-05 Nathan Froyd <froydnj@codesourcery.com> 753 754 * constants.c (build_constants_constructor): Use build_constructor 755 instead of build_constructor_from_list. 756 * class.c (make_method_value): Likewise. 757 (get_dispatch_table): Likewise. 758 (make_class_data): Likewise. 759 (emit_indirect_register_classes): Likewise. 760 (emit_symbol_table): Likewise. 761 (add_assertion_table_entry): Likewise. 762 (emit_assertion_table): Likewise. 763 (make_field_value): Use build_constructor_single instead of 764 build_constructor_from_list. 765 7662010-06-28 Nathan Froyd <froydnj@codesourcery.com> 767 768 * java-tree.h (struct lang_type) [catch_classes]: Change type to a 769 VEC. 770 * except.c (prepare_eh_table_type): Call CONSTRUCTOR_APPEND_ELT 771 instead of tree_cons. 772 * class.c (make_class): Add dummy entry to TYPE_CATCH_CLASSES. 773 (emit_catch_table): Adjust for new type of TYPE_CATCH_CLASSES. 774 7752010-06-28 Steven Bosscher <steven@gcc.gnu.org> 776 777 * lang.c: Do not include except.h 778 * except.c: Likewise. 779 (doing_eh): New, moved from except.c (in gcc/) but removed the 780 do_warning flag. 781 (maybe_start_try): Update doing_eh call. 782 * Make-lang.in: Update dependencies. 783 7842010-06-23 Anatoly Sokolov <aesok@post.ru> 785 786 * decl.c (java_init_decl_processing): Use double_int_to_tree instead 787 of build_int_cst_wide. 788 * boehm.c (set_bit): Remove. 789 (mark_reference_fields): Use double_int type for 'mask' argument. 790 Use double_int_setbit instead of set_bit. 791 (get_boehm_type_descriptor): Use double_int_setbit instead of 792 set_bit. Use double_int_to_tree instead of build_int_cst_wide. 793 7942010-06-10 Gerald Pfeifer <gerald@pfeifer.com> 795 796 * gcj.texi: Move to GFDL version 1.3. Fix copyright years. 797 7982010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> 799 800 * jcf-reader.c (jcf_parse_constant_pool): Use typed GC allocation. 801 802 * jcf-parse.c (java_parse_file): Likewise. 803 (process_zip_dir): Likewise. 804 805 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Likewise. 806 (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise. 807 808 * expr.c (add_type_assertion): Likewise. 809 810 * decl.c (make_binding_level): Likewise. 811 (java_dup_lang_specific_decl): Likewise. 812 813 * constants.c (set_constant_entry): Likewise. 814 (cpool_for_class): Likewise. 815 816 * class.c (add_method_1): Likewise. 817 (java_treetreehash_new): Likewise. 818 819 * java-tree.h (struct lang_type): Add variable_size GTY option. 820 (struct lang_decl): Likewise. 821 822 * jch.h (struct cpool_entry): Likewise. 823 824 * java-tree.h (java_treetreehash_create): Remove parameter ggc. 825 826 * except.c (prepare_eh_table_type): Update 827 java_treetreehash_create call. 828 829 * class.c (add_method_1): Update java_treetreehash_create call. 830 (java_treetreehash_create): Remove parameter gc. Use 831 htab_create_ggc. 832 8332010-06-04 Joseph Myers <joseph@codesourcery.com> 834 835 * jvspec.c (lang_specific_driver): Use GCC-specific formats in 836 diagnostics. 837 8382010-05-30 Steven Bosscher <steven@gcc.gnu.org> 839 840 * except.c: Include tm.h. 841 8422010-05-28 Joseph Myers <joseph@codesourcery.com> 843 844 * jvspec.c (lang_specific_driver): Use fatal_error instead of 845 fatal. Use warning instead of error for warnings. 846 8472010-05-28 Nathan Froyd <froydnj@codesourcery.com> 848 849 * expr.c (get_symbol_table_index): Add spaces in expression. 850 8512010-05-28 Nathan Froyd <froydnj@codesourcery.com> 852 853 * java-tree.h (method_entry): Declare. Declare VECs containing it. 854 (struct lang_type): Change type of otable_methods, atable_methods, and 855 itable_methods to VECs. Fix comment for atable_methods. 856 (emit_symbol_table): Take a VEC instead of a tree. 857 (get_symbol_table_index): Take a VEC * instead of a tree *. 858 * class.c (add_table_and_syms): Take a VEC instead of a tree. 859 (emit_symbol_table): Update for changed parameter type. 860 * expr.c (get_symbol_table_index): Likewise. 861 8622010-05-27 Steven Bosscher <steven@gcc.gnu.org> 863 864 * buildings.c: Pretend to be a backend file by undefining 865 IN_GCC_FRONTEND (still need rtl.h here). 866 8672010-05-26 Nathan Froyd <froydnj@codesourcery.com> 868 869 * java-tree.h (struct lang_decl_func): Change type of throws_list 870 field to a VEC. 871 * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): Adjust for changed type 872 of DECL_FUNCTION_THROWS. 873 * class.c (make_method_value): Likewise. 874 8752010-05-26 Nathan Froyd <froydnj@codesourcery.com> 876 877 * class.c (utf8_decl_list): Delete. 878 (build_utf8_ref): Remove references to it. 879 * java-tree.h (all_class_list): Delete. 880 (predef_filenames): Delete. 881 (enum java_tree_index) [JTI ALL_CLASS_LIST,JTI_PREDEF_FILENAMES]: 882 Delete. 883 * jcf-parse.c (parse_roots): Decrease size to 2. 884 (current_file_list): Convert to a VEC. 885 (all_class_list): Declare. 886 (jcf_parse): Adjust for new type of all_class_list. 887 (java_layout_seen_class_methods): Likewise. 888 (predefined_filenames): Declare. 889 (add_predefined_file): Use it. 890 (predefined_filename_p): Likewise. 891 (java_parse_file): Adjust for new type of current_file_list. 892 8932010-05-25 Jakub Jelinek <jakub@redhat.com> 894 895 * lang.c (java_classify_record): Return RECORD_IS_INTERFACE 896 for interfaces. 897 898 PR debug/43260 899 * java-tree.h (pending_static_fields): New extern declaration. 900 (java_write_globals): New prototype. 901 * lang.c (LANG_HOOKS_WRITE_GLOBALS): Define. 902 * decl.c (java_mark_class_local): When clearing DECL_EXTERNAL 903 of a static field push it into pending_static_fields vector. 904 * class.c (pending_static_fields): New variable. 905 (add_field): If static field is not DECL_EXTERNAL, push it into 906 pending_static_fields vector. 907 (java_write_globals): New function. 908 9092010-05-24 Nathan Froyd <froydnj@codesourcery.com> 910 911 * expr.c (quick_stack): Change type to a VEC. Update comment. 912 (tree_list_free_list): Delete. 913 (flush_quick_stack): Update for quick_stack type change. 914 (push_value): Likewise. 915 (pop_value): Likewise. 916 9172010-05-23 Steven Bosscher <steven@gcc.gnu.org> 918 919 * java-gimplify.c: Do not include tm.h, toplev.h. 920 * typeck.c: Do not include tm.h. 921 * mangle_name.c: Do not include tm.h. 922 * jcf-dump.c: Do not include tm.h, ggc.h. 923 * class.c: Do not include rtl.h, tm_p.h, target.h, except.h, cgraph.h. 924 * decl.c: Do not include tm.h, rtl.h, function.h, expr.h, except.h, 925 and timevar.h. 926 * jcf-parse.c: Do not include tm.h and tm_p.h. 927 * resource.c: Do not include tm.h, rtl.h, flags.h, obstack.h, 928 target.h, and expr.h. 929 * except.c: Do not include tm.h, rtl.h, function.h. 930 * builtins.c: Do not include convert.h. Explain why RTL headers 931 have to be included here. 932 * verify-glue.c: Do not include tm.h. 933 * jcf-depend.c: Do not include tm.h. 934 * jcf-reader.c: Include ggc.h. 935 * jcf-io.c: Do not include tm.h, toplev.h. 936 * expr.c: Do not include tm.h, rtl.h, expr.h, except.h, tm_p.h, 937 gimple.h. 938 * lang.c: Do not include rtl.h, expr.h. 939 * Make-lang.in: Update dependencies. 940 9412010-05-23 Steven Bosscher <steven@gcc.gnu.org> 942 943 * jcf-parse.c: Include bitmap.h. 944 * Make-lang.in: Update dependencies. 945 9462010-05-20 Jakub Jelinek <jakub@redhat.com> 947 948 PR debug/43521 949 * decl.c (start_java_method): Set DECL_ARTIFICIAL on the 'this' 950 PARM_DECL. 951 9522010-05-19 Anatoly Sokolov <aesok@post.ru> 953 954 * jcf-parse.c (get_constant): Use double_int_to_tree instead of 955 build_int_cst_wide_type. 956 9572010-05-18 Nathan Froyd <froydnj@codesourcery.com> 958 959 * expr.c (pop_arguments): Fix use of undeclared variable. 960 9612010-05-18 Nathan Froyd <froydnj@codesourcery.com> 962 963 * expr.c (expand_java_multianewarray): Use build_call_vec instead of 964 build_call_list. 965 (pop_arguments): Return a VEC instead of a tree. Take a method type 966 rather than a list of argument types. 967 (rewrite_rule): Change signature. of rewrite_arglist member. 968 (rewrite_arglist_getcaller): Update signature. 969 (rewrite_arglist_getclass): Likewise. 970 (maybe_rewrite_invocation): Update for rewrite_arglist change. 971 (build_known_method_ref): Take a VEC instead of a tree. 972 (invoke_build_dtable): Likewise. 973 (expand_invoke): Update calls to pop_arguments. Use build_call_vec 974 instead of build_call_list. 975 (build_jni_stub): Use build_call_vec instead of build_call_list. 976 * java-tree.h (maybe_rewrite_invocation): Update declaration. 977 (build_known_method_ref): Likewise. 978 (invoke_build_dtable): Likewise. 979 9802010-05-14 Nathan Froyd <froydnj@codesourcery.com> 981 982 PR 44103 983 * java-tree.h (START_RECORD_CONSTRUCTOR): Change first argument to a 984 vector. Move call to build_constructor... 985 (FINISH_RECORD_CONSTRUCTOR): ...here. Add necessary arguments. Clear 986 TREE_CONSTANT on the constructor. 987 (PUSH_SUPER_VALUE): Change first argument to a vector. 988 (PUSH_FIELD_VALUE): Likewise. 989 * resource.c (compile_resource_data): Update calls to above macros. 990 * constants.c (build_constants_constructor): Likewise. 991 * class.c (build_utf8_ref): Likewise. 992 (make_field_value): Likewise. 993 (make_method_value): Likewise. 994 (add_table_and_syms): New function. 995 (make_class_data): Call it. Update calls to above macros. 996 (build_symbol_table_entry): New function. 997 (build_symbol_entry): Call it. Update calls to above macros. 998 (emit_symbol_table): Likewise. 999 (make_catch_class_record): Update calls to above macros. 1000 (build_assertion_table_entry): New function. 1001 (add_assertion_table_entry): Call it. 1002 (emit_assertion_table): Likewise. 1003 10042010-05-06 Manuel López-Ibáñez <manu@gcc.gnu.org> 1005 1006 PR 40989 1007 * lang.c (java_handle_option): Add argument kind. 1008 10092010-04-18 Eric Botcazou <ebotcazou@adacore.com> 1010 1011 * decl.c (java_init_decl_processing): Remove argument in call to 1012 initialize_sizetypes 1013 10142010-04-07 Jakub Jelinek <jakub@redhat.com> 1015 1016 * exception.cc (_Jv_Throw): Avoid set but not used warning. 1017 * include/java-assert.h (JvAssertMessage, JvAssert): Use argument in 1018 sizeof to avoid set but not used warnings. 1019 10202010-01-20 Joern Rennecke <amylaar@spamcop.net> 1021 1022 * lang.c (java_post_options): Constify variable "dot". 1023 1024 * jcf-parse.c (set_source_filename): Constify variable "dot". 1025 (load_class): Constify variable "separator". 1026 Use get_identifier_with_length. 1027 1028 * jvspec.c (lang_specific_driver): Constify two variables named "p". 1029 10302010-01-09 Jakub Jelinek <jakub@redhat.com> 1031 1032 * jcf-dump.c (version): Update copyright notice dates. 1033 10342009-11-28 Jakub Jelinek <jakub@redhat.com> 1035 1036 * jvspec.c (lang_specific_driver): Remove unused 1037 saw_verbose_flag variable. 1038 * jcf-dump.c (main): Remove unused general_purpose_bits 1039 variable. 1040 * builtins.c (initialize_builtins): Remove unused float_ftype_float 1041 variable. 1042 * expr.c (java_stack_pop): Remove unused val variable. 1043 (build_jni_stub): Remove unused res_type variable. 1044 * verify-impl.c (check_field_constant): Remove unused len variable. 1045 10462009-10-20 Joel Dice <dicej@mailsnare.net> 1047 1048 PR java/28474 1049 * mangle_name.c (append_unicode_mangled_name): Fix mangling 1050 of names with multiple underscores and "U". 1051 (unicode_mangling_length): Likewise. 1052 10532009-10-03 Simon Baldwin <simonb@google.com> 1054 1055 * config-lang.in (lang_dirs): Remove zlib. 1056 10572009-09-28 Richard Henderson <rth@redhat.com> 1058 1059 * builtins.c (initialize_builtins): Update call to 1060 build_common_builtin_nodes. 1061 * lang.c (LANG_HOOKS_EH_USE_CXA_END_CLEANUP): New. 1062 10632009-09-14 Richard Henderson <rth@redhat.com> 1064 1065 * builtins.c (initialize_builtins): Update call to 1066 build_common_builtin_nodes. 1067 * decl.c (java_init_decl_processing): Don't call 1068 default_init_unwind_resume_libfunc. 1069 * except.c: Include tree-iterator.h. 1070 (build_exception_object_var): New. 1071 (build_exception_object_ref): Use it. 1072 (expand_end_java_handler): Initialize it from __builtin_eh_pointer. 1073 Attach all CATCH_EXPRs to a single TRY_CATCH_EXPR. 1074 * java-tree.h (DECL_FUNCTION_EXC_OBJ): New. 1075 10762009-09-13 Richard Guenther <rguenther@suse.de> 1077 Rafael Avila de Espindola <espindola@google.com> 1078 1079 * decl.c (do_nothing): Remove. 1080 (java_init_decl_processing): Do not set lang_eh_runtime_type. 1081 * Make-lang.in (lang.o): Add $(EXCEPT_H) dependency. 1082 * lang.c (java_eh_personality): New. 1083 (java_eh_personality_decl): Likewise. 1084 (LANG_HOOKS_EH_PERSONALITY): Define. 1085 10862009-09-03 Diego Novillo <dnovillo@google.com> 1087 1088 * lang.c (lang_hooks): Remove const qualifier. 1089 10902009-09-01 Jakub Jelinek <jakub@redhat.com> 1091 1092 * boehm.c (mark_reference_fields): Compute % in HOST_WIDE_INT 1093 type. 1094 10952009-09-01 Richard Guenther <rguenther@suse.de> 1096 1097 * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Remove. 1098 * java-tree.h (java_mark_addressable): Likewise. 1099 * typeck.c (java_mark_addressable): Likewise. 1100 11012009-08-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> 1102 1103 * Make-lang.in (java.install-pdf): Install gcj.pdf in 1104 $(pdfdir)/gcc, alongside the other manuals. 1105 11062009-08-12 Andrew Haley <aph@redhat.com> 1107 1108 * builtins.c (compareAndSwapInt_builtin): Use 1109 flag_use_atomic_builtins. 1110 (compareAndSwapLong_builtin): Likewise. 1111 (compareAndSwapObject_builtin): Likewise. 1112 * jvspec.c: Add flag_use_atomic_builtins. 1113 * gcj.texi: Likewise. 1114 * java-tree.h: Likewise. 1115 * lang.opt: Likewise. 1116 11172009-08-11 Dodji Seketeli <dodji@redhat.com> 1118 1119 PR debug/40990 1120 * lang.c (put_decl_node): Outputs different level of information 1121 depending on the verbosity level. 1122 11232009-07-31 Andrew Haley <aph@redhat.com> 1124 1125 PR java/40867 1126 * decl.c (java_replace_references): Set EXPR_LOCATION on all 1127 generated expressions. 1128 (binding_level.loc): new field. 1129 (clear_binding_level): Initialize loc. 1130 (set_input_location): New function. 1131 (pushlevel): Set new binding_level.loc. 1132 (poplevel): Set EXPR_LOCATION on the new BIND_EXPR_BODY. 1133 (start_java_method): Set DECL_SOURCE_LOCATION of this new method. 1134 (java_add_stmt): Set the EXPR_LOCATION on all subtrees of new_stmt. 1135 11362009-07-17 Richard Guenther <rguenther@suse.de> 1137 1138 PR c/40401 1139 * java-gimplify.c (java_genericize): Do not gimplify here. 1140 But replace all local references. 1141 (java_gimplify_expr): Do not replace local references here. 1142 (java_gimplify_modify_expr): Likewise. 1143 * jcf-parse.c (java_parse_file): Do not finalize the CU or 1144 optimize the cgraph here. 1145 * decl.c (java_replace_reference): Make static. 1146 (java_replace_references): New function. 1147 (end_java_method): Clear base_decl_map. 1148 * java-tree.h (java_replace_references): Declare. 1149 (java_replace_reference): Remove. 1150 11512009-07-14 Taras Glek <tglek@mozilla.com> 1152 Rafael Espindola <espindola@google.com> 1153 1154 * Make-lang.in (java.install-plugin): New target for 1155 installing plugin headers. 1156 11572009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org> 1158 1159 * class.c: Replace %J by an explicit location. Update all calls. 1160 11612009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org> 1162 1163 * jcf-parse.c: Replace %H by an explicit location. Update all calls. 1164 11652009-06-29 Andrew Haley <aph@redhat.com> 1166 1167 PR java/40590 1168 * java-tree.h (cxx_keyword_p): New declaration. 1169 * mangle_name.c (utf8_cmp): Move here from mangle.c. 1170 (cxx_keywords): Likewise. 1171 (cxx_keyword_p): Likewise. 1172 (MANGLE_CXX_KEYWORDS): New macro. 1173 (append_gpp_mangled_name): Use MANGLE_CXX_KEYWORDS. 1174 (append_gpp_mangled_name): Likewise. 1175 * mangle.c: Move code to mangle_name.c. 1176 (mangle_member_name): Don't call cxx_keyword_p. 1177 11782009-06-12 Aldy Hernandez <aldyh@redhat.com> 1179 1180 * java-gimplify.c (java_gimplify_block): New argument to 1181 build_empty_stmt. 1182 * expr.c (force_evaluation_order): Same. 1183 * typeck.c: Add location to build_decl or PUSH_FIELD calls. 1184 * class.c: Same. 1185 * decl.c: Same. 1186 * jcf-parse.c: Same. 1187 * constants.c: Same. 1188 * resource.c: Same. 1189 * except.c: Same. 1190 * builtins.c: Same. 1191 * expr.c: Same. 1192 * java-tree.h (PUSH_FIELD): Add location field. 1193 11942009-06-09 Ian Lance Taylor <iant@google.com> 1195 1196 * verify.h: Remove extern "C". 1197 11982009-06-07 Ian Lance Taylor <iant@google.com> 1199 1200 * jcf-parse.c (handle_constant): Change local variable 'kind' to 1201 unsigned int. 1202 12032009-06-01 Ian Lance Taylor <iant@google.com> 1204 1205 * jcf-io.c (find_class): Use CONST_CAST. 1206 12072009-05-27 Ian Lance Taylor <iant@google.com> 1208 1209 * Make-lang.in ($(XGCJ)$(exeext)): Change $(COMPILER) to 1210 $(LINKER). 1211 (jc1$(exeext), jcf-dump$(exeext), jvgenmain$(exeext)): Likewise. 1212 12132009-05-26 Ian Lance Taylor <iant@google.com> 1214 1215 * Make-lang.in (jvspec.o): Use $(COMPILER). 1216 ($(XGCJ)$(exeext), jc1$(exeext), jcf-dump$(exeext)): Likewise. 1217 (jvgenmain$(exeext), java/jcf-io.o, java/jcf-path.o): Likewise. 1218 12192009-05-12 Alexandre Oliva <aoliva@redhat.com> 1220 1221 * Make-lang.in (GCJ): Renamed to... 1222 (XGCJ): ... this. 1223 12242009-04-27 Ian Lance Taylor <iant@google.com> 1225 1226 * builtins.c (java_builtins): Add casts to enum type. 1227 * verify-impl.c (check_class_constant): Add cast to enum type. 1228 (check_constant, check_wide_constant): Likewise. 1229 12302009-04-27 Richard Guenther <rguenther@suse.de> 1231 1232 PR java/38374 1233 * constants.c (build_constants_constructor): Retain the old 1234 pointer type as valid TYPE_POINTER_TO after patching the 1235 type of the constant pool decl. 1236 12372009-04-24 Ian Lance Taylor <iant@google.com> 1238 1239 * jcf-parse.c (handle_constant): Add cast to enum type. 1240 12412009-04-21 Taras Glek <tglek@mozilla.com> 1242 1243 * builtins.c: Update GTY annotations to new syntax 1244 * decl.c: Likewise 1245 * java-tree.h: Likewise 1246 * jcf.h: Likewise 1247 * lang.c: Likewise 1248 12492009-04-21 Joseph Myers <joseph@codesourcery.com> 1250 1251 * ChangeLog, ChangeLog.ptr, ChangeLog.tree-ssa: Add copyright and 1252 license notices. 1253 12542009-04-18 Ian Lance Taylor <iant@google.com> 1255 1256 * verify-impl.c (verify_instructions_0): Add cast to enum type. 1257 12582009-04-09 Paolo Bonzini <bonzini@gnu.org> 1259 1260 * builtins.c (compareAndSwapLong_builtin, 1261 compareAndSwapInt_builtin, compareAndSwapObject_builtin, 1262 VMSupportsCS8_builtin): Do not look at sync_compare_and_swap_cc. 1263 12642009-03-31 Richard Guenther <rguenther@suse.de> 1265 1266 * java-gimplify.c (java_gimplify_expr): Do not manually gimplify 1267 the first operand of binary and comaprison expressions. 1268 12692009-03-30 Joseph Myers <joseph@codesourcery.com> 1270 1271 PR rtl-optimization/323 1272 * lang.c (java_post_options): Set flag_excess_precision_cmdline. 1273 Give an error for -fexcess-precision=standard for processors where 1274 the option is significant. 1275 12762009-03-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> 1277 1278 * lang.opt: Unify help text for -Wdeprecated. 1279 12802009-02-03 Jakub Jelinek <jakub@redhat.com> 1281 1282 * jcf-dump.c (version): Update copyright notice dates. 1283 12842009-01-16 Richard Guenther <rguenther@suse.de> 1285 1286 PR tree-optimization/38835 1287 PR middle-end/36227 1288 * builtins.c (build_addr_sum): Use POINTER_PLUS_EXPR. 1289 12902008-12-05 Sebastian Pop <sebastian.pop@amd.com> 1291 1292 PR bootstrap/38262 1293 * Make-lang.in (jc1): Add BACKENDLIBS, remove GMPLIBS. 1294 12952008-11-04 Andrew Haley <aph@redhat.com> 1296 1297 PR java/37068 1298 * jcf-parse.c (java_emit_static_constructor): Don't call 1299 cgraph_build_static_cdtor. Rewrite. 1300 13012008-10-24 Jakub Jelinek <jakub@redhat.com> 1302 1303 * Make-lang.in (check-java-subtargets): New target. 1304 13052008-10-16 David Edelsohn <edelsohn@gnu.org> 1306 1307 PR target/35483 1308 * Make-lang.in (class.o): Depend on $(TM_P_H). 1309 (expr.o): Same. 1310 * class.c: Include tm_p.h. 1311 * expr.c: Include tm_p.h. 1312 13132008-10-14 Andrew Haley <aph@redhat.com> 1314 1315 * constants.c (build_constant_data_ref): Make sure we only build 1316 one copy of the decl for the constant pool. 1317 13182008-09-22 Andrew Haley <aph@redhat.com> 1319 1320 * expr.c (rules): Add new rule for 1321 gnu.java.lang.VMCPStringBuilder.toString. 1322 (rewrite_rule.new_classname): New field. 1323 (maybe_rewrite_invocation): Use new_classname field instead of 1324 DECL_CONTEXT (*method_p). 1325 Allow rewrite_arglist to be NULL. 1326 13272008-09-17 Andrew Pinski <andrew_pinski@playstation.sony.com> 1328 1329 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): Don't define. 1330 (java_get_callee_fndecl): Kill. 1331 13322008-09-17 Jan Hubicka <jh@suse.cz> 1333 1334 PR c++/18071 1335 * class.c (add_method_1): Do not initialize DECL_INLINE. 1336 (make_local_function_alias): Likewise. 1337 * expr.c (rewrite_arglist_getcaller): Set DECL_UNINLINABLE. 1338 * lang.c (java_decl_ok_for_sibcall): Use DECL_UNINLINABLE. 1339 13402008-09-09 Richard Guenther <rguenther@suse.de> 1341 1342 * decl.c (build_result_decl): Remove no longer applicable 1343 promotion. 1344 13452008-09-05 David Daney <ddaney@avtrex.com> 1346 1347 * gcj.texi (-freduced-reflection): Clarify option's restrictions. 1348 13492008-08-21 David Daney <ddaney@avtrex.com> 1350 1351 * class.c (make_class_data): Don't add field_index when 1352 flag_reduced_reflection set. 1353 13542008-08-12 Ulrich Weigand <uweigand@de.ibm.com> 1355 1356 * typeck.c (convert): Do not check for TARGET_FLOAT_FORMAT. 1357 13582008-08-08 Manuel Lopez-Ibanez <manu@gcc.gnu.org> 1359 1360 PR 28875 1361 * lang.c (java_handle_option): Replace set_Wunused with 1362 warn_unused. 1363 13642008-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> 1365 1366 * gcj.texi: Update copyright years. Do not list GPL as 1367 Invariant Section. 1368 13692008-07-29 Jakub Jelinek <jakub@redhat.com> 1370 1371 * class.c (build_utf8_ref): Set DECL_SIZE and DECL_SIZE_UNIT 1372 from ctype's sizes. 1373 1374 * class.c (build_utf8_ref): Pad initializer string to utf8const_type's 1375 alignment. 1376 13772008-07-29 Jan Hubicka <jh@suse.cz> 1378 1379 * lang.c (java_post_options): Remove handling of flag_no_inline. 1380 13812008-07-28 Richard Guenther <rguenther@suse.de> 1382 1383 Merge from gimple-tuples-branch. 1384 1385 2008-07-18 Richard Guenther <rguenther@suse.de> 1386 1387 * expr.c: Include tree-iterator.h. 1388 * Make-lang.in (expr.o): Add tree-iterator.h dependency. 1389 1390 2008-07-18 Aldy Hernandez <aldyh@redhat.com> 1391 1392 * java-gimplify.c: Include gimple.h instead of tree-gimple.h. 1393 * expr.c: Same. 1394 1395 2008-07-14 Aldy Hernandez <aldyh@redhat.com> 1396 1397 * java-gimplify.c (java_gimplify_expr): Same. 1398 (java_gimplify_modify_expr): Same. 1399 * java-tree.h: Rename GENERIC_NEXT to TREE_CHAIN. 1400 1401 2008-05-02 Diego Novillo <dnovillo@google.com> 1402 1403 * expr.c (build_java_throw_out_of_bounds_exception): Fix 1404 mixed declarations and code. 1405 1406 2008-05-02 Doug Kwan <dougkwan@google.com> 1407 1408 * expr.c (build_java_throw_out_of_bounds_exception ): Wrap call to 1409 _Jv_ThrowBadArrayIndex with a COMPOUND_EXPR to return 0. 1410 1411 2008-02-19 Diego Novillo <dnovillo@google.com> 1412 1413 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html 1414 1415 * java-gimplify.c (java_gimplify_self_mod_expr): Change 1416 gimple_seq arguments to gimple_seq *. Update all users. 1417 1418 2007-11-26 Aldy Hernandez <aldyh@redhat.com> 1419 1420 * java-gimplify.c (java_gimplify_expr): Make pre_p and post_p 1421 sequences. 1422 (java_gimplify_self_mod_expr): Same. 1423 * java-tree.h (java_gimplify_expr): Make pre_p and post_p 1424 sequences. 1425 14262008-07-24 Jan Hubicka <jh@suse.cz> 1427 1428 * java/decl.c: Include cgraph.h 1429 (end_java_method): Remove non-unit-at-a-time code. 1430 (java_mark_decl_local): Likewise; sanity check that we don't touch 1431 finalized nodes. 1432 14332008-07-15 Jan Hubicka <jh@suse.cz> 1434 1435 * lang.c (java_init_options): Enable unit-at-a-time by default. 1436 14372008-07-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> 1438 1439 * Make-lang.in (jvspec.o): Fix dependencies. 1440 14412008-07-06 Tom Tromey <tromey@redhat.com> 1442 1443 * Make-lang.in (java/parse.o-warn): Remove. 1444 (java/jcf-io.o-warn): Remove. 1445 14462008-07-05 Tom Tromey <tromey@redhat.com> 1447 1448 * jcf-io.c: Don't include fnmatch.h. Don't use JCF_USE_SCANDIR. 1449 (compare_path): Remove. 1450 (java_or_class_file): Likewise. 1451 (memoized_dirlist_entry): Likewise. 1452 (memoized_dirlist_hash): Likewise. 1453 (memoized_dirlist_lookup_eq): Likewise. 1454 (memoized_dirlists): Likewise. 1455 (caching_stat): Likewise. 1456 (find_class): Use stat. 1457 * jcf.h (JCF_USE_SCANDIR): Remove. 1458 14592008-06-30 Joshua Sumali <jsumali@redhat.com> 1460 1461 * Make-lang.in (JAVA_MANFILES): Add doc/aot-compile.1 and 1462 doc/rebuild-gcj-db.1 1463 (java.uninstall): Likewise. 1464 (java.maintainer-clean): Likewise. 1465 (aot-compile.pod): New rule. 1466 (rebuild-gcj-db.pod): New rule. 1467 (java.install-man): Install doc/aot-compile.1 and doc/rebuild-gcj-db.1 1468 * gcj.texi: Add new sections for aot-compile and rebuild-gcj-db. 1469 14702008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 1471 1472 * Make-lang.in (java/jcf-io.o-warn): New. 1473 14742008-06-24 Tom Tromey <tromey@redhat.com> 1475 1476 * jcf-path.c (jcf_path_init): Don't name variable 'try'. 1477 * expr.c (add_type_assertion): Rename argument. 1478 (build_java_arrayaccess): Don't name variable 'throw'. 1479 (ARRAY_NEW_MULTI): Don't name variable 'class'. 1480 * jcf-io.c (find_class): Don't name variable 'class'. 1481 * mangle.c (compression_table_add): Don't name variable 'new'. 1482 * constants.c (cpool_for_class): Rename argument. 1483 (alloc_constant_fieldref): Likewise. 1484 * jcf-parse.c (handle_innerclass_attribute): Don't name variable 1485 'class'. 1486 (read_class): Likewise. 1487 (parse_zip_file_entries): Likewise. 1488 (process_zip_dir): Likewise. 1489 * decl.c (java_mark_class_local): Rename argument. 1490 * class.c (GEN_TABLE): Use type_name, not typename. 1491 (gen_indirect_dispatch_tables): Likewise. 1492 (add_field): Rename argument. 1493 (is_compiled_class): Likewise. 1494 (safe_layout_class): Likewise. 1495 (emit_assertion_table): Likewise. 1496 * typeck.c (has_method): Rename argument. 1497 14982008-06-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 1499 1500 * class.c (ident_subst, mangled_classname, unmangle_classname, 1501 gen_indirect_dispatch_tables, add_method_1, 1502 build_fieldref_cache_entry, make_local_function_alias, 1503 layout_class, java_treetreehash_find, java_treetreehash_new, 1504 split_qualified_name): Fix for -Wc++-compat. 1505 * constants.c (set_constant_entry, cpool_for_class): Likewise. 1506 * decl.c (make_binding_level, java_dup_lang_specific_decl, 1507 start_java_method): Likewise. 1508 * except.c (prepare_eh_table_type): Likewise. 1509 * expr.c (type_assertion_hash, note_instructions): Likewise. 1510 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC, 1511 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise. 1512 * jcf-io.c (jcf_filbuf_from_stdio, opendir_in_zip, find_class): 1513 Likewise. 1514 * jcf-parse.c (reverse, java_read_sourcefilenames, 1515 annotation_grow, rewrite_reflection_indexes, java_parse_file, 1516 process_zip_dir): Likewise. 1517 * jcf-path.c (add_entry, add_path, jcf_path_init, 1518 jcf_path_extdirs_arg): Likewise. 1519 * jcf-reader.c (jcf_parse_constant_pool): Likewise. 1520 * jvgenmain.c (do_mangle_classname): Likewise. 1521 * lang.c (put_decl_string): Likewise. 1522 * verify-impl.c (make_state_copy, make_state, add_new_state): 1523 Likewise. 1524 15252008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> 1526 1527 * gcj.texi: Expand TABs, remove whitespace from blank lines. 1528 15292008-06-14 Tom Tromey <tromey@redhat.com> 1530 1531 PR java/36247: 1532 * class.c (build_class_ref): Initialize this_classdollar when 1533 needed. 1534 15352008-05-23 Andrew Haley <aph@redhat.com> 1536 1537 * jcf-parse.c (give_name_to_class): Call find_sourcefile to find full 1538 pathname of source file. 1539 15402008-05-12 Aaron W. LaFramboise <aaronavay62@aaronwl.com> 1541 1542 * jcf-dump.c (print_constant): Use 1543 HOST_LONG_LONG_FORMAT. 1544 15452008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com> 1546 1547 * decl.c (java_init_decl_processing): Change DECL_IS_PURE to 1548 DECL_PURE_P. 1549 15502008-04-23 Paolo Bonzini <bonzini@gnu.org> 1551 1552 * class.c (build_utf8_ref): Don't set TREE_INVARIANT. 1553 (build_classdollar_field): Don't set TREE_INVARIANT. 1554 (get_dispatch_table): Don't set TREE_INVARIANT. 1555 (make_class_data): Don't set TREE_INVARIANT. 1556 (build_symbol_entry): Don't set TREE_INVARIANT. 1557 (emit_symbol_table): Don't set TREE_INVARIANT. 1558 * constants.c (build_constant_data_ref): Don't set TREE_INVARIANT. 1559 (build_ref_from_constant_pool): Don't set TREE_INVARIANT. 1560 * resource.c (compile_resource_data): Don't set TREE_INVARIANT. 1561 * expr.c (cache_cpool_data_ref): Don't set TREE_INVARIANT. 1562 15632008-04-03 Tom Tromey <tromey@redhat.com> 1564 1565 * Make-lang.in (java_OBJS): New variable. 1566 15672008-04-03 Paolo Bonzini <bonzini@gnu.org> 1568 1569 * java-tree.h (insert_block): Kill. 1570 * decl.c (insert_block): Kill. 1571 15722008-04-01 Joseph Myers <joseph@codesourcery.com> 1573 1574 * gcj.texi: Include gpl_v3.texi instead of gpl.texi 1575 * Make-lang.in (TEXI_JAVA_FILES): Include gpl_v3.texi instead of 1576 gpl.texi. 1577 15782008-03-27 Tom Tromey <tromey@redhat.com> 1579 1580 * Make-lang.in: Revert automatic dependency patch. 1581 15822008-03-25 Tom Tromey <tromey@redhat.com> 1583 1584 * Make-lang.in: Removed most explicit .o targets. 1585 (java/jvspec.o): Reduce to variable setting. Moved to java/. 1586 ($(GCJ)$(exeext)): Update. 1587 (JAVA_OBJS): New variable. 1588 (JCFDUMP_OBJS): Reformat. 1589 (java_OBJS): New variable. 1590 (java/jvspec.o-warn): Update. 1591 (java/parse.o-warn): Remove. 1592 (JAVA_TREE_H): Remove. 1593 (java/jcf-io.o): Reduce to variable setting. 1594 (ALL_CPPFLAGS): Likewise. 1595 15962008-03-12 Paolo Bonzini <bonzini@gnu.org> 1597 1598 * mangle.c (java_mangle_decl): Remove dead check. 1599 16002008-03-11 Paolo Bonzini <bonzini@gnu.org> 1601 1602 * jcf-parse.c (java_parse_file): Assert binding levels are 1603 left in order. 1604 * lang.c (LANG_HOOKS_CLEAR_BINDING_STACK, java_clear_binding_stack): 1605 Delete. 1606 16072008-03-02 Jakub Jelinek <jakub@redhat.com> 1608 1609 * jcf-dump.c (version): Update copyright notice dates. 1610 16112008-02-29 Tom Tromey <tromey@redhat.com> 1612 1613 * expr.c (expand_byte_code): Set DECL_FUNCTION_LAST_LINE on 1614 method. 1615 * java-tree.h (struct lang_decl_func): Remove obsolete comment. 1616 16172008-02-26 Tom Tromey <tromey@redhat.com> 1618 1619 * lang.c (java_post_options): Remove conditional. 1620 * expr.c (expand_byte_code): Remove old location code. 1621 * jcf-parse.c (set_source_filename): Remove old location code. 1622 (give_name_to_class): Likewise. 1623 (jcf_parse): Likewise. 1624 (duplicate_class_warning): Likewise. 1625 (parse_class_file): Likewise. 1626 (java_parse_file): Likewise. 1627 * decl.c (finish_method): Remove old location code. 1628 * class.c (push_class): Remove old location code. 1629 16302008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 1631 1632 PR other/35107 1633 * Make-lang.in (jc1): Add $(GMPLIBS). 1634 16352008-01-23 David Daney <ddaney@avtrex.com> 1636 1637 * class.c (hide) Rename to... 1638 (java_hide_decl) ... this throughout, and make public. 1639 * resource.c (Jr_count): Remove. 1640 (compile_resource_data): Call java_mangle_resource_name to generate 1641 decl name. Make resource decl public and hidden. 1642 * mangle.c (java_mangle_resource_name): New function. 1643 * java-tree.h (java_hide_decl, java_mangle_resource_name): Declare 1644 functions. 1645 16462008-01-04 Andrew Haley <aph@redhat.com> 1647 1648 PR java/17779 1649 * jcf-parse.c (parse_zip_file_entries): Move decl to compile on 1650 C90. 1651 16522008-01-03 Andrew Haley <aph@redhat.com> 1653 1654 PR java/17779 1655 * jcf-parse.c (parse_zip_file_entries): Unset TYPE_ALIAS_SET if 1656 we're about to re-layout the type. 1657 16582007-12-20 Alexandre Oliva <aoliva@redhat.com> 1659 1660 * lang.c (java_classify_record): Don't return 1661 RECORD_IS_INTERFACE for now. 1662 16632007-12-18 Andrew Haley <aph@redhat.com> 1664 1665 PR java/27643 1666 * jcf-parse.c (java_parse_file): Remove call to 1667 java_mark_class_local. 1668 (parse_class_file): Reinstate call to java_mark_class_local here. 1669 * decl.c (java_mark_cni_decl_local): If the ASSEMBLER_NAME is 1670 already set, call java_mangle_decl() and make_decl_rtl() to 1671 rewrite its name as a hidden alias. 1672 16732007-12-15 Alexandre Oliva <aoliva@redhat.com> 1674 1675 PR debug/7081 1676 * lang.c (java_classify_record): New. 1677 (LANG_HOOKS_CLASSIFY_RECORD): Override. 1678 16792007-11-26 Andreas Krebbel <krebbel1@de.ibm.com> 1680 1681 PR 34081/C++ 1682 * decl.c (finish_method): Pass 'false' for the new 1683 allocate_struct_function parameter. 1684 16852007-11-26 Alexandre Oliva <aoliva@redhat.com> 1686 1687 * expr.c (build_jni_stub): Use the computed jni func type for 1688 variable meth. 1689 16902007-11-26 Alexandre Oliva <aoliva@redhat.com> 1691 1692 * class.c (JAVA_TREEHASHHASH_H): Use TYPE_UID. 1693 16942007-11-26 Alexandre Oliva <aoliva@redhat.com> 1695 1696 * expr.c (type_assertion_hash): Hash type uids rather than 1697 tree pointers. 1698 16992007-11-17 David Daney <ddaney@avtrex.com> 1700 Andrew Haley <aph@redhat.com> 1701 1702 * constants.c (build_constants_constructor): Use POINTER_SIZE 1703 insead of BITS_PER_WORD in big-endian work around. 1704 17052007-11-07 Tom Tromey <tromey@redhat.com> 1706 1707 PR java/34019: 1708 * gcj.texi (Input Options): Add missing noun. 1709 17102007-11-02 Tom Tromey <tromey@redhat.com> 1711 1712 PR java/33765: 1713 * jcf-parse.c (java_parse_file): Ignore ZIPEMPTYMAGIC files. 1714 * zipfile.h (ZIPEMPTYMAGIC): New define. 1715 17162007-11-01 Tom Tromey <tromey@redhat.com> 1717 1718 * Make-lang.in (java/jcf-dump.o): Depend on zipfile.h. 1719 (java/jcf-parse.o): Depend on jcf-reader.c, zipfile.h, and jcf.h. 1720 (java/jcf-io.o): Depend on zipfile.h. 1721 17222007-10-17 Richard Guenther <rguenther@suse.de> 1723 1724 * Make-lang.in (java/builtins.o): Add $(OPTABS_H) and $(EXPR_H) 1725 dependencies. 1726 17272007-10-03 Andrew Haley <aph@redhat.com> 1728 1729 PR java/33639 1730 * class.c (mangled_classname): Detect and replace illegal 1731 characters in assembly language symbols. 1732 (gen_indirect_dispatch_tables): Call mangled_classname() on 1733 the type. 1734 17352007-09-27 Jakub Jelinek <jakub@redhat.com> 1736 1737 * lang.c (java_print_error_function): Add third argument. 1738 17392007-09-15 Tom Tromey <tromey@redhat.com> 1740 1741 * java-tree.h (struct lang_decl_func) <function_decl_body>: 1742 Remove. 1743 <init_final>: Likewise. 1744 * lang.c (java_dump_tree): Update. 1745 * java-tree.h (DECL_FUNCTION_BODY): Remove. 1746 17472007-09-11 Jan Hubicka <jh@suse.cz> 1748 1749 * decl.c (java_expand_body): Kill. 1750 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill. 1751 17522007-09-06 Tom Tromey <tromey@redhat.com> 1753 1754 * jcf-parse.c (parse_class_file): Re-enter the current file. 1755 17562007-09-07 Roman Zippel <zippel@linux-m68k.org> 1757 1758 * boehm.c (mark_reference_fields): Move misaligned pointer check 1759 after JREFERENCE_TYPE_P test 1760 17612007-09-06 Roman Zippel <zippel@linux-m68k.org> 1762 1763 * boehm.c (mark_reference_fields): Don't use bitmap as gc_descr 1764 if pointer is misaligned. 1765 17662007-09-06 Tom Tromey <tromey@redhat.com> 1767 1768 * lang.c (java_post_options): Update. 1769 * jcf-parse.c (set_source_filename): Update. 1770 (give_name_to_class): Update. 1771 (jcf_parse): Update. 1772 (duplicate_class_warning): Update. 1773 (parse_class_file): Update. 1774 (java_parse_file): Update. 1775 * expr.c (expand_byte_code): Update. 1776 17772007-09-05 Sandra Loosemore <sandra@codesourcery.com> 1778 1779 * decl.c (finish_method): Use set_cfun. 1780 17812007-09-04 Andrew Haley <aph@redhat.com> 1782 1783 * decl.c (java_init_decl_processing): Call "__cxa_end_cleanup" 1784 when using the ARM EABI. 1785 17862007-09-03 Daniel Jacobowitz <dan@codesourcery.com> 1787 1788 * Make-lang.in (jvspec.o): Remove SHLIB_MULTILIB. 1789 17902007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 1791 1792 * jcf-parse.c (read_class, java_parse_file): Supply a TYPE for 1793 CONST_CAST. 1794 * jcf.h (JCF_FINISH): Likewise. 1795 17962007-08-28 Tom Tromey <tromey@redhat.com> 1797 1798 * Make-lang.in (java.tags): Don't tag '*.y' files. 1799 18002007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 1801 1802 * lang.c (java_decl_ok_for_sibcall): Likewise. 1803 18042007-08-21 Paul Brook <paul@codesourcery.com> 1805 Nathan Sidwell <nathan@codesourcery.com> 1806 Mark Mitchell <mark@codesourcery.com> 1807 Joseph Myers <joseph@codesourcery.com> 1808 1809 * jcf-dump.c (version): Use pkgversion_string. Update copyright 1810 date. 1811 18122007-08-20 Richard Guenther <rguenther@suse.de> 1813 1814 * lang.c (java_tree_inlining_walk_subtrees): Remove. 1815 (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES): Remove. 1816 18172007-08-17 Tom Tromey <tromey@redhat.com> 1818 1819 * typeck.c (find_method_in_interfaces): Update. 1820 * jcf-parse.c (load_class): Update. 1821 * java-gimplify.c (java_gimplify_component_ref): Removed. 1822 (java_gimplify_modify_expr): Update. Removed pre_p and post_p 1823 arguments. 1824 (java_gimplify_expr): Update. 1825 * decl.c (java_init_decl_processing): Update. 1826 * class.c (set_constant_value): Update. 1827 (make_class_data): Update. 1828 (finish_class): Update. 1829 (build_static_field_ref): Update. 1830 (is_compiled_class): Update. 1831 (maybe_layout_super_class): Update. 1832 (layout_class): Update. 1833 (layout_class_method): Update. 1834 * java-tree.h (CAN_COMPLETE_NORMALLY): Removed. 1835 (lang_decl_var) <am, final_iud, cif>: Removed fields. 1836 (lang_decl_func) <init_calls_this>: Removed field. 1837 (lang_type) <dot_class, verify_method>: Removed fields. 1838 (FIELD_NESTED_ACCESS): Removed. 1839 (FIELD_NESTED_ACCESS_P): Removed. 1840 (DECL_FIELD_FINAL_IUD): Removed. 1841 (DECL_LOCAL_FINAL_IUD): Removed 1842 (LOCAL_FINAL_P): Removed. 1843 (FINAL_VARIABLE_P): Removed. 1844 (CLASS_FINAL_VARIABLE_P): Removed. 1845 (DECL_BIT_INDEX): Removed. 1846 (DECL_INIT_CALLS_THIS): Removed. 1847 (FIELD_LOCAL_ALIAS): Removed. 1848 (FIELD_LOCAL_ALIAS_USED): Removed. 1849 (FIELD_THISN): Removed. 1850 (DECL_FUNCTION_INIT_TEST_CLASS): Removed. 1851 (LOCAL_CLASS_INITIALIZATION_FLAG): Removed. 1852 (LOCAL_CLASS_INITIALIZATION_FLAG_P): Removed. 1853 (TYPE_DOT_CLASS): Removed. 1854 (TYPE_VERIFY_METHOD): Removed. 1855 (ID_CLASSDOLLAR_P): Removed. 1856 (enum java_tree_index) <JTI_CLASSDOLLAR_IDENTIFIER_NODE>: 1857 Removed. 1858 (classdollar_identifier_node): Removed. 1859 (TYPE_UNKNOWN): Removed. 1860 (CLASS_FROM_SOURCE_P): Removed. 1861 * expr.c (build_jni_stub): Update. 1862 (force_evaluation_order): Update. 1863 (build_java_empty_stmt): Update. 1864 (build_class_init): Update. 1865 (java_stack_swap): Update. 1866 (build_jni_stub): Update. 1867 18682007-08-17 Tom Tromey <tromey@redhat.com> 1869 1870 * java-tree.h (LABEL_TYPE_STATE): Removed. 1871 (load_type_state): Removed. 1872 (LABEL_PC): Removed. 1873 (LABEL_VERIFIED): Removed. 1874 (type_states): Declare. 1875 * expr.c (type_states): New global. 1876 (load_type_state): Now static. Use type_states. Changed 1877 argument. 1878 (lookup_label): Don't set LABEL_PC. 1879 (expand_byte_code): Don't use LABEL_VERIFIED. 1880 (note_instructions): Initialize type_states. 1881 * verify-glue.c (vfy_note_stack_depth): Rewrote. 1882 (vfy_note_stack_type): Use type_states. 1883 (vfy_note_local_type): Likewise. 1884 18852007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 1886 1887 * jcf-parse.c (read_class, java_parse_file): Use CONST_CAST. 1888 * jcf.h (JCF_FINISH): Likewise. 1889 18902007-07-31 Nick Clifton <nickc@redhat.com> 1891 1892 * java-gimplify.c: Change copyright header to refer to version 3 1893 of the GNU General Public License and to point readers at the 1894 COPYING3 file and the FSF's license web page. 1895 * typeck.c, lang-specs.h, mangle_name.c, jcf-dump.c, class.c, 1896 decl.c, config-lang.in, jcf-parse.c, constants.c, Make-lang.in, 1897 resource.c, except.c, builtins.c, jvspec.c, java-tree.def, 1898 javaop.def, jcf-path.c, verify-glue.c, jcf-depend.c, lang.opt, 1899 jcf-reader.c, mangle.c, zextract.c, jcf-io.c, jcf.h, zipfile.h, 1900 verify.h, java-except.h, win32-host.c, expr.c, jvgenmain.c, 1901 parse.h, lang.c, java-tree.h, javaop.h, boehm.c: Likewise. 1902 19032007-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 1904 1905 * jcf-io.c (find_class): Fix -Wcast-qual warnings. 1906 19072007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 1908 1909 * lang.c (java_get_callee_fndecl): Constify. 1910 19112007-07-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 1912 1913 * mangle.c (set_type_package_list): Constify. 1914 * verify-glue.c (vfy_make_string): Delete. 1915 * verify.h (vfy_make_string): Likewise. 1916 19172007-07-26 Tom Tromey <tromey@redhat.com> 1918 1919 * java-tree.h (push_labeled_block, pop_labeled_block): Remove. 1920 (LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, 1921 EXIT_BLOCK_LABELED_BLOCK): Likewise. 1922 * lang.c (java_tree_inlining_walk_subtrees): Update. 1923 (java_dump_tree): Likewise. 1924 * java-tree.def (LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR, TRY_EXPR): 1925 Remove. 1926 * decl.c (push_labeled_block, pop_labeled_block): Remove. 1927 * java-gimplify.c (java_gimplify_labeled_block_expr, 1928 java_gimplify_exit_block_expr, java_gimplify_try_expr): Remove. 1929 (java_gimplify_expr): Update. 1930 19312007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 1932 1933 * class.c (java_treetreehash_hash, java_treetreehash_compare): 1934 Constify. 1935 * expr.c (type_assertion_eq): Likewise. 1936 * jcf-io.c (compare_path): Likewise. 1937 * jcf-parse.c (cmpstringp): Likewise. 1938 * verify-impl.c (get_one_type, compute_argument_types, 1939 compute_return_type): Likewise. 1940 19412007-07-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> 1942 1943 PR target/32462 1944 PR libgcj/32465 1945 * class.c (hide): Wrap in HAVE_GAS_HIDDEN. 1946 19472007-07-12 Richard Guenther <rguenther@suse.de> 1948 1949 * expr.c (expand_java_return): RETURN_EXPR has void type. 1950 (build_jni_stub): Likewise. Use a comparison against zero 1951 for null-pointer test in COND_EXPR. 1952 (build_field_ref): Build POINTER_PLUS_EXPR with correct 1953 type. Convert result instead. 1954 (build_invokevirtual): Likewise. 1955 19562007-07-09 Geoffrey Keating <geoffk@apple.com> 1957 1958 PR 32617 1959 * lang.c (java_init): Remove setting of force_align_functions_log. 1960 * class.c (add_method_1): Set DECL_ALIGN of non-static method 1961 to cope with ptrmemfunc_vbit_in_pfn. 1962 19632007-07-03 David Daney <ddaney@avtrex.com> 1964 1965 * java/Make-lang.in (doc/gcj.info): Add $(gcc_docdir) to 1966 include path. 1967 (doc/gcj.dvi): Same. 1968 (doc/gcj.pdf): Same. 1969 (java/index.html): Same. 1970 19712007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com> 1972 1973 * class.c (make_class_data): Build the index in sizetype. 1974 Use POINTER_PLUS_EXPR instead of PLUS_EXPR when 1975 adding to a pointer type. 1976 (build_symbol_entry): Likewise. 1977 * expr.c (build_java_arrayaccess): Likewise. 1978 (build_field_ref): Likewise. 1979 (build_known_method_ref): Likewise. 1980 (build_invokevirtual): Likewise. 1981 * except.c (build_exception_object_ref): Do a 1982 NEGATIVE and then a POINTER_PLUS_EXPR instead 1983 of a MINUS_EXPR. 1984 19852007-06-11 Rafael Ávila de Espíndola <espindola@google.com> 1986 1987 * typeck.c (java_signed_type): Remove. 1988 * lang.c (LANG_HOOKS_SIGNED_TYPE): Remove. 1989 * java-tree.h (java_signed_type): Remove. 1990 19912007-05-18 Geoffrey Keating <geoffk@apple.com> 1992 1993 * jcf-dump.c (HANDLE_MAGIC): Use 'unsigned long' for %lx. 1994 (print_constant): Likewise. 1995 19962007-05-14 Rafael Ávila de Espíndola <espindola@google.com> 1997 1998 * expr.c (build_java_binop): Use unsigned_type_for instead of 1999 java_unsigned_type. 2000 * java-tree.h (java_unsigned_type): Remove. 2001 * lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove. 2002 * typeck.c (java_unsigned_type): Remove. 2003 20042007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com> 2005 2006 * java-tree.h (lang_tree_node): Use GENERIC_NEXT 2007 instead of checking GIMPLE_STMT_P in chain_next. 2008 20092007-04-06 Colin Walters <walters@redhat.com> 2010 2011 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=161701 2012 * jcf-io.c (open_class): Copy 'filename'. 2013 20142007-04-03 Andrew Haley <aph@redhat.com> 2015 2016 * jvgenmain.c (main): Change main to use class$, not class$$. 2017 (do_mangle_classname): Likewise. 2018 * class.c (hide): New function. 2019 (add_field): Hide everything that shouldn't be visible outside a 2020 DSO. 2021 (build_static_class_ref): Likewise. 2022 (build_classdollar_field): Likewise. 2023 (make_class_data): Likewise. 2024 (layout_class_method): Likewise. 2025 * expr.c (special_method_p): New function. 2026 2027 * class.c (push_class): Don't bogusly guess the source filename. 2028 * jcf-parse.c (give_name_to_class): Don't set input_location from 2029 DECL_ARTIFICIAL decls. 2030 20312007-03-30 Rafael Ávila de Espíndola <espindola@google.com> 2032 2033 * typeck.c (java_signed_or_unsigned_type): Removed. 2034 (java_signed_type): use get_signed_or_unsigned_type instead of 2035 java_signed_or_unsigned_type. 2036 (java_unsigned_type): Ditto. 2037 * lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Removed. 2038 * java-tree.h (java_signed_or_unsigned_type): Removed. 2039 20402007-03-26 Tom Tromey <tromey@redhat.com> 2041 2042 * Make-lang.in (JAVA_MANFILES): Removed grmiregistry.1. 2043 (java.maintainer-clean): Likewise. 2044 (java.install-man): Likewise. 2045 (.INTERMEDIATE): Removed grmiregistry.pod. 2046 (grmiregistry.pod): Removed. 2047 * gcj.texi (Invoking gcjh): Removed. 2048 (Invoking gjnih): Likewise. 2049 (Invoking grmiregistry): Likewise. 2050 (direntry): Updated. 2051 (Top): Likewise. 2052 (which-gcj): Removed. 2053 20542007-03-01 Brooks Moses <brooks.moses@codesourcery.com> 2055 2056 * Make-lang.in: Add install-pdf target as copied from 2057 automake v1.10 rules. 2058 20592007-02-27 Brooks Moses <brooks.moses@codesourcery.com> 2060 2061 * gcj.texi: Standardize title page. 2062 20632007-02-18 Kazu Hirata <kazu@codesourcery.com> 2064 2065 * class.c: Fix a comment typo. 2066 20672007-02-15 Sandra Loosemore <sandra@codesourcery.com> 2068 Brooks Moses <brooks.moses@codesourcery.com> 2069 Lee Millward <lee.millward@codesourcery.com> 2070 2071 * java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead 2072 of build3. 2073 (BUILD_MONITOR_EXIT): Likewise. 2074 2075 * java-gimplify.c (java_gimplify_component_ref): Use build_call_expr. 2076 (java_gimplify_modify_expr): Likewise. 2077 2078 * class.c (cache_this_class_ref): Use build_call_expr. 2079 (build_static_field_ref): Likewise. 2080 (emit_indirect_register_classes): Likewise. 2081 (emit_register_classes): Likewise. 2082 2083 * resource.c (write_resource_constructor): Use build_call_expr. 2084 2085 * builtins.c (builtin_creator_function): Change interpretation of 2086 the second parameter to be the whole CALL_EXPR instead of the arglist. 2087 (max_builtin): Tweak parameter list. Use new CALL_EXPR accessors. 2088 (min_builtin): Likewise. 2089 (abs_builtin): Likewise. 2090 (java_build_function_call_expr): Likewise. 2091 (convert_real): Likewise. 2092 (UNMARSHAL3): Likewise. 2093 (UNMARSHAL4): Likewise. 2094 (UNMARSHAL5): Likewise. 2095 (build_arglist_for_builtin): Delete. Fix callers to use 2096 build_call_expr instead. 2097 (putObject_builtin): Tweak parameter list. Use new CALL_EXPR 2098 accessors. 2099 (compareAndSwapInt_builtin): Likewise. 2100 (compareAndSwapLong_builtin): Likewise. 2101 (compareAndSwapObject_builtin): Likewise. 2102 (putVolatile_builtin): Likewise. 2103 (getVolatile_builtin): Likewise. 2104 (VMSupportsCS8_builtin): Likewise. 2105 (check_for_builtin): Pass entire CALL_EXPR to builtin expander 2106 instead of arglist. 2107 2108 * expr.c (build_java_athrow): Use build_call_nary instead of build3. 2109 (build_java_throw_out_of_bounds_exception): Likewise. 2110 (java_check_reference): Likewise. 2111 (build_java_arraystore_check): Likewise. 2112 (build_newarray): Likewise. 2113 (build_anewarray): Likewise. 2114 (expand_java_multinewarray): Use build_call_list instead of build3. 2115 (build_java_monitor): Use build_call_nary instead of build3. 2116 (java_create_object): Likewise. 2117 (expand_java_NEW): Likewise. 2118 (build_instanceof): Likewise. 2119 (expand_java_CHECKCAST): Likewise. 2120 (build_java_soft_divmod): Likewise. 2121 (build_java_binop): Likewise. 2122 (build_field_ref): Likewise. 2123 (build_class_init): Likewise. 2124 (rewrite_arglist_getcaller): Use build_call_expr. 2125 (build_invokeinterface): Use build_call_nary instead of build3. 2126 (expand_invoke): Use build_call_list instead of build3. 2127 (build_jni_stub): Use build_call_nary, build_call_list, or 2128 build_call_expr instead of build3. 2129 (expand_java_field_op): Use build_call_expr instead of build3. 2130 (force_evaluation_order): Use new CALL_EXPR accessors. 2131 2132 * lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors. 2133 21342007-02-15 David Daney <ddaney@avtrex.com> 2135 2136 * Make-lang.in (JAVA_MANFILES): Add doc/gc-analyze.1. 2137 (java.maintainer-clean):Add gc-analyze.1. 2138 (.INTERMEDIATE): Add gc-analyze.pod. 2139 (gc-analyze.pod): New rule. 2140 (java.install-man): Install gc-analyze.1 2141 * gcj.texi: Add new section for the gc-analyze program. 2142 21432007-02-07 Andrew Haley <aph@redhat.com> 2144 2145 * class.c (uncache_this_class_ref): New. 2146 * expr.c (build_jni_stub): Initialize the class. 2147 (expand_byte_code): Call uncache_this_class_ref after generating 2148 code. 2149 21502007-02-06 Tom Tromey <tromey@redhat.com> 2151 2152 PR java/30714: 2153 * jvspec.c (lang_specific_driver): Check for the '-' in '-I'. 2154 21552007-02-03 Kazu Hirata <kazu@codesourcery.com> 2156 2157 * java-tree.h, javaop.def, jcf-parse.c: Fix comment typos. 2158 21592007-02-02 Andrew Haley <aph@redhat.com> 2160 2161 * expr.c (expand_byte_code): Call cache_this_class_ref() and 2162 cache_cpool_data_ref(). 2163 Set TYPE_CPOOL_DATA_REF. 2164 (cache_cpool_data_ref): New function. 2165 * constants.c (build_ref_from_constant_pool): Remove special-case 2166 code for flag_indirect_classes. 2167 (build_constant_data_ref): Move special-case code for 2168 flag_indirect_classes here from build_ref_from_constant_pool. 2169 * decl.c (finish_method): Move class initialization from here to 2170 cache_this_class_ref. 2171 * class.c (cache_this_class_ref): New function. 2172 (build_class_ref): Use this_classdollar for the ouput class. 2173 21742007-02-02 David Daney <ddaney@avtrex.com> 2175 2176 * class.c (is_compiled_class): Move check to avoid reloading 2177 current class. 2178 (layout_class_method): Don't calculate DECL_EXTERNAL if it is 2179 already set. 2180 21812007-02-01 Andrew Haley <aph@redhat.com> 2182 2183 PR java/30641 2184 * jcf-parse.c (jcf_parse): Clear the field_offsets bitmap. 2185 21862007-01-31 Kazu Hirata <kazu@codesourcery.com> 2187 2188 * class.c, jcf-parse.c: Fix comment typos. 2189 21902007-01-30 Tom Tromey <tromey@redhat.com> 2191 2192 * gcj.texi (Strings): Fix documentation for JvNewString. 2193 21942007-01-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> 2195 2196 * gcj.texi (Invoking gcjh, Invoking gjnih, Arrays): Fix some 2197 typos. 2198 21992007-01-30 Ben Elliston <bje@au.ibm.com> 2200 2201 * jvspec.c (lang_specific_driver): Remove unused classpath_args. 2202 22032007-01-29 Tom Tromey <tromey@redhat.com> 2204 2205 PR java/30607: 2206 * jvspec.c (lang_specific_driver): Handle separate -I argument. 2207 * lang.opt (-I): Add 'Separate'. 2208 22092007-01-29 Andrew Haley <aph@redhat.com> 2210 2211 * class.c (add_method_1): Mark fndecl as external unless we are 2212 compiling it into this object file. 2213 22142007-01-24 Andrew Haley <aph@redhat.com> 2215 2216 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): current_class is a 2217 type node, not a decl, so use TYPE_SYNTHETIC not CLASS_SYNTHETIC. 2218 22192007-01-22 Andrew Haley <aph@redhat.com> 2220 2221 * builtins.c (VMSupportsCS8_builtin): New function. 2222 22232007-01-23 Andrew Pinski <pinskia@gmail.com> 2224 2225 PR java/30454 2226 * jcf-io.c (opendir_in_zip): Close the file 2227 and free zipf before returning after an error. 2228 22292007-01-16 Tom Tromey <tromey@redhat.com> 2230 2231 * java-tree.def: Added copyright header. 2232 22332007-01-15 Tom Tromey <tromey@redhat.com> 2234 2235 * lang.c (dump_compound_expr) <EXPR_WITH_FILE_LOCATION>: Removed 2236 case. 2237 * java-gimplify.c (java_gimplify_expr) <EXPR_WITH_FILE_LOCATION>: 2238 Removed case. 2239 * java-tree.h (EXPR_WFL_EMIT_LINE_NOTE): Removed. 2240 (EXPR_WFL_NODE): Likewise. 2241 (EXPR_WFL_LINECOL): Likewise. 2242 (EXPR_WFL_FILENAME): Likewise. 2243 (EXPR_WFL_LINENO): Likewise. 2244 (build_expr_wfl, expr_add_location): Don't declare. 2245 (build_unknown_wfl): Removed. 2246 (EXPR_WFL_FILENAME_NODE): Removed. 2247 (EXPR_WFL_COLNO): Removed. 2248 (EXPR_WFL_SET_LINECOL): Removed. 2249 (DECL_FUNCTION_WFL): Removed. 2250 (DECL_FIELD_FINAL_WFL): Removed. 2251 (struct lang_decl_func) <wfl>: Removed field. 2252 <called_constructor>: Likewise. 2253 <inner_access>: Likewise. 2254 (struct lang_decl_var) <wfl>: Removed field. 2255 (DECL_CONSTRUCTOR_CALLS): Removed. 2256 (DECL_FUNCTION_ACCESS_DECL): Likewise. 2257 (DECL_FUNCTION_INNER_ACCESS): Likewise. 2258 (DECL_SPECIFIC_COUNT): Likewise. 2259 * java-tree.def (EXPR_WITH_FILE_LOCATION): Removed. 2260 * expr.c (build_expr_wfl): Removed. 2261 (expr_add_location): Likewise. 2262 22632007-01-12 Tom Tromey <tromey@redhat.com> 2264 2265 * jcf-dump.c (main): Updated call to find_class. 2266 * lang.c (java_init): Removed dead code. 2267 * jcf-parse.c (read_class): Don't use java_source field. Removed 2268 dead code. 2269 (parse_zip_file_entries): Don't use java_source field. 2270 (process_zip_dir): Likewise. 2271 (jcf_parse): Removed dead code. 2272 (java_parse_file): Likewise. 2273 (read_class): Updated call to find_class. 2274 * jcf-io.c (find_class): Don't use java_source field. Removed 2275 'source_ok' argument, .java logic. 2276 * jcf.h (JCF) <java_source>: Removed field. 2277 (JCF_ZERO): Updated. (find_class): Updated. 2278 * decl.c: Removed dead code. 2279 * class.c: Removed dead code. 2280 22812007-01-11 Tom Tromey <tromey@redhat.com> 2282 2283 * typeck.c (convert): Don't use flag_emit_class_files. 2284 * lang.c (java_post_options): Don't use flag_emit_class_files. 2285 (java_handle_option): Don't use flag_extraneous_semicolon or 2286 flag_redundant. 2287 * jcf-parse.c (HANDLE_CONSTANTVALUE): Don't use 2288 flag_emit_class_files. 2289 (load_class): Likewise. 2290 * java-tree.h (flag_emit_class_files): Don't declare. 2291 (STATIC_CLASS_INIT_OPT_P): Don't use flag_emit_class_files. 2292 (flag_extraneous_semicolon): Don't declare. 2293 (flag_not_overriding): Likewise. 2294 (flag_static_local_jdk1_1): Likewise. 2295 (flag_redundant): Likewise. 2296 * expr.c (build_newarray): Don't use flag_emit_class_files. 2297 * class.c (DEFAULT_ENABLE_ASSERT): Don't use 2298 flag_emit_class_files. 2299 (build_class_ref): Likewise. 2300 * builtins.c (check_for_builtin): Don't use 2301 flag_emit_class_files. 2302 23032007-01-10 Tom Tromey <tromey@redhat.com> 2304 2305 * lang.c (java_can_use_bit_fields_p): Removed. 2306 (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): Removed. 2307 23082007-01-09 Andrew Haley <aph@redhat.com> 2309 2310 * expr.c (build_java_arrayaccess): Rewrite to generate array 2311 access in canonical form. 2312 (expand_java_arraystore): Use build_fold_addr_expr() on address of 2313 array access. 2314 23152007-01-03 Andrew Haley <aph@redhat.com> 2316 2317 PR java/28754 2318 * expr.c (expand_java_field_op): If we're initializing a field's 2319 declaring interface we should not also initialize the class 2320 context in which it was referenced. 2321 23222007-01-02 Tom Tromey <tromey@redhat.com> 2323 2324 * java-tree.h (compiling_from_source, current_encoding, 2325 JTI_FINIT_IDENTIFIER_NODE, JTI_INSTINIT_IDENTIFIER_NODE, 2326 JTI_LENGTH_IDENTIFIER_NODE, JTI_SUPER_IDENTIFIER_NODE, 2327 JTI_CONTINUE_IDENTIFIER_NODE, JTI_ACCESS0_IDENTIFIER_NODE, 2328 JTI_WFL_OPERATOR): Removed 2329 (finit_identifier_node, instinit_identifier_node, 2330 length_identifier_node, super_identifier_node, 2331 continue_identifier_node, access0_identifier_node, wfl_operator): 2332 Removed. 2333 (cyclic_inheritance_report, 2334 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND, 2335 DECL_FUNCTION_NAP, DECL_FUNCTION_SYNTHETIC_CTOR, 2336 DECL_FIXED_CONSTRUCTOR_P): Removed. 2337 (struct lang_decl_func) <smic, nap, synthetic_ctor, fixed_ctor>: 2338 Removed. 2339 (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST, TYPE_II_STMT_LIST, 2340 TYPE_IMPORT_LIST, TYPE_IMPORT_DEMAND_LIST): Removed. 2341 (struct lang_type) <finit_stmt_list, clinit_stmt_list, ii_block, 2342 import_list, import_demand_list>: Removed. 2343 (java_layout_seen_class_methods, init_jcf_parse, init_src_parse, 2344 cxx_keyword_p): Removed. 2345 (DECL_FINIT_P, DECL_INSTINIT_P, ID_FINIT_P, ID_INSTINIT_P, 2346 TYPE_UNUSED, TYPE_UNDERFLOW, TYPE_UNEXPECTED, 2347 CLASS_ACCESS0_GENERATED_P, CLASS_HAS_FINIT_P, 2348 IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME, 2349 IS_AN_IMPORT_ON_DEMAND_P, COMPOUND_ASSIGN_P, SWITCH_HAS_DEFAULT, 2350 PRIMARY_P, MODIFY_EXPR_FROM_INITIALIZATION_P, 2351 CLASS_METHOD_CHECKED_P, FOR_LOOP_P, ANONYMOUS_CLASS_P, 2352 LOCAL_CLASS_P, ARG_FINAL_P, SUPPRESS_UNREACHABLE_ERROR, 2353 RESOLVE_PACKAGE_NAME_P, RESOLVE_TYPE_NAME_P, IS_BREAK_STMT_P, 2354 IS_CRAFTED_STRING_BUFFER_P, IS_INIT_CHECKED, CALL_USING_SUPER, 2355 NESTED_FIELD_ACCESS_IDENTIFIER_P, TOPLEVEL_CLASS_DECL_P, 2356 PURE_INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P, 2357 CALL_CONSTRUCTOR_P, CALL_EXPLICIT_CONSTRUCTOR_P, 2358 CALL_THIS_CONSTRUCTOR_P, CALL_SUPER_CONSTRUCTOR_P, 2359 FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, BLOCK_IS_IMPLICIT, 2360 BLOCK_EMPTY_P, IS_UNCHECKED_EXCEPTION_P, java_error_count, 2361 java_parse_abort_on_error, extract_field_decl): Removed. 2362 (finput): Declare. 2363 * lang.c: (compiling_from_source, current_encoding): Removed. 2364 (java_handle_option): Ignore -fencoding. 2365 * parse.h: Don't include lex.h. 2366 (java_error_count, int_fits_type_p, stabilize_reference, RULE, 2367 RECOVERED, DRECOVERED, RECOVER, DRECOVER, YYERROR_NOW, 2368 YYNOT_TWICE, CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS, 2369 INTERFACE_MODIFIERS, INTERFACE_INNER_MODIFIERS, 2370 INTERFACE_METHOD_MODIFIERS, INTERFACE_FIELD_MODIFIERS, 2371 MODIFIER_WFL, THIS_MODIFIER_ONLY, parse_error_context, 2372 ABSTRACT_CHECK, JCONSTRUCTOR_CHECK, exit_java_complete_class, 2373 CLASS_OR_INTERFACE, GET_REAL_TYPE, GET_TYPE_NAME, 2374 OBSOLETE_MODIFIER_WARNING, OBSOLETE_MODIFIER_WARNING2, 2375 BUILD_PTR_FROM_NAME, INCOMPLETE_TYPE_P, 2376 JAVA_MAYBE_GENERATE_DEBUG_INFO, JBSC_TYPE_P, JSTRING_P, 2377 JNULLP_TYPE_P, JDECL_P, TYPE_INTERFACE_P, TYPE_CLASS_P, 2378 IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS, 2379 MANGLE_OUTER_LOCAL_VARIABLE_NAME, 2380 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID, 2381 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING, 2382 SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS, 2383 UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP, 2384 AIPL_FUNCTION_CREATION, AIPL_FUNCTION_DECLARATION, 2385 AIPL_FUNCTION_CTOR_INVOCATION, AIPL_FUNCTION_FINIT_INVOCATION, 2386 ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC, 2387 ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED, 2388 LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK, 2389 LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY, 2390 LOOP_EXPR_BODY_BODY_EXPR, PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, 2391 PUSH_LOOP, POP_LOOP, PUSH_EXCEPTIONS, POP_EXCEPTIONS, 2392 IN_TRY_BLOCK_P, EXCEPTIONS_P, ANONYMOUS_ARRAY_BASE_TYPE, 2393 ANONYMOUS_ARRAY_DIMS_SIG, ANONYMOUS_ARRAY_INITIALIZER, 2394 INVOKE_STATIC, INVOKE_NONVIRTUAL, INVOKE_SUPER, INVOKE_INTERFACE, 2395 INVOKE_VIRTUAL, jdep_code, struct _jdep, JDEP_DECL, JDEP_DECL_WFL, 2396 JDEP_KIND, JDEP_WFL, JDEP_MISC, JDEP_ENCLOSING, JDEP_CLASS, 2397 JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN, JDEP_TO_RESOLVE, 2398 JDEP_RESOLVED_DECL, JDEP_RESOLVED, JDEP_RESOLVED_P, struct 2399 jdeplist_s, jdeplists, CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, 2400 JDEP_INSERT, SET_TYPE_FOR_RESOLUTION, WFL_STRIP_BRACKET, 2401 STRING_STRIP_BRACKETS, PROMOTE_RECORD_IF_COMPLETE, 2402 BLOCK_CHAIN_DECL, GET_CURRENT_BLOCK, EXPR_WFL_GET_LINECOL, 2403 EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION, QUAL_DECL_TYPE, 2404 GET_SKIP_TYPE, COMPLETE_CHECK_OP, COMPLETE_CHECK_OP_0, 2405 COMPLETE_CHECK_OP_1, COMPLETE_CHECK_OP_2, BUILD_APPEND, 2406 BUILD_STRING_BUFFER, BUILD_THROW, SET_WFL_OPERATOR, 2407 PATCH_METHOD_RETURN_ERROR, CHECK_METHODS, CLEAR_DEPRECATED, 2408 CHECK_DEPRECATED_NO_RESET, CHECK_DEPRECATED, REGISTER_IMPORT, 2409 CURRENT_OSB, struct parser_ctxt, GET_CPC_LIST, CPC_INNER_P, 2410 GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE, GET_CPC_DECL_NODE, 2411 GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC, 2412 GET_ENCLOSING_CPC_CONTEXT, INNER_ENCLOSING_SCOPE_CHECK, PUSH_CPC, 2413 PUSH_ERROR, POP_CPC, DEBUG_CPC, CPC_INITIALIZER_LIST, 2414 CPC_STATIC_INITIALIZER_LIST, CPC_INSTANCE_INITIALIZER_LIST, 2415 CPC_INITIALIZER_STMT, CPC_STATIC_INITIALIZER_STMT, 2416 CPC_INSTANCE_INITIALIZER_STMT, SET_CPC_INITIALIZER_STMT, 2417 SET_CPC_STATIC_INITIALIZER_STMT, 2418 SET_CPC_INSTANCE_INITIALIZER_STMT, JAVA_NOT_RADIX10_FLAG, 2419 java_complete_class, java_check_circular_reference, 2420 java_fix_constructors, java_layout_classes, java_reorder_fields, 2421 java_method_add_stmt, java_get_line_col, reset_report, 2422 java_init_lex, yyparse, java_parse, yyerror, java_expand_classes, 2423 java_finish_classes, ctxp, ctxp_for_generation, 2424 ctxp_for_generation_last): Removed. 2425 * expr.c (force_evaluation_order): Don't mention NEW_CLASS_EXPR. 2426 * mangle.c (utf8_cmp): New function. 2427 (cxx_keywords): New global. 2428 (cxx_keyword_p): New function. 2429 * jvspec.c (JAVA_START_CHAR): Removed obsolete comment. 2430 * java-tree.def (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, 2431 NEW_ANONYMOUS_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR, 2432 CASE_EXPR, DEFAULT_EXPR, JAVA_CATCH_EXPR, SYNCHRONIZED_EXPR, 2433 THROW_EXPR, CONDITIONAL_EXPR, INSTANCEOF_EXPR, NEW_ARRAY_INIT, 2434 CLASS_LITERAL, JAVA_EXC_OBJ_EXPR): Removed. 2435 * Make-lang.in (java.srcextra): Do nothing. 2436 (parse.c, keyword.h, gt-java-parse.h): Removed targets. 2437 (JAVA_OBJS): Don't mention deleted files. 2438 (java.mostlyclean): Likewise. 2439 (java.clean): Likewise. 2440 (JAVA_LEX_C): Removed. 2441 (buffer.o, check-init.o, parse.o): Remove unused targets. 2442 (typeck.o): Updated. 2443 * jcf-parse.c (read_class): Comment out unused code. 2444 (java_layout_seen_class_methods): New function. 2445 (parse_source_file_1, parse_source_file_2, parse_source_file_3): 2446 Removed. 2447 (java_parse_file): Comment out unused code. Don't use 'ctxp'. 2448 (init_jcf_parse): Removed. 2449 * config-lang.in (gtfiles): Remove deleted files. 2450 * decl.c (java_init_decl_processing): Don't initialize 2451 finit_identifier_node, instinit_identifier_node, 2452 length_identifier_node, super_identifier_node, 2453 continue_identifier_node, access0_identifier_node. Don't call 2454 init_jcf_parse. 2455 * class.c (cyclic_inheritance_report): New global. 2456 (add_method_1): Don't use 2457 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND. 2458 (maybe_layout_super_class): Comment out code. 2459 (safe_layout_class): New function. 2460 * java-gimplify.c (java_gimplify_expr): Removed CASE_EXPR, 2461 DEFAULT_EXPR, NEW_ARRAY_INIT, JAVA_CATCH_EXPR, JAVA_EXC_OBJ_EXPR, 2462 UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_ANONYMOUS_ARRAY_EXPR, 2463 NEW_CLASS_EXPR, SYNCHRONIZED_EXPR, CONDITIONAL_EXPR, 2464 INSTANCEOF_EXPR, CLASS_LITERAL, THIS_EXPR. 2465 (java_gimplify_case_expr): Removed. 2466 (java_gimplify_default_expr): Likewise. 2467 (java_gimplify_new_array_init): Likewise. 2468 * parse.y: Removed. 2469 * keyword.gperf, keyword.h: Removed. 2470 * chartables.h: Removed. 2471 * check-init.c: Removed. 2472 * buffer.c, buffer.h: Removed. 2473 * convert.h: Removed. 2474 * gen-table.pl: Removed. 2475 * lex.c, lex.h: Removed. 2476 24772007-01-02 Andrew Haley <aph@redhat.com> 2478 2479 * expr.c (expand_java_arraystore): Make sure we perform a bounds 2480 check at runtime before we perform a type check. 2481 24822006-12-19 Andrew Haley <aph@redhat.com> 2483 2484 * decl.c: Bump minor BC ABI version. 2485 24862006-12-13 Gary Benson <gbenson@redhat.com> 2487 2488 * jcf-depend.c (jcf_dependency_add_file): Mark filename unused. 2489 24902006-12-12 Tom Tromey <tromey@redhat.com> 2491 2492 * lang-specs.h: Pass -M options to jc1. 2493 * jcf-depend.c (jcf_dependency_add_file): Don't emit 2494 dependencies. 2495 24962006-12-07 Mohan Embar <gnustuff@thisiscool.com> 2497 2498 * jcf-path.c (jcf_path_compute): Use platform PATH_SEPARATOR. 2499 25002006-12-06 Mohan Embar <gnustuff@thisiscool.com> 2501 2502 * lang-specs.h: Pass '%U'-based options as separate arguments. 2503 25042006-12-05 Tom Tromey <tromey@redhat.com> 2505 2506 PR java/29495: 2507 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Mark fields and 2508 classes as well. 2509 * class.c (add_field): Handle ACC_SYNTHETIC. 2510 (add_method_1): Likewise. Handle bridge and varargs. 2511 (get_access_flags_from_decl): Handle synthetic, bridge, varargs, 2512 annotation. 2513 (set_class_decl_access_flags): Handle synthetic and annotation. 2514 * java-tree.h (METHOD_BRIDGE): New macro. 2515 (METHOD_VARARGS): Likewise. 2516 (TYPE_SYNTHETIC): Likewise. 2517 (TYPE_ANNOTATION): Likewise. 2518 (lang_type): New fields 'synthetic' and 'annotation'. 2519 (lang_decl_func): New fields 'varargs' and 'bridge'. 2520 25212006-12-04 Andrew Haley <aph@redhat.com> 2522 2523 * jcf-parse.c (rewrite_reflection_indexes): Don't do anything if 2524 there's no map. 2525 25262006-11-29 Gary Benson <gbenson@redhat.com> 2527 2528 * expr.c (rewrite_arglist_getcaller): Reorder. 2529 25302006-11-29 Andrew Haley <aph@redhat.com> 2531 2532 * expr.c (rewrite_arglist_getcaller): Remove DECL_INLINE. 2533 * lang.c (java_decl_ok_for_sibcall): Check for DECL_INLINE. 2534 25352006-11-23 Andrew Haley <aph@redhat.com> 2536 2537 * expr.c (rewrite_arglist_getcaller): New. 2538 (rewrite_arglist_getclass): Fix indentation. 2539 (rules): Add gnu.classpath.VMStackWalker.getCallingClass() and 2540 gnu.classpath.VMStackWalker.getCallingClassLoader(). 2541 * builtins.c (initialize_builtins): Remove duplicate def'n of 2542 __sync_synchronize. 2543 Add __builtin_return_address. 2544 25452006-11-22 Andrew Haley <aph@redhat.com> 2546 2547 * jcf-reader.c (get_attribute): Mark attr_type unused. 2548 2549 * builtins.c (compareAndSwapObject_builtin): Fix declaration. 2550 25512007-01-08 Richard Guenther <rguenther@suse.de> 2552 2553 * lex.c (do_java_lex): Use build_int_cst_wide_type. 2554 * jcf-parse.c (get_constant): Likewise. 2555 25562006-11-12 Jan Hubicka <jh@suse.cz> 2557 2558 * resource.c (compile_resource_data): Update for new varpool names. 2559 * java/class.c (build_utf8_ref): Likewise. 2560 25612006-11-12 David Daney <ddaney@avtrex.com> 2562 2563 PR java/29805 2564 * typeck.c (build_java_array_type): Increase buffer sizes. 2565 25662006-11-11 Richard Guenther <rguenther@suse.de> 2567 2568 * check-init.c (check_init): Remove handling of FIX_CEIL_EXPR, 2569 FIX_FLOOR_EXPR and FIX_ROUND_EXPR. 2570 25712006-11-06 Andrew Haley <aph@redhat.com> 2572 2573 * java-tree.h (CONSTANT_LazyFlag): New. 2574 * constants.c (build_constants_constructor): Mask CONSTANT_LazyFlag. 2575 * jcf-parse.c (handle_innerclass_attribute): Write attribute to 2576 reflection_data. 2577 (handle_constant): Return 0 for dummy cpool entries. 2578 Handle constants of kind Class. 2579 Handle constants of kind NameAndType. 2580 (handle_enclosingmethod_attribute): New. 2581 (handle_signature_attribute): New. 2582 (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New. 2583 (HANDLE_SIGNATURE_ATTRIBUTE): New. 2584 (handle_constant): Use unmangle_classname()rather than calling 2585 identifier_subst() directly. 2586 25872006-11-02 Andrew Haley <aph@redhat.com> 2588 2589 * java-tree.h (FIELD_ENUM): New. 2590 (lang_decl_var.field_enum): New. 2591 (lang_type.enum_class): New. 2592 (CLASS_ENUM): New. 2593 * class.c (set_class_decl_access_flags): Handle enum types. 2594 (add_field): Handle enum fields. 2595 (get_access_flags_from_decl): Likewise. 2596 2597 * class.c (make_class_data): Put reflection_data into rodata. 2598 25992006-11-01 Andrew Haley <aph@redhat.com> 2600 2601 * jcf-parse.c (field_offsets, bit_obstack): New variables. 2602 (jcf_parse): Write end marker to annotation_data. 2603 (java_parse_file): Create field_offsets bitmap. Destroy it. 2604 (annotation_grow, annotation_rewrite_byte) 2605 (annotation_rewrite_short, annotation_rewrite_int) 2606 (annotation_read_short, annotation_write_byte) 2607 (annotation_write_short, annotation_write_int) 2608 (handle_long_constant, handle_constant, handle_element_value) 2609 (handle_annotation, handle_annotations) 2610 (handle_annotation_attribute, rewrite_reflection_indexes) 2611 (handle_member_annotations, handle_parameter_annotations) 2612 (handle_default_annotation): New functions. 2613 (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE) 2614 (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE) 2615 (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE) 2616 (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE) 2617 (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): New definitions. 2618 * java-tree.h (enum jv_attr_type, enum jv_attr_kind): New. 2619 (TYPE_REFLECTION_DATA): New. 2620 (TYPE_REFLECTION_DATASIZE): New. 2621 * jcf.h (enum cpool_tag): Convert a bunch of #define constants to 2622 an enum. 2623 * jcf-reader.c (get_attribute): Pass field/method index and 2624 attribute type to get_attribute(). 2625 * constants.c (find_class_or_string_constant): Make nonstatic. 2626 (cpool_for_class): Likewise. 2627 (build_constants_constructor): Separate string and scalar types. 2628 * class.c (make_class_data): Generate field_indexes permutation. 2629 Pass it to rewrite_reflection_indexes(). 2630 (make_class_data): Generate constructor for reflection_data field. 2631 26322006-10-20 Tom Tromey <tromey@redhat.com> 2633 2634 * gcj.texi (Top): Don't mention jv-scan. 2635 (Invoking gcj): Likewise. 2636 (Invoking gcjh): Likewise. 2637 (Invoking gjnih): Likewise. 2638 (Invoking gij): Likewise. 2639 (Invoking gcj-dbtool): Likewise. 2640 (Invoking jv-scan): Removed. 2641 * parse-scan.y: Removed. 2642 * jv-scan.c: Removed. 2643 * config-lang.in (stagestuff): Don't mention jv-scan. 2644 * Make-lang.in (java): Removed jv-scan. 2645 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise. 2646 (JVSCAN_OBJS): Removed. 2647 (jv-scan$(exeext)): Likewise. 2648 (JAVA_MANFILES): Removed jv-scan.1. 2649 (java.uninstall): Don't mention jv-scan. 2650 (java.mostlyclean): Likewise. 2651 (java.maintainer-clean): Likewise. 2652 (.INTERMEDIATE): Likewise. 2653 (java/jv-scan.o): Removed. 2654 (jv-scan.pod): Likewise. 2655 (java.srcextra): Don't mention parse-scan.c. 2656 (java.mostlyclean): Likewise. 2657 (java/parse-scan.c): Removed. 2658 (java/parse-scan.o-warn): Removed. 2659 (java/parse-scan.o): Removed. 2660 26612006-10-20 Tom Tromey <tromey@redhat.com> 2662 2663 * lang.c (java_handle_option): Don't use 2664 jcf_write_base_directory. 2665 * jcf.h (jcf_write_base_directory): Removed. 2666 * parse.y (java_expand_classes): Don't call write_classfile. 2667 * config-lang.in (gtfiles): Removed jcf-write.c. 2668 * Make-lang.in (JAVA_OBJS): Removed jcf-write.o. 2669 (java/jcf-write.o): Removed. 2670 * jcf-parse.c (parse_class_file): Don't call write_classfile. 2671 * java-tree.h (write_classfile): Removed declaration. 2672 * jcf-write.c: Removed. 2673 26742006-10-20 Tom Tromey <tromey@redhat.com> 2675 2676 * Make-lang.in (java): Removed gjnih, gcjh. 2677 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise. 2678 (GCJH_OBJS): Removed. 2679 (GJNIH_OBJS): Likewise. 2680 (gjnih$(exeext)): Likewise. 2681 (gcjh$(exeext)): Likewise. 2682 (JAVA_MANFILES): Removed gcjh.1, gjnih.1. 2683 (java.install-common): Don't special case gcjh. 2684 (java.uninstall): Don't mention gcjh, gjnih. 2685 (java.mostlyclean): Likewise. 2686 (java.maintainer-clean): Likewise. 2687 (.INTERMEDIATE): Likewise. 2688 (gcjh.pod): Removed. 2689 (gjnih.pod): Likewise. 2690 (GCJH_TARGET_INSTALL_NAME): Removed. 2691 (java/gjavah-jni.o): Removed. 2692 (java/gjavah.o): Likewise. 2693 * config-lang.in (stagestuff): Removed gjnih, gcjh. 2694 * gjavah.c: Removed. 2695 26962006-10-17 Tom Tromey <tromey@redhat.com> 2697 2698 * jcf-dump.c (print_element_value): Expect a utf8 constant in the 2699 "string" case. 2700 27012006-10-17 Tom Tromey <tromey@redhat.com> 2702 2703 * jvgenmain.c (main): Handle -findirect-dispatch. 2704 * jvspec.c (jvgenmain_spec): Pass -findirect-dispatch to 2705 jvgenmain. 2706 27072006-10-06 Andrew Haley <aph@redhat.com> 2708 2709 * builtins.c (compareAndSwapInt_builtin): Check that we really do 2710 have a compare_and_swap builtin. 2711 (compareAndSwapLong_builtin): Likewise. 2712 (compareAndSwapObject_builtin): Likewise. 2713 27142006-10-04 Andrew Haley <aph@redhat.com> 2715 2716 * builtins.c (java_builtins): Add compareAndSwapInt, 2717 compareAndSwapLong, compareAndSwapObject, putOrderedInt, 2718 putOrderedLong, putOrderedObject, putIntVolatile, putLongVolatile, 2719 putObjectVolatile, getObjectVolatile, getIntVolatile, 2720 getLongVolatile, getLong. 2721 (UNMARSHAL3): New macro. 2722 (UNMARSHAL4): Likewise. 2723 (UNMARSHAL5): Likewise. 2724 (build_arglist_for_builtin): New function. 2725 (build_addr_sum, build_check_this): New functions. 2726 (putObject_builtin. compareAndSwapInt_builtin, 2727 compareAndSwapLong_builtin, compareAndSwapObject_builtin, 2728 putVolatile_builtin, getVolatile_builtin): New builtins. 2729 27302006-06-08 Andrew Haley <aph@redhat.com> 2731 2732 * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to 2733 get_symbol_table_index(). 2734 (maybe_rewrite_invocation): Set SPECIAL if we need to access a 2735 private method. 2736 (build_known_method_ref): New arg: special. Pass it to 2737 get_symbol_table_index. 2738 (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of 2739 the method list. 2740 (build_invokevirtual): New arg: special. Pass it to 2741 get_symbol_table_index. 2742 (expand_invoke): New variable: special. 2743 Pass it to maybe_rewrite_invocation(). 2744 Pass it to build_known_method_ref(). 2745 * class.c (build_symbol_entry): Add new arg: special. Use it to 2746 build the symbol table conbstructor. 2747 (emit_symbol_table): Extract SPECIAL from the method list and pass 2748 it to build_symbol_entry(). 2749 * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set 2750 special accordingly. 2751 27522006-09-08 Andrew Haley <aph@redhat.com> 2753 2754 * class.c (layout_class_method): Use build_java_signature, not 2755 build_java_argument_signature. Use lookup_java_method, not 2756 lookup_argument_method. 2757 27582006-08-16 Jakub Jelinek <jakub@redhat.com> 2759 Bryce McKinlay <bryce@mckinlay.net.nz> 2760 2761 * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed. 2762 27632006-07-18 Tom Tromey <tromey@redhat.com> 2764 2765 * lang.opt: Added missing -W options. 2766 27672006-07-12 Tom Tromey <tromey@redhat.com> 2768 2769 PR java/28329: 2770 * lang-specs.h: Pass '%U'-based options as separate arguments. 2771 Use -faux-classpath. 2772 * lang.c (java_handle_option): Handle OPT_faux_classpath. 2773 * lang.opt (faux-classpath): New option. 2774 27752006-07-07 Tom Tromey <tromey@redhat.com> 2776 2777 * class.c (make_class_data): Set value for reflection_data field. 2778 * decl.c (java_init_decl_processing): Add reflection_data field. 2779 27802006-07-07 Tom Tromey <tromey@redhat.com> 2781 2782 * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): Declare locals 2783 earlier. 2784 (HANDLE_SIGNATURE_ATTRIBUTE): Likewise. 2785 27862006-07-07 Andrew Haley <aph@redhat.com> 2787 2788 * jcf-parse.c (set_source_filename): Don't check for 2789 CLASS_FROM_CURRENTLY_COMPILED_P. 2790 Remove // comments. 2791 27922006-07-07 Andrew Haley <aph@redhat.com> 2793 2794 * java-tree.h (java_read_sourcefilenames): Declare. 2795 * lang.c (java_handle_option): Call java_read_sourcefilenames(). 2796 * lang.opt (fsource-filename): New opt. 2797 * lang-specs.h: Add -fsource-filename. 2798 * jcf-parse.c (num_files, filenames): New variables. 2799 (reverse, cmpstringp, java_read_sourcefilenames, 2800 find_sourcefile): New. 2801 (set_source_filename): Call find_sourcefile to find the real name 2802 of a source file. 2803 28042006-06-27 Tom Tromey <tromey@redhat.com> 2805 2806 * jcf-reader.c (get_attribute): Handle EnclosingMethod, 2807 Signature, LocalVariableTypeTable, annotation attributes. 2808 * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New macro. 2809 (HANDLE_SIGNATURE_ATTRIBUTE): Likewise. 2810 (HANDLE_START_FIELD): Mention 'descriptor', not 'signature'. 2811 (HANDLE_METHOD): Likewise. 2812 (HANDLE_LOCALVARIABLETYPETABLE_ATTRIBUTE): New macro. 2813 (print_annotation): New function. 2814 (print_element_value): Likewise. 2815 (indent): Likewise. 2816 (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE): New macro. 2817 (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE): Likewise. 2818 (print_parameter_annotations): New function. 2819 (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE): New macro. 2820 (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE): 2821 Likewise. 2822 (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): Likewise. 2823 (print_annotations): New function. 2824 28252006-06-23 Tom Tromey <tromey@redhat.com> 2826 2827 * lang-specs.h: Default -fsource and -ftarget to 1.5. If 2828 emitting class files, always use 1.5. 2829 * gcj.texi (Input Options): Document -fsource. 2830 (Code Generation): Document -ftarget. 2831 28322006-06-21 Tom Tromey <tromey@redhat.com> 2833 2834 PR java/28089: 2835 * expr.c (expand_java_field_op): Initialize field's declaring 2836 class. 2837 28382006-06-20 Tom Tromey <tromey@redhat.com> 2839 2840 * expr.c (push_value): Always flush quick stack. 2841 28422006-06-19 Tom Tromey <tromey@redhat.com> 2843 2844 * expr.c (push_value): Also flush quick stack if value is a 2845 component_ref. 2846 28472006-06-19 Tom Tromey <tromey@redhat.com> 2848 2849 * expr.c (push_value): Flush quick stack if value has side 2850 effects. 2851 28522006-06-13 Tom Tromey <tromey@redhat.com> 2853 2854 * class.c (is_compiled_class): Explicitly check for current 2855 class. 2856 28572006-06-09 Tom Tromey <tromey@redhat.com> 2858 2859 * gjavah.c (decompile_method): Don't decompile a static field 2860 accessor method. 2861 28622006-06-06 Tom Tromey <tromey@redhat.com> 2863 2864 * lang-specs.h <jc1>: Add .jar file to command line if 2865 -fsaw-java-file. Also, remove -ffilelist-file in this case. 2866 28672006-06-05 Tom Tromey <tromey@redhat.com> 2868 2869 * jcf-dump.c (print_access_flags): Handle varargs, bridge, 2870 synthetic, enum, annotation. 2871 * jcf.h (ACC_BRIDGE): New macro. 2872 (ACC_VARARGS): Likewise. 2873 (ACC_SYNTHETIC): Likewise. 2874 (ACC_ENUM): Likewise. 2875 (ACC_ANNOTATION): Likewise. 2876 28772006-06-04 Tom Tromey <tromey@redhat.com> 2878 2879 * lang.opt (-fsaw-java-file, -fsource, -ftarget): New options. 2880 * jvspec.c (jvgenmain_spec): Remove -fsaw-java-file, -fsource, 2881 and -ftarget. 2882 (lang_specific_driver): Removed dead code. Add -fsaw-java-file 2883 when needed. Handle classpath-setting. 2884 * Make-lang.in ($(GCJ)$(exeext)): Link in jcf-path.o. 2885 * lang-specs.h: Rewrote. 2886 28872006-06-04 Tom Tromey <tromey@redhat.com> 2888 2889 * jcf-io.c (find_class): Set source_ok to 0. 2890 * jcf-parse.c (jcf_parse): Disable gnu.gcj.gcj-compiled warning. 2891 (parse_class_file): Don't call java_mark_class_local. 2892 (java_parse_file): Skip .java files. Call java_mark_class_local 2893 before lowering any code. 2894 (parse_zip_file_entries): Don't call duplicate_class_warning 2895 here. 2896 (process_zip_dir): ... call it here. 2897 * class.c (add_field): Don't mark field external if it is being 2898 compiled into this object. 2899 (make_class_data): Handle situation where class_dtable_decl is 2900 created before Class is compiled. 2901 (is_compiled_class): Don't assume files in zip are compiled into 2902 this object. 2903 (layout_class_method): Don't mark method external if it is being 2904 compiled into this object. 2905 29062006-06-04 Tom Tromey <tromey@redhat.com> 2907 2908 * jcf-path.c (jcf_path_compute): New function. 2909 * jcf.h (jcf_path_compute): Declare. 2910 29112006-10-23 Rafael Ávila de Espíndola <rafael.espindola@gmail.com> 2912 2913 * decl.c: Include langhooks.h. 2914 (builtin_function): Remove. 2915 (java_init_decl_processing): Replace calls to builtin_function 2916 with add_builtin_function. 2917 * Make-lang.in (jc1$(exeext)): Depend on and link with attribs.o. 2918 (java/decl.o): Depend on langhooks.h. 2919 * java-tree.h (builtin_function): Remove. 2920 29212006-10-10 Brooks Moses <bmoses@stanford.edu> 2922 2923 * Make-lang.in: Added "java.pdf", "gcj.pdf" target support. 2924 29252006-09-12 Tom Tromey <tromey@redhat.com> 2926 2927 * expr.c (push_value): Always flush quick stack. 2928 29292006-09-12 Tom Tromey <tromey@redhat.com> 2930 2931 PR java/29013: 2932 * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Always note 2933 the push of the called method's return result. 2934 29352006-09-12 Tom Tromey <tromey@redhat.com> 2936 2937 * jvspec.c (lang_specific_driver): Read spec file even if 2938 -fsyntax-only. 2939 29402006-09-12 Tom Tromey <tromey@redhat.com> 2941 2942 PR java/28754: 2943 * expr.c (expand_java_field_op): Initialize field's declaring 2944 interface if necessary. 2945 29462006-09-12 Tom Tromey <tromey@redhat.com> 2947 2948 PR java/28892: 2949 * expr.c (expand_java_field_op): No error for assignments not in 2950 class initializer or constructor. 2951 29522006-08-22 Andrew Haley <aph@redhat.com> 2953 2954 * decl.c (java_add_stmt): Give the statement list a type. 2955 29562006-08-16 Jakub Jelinek <jakub@redhat.com> 2957 Bryce McKinlay <bryce@mckinlay.net.nz> 2958 2959 * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed. 2960 29612006-08-10 Simon Martin <simartin@users.sourceforge.net> 2962 2963 PR java/8923 2964 * parse.y (build_incdec): Emit an error instead of an ICE if '++' 2965 or '--' is used with a constant operand. 2966 (java_complete_lhs): When processing a '++' or '--' expression, 2967 don't call java_complete_tree but java_complete_lhs, so that a 2968 static final variable operand is never replaced by its value. This 2969 avoids an ICE later on. 2970 (patch_unaryop): Fixed typo in comment. 2971 29722006-07-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 2973 2974 * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies. 2975 29762006-07-12 Bryce McKinlay <mckinlay@redhat.com> 2977 2978 * builtins.c (check_for_builtin): If a builtin could result in a 2979 direct call being generated, don't use it if flag_indirect_dispatch 2980 is set. 2981 29822006-07-12 Bryce McKinlay <mckinlay@redhat.com> 2983 2984 * gcj.texi (Invocation): Corrections for Invocation API example. 2985 29862006-07-04 Andrew Haley <aph@redhat.com> 2987 2988 * class.c (build_fieldref_cache_entry): Set DECL_IGNORED_P on the 2989 entry. 2990 29912006-06-21 Andrew Haley <aph@redhat.com> 2992 2993 * java-tree.h (update_aliases): Remove 2994 * expr.c (expand_iinc): Remove call to update_aliases(). 2995 (STORE_INTERNAL): Likewise. 2996 * decl.c (update_aliases, initialize_local_variable) 2997 (maybe_pushlevels): Set DECL_VALUE_EXPR for debugging decls. 2998 29992006-06-19 Andrew Haley <aph@redhat.com> 3000 3001 PR java/1305 3002 PR java/27908 3003 * expr.c (java_modify_addr_for_volatile): New function. 3004 (expand_java_field_op): Handle volatile fields. 3005 * java-gimplify.c (java_gimplify_component_ref): Call 3006 java_modify_addr_for_volatile to give the field_ref the correct 3007 volatile type. 3008 (java_gimplify_modify_expr): Likewise. 3009 * java-tree.h (java_modify_addr_for_volatile): New decl. 3010 30112006-06-17 Karl Berry <karl@gnu.org> 3012 3013 * gcj.texi (@dircategory): Use "Software development" instead 3014 of "Programming", following the Free Software Directory. 3015 30162006-06-16 Andrew Haley <aph@redhat.com> 3017 3018 * class.c (make_class_data): When using flag_indirect_classes, 3019 don't initialize the vtable of Class instances. 3020 30212006-06-09 Andrew Haley <aph@redhat.com> 3022 3023 PR java/1305 3024 PR java/27908 3025 * builtins.c (initialize_builtins): Add __sync_synchronize(). 3026 * class.c (add_field): Mark volatile fields. 3027 * java-gimplify.c (java_gimplify_expr): Call new functions to 3028 handle self-modifying exprs and COMPONENT_REFs. 3029 (java_gimplify_component_ref): New. 3030 (java_gimplify_modify_expr): Add handling for volatiles. 3031 30322006-06-08 Tom Tromey <tromey@redhat.com> 3033 3034 * gcj.texi (libgcj Runtime Properties): Document 3035 gnu.gcj.user.realname. 3036 30372006-06-08 Andrew Haley <aph@redhat.com> 3038 3039 * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to 3040 get_symbol_table_index(). 3041 (maybe_rewrite_invocation): Set SPECIAL if we need to access a 3042 private method. 3043 (build_known_method_ref): New arg: special. Pass it to 3044 get_symbol_table_index. 3045 (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of 3046 the method list. 3047 (build_invokevirtual): New arg: special. Pass it to 3048 get_symbol_table_index. 3049 (expand_invoke): New variable: special. 3050 Pass it to maybe_rewrite_invocation(). 3051 Pass it to build_known_method_ref(). 3052 * class.c (build_symbol_entry): Add new arg: special. Use it to 3053 build the symbol table conbstructor. 3054 (emit_symbol_table): Extract SPECIAL from the method list and pass 3055 it to build_symbol_entry(). 3056 * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set 3057 special accordingly. 3058 30592006-06-06 David Daney <ddaney@avtrex.com> 3060 3061 * gcj.texi (libgcj Runtime Properties): Document 3062 gnu.gcj.runtime.NameFinder.show_raw and 3063 gnu.gcj.runtime.NameFinder.remove_unknown. 3064 30652006-06-06 Tom Tromey <tromey@redhat.com> 3066 3067 * jcf-dump.c (print_access_flags): Handle varargs, bridge, 3068 synthetic, enum, annotation. 3069 * jcf.h (ACC_BRIDGE): New macro. 3070 (ACC_VARARGS): Likewise. 3071 (ACC_SYNTHETIC): Likewise. 3072 (ACC_ENUM): Likewise. 3073 (ACC_ANNOTATION): Likewise. 3074 30752006-06-06 Mike Stump <mrs@apple.com> 3076 3077 * Make-lang.in: Rename to htmldir to build_htmldir to avoid 3078 installing during build. 3079 30802006-05-31 Thomas Fitzsimmons <fitzsim@redhat.com> 3081 3082 * gcj.texi (Extensions): Document the new gcj-dbtool-based 3083 classname-to-library resolution mechanism. 3084 Declare the old gnu.gcj.runtime.VMClassLoader.library_control 3085 mechanism deprecated. 3086 (libgcj Runtime Properties): Document 3087 gnu.gcj.runtime.VMClassLoader.library_control's new default. 3088 30892006-05-29 Jakub Jelinek <jakub@redhat.com> 3090 3091 * javaop.h (int16, int32, int64): Define to exactly 16 (resp. 32, 64) 3092 bit wide type. 3093 (jword): Define to uint64 on 64-bit arches. 3094 * jcf-dump.c (print_constant): Cast JPOOL_UINT to long. 3095 30962006-05-28 Kazu Hirata <kazu@codesourcery.com> 3097 3098 * class.c, except.c, expr.c, java-gimplify.c: Fix comment 3099 typos. 3100 31012006-05-26 Tom Tromey <tromey@redhat.com> 3102 3103 * expr.c (java_push_constant_from_pool): Handle 'ldc class'. 3104 * verify-glue.c (vfy_class_type): New function. 3105 * verify-impl.c (check_constant): Allow 'ldc class'. 3106 * verify.h (vfy_class_type): Declare. 3107 31082006-05-25 Andrew Haley <aph@redhat.com> 3109 3110 PR java/27756 3111 * decl.c (maybe_pushlevels): When variable ranges are non-nested 3112 update all lifetimes, not just the first one. 3113 31142006-05-24 Tom Tromey <tromey@redhat.com> 3115 3116 * java-tree.h: Fixed flag documentation. 3117 31182006-05-24 Tom Tromey <tromey@redhat.com> 3119 3120 PR libgcj/27729: 3121 * jcf.h (ACC_INVISIBLE): Changed value. 3122 31232006-05-24 Andrew Haley <aph@redhat.com> 3124 3125 PR java/27754 3126 * decl.c (java_add_stmt): Use a STATEMENT_LIST rather than a 3127 COMPOUND_EXPR. 3128 31292006-05-16 H.J. Lu <hongjiu.lu@intel.com> 3130 3131 * lang.opt (femit-class-file): Remove VarExists. 3132 31332006-05-16 Tom Tromey <tromey@redhat.com> 3134 3135 * verify-impl.c (verify_instructions_0) <op_return>: Special case 3136 for Object.<init>. 3137 31382006-05-16 H.J. Lu <hongjiu.lu@intel.com> 3139 3140 PR driver/26885 3141 * Make-lang.in ($(GCJ)$(exeext)): Replace gcc.o with 3142 $(GCC_OBJS). 3143 31442006-05-14 H.J. Lu <hongjiu.lu@intel.com> 3145 3146 * Make-lang.in (java/decl.o): Add dependency on $(TARGET_H). 3147 (java/expr.o): Replace target.h with $(TARGET_H). 3148 (java/parse.o): Likewise. 3149 31502006-05-10 Andrew Haley <aph@redhat.com> 3151 3152 * class.c (emit_indirect_register_classes): Fix comment. 3153 31542006-05-04 Tom Tromey <tromey@redhat.com> 3155 3156 * java-tree.h (uses_jv_markobj_p): Declare. 3157 * class.c (uses_jv_markobj_p): Removed. 3158 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): New define. 3159 (get_boehm_type_descriptor): Use it. 3160 (uses_jv_markobj_p): Moved from class.c. Return bool. 3161 31622006-05-04 Tom Tromey <tromey@redhat.com> 3163 3164 * java-tree.def (THIS_EXPR): Now a tcc_expression. 3165 31662006-05-04 Andrew Haley <aph@redhat.com> 3167 3168 * class.c (make_field_value): Always build_address_of fdecl if 3169 there is an initializer. 3170 31712006-05-03 Andrew Haley <aph@redhat.com> 3172 3173 PR libgcj/27352 3174 * expr.c (maybe_rewrite_invocation): New function. 3175 (rewrite_arglist_getclass): Likewise. 3176 (rules): New. 3177 (expand_invoke): Call maybe_rewrite_invocation. 3178 * parse.y (patch_invoke): Likewise. 3179 * java-tree.h: (maybe_rewrite_invocation): New function. 3180 31812006-04-21 Andrew Haley <aph@redhat.com> 3182 3183 * lang.c (java_init): Handle flag_indirect_classes. 3184 * jvgenmain.c: Use "class$$" instead of "class$". 3185 * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as 3186 DECLs. 3187 (mangle_class_field): Special case "class$$" as well as "class$". 3188 * constants.c (build_ref_from_constant_pool): If 3189 flag_indirect_classes, generate a ref into the heap. 3190 * decl.c (constants_field_decl_node, 3191 constants_data_field_decl_node): New. 3192 * class.c (build_static_class_ref): New. 3193 (build_classdollar_field): Factor out from build_class_ref(). 3194 (make_field_value): Handle static fields in heap. 3195 (make_class_data): Make sure we get a static ref to class. 3196 Make class initializer const if flag_indirect_classes. 3197 (register_class): Build a class_ref for initialization if 3198 flag_indirect_classes. 3199 (emit_indirect_register_classes): New. 3200 32012006-04-08 Kazu Hirata <kazu@codesourcery.com> 3202 3203 * expr.c, gjavah.c: Fix comment typos. 3204 32052006-04-03 Andrew Haley <aph@redhat.com> 3206 3207 PR java/26858 3208 * expr.c (build_field_ref): Don't check the field offset if 3209 flag_syntax_only. 3210 32112006-03-30 Andrew Haley <aph@redhat.com> 3212 3213 PR java/26858 3214 * lang.c (java_attribute_table): New. 3215 (LANG_HOOKS_ATTRIBUTE_TABLE): Define. 3216 * expr.c (build_field_ref): Add a null pointer check for all 3217 fields of offset > 4k. Don't do so for accesses via the this 3218 pointer, which we know can never be null. 3219 * class.c (build_java_method_type): Mark arg 1 of all nonstatic 3220 methods nonnull. 3221 32222006-03-30 Carlos O'Donell <carlos@codesourcery.com> 3223 3224 * Make-lang.in: Rename docdir to gcc_docdir. 3225 32262006-03-30 Tom Tromey <tromey@redhat.com> 3227 3228 PR java/26042: 3229 * parse.y (java_reorder_fields): Reset superclass field's size as 3230 well. 3231 32322006-03-28 Tom Tromey <tromey@redhat.com> 3233 3234 PR java/26390: 3235 * parse.y (find_most_specific_methods_list): Added 'class' 3236 argument. 3237 (lookup_method_invoke): Updated. 3238 32392006-03-15 Tom Tromey <tromey@redhat.com> 3240 3241 * jcf-write.c (generate_bytecode_insns): Use qualifying type for 3242 non-static method calls. 3243 32442006-03-15 David Daney <ddaney@avtrex.com> 3245 3246 * java-tree.h : Moved comment for TYPE_DOT_CLASS adjacent to its 3247 declaration. 3248 32492006-03-15 David Daney <ddaney@avtrex.com> 3250 3251 * lang.opt (-freduced-reflection): New option. 3252 * lang.c (java_post_options): Generate an error if 3253 -freduced-reflection used with -fjni or -findirect-dispatch. 3254 * java-tree.h (flag_reduced_reflection): Declare new variable. 3255 * boehm.c (get_boehm_type_descriptor): Indicate all pointers 3256 if bitmap overflows and flag_reduced_reflection set. 3257 * class.c (uses_jv_markobj_p): New function. 3258 (make_class_data): Moved generation of vtable to before 3259 reflection data, generate less reflection data if 3260 flag_reduced_reflection set. 3261 * gcj.texi: Document -freduced-reflection. 3262 32632006-03-15 Tom Tromey <tromey@redhat.com> 3264 3265 PR java/26638: 3266 * class.c (get_interface_method_index): Don't put <clinit> into 3267 interface table. 3268 32692006-03-15 Tom Tromey <tromey@redhat.com> 3270 3271 * parse.y (analyze_clinit_body): Ignore empty statements. 3272 32732006-03-08 David Daney <ddaney@avtrex.com> 3274 3275 * gcj.texi: Document -static-libgcj option. 3276 32772006-02-20 Andrew Haley <aph@redhat.com> 3278 3279 * jcf-parse.c (parse_class_file): Set input_location from 3280 current_class. 3281 32822006-02-15 Andrew Haley <aph@redhat.com> 3283 3284 * class.c (GEN_TABLE): Don't pushdecl *_SYMS_DECL here. 3285 (make_class_data): pushdecl_top_level TYPE_OTABLE_SYMS_DECL, 3286 TYPE_ATABLE_SYMS_DECL, TYPE_ITABLE_SYMS_DECL here. 3287 32882006-02-09 Andrew Haley <aph@redhat.com> 3289 3290 PR java/26192 3291 * expr.c (expand_invoke): Allow methods in arrays to be resolved 3292 in their superclass. 3293 3294 * typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for 3295 array types. 3296 32972006-02-08 Tom Tromey <tromey@redhat.com> 3298 3299 PR java/22578: 3300 * check-init.c (check_init): Handle VIEW_CONVERT_EXPR. 3301 * builtins.c (convert_real): New function. 3302 (java_builtins): Handle Float.intBitsToFloat, 3303 Float.floatToRawIntBits, Double.longBitsToDouble, 3304 Double.doubleToRawLongBits. 3305 33062006-02-07 Andrew Haley <aph@redhat.com> 3307 3308 * expr.c (expand_invoke): (BC mode.) If we find a method in a 3309 class other than the one in which we expected to find it, ignore 3310 the result. 3311 3312 PR java/25535 3313 * constants.c (build_constants_constructor): move initializer into 3314 first halfword on a 64-bit big-endian machine. 3315 33162006-02-04 Tom Tromey <tromey@redhat.com> 3317 3318 PR java/25676: 3319 * builtins.c (max_builtin): Skip floating point 'max'. 3320 (min_builtin): Skip floating point 'min'. 3321 (check_for_builtin): Never return NULL_TREE. 3322 33232006-02-04 Tom Tromey <tromey@redhat.com> 3324 3325 PR java/26097: 3326 * expr.c (push_type): Avoid side effect in gcc_assert. 3327 33282006-02-04 Roger Sayle <roger@eyesopen.com> 3329 3330 * decl.c (java_init_decl_processing): Create char_type_node as a 3331 regular INTEGER_TYPE node. 3332 (push_promoted_type): Preserve TYPE_STRING_FLAG on types. 3333 * typeck.c (convert): No longer check for CHAR_TYPEs but instead 3334 test for char_type_node and promoted_char_type_node as special 3335 instances of INTEGER_TYPE tree codes. 3336 (promote_type,build_java_signature): Likewise. 3337 * jcf-write.c (adjust_typed_op): Likewise. 3338 * mangle.c (mangle_type): Likewise. 3339 * parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE. 3340 * parse.h (JINTEGRAL_TYPE_P): Likewise. 3341 33422006-02-04 Andreas Tobler <a.tobler@schweiz.ch> 3343 3344 * expr.c (java_stack_swap): Revert gcc_assert patch. 3345 33462006-02-03 Ben Elliston <bje@au.ibm.com> 3347 3348 * java-gimplify.c: Use gcc_assert and gcc_unreachable throughout. 3349 * typeck.c: Likewise. 3350 * verify-impl.c: Likewise. 3351 * class.c: Likewise. 3352 * decl.c: Likewise. 3353 * jcf-parse.c: Likewise. 3354 * constants.c: Likewise. 3355 * check-init.c: Likewise. 3356 * jcf-write.c: Likewise. 3357 * verify-glue.c: Likewise. 3358 * mangle.c: Likewise. 3359 * expr.c: Likewise. 3360 * lang.c: Likewise. 3361 * boehm.c: Likewise. 3362 33632006-02-01 Jan Hubicka <jh@suse.cz> 3364 3365 * decl.c (end_java_method): Kill hack disabling unit-at-a-time. 3366 * lang.c (java_init_options): Set no_unit_at_a_time_default. 3367 33682006-01-30 Andrew Haley <aph@redhat.com> 3369 3370 PR java/21428 3371 * parse.y: (source_start_java_method): Mark DECL_ARTIFICIAL("this"). 3372 33732006-01-21 Joseph S. Myers <joseph@codesourcery.com> 3374 3375 * jv-scan.c (version), jcf-dump.c (version), gjavah.c (version): 3376 Update copyright notice dates. 3377 33782006-01-16 Rafael Ávila de Espíndola <rafael.espindola@gmail.com> 3379 3380 * jvspec.c (lang_specific_spec_functions): Remove. 3381 33822006-01-06 Tom Tromey <tromey@redhat.com> 3383 3384 * gcj.texi (Arrays): Added more documentation for 3385 JvNewObjectArray. 3386 (Primitive types): Correct information about primitive classes. 3387 (Reference types): New node. 3388 (Index): New node. 3389 33902005-12-16 Alexandre Oliva <aoliva@redhat.com> 3391 3392 * jcf-parse.c (set_source_filename): Set the decl source location 3393 even when returning early. 3394 33952005-12-15 Tom Tromey <tromey@redhat.com> 3396 Andrew Haley <aph@redhat.com> 3397 3398 PR java/25429 3399 * parse.y (resolve_expression_name): Don't generate accessor 3400 methods for constant fields. 3401 34022005-12-13 Andrew Haley <aph@redhat.com> 3403 3404 PR java/25366 3405 PR java/25368 3406 * class.c (maybe_layout_super_class): Update current_class before 3407 calling do_resolve_class. 3408 34092005-12-12 H.J. Lu <hongjiu.lu@intel.com> 3410 3411 PR java/25330 3412 * jcf-write.c (write_classfile): Use PID in temporary class 3413 file. Save/restore errno when reporting error. 3414 34152005-12-10 Terry Laurenzo <tlaurenzo@gmail.com> 3416 3417 PR java/9861 3418 * mangle.c (mangle_method_decl): Mangle Java methods by prepending 'J' 3419 to bare_function_type and including the return type 3420 * builtins.c (initialize_builtins) : Change builtin mangled name 3421 constants to conform to new mangling scheme 3422 34232005-12-08 Andrew Haley <aph@redhat.com> 3424 3425 PR libgcj/25265 3426 * java-tree.h (enum java_tree_index): Add JTI_SOFT_NOSUCHFIELD_NODE. 3427 (soft_abstractmethod_node): New. 3428 * expr.c (build_field_ref): Add in-line check for missing field. 3429 * decl.c (java_init_decl_processing): Add soft_nosuchfield_node. 3430 34312005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com> 3432 3433 * Make-lang.in (java.all.build, java.install-normal): Remove. 3434 34352005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com> 3436 3437 * Make-lang.in: Remove all dependencies on s-gtype, except for 3438 gt-java-parse.h. 3439 34402005-12-07 Richard Sandiford <richard@codesourcery.com> 3441 3442 * class.c (build_utf8_ref, emit_register_classes): Use 3443 switch_to_section and get_section. 3444 34452005-12-06 Tom Tromey <tromey@redhat.com> 3446 3447 PR java/25283: 3448 * parse.y (patch_new_array_init): Revert previous patch. 3449 (lookup_method_invoke): Use size-less array type when creating an 3450 anonymous constructor. 3451 34522005-12-05 Tom Tromey <tromey@redhat.com> 3453 3454 * parse.y (patch_new_array_init): Don't set length on array. 3455 34562005-12-02 Richard Guenther <rguenther@suse.de> 3457 3458 * java-gimplify.c (java_gimplify_labeled_block_expr): Use 3459 buildN instead of build. 3460 * class.c (finish_class): Likewise. 3461 * expr.c (java_create_object): Likewise. 3462 34632005-11-28 Tom Tromey <tromey@redhat.com> 3464 3465 PR java/18278: 3466 * expr.c (build_jni_stub): Unwrap the return value. 3467 * java-tree.h (soft_unwrapjni_node): New define. 3468 (enum java_tree_index): Added JTI_SOFT_UNWRAPJNI_NODE. 3469 * decl.c (java_init_decl_processing): Initialize 3470 soft_unwrapjni_node. 3471 34722005-11-24 Bryce McKinlay <mckinlay@redhat.com> 3473 3474 * gcj.texi (gij options): Add -Xss documentation. 3475 34762005-11-08 Wil Mahan <wmahan@gmail.com> 3477 3478 PR java/23617 3479 * zextract.c (read_zip_archive): Fix out of memory error when 3480 reading jar files with zip-style comments. 3481 34822005-11-07 Terry Laurenzo <tlaurenzo@gmail.com> 3483 3484 * gjavah.c (HANDLE_CODE_ATTRIBUTE): Only define for ELF Object 3485 formats. 3486 * gjavah.c (decompile_method): Add ATTRIBUTE_UNUSED 3487 34882005-10-12 Nathan Sidwell <nathan@codesourcery.com> 3489 Wil Mahan <wmahan@gmail.com> 3490 3491 PR java/23620 3492 * class.c (make_class): Create empty binfo here. 3493 (set_super_info): Only create binfo if we have superclasses. 3494 34952005-10-03 Ranjit Mathew <rmathew@gcc.gnu.org> 3496 3497 PR java/24127 3498 * parse.y (method_header): Make the result of the rule a NULL_TREE 3499 when a parsing error occurs. 3500 35012005-09-29 Tom Tromey <tromey@redhat.com> 3502 3503 PR java/24120: 3504 * jcf-io.c (memoized_dirlist_hash): New function. 3505 (caching_stat): Use it. 3506 35072005-09-21 Ranjit Mathew <rmathew@gcc.gnu.org> 3508 3509 PR java/21418 3510 * class.c (inherits_from_p): Try to lay out super class 3511 if it is not already laid out. 3512 (maybe_layout_super_class): Handle the case where SUPER_CLASS 3513 is a NULL_TREE. 3514 35152005-09-18 James A. Morrison <phython@gcc.gnu.org> 3516 3517 * builtins.c (max_builtin, min_builtin, abs_builtin, 3518 java_build_function_call_expr): Use fold_buildN. 3519 * class.c (layout_class_method): Likewise. 3520 * expr.c (java_truthvalue_conversion, build_java_jsr, 3521 build_java_arrayaccess, expand_java_arrayload, expand_iinc, 3522 build_java_binop, build_field_ref, expand_compare, 3523 build_known_method_ref, build_invokevirtual, 3524 process_jvm_instruction): Likewise. 3525 * parse.y (patch_binop, patch_exit_expr): Likewise. 3526 * typeck.c (convert_ieee_real_to_integer): Likewise. 3527 (convert): Don't call fold after convert_ieee_real_to_integer. 3528 35292005-09-14 Bryce McKinlay <mckinlay@redhat.com> 3530 3531 PR java/23891 3532 * parse.y (maybe_create_class_interface_decl): Set TYPE_PACKAGE for 3533 the newly created type. Set import lists here, not in create_class. 3534 (jdep_resolve_class): Set current_class. 3535 (do_resolve_class): Use current_class's TYPE_PACKAGE to determine 3536 the current package context, not ctxp->package. 3537 (cicp_cache): Removed. 3538 (class_in_current_package): Simplify implementation using TYPE_PACKAGE. 3539 * jcf-parse.c (give_name_to_class): Set TYPE_PACKAGE. 3540 * java-tree.h (TYPE_PACKAGE): New macro. 3541 (struct lang_type): New member 'package'. 3542 35432005-09-09 Andrew Haley <aph@redhat.com> 3544 3545 PR libgcj/23182 3546 * expr.c (pop_type_0): If the expected type is object or ptr 3547 (i.e. void*), return the type of the object we just popped from 3548 the stack. 3549 35502005-09-06 Andrew Pinski <pinskia@physics.uc.edu> 3551 3552 * java-gimplify.c (java_gimplify_block): NULL out the old BLOCK's 3553 BLOCK_EXPR_BODY before returning the new BIND_EXPR. 3554 35552005-09-06 Kazu Hirata <kazu@codesourcery.com> 3556 3557 * check-init.c, decl.c, expr.c, gcj.texi, java-tree.h, 3558 jcf-parse.c, jcf.h, parse.h, parse.y, typeck.c: Fix comment 3559 typos. Follow spelling conventions. 3560 35612005-09-05 Ranjit Mathew <rmathew@hotmail.com> 3562 3563 PR java/23431 3564 * typeck.c (lookup_do): Look up interfaces for the original class, 3565 not the base class. 3566 * parse.y (java_check_regular_methods): Fix diagnostic message for 3567 more restrictive overriding of a method from an interface. 3568 35692005-08-16 Tom Tromey <tromey@redhat.com> 3570 3571 * class.c (make_class_data): Always emit JV_STATE_PRELOADING for 3572 class' initial state. 3573 35742005-08-16 Ranjit Mathew <rmathew@hotmail.com> 3575 3576 PR java/22113 3577 * lex.c (do_java_lex): Define MAX_TOKEN_LEN. Avoid overflowing 3578 `literal_token' for large numeric input tokens. 3579 35802005-08-16 Ranjit Mathew <rmathew@hotmail.com> 3581 3582 PR java/19870 3583 * parse.y (nested_field_access_p): Rename to nested_member_access_p 3584 and expand to handle method accesses across nested classes. 3585 (build_outer_method_access_method): Rename to 3586 build_nested_method_access_method. Minor adjustments to comments. 3587 (resolve_expression_name): Use the newly-renamed 3588 nested_member_access_p method. 3589 (resolve_qualified_expression_name): Likewise. 3590 (patch_method_invocation): Also consider static methods for access 3591 method generation. Minor adjustments to comments. 3592 (maybe_use_access_method): Use the more general 3593 nested_memeber_access_p to determine access across nested class 3594 boundaries. Allow THIS_ARG to be NULL (for static methods). 3595 35962005-08-15 Tom Tromey <tromey@redhat.com> 3597 3598 PR java/23300. 3599 * expr.c (build_field_ref): Don't generate otable reference when 3600 DECL_FIELD_OFFSET is 0. 3601 * class.c (maybe_layout_super_class): Pass outer class to 3602 do_resolve_class. 3603 36042005-08-15 Tom Tromey <tromey@redhat.com> 3605 3606 * java-tree.h (LABEL_IN_SUBR): Removed. 3607 (LABEL_IN_SUBR): Likewise. 3608 (LABEL_IS_SUBR_START): Likewise. 3609 (LABEL_SUBR_START): Likewise. 3610 (LABEL_SUBR_CONTEXT): Likewise. 3611 (LABEL_CHANGED): Likewise. 3612 (LABEL_RETURN_LABEL): Likewise. 3613 (LABEL_RETURN_TYPE_STATE): Likewise. 3614 (LABEL_RETURN_LABELS): Likewise. 3615 (RETURN_MAP_ADJUSTED): Likewise. 3616 (LABEL_PENDING_CHAIN): Likewise. 3617 36182005-08-15 Tom Tromey <tromey@redhat.com> 3619 3620 * Make-lang.in (JAVA_OBJS): Removed verify.o 3621 (java/verify.o): Removed. 3622 * verify.c: Removed. 3623 * lang.c (flag_new_verifier): Removed. 3624 (java_post_options): Updated. 3625 * java-tree.h (flag_new_verifier): Removed. 3626 (verify_jvm_instructions): Removed. 3627 * expr.c (pop_type_0): Assume flag_new_verifier is true. 3628 (build_java_check_indexed_type): Likewise. 3629 (expand_java_arraystore): Likewise. 3630 (expand_java_arrayload): Likewise. 3631 (pop_arguments): Likewise. 3632 (expand_byte_code): Likewise. 3633 (process_jvm_instruction): Likewise. 3634 36352005-08-10 Andrew Haley <aph@redhat.com> 3636 3637 * java-gimplify.c (java_gimplify_modify_expr): Fix any pointer 3638 type mismatches to make legal GIMPLE. 3639 36402005-08-10 Robin Green <greenrd@greenrd.org> 3641 3642 PR java/23230: 3643 * parse.y (maybe_use_access_method): Generalize check from 3644 java.lang.Object to any superclass of current_class 3645 36462005-08-08 Nathan Sidwell <nathan@codesourcery.com> 3647 3648 * class.c (build_class_ref): Wrap the primary class type in a 3649 NOP_EXPR. 3650 * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the 3651 primary class type from the NOP_EXPR in which it was placed. 3652 36532005-07-28 Diego Novillo <dnovillo@redhat.com> 3654 3655 * expr.c (expand_load_internal): Fix missing parens in 3656 predicate. 3657 36582005-07-28 Andrew Haley <aph@redhat.com> 3659 3660 * expr.c (expand_load_internal): Convert to destination type. 3661 36622005-07-22 Manfred Hollstein <mh@suse.com> 3663 3664 * verify-impl.c (check_class_constant): Fix uninitialised warnings. 3665 (check_constant): Likewise. 3666 (check_wide_constant): Likewise. 3667 36682005-07-20 Giovanni Bajo <giovannibajo@libero.it> 3669 3670 Make CONSTRUCTOR use VEC to store initializers. 3671 * check-init.c (check_init): Update to cope with VEC in 3672 CONSTRUCTOR_ELTS. 3673 * class.c (make_field_value, make_method_value, get_dispatch_table, 3674 make_class_data, emit_symbol_table, emit_catch_table, 3675 emit_assertion_table): Use build_constructor_from_list instead of 3676 build_constructor. 3677 * constants.c (build_constants_constructor): Likewise. 3678 * java-gimplify.c (java_gimplify_new_array_init): Update to cope with 3679 VEC in CONSTRUCTOR_ELTS. 3680 * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE, 3681 PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead 3682 of a TREE_LIST. 3683 * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in 3684 CONSTRUCTOR_ELTS. 3685 * parse.y (build_new_array_init): Use build_constructor_from_list 3686 instead of build_constructor. 3687 (patch_new_array_init): Update to cope with VEC in 3688 CONSTRUCTOR_ELTS. 3689 (array_constructor_check_entry): Likewise. 3690 36912005-07-12 Tom Tromey <tromey@redhat.com> 3692 3693 * jvspec.c (lang_specific_driver): Put filelist_filename first on 3694 command line. 3695 36962005-07-12 Tom Tromey <tromey@redhat.com> 3697 3698 PR java/19674: 3699 * parse-scan.y (interface_member_declaration): Added 3700 empty_statement. 3701 37022005-07-08 Daniel Berlin <dberlin@dberlin.org> 3703 3704 * java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common. 3705 (LABEL_PENDING_CHAIN): Ditto. 3706 (LABEL_PC): Ditto. 3707 (DECL_BIT_INDEX): Ditto. 3708 37092005-07-07 Bryce McKinlay <mckinlay@redhat.com> 3710 3711 PR java/18119 3712 * parse.y (inner_class_accessible): New function. Logic moved from 3713 check_inner_class_access. 3714 (check_inner_class_access): Use inner_class_accessible. 3715 (resolve_inner_class): Simplify arguments. Create circularity hash 3716 here. Keep looking for classes if we found one that was inaccessible. 3717 Return the inaccessible class only if there is no other match. 3718 (do_resolve_class): Update for new resolve_inner_class arguments. 3719 Don't create circularity_hash here. 3720 37212005-07-07 Bryce McKinlay <mckinlay@redhat.com> 3722 3723 PR java/21045 3724 * parse.y (add_exception_to_throws): New function. 3725 (purge_unchecked_exceptions): Removed. 3726 (get_constructor_super): Renamed from verify_constructor_super. Now 3727 returns the super constructor after verification. 3728 (java_complete_expand_method): Don't use purge_unchecked_exceptions 3729 or save/restore the exception list. 3730 (check_thrown_exceptions): Add uncaught exceptions in anonymous 3731 class initializers and constructors to the throws clause of the method. 3732 37332005-07-05 Bryce McKinlay <mckinlay@redhat.com> 3734 3735 PR java/19674 3736 * parse.y (interface_member_declaration): Allow empty statements in 3737 interface declarations. 3738 37392005-07-05 Paolo Bonzini <bonzini@gnu.org> 3740 3741 * Makefile.in (parse.o): Adjust dependencies. 3742 * parse.y: Include tree-dump.h. 3743 37442005-07-02 Joseph S. Myers <joseph@codesourcery.com> 3745 3746 * class.c, decl.c, expr.c: Use '+' flag instead of %J. Use 'q' 3747 flag for quoting. 3748 37492005-07-01 Andrew Pinski <pinskia@physics.uc.edu> 3750 3751 * parse.y (issue_warning_error_from_context): Call 3752 pp_output_formatted_text to be able to get the buffer. 3753 37542005-06-30 Andrew Pinski <pinskia@physics.uc.edu> 3755 3756 * parse.y (issue_warning_error_from_context): Update for the 3757 renaming of pp_format_text to pp_format. 3758 37592005-06-28 Paul Brook <paul@codesourcery.com> 3760 3761 * decl.c (java_init_decl_processing): Call 3762 default_init_unwind_resume_libfunc. 3763 37642005-06-27 Tom Tromey <tromey@redhat.com> 3765 3766 PR java/21540, PR java/13788: 3767 * parse.y (java_complete_lhs) <CASE_EXPR>: Use 3768 fold_constant_for_init. 3769 (patch_binop): Added 'folding' argument. Updated all callers. 3770 (patch_unaryop) <NOP_EXPR>: New case. 3771 (fold_constant_for_init) <NOP_EXPR>: Likewise. 3772 (fold_constant_for_init) <COND_EXPR>: Fix sense of test. 3773 37742005-06-25 Jan Hubicka <jh@suse.cz> 3775 3776 * builtins.c (define_builtin): Accept new flags parameter. 3777 (initialize_builtins): Mark the builtins const and nothrow accordingly. 3778 37792005-06-25 Kelley Cook <kcook@gcc.gnu.org> 3780 3781 * all files: Update FSF address in copyright headers. 3782 37832005-06-24 Tom Tromey <tromey@redhat.com> 3784 3785 * verify-impl.c (verify_instructions_0): Correctly handle 3786 situation where PC falls off end. 3787 37882005-06-23 Bryce McKinlay <mckinlay@redhat.com> 3789 3790 PR java/20697 3791 * parse.y (find_most_specific_methods_list): Remove special case for 3792 inner classes. 3793 37942005-06-15 Tom Tromey <tromey@redhat.com> 3795 3796 PR libgcj/21906: 3797 * class.c (make_method_value): Use soft_abstractmethod_node for 3798 abstract method. 3799 * java-tree.h (soft_abstractmethod_node): New define. 3800 (JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant. 3801 * decl.c (java_init_decl_processing): Initialize 3802 soft_abstractmethod_node. 3803 38042005-06-13 Geoffrey Keating <geoffk@apple.com> 3805 3806 * Make-lang.in (rule for installing gcj.1): Depends on installdirs. 3807 38082005-06-13 Per Bothner <per@bothner.com> 3809 3810 * expr.c (int highest_label_pc_this_method, 3811 start_label_pc_this_method): New globals. 3812 (lookup_label): Add start_label_pc_this_method to pc for label, and 3813 update highest_label_pc_this_method. This prevents conflicts between 3814 labels from different methods. 3815 * java-tree.h: Declare new globals. 3816 * jcf-parse.c (parse_class_file): If needed bump 3817 start_label_pc_this_method and reset highest_label_pc_this_method. 3818 38192005-06-13 Tom Tromey <tromey@redhat.com> 3820 3821 PR java/21844: 3822 * parse.y (nested_field_access_p): Handle case where outer field 3823 is inherited by enclosing class. 3824 38252005-06-12 Per Bothner <per@bothner.com> 3826 3827 * class.c (inherits_from_p): Do load_class if needed. 3828 38292005-06-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 3830 3831 * gjavah.c (error): Add ATTRIBUTE_PRINTF_1. 3832 * java-tree.h (parse_error_context): Move... 3833 * parse.h (parse_error_context): ... here, add ATTRIBUTE_GCC_DIAG. 3834 * parse.y (parse_warning_context): Add ATTRIBUTE_GCC_DIAG. 3835 * verify-impl.c (debug_print): Add ATTRIBUTE_PRINTF_1. 3836 38372005-06-08 Roger Sayle <roger@eyesopen.com> 3838 3839 * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes. 3840 38412005-06-06 Jakub Jelinek <jakub@redhat.com> 3842 3843 * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of 3844 msgid for argument name. 3845 * gjavah.c (error): Likewise. 3846 * java-tree.h (parse_error_context): Likewise. 3847 * parse.y (parse_error_context, parse_warning_context, 3848 issue_warning_error_from_context): Likewise. 3849 38502005-06-01 Tom Tromey <tromey@redhat.com> 3851 3852 PR java/21722: 3853 * class.c (build_static_field_ref): Don't fold constant fields if 3854 current class is from a .class file and we're using indirect 3855 dispatch. 3856 38572005-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 3858 3859 * java/verify-glue.c: Don't include errors.h and include toplev.h. 3860 * java/Make-lang.in: Updates dependencies. 3861 38622005-05-26 Ranjit Mathew <rmathew@hotmail.com> 3863 3864 PR java/19870. 3865 * java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to 3866 NESTED_FIELD_ACCESS_IDENTIFIER_P. 3867 (FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS. 3868 (FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P. 3869 * jcf-write.c (generate_classfile): Use 3870 NESTED_FIELD_ACCESS_IDENTIFIER_P instead of 3871 OUTER_FIELD_ACCESS_IDENTIFIER_P. 3872 * parse.y (build_outer_field_access): Rename to 3873 build_nested_field_access. Support static fields and outer-to-inner 3874 class accesses. 3875 (outer_field_access_p): Rename to nested_field_access_p. Support 3876 static fields and generalise to outer-to-inner class and sibling 3877 inner class accesses. 3878 (outer_field_expanded_access_p): Rename to 3879 nested_field_expanded_access_p and support static fields. 3880 (outer_field_access_fix): Rename to nested_field_access_fix and 3881 support static fields. 3882 (build_outer_field_access_expr): Rename to 3883 build_nested_field_access_expr and support static fields. 3884 (build_outer_field_access_methods): Rename to 3885 build_nested_field_access_methods and support static fields. For 3886 static fields, generate accessors without class instance parameters. 3887 (build_outer_field_access_method): Rename to 3888 build_nested_field_access_method and support static fields. 3889 (build_outer_method_access_method): Use 3890 NESTED_FIELD_ACCESS_IDENTIFIER_P instead of 3891 OUTER_FIELD_ACCESS_IDENTIFIER_P. 3892 (resolve_expression_name): Consider static field accesses across 3893 nested classes. 3894 (resolve_qualified_expression_name): Likewise. 3895 (java_complete_lhs): Use nested_field_access_fix instead of 3896 outer_field_access_fix. 3897 (patch_unary_op): Rename outer_field_flag to nested_field_flag. 3898 Use nested_field_expanded_access_p instead of 3899 outer_field_expanded_access_p. Use nested_field_access_fix instead 3900 of outer_field_access_fix. 3901 (check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P 3902 instead of OUTER_FIELD_ACCESS_IDENTIFIER_P. 3903 39042005-05-26 Bryce McKinlay <mckinlay@redhat.com> 3905 3906 * decl.c (GCJ_BINARYCOMPAT_ADDITION, 3907 GCJ_BOOTSTRAP_LOADER_ADDITION): Removed. 3908 (FLAG_BINARYCOMPAT_ABI, FLAG_BOOTSTRAP_LOADER, 3909 MINOR_BINARYCOMPAT_ABI_VERSION): New. 3910 (GCJ_CURRENT_BC_ABI_VERSION): Use new method to calculate version ID. 3911 (parse_version): Calculate version ID using new method. Use bit-flags 3912 for flag_indirect_dispatch and flag_bootstrap_classes. 3913 39142005-05-25 Richard Henderson <rth@redhat.com> 3915 3916 PR libgcj/21692 3917 * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H. 3918 * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and 3919 DECL_CONTEXT; avoid pushdecl_top_level. 3920 (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT. 3921 (layout_class): Don't SET_DECL_ASSEMBLER_NAME. 3922 (layout_class_method): Likewise. 3923 * decl.c (java_mark_cni_decl_local): New. 3924 (java_mark_class_local): Use it. 3925 * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New. 3926 (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New. 3927 (struct lang_decl_func): Add local_cni; 3928 (struct lang_decl_var): Add class_field, vtable. 3929 (java_mangle_decl): Declare. 3930 * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New. 3931 * mangle.c: Remove dup obstack.h; include langhooks-def.h. 3932 (mangle_obstack_1): New. 3933 (java_mangle_decl): Remove obstack argument. Call mangle_class_field, 3934 mangle_vtable, and mangle_local_cni_method_decl. Fall back to 3935 lhd_set_decl_assembler_name for things that don't need mangling. 3936 (mangle_class_field): Rename from java_mangle_class_field, make 3937 static, don't call init_mangling or finish_mangling. 3938 (mangle_vtable): Similarly. 3939 (mangle_local_cni_method_decl): New. 3940 (init_mangling): Remove obstack argument. Use &mangle_obstack_1, 3941 gcc_assert, and MANGLE_RAW_STRING. 3942 (finish_mangling): Use gcc_assert, remove if 0 debugging code. 3943 39442005-05-25 DJ Delorie <dj@redhat.com> 3945 3946 * class.c (set_constant_value): Move warning control from if() to 3947 warning(OPT_*). 3948 39492005-05-24 Richard Henderson <rth@redhat.com> 3950 3951 * builtins.c (define_builtin): Don't call make_decl_rtl. 3952 * constants.c (build_constant_data_ref): Likewise. 3953 * class.c (build_utf8_ref): Likewise. 3954 (build_fieldref_cache_entry, build_static_field_ref): Likewise. 3955 (get_dispatch_table, layout_class_method): Likewise. 3956 (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT 3957 by hand. 3958 (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME. 3959 (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P 3960 to determine if we need a non-zero address. 3961 * decl.c (builtin_function): Don't call make_decl_rtl. 3962 (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME. 3963 * expr.c (build_known_method_ref): Don't call make_decl_rtl. 3964 * resource.c (compile_resource_data): Likewise. 3965 * parse.y (resolve_field_access): Re-word comment to avoid 3966 building DECL_RTL. 3967 39682005-05-24 Richard Henderson <rth@redhat.com> 3969 3970 * class.c (registered_class): Take it out of class_roots; turn into 3971 a vec of trees. 3972 (register_class): Make static. Don't duplicate decl node. Use 3973 VEC_safe_push. 3974 (emit_register_classes): Use VEC_iterate. Use output_constant 3975 instead of assemble_integer. Don't call mark_decl_referenced 3976 directly. 3977 * java-tree.h (register_class): Remove decl. 3978 39792005-05-19 Paolo Bonzini <bonzini@gnu.org> 3980 3981 PR java/17845 3982 3983 * parse.y (register_package, package_list): Remove. 3984 (package_declaration): Do not call register_package. 3985 (do_resolve_class): Do not use package_list. 3986 39872005-05-15 Gerald Pfeifer <gerald@pfeifer.com> 3988 3989 * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove 3990 unused variable. 3991 39922005-05-15 Tom Tromey <tromey@redhat.com> 3993 3994 PR java/21519: 3995 * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call 3996 NOTE_PUSH. 3997 39982005-05-12 Aaron Luchko <aluchko@redhat.com> 3999 4000 * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'. 4001 40022005-05-11 Tom Tromey <tromey@redhat.com> 4003 4004 * gcj.texi (Code Generation): Document -fbootstrap-classes. 4005 * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro. 4006 (parse_version): Use it. 4007 * lang.opt (-fbootstrap-classes): New option. 4008 40092005-05-10 Paolo Bonzini <bonzini@gnu.org> 4010 4011 PR java/21436 4012 * class.c (maybe_layout_super_class): Look for imports in this_class. 4013 * parse.h (ctxp_for_generation_last): New. 4014 (do_resolve_class): Add a parameter. 4015 * parse.y (ctxp_for_generation_last): New. 4016 (java_pop_parser_context): Add at end of list. 4017 (find_in_imports, find_in_imports_on_demand): Look in ctxp 4018 if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of 4019 the given type are NULL. 4020 (do_resolve_class): Look into the imports of the new second parameter. 4021 Adjust recursive calls. 4022 (resolve_class, resolve_inner_class, find_as_inner_class): Adjust 4023 calls to do_resolve_class. 4024 (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST. 4025 (java_complete_class): Do not do that here. 4026 40272005-05-03 Thomas Fitzsimmons <fitzsim@redhat.com> 4028 4029 PR java/20309 4030 * Make-lang.in (java): Add gjnih. 4031 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise. 4032 (GJNIH_OBJS): New variable. 4033 (gjnih$(exeext)): New target. 4034 (JAVA_MANFILES): Add gjnih.1. 4035 (java.uninstall): Add gjnih.1. 4036 (java.mostlyclean): Add gjnih. 4037 (java.maintainer-clean): Add gjnih.1. 4038 (java/gjavah-jni.o): New target. 4039 (.INTERMEDIATE): Add gjnih.pod. 4040 (gjnih.pod): New target. 4041 * config-lang.in (stagestuff): Add gjnih. 4042 * gcj.texi (Top): Add gjnih node. 4043 (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and 4044 -bootclasspath options. 4045 (Invoking gjnih): New node. 4046 * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined. 4047 (TOOLNAME): New macro. 4048 (error): Replace hard-coded gcjh with TOOLNAME. 4049 (process_file): Likewise. 4050 (usage): Likewise. 4051 (version): Likewise. 4052 (help): Likewise. Add help output for -force, -old, -trace and -J 4053 options. 4054 (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros. 4055 (options): Add force, old, trace and J fields. 4056 (main): Handle -force, -old, -trace and -J options. 4057 40582005-05-03 Tom Tromey <tromey@redhat.com> 4059 4060 PR java/21245: 4061 * gjavah.c (main): Unlink output file on error. 4062 40632005-05-03 Kazu Hirata <kazu@cs.umass.edu> 4064 4065 * constants.c, jvgenmain.c, lang.opt, resource.c: Update 4066 copyright. 4067 40682005-04-29 Tom Tromey <tromey@redhat.com> 4069 4070 * expr.c (build_jni_stub): Updated for change to build_block. 4071 40722005-04-29 Andrew Pinski <pinskia@gcc.gnu.org> 4073 4074 * expr.c (force_evaluation_order): Declare 'saved' earlier. 4075 40762005-04-28 Andrew Haley <aph@redhat.com> 4077 4078 PR java/19285 4079 * java-tree.h (soft_resolvepoolentry_node): New. 4080 (alloc_constant_fieldref): Declare. 4081 * expr.c (expand_java_field_op): Don't call class_init for 4082 accesses to static fields with indirect dispatch. 4083 * builtins.c (initialize_builtins): Add "__builtin_expect". 4084 * decl.c (soft_resolvepoolentry_node): New variable. 4085 (java_init_decl_processing): Create a decl for 4086 "_Jv_ResolvePoolEntry". 4087 * class.c (build_fieldref_cache_entry): New function. 4088 (build_static_field_ref): Rewrite for indirect dispatch. 4089 * constants.c (find_name_and_type_constant_tree): New function. 4090 (alloc_constant_fieldref): Likewise. 4091 (build_constants_constructor): Handle CONSTANT_Fieldref and 4092 CONSTANT_NameAndType. 4093 4094 PR java/21115 4095 * expr.c (force_evaluation_order): Convert outgoing args smaller 4096 than integer. 4097 40982005-04-27 Bryce McKinlay <mckinlay@redhat.com> 4099 4100 * gcj.texi (libgcj Runtime Properties): Remove obsolete 4101 gnu.gcj.runtime.NameFinder.* system properties. Update documentation 4102 for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname. 4103 41042005-04-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 4105 4106 * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls 4107 to `unlock_stream' with `unlock_std_streams'. 4108 41092005-04-25 Jakub Jelinek <jakub@redhat.com> 4110 4111 * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H) 4112 instead of just expr.h. 4113 41142005-04-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 4115 4116 * gjavah.c (main): Unlock the stdio streams. 4117 * jcf-dump.c (main): Likewise. 4118 * jv-scan.c (main): Likewise. 4119 * jvgenmain.c (main): Likewise. 4120 41212005-04-23 DJ Delorie <dj@redhat.com> 4122 4123 * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c, 4124 parse.y: Adjust warning() callers. 4125 41262005-04-21 Bryce McKinlay <mckinlay@redhat.com> 4127 4128 * gcj.texi (Object fields): Change "Integer" to "Int" in example 4129 contructor. 4130 41312005-04-20 Bryce McKinlay <mckinlay@redhat.com> 4132 4133 * gcj.texi: Fix typos and bogus example. 4134 41352005-04-19 Kazu Hirata <kazu@cs.umass.edu> 4136 4137 * except.c: Fix a comment typo. 4138 41392005-04-19 Julian Brown <julian@codesourcery.com> 4140 4141 * decl.c (finish_method): Revert patch from 2005-04-13 for breaking 4142 indirect dispatch with PIC. 4143 41442005-04-18 Andrew Haley <aph@redhat.com> 4145 4146 * java-except.h (struct eh_range.handler): Remove unused field. 4147 (handle_nested_ranges): Remove function declaration. 4148 (sanity_check_exception_range): Add function declaration. 4149 * verify.c (verify_jvm_instructions): Remove call to 4150 handle_nested_ranges. 4151 * verify-glue.c (verify_jvm_instructions_new): Call 4152 sanity_check_exception_range. 4153 * except.c (link_handler, eh_range_freelist, link_handler, 4154 handle_nested_ranges): Remove. 4155 (add_handler): Rewrite. 4156 (sanity_check_exception_range): New function. 4157 (print_ranges): New function. 4158 41592005-04-13 Julian Brown <julian@codesourcery.com> 4160 4161 * decl.c (finish_method): Give methods once-only linkage. 4162 41632005-04-11 Richard Sandiford <rsandifo@redhat.com> 4164 4165 * lang.opt: Refer to the GCC internals documentation instead of c.opt. 4166 41672005-04-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 4168 4169 * java-tree.h: Don't use PARAMS(). 4170 41712005-04-07 Per Bothner <per@bothner.com> 4172 4173 * class.c (push_class): By default, suppress debug output. 4174 (finish_class): Enable debug output for classes we're emitting. 4175 41762005-04-07 Andrew Haley <aph@redhat.com> 4177 4178 * gcj.texi: Correct gcj-dbtool instructions. 4179 41802005-04-04 Kazu Hirata <kazu@cs.umass.edu> 4181 4182 * gcj.texi: Fix a typo. 4183 * lang.c: Fix a comment typo. 4184 41852005-04-01 Thomas Fitzsimmons <fitzsim@redhat.com> 4186 4187 * gcj.texi (Invoking gij): Add descriptions of new -X options. 4188 Mention recognized-and-ignored compatibility options. 4189 (Memory allocation): Add descriptions of JvMalloc, JvRealloc and 4190 JvFree. 4191 (About CNI): Add Memory allocation section. 4192 41932005-04-01 Tom Tromey <tromey@redhat.com> 4194 4195 * decl.c (java_init_decl_processing): Fix types of 4196 _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject, 4197 _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray, 4198 _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ. 4199 42002005-03-31 Jan Hubicka <jh@suse.cz> 4201 4202 * Make-lang.in (class.o, decl.o): Depend on cgraph.h. 4203 * class.c: Include cgraph.h 4204 (make_local_functoin_alias): Mark aslias as needed. 4205 * resource.c: Include cgraph.h 4206 (compile_resource_data): Go via cgraph interface. 4207 42082005-03-30 Ian Lance Taylor <ian@airs.com> 4209 4210 * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL. 4211 42122005-03-30 Tom Tromey <tromey@redhat.com> 4213 4214 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where 4215 inner_class_info_index==0 or outer_class_info_index==0. 4216 42172005-03-29 Tom Tromey <tromey@redhat.com> 4218 4219 * gcj.texi (libgcj Runtime Properties): Document 4220 gnu.gcj.runtime.endorsed.dirs. 4221 42222005-03-24 Anthony Green <green@redhat.com> 4223 4224 * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to 4225 'gcj-dbtool -p'. 4226 42272005-03-23 Tom Tromey <tromey@redhat.com> 4228 4229 * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define. 4230 (parse_version): Use it. 4231 42322005-03-23 Joseph S. Myers <joseph@codesourcery.com> 4233 4234 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove. 4235 42362005-03-18 Andrew Haley <aph@redhat.com> 4237 4238 PR java/20522 4239 * decl.c (update_aliases): Don't update variables that are about 4240 to die. 4241 (maybe_poplevels): Add comment. 4242 42432005-03-17 Bryce McKinlay <mckinlay@redhat.com> 4244 4245 PR java/20502 4246 * jcf-parse.c (duplicate_class_warning): New function. 4247 (java_parse_file): Call duplicate_class_warning if 4248 CLASS_FROM_CURRENTLY_COMPILED_P is already set. 4249 (parse_zip_file_entries): Likewise. Also set 4250 CLASS_FROM_CURRENTLY_COMPILED_P. 4251 42522005-03-16 Andrew Haley <aph@redhat.com> 4253 4254 * expr.c (expand_java_arrayload): Don't generate a 4255 NullPointerException based on the type of the node. 4256 (build_java_array_length_access): Likewise. 4257 42582005-03-15 Zack Weinberg <zack@codesourcery.com> 4259 4260 * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi. 4261 42622005-03-11 Tom Tromey <tromey@redhat.com> 4263 4264 * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'. 4265 (libgcj Runtime Properties): Document the default .db. 4266 42672005-03-10 Ranjit Mathew <rmathew@hotmail.com> 4268 4269 PR java/20312 4270 * parse.y (checks_throws_clauses): Check exceptions list even when 4271 the base class does not come from a source file being compiled. 4272 (java_complete_lhs): Remove unused variable 'wfl'. 4273 42742005-03-09 Ranjit Mathew <rmathew@hotmail.com> 4275 4276 PR java/20338 4277 * decl.c (finish_method): Emit _Jv_InitClass for private static 4278 methods inside inner classes as well. 4279 42802005-03-08 Julian Brown <julian@codesourcery.com> 4281 * Revert patch from 2005-03-08 for causing bootstrap failure on 4282 ppc-darwin. 4283 42842005-03-08 Julian Brown <julian@codesourcery.com> 4285 4286 * decl.c (finish_method): Give methods once-only linkage. 4287 42882005-03-07 Ranjit Mathew <rmathew@hotmail.com> 4289 4290 * lang.c (flag_new_verifier): Enable by default, regardless of ABI. 4291 42922005-03-07 Bryce McKinlay <mckinlay@redhat.com> 4293 4294 * verify-glue.c (vfy_is_assignable_from): Perform static check using 4295 can_widen_reference_to if the C++ ABI is in use. 4296 (vfy_get_interface_count, vfy_get_interface): Remove unused functions. 4297 * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type, 4298 type_isresolved, init_state, set_pc, state_get_pc, 4299 _Jv_BytecodeVerifier): Clean up unused and disabled functions. 4300 (verify_fail): Report the current PC from the verifier context. 4301 (free_state): Remove #if 0 block to enable this function. 4302 (free_verifier_context): Call free_state on state_list iterator 4303 values before freeing them. 4304 * expr.c (pop_type_0): Pop correct type for error message when stack 4305 contains a multi-word type. 4306 43072005-03-07 Ranjit Mathew <rmathew@hotmail.com> 4308 4309 * expr.c (build_java_array_length_access): Remove !flag_new_verifier 4310 for known NULL array length access. 4311 43122005-03-07 Tom Tromey <tromey@redhat.com> 4313 4314 * gcj.texi (Invoking gcj-dbtool): Document '-f'. 4315 43162005-03-06 Kazu Hirata <kazu@cs.umass.edu> 4317 4318 * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h, 4319 typeck.c: Update copyright. 4320 43212005-03-06 Ranjit Mathew <rmathew@hotmail.com> 4322 4323 Remove xref code. 4324 * xref.c, xref.h: Remove file. 4325 * Make-lang.in (java/xref.o): Remove. 4326 * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration. 4327 * lang.c (flag_emit_xref): Remove definition. 4328 * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove. 4329 * typeck.c (convert): Remove use of do_not_fold. 4330 * parse.y (do_not_fold): Remove definition. 4331 (parser grammar): Remove xref code. 4332 (maybe_create_class_interface_decl, create_class): Likewise. 4333 (register_fields, method_header, finish_method_declaration): Likewise. 4334 (declare_local_variables, source_end_java_method): Likewise. 4335 (java_complete_expand_classes): Do not set do_not_fold. 4336 (java_complete_expand_method): Remove xref code. 4337 (java_expand_classes, resolve_field_access, patch_invoke): Likewise. 4338 (java_complete_tree, java_complete_lhs, patch_assignment): Likewise. 4339 (patch_binop, build_string_concatenation, patch_array_ref): Likewise. 4340 (patch_synchronized_statement, patch_throw_statement): Likewise. 4341 (maybe_build_class_init_for_field): Likewise. 4342 43432005-03-05 Kazu Hirata <kazu@cs.umass.edu> 4344 4345 * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P 4346 instead of IS_NON_TYPE_CODE_CLASS. 4347 43482005-03-04 Andrew Haley <aph@redhat.com> 4349 4350 PR java/18362 4351 * class.c (set_method_index): Don't set method_index if it is 4352 NULL_TREE. 4353 (layout_class_method): Don't complain about "non-static method foo 4354 overrides static method" in the case of indirect dispatch. 4355 43562005-03-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 4357 4358 * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic 4359 warning. 4360 * Make-lang.in: Don't elide warnings in jcf-io.c. 4361 43622005-03-01 Per Bothner <per@bothner.com> 4363 4364 PR java/8608 4365 * check-init.c (wfl): Remove static. 4366 (final_assign_error, check_init): Replace calls to parse_error_context 4367 by plain error. 4368 (check_init): Save, set, and restore input_location for each exp. 4369 43702005-03-01 Per Bothner <per@bothner.com> 4371 4372 * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45) 4373 if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined. 4374 * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents. 4375 43762005-03-01 Per Bothner <per@bothner.com> 4377 4378 * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro. 4379 43802005-02-23 Thomas Fitzsimmons <fitzsim@redhat.com> 4381 4382 PR libgcj/16923 4383 * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and 4384 JvVMOption. 4385 43862005-02-22 Tom Tromey <tromey@redhat.com> 4387 4388 PR java/20056: 4389 * verify-impl.c (EITHER): New define. 4390 (types_compatible): Handle it. 4391 (check_field_constant): Use it. 4392 43932005-02-18 Tom Tromey <tromey@redhat.com> 4394 4395 PR java/20056: 4396 * verify-impl.c (types_equal): Fixed test. 4397 4398 PR java/20056: 4399 * verify-glue.c (vfy_class_has_field): New function. 4400 * verify.h (vfy_class_has_field): Declare. 4401 * verify-impl.c (check_field_constant): Added 'putfield' 4402 argument. 4403 (verify_instructions_0): Updated. 4404 (types_equal): New function. 4405 44062005-02-14 Tom Tromey <tromey@redhat.com> 4407 4408 PR java/19921: 4409 * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the 4410 stack effect of multianewarray. 4411 44122005-02-14 Andrew Haley <aph@redhat.com> 4413 4414 PR java/19907 4415 * expr.c (expand_byte_code): Call promote_arguments(). 4416 (promote_arguments): New function. 4417 * decl.c (check_local_unnamed_variable): Remove special case for 4418 new verifier. 4419 (find_local_variable): Promote all boolean types to int 4420 when searching for local variable decls. 4421 44222005-02-12 Kazu Hirata <kazu@cs.umass.edu> 4423 4424 * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c, 4425 parse-scan.y: Update copyright. 4426 44272005-02-11 Per Bothner <per@bothner.com> 4428 4429 PR java/15543 4430 * parse-scan.y (input_location): Remove variable. 4431 (main_input_filename): New - replaces input_filename, which isn't 4432 settable if USE_MAPPED_LOCATION. 4433 * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE, 4434 so we don't reference input_location or wfl_operator in that case. 4435 * jv-scan.c (expand_location): Remove - no longer used. 4436 (main): Set main_input_filename rather than input_filename. 4437 44382005-02-09 Richard Henderson <rth@redhat.com> 4439 4440 * builtins.c (initialize_builtins): Call build_common_builtin_nodes. 4441 * decl.c (java_init_decl_processing): Initialize const_ptr_type_node. 4442 44432005-02-08 Marcin Dalecki <martin@dalecki.de> 4444 4445 * expr.c (add_type_assertion): Use the proper enumeration type, 4446 since this is what htab_find_slot() is expecting. 4447 44482005-02-06 Joseph S. Myers <joseph@codesourcery.com> 4449 4450 * gcj.texi: Update copyright dates. 4451 44522005-02-02 Tom Tromey <tromey@redhat.com> 4453 4454 * gcj.texi (libgcj Runtime Properties): Default library_control 4455 to 'cache'. 4456 44572005-02-02 Ranjit Mathew <rmathew@hotmail.com> 4458 4459 PR java/15543 4460 * parse-scan.y (formal_parameter): Use $2 (type) instead of $$ 4461 (modifiers) when square brackets are present in a declaration for 4462 a final paramter. 4463 * jv-scan.c (main): Set input_filename and input_line. 4464 44652005-02-01 Tom Tromey <tromey@redhat.com> 4466 4467 PR java/19742: 4468 * gjavah.c (get_field_name): Don't override name for JNI header. 4469 44702005-02-01 Roger Sayle <roger@eyesopen.com> 4471 4472 * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR 4473 of unsigned types using iushr and lushr JVM bytecodes. 4474 44752005-02-01 Ranjit Mathew <rmathew@hotmail.com> 4476 4477 PR java/19738 4478 * gjavah.c (jni_print_float): Do not emit floating-point 4479 initialiser for a static final field. 4480 (jni_print_double): Likewise. 4481 44822005-02-01 Mark Mitchell <mark@codesourcery.com> 4483 4484 Revert: 4485 2005-01-31 Mark Mitchell <mark@codesourcery.com> 4486 * gjavah.c (print_field_info): Mark static data members of 4487 floating-point type with "__extension__". 4488 44892005-01-31 Mark Mitchell <mark@codesourcery.com> 4490 4491 * gjavah.c (print_field_info): Mark static data members of 4492 floating-point type with "__extension__". 4493 44942005-02-01 Ranjit Mathew <rmathew@hotmail.com> 4495 4496 PR java/9157 4497 * parse.y (build_string_concatenation): Remove redundant if. 4498 (patch_conditional_expr): Attempt to patch_string() the condition 4499 of a ?: as well, in addition to its other operands. 4500 45012005-01-25 Tom Tromey <tromey@redhat.com> 4502 4503 * Make-lang.in (java/java-tree-inline.o): Removed. 4504 45052005-01-25 Ranjit Mathew <rmathew@hotmail.com> 4506 4507 PR java/19070 4508 * parse.y (patch_binop): Allow comparisons against NULL only 4509 if the other operand is of a reference type. 4510 45112005-01-24 Tom Tromey <tromey@redhat.com> 4512 4513 * java-tree.h (gcj_abi_version): Declare. 4514 * class.c (make_class_data): Push gcj_abi_version into "next" 4515 field. Renamed field. 4516 * decl.c (gcj_abi_version): New global. 4517 (parse_version): New function. 4518 (java_init_decl_processing): Call it. Renamed 'next' field. 4519 Include version.h. 4520 (GCJ_BINARYCOMPAT_ADDITION): New define. 4521 45222005-01-24 Roger Sayle <roger@eyesopen.com> 4523 4524 PR java/19295 4525 * jcf-write.c (generate_bytecode_insns): Conversions between 4526 integer types of the same precision shouldn't generate widening 4527 or narrowing conversion bytecodes. 4528 45292005-01-22 Kazu Hirata <kazu@cs.umass.edu> 4530 4531 * java-except.h, java-tree.h: Remove unused prototypes. 4532 45332005-01-20 Andrew Pinski <pinskia@gcc.gnu.org> 4534 4535 PR java/18091: 4536 * jcf-write.c (perform_relocations): Don't call memcpy if source 4537 and destination are the same. 4538 45392005-01-17 Tom Tromey <tromey@redhat.com> 4540 4541 * verify-impl.c (get_short): Sign extend. 4542 (get_int): Likewise. 4543 45442005-01-12 Ranjit Mathew <rmathew@hotmail.com> 4545 4546 * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT 4547 with TYPE_SIZE. 4548 45492005-01-10 Ranjit Mathew <rmathew@hotmail.com> 4550 4551 * verify.c: Revert to the version before the BC-ABI merge. 4552 45532005-01-10 Ranjit Mathew <rmathew@hotmail.com> 4554 4555 PR java/19277 4556 * check-init.c (check_init): Take care of references that do not 4557 have an explicit final variable declaration (e.g. array length 4558 access) for pre/post in/de-crement operators. 4559 45602005-01-08 Mark Wielaard <mark@klomp.org> 4561 4562 * parse.y (process_imports): Allocate (and free) original_name only 4563 when not already defined. 4564 * jcf-parse.c (read_class): Free results of find_class() and 4565 lrealpath(). 4566 (java_parse_file): Keep pointer to head of file_list and free when 4567 done. Free result of lrealpath(). 4568 45692005-01-05 Tom Tromey <tromey@redhat.com> 4570 4571 * gcj.texi (Standard Properties): java.ext.dirs is now used. 4572 45732004-12-20 Andrew Haley <aph@redhat.com> 4574 4575 * typeck.c: Use fold_convert for ints and booleans. 4576 45772004-12-17 Andrew Haley <aph@redhat.com> 4578 4579 PR java/18931 4580 * typeck.c (convert): Use a CONVERT_EXPR when converting to 4581 BOOLEAN_TYPE or CHAR_TYPE. 4582 (convert_to_boolean, convert_to_char) : Remove. 4583 * convert.h (convert_to_boolean, convert_to_char) : Remove. 4584 * expr.c (expand_load_internal): Do type conversion if type is not 4585 as required. 4586 45872004-12-13 Danny Smith <dannysmith@users.sourceforge.net> 4588 4589 PR target/18459 4590 * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION. 4591 Update comment. 4592 45932004-12-07 Andrew Haley <aph@redhat.com> 4594 4595 PR java/18811: 4596 * jcf-parse.c (load_class): Remove sanity test for missing inner 4597 class file. 4598 45992004-12-06 Tom Tromey <tromey@redhat.com> 4600 4601 * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool. 4602 (java.uninstall): Likewise. 4603 (java.maintainer-clean): Likewise. 4604 (.INTERMEDIATE): Likewise. 4605 (java.install-man): Likewise. 4606 (gcj-dbtool.pod): New target. 4607 * gcj.texi (Code Generation): Document -findirect-dispatch. 4608 (libgcj Runtime Properties): Document 4609 gnu.gcj.precompiled.db.path. 4610 (Top): Link to "Invoking gcj-dbtool". 4611 46122004-12-06 Tom Tromey <tromey@redhat.com> 4613 4614 PR java/14853: 4615 * java-tree.h (extract_field_decl): Declare. 4616 * parse.y (extract_field_decl): Renamed from 4617 strip_out_static_field_access_decl. No longer static. 4618 * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs. 4619 46202004-12-03 Tom Tromey <tromey@redhat.com> 4621 4622 * lang.c (flag_new_verifier): Define. 4623 (java_post_options): Set flag_new_verifier if indirect dispatch 4624 is being used. 4625 * lang.opt (fnew-verifier): Removed. 4626 46272004-12-03 Tom Tromey <tromey@redhat.com> 4628 4629 PR bootstrap/14614: 4630 * Make-lang.in (java.install-common): Only install transformed 4631 gcjh if gcj-cross exists. 4632 46332004-12-03 Andrew Haley <aph@redhat.com> 4634 4635 PR java/18812 4636 * except.c (link_handler): Patch 'outer' field of siblings of the 4637 range we're demoting. 4638 46392004-12-03 Andrew Haley <aph@redhat.com> 4640 4641 PR java/18697 4642 * class.c (layout_class_method): Don't fail to override a method 4643 simply because it has DECL_ARTIFICIAL set. 4644 46452004-12-02 Tom Tromey <tromey@redhat.com> 4646 4647 PR java/16675: 4648 * parse.y (craft_constructor): Special case null_pointer_node. 4649 46502004-12-02 Tom Tromey <tromey@redhat.com> 4651 4652 PR java/18741: 4653 * java-gimplify.c (java_gimplify_expr): Don't call 4654 SET_EXPR_LOCATION unless wrapped tree is an expression. 4655 46562004-11-27 Per Bothner <per@bothner.com> 4657 4658 * jcf-parse.c (set_source_filename): Improvement to Andrew's fix: 4659 Fix fencepost error in 'i', which got executed one too many times. 4660 Also, fold memcpy into explicit loop, as originally intended. 4661 Also, free temporary 'buf' which otherwise leaks. 4662 46632004-11-27 Per Bothner <per@bothner.com> 4664 4665 * expr.c (build_expr_wfl): Only declare last_file and last_filenode 4666 local static variables if not USE_MAPPED_LOCATION. 4667 46682004-11-27 Kazu Hirata <kazu@cs.umass.edu> 4669 4670 * class.c, decl.c, expr.c: Fix comment typos. 4671 46722004-11-26 Andrew Pinski <pinskia@physics.uc.edu> 4673 4674 PR java/18305 4675 * decl.c (end_java_method): Call 4676 attach_init_test_initialization_flags on all the init_decls. 4677 * parse.y (attach_init_test_initialization_flags): Move to ... 4678 * expr.c (attach_init_test_initialization_flags): here and 4679 support BIND_EXPR also. 4680 * java-tree.h (attach_init_test_initialization_flags): Prototype. 4681 * jcf-parse.c (parse_class_file): Don't disable class init 4682 optimization. 4683 46842004-11-25 Joseph S. Myers <joseph@codesourcery.com> 4685 4686 * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote 4687 in diagnostics. 4688 46892004-11-24 Richard Henderson <rth@redhat.com> 4690 4691 * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type, 4692 vfy_string_type, vfy_throwable_type): Use ANSI declaration form. 4693 46942004-11-24 Tom Tromey <tromey@redhat.com> 4695 4696 * verify.c (defer_merging): Don't use C++-style comment. 4697 * verify.h (java_opcode): Added java_opcode_end. 4698 * class.c (build_class_ref): Remove C++ comment and old FIXME. 4699 4700 * verify-impl.c (vfy_push_type): Removed bogus "return". 4701 (initialize_stack): Use vfy_alloc and vfy_free. 4702 (verify_instructions_0): Likewise. 4703 4704 * Merged gcj-abi-2-dev-branch to trunk. 4705 47062004-11-24 Andrew Haley <aph@redhat.com> 4707 4708 * jcf-parse.c (parse_class_file): Set file_start_location. 4709 47102004-11-10 Tom Tromey <tromey@redhat.com> 4711 4712 * class.c (make_field_value): Don't call build_static_field_ref. 4713 (build_static_field_ref): Don't emit direct references when using 4714 indirect dispatch. 4715 4716 * gcj.texi (Invoking gij): Document -verbose. Put -verbose and 4717 -verbose:class into man page synopsis. 4718 47192004-11-09 Tom Tromey <tromey@redhat.com> 4720 4721 * expr.c (build_java_arraystore_check): Still generate check if 4722 element type is itself an array. 4723 47242004-11-08 Tom Tromey <tromey@redhat.com> 4725 4726 * java-tree.h (soft_check_assignment_node): Removed. 4727 (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE. 4728 * decl.c (java_init_decl_processing): Don't initialize 4729 soft_check_assignment_node. 4730 47312004-11-05 Tom Tromey <tromey@redhat.com> 4732 4733 * class.c (layout_class_methods): Don't add Miranda methods when 4734 using indirect dispatch. 4735 47362004-11-05 Bryce McKinlay <mckinlay@redhat.com> 4737 4738 * class.c (make_class_data): Call emit_assertion_table to set the 4739 'assertion_table' field. 4740 (build_signature_for_libgcj): Move here from expr.c. 4741 (add_assertion_table_entry): New function. Callback for assertion 4742 hashtable traversal. 4743 (emit_assertion_table): New. Take class argument, and generate 4744 assertion table DECL based on the TYPE_ASSERTIONS hashtable. 4745 * decl.c (init_decl_processing): Define assertion_entry_type record. 4746 Push 'assertion_table' class field instead of 'verify'. 4747 * expr.c (type_assertion_eq): Compare 'assertion_code' field. 4748 (type_assertion_hash): Include 'assertion_code' in hash. 4749 (add_type_assertion): Rewritten. Take class and assertion_code 4750 arguments. Add assertions to the TYPE_ASSERTIONS hashtable. 4751 (can_widen_reference_to): Use new add_type_assertion() arguments. 4752 * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE, 4753 JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE. 4754 (verify_identifier_node): Removed. 4755 (assertion_entry_type, assertion_table_type): New. 4756 (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type 4757 assertion code definitions. 4758 (struct type_assertion): Add assertion_code. Rename 'source_type' and 4759 'target_type' to 'op1' and 'op2'. 4760 (add_type_assertion): Declare. 4761 (lang_printable_name_wls): Remove unused definition. 4762 * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion 4763 to emit runtime assertion. 4764 (vfy_note_stack_type): Clean up non-C90 declarations. 4765 (vfy_note_local_type): Likewise. 4766 * verify.h (vfy_is_assignable_from): Declare. 4767 * verify-impl.c (is_assignable_from_slow): Remove unused function. 4768 (ref_compatible): Rename arguments. Call vfy_is_assignable_from() 4769 instead of is_assignable_from_slow(). 4770 (types_compatible): Reinstate ref_compatible() call. 4771 47722004-11-04 Tom Tromey <tromey@redhat.com> 4773 4774 * class.c (build_static_field_ref): Reverted previous patch. 4775 4776 * class.c (build_static_field_ref): Don't emit direct references 4777 when using indirect dispatch. 4778 47792004-11-03 Tom Tromey <tromey@redhat.com> 4780 4781 * expr.c (expand_java_arrayload): Set lhs_type_node. 4782 (expand_java_arraystore): Set rhs_type_node. 4783 47842004-11-02 Tom Tromey <tromey@redhat.com> 4785 4786 * jcf-parse.c (compute_class_name): Use filename length from zip 4787 directory, not strlen. 4788 4789 * expr.c (expand_invoke): Mark new interface methods as abstract. 4790 47912004-11-01 Tom Tromey <tromey@redhat.com> 4792 4793 * verify-impl.c (push_jump): Removed check for uninitialized 4794 objects. 4795 (push_exception_jump): Likewise. 4796 (handle_ret_insn): Likewise. 4797 (handle_jsr_insn): Likewise. 4798 (state_check_no_uninitialized_objects): Removed. 4799 4800 * decl.c (check_local_unnamed_variable): Recognize 4801 promoted-to-int parameters when using the new verifier. 4802 * expr.c (expand_java_arraystore): Explicitly request array type 4803 when using new verifier. 4804 (expand_java_arrayload): Likewise. 4805 (invoke_build_dtable): Don't pass object_type_node as 4806 expression argument to build_java_indirect_ref. 4807 (build_java_check_indexed_type): Do nothing. 4808 (build_java_arraystore_check): Handle case where array doesn't 4809 have array type. 4810 (build_java_array_length_access): Likewise. 4811 (expand_invoke): Handle case where interface overrides a method 4812 from Object. 4813 (pop_type_0): Always succeed for reference types. 4814 (process_jvm_instruction): Don't pop a value in a dead 4815 exception handler. 4816 (pop_arguments): Convert arguments to correct types. 4817 48182004-10-29 Andrew Haley <aph@redhat.com> 4819 4820 * jcf-parse.c (give_name_to_class): Remove line that was 4821 incorrectly merged. 4822 48232004-10-29 Andrew Haley <aph@redhat.com> 4824 4825 * jcf-parse.c (set_source_filename): Add code to build new sfname. 4826 48272004-10-20 Andrew Haley <aph@redhat.com> 4828 4829 * decl.c (end_java_method): Don't expand if flag_syntax_only. 4830 48312004-10-26 Tom Tromey <tromey@redhat.com> 4832 4833 * verify.h (vfy_notify_verified): Removed. 4834 * verify-glue.c (vfy_notify_verified): Removed. 4835 48362004-10-26 Tom Tromey <tromey@redhat.com> 4837 4838 * verify-impl.c (debug_print_state): Declare `i' before code. 4839 (merge_types): Modify `t' when it is null_type. 4840 48412004-10-26 Tom Tromey <tromey@redhat.com> 4842 4843 * verify-impl.c (type_print): Renamed from print. Now static and 4844 takes an argument. 4845 (debug_print_state): Use type_print. 4846 48472004-10-25 Tom Tromey <tromey@redhat.com> 4848 4849 * expr.c (build_invokeinterface): Compute correct offset for 4850 index into interface methods. 4851 48522004-10-20 Tom Tromey <tromey@redhat.com> 4853 4854 * java-tree.h (verify_jvm_instructions_new): Declare. 4855 4856 * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1 4857 command line. 4858 4859 * verify-impl.c (verify_instructions): Correctly handle wide 4860 types on the stack. 4861 * verify-glue.c (vfy_get_class_name): Use DECL_NAME. 4862 (vfy_get_component_type): Strip pointer types. 4863 (vfy_find_class): Use get_type_from_signature. Strip pointer 4864 types. 4865 Include java-except.h. 4866 48672004-10-20 Bryce McKinlay <mckinlay@redhat.com> 4868 4869 * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t, 4870 vfy_push_type_t, set_variable, add_new_state, merge_into, 4871 handle_jsr_insn, branch_prepass, check_class_constant, 4872 check_wide_constant, get_one_type, compute_static_types, 4873 verify_instructions_0): Clean up C99 declarations after statements. 4874 48752004-10-20 Tom Tromey <tromey@redhat.com> 4876 4877 * verify-impl.c (merge_refs): Compare reference against iterator, 4878 not ref2. 4879 4880 * verify-glue.c (vfy_tag): Mask off resolved flag. 4881 48822004-10-19 Tom Tromey <tromey@redhat.com> 4883 4884 * verify-impl.c (verify_instructions): Call vfy_note_local_type. 4885 (init_state_with_stack): Initialize `this_type' in state. 4886 (verify_method): Use debug_print. 4887 * verify-glue.c (vfy_is_primitive): Removed debugging print. 4888 (vfy_note_stack_depth): Reverted last patch. 4889 (vfy_note_stack_type): Note pointer to Object, not Object. 4890 (vfy_note_local_type): Likewise. 4891 4892 * verify.h (vfy_note_instruction_seen): Declare. 4893 * verify-glue.c (verify_jvm_instructions_new): Set 4894 BCODE_EXCEPTION_TARGET on target instruction. 4895 (vfy_note_instruction_seen): New function. 4896 * verify-impl.c (FLAG_INSN_SEEN): New define. 4897 (verify_instructions_0): Set flag on instruction. Save state for 4898 PC=0 later. 4899 (verify_instructions): Call vfy_note_instruction_seen. 4900 4901 * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error. 4902 (verify_jvm_instructions_new): Call method_init_exceptions, 4903 add_handler, and handle_nested_ranges. 4904 * verify-impl.c (verify_method): Return 1 on success. 4905 (verify_instructions_0): Save the state at PC=0. 4906 4907 * verify-impl.c (init_type_from_class): Set is_resolved and 4908 ref_next on new ref_intersection. 4909 (init_type_from_string): Likewise. 4910 49112004-10-15 Bryce McKinlay <mckinlay@redhat.com> 4912 4913 * expr.c (expand_bytecode): Use verify_jvm_instructions_new 4914 if flag_new_verifier is set. 4915 * java-tree.h (flag_new_verifier): Declare. 4916 * lang.opt (fnew-verifier): New option. 4917 * verify-impl.c: Work around namespace pollution by undef'ing 4918 'current_class'. 4919 (struct verifier_context): Make 'bytecode' const. 4920 (verify_fail_pc): Pass -1 PC argument to vfy_fail. 4921 (types_compatible): For the BC-ABI, always consider reference types 4922 compatible. 4923 (check_class_constant): Use vfr->current_class. 4924 (check_constant): Likewise. 4925 (check_wide_constant): Likewise. 4926 (check_field_constant): Check for 'L' at start of type name. 4927 (get_one_type): Return pointer instead of type. Set type result in 4928 caller via passed type pointer. 4929 (compute_argument_types): Update to use new get_one_type arguments. 4930 (compute_return_type): Likewise. 4931 (make_verifier_context): New. Allocate and initialize 'vfr'. 4932 (free_verifier_context): New. Free 'vfr' and its contents. 4933 (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context 4934 and free_verifier_context. 4935 49362004-10-15 Tom Tromey <tromey@redhat.com> 4937 4938 * verify-glue.c (vfy_note_local_type): Mark argument as unused. 4939 * verify.h (vfy_fail): Fixed formatting. 4940 4941 * verify-impl.c (vfr): Fixed comment formatting. 4942 (collapse_type): New function. 4943 (verify_instructions): Notify compiler about type map. 4944 * verify.h (vfy_note_stack_depth): Updated. 4945 (vfy_note_stack_type): Likewise. 4946 (vfy_note_local_type): Likewise. 4947 (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type): 4948 Declare. 4949 * verify-glue.c (vfy_note_stack_depth): Correctly size type 4950 state. Added `method' argument. 4951 (vfy_note_stack_type): Renamed from vfy_note_type. Added `method' 4952 argument. 4953 (vfy_note_local_type): New function. 4954 (vfy_unsuitable_type): Likewise. 4955 (vfy_return_address_type): Likewise. 4956 (vfy_null_type): Likewise. 4957 4958 * verify.h (VFY_IN_GCC): Removed. 4959 (VFY_WANT_TYPEMAP): Removed. 4960 * verify-impl.c (verify_instructions_0): Removed useless "\". 4961 (struct state) <next>: Uncomment. 4962 49632004-10-13 Bryce McKinlay <mckinlay@redhat.com> 4964 4965 * verify-impl.c: Formatting fixes. Reformat C++-style comments to 4966 C-style. 4967 49682004-10-06 Bryce McKinlay <mckinlay@redhat.com> 4969 4970 * Make-lang.in (verify.o): Re-enabled this target. 4971 * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED. 4972 (vfy_get_interface): Likewise. 4973 (verify_jvm_instructions_new): Renamed from verify_jvm_instructions. 4974 * verify.h (verify_jvm_instructions_new): Declare. 4975 * verify-impl.c (free_state): Temporarily comment out unused 4976 function. 4977 49782004-10-06 Tom Tromey <tromey@redhat.com> 4979 4980 * java-tree.h (JV_STATE_READ): New enum value. 4981 49822004-10-06 Bryce McKinlay <mckinlay@redhat.com> 4983 4984 * verify.h: New file. 4985 49862004-10-05 Bryce McKinlay <mckinlay@redhat.com> 4987 4988 * verify-impl.c, verify-glue.c, verify.h: New files. 4989 * Make-lang.in: Add rules for verify-impl.o and verify-glue.o. 4990 49912004-09-24 Andrew Haley <aph@redhat.com> 4992 4993 * decl.c (check_local_unnamed_variable): Always use the PARM_DECL 4994 for a slot if it's of pointer type. 4995 49962004-09-14 Tom Tromey <tromey@redhat.com> 4997 4998 * class.c (make_class_data): Correctly initialize "state" field. 4999 Initialize "engine" field. 5000 * decl.c (java_init_decl_processing): Add "engine" field. 5001 50022004-09-10 Andrew Haley <aph@redhat.com> 5003 5004 PR java/12760 5005 * expr.c (build_invokeinterface): Use fast method for interface 5006 dispatch. 5007 * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE, 5008 JTI_ITABLE_PTR_TYPE. 5009 (struct lang_type): Add itable_methods, itable_decl, itable_syms_decl. 5010 (emit_symbol_table): Add new arg, element_size. 5011 * decl.c (java_init_decl_processing): Initialize Class.itable. 5012 * class.c (GEN_TABLE): New macro. 5013 (gen_indirect_dispatch_tables): Use it. Add itable. 5014 (make_class_data): Add new arg for emit_symbol_table(). 5015 Emit itable. 5016 (add_miranda_methods): Make sure search_class has been parsed. 5017 (emit_symbol_table): Add new arg, element_size. 5018 50192004-09-06 Andrew Haley <aph@redhat.com> 5020 5021 * verify.c (merge_types): Return Object for all merges of 5022 interfaces. 5023 * expr.c (add_type_assertion): Don't generate assertions when 5024 source type is array of Object. 5025 50262004-09-03 Andrew Haley <aph@redhat.com> 5027 5028 * class.c (finish_class): Nullify TYPE_VERIFY_METHOD. 5029 5030 * lang.c (java_post_options): Force flag_verify_invocations if 5031 we're not using indirect dispatch. 5032 5033 * expr.c (pop_type_0): Move test for interfaces before call to 5034 can_widen_reference_to(). 5035 (build_signature_for_libgcj): Remove generation of canonical array 5036 type. 5037 (add_type_assertion): Canonicalize both arrays. 5038 Don't assert that type X can be assigned to Object. 5039 Don't assert that type X an be assigned to type X. 5040 Don't assert that Object can be assigned to type X. 5041 (can_widen_reference_to): Warn whenever we generate an assertion. 5042 (process_jvm_instruction): Use throwable_type_node for the type of 5043 an exception class. 5044 50452004-09-01 Andrew Haley <aph@redhat.com> 5046 5047 * decl.c (java_init_decl_processing): Change 5048 verify_identifier_node to "__verify". 5049 * expr.c (add_type_assertion): Use verify_identifier_node for name. 5050 * java-tree.h (verify_identifier_node): Change to "__verify". 5051 5052 * expr.c (build_signature_for_libgcj): New function. 5053 (add_type_assertion): Use it to construct signatures for 5054 source_type and target_type. 5055 50562004-08-27 Andrew Haley <aph@redhat.com> 5057 5058 * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE. 5059 (verify_identifier_node): New. 5060 (TYPE_VERIFY_METHOD): New. 5061 (struct type_assertion): New type. 5062 * expr.c (type_assertion_eq): New function. 5063 (type_assertion_hash): New function. 5064 (add_type_assertion): New function. 5065 (can_widen_reference_to): Call add_type_assertion(). 5066 * decl.c (java_init_decl_processing): Add verify_identifier_node. 5067 * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type). 5068 (finish_class): Output TYPE_VERIFY_METHOD (type). 5069 5070 * decl.c (end_java_method): Nullify unused fields. 5071 50722004-08-17 Andrew Haley <aph@redhat.com> 5073 5074 * verify.c (defer_merging): Quieten. 5075 * jcf-parse.c (load_class): Only try to open a class file if it's 5076 java.lang.Object or if it's part of the current compilation. 5077 Check that the class we just tried to load is the class we just 5078 loaded. Quieten. 5079 (java_parse_file): Set flag_verify_invocations off if we're 5080 compiling from .class. 5081 (parse_zip_file_entries): Abort if we try to read a dummy class. 5082 * expr.c (can_widen_reference_to): Quieten. 5083 (build_invokevirtual): Abort if we try to invokevirtual an 5084 interface. 5085 (expand_invoke): Don't build a non-interface call to an interface. 5086 (build_instanceof): Don't do premature optimization if 5087 flag_verify_invocations is not set. 5088 * class.c (set_super_info): Disable code that inherits TYPE_DUMMY 5089 from superclass. 5090 (build_static_field_ref): Add correct type conversion for 5091 field_address. 5092 (add_miranda_methods): Disable generation of Miranda methods for 5093 dummy classes. 5094 (layout_class_method): Don't complain about non-static method 5095 overrides static method with dummy classes. 5096 50972004-08-13 Tom Tromey <tromey@redhat.com> 5098 5099 * class.c (build_static_field_ref): Re-enable atable lookups for 5100 static fields. 5101 5102 * parse.y (strip_out_static_field_access_decl): Indentation fix. 5103 51042004-08-11 Tom Tromey <tromey@redhat.com> 5105 5106 * gcj.texi (libgcj Runtime Properties): Document new properties. 5107 51082004-08-06 Andrew Haley <aph@redhat.com> 5109 5110 * jcf-parse.c (load_class): Check that we really have loaded the 5111 class we're looking for. 5112 51132004-07-19 Andrew Haley <aph@redhat.com> 5114 5115 * verify.c (verify_jvm_instructions): Comment change only. 5116 5117 * typeck.c (build_java_array_type): Add size field to array name. 5118 5119 * java-tree.h (LOCAL_SLOT_P): New. 5120 (update_aliases): Add PC argument. 5121 (pushdecl_function_level): New function. 5122 5123 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL, 5124 MODIFY_EXPR, and SAVE_EXPR. 5125 (java_gimplify_modify_expr): New function. 5126 5127 * expr.c (push_type_0): Call find_stack_slot() to create temporary. 5128 (expand_iinc): Pass PC to update_aliases(). 5129 (STORE_INTERNAL): Likewise. 5130 (process_jvm_instruction): Likewise. 5131 5132 * decl.c (base_decl_map): New variable. 5133 (uniq): New variable. 5134 (update_aliases): Rewrite with more thorough checking. 5135 (debug_variable_p): New function. 5136 (push_jvm_slot): Don't initialize local variable. Don't pushdecl. 5137 (check_local_named_variable): Delete whole function. 5138 (initialize_local_variable): New function. 5139 (check_local_unnamed_variable): Add checks and comments. 5140 (find_local_variable): Rewrite. 5141 (java_replace_reference): New function. 5142 (function_binding_level): New variable. 5143 (pushdecl_function_level): New function. 5144 (maybe_pushlevels): Set DECL_LOCAL_END_PC. 5145 (maybe_pushlevels): Call pushdecl() on each of the new decls. 5146 (start_java_method): Reset uniq. Create base_decl_map. Set 5147 function_binding_level. 5148 (end_java_method): Null unused fields to save memory. 5149 51502004-06-29 Andrew Haley <aph@redhat.com> 5151 5152 * except.c (expand_start_java_handler): Push a new binding level. 5153 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call 5154 register_exception_range() to register where we'll do it. 5155 (expand_end_java_handler): Remove old bogus code. Replace with 5156 new logic that simply builds TRY_CATCH_EXPRs and inserts them at 5157 the top of the expression we're curently building. 5158 (maybe_end_try): Delete. 5159 * decl.c (binding_level.exception_range): New field. 5160 (clear_binding_level): Add field exception_range. Reformat. 5161 (poplevel): Call expand_end_java_handler(). 5162 (poplevel): Call java_add_stmt only if functionbody is false. 5163 (maybe_poplevels): Don't call maybe_end_try() from here. 5164 (end_java_method): Clear no longer used trees in function decl. 5165 (register_exception_range): New function. 5166 * java-tree.h (register_exception_range, struct eh_range): Declare. 5167 51682004-06-22 Andrew Haley <aph@redhat.com> 5169 5170 * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of 5171 the otable. 5172 * check-init.c (get_variable_decl): Teach check-init about 5173 FIELD_DECLs addressed via the otable. 5174 * jcf-parse.c (load_class): Check CLASS_LOADED_P, not 5175 CLASS_PARSED_P. 5176 51772004-05-28 Andrew Haley <aph@redhat.com> 5178 5179 * jcf-parse.c (load_class): Don't try to read a class that we've 5180 already read. 5181 5182 * expr.c (build_invokeinterface): Use the old-fashioned way of 5183 doing indirect dispatch: look up interfaces by name. 5184 * java-tree.h (enum java_tree_index): Add 5185 JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE 5186 * decl.c (java_init_decl_processing): Add 5187 soft_lookupinterfacemethodbyname_node. 5188 5189 * gjavah.c (print_method_info): Final methods have vtable entries, 5190 so gjavah needs to output them. 5191 * class.c (layout_class_method): Generate vtable entries for final 5192 methods. 5193 * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect 5194 dispatch, even if a method is final. 5195 51962004-05-25 Andrew Haley <aph@redhat.com> 5197 5198 * class.c (build_symbol_entry): Convert the names of constructors 5199 to init_identifier_node when generating an entry for the indirect 5200 dispatch table. 5201 5202 * expr.c (build_known_method_ref): Generate indirect calls for 5203 all methods marked DECL_EXTERNAL or TREE_PUBLIC. 5204 52052004-05-24 Andrew Haley <aph@redhat.com> 5206 5207 * expr.c (build_known_method_ref): Make sure ARRAY_REF access to 5208 atable element is of the right type. 5209 5210 * class.c (build_static_field_ref): Cast pointer to correct type 5211 for field. 5212 52132004-04-20 Bryce McKinlay <mckinlay@redhat.com> 5214 5215 * Merged with HEAD as of 20040514. Diff against 5216 gcj-abi-2-merge-20040514. 5217 52182004-04-16 Andrew Haley <aph@redhat.com> 5219 5220 * verify.c (check_pending_block): Disable subroutine checks. 5221 (defer_merging): New function. 5222 (merge_types): If types are dummy, use defer_merging to combine them. 5223 (verify_jvm_instructions): If invocation is invokeinterface and 5224 target is dummy, assume target really is an interface. 5225 5226 * parse.y (patch_invoke): Break out call to java_create_object. 5227 5228 * lang.c (flag_verify_invocations): New. 5229 5230 * jcf-parse.c (load_class): If we've already failed to load a 5231 class, don't try again. 5232 (load_class): If we can't find a .class file, don't fail, but emit 5233 a warning. 5234 (parse_class_file): Don't act on dummy methods. 5235 5236 * java-tree.h (flag_verify_invocations): New. 5237 (TYPE_DUMMY): New. 5238 (lang_type.dummy_class): New field. 5239 (java_create_object): New function. 5240 (METHOD_DUMMY): New. 5241 5242 * expr.c (build_field_ref): Widen field offset. 5243 (pop_type_0): If the type in stack_type_map is a TREE_LIST, check 5244 that each of its elements is compatible with the one we're 5245 popping. 5246 (pop_type_0): Issue a warning to say that we need to generate a 5247 runtime check. 5248 (java_create_object): New function. 5249 (build_field_ref): Only generate hard refs if we're not using 5250 indirect dispatch. 5251 (expand_java_field_op): If we're using !verify_invocations and we 5252 see a missing field, generate a decl for it. 5253 5254 (expand_invoke): If a class doesn't have the method we seek and 5255 we're using !flag_verify_invocations, generate a decl for the 5256 method now. 5257 5258 (build_known_method_ref): Always use indirect dispatch via the 5259 atable for static methods. 5260 5261 (expand_java_NEW): Break out object creation into new function, 5262 java_create_object. 5263 5264 (can_widen_reference_to): Issue a warning to say that we need to 5265 generate a runtime check. 5266 5267 * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass. 5268 (make_method_value): Also use index for interfaces. 5269 (make_class_data): Skip dummy field for inherited data. 5270 Don't build method array for dummy methods. 5271 Set size_in_byte to -1 when using inirect dispatch 5272 Don't build a hard class ref if we don't have a hard ref to our 5273 superclass, or if we're using inirect dispatch. 5274 Null out dispatch tables. 5275 5276 (layout_class_method): Don't complain about non-static method 5277 overrides static method is method is artificial. 5278 5279 (build_static_field_ref): Disable atable references to static 5280 fields for the time being. 5281 5282 (layout_class_methods): Check for CLASS_INTERFACE as 5283 well as CLASS_ABSTRACT. 5284 52852004-11-24 Steven Bosscher <stevenb@suse.de> 5286 5287 * class.c (make_class_data): Don't check flag_inline_functions. 5288 * lang.c (flag_really_inline): Remove unused flag. 5289 (java_handle_option): Don't set it here. Remove special handling 5290 of flag_inline_functions for Java. 5291 (java_init): Don't set flag_inline_trees here. Already done... 5292 (java_post_options): ...here. Don't clear flag_inline_functions. 5293 52942004-11-24 Steven Bosscher <stevenb@suse.de> 5295 5296 * java-gimplify.c (java_gimplify_labeled_block_expr): New function. 5297 (java_gimplify_exit_block_expr): New function. 5298 (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and 5299 LABELED_BLOCK_EXPR. 5300 * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def. 5301 (EXIT_BLOCK_EXPR): Likewise. 5302 * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h. 5303 (LABELED_BLOCK_BODY): Likewise. 5304 (EXIT_BLOCK_LABELED_BLOCK): Likewise. 5305 * jcf-write.c (generate_bytecode_insns): Don't handle the unused 5306 EXIT_BLOCK_RETURN operand. Use EXIT_BLOCK_LABELED_BLOCK instead of 5307 TREE_OPERAND. 5308 * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR. 5309 (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and 5310 EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND. Don't handle the 5311 second operand of EXIT_BLOCK_EXPR. 5312 * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of 5313 TREE_OPERAND. 5314 (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes. 5315 53162004-11-23 Ben Elliston <bje@au.ibm.com> 5317 5318 * xref.h (xref_flag_value): Remove. 5319 (xref_set_data, xref_get_data): Likewise. 5320 (xref_set_current_fp): Likewise. 5321 (XREF_NONE): Likewise. 5322 (XREF_GET_DATA): Likewise. 5323 * xref.c (xref_flag_value): Remove. 5324 (xref_set_data, xref_get_data): Likewise. 5325 (xref_set_current_fp): Likewise. 5326 53272004-11-23 Ben Elliston <bje@au.ibm.com> 5328 5329 * gjavah.c (output_directory): Make static. 5330 (temp_directory): Likewise. 5331 53322004-11-15 Tom Tromey <tromey@redhat.com> 5333 5334 * decl.c (instn_ptr_type_node): Removed. 5335 (lineNumbers_ptr_type_node): Removed. 5336 (jint_type): Removed. 5337 (jint_ptr_type): Removed. 5338 53392004-11-09 Andrew Pinski <pinskia@physics.uc.edu> 5340 5341 PR java/15576 5342 * check-init.c (check_init): Ignore DECL_EXPR. 5343 * expr.c (always_initialize_class_p): Reenable. 5344 (build_class_init): Use a variable to store the decl. Also use 5345 boolean_false_node instead of integer_zero_node. 5346 * parse.y (attach_init_test_initialization_flags): Add a decl_expr 5347 to the block. 5348 53492004-11-08 Tom Tromey <tromey@redhat.com> 5350 5351 PR java/16843: 5352 * gjavah.c (HANDLE_END_FIELD): Call print_field_info when 5353 generating a JNI header. 5354 (print_field_info): Handle JNI headers. 5355 (jni_print_float): Likewise. 5356 (jni_print_double): Likewise. 5357 53582004-11-08 Andrew Pinski <pinskia@physics.uc.edu> 5359 5360 * decl.c (end_java_method): Remove duplicated code. 5361 53622004-11-06 Zack Weinberg <zack@codesourcery.com> 5363 Gerald Pfeifer <gerald@pfeifer.com> 5364 5365 * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H 5366 as well. 5367 53682004-11-02 Bryce McKinlay <mckinlay@redhat.com> 5369 5370 PR java/17265 5371 * class.c: Reinstate 2004-08-18 patch. 5372 (make_local_function_alias): Don't create an alias for extern (native) 5373 functions. 5374 53752004-10-22 Eric Botcazou <ebotcazou@libertysurf.fr> 5376 5377 PR java/17265 5378 * class.c (make_local_function_alias): Revert 2004-08-18 change. 5379 (make_method_value): Likewise. 5380 53812004-10-21 Andrew Haley <aph@redhat.com> 5382 5383 PR java/18091: 5384 * jcf-parse.c (set_source_filename): Add code to build new sfname. 5385 53862004-10-20 Andrew Haley <aph@redhat.com> 5387 5388 * decl.c (end_java_method): Don't expand if flag_syntax_only. 5389 Remove duplicated code block. 5390 53912004-10-18 Steven Bosscher <stevenb@suse.de> 5392 5393 * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn): 5394 New rules to work around old Bison warnings. 5395 53962004-10-17 Steven Bosscher <stevenb@suse.de> 5397 5398 * class.c (ident_subst): Always alloca buffer. 5399 * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy 5400 opcode after including javaop.def. 5401 * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the 5402 conditional expression that exits, to avoid warnings. 5403 * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as 5404 a user of an extension. 5405 * win32-host.c: Move check down to have non-empty file when 5406 WIN32 is not defined. 5407 5408 * Make-lang.in (java-warn): Add STRICT_WARN. 5409 (java/jcf-io.o-warn): Don't have Werror for this file. 5410 * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use. 5411 54122004-10-16 Hans-Peter Nilsson <hp@bitrange.com> 5413 5414 * expr.c (expr_add_location): Move declaration to before all 5415 statements. 5416 * parse.y (java_expand_classes): Ditto. 5417 * lex.c (java_peek_unicode): Ditto. 5418 54192004-10-16 Ranjit Mathew <rmathew@hotmail.com> 5420 5421 * check-init.c: Use %<, %> and %q for quoting in diagnostics, 5422 if possible, else convert `foo' to 'foo'. 5423 * class.c: Likewise. 5424 * decl.c: Likewise. 5425 * expr.c: Likewise. 5426 * jcf-io.c: Likewise. 5427 * jcf-parse.c: Likewise. 5428 * lang.c: Likewise. 5429 * lex.c: Likewise. 5430 * parse.h: Likewise. 5431 54322004-10-16 Ranjit Mathew <rmathew@hotmail.com> 5433 5434 * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and 5435 rename parameter 'msg' to 'msgid' in function declaration. 5436 (issue_warning_error_from_context): Likewise. 5437 (yyerror): Rename parameter 'msg' to 'msgid'. 5438 (all over): Use new quoting style for diagnostics. 5439 54402004-10-15 Kazu Hirata <kazu@cs.umass.edu> 5441 5442 * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c, 5443 jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c: 5444 Update copyright. 5445 54462004-10-14 Matt Austern <austern@apple.com> 5447 5448 * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct 5449 pointer_set_t* now. 5450 54512004-10-13 Tom Tromey <tromey@redhat.com> 5452 5453 PR java/15578: 5454 * lang.opt (--extdirs): Document. 5455 * jvspec.c (lang_specific_driver): Recognize -encoding and 5456 -extdirs. 5457 54582004-10-06 Ulrich Weigand <uweigand@de.ibm.com> 5459 5460 * parse.y (issue_warning_error_from_context): Use va_list * 5461 instead of va_list parameter. 5462 (parse_error_context): Update call. 5463 (parse_warning_context): Likewise. 5464 54652004-10-05 Zack Weinberg <zack@codesourcery.com> 5466 5467 * parse.y, parse-scan.y: Add list of diagnostic messages to 5468 insulate translation template from version of yacc/bison used 5469 to compile the grammar. 5470 54712004-10-05 Ranjit Mathew <rmathew@hotmail.com> 5472 5473 Prepare for %q, %< and %> in diagnostic message strings. 5474 * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2. 5475 Name second parameter 'msgid'. 5476 * parse.y: Additionally include pretty-print.h and diagnostic.h. 5477 (issue_warning_error_from_context): Use pretty-printer functions 5478 instead of vsprintf for constructing formatted messages. Rename 5479 parameter 'msg' to 'msgid'. 5480 (parse_error_context): Rename parameter 'msg' to 'msgid'. 5481 (parse_warning_context): Likewise. 5482 54832004-10-05 Andrew Haley <aph@redhat.com> 5484 5485 PR java/17779 5486 * jcf-parse.c (parse_zip_file_entries): If a class has a 5487 superclass and a TYPE_SIZE of zero, lay it out. 5488 54892004-09-30 Andrew Haley <aph@redhat.com> 5490 5491 PR java/17733 5492 * jcf-parse.c (compute_class_name): Rewrite. 5493 54942004-10-01 Jan Hubicka <jh@suse.cz> 5495 5496 * java.c (java_expand_body): Update call of tree_rest_of_compilation. 5497 54982004-10-01 Kazu Hirata <kazu@cs.umass.edu> 5499 5500 * lex.c: Fix a comment typo. 5501 55022004-10-01 Kazu Hirata <kazu@cs.umass.edu> 5503 5504 * java-tree.h: Fix a comment typo. 5505 55062004-09-30 Per Bothner <per@bothner.com> 5507 5508 Simplify lexer. Implement --enable-mapped-location support. 5509 * jcf-parse.c (parse_class_file): Use linemap_line_start. 5510 (parse_source_file_1): Pass filename as extra parameter, so we can call 5511 linemap_add and set input_location here, rather than in both callers. 5512 (read_class): Pass copied filename to parse_source_file_1. 5513 Don't initialize wfl_operator - only needed for source compilation. 5514 (read_class, jcf_parse): Call linemap_add with LC_LEAVE. 5515 * lex.h: Remove a bunch of debugging macros. 5516 * lex.h (struct_java_line, struct java_error): Remove types. 5517 (JAVA_COLUMN_DELTA): Remove - use java_lexer.next_colums instead. 5518 (struct java_lc_s): Remove prev_col field. 5519 (struct java_lexer): New fields next_unicode, next_columns, and 5520 avail_unicode. New position field, and maybe token_start field. 5521 Don't need hit_eof field - use next_unicode == -1 instead. 5522 (JAVA_INTEGERAL_RANGE_ERROR): Rename to JAVA_RANGE_ERROR. 5523 (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR): Update accordingly. 5524 * parse.h: Various changes for USE_MAPPED_LOCATION. 5525 (EXPR_WFL_EMIT_LINE_NOTE): XXX 5526 (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros. 5527 (struct parser_ctxt): New file_start_location field. 5528 Remove p_line, c_line fields since we no longer save lines. 5529 Remove elc, lineno, and current_jcf fields - no longer used. 5530 * parse.y: Updates for USE_MAPPED_LOCATION and new lexer. 5531 Don't use EXPR_WFL_ADD_COL since that isn't trivial with 5532 source_location and is probably not needed anymore anyway. 5533 Use new expr_add_Location function. 5534 (SET_EXPR_LOCATION_FROM_TOKEN): New convenience macro. 5535 (java_pop_parser_context): Minor cleanup. 5536 (java_parser_context_save_global, java_parser_context_restore_global, 5537 java_pop_parser_context): Save/restore input_location as a unit. 5538 (issue_warning_error_from_context): If USE_MAPPED_LOCATION take 5539 a source_location instead of a wfl context node. 5540 (check_class_interface_creation): input_filename is not addressable. 5541 (create_artificial_method): Calling java_parser_context_save_global 5542 and java_parser_context_restore_global is overkill. Instead, 5543 temporarily set input_location from class decl. 5544 (java_layout_seen_class_methods): Set input_location from method decl. 5545 (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION. 5546 (finish_loop_body): Likewise. 5547 * lex.c: Updates for USE_MAPPED_LOCATION. Use build_unknwon_wfl. 5548 (java_sprint_unicode): Take a character, not index in line. 5549 (java_sneak_uncode): Replaced by java_peek_unicode. 5550 (java_unget_unicode): No longer used. 5551 (java_allocate_new_line. java_store_unicode): Removed, since we 5552 no longer remember "lines". 5553 (java_new_lexer): Update for new data structures. 5554 (java_read_char): Move unget_value checking to java_read_unicode. 5555 (java_get_unicode, java_peek_unicode, java_next_unicode): New more 5556 efficient functions that are used directly when lexing. 5557 (java_read_unicode_collapsing_terminators): No longer needed. 5558 (java_parse_end_comment, java_parse_escape_sequence, do_java_lex): 5559 Re-organize to use java_peek_unicode to avoid java_unget_unicode. 5560 (java_parse_escape_sequence): Rewrite to be simpler / more efficient. 5561 (do_java_lex): Lots of movings around to avoid java_unget_unicode, 5562 combine switch branches, and test for common token kinds earlier. 5563 (java_lex_error): Rewrite. 5564 * jv-scan.c (expand_location): New function, copied from tree.c. 5565 (main): Set ctxp->filename instead of setting input_filename directly. 5566 55672004-09-30 Per Bothner <per@bothner.com> 5568 5569 More cleanup for --enable-mapped-location. 5570 * class.c (push_class): If USE_MAPPED_LOCATION don't set 5571 input_location here. Instead do it in give_name_to_class. 5572 (build_class_ref): Set DECL_ARTIFICIAL, for the sake of dwarf2out. 5573 * expr.c (expand_byte_code): Call linemap_line_start. 5574 * expr.c (build_expr_wfl): If USE_MAPPED_LOCATION, change final 5575 parameters to a source_location. Don't need EXPR_WFL_FILENAME_NODE. 5576 (expr_add_location): New function, if USE_MAPPED_LOCATION. 5577 * class.c (maybe_layout_super_class): Adjust build_expr_wfl call 5578 to USE_MAPPED_LOCATION case. 5579 5580 * java-tree.h (JAVA_FILE_P, ZIP_FILE_P): Remove unused macros. 5581 * jcf-parse.c (java_parse_file): Don't set input_filename. 5582 Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames. 5583 Create a list of TRANSLATION_UNIT_DECL. 5584 (current_file_list): Is now a TRANSLATION_UNIT_DECL chain. The 5585 reason is so we can set a DECL_SOURCE_LOCATION for each file. 5586 (java_parse_file): Don't set unused ZIP_FILE_P, JAVA_FILE_P.. 5587 Create line-map LC_ENTER/LC_LEAVE entries for archive itself. 5588 (file_start_location): New static. 5589 (set_source_filename): Avoid extra access to input_filename macro. 5590 Concatenate new name with class's package prefix. 5591 (set_source_filename, give_name_to_class): Update. 5592 (give_name_to_class): Set class's "line 0" input_location here. 5593 (parse_class_file): Set input_location as a unit. 5594 5595 * jcf-parse.c (load_class): Sanity test if missing inner class file. 5596 55972004-09-29 Per Bothner <per@bothner.com> 5598 5599 * java-tree.h: Redefine some macros and add some declaration 5600 to handle the USE_MAPPED_LOCATION case. 5601 * parse.h (EXPR_WFL_QUALIFICATION): Use operand 1, not 2. 5602 * java-tree.h (EXPR_WFL_FILENAME_NODE): Use operand 2, not 1. 5603 * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in 5604 USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone. 5605 5606 * check-init.c (check_init): Handle USE_MAPPED_LOCATION case. 5607 * decl.c (finish_method, java_add_stmt): Likewise. 5608 * java-gimplify.c (java-gimplify.c): Likewise. 5609 * jcf-write.c (generate_bytecode_insns): Likewise. 5610 * lang.c (java_post_options): Likewise - call linemap_add. 5611 56122004-09-29 Andrew Haley <aph@redhat.com> 5613 5614 PR java/17007 5615 * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the 5616 result of TRUNC_MOD_EXPR. 5617 (patch_unaryop): Likewise for CONVERT_EXPR, which may throw. 5618 * decl.c (java_init_decl_processing): Mark 5619 soft_lookupinterfacemethod_node and soft_instanceof_node pure. 5620 56212004-09-28 Tom Tromey <tromey@redhat.com> 5622 5623 PR java/15710: 5624 * class.c (add_miranda_methods): Load superinterface if not 5625 already loaded. 5626 56272004-09-28 Andrew Haley <aph@redhat.com> 5628 5629 PR java/17586 5630 * jcf-parse.c (load_class): Don't try to read a class that we've 5631 already read. 5632 56332004-09-28 Andrew Haley <aph@redhat.com> 5634 5635 * jcf-parse.c (load_class): Back out previous broken patch. 5636 56372004-09-28 Andrew Haley <aph@redhat.com> 5638 5639 PR java/17586 5640 * jcf-parse.c (load_class): Don't try to read a class that we've 5641 already read. 5642 Check that we really did read the right class. 5643 56442004-09-25 Tom Tromey <tromey@redhat.com> 5645 5646 PR java/17500: 5647 * parse.y (create_artificial_method): Use add_method_1. 5648 56492004-09-25 Kazu Hirata <kazu@cs.umass.edu> 5650 5651 * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix 5652 comment typos. 5653 * gcj.texi: Fix typos. 5654 56552004-09-24 Tom Tromey <tromey@redhat.com> 5656 5657 PR java/15656: 5658 * parse.y (class_instance_creation_expression): Set `$$' to NULL 5659 in error parts of rule. 5660 (unary_expression): Don't call error_if_numeric_overflow when $1 5661 is NULL. 5662 56632004-09-24 Tom Tromey <tromey@redhat.com> 5664 5665 PR java/16789: 5666 * parse.y (resolve_qualified_expression_name): Set 5667 CAN_COMPLETE_NORMALLY on first call when chaining static calls. 5668 * expr.c (force_evaluation_order): Check for empty argument list 5669 after stripping COMPOUND_EXPR. 5670 56712004-09-23 Andrew Haley <aph@redhat.com> 5672 5673 PR java/16927: 5674 * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of 5675 COND_EXPRs. 5676 56772004-09-23 Tom Tromey <tromey@redhat.com> 5678 5679 PR java/17329: 5680 * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case 5681 where operand is null. 5682 56832004-09-23 Tom Tromey <tromey@redhat.com> 5684 5685 PR java/17380: 5686 * parse.y (not_accessible_p): Allow access to protected members 5687 even when class is not static. 5688 56892004-09-22 Kelley Cook <kcook@gcc.gnu.org> 5690 5691 * Make-lang.in: Revert the gcc-none.o change. 5692 56932004-09-22 Nathan Sidwell <nathan@codesourcery.com> 5694 5695 * parse.y (patch_anonymous_class): VEC_space returns true if there 5696 is space. 5697 56982004-09-21 Matt Austern <austern@apple.com> 5699 5700 Fix bootstrap. 5701 * gjavah.c (free_method_name_list): Fix function definition so 5702 it's a proper C prototype. 5703 57042004-09-21 Tom Tromey <tromey@redhat.com> 5705 5706 PR java/17575: 5707 * gjavah.c (free_method_name_list): New method. 5708 (main): Call it. 5709 57102004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com> 5711 Zack Weinberg <zack@codesourcery.com> 5712 5713 * java-tree.def: Use tree_code_class enumeration constants 5714 instead of code letters. 5715 * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for 5716 new tree-class enumeration constants. 5717 57182004-09-13 Tom Tromey <tromey@redhat.com> 5719 5720 PR java/17216: 5721 * class.c (layout_class_method): Put synthetic methods into the 5722 vtable. 5723 57242004-09-11 Andrew Pinski <apinski@apple.com> 5725 5726 * Make-lang.in (java/ggc-none.c): Change dependency 5727 for ggc.h into $(GGC_H). 5728 57292004-09-11 Mohan Embar <gnustuff@thisiscool.com> 5730 5731 * Make-lang.in (java/win32-host.o): Add dependency on 5732 coretypes.h. 5733 * win32-host.c: Add includes for coretypes.h, jcf.h 5734 57352004-09-11 Mohan Embar <gnustuff@thisiscool.com> 5736 5737 * Make-lang.in (GCJH_OBJS): Change dependency from 5738 ggc-none.o to java/ggc-none.o 5739 (JCFDUMP_OBJS): Likewise. 5740 (java/ggc-none.o): New target. 5741 57422004-08-25 Nathan Sidwell <nathan@codesourcery.com> 5743 5744 * boehm.c (get_boehm_type_descriptor): Adjust build_int_cst calls. 5745 * class.c (build_utf8_ref, build_static_field_ref, 5746 make_field_value, make_method_value, get_dispatch_table, 5747 make_class_data, emit_symbol_table, emit_catch_table): Likewise. 5748 * constants.c (get_tag_node, build_ref_from_constant_pool, 5749 build_constants_constructor): Likewise. 5750 * decl.c (java_init_decl_processing): Likewise. 5751 * expr.c (build_java_array_length_access, build_newarray, 5752 expand_java_multianewarray, expand_java_pushc, expand_iinc, 5753 build_java_binop, build_field_ref, expand_java_add_case, 5754 expand_java_call, build_known_method_ref, build_invokevirtual, 5755 build_invokeinterface, build_jni_stub): Likewise. 5756 * java-gimplify.c (java_gimplify_new_array_init): Likewise. 5757 * jcf-parse.c (get_constant): Likewise. 5758 * lex.c (do_java_lex): Likewise. 5759 * parse.y (patch_binop, patch_unaryop, patch_cast, 5760 build_newarray_node, patch_newarray): Likewise. 5761 * resource.c (compile_resource_data): Likewise. 5762 * typeck.c (build_prim_array_type): Likewise. 5763 57642004-08-24 Nathan Sidwell <nathan@codesourcery.com> 5765 5766 * decl.c (java_init_decl_processing): Adjust 5767 initialize_sizetypes call. 5768 57692004-08-23 Nathan Sidwell <nathan@codesourcery.com> 5770 5771 * jv-scan.c (fancy_abort): Add. 5772 57732004-08-20 Nathan Sidwell <nathan@codesourcery.com> 5774 5775 * expr.c (build_java_arrayaccess): Use convert to change 5776 len's type. 5777 57782004-08-19 Bryce McKinlay <mckinlay@redhat.com> 5779 5780 * class.c (make_local_function_alias): Allocate extra space for 'L' 5781 in name buffer. Reported by Thomas Neumann. 5782 57832004-08-19 Nathan Sidwell <nathan@codesourcery.com> 5784 5785 * parse.h (JAVA_RADIX10_FLAG): Rename to ... 5786 (JAVA_NOT_RADIX10_FLAG): ... here. Invert meaning. 5787 * lex.c (do_java_lex): Adjust. 5788 (error_if_numeric_overflow): Likewise. 5789 57902004-08-18 Andrew Pinski <apinski@apple.com> 5791 5792 * class.c (make_local_function_alias): Only make a new decl if we 5793 support alias attribute on all decls. 5794 57952004-08-18 Bryce McKinlay <mckinlay@redhat.com> 5796 5797 * class.c (make_local_function_alias): New function. Create local 5798 alias for public method DECL. 5799 (make_method_value): Use make_local_function_alias. 5800 * parse.y (craft_constructor): Don't special-case anonymous classes. 5801 Always set ctor_name to init_identifier_node. 5802 (lookup_method_invoke): Call layout_class_method when creating 5803 anonymous class constructor. 5804 58052004-08-18 Richard Henderson <rth@redhat.com> 5806 5807 * java-gimplify.c (java_gimplify_expr): Move '2' handling into 5808 default case. Treat '<' similarly. Update for 5809 is_gimple_formal_tmp_var name change. 5810 58112004-08-17 Andrew Haley <aph@redhat.com> 5812 5813 * lang.c (lang_printable_name): Obey verbose flag. 5814 * parse.y (constructor_circularity_msg): Set VERBOSE arg for 5815 lang_printable_name(). 5816 (verify_constructor_circularity, get_printable_method_name, 5817 check_abstract_method_definitions, java_check_regular_methods, 5818 java_check_abstract_methods, check_inner_class_access, 5819 fix_constructors, patch_method_invocation, patch_return): 5820 Likewise. 5821 * expr.c (pop_type_0): Likewise. 5822 5823 * java-tree.h (lang_printable_name_wls): Delete. 5824 58252004-08-16 Tom Tromey <tromey@redhat.com> 5826 5827 PR java/8473: 5828 * parse.y (primary): Changed for initialized and uninitialized 5829 array creations. 5830 (array_access): Handle array_creation_initialized. 5831 (array_creation_expression): Split into 5832 array_creation_initialized and array_creation_uninitialized. 5833 58342004-08-16 Andrew Haley <aph@redhat.com> 5835 5836 * jcf-write.c (find_constant_index): Canonicalize NaNs when 5837 generating bytecode. 5838 58392004-08-16 Elliot Lee <sopwith@redhat.com> 5840 5841 PR java/9677 5842 * jcf-parse.c (java_parse_file): Handle filenames with embedded 5843 spaces, and quoted filelists. 5844 58452004-08-15 Nathan Sidwell <nathan@codesourcery.com> 5846 5847 * boehm.c (get_boehm_type_descriptor): Use build_int_cst. 5848 * class.c (build_utf8_ref, build_static_field_ref, 5849 make_field_value, make_method_value, get_dispatch_table, 5850 make_class_data, emit_symbol_table, emit_catch_table): Likewise. 5851 * constants.c (get_tag_node, build_ref_from_constant_pool, 5852 build_constants_constructor): Likewise. 5853 * decl.c (java_init_decl_processing): Likewise. 5854 * expr.c (build_java_array_length_access, build_newarray, 5855 expand_java_multianewarray, expand_java_pushc, expand_iinc, 5856 build_java_binop, build_field_ref, expand_java_add_case, 5857 expand_java_call, build_known_method_ref, build_invokevirtual, 5858 build_invokeinterface, build_jni_stub): Likewise. 5859 * java-gimplify.c (java_gimplify_new_array_init): Likewise. 5860 * jcf-parse.c (get_constant): Likewise. 5861 * lex.c (do_java_lex): Likewise. 5862 * parse.y (patch_binop, patch_unaryop, patch_cast, 5863 build_null_of_type, patch_newarray): Likewise. 5864 * resource.c (compile_resource_data): Likewise. 5865 * typeck.c (build_prim_array_type): Likewise. 5866 58672004-08-10 Bryce McKinlay <mckinlay@redhat.com> 5868 5869 * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var. 5870 Don't create BLOCK here or call java_gimplify_block. 5871 58722004-08-09 H.J. Lu <hongjiu.lu@intel.com> 5873 5874 * java-tree.h (flag_deprecated): Removed. 5875 * lang.opt (Wdeprecated): Use existing Var(warn_deprecated). 5876 * parse.y (check_deprecation): Check warn_deprecated instead of 5877 flag_deprecated. 5878 58792004-08-06 Kelley Cook <kcook@gcc.gnu.org> 5880 5881 * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant, 5882 flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check, 5883 flag_hash_synchronization, flag_assert, flag_jni, flag_newer, 5884 flag_check_references, flag_extraneous_semicolon, flag_deprecated, 5885 flag_force_classes_archive_check, flag_optimize_sci, 5886 flag_indirect_dispatch): Remove explicit declarations. 5887 * lang.opt: Add implicit declare/define/assign. Remove obsolete 5888 final comment. 5889 58902004-08-05 Michael Chastain <mec.gnu@mindspring.com> 5891 5892 PR bootstrap/14893 5893 * Make-lang.in (java.install-man): Install from either build 5894 tree or source tree, whichever has the file first. 5895 58962004-08-05 Nathan Sidwell <nathan@codesourcery.com> 5897 5898 * jcf-parse.c (get_constant): Adjust force_fit_type call. 5899 * lex.h (SET_LVAL_NODE_TYPE): Remove. 5900 * lex.c (java_perform_atof): Use SET_LVAL_NODE directly. 5901 (do_java_lex): Likewise. Adjust force_fit_type call. 5902 59032004-08-04 Roger Sayle <roger@eyesopen.com> 5904 Andrew Haley <aph@redhat.com> 5905 5906 * typeck.c (convert_ieee_real_to_integer): Call fold on the range 5907 checking trees as they're being built. 5908 (convert): Call convert_ieee_real_to_integer if we're 5909 converting a constant, even if we're writing a class file. 5910 59112004-08-02 Bryce McKinlay <mckinlay@redhat.com> 5912 5913 PR java/16701 5914 * parse.y (fold_constant_for_init): Call resolve_field_access with 5915 correct current_class context. 5916 59172004-08-01 Roger Sayle <roger@eyesopen.com> 5918 5919 * decl.c (update_aliases, initialize_local_variable): Replace calls 5920 to build with calls to buildN. 5921 * java-gimplify.c (java_gimplify_modify_expr): Likewise. 5922 * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise. 5923 * parse.h (BUILD_THROW): Likewise. 5924 * parse.y (switch_expression, synchronized_statement, 5925 catch_clause_parameter, array_creation_expression, 5926 conditional_expression, make_qualified_name, 5927 resolve_qualified_expression_name, patch_method_invocation, 5928 patch_invoke, build_method_invocation, build_new_invocation, 5929 build_assignment, patch_assignment, build_binop, patch_binop, 5930 build_string_concatenation, build_incdec, patch_unaryop, 5931 patch_cast, build_array_ref, build_newarray_node, patch_newarray, 5932 patch_return, build_if_else_statement, build_labeled_block, 5933 build_new_loop, build_loop_body, build_bc_statement, 5934 build_assertion, encapsulate_with_try_catch, build_try_statement, 5935 build_try_finally_statement, patch_synchronized_statement, 5936 emit_test_initialization): Likewise, replace build with buildN. 5937 59382004-07-28 Eric Christopher <echristo@redhat.com> 5939 5940 * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete. 5941 (java_unsafe_for_reeval): Ditto. 5942 59432004-07-26 <hp@bitrange.com> 5944 5945 * parse.y (build_super_invocation): Adjust declaration order to 5946 avoid declaration after statement. 5947 59482004-07-25 Bernardo Innocenti <bernie@develer.com> 5949 5950 * decl.c: Rename all identifiers named `class' to `cl'. 5951 59522004-07-25 Richard Henderson <rth@redhat.com> 5953 5954 * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P. 5955 59562004-07-23 Mike Stump <mrs@apple.com> 5957 5958 * boehm.c (set_bit): Improve type safety wrt unsignedness. 5959 * gjavah.c (throwable_p, decode_signature_piece, 5960 print_full_cxx_name, print_include, add_namelet, add_class_decl, 5961 process_file): Likewise. 5962 * jcf-dump.c (main): Likewise. 5963 * jcf-io.c (read_zip_member): Likewise. 5964 * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant, 5965 give_name_to_class, get_class_constant): Likewise. 5966 * jcf-write.c (find_constant_wide, push_long_const, 5967 generate_classfile): Likewise. 5968 * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise. 5969 * parse.y (read_import_dir): Likewise. 5970 * typeck.c (parse_signature_type): Likewise. 5971 * verify.c (verify_jvm_instructions): Likewise. 5972 * zextract.c (find_zip_file_start, read_zip_archive): Likewise. 5973 59742004-07-23 Thomas Fitzsimmons <fitzsim@redhat.com> 5975 5976 * Make-lang.in: Replace rmic and rmiregistry references with 5977 grmic and grmiregistry. 5978 * gcj.texi: Likewise. 5979 59802004-07-20 Andrew Haley <aph@redhat.com> 5981 5982 PR java/16431. 5983 * verify.c (verify_jvm_instructions): Comment change only. 5984 5985 * typeck.c (build_java_array_type): Add size field to array name. 5986 5987 * java-tree.h (LOCAL_SLOT_P): New. 5988 (update_aliases): Add PC argument. 5989 (pushdecl_function_level): New function. 5990 5991 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL, 5992 MODIFY_EXPR, and SAVE_EXPR. 5993 (java_gimplify_modify_expr): New function. 5994 5995 * expr.c (push_type_0): Call find_stack_slot() to create temporary. 5996 (expand_iinc): Pass PC to update_aliases(). 5997 (STORE_INTERNAL): Likewise. 5998 (process_jvm_instruction): Likewise. 5999 6000 * decl.c (base_decl_map): New variable. 6001 (uniq): New variable. 6002 (update_aliases): Rewrite with more thorough checking. 6003 (debug_variable_p): New function. 6004 (push_jvm_slot): Don't initialize local variable. Don't pushdecl. 6005 (check_local_named_variable): Delete whole function. 6006 (initialize_local_variable): New function. 6007 (check_local_unnamed_variable): Add checks and comments. 6008 (find_local_variable): Rewrite. 6009 (java_replace_reference): New function. 6010 (function_binding_level): New variable. 6011 (pushdecl_function_level): New function. 6012 (maybe_pushlevels): Set DECL_LOCAL_END_PC. 6013 (maybe_pushlevels): Call pushdecl() on each of the new decls. 6014 (start_java_method): Reset uniq. Create base_decl_map. Set 6015 function_binding_level. 6016 (end_java_method): Null unused fields to save memory. 6017 60182004-07-20 Nathan Sidwell <nathan@codesourcery.com> 6019 6020 * class.c (add_interface_do): Remove. 6021 (set_super_info, interface_of_p, maybe_add_interface, 6022 add_interface, make_class_data, layout_class, 6023 add_miranda_methods): Adjust BINFO accessors and addition. 6024 * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO 6025 accessors. 6026 * jcf-write.c (generate_classfile): Likewise. 6027 * parse.y (patch_anonymous_class, check_inner_circular_reference, 6028 check_circular_reference, java_complete_class, 6029 check_abstract_method_definitions, 6030 java_check_abstract_method_definitions, 6031 check_interface_throws_clauses, java_check_abstract_methods, 6032 lookup_java_interface_method2, 6033 find_applicable_accessible_methods_list): Adjust BINFO accessors 6034 and addition. 6035 * typeck.c (find_method_in_interfaces): Adjust BINFO accessors. 6036 60372004-07-18 Roger Sayle <roger@eyesopen.com> 6038 6039 * builtins.c (max_builtin, min_builtin, 6040 java_build_function_call_expr): Replace calls to build with buildN. 6041 * class.c (build_class_ref, build_static_field_ref, 6042 get_dispatch_table, make_class_data, layout_class_method): Likewise. 6043 * constants.c (build_ref_from_constant_pool): Likewise. 6044 * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method, 6045 add_stmt_to_compound): Likewise. 6046 * except.c (build_exception_object_ref, expand_end_java_handler): 6047 Likewise. 6048 * java-gimplify.c (java_gimplify_case_expr, 6049 java_gimplify_default_expr, java_gimplify_block, 6050 java_gimplify_new_array_init, java_gimplify_try_expr): Likewise. 6051 * jcf-write.c (generate_bytecode_insns): Likewise. 6052 * typeck.c (convert_ieee_real_to_integer): Likewise. 6053 60542004-07-17 Joseph S. Myers <jsm@polyomino.org.uk> 6055 6056 * java-tree.h (builtin_function): Declare. 6057 60582004-07-16 Steven Bosscher <stevenb@suse.de> 6059 6060 * parse.y (java_complete_expand_methods, java_expand_classes): Don't 6061 abuse restore_line_number_status. 6062 60632004-07-15 Frank Ch. Eigler <fche@redhat.com> 6064 6065 g++/15861 6066 * jcf-parse.c (java_emit_static_constructor): Specify default 6067 priority. 6068 60692004-07-13 Per Bothner <per@bothner.com> 6070 6071 * java-tree.h (all_class_filename): Remove useless macro. 6072 (enum java_tree_index): Remove JTI_ALL_CLASS_FILENAME constant. 6073 (BUILD_FILENAME_IDENTIFIER_NODE): Remove useless macro. 6074 * parse.y (java_parser_context_restore_global): Replace 6075 BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier. 6076 * jcf-parse.c (read_class, java_parse_file): Likewise. 6077 60782004-07-12 Bryce McKinlay <mckinlay@redhat.com> 6079 6080 PR java/16474 6081 gjavah.c (print_field_info): Emit constant only if field is static. 6082 60832004-07-11 Roger Sayle <roger@eyesopen.com> 6084 6085 * expr.c (java_truthvalue_conversion, flush_quick_stack, 6086 java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr, 6087 build_java_ret, build_java_throw_out_of_bounds_exception, 6088 build_java_array_length_access, java_check_reference, 6089 build_java_arrayaccess, build_java_arraystore_check, build_newarray, 6090 build_anewarray, expand_java_multianewarray, expand_java_arraystore, 6091 expand_java_arrayload, build_java_monitor, expand_java_return, 6092 expand_load_internal, expand_java_NEW, build_get_class, 6093 build_instanceof, expand_java_CHECKCAST, expand_iinc, 6094 build_java_soft_divmod, build_java_binop, build_field_ref, 6095 expand_compare, expand_java_goto, expand_java_switch, 6096 expand_java_add_case, build_class_init, build_known_method_ref, 6097 invoke_build_dtable, build_invokevirtual, build_invokeinterface, 6098 expand_invoke, build_jni_stub, expand_java_field_op, 6099 java_expand_expr, expand_byte_code, STORE_INTERNAL, 6100 force_evaluation_order, emit_init_test_initialization): Convert 6101 calls to "build" into calls to the prefered "buildN" functions. 6102 61032004-07-11 Joseph S. Myers <jsm@polyomino.org.uk> 6104 6105 * java-tree.h (set_block): Remove. 6106 * lang.c (java_clear_binding_stack): New. 6107 (LANG_HOOKS_CLEAR_BINDING_STACK): Define. 6108 * decl.c (struct binding_level): Remove this_block. 6109 (clear_binding_level): Likewise. 6110 (poplevel): Don't handle this_block. 6111 (set_block): Remove. 6112 61132004-07-10 Bryce McKinlay <mckinlay@redhat.com> 6114 6115 * class.c (common_enclosing_context_p): Remove statement with no 6116 side-effects. 6117 61182004-07-09 Bryce McKinlay <mckinlay@redhat.com> 6119 6120 PR java/8618 6121 * parse.y (create_anonymous_class): Remove 'location' argument. Use 6122 the WFL from TYPE_NAME to get line number for the decl. Fix comment. 6123 (craft_constructor): Inherit access flags for implicit constructor 6124 from the enclosing class. 6125 (create_class): Fix comment typo. 6126 (resolve_qualified_expression_name): Pass type of qualifier to 6127 not_accessible_p, not the type in which target field was found. 6128 (not_accessible_p): Handle inner classes. Expand protected 6129 qualifier-subtype check to enclosing instances, but don't apply this 6130 check to static members. Allow protected access to inner classes 6131 of a subtype. Allow private access within common enclosing context. 6132 (build_super_invocation): Get WFL line number info from current 6133 class decl. 6134 (build_incomplete_class_ref): Update for new create_anonymous_class 6135 signature. 6136 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use 6137 common_enclosing_instance_p. 6138 * class.c (common_enclosing_context_p): New. Determine if types 6139 share a common enclosing context, even across static contexts. 6140 (common_enclosing_instance_p): Renamed from 6141 common_enclosing_context_p. Determines if types share a common 6142 non-static enclosing instance. 6143 * java-tree.h (common_enclosing_instance_p): Declare. 6144 * jcf-write.c (get_method_access_flags): New. Surpress private flag 6145 for inner class constructors. 6146 (generate_classfile): Use get_method_access_flags. 6147 61482004-07-09 Bryce McKinlay <mckinlay@redhat.com> 6149 6150 * class.c (interface_of_p): Check for null TYPE_BINFO. 6151 61522004-07-09 Nathan Sidwell <nathan@codesourcery.com> 6153 6154 * class.c (make_class): Do not create binfo here. 6155 (set_super_info): Create it here. 6156 * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo. 6157 61582004-07-08 Richard Henderson <rth@redhat.com> 6159 6160 * expr.c (case_identity, get_primitive_array_vtable, 6161 java_expand_expr, emit_init_test_initialization): Remove. 6162 * java-tree.h (java_expand_expr): Remove. 6163 * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove. 6164 61652004-07-07 Per Bothner <per@bothner.com> 6166 6167 * class.c (build_static_field_ref): Add a NOP_EXPR; otherwise we 6168 get internal error due to mismatched types. 6169 6170 * gcj.texi (Invoking gij): Document new -verbose:class flag. 6171 6172 * gcj.texi (Linking): New node. Document -lgij usage. 6173 61742004-07-07 Nathan Sidwell <nathan@codesourcery.com> 6175 6176 * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros. 6177 (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise. 6178 * java/class.c (set_super_info, class_depth, interface_of_p, 6179 maybe_add_interface, add_interface, make_class_data, 6180 layout_class, add_miranda_methods): Adjust BINFO macros. 6181 * expr.c (can_widen_reference_to, lookup_field): Likewise. 6182 * jcf-write.c (generate_classfile): Likewise. 6183 * parse.y (patch_anonymous_class, 6184 check_inner_circular_reference, check_circular_reference, 6185 java_complete_class, check_abstract_method_definitions, 6186 java_check_abstract_method_definitions, 6187 check_interface_throws_clauses, java_check_abstract_methods, 6188 lookup_java_interface_method2, 6189 find_applicable_accessible_methods_list): Likewise. 6190 * typeck.c (find_method_in_interface): Likewise. 6191 * verify.c (merge_types): Likewise. 6192 61932004-07-06 Nathan Sidwell <nathan@codesourcery.com> 6194 6195 * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1. 6196 * class.c (add_interface_do): Use BINFO_VIRTUAL_P. 6197 61982004-07-05 Nathan Sidwell <nathan@codesourcery.com> 6199 6200 * class.c (make_class): Use make_tree_binfo. 6201 (set_super_info, add_interface_do): Likewise. 6202 * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO. 6203 62042004-07-04 Ranjit Mathew <rmathew@hotmail.com> 6205 6206 * verify.c: Correct array element access formatting thinko. 6207 62082004-07-04 Ranjit Mathew <rmathew@hotmail.com> 6209 6210 * verify.c: Insert a short blurb at the start referring to the JVMS. 6211 (merge_type_state): Remove redundant nested if statement. 6212 (verify_jvm_instructions): Ensure current_subr is initialised to 6213 NULL_TREE. 6214 Minor formatting fixes all over the place. 6215 62162004-07-02 Richard Henderson <rth@redhat.com> 6217 6218 * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite. 6219 62202004-07-01 Richard Henderson <rth@redhat.com> 6221 6222 * class.c (registerClass_libfunc): Remove. 6223 (init_class_processing): Don't set it. 6224 (emit_register_classes): Take list_p parameter. Fill it in 6225 with _Jv_RegisterClass calls. 6226 * decl.c (java_init_decl_processing): Don't call 6227 init_resource_processing. 6228 * jcf-parse.c (java_emit_static_constructor): New. 6229 (java_parse_file): Call it. 6230 * resource.c (registerResource_libfunc): Remove. 6231 (init_resource_processing): Remove. 6232 (write_resource_constructor): Take list_p parameter. Fill it in 6233 with _Jv_RegisterResource calls. 6234 * java-tree.h: Update prototypes. 6235 62362004-06-29 Bryce McKinlay <mckinlay@redhat.com> 6237 6238 PR java/1262 6239 * class.c (layout_class_method): Do not override package-private 6240 method if its in a different package. 6241 (split_qualified_name): Move here from parse.y. Rename from 6242 breakdown_qualified. Add comment. 6243 (in_same_package): Move here from parse.y. Add comment. 6244 * java-tree.h (break_down_qualified, in_same_package): Declare. 6245 (in_same_package): Likewise. 6246 * parse.y (breakdown_qualified, in_same_package): Moved to class.c. 6247 Callers updated. 6248 62492004-06-29 Andrew Haley <aph@redhat.com> 6250 6251 * except.c (expand_start_java_handler): Push a new binding level. 6252 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call 6253 register_exception_range() to register where we'll do it. 6254 (expand_end_java_handler): Remove old bogus code. Replace with 6255 new logic that simply builds TRY_CATCH_EXPRs and inserts them at 6256 the top of the expression we're curently building. 6257 (maybe_end_try): Delete. 6258 * decl.c (binding_level.exception_range): New field. 6259 (clear_binding_level): Add field exception_range. Reformat. 6260 (poplevel): Call expand_end_java_handler(). 6261 (poplevel): Call java_add_stmt only if functionbody is false. 6262 (maybe_poplevels): Don't call maybe_end_try() from here. 6263 (end_java_method): Clear no longer used trees in function decl. 6264 (register_exception_range): New function. 6265 * java-tree.h (register_exception_range, struct eh_range): Declare. 6266 62672004-06-28 Bryce McKinlay <mckinlay@redhat.com> 6268 6269 * jcf-write.c (get_classfile_modifiers): Formatting fixes. 6270 62712004-06-27 Ranjit Mathew <rmathew@hotmail.com> 6272 6273 Formatting fixes. 6274 * expr.c (class_has_finalize_method): Fix method name indentation. 6275 (expand_java_call): Remove K&R style parameter declaration. 6276 (expand_invoke): Fix statement indentation. 6277 (expand_java_field_op): Likewise. 6278 * parse-scan.y: Fix typo. 6279 (reset_report): Fix method name indentation. 6280 * parse.y (unresolved_type_p, build_expr_block): Remove extra blank 6281 line. Fix typos. 6282 * verify.c (verify_jvm_instructions): Document parameters, insert 6283 page break. 6284 * lang.c (lang_init_source): Fix method name indentation. 6285 * class.c (common_enclosing_context_p): Likewise. 6286 (emit_symbol_table): Fix parameter list indentation. 6287 * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style 6288 parameter declaration. 6289 * constants.c: Fix copyright notice indentation. 6290 * typeck.c (find_method_in_superclasses): Fix parameter list 6291 indentation. 6292 (find_method_in_interfaces): Likewise. 6293 * zextract.c (makelong): Fix method name indentation. 6294 62952004-06-26 Bryce McKinlay <mckinlay@redhat.com> 6296 6297 PR java/15715. 6298 * parse.y (create_interface): Set correct access modifiers for 6299 interfaces. 6300 * jcf-write.c (get_classfile_modifiers): New function. 6301 (generate_classfile): Use get_classfile_modifiers, not 6302 get_access_flags. 6303 63042004-06-26 Bryce McKinlay <mckinlay@redhat.com> 6305 6306 * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super" 6307 dependency to current parser context, not NULL_TREE, for top-level 6308 classes. 6309 (jdep_resolve_class): Enable member access check for all inner 6310 class dependencies. 6311 63122004-06-26 Bryce McKinlay <mckinlay@redhat.com> 6313 6314 * parse.y (qualify_and_find): Pass type decl, not identifier, to 6315 load_class. 6316 63172004-06-26 Bryce McKinlay <mckinlay@redhat.com> 6318 6319 PR java/15734 6320 * expr.c (expand_java_field_op): Ensure that target class for static 6321 field access has been loaded. 6322 63232004-06-26 Bryce McKinlay <mckinlay@redhat.com> 6324 Ranjit Mathew <rmathew@hotmail.com> 6325 6326 PR java/1207, java/16178 6327 * jcf-parse.c (load_class): Return immediately if passed a type decl 6328 where CLASS_FROM_SOURCE_P is set. Remove FIXME. 6329 * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P 6330 before calling load_class. 6331 (qualify_and_find): Likewise. 6332 (find_in_imports_on_demand): Likewise. 6333 (find_applicable_accessible_methods_list): Likewise. 6334 63352004-06-24 Bryce McKinlay <mckinlay@redhat.com> 6336 6337 * parse.y (java_layout_seen_class_methods): Don't call load_class 6338 on class defined by source parser. 6339 63402004-06-23 Bryce McKinlay <mckinlay@redhat.com> 6341 6342 * parse.y (set_nested_class_simple_name_value): Removed. 6343 (java_complete_expand_class): Remove calls to 6344 set_nested_class_simple_name_value. 6345 63462004-06-22 Andrew Haley <aph@redhat.com> 6347 Ranjit Mathew <rmathew@hotmail.com> 6348 6349 Fixes PR java/16113. 6350 * decl.c (force_poplevels): Remove call to expand_end_bindings. 6351 63522004-06-22 Ranjit Mathew <rmathew@hotmail.com> 6353 6354 * parse.y (create_class): Correct diagnostic message about 6355 java.lang.Object extending anything else. 6356 63572004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 6358 6359 * class.c (build_class_ref): Add new operand for COMPONENT_REF. 6360 (build_static_field_ref): Likewise and add new operands for ARRAY_REF. 6361 * constants.c (build_ref_from_constant_pool): Likewise. 6362 * expr.c (build_java_array_length_access): Likewise. 6363 (build_get_class, build_field_ref, build_known_method_ref): Likewise. 6364 (invoke_build_dtable, build_invokevirtual): Likewise. 6365 (build_invokeinterface, java_expand_expr): Likewise. 6366 (emit_init_test_initialization): Likewise. 6367 * java-gimplify.c (java_gimplify_new_array_init): Likewise. 6368 * parse.y (make_qualifed_name, build_array_ref): Likewise. 6369 63702004-06-21 Andrew Haley <aph@redhat.com> 6371 6372 * java-gimplify.c (java_gimplify_block): set TREE_USED on the new 6373 block. 6374 63752004-06-21 Joseph S. Myers <jsm@polyomino.org.uk> 6376 6377 * jcf.h (struct JCF): Change java_source, right_zip and finished 6378 to unsigned int. 6379 * lex.h (struct java_lexer): Change hit_eof, read_anything, 6380 byte_swap and use_fallback to unsigned int. 6381 * parse.h (struct _jdep): Change flag0 to unsigned int. 6382 63832004-06-17 Ranjit Mathew <rmathew@hotmail.com> 6384 6385 Fixes PR java/13948 6386 * parse.y (java_layout_seen_class_methods): Ensure class is loaded 6387 before trying to lay out its methods. 6388 * jcf-parse.c (read_class): Track parsed files using canonical paths 6389 obtained via lrealpath from libiberty. 6390 (java_parse_file): Likewise. 6391 (parse_source_file_1): Rename formal parameter to reflect its 6392 modified purpose. Minor formatting fix. 6393 63942004-06-15 Paolo Bonzini <bonzini@gnu.org> 6395 6396 * class.c (emit_register_classes): Make the function uninlinable, 6397 do not set current_function_cannot_inline. 6398 * resource.c (write_resource_constructor): Do not reset 6399 flag_inline_functions around rest_of_compilation. 6400 64012004-06-08 Andrew Pinski <pinskia@physics.uc.edu> 6402 6403 PR java/15769 6404 * expr.c (java_truthvalue_conversion): Handle 6405 UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR, 6406 ORDERED_EXPR, and UNORDERED_EXPR as comparison operators, 6407 i.e. return the expression. 6408 64092004-06-03 Mark G. Adams <mark.g.adams@sympatico.ca> 6410 6411 * gjavah.c: Include version.h 6412 64132004-05-31 Bryce McKinlay <mckinlay@redhat.com> 6414 6415 * jcf-write.c (generate_bytecode_conditional): Correct handling 6416 of unordered conditionals. Add comment. 6417 64182004-05-29 Ranjit Mathew <rmathew@hotmail.com> 6419 Per Bothner <per@bothner.com> 6420 6421 * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a 6422 local variable was initialised upon declaration. 6423 * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if 6424 variable was final and initialised upon declaration. 6425 * check-init.c (check_final_reassigned): Give error only if a blank 6426 final is not definitely unassigned or if an initialised final is 6427 reassigned. 6428 (check_bool_init): Respect JLS2 16.1.7 requirements for boolean 6429 assignment expressions. Remove case MODIFY_EXPR, label do_default. 6430 (check_init): Perform initialised-variable-removing-optimisation 6431 only on non-final local variables. 6432 64332004-05-28 Bryce McKinlay <mckinlay@redhat.com> 6434 6435 * jcf-write.c (generate_bytecode_conditional): Handle binops 6436 UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, 6437 and LTGT_EXPR. 6438 (generate_bytecode_insns): Likewise. 6439 64402004-05-28 Bryce McKinlay <mckinlay@redhat.com> 6441 6442 * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR, 6443 UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR. 6444 64452004-05-28 Bryce McKinlay <mckinlay@redhat.com> 6446 6447 * gcj.texi (Object allocation): Remove _Jv_AllocBytes. 6448 (Mixing with C++): Document JvAllocBytes and RawDataManaged. 6449 64502004-05-26 Bryce McKinlay <mckinlay@redhat.com> 6451 6452 * decl.c (struct binding_level): Add GTY marker. Compile 6453 binding_depth unconditionally. 6454 (current_binding_level, free_binding_level, global_binding_level): 6455 Likewise. 6456 (clear_binding_level): Unconditionally set binding_depth. 6457 (make_binding_level): Use ggc_alloc_cleared, not xmalloc. 6458 64592004-05-26 Bryce McKinlay <mckinlay@redhat.com> 6460 6461 * lex.c (java_new_lexer): Set 'encoding'. 6462 (java_read_char): Improve error message for unrecognized characters. 6463 * lex.h (struct java_lexer): New field 'encoding'. 6464 64652004-05-23 Paolo Bonzini <bonzini@gnu.org> 6466 6467 * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o. 6468 64692004-05-21 Mark Wielaard <mark@klomp.org> 6470 6471 * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not 6472 extern. 6473 64742004-05-19 Paolo Bonzini <bonzini@gnu.org> 6475 6476 * typeck.c: Remove non-printable character 160. 6477 64782004-05-17 Ranjit Mathew <rmathew@hotmail.com> 6479 6480 * check-init.c: Correct minor typos. 6481 64822004-05-13 Diego Novillo <dnovillo@redhat.com> 6483 6484 * Make-lang.in, expr.c, java-gimplify.c: Rename 6485 tree-simple.[ch] to tree-gimple.[ch]. 6486 64872004-05-14 Ranjit Mathew <rmathew@hotmail.com> 6488 6489 * java-gimplify.c (java_gimplify_expr): Correct minor typos. 6490 64912004-05-13 Diego Novillo <dnovillo@redhat.com> 6492 6493 Merge from tree-ssa-20020619-branch. See 6494 ChangeLog.tree-ssa for details. 6495 6496 * Make-lang.in, builtins.c, check-init.c, class.c, 6497 constants.c, decl.c, except.c, expr.c, java-except.h, 6498 java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c, 6499 lang.c, lang.opt, parse.y, resource.c: Merged. 6500 * java-gimplify.c: New file. 6501 65022004-05-10 Andrew Haley <aph@redhat.com> 6503 6504 * parse.y (create_class): Set TYPE_VFIELD. 6505 * decl.c (java_init_decl_processing): Likewise. 6506 6507 * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment. 6508 * class.c (make_method_value): Replace DECL_VINDEX with call to 6509 get_method_index(). 6510 (get_dispatch_vector): Likewise. 6511 (layout_class_method): Likewise. 6512 Replace set of DECL_VINDEX with call to set_method_index(). 6513 (set_method_index): New function. 6514 (get_method_index): New function. 6515 * java-tree.h (set_method_index): New function decl. 6516 (get_method_index): New function decl. 6517 65182004-05-10 Andrew Pinski <pinskia@physics.uc.edu> 6519 6520 * parse.y (check_pkg_class_access): Add new argument 6521 and use it when cl is NULL to call lookup_cl on it. 6522 (parser_check_super_interface): Do not call lookup_cl. 6523 Pass this_decl to check_pkg_class_access and NULL 6524 instead of lookup_cl. 6525 (parser_check_super): Update for change in 6526 check_pkg_class_access. 6527 (do_resolve_class): Likewise. 6528 (process_imports): Likewise. 6529 (find_in_imports_on_demand): Likewise. 6530 (resolve_qualified_expression_name): Likewise. 6531 65322004-05-06 Ranjit Mathew <rmathew@hotmail.com> 6533 6534 Fixes PR java/9685, PR java/15073 6535 * parse.y (accessibility_string): New method. 6536 (not_accessible_field_error): Use accessibility_string() 6537 instead of java_accstring_lookup(). 6538 (resolve_qualified_expression_name): Check with 6539 check_pkg_class_access() before allowing access using 6540 qualified names. 6541 Fix comment typo. 6542 Use check_pkg_class_access() instead of not_accessible_p() 6543 for unqualified types. 6544 (not_accessible_p): Use DECL_CONTEXT (member) instead of 6545 REFERENCE for package-private access checking. 6546 (patch_method_invocation): Use accessibility_string() instead 6547 of java_accstring_lookup(). 6548 65492004-04-30 Ranjit Mathew <rmathew@hotmail.com> 6550 6551 Fixes PR java/15133 6552 * gjavah.c (struct method_name): Add member is_native. 6553 (overloaded_jni_method_exists_p): Match candidate method only if 6554 it is native. 6555 (print_method_info): Initialise is_native flag from the method's 6556 access flags. 6557 65582004-04-30 Roger Sayle <roger@eyesopen.com> 6559 6560 * builtins.c (java_builtins): Add acos, asin, ceil and floor. 6561 (initialize_builtins): Likewise, define acos, asin, ceil and floor. 6562 65632004-04-22 Roger Sayle <roger@eyesopen.com> 6564 6565 * resource.c (write_resource_constructor): Guard call to possibly 6566 NULL targetm.asm_out.constructor with targetm.have_ctors_dtors. 6567 65682004-04-19 Bryce McKinlay <mckinlay@redhat.com> 6569 6570 * class.c (make_class_data): Add new field aux_info. 6571 * decl.c (java_init_decl_processing): Push type and decl for 6572 `aux_info'. 6573 65742004-04-15 Bryce McKinlay <mckinlay@redhat.com> 6575 6576 * expr.c (expand_java_NEW): Don't use size argument for 6577 _Jv_AllocObject calls. 6578 * parse.y (patch_invoke): Likewise. 6579 65802004-04-12 Bryce McKinlay <mckinlay@redhat.com> 6581 6582 * expr.c (build_invokeinterface): Remove unused variables to 6583 fix warnings. 6584 65852004-04-12 Bryce McKinlay <mckinlay@redhat.com> 6586 6587 * class.c (get_interface_method_index): New function. Return dispatch 6588 index for interface method. 6589 (make_method_value): For interface methods, set index field to 6590 iface dispatch index, not DECL_VINDEX. 6591 * expr.c (build_invokeinterface): Use get_interface_method_index. 6592 65932004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 6594 6595 * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED. 6596 65972004-03-31 Andrew Haley <aph@redhat.com> 6598 6599 PR java/14104 6600 * jcf-io.c (opendir_in_zip): Tidy up error handling. 6601 66022004-03-30 Zack Weinberg <zack@codesourcery.com> 6603 6604 * builtins.c, expr.c, jcf.h, parse.h: Use new shorter 6605 form of GTY markers. 6606 66072004-03-25 Marcus Meissner <meissner@suse.de> 6608 6609 PR java/14689: 6610 * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir. 6611 66122004-03-23 Tom Tromey <tromey@redhat.com> 6613 6614 PR java/14315: 6615 * jcf-write.c (make_class_file_name): Don't report if mkdir 6616 failed with EEXIST. 6617 66182004-03-23 Tom Tromey <tromey@redhat.com> 6619 6620 * gcj.texi (Extensions): Document GCJ_PROPERTIES. 6621 66222004-03-20 Kazu Hirata <kazu@cs.umass.edu> 6623 6624 * class.c, gjavah.c, lang.c: Fix comment typos. 6625 * gcj.texi: Fix typos. 6626 66272004-03-19 Per Bothner <per@bothner.com> 6628 6629 * gcj.texi (Code Generation): Document new flags and assert defaults. 6630 6631 * class.c (assume_compiled_node_struct): Rename type to 6632 class_flag_node_struct, as it is now also used for enable_assertions. 6633 Rename assume_compiled_node typedef. Rename excludep field to value. 6634 (find_assume_compiled_node): Rename function to find_class_flag_node. 6635 Minor optimization - avoid needless strlen. 6636 (add_assume_compiled): Some tweaking and optimization. 6637 Rename and generalize to add_class_flag takem an extra parameter. 6638 (add_assume_compled): New just calls add_class_flag. 6639 (add_enable_assert, enable_assertions): New functions. 6640 (enable_assert_tree): New static. 6641 * java-tree.h (add_enable_assert, enable_assertions): New declarations. 6642 * lang.opt (fenable-assertions, fenable-assertions=, 6643 fdisable-assertions, fdisable-assertions=): New options. 6644 * lang.c (java_handle_option): Handle new options. 6645 * parse.y (build_incomplete_class_ref): Handle class$ in an inner 6646 class in an interface - create helper class nested in outer interface. 6647 (build_assertion): Short-circuit if enable_assertions is false. 6648 66492004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 6650 6651 * java-tree.h: Changes throughout to add checking to macros 6652 and numerous whitespace changes. 6653 (VAR_OR_FIELD_CHECK): New macro. 6654 * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC, 6655 FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL. 6656 66572004-03-16 Per Bothner <per@bothner.com> 6658 6659 * jcf-jump.c (options): New --print-constants option. 6660 * gcj.texi (Invoking jcf-dump): Document --print-constants. 6661 6662 * jcf-dump.c (flag_print_constant_pool): Default to off. 6663 (print_constant_terse_with_index): New helper function. 6664 (various places): Check flag_print_constant_pool where missing. 6665 (main): If verbose set flag_print_constant_pool. 6666 (HANDLE_INNERCLASSES_ATTRIBUTE): Null inner class name is anonymous. 6667 66682004-03-15 Andrew Haley <aph@redhat.com> 6669 6670 PR java/14581 6671 * parse.y (java_complete_lhs): Check that final variable has an 6672 initializer. 6673 66742004-03-12 Andrew Haley <aph@redhat.com> 6675 6676 PR java/14551 6677 * typeck.c (convert): Clear TREE_OVERFLOW after an integer 6678 conversion. 6679 66802004-02-29 Roger Sayle <roger@eyesopen.com> 6681 6682 * jcf-parse.c (java_parse_file): Handle the case that input_filename 6683 is NULL. 6684 66852004-02-27 Per Bothner <per@bothner.com> 6686 6687 * parse.y (build_assertion): Re-do 02-25 change following Jeff Sturm 6688 suggestion: Use build_incomplete_class_ref. 6689 This fixes PR java/13508, java/11714. 6690 66912004-02-27 Kazu Hirata <kazu@cs.umass.edu> 6692 6693 * java/parse.h: Update copyright. 6694 66952004-02-26 Andrew Haley <aph@redhat.com> 6696 6697 PR java/14231: 6698 * parse.y (check_interface_throws_clauses): Check for 6699 !METHOD_INVISIBLE (iface_method). 6700 * class.c (layout_class_methods): Check for CLASS_INTERFACE as 6701 well as CLASS_ABSTRACT. 6702 67032004-02-25 Per Bothner <per@bothner.com> 6704 6705 * parse.y (build_assertion): If we're in an inner class, create the 6706 class$ helper routine in the outer class. 6707 67082004-02-19 Richard Henderson <rth@redhat.com> 6709 6710 * parse.y (switch_label): Use make_node for DEFAULT_EXPR. 6711 67122004-02-16 Geoffrey Keating <geoffk@apple.com> 6713 6714 * Make-lang.in (java.install-man): Add extra dependencies. 6715 67162004-02-13 Geoffrey Keating <geoffk@apple.com> 6717 6718 * Make-lang.in: Install man pages under the same names 6719 (possibly transformed) as the program they document. 6720 67212004-02-10 Joseph S. Myers <jsm@polyomino.org.uk> 6722 6723 * gjavah.c: Include "intl.h". 6724 (error): New function. 6725 (main): Call gcc_init_libintl. 6726 (get_field_name, throwable_p, print_c_decl, print_full_cxx_name, 6727 print_stub_or_jni, process_file, main): Use error rather than 6728 fprintf. 6729 (print_method_info, usage, help, version, main): Mark strings for 6730 translation with _. Avoid splitting up sentences. Send 6731 information messages to stdout. 6732 * jcf-dump.c: Include "intl.h". 6733 (main): Call gcc_init_libintl. 6734 (process_class, usage, help, version, main, CHECK_PC_IN_RANGE): 6735 Mark error, usage and version messages for translation with _. 6736 Avoid splitting up sentences. 6737 * jv-scan.c: Include "intl.h". 6738 (fatal_error, warning): Change parameter s to msgid. Translate 6739 messages. 6740 (main): Call gcc_init_libintl. 6741 (usage, help, version): Mark error, usage and version messages for 6742 translation with _. Avoid splitting up sentences. 6743 * jvgenmain.c: Include "intl.h". 6744 (main): Call gcc_init_libintl. 6745 (usage, main): Mark error messages for translation with _. 6746 * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS, 6747 JVGENMAIN_OBJS): Add intl.o. 6748 (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o, 6749 java/jvgenmain.o): Update dependencies. 6750 67512004-02-08 Per Bothner <per@bothner.com> 6752 6753 * parse.y (resolve_qualified_expression_name): In case of inaccessible 6754 class don't use not_accessible_field_error, which can get confused. 6755 67562004-02-05 Kelley Cook <kcook@gcc.gnu.org> 6757 6758 Make-lang.in (po-generated): Delete. 6759 67602004-02-05 Kazu Hirata <kazu@cs.umass.edu> 6761 6762 * Make-lang.in (java/decl.o, java/expr.o, java/parse.o): 6763 Depend on target.h. 6764 * decl.c: Include target.h. 6765 (start_java_method): Replace PROMOTE_PROTOTYPES with 6766 targetm.calls.promote_prototypes. 6767 * expr.c: Include target.h. 6768 (pop_arguments): Replace PROMOTE_PROTOTYPES with 6769 targetm.calls.promote_prototypes. 6770 * parse.y: Include target.h. 6771 (start_complete_expand_method): Replace PROMOTE_PROTOTYPES 6772 with targetm.calls.promote_prototypes. 6773 67742004-02-04 Kazu Hirata <kazu@cs.umass.edu> 6775 6776 * typeck.c: Update copyright. 6777 67782004-02-02 Tom Tromey <tromey@redhat.com> 6779 6780 * decl.c (java_init_decl_processing): Remove duplicate 6781 gnu/gcj/RawData. 6782 67832004-01-30 Kelley Cook <kcook@gcc.gnu.org> 6784 6785 * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir). 6786 67872004-01-28 Andrew Pinski <pinskia@physics.uc.edu> 6788 6789 * expr.c (build_field_ref): Move variable 6790 definition up. 6791 67922004-01-28 Andrew Haley <aph@redhat.com> 6793 6794 * expr.c (build_field_ref): Widen field offset. 6795 67962004-01-27 Andrew Haley <aph@redhat.com> 6797 6798 java/13273 6799 * parse.y (check_interface_throws_clauses): Make sure class_decl 6800 has been loaded. 6801 68022004-01-22 Jeff Sturm <jsturm@one-point.com> 6803 6804 PR java/13733 6805 * parse.y (patch_assignment): Don't modify lhs_type for 6806 reference assignments. 6807 68082004-01-20 Kelley Cook <kcook@gcc.gnu.org> 6809 6810 * Make-lang.in: Replace $(docdir) with doc. 6811 (java.info, java.srcinfo, java.man, java.srcman): New rules. 6812 (java.install-man): Revamp rule. 6813 68142004-01-20 Kelley Cook <kcook@gcc.gnu.org> 6815 6816 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME, 6817 GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell) 6818 instead of deferred backquote. 6819 68202004-01-16 Andrew Pinski <pinskia@physics.uc.edu> 6821 6822 * typeck.c (find_method_in_interfaces): Move variable 6823 definition up. 6824 68252004-01-16 Andrew Haley <aph@redhat.com> 6826 6827 PR java/13273: 6828 * typeck.c (shallow_find_method): New. 6829 (find_method_in_superclasses): New. 6830 (find_method_in_interfaces): New. 6831 (lookup_do): Rewrite. 6832 * java-tree.h (SEARCH_ONLY_INTERFACE): Delete. 6833 6834 * jcf-parse.c (read_class): Save and restore output_class. 6835 * decl.c (java_expand_body): Set output_class from fndecl. 6836 68372004-01-15 Michael Chastain <mec.gnu@mindspring.com> 6838 6839 * class.c (gen_indirect_dispatch_tables): Fix string length 6840 calculations. 6841 68422004-01-15 Kelley Cook <kcook@gcc.gnu.org> 6843 6844 * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory. 6845 (java.srcextra): Copy above back to source directory if requested. 6846 (po-generated): Delete reference to $(parsedir). 6847 (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir). 6848 Use implicit rule. 6849 68502004-01-14 Jan Hubicka <jh@suse.cz> 6851 6852 * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost 6853 estimation. 6854 68552004-01-09 Mark Mitchell <mark@codesourcery.com> 6856 6857 * java-tree.h (java_expand_expr): Change prototype. 6858 * expr.c (java_expand_expr): Add alt_rtl parameter. 6859 68602004-01-09 Andrew Haley <aph@redhat.com> 6861 6862 PR java/12755: 6863 * parse.y (java_fix_constructors): Set output_class. 6864 (java_reorder_fields): Likewise. 6865 (java_layout_classes): Likewise. 6866 (java_expand_classes): Generate indirect dispatch tables. 6867 (java_expand_classes): Set output_class. 6868 (java_finish_classes): Likewise. 6869 * lang.c (java_init): Turn on always_initialize_class_p if we're 6870 using indirect dis[atch. 6871 (java_decl_ok_for_sibcall): Use output_class, not current_class. 6872 (java_get_callee_fndecl): Use class local atable. 6873 * jcf-parse.c 6874 (always_initialize_class_p): Decl moved to java-tree.h. 6875 (HANDLE_CLASS_INFO): Set output_class. 6876 (read_class): Likewise. 6877 (parse_class_file): Call gen_indirect_dispatch_tables. 6878 (parse_zip_file_entries): Set output_class. 6879 (java_parse_file): Set output_class. Don't emit symbol tables. 6880 * java-tree.h (output_class): New. 6881 Remove global declarations for otable, atable, and ctable. 6882 (always_initialize_class_p): moved here from decl.c. 6883 (DECL_OWNER): New. 6884 (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL, 6885 TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL, 6886 TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New. 6887 (struct lang_type): Add otable_methods, otable_decl, 6888 otable_syms_decl, atable_methods, atable_decl, atable_syms_decl, 6889 ctable_decl, catch_classes, type_to_runtime_map. 6890 * expr.c (build_field_ref): Make otable, atable, and ctable class 6891 local rather than global. 6892 (build_known_method_ref): Likewise. 6893 (build_invokeinterface): Likewise. 6894 (java_expand_expr): Pass runtime type (rather than actual type) to 6895 expand_start_catch. 6896 * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for 6897 this class. Look up each class in that map to delete duplicates. 6898 (expand_end_java_handler): Pass runtime type (rather than actual 6899 type) to expand_start_catch. 6900 * decl.c: (always_initialize_class_p): Decl moved to java-tree.h. 6901 (do_nothing): New. 6902 (java_init_decl_processing): Rearrange things. Remove global 6903 declarations of otable, atable, and ctable. 6904 (java_init_decl_processing): Make lang_eh_runtime_type do_nothing. 6905 (java_expand_body): Set output_class. 6906 * constants.c (build_constant_data_ref): Use output_class, not 6907 current_class. 6908 (alloc_name_constant): Likewise. 6909 * class.c (gen_indirect_dispatch_tables): New. 6910 (build_class_ref): Generate hard reference to superclass, even if 6911 using indirect dispatch. 6912 (build_static_field_ref): Use class local atable. 6913 (make_class_data): Generate hard reference to superclass, even if 6914 using indirect dispatch. 6915 Generate symbolic references to interfaces when using indirect 6916 dispatch. 6917 (make_class_data): Emit otable, atable, and ctable. 6918 Make otable, atable, and ctable class local rather than global. 6919 (emit_catch_table): Make otable, atable, and ctable class local 6920 rather than global. 6921 69222003-12-25 Andrew Pinski <pinskia@physics.uc.edu> 6923 6924 * parse.y (catch_clause_parameter): Fix typo. 6925 6926 PR java/13404 6927 * parse.y: (catch_clause_parameter): Return early if $3, aka 6928 formal_parameter, is null. 6929 69302003-12-20 Kazu Hirata <kazu@cs.umass.edu> 6931 6932 * class.c: Remove uses of "register" specifier in 6933 declarations of arguments and local variables. 6934 * decl.c: Likewise. 6935 * expr.c: Likewise. 6936 * gjavah.c: Likewise. 6937 * jcf-dump.c: Likewise. 6938 * jcf-io.c: Likewise. 6939 * jcf-parse.c: Likewise. 6940 * jcf-write.c: Likewise. 6941 * keyword.h: Likewise. 6942 * parse.y: Likewise. 6943 * typeck.c: Likewise. 6944 * verify.c: Likewise. 6945 69462003-12-06 Kelley Cook <kcook@gcc.gnu.org> 6947 6948 * Make-lang.in (GCJ_CROSS_NAME): Delete. 6949 (java.install_common, java.install-man): Adjust for above. 6950 (java.uninstall): Likewise. 6951 69522003-12-03 Michael Koch <konqueror@gmx.de> 6953 6954 * class.c (make_class_data): 6955 Push field value to 'hack_signers' instead of 'signers'. 6956 * decl.c (java_init_decl_processing): 6957 Push field 'hack_signers' instead of 'signers'. 6958 69592003-12-03 Zack Weinberg <zack@codesourcery.com> 6960 6961 * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before 6962 including iconv.h. 6963 69642003-12-03 Ralph Loader <rcl@ihug.co.nz> 6965 6966 PR java/12374: 6967 * parse.y (qualify_ambiguous_name): Remove lots of broken 6968 field access processing - there's no need to do that here, 6969 because we have resolve_field_access. Remove 6970 RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else. 6971 * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't 6972 used. 6973 69742003-12-01 Jeff Sturm <jsturm@one-point.com> 6975 6976 Fix PR java/13237 6977 * parse.y (java_complete_lhs): Save location prior to patching 6978 CALL_EXPR. 6979 69802003-11-25 Mohan Embar <gnustuff@thisiscool.com> 6981 6982 PR java/12548 6983 * resource.c (write_resource_constructor): Append 6984 "_resource" to constructor identifier name. 6985 69862003-11-25 Jeff Sturm <jsturm@one-point.com> 6987 6988 Fix PR java/13183. 6989 * constants.c (cpool_for_class): New function. 6990 (outgoing_cpool): Remove global variable. 6991 (alloc_name_constant): Use cpool_for_class. 6992 (build_constants_constructor): Likewise. 6993 * decl.c (java_expand_body): Set current_class. 6994 * java-tree.h (outgoing_cpool) Remove declaration. 6995 (init_outgoing_cpool): Likewise. 6996 * jcf-parse.c (init_outgoing_cpool): Remove function. 6997 (parse_class_file): Don't call init_outgoing_cpool. 6998 * parse.y (java_complete_expand_methods): Don't call 6999 init_outgoing_cpool. Don't save outgoing_cpool. 7000 (java_expand_classes): Don't restore outgoing_cpool. 7001 (java_finish_classes): Likewise. 7002 70032003-11-24 Mohan Embar <gnustuff@thisiscool.com> 7004 7005 * Make-lang.in: (java.install-common) Add 7006 symlink for $(target_noncanonical)-gcjh for 7007 native builds. 7008 70092003-11-20 Joseph S. Myers <jsm@polyomino.org.uk> 7010 7011 * Make-lang.in (java.extraclean): Delete. 7012 70132003-11-20 Joseph S. Myers <jsm@polyomino.org.uk> 7014 7015 * Make-lang.in (check-java): Add. 7016 70172003-11-19 Jeff Sturm <jsturm@one-point.com> 7018 7019 Fix PR java/13024. 7020 * except.c (prepare_eh_table_type): Allocate variable-sized 7021 buffer `buf' with alloca. 7022 70232003-11-17 Jeff Sturm <jsturm@one-point.com> 7024 7025 Fix PR java/12857. 7026 7027 decl.c (java_init_decl_processing): Don't initialize 7028 class_not_found_type_node, no_class_def_found_type_node. 7029 7030 java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE, 7031 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index. 7032 (class_not_found_type_node, no_class_def_found_type_node): 7033 Don't define. 7034 7035 parse.y (build_dot_class_method_invocation): Add this_class 7036 argument. Qualify method invocations to a different class. 7037 (create_new_parser_context): Initialize saved_data_ctx to 0. 7038 (java_parser_context_save_global): Initialize saved_data_ctx to 1. 7039 (build_dot_class_method): Don't load classes. Register 7040 incomplete types. 7041 (build_incomplete_class_ref): Special cases for interfaces 7042 and inner classes. Move build_dot_class_method call to here... 7043 (patch_incomplete_class_ref): ...from here. Pass current_class 7044 to build_dot_class_method_invocation. 7045 (build_assertion): Pass class_type to 7046 build_dot_class_method_invocation. 7047 (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node. 7048 70492003-11-17 Jeff Sturm <jsturm@one-point.com> 7050 7051 Fix PR java/12739. 7052 * java-tree.h (BLOCK_EMPTY_P): Define. 7053 * parse.y (java_complete_lhs): Check for empty blocks 7054 in TRY_FINALLY_EXPR case. 7055 70562003-11-17 Andrew Haley <aph@redhat.com> 7057 7058 * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New. 7059 (struct lang_decl_var:freed): New variable. 7060 * decl.c (poplevel): Mark local vars that have gone out of scope. 7061 (push_jvm_slot): Don't use the RTL of a var that has gone out of 7062 scope. 7063 70642003-11-16 Jason Merrill <jason@redhat.com> 7065 7066 * Make-lang.in (java.tags): Create TAGS.sub files in each directory 7067 and TAGS files that include them for each front end. 7068 70692003-11-15 Tom Tromey <tromey@redhat.com> 7070 7071 * gjavah.c (print_stub_or_jni): Pass `env' to FatalError. 7072 70732003-11-12 Jason Merrill <jason@redhat.com> 7074 7075 PR optimization/12547 7076 * lang.c (java_tree_inlining_walk_subtrees): Just walk 7077 BLOCK_EXPR_BODY directly. 7078 70792003-11-12 Andrew Haley <aph@redhat.com> 7080 7081 PR java/11045 7082 * parse.y (fold_constant_for_init): Check that we really do have a 7083 constant. 7084 7085 PR java/11533 7086 * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for 7087 init_test_decls being inlined. 7088 7089 PR java/12890: 7090 * parse.y (do_resolve_class): Check return value from 7091 breakdown_qualified(). 7092 70932003-11-11 Tom Tromey <tromey@redhat.com> 7094 7095 PR java/12915: 7096 * parse.y (merge_string_cste): Handle case where we have a 7097 pointer that happens to be zero, not null_pointer_node. 7098 70992003-11-10 Tom Tromey <tromey@redhat.com> 7100 7101 * jcf-parse.c (classify_zip_file): Correctly compare 7102 filename_length against length of manifest file's name. 7103 71042003-11-08 Tom Tromey <tromey@redhat.com> 7105 7106 PR java/12894: 7107 * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file. 7108 71092003-11-06 Andrew Haley <aph@redhat.com> 7110 7111 * expr.c (java_stack_swap): Make sure destination stack slots are 7112 of the correct type. 7113 71142003-11-03 Kelley Cook <kcook@gcc.gnu.org> 7115 7116 * Make-lang.in (dvi): Move targets to $(docobjdir). 7117 (gcj.dvi): Simplify rule and adjust target. 7118 (gcj.info): Simplify rule. 7119 (gcj.pod): New intermediate rule. 7120 (gcjh.pod): Likewise. 7121 (jv-scan.pod): Likewise. 7122 (jcf-dump.pod): Likewise. 7123 (gij.pod): Likewise. 7124 (jv-convert.pod): Likewise. 7125 (rmic.pod): Likewise. 7126 (rmiregistry.pod): Likewise. 7127 (gcj.1): Delete. 7128 (gcjh.1): Delete. 7129 (jv-scan.1): Delete. 7130 (jcf-dump.1): Delete. 7131 (gij.1): Delete. 7132 (jv-convert.1): Delete. 7133 (rmic.1): Delete. 7134 (rmiregistry.1): Delete. 7135 71362003-11-02 Jeff Sturm <jsturm@one-point.com> 7137 7138 Fixes PR java/12866. 7139 * parse.y (resolve_qualified_expression_name): Move test 7140 for outer field access methods from here... 7141 (check_thrown_exceptions) ...to here. 7142 71432003-11-01 Kelley Cook <kcook@gcc.gnu.org> 7144 7145 * .cvsignore: Delete. 7146 71472003-10-28 Frank Ch. Eigler <fche@redhat.com> 7148 7149 * verify.c (verify_jvm_instructions): Don't warn about legal 7150 eh binding regions generated for example by jdk 1.4.1. 7151 71522003-10-24 David S. Miller <davem@redhat.com> 7153 7154 * jcf-parse.c (jcf_parse): Fix args to fatal_error(). 7155 71562003-10-22 Andrew Haley <aph@redhat.com> 7157 7158 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New. 7159 (java_get_callee_fndecl): New. 7160 7161 * jcf-parse.c (java_parse_file): Call emit_catch_table(). 7162 7163 * java-tree.h (ctable_decl): New. 7164 (catch_classes): New. 7165 (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES. 7166 7167 * decl.c (java_init_decl_processing): Add catch_class_type. 7168 Add ctable_decl. 7169 Add catch_classes field. 7170 7171 * class.c (build_indirect_class_ref): Break out from 7172 build_class_ref. 7173 (make_field_value): Check flag_indirect_dispatch. 7174 (make_class_data): Ditto. 7175 Tidy uses of PUSH_FIELD_VALUE. 7176 Add field catch_classes. 7177 (make_catch_class_record): New. 7178 7179 * java-tree.h (PUSH_FIELD_VALUE): Tidy. 7180 71812003-10-22 Kazu Hirata <kazu@cs.umass.edu> 7182 7183 * jcf-write.c: Follow spelling conventions. 7184 * parse.y: Likewise. 7185 71862003-10-22 Kazu Hirata <kazu@cs.umass.edu> 7187 7188 * ChangeLog: Fix typos. 7189 * expr.c: Fix comment typos. 7190 * jcf-write.c: Likewise. 7191 * lang.c: Likewise. 7192 * lex.c: Likewise. 7193 * mangle.c: Likewise. 7194 * parse-scan.y: Likewise. 7195 * parse.y: Likewise. 7196 71972003-10-22 Tom Tromey <tromey@redhat.com> 7198 7199 * expr.c (expand_byte_code): Only warn about dead bytecode when 7200 extra_warnings is set. 7201 72022003-10-22 Bryce McKinlay <bryce@mckinlay.net.nz> 7203 7204 Fix for PR java/12586. 7205 * mangle.c (find_compression_record_match): Don't iterate through 7206 package namespace elements unless they all match compression_table 7207 entries. 7208 72092003-10-20 Kelley Cook <kcook@gcc.gnu.org> 7210 7211 * Make-lang.in (info): Honor $(parsedir) and $(docobjdir). 7212 (generate-manpages): Likewise. 7213 (java.maintainer-clean): Likewise. 7214 (gcj.info): Likewise. 7215 (gcj.1): Likewise. 7216 (gcjh.1): Likewise. 7217 (jv-scan.1): Likewise. 7218 (jcf-dump.1): Likewise. 7219 (gij.1): Likewise. 7220 (jv-convert.1): Likewise. 7221 (rmic.1): Likewise. 7222 (rmiregistry.1): Likewise. 7223 (java.install-man): Likewise. 7224 (parse-scan.o): Move and define complete compile line. 7225 (parse.o): Likewise. 7226 (jcf-tree-inline.o): Move. 7227 72282003-10-20 Mark Mitchell <mark@codesourcery.com> 7229 7230 * Make-lang.in (info): Update dependencies. 7231 (java.install-info): Remove. 7232 ($(srcdir)/java/gcj.info): Replace with ... 7233 ($(docobjdir)/gcj.info): ... this. 7234 72352003-10-14 Nathanael Nerode <neroden@gcc.gnu.org> 7236 7237 * Make-lang.in: Replace uses of $(target_alias) with 7238 $(target_noncanonical). 7239 72402003-10-09 Tom Tromey <tromey@redhat.com> 7241 7242 * decl.c (java_init_decl_processing): Declare signers field. 7243 * class.c (make_class_data): Set signers field. 7244 72452003-10-09 Jason Merrill <jason@redhat.com> 7246 7247 * parse.y (patch_assignment): Use make_node to create a BLOCK. 7248 * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a 7249 POINTER_TYPE. 7250 72512003-10-06 Mark Mitchell <mark@codesourcery.com> 7252 7253 * Make-lang.in (java.info): Replace with ... 7254 (info): ... this. 7255 (java.dvi): Replace with ... 7256 (dvi): ... this. 7257 (java.generated-manpages): Replace with ... 7258 72592003-10-03 Kelley Cook <kelleycook@wideopenwest.com> 7260 7261 * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros. 7262 72632003-10-01 Andrew Haley <aph@redhat.com> 7264 7265 * jcf-parse.c (java_parse_file): Write otable and atable. 7266 * java-tree.h (atable_methods): New. 7267 (atable_decl): New. 7268 (atable_syms_decl): New. 7269 (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL, 7270 JTI_ATABLE_SYMS_DECL. Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*. 7271 (symbol_*type): Rename method_symbol* to symbol*type. 7272 (emit_offset_symbol_table): Delete. 7273 (emit_symbol_table): New. 7274 (get_symbol_table_index): New. 7275 (atable_type): New. 7276 * expr.c (build_field_ref): Handle flag_indirect_dispatch. 7277 (build_known_method_ref): Likewise. 7278 (get_symbol_table_index): Rename from get_offset_table_index. 7279 Parameterize to allow re-use by differing types of symbol table. 7280 (build_invokevirtual): Pass table to get_offset_table_index. 7281 * decl.c (java_init_decl_processing): Push types and decls for 7282 atable and atable_syyms. 7283 * class.c (build_static_field_ref): Handle flag_indirect_dispatch. 7284 (make_class_data): Add new fields atable and atable_syms. 7285 (emit_symbol_table): Rename from emit_offset_symbol_table. 7286 Parameterize to allow re-use by different types of symbol table. 7287 (build_symbol_entry): Renamed from build_method_symbols_entry. 7288 72892003-09-30 Roger Sayle <roger@eyesopen.com> 7290 7291 * jcf-write.c (generate_bytecode_insns): Implement evaluate-once 7292 semantics for SAVE_EXPR, by caching the result in a temporary. 7293 72942003-09-28 Richard Henderson <rth@redhat.com> 7295 7296 * check-init.c (check_init): Save and restore input_location 7297 instead of file and line separately. 7298 * decl.c (java_expand_body): Likewise. 7299 * jcf-write.c (generate_bytecode_insns): Likewise. 7300 * parse.y (safe_layout_class): Likewise. 7301 * jcf-parse.c (read_class, parse_class_file): Likewise. 7302 (java_parse_file): Use %H for warning locator. 7303 73042003-09-28 Roger Sayle <roger@eyesopen.com> 7305 7306 * expr.c (java_check_reference): Use the semantics of COND_EXPRs 7307 with void-type branches instead of using a COMPOUND_EXPR. 7308 73092003-09-28 Jeff Sturm <jsturm@one-point.com> 7310 7311 * decl.c (java_optimize_inline, dump_function): Remove. 7312 * java-tree.h (java_optimize_inline): Remove declaration. 7313 * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set. 7314 * parse.y (source_end_java_method, java_expand_classes): 7315 Likewise. Remove dead code. 7316 73172003-09-27 Roger Sayle <roger@eyesopen.com> 7318 7319 * lang.c (java_init_options): Set flag_evaluation_order. 7320 * expr.c (force_evaluation_order): Don't attempt to force 7321 evaluation order of binary operations using save_expr. 7322 * parse.y (java_complete_lhs): No longer need to call 7323 force_evaluation_order when constructing binary operators. 7324 73252003-09-27 Alexandre Petit-Bianco <apbianco@redhat.com> 7326 Bryce McKinlay <bryce@mckinlay.net.nz> 7327 7328 PR java/1333: 7329 * parse.y (not_accessible_field_error): New function. 7330 (resolve_expression_name): Check field access permissions. 7331 (resolve_qualified_expression_name): Use 7332 not_accessible_field_error. 7333 (resolve_qualified_expression_name): Likewise. 7334 73352003-09-24 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> 7336 7337 * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value. 7338 73392003-09-23 Roger Sayle <roger@eyesopen.com> 7340 7341 * jcf-write.c (generate_bytecode_insns): Optimize binary operations 7342 with equal operands without side-effects. 7343 73442003-09-22 Jeff Sturm <jsturm@one-point.com> 7345 7346 * decl.c (java_init_decl_processing): Don't emit otable decls 7347 if flag_indirect_dispatch is not set. 7348 73492003-09-21 Richard Henderson <rth@redhat.com> 7350 7351 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y, 7352 resource.c: Revert. 7353 73542003-09-21 Richard Henderson <rth@redhat.com> 7355 7356 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y, 7357 resource.c: Update for DECL_SOURCE_LOCATION rename and change to const. 7358 73592003-09-20 Richard Henderson <rth@redhat.com> 7360 7361 * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics. 7362 73632003-09-18 Roger Sayle <roger@eyesopen.com> 7364 7365 * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case. 7366 * check-init.c (check_init): Likewise. 7367 73682003-09-18 Roger Sayle <roger@eyesopen.com> 7369 7370 * jcf-write.c (generate_bytecode_insns): Add support for fconst_2. 7371 73722003-09-16 Andrew Haley <aph@redhat.com> 7373 7374 * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR. 7375 73762003-09-17 Ranjit Mathew <rmathew@hotmail.com> 7377 7378 Fixes PR java/9577 7379 * mangle.c (find_compression_record_match): Skip 7380 over a "6JArray" (the array template mangled string) 7381 IDENTIFIER_NODE. 7382 (mangle_array_type): Correct minor typo. 7383 (atms): Move definition to the beginning. 7384 73852003-09-16 Bryce McKinlay <bryce@mckinlay.net.nz> 7386 7387 * class.c (add_miranda_methods): Ensure super-interfaces are laid 7388 out. Fix for PR java/12254. 7389 73902003-09-11 Richard Henderson <rth@redhat.com> 7391 7392 * parse.y (source_end_java_method): Update for new 7393 cgraph_finalize_function argument. 7394 73952003-09-09 Richard Henderson <rth@redhat.com> 7396 7397 * parse.y (source_end_java_method): Update call to 7398 cgraph_finalize_function. 7399 74002003-09-03 Jeff Sturm <jsturm@one-point.com> 7401 7402 * decl.c (java_expand_body): New function. 7403 * expr.c (build_class_init): Set DECL_IGNORED_P. 7404 * java-tree.h (start_complete_expand_method, 7405 java_expand_body): Declare. 7406 * jcf-parse.c (cgraph.h): Include. 7407 (java_parse_file): Handle flag_unit_at_a_time. 7408 * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING, 7409 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define. 7410 (java_estimate_num_insns): Use walk_tree_without_duplicates. 7411 (java_start_inlining): New function. 7412 * parse.h (java_finish_classes): Declare. 7413 * parse.y: Include cgraph.h. 7414 (block): Don't special-case empty block production. 7415 (craft_constructor): Set DECL_INLINE. 7416 (source_end_java_method): Handle flag_unit_at_a_time. 7417 Replace inline code with call to java_expand_body. 7418 (start_complete_expand_method): Remove static modifier. 7419 (java_expand_method_bodies): Patch function tree for 7420 class initialization and/or synchronization as needed. 7421 Don't begin RTL expansion yet. 7422 (java_expand_classes): Check flag_unit_at_a_time before 7423 calling finish_class. 7424 (java_finish_classes): New function. 7425 (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type. 7426 (patch_assignment): Set DECL_CONTEXT on temporary variable. 7427 (emit_test_initialization): Set DECL_IGNORED_P. 7428 74292003-09-03 Roger Sayle <roger@eyesopen.com> 7430 7431 * builtins.c (enum builtin_type): Delete unused enumeration. 7432 * Make-lang.in (java/builtins.o): Remove built-types.def dependency. 7433 74342003-08-28 Tom Tromey <tromey@redhat.com> 7435 7436 * gcj.texi (Extensions): Document gcjlib URLs. 7437 74382003-08-20 Tom Tromey <tromey@redhat.com> 7439 7440 * gcj.texi (Extensions): Added xref. 7441 (libgcj Runtime Properties): Document 7442 gnu.gcj.runtime.VMClassLoader.library_control. 7443 74442003-08-20 Andrew Haley <aph@redhat.com> 7445 7446 * except.c (prepare_eh_table_type): Use new encoding for exception 7447 handlers when using -fno-assume-compiled. 7448 74492003-08-13 Tom Tromey <tromey@redhat.com> 7450 7451 * gcj.texi (Invoking gij): Document -X and -?. 7452 74532003-08-13 Mohan Embar <gnustuff@thisiscool.com> 7454 7455 * Make-lang.in: Added missing win32-host.o to JAVA_OBJS, 7456 GCJH_OBJS, JCFDUMP_OBJS 7457 * win32-host.c: Removed the unnecessary and broken dependency 7458 on jcf.h 7459 74602003-08-11 Tom Tromey <tromey@redhat.com> 7461 7462 * parse.y (java_check_regular_methods): Typo fixes. Call 7463 check_interface_throws_clauses. Use 7464 check_concrete_throws_clauses. 7465 (check_interface_throws_clauses): New function. 7466 (check_concrete_throws_clauses): New function. 7467 (hack_is_accessible_p): New function. 7468 (find_most_specific_methods_list): Added FIXME. 7469 * typeck.c (lookup_do): Use `flags' argument to decide what to 7470 do. Reimplemented. 7471 (lookup_argument_method_generic): New function. 7472 (lookup_argument_method2): Removed. 7473 * jcf.h (ACC_INVISIBLE): New define. 7474 * jcf-write.c (generate_classfile): Skip invisible methods. 7475 * class.c (add_miranda_methods): New function. 7476 (layout_class_methods): Use it. 7477 (get_access_flags_from_decl): Use ACC_INVISIBLE. 7478 * java-tree.h (METHOD_INVISIBLE): New define. 7479 (lang_decl_func) [invisible]: New field. 7480 (lookup_argument_method_generic): Declare. 7481 (SEARCH_INTERFACE): New define. 7482 (SEARCH_SUPER): Likewise. 7483 (SEARCH_ONLY_INTERFACE): Likewise. 7484 (SEARCH_VISIBLE): Likewise. 7485 (lookup_argument_method2): Removed declaration. 7486 74872003-08-05 Tom Tromey <tromey@redhat.com> 7488 7489 Fix for PR java/11600: 7490 * parse.y (java_complete_lhs): See whether we're calling a method 7491 on an array. 7492 (check_thrown_exceptions): Added `is_array_call' argument; 7493 fixed `clone' checking; updated all callers. 7494 74952003-08-05 Steven Bosscher <steven@gcc.gnu.org> 7496 7497 * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h). 7498 74992003-08-03 Tom Tromey <tromey@redhat.com> 7500 7501 * java-tree.h (METHOD_TRANSIENT): Removed. 7502 * decl.c (pushdecl): Removed some dead code. 7503 * class.c (get_access_flags_from_decl): Can't have transient 7504 method. 7505 (add_method_1): Can't have a transient method. 7506 75072003-07-28 Andreas Jaeger <aj@suse.de> 7508 7509 * jvspec.c: Convert to ISO C90 prototypes. 7510 75112003-07-25 Nathan Sidwell <nathan@codesourcery.com> 7512 7513 * decl.c (force_poplevels): Fix warning call. 7514 75152003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net> 7516 7517 * expr.c (expand_java_field_op): Don't use xxx_with_decl 7518 (expand_java_field_op): Likewise. 7519 * class.c (layout_class_method): Likewise 7520 (emit_register_classes): Likewise. 7521 * decl.c (pushdecl): Likewise. 7522 (poplevel): Likewise. 7523 (force_poplevels): Likewise. 7524 (give_name_to_locals): Likewise. 7525 * check-init.c (check_for_initialization): Likewise. 7526 75272003-07-24 Jason Merrill <jason@redhat.com> 7528 7529 * java-tree.h: Move boolean_type_node et al to the back end. 7530 75312003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 7532 7533 * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary 7534 casts. 7535 75362003-07-19 Neil Booth <neil@daikokuya.co.uk> 7537 7538 * lang.opt: Don't show -MD_ and -MDD_. 7539 75402003-07-18 Neil Booth <neil@daikokuya.co.uk> 7541 7542 * lang-options.h: Remove. 7543 * lang.opt: Add help text. 7544 75452003-07-15 Kazu Hirata <kazu@cs.umass.edu> 7546 7547 * expr.c: Remove the last argument to expand_assignment(). 7548 75492003-07-09 Jan Hubicka <jh@suse.cz> 7550 7551 * java-tree.h (DECL_NUM_STMTS): Rename to... 7552 (DECL_ESTIMATED_INSNS): ... this. 7553 * lang.c (java_estimate_num_insns, java_estimate_num_insns_1): 7554 New static functions. 7555 (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define. 7556 * parser.y (add_stmt_to_compound): Do not account statements. 7557 75582003-07-08 Mark Wielaard <mark@klomp.org> 7559 7560 * gcj.texi: CNI now expands to Compiled Native Interface. 7561 75622003-07-08 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> 7563 7564 * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND. 7565 75662003-07-07 Nathan Sidwell <nathan@codesourcery.com> 7567 7568 * expr.c (expand_byte_code): Adjist emit_line_note call. 7569 75702003-07-06 Neil Booth <neil@daikokuya.co.uk> 7571 7572 * lang.c (java_handle_option): Don't handle filenames. 7573 75742003-07-02 Zack Weinberg <zack@codesourcery.com> 7575 7576 * jcf-path.c: Don't default-define PATH_SEPARATOR nor 7577 DIR_SEPARATOR. 7578 Use FILENAME_CMP. 7579 * jcf-write.c: Don't default-define DIR_SEPARATOR. 7580 * jcf.h: Delete COMPARE_FILENAMES definition. 7581 75822003-07-02 Neil Booth <neil@daikokuya.co.uk> 7583 7584 * lang.c (java_init_options): Update prototype. 7585 75862003-07-01 Nathan Sidwell <nathan@codesourcery.com> 7587 7588 * decl.c (poplevel): Adjust define_label call. 7589 75902003-06-27 Zack Weinberg <zack@codesourcery.com> 7591 7592 * gjavah.c (flag_jni): Make non-static. 7593 * parse-scan.y (ctxp): Make non-static. 7594 7595 * class.c (build_method_symbols_entry) 7596 * expr.c (get_offset_table_index) 7597 * jcf-parse.c (jcf_parse): 7598 Mark the definition static, matching the forward declaration. 7599 76002003-06-26 Neil Booth <neil@daikokuya.co.uk> 7601 7602 * lang.c (java_handle_option): Don't check for missing arguments. 7603 76042003-06-20 Nathan Sidwell <nathan@codesourcery.com> 7605 7606 * class.c (push_class): Use a location_t to save place. 7607 (emit_register_classes): Set input_location. Adjust 7608 expand_function_end call. 7609 * resource.c (write_resource_constructor): Likewise. 7610 * decl.c (end_java_method): Adjust expand_function_end call. 7611 * parse.y (source_end_java_method): Likewise. 7612 76132003-06-17 Robert Abeles <rabeles@archaelogic.com> 7614 7615 * lang.c (java_handle_option): Likewise. 7616 76172003-06-16 Neil Booth <neil@daikokuya.co.uk> 7618 7619 * lang.c (java_handle_option): Special-casing of optional 7620 joined arguments no longer needed. 7621 * lang.opt: Update switches that take optional argument. 7622 76232003-06-15 Neil Booth <neil@daikokuya.co.uk> 7624 7625 * lang.opt: Declare Java. 7626 * lang.c (java_init_options): Update. 7627 76282003-06-15 Neil Booth <neil@daikokuya.co.uk> 7629 7630 * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h. 7631 76322003-06-14 Neil Booth <neil@daikokuya.co.uk> 7633 7634 * lang-specs.h: Rewrite -MD and -MMD to append an underscore. 7635 * lang.c (java_handle_option): -MD and -MMD have an underscore. 7636 * lang.opt: -MD and -MMD have an underscore. 7637 76382003-06-14 Nathan Sidwell <nathan@codesourcery.com> 7639 7640 * class.c (emit_register_classes): Adjust init_function_start 7641 call. 7642 * decl.c (complete_start_java_method): Likewise. 7643 * resource.c (write_resource_constructor): Likewise. 7644 76452003-06-14 Neil Booth <neil@daikokuya.co.uk> 7646 7647 * Make-lang.in: Update to use options.c and options.h. 7648 * lang.c: Include options.h not j-options.h. 7649 (java_handle_option): Abort on unrecognized option. 7650 (java_init_options): Request Java switches. 7651 76522003-06-11 Neil Booth <neil@daikokuya.co.uk> 7653 7654 * Make-lang.in: Handle mostlyclean. 7655 76562003-06-11 Tom Tromey <tromey@redhat.com> 7657 7658 * lang.c (java_handle_option): Update dependency_tracking for 7659 OPT_MF case. 7660 7661 * lang.c (java_handle_option): OPT_fbootclasspath_ can take an 7662 empty argument. 7663 76642003-06-10 Andrew Haley <aph@redhat.com> 7665 7666 * resource.c (write_resource_constructor): Use expand_expr to 7667 generate the address of the label attached to a resource. 7668 * Make-lang.in (java/resource.o): Add expr.h 7669 76702003-06-10 Andrew Haley <aph@redhat.com> 7671 7672 * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New. 7673 (java_decl_ok_for_sibcall): New. 7674 76752003-06-09 Neil Booth <neil@daikokuya.co.uk> 7676 7677 * Make-lang.in (JAVA_OBJS, java/lang.o): Update. 7678 (java/j-options.c, java/j-options.h): New. 7679 * java-tree.h (resource_name, compile_resource_file, 7680 compile_resource_data): Constify. 7681 * jcf-write.c (jcf_write_base_directory): Similarly. 7682 * jcf.h (jcf_write_base_directory): Similarly. 7683 * lang.c: Include j-options.h. 7684 (cl_options_count, cl_options, string_option, java_decode_option, 7685 lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION, 7686 process_option_with_no): Remove. 7687 (resource_name): Constify. 7688 (LANG_HOOKS_HANDLE_OPTION): Override. 7689 (java_handle_option): New. 7690 (java_init): Don't call jcf_path_init. 7691 (java_init_options): Call jcf_path_init. 7692 * lang.opt: New. 7693 * resource.c (compile_resource_data, compile_resource_file): Constify. 7694 76952003-06-09 Nathan Sidwell <nathan@codesourcery.com> 7696 7697 * java-tree.h (DECL_FUNCTION_LAST_LINE): New. 7698 (struct lang_decl_func): Add last_line field. 7699 * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST, 7700 DECL_SOURCE_LINE_LAST): Remove. 7701 * parse.y (missing_return_error, finish_method_declaration, 7702 lookup_cl, start_artificial_method_body, source_end_java_method, 7703 start_complete_expand_method): Adjust. 7704 77052003-06-08 Tom Tromey <tromey@redhat.com> 7706 7707 * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and 7708 fno-assume-compiled. 7709 77102003-06-08 Roger Sayle <roger@eyesopen.com> 7711 7712 * builtins.c (define_builtin_type, builtin_types): Delete. 7713 (define_builtin): Rewritten to take just the built-in code, 7714 the function's name, type and fallback library function name. 7715 All built-ins used by Java are implicit and BUILT_IN_NORMAL. 7716 (initialize_builtins): Overhaul to define the GCC builtins 7717 used by gcj manually, providing the Java run-time's 7718 implementations as the fallback library function. 7719 77202003-06-08 Anthony Green <green@redhat.com> 7721 7722 * parse.y (patch_cast): Fix conversions from floating-point to 7723 integral types. 7724 77252003-06-08 Neil Booth <neil@daikokuya.co.uk> 7726 7727 * Make-lang.in: Update. 7728 * lang.c: Include opts.h. Define cl_options_count and cl_options. 7729 77302003-06-07 Neil Booth <neil@daikokuya.co.uk> 7731 7732 * lang.c (java_init_options): Update. 7733 77342003-06-05 Jan Hubicka <jh@suse.cz> 7735 7736 * Make-lang.in: Add support for stageprofile and stagefeedback 7737 77382003-05-31 Roger Sayle <roger@eyesopen.com> 7739 7740 * lang.c (java_init_options): Prescribe wrap-around two's 7741 complement arithmetic overflow by setting flag_wrapv. 7742 77432003-05-29 Roger Sayle <roger@eyesopen.com> 7744 7745 * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete. 7746 (builtin_record): Add an additional builtin_code field to 7747 record which GCC built-in corresponds to the Java function. 7748 (java_builtins): Add new entries for atan, atan2, exp, log, 7749 pow and tan. 7750 (max_builtin, min_builtin, abs_builtin): Perform constant 7751 folding on the resulting tree. 7752 (java_build_function_call_expr): Likewise, perform constant 7753 folding on the resulting tree. 7754 (initialize_builtins): The NULL creators are now allowed in 7755 the java_builtins table, which is now terminated by an entry 7756 with builtin_code == END_BUILTINS. 7757 (check_for_builtin): Likewise. If the matching creator is 7758 NULL, construct the call using java_build_function_call_expr 7759 directly with the decl for the corresponding builtin_code. 7760 77612003-05-23 Nathanael Nerode <neroden@gcc.gnu.org> 7762 7763 * win32-host.c: Normalize copyright boilerplate. 7764 77652003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 7766 7767 * parse.y (print_int_node): Use string concatentation on 7768 HOST_WIDE_INT_PRINT_* format specifier to collapse multiple 7769 function calls into one. 7770 77712003-05-13 Zack Weinberg <zack@codesourcery.com> 7772 7773 * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to 7774 fatal_io_error with calls to fatal_error; add ": %m" to the end of 7775 all the affected error messages. 7776 77772003-05-13 Richard Henderson <rth@redhat.com> 7778 7779 * class.c (layout_class_method): Set DECL_EXTERNAL. 7780 * decl.c (java_mark_decl_local, java_mark_class_local): New. 7781 * java-tree.h (java_mark_class_local): Declare. 7782 * jcf-parse.c (parse_class_file): Use it. 7783 * parse.y (java_expand_classes): Likewise. 7784 77852003-05-04 Nathan Sidwell <nathan@codesourcery.com> 7786 7787 * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h. 7788 * lex.h: #include input.h. 7789 * jv-scan.c (input_filename): Remove. 7790 77912003-05-02 Tom Tromey <tromey@redhat.com> 7792 7793 PR java/10491: 7794 * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro. 7795 (handle_inner_classes): New function. 7796 77972003-05-01 Tom Tromey <tromey@redhat.com> 7798 7799 PR java/10459: 7800 * parse.y (finish_for_loop): Do nothing if update expression is a 7801 EXPR_WFL_NODE wrapping nothing. 7802 (java_complete_lhs) <COMPOUND_EXPR>: Likewise. 7803 78042003-05-02 Nathan Sidwell <nathan@codesourcery.com> 7805 7806 * lex.h (input_lineno): Remove declaration. 7807 * parse-scan.y: #include input.h. 7808 (input_filename): Remove declaration. 7809 (input_location): Add definition. 7810 (input_line): Remove definition. 7811 78122003-05-01 Nathan Sidwell <nathan@codesourcery.com> 7813 7814 * lex.h (lineno): Rename to ... 7815 (input_line): ... here 7816 * parse-scan.y (lineno): Rename to ... 7817 (input_line): ... here. 7818 (reset_report): Rename lineno to input_line. 7819 * check-init.c (check_init): Likewise. 7820 * class.c (push_class): Likewise. 7821 * decl.c (complete_start_java_method, end_java_method): Likewise. 7822 * expr.c (expand_byte_code): Likewise. 7823 * jcf-parse.c (give_name_to_class, parse_class_file): Likewise. 7824 * jcf-write.c (generate_bytecode_insns): Likewise. 7825 * lex.c (java_init_lex, java_allocate_new_line, 7826 do_java_lex): Likewise. 7827 * parse.h (YYNOT_TWICE): Likewise. 7828 * parse.y (empty_statement, expression_statement, 7829 java_pop_parser_context, java_parser_context_save_global, 7830 yyerror, register_fields, method_header, safe_layout_class, 7831 find_in_imports_on_demand, create_artificial_method, 7832 source_end_java_method, start_complete_expand_method, 7833 build_thisn_assign, java_complete_lhs, 7834 maybe_absorb_scoping_block): Likewise. 7835 78362003-04-20 Mohan Embar <gnustuff@thisiscool.com> 7837 7838 * jcf-io.c (find_class): use DIR_SEPARATOR instead of 7839 '/' when computing java source filename 7840 78412003-04-13 Tom Tromey <tromey@redhat.com> 7842 7843 * gjavah.c (print_c_decl): Indentation fix. 7844 78452003-04-12 Zack Weinberg <zack@codesourcery.com> 7846 7847 * class.c (make_field_value, make_method_value, get_dispatch_table) 7848 (make_class_data, emit_offset_symbol_table) 7849 * constants.c (build_constants_constructor) 7850 * java-tree.h (START_RECORD_CONSTRUCTOR) 7851 * parse.y (maybe_build_array_element_wfl): 7852 Use build_constructor. 7853 78542003-04-10 Eric Blake <ebb9@email.byu.edu> 7855 7856 PR java/10253: 7857 * parse.y (string_convert_int_cst): Always use at least one digit 7858 in string conversion. Remove ASCII dependence. 7859 (merge_string_cste): Fix merging of 3-byte UTF-8 characters. 7860 78612003-03-16 Mohan Embar <gnustuff@thisiscool.com> 7862 7863 * Make-lang.in: added win32-host.c 7864 * jcf.h: defined macro JCF_OPEN_EXACT_CASE which 7865 resolves to open() on non-Win32 platforms and 7866 Win32-specific jcf_open_exact_case() on Win32 7867 * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE 7868 when trying .java and .class files 7869 * win32-host.c: added to repository. Defines 7870 Win32-specific jcf_open_exact_case() 7871 78722003-04-10 Andrew Haley <aph@redhat.com> 7873 7874 * jcf-write.c (struct jcf_partial): num_jsrs: new field. 7875 (maybe_free_localvar): Renamed from localvar_free. 7876 Add new arg, really. 7877 (generate_bytecode_insns): Set new variable, jsrs. 7878 Only free local vars if no jsr insns have been emittted. 7879 Call maybe_free_localvar, not localvar_free. 7880 78812003-03-30 Joseph S. Myers <jsm@polyomino.org.uk> 7882 7883 * gcj.texi: Remove @ at start of file. 7884 78852003-03-25 Tom Tromey <tromey@redhat.com> 7886 7887 * parse.y (create_interface): Call CHECK_DEPRECATED. 7888 78892003-03-23 Zack Weinberg <zack@codesourcery.com> 7890 7891 * Make-lang.in: Link jcf-dump against $(LDEXP_LIB). 7892 78932003-03-21 Zack Weinberg <zack@codesourcery.com> 7894 7895 * javaop.h (jfloat, jdouble): Make them structures mirroring 7896 the bit fields of IEEE float and double respectively. 7897 (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS, 7898 JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New. 7899 (union Word, union DWord): Delete. 7900 (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match. 7901 7902 * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK, 7903 D_NAN_MASK): Delete. 7904 (jni_print_float, jni_print_double): New. Generate 7905 hexadecimal floating constants. 7906 (print_field_info): Use jni_print_float/double. 7907 7908 * jcf-dump.c: Include math.h. Use ldexp/frexp to assemble 7909 finite floating point numbers for output; special case 7910 non-finite floats. 7911 79122003-03-19 Nathanael Nerode <neroden@gcc.gnu.org> 7913 7914 * lang.c (java_dump_tree): Change return type from 'int' to 'bool'. 7915 Replace 0 and 1 with true and false in return statements. 7916 79172003-03-19 Tom Tromey <tromey@redhat.com> 7918 7919 * lex.c (do_java_lex): Renamed from java_lex. 7920 (java_lex): New function. 7921 Include timevar.h. 7922 79232003-03-13 Tom Tromey <tromey@redhat.com> 7924 7925 * parse.y (resolve_inner_class): Error if qualifier is a primitive 7926 type. 7927 79282003-03-04 Andrew Haley <aph@redhat.com> 7929 7930 * gjavah.c (is_first_data_member): New global variable. 7931 (print_c_decl): If it's the first data member, align it as the 7932 superclass. 7933 (process_file): Set is_first_data_member. 7934 79352003-03-11 Tom Tromey <tromey@redhat.com> 7936 7937 * parse.y (resolve_field_access): Initialize class if field is 7938 found in another static field. 7939 * expr.c (build_class_init): Don't optimize out initialization of 7940 implemented interface. 7941 79422003-03-11 Andrew Haley <aph@redhat.com> 7943 7944 * jcf-io.c (caching_stat): Initialize origsep to remove compiler 7945 warning. 7946 79472003-03-10 Ranjit Mathew <rmathew@hotmail.com> 7948 7949 * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR 7950 and DIR_SEPARATOR_2 for a target. 7951 Correct minor typos. 7952 7953 * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR 7954 and DIR_SEPARATOR_2 for a target into account. 7955 79562003-03-08 Neil Booth <neil@daikokuya.co.uk> 7957 7958 * lang.c (java_init): Update prototype, move code to java_post_options. 7959 (java_post_options): Similarly. 7960 79612003-03-05 Ranjit Mathew <rmathew@hotmail.com> 7962 7963 * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to 7964 compare file name components depending on the case-sensitivity 7965 or otherwise of the host file system. 7966 7967 * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of 7968 "strcmp" to compare file name components. 7969 Use IS_DIR_SEPARATOR instead of comparing directly against 7970 DIR_SEPARATOR. 7971 (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of 7972 comparing directly against DIR_SEPARATOR. 7973 79742003-03-04 Tom Tromey <tromey@redhat.com> 7975 7976 * Make-lang.in (java.tags): New target. 7977 79782003-03-01 Roger Sayle <roger@eyesopen.com> 7979 7980 * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3. 7981 (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3. 7982 79832003-03-01 Tom Tromey <tromey@redhat.com> 7984 7985 * parse.y (jdep_resolve_class): Only check deprecation if we found 7986 a decl. 7987 79882003-02-28 Tom Tromey <tromey@redhat.com> 7989 7990 PR java/9695: 7991 * class.c (maybe_layout_super_class): Always pass a WFL to 7992 do_resolve_class. 7993 * parse.y (do_resolve_class): Updated comment to explain 7994 parameters. 7995 79962003-02-26 Tom Tromey <tromey@redhat.com> 7997 7998 * jcf-write.c (generate_classfile): Check whether class is 7999 deprecated before writing attribute count. 8000 80012003-02-25 Roger Sayle <roger@eyesopen.com> 8002 8003 * java/decl.c (java_init_decl_processing): Get soft_fmod_node from 8004 built_in_decls[BUILT_IN_FMOD] rather than define it ourselves. 8005 80062003-02-23 Tom Tromey <tromey@redhat.com> 8007 8008 * lang-options.h: Added -Wdeprecated. 8009 * gcj.texi (Warnings): Document -Wdeprecated. 8010 * java-tree.h (flag_deprecated): Declare. 8011 * lang.c (lang_W_options): Added deprecated. 8012 (flag_deprecated): New global. 8013 * chartables.h: Rebuilt. 8014 * gen-table.pl (process_one): Look at whitespace. 8015 (print_tables): Define LETTER_SPACE, LETTER_MASK. 8016 * parse.h (CLEAR_DEPRECATED): New macro. 8017 (CHECK_DEPRECATED_NO_RESET): New macro. 8018 * jcf-parse.c (handle_deprecated): New function. 8019 (HANDLE_DEPRECATED_ATTRIBUTE): New define. 8020 * jcf-reader.c (get_attribute): Handle Deprecated attribute. 8021 * parse.y (resolve_type_during_patch): Check deprecation. 8022 (jdep_resolve_class): Likewise. 8023 (process_imports): Likewise. 8024 (resolve_expression_name): Likewise. 8025 (check_deprecation): Strip arrays from decl. Check 8026 flag_deprecated. 8027 (patch_method_invocation): Also check the particular constructor 8028 for deprecation. 8029 (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop. 8030 * jcf-write.c (append_deprecated_attribute): New function. 8031 (generate_classfile): Generate deprecated attribute when 8032 appropriate. 8033 * lex.c (java_parse_doc_section): Return type now void. Rewrote. 8034 (java_lex) [case '*']: Simplify logic. 8035 (java_start_char_p): Use LETTER_MASK. 8036 (java_part_char_p): Likewise. 8037 (java_space_char_p): New function. 8038 80392003-02-20 Nathan Sidwell <nathan@codesourcery.com> 8040 8041 Change base class access representation. 8042 * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC. 8043 (add_interface_do): Likewise. 8044 80452003-02-12 Ranjit Mathew <rmathew@hotmail.com> 8046 8047 * decl.c (java_init_decl_processing): Change 8048 soft_lookupjnimethod_node to reflect the change in 8049 signature of _Jv_LookupJNIMethod in libjava/jni.cc 8050 * expr.c (build_jni_stub): Calculate and pass the size 8051 on the stack of the arguments to a JNI function. Use 8052 new target macro MODIFY_JNI_METHOD_CALL to allow a 8053 target to modify the call to a JNI method. 8054 80552003-02-08 Roger Sayle <roger@eyesopen.com> 8056 8057 * jcf-io.c (java_or_class_file): Use libiberty's lbasename 8058 instead of basename to avoid compiler warnings on Tru64. 8059 80602003-02-04 Joseph S. Myers <jsm@polyomino.org.uk> 8061 8062 * gcj.texi: Update to GFDL 1.2. 8063 80642003-01-31 Andrew Haley <aph@redhat.com> 8065 8066 * parse.y (java_expand_classes): Scan the whole class list looking 8067 for access methods that haven't yet been expanded. 8068 80692003-01-31 Adrian Bunk <bunk@fs.tum.de> 8070 8071 Fix for java/4269: 8072 8073 * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO 8074 to fix bootstrap on sparc-unknown-netbsdelf1.5. 8075 * jcf-parse.c: Likewise. 8076 80772003-01-31 Mark Wielaard <mark@klomp.org> 8078 8079 * gjavah.c (throwable_p): Allocate 1 more byte for string. 8080 80812003-01-31 Nathan Sidwell <nathan@codesourcery.com> 8082 8083 * class.c (make_class): Use BINFO_ELTS. 8084 (set_super_info): Likewse. 8085 (add_interface_do): Likewise. 8086 80872003-01-30 Tom Tromey <tromey@redhat.com> 8088 8089 * jcf-parse.c (read_class): Update identifier's class value if it 8090 changed during parsing. 8091 80922003-01-30 Loren James Rittle <ljrittle@acm.org> 8093 8094 * Make-lang.in (po-generated): Find the targets in $(parsedir). 8095 Propagate change to all other rules as required. 8096 (java/parse-scan.o): Add explicit dependency on 8097 $(parsedir)/java/parse-scan.c . 8098 80992003-01-29 Tom Tromey <tromey@redhat.com> 8100 8101 * parse.y (patch_assignment): Only transform the rhs of an 8102 assignment when compiling to native. 8103 81042003-01-28 Tom Tromey <tromey@redhat.com> 8105 8106 * jcf-write.c (generate_bytecode_conditional): Typo fixes. 8107 81082003-01-28 Tom Tromey <tromey@redhat.com> 8109 8110 * lex.c (java_lex): Don't include UEOF as part of token. 8111 (java_read_unicode): Error if \u sequence prematurely terminated. 8112 81132003-01-27 Tom Tromey <tromey@redhat.com> 8114 8115 * parse.y (java_check_regular_methods): Check for construct after 8116 checking types in throws clause. 8117 81182003-01-24 Tom Tromey <tromey@redhat.com> 8119 8120 * class.c (build_static_field_ref): Only a String or numeric field 8121 can fold to a constant. 8122 81232003-01-23 Tom Tromey <tromey@redhat.com> 8124 8125 * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of 8126 file name in resource buffer. 8127 81282003-01-23 Tom Tromey <tromey@redhat.com> 8129 8130 * expr.c (build_known_method_ref): Use method's context to find 8131 method table index. 8132 81332003-01-23 Tom Tromey <tromey@redhat.com> 8134 8135 * constants.c (set_constant_entry): Allocated cleared memory. 8136 81372003-01-22 Tom Tromey <tromey@redhat.com> 8138 8139 * java-tree.h: Don't use PARAMS. 8140 * resource.c: Add prototypes for all functions. 8141 (write_resource_constructor): Use `const char *' to avoid 8142 warning. 8143 81442003-01-22 Nathanael Nerode <neroden@gcc.gnu.org> 8145 8146 * jcf-parse.c (process_zip_dir): Remove unused variable. 8147 81482003-01-22 Tom Tromey <tromey@redhat.com> 8149 8150 * expr.c (build_invokeinterface): Abort if method's context is not 8151 an interface. 8152 81532003-01-22 Tom Tromey <tromey@redhat.com> 8154 8155 * gcj.texi (Input and output files): Mention non-class entries. 8156 * decl.c (java_init_decl_processing): Call 8157 init_resource_processing. 8158 * java-tree.h (compile_resource_data, write_resource_constructor, 8159 compile_resource_file, init_resource_processing): Declare. 8160 * config-lang.in (gtfiles): Added resource.c. 8161 * Make-lang.in (gt-java-resource.h): New target. 8162 (JAVA_OBJS): Added resource.o. 8163 (java/resource.o): New target. 8164 * resource.c: New file. 8165 * class.c (compile_resource_file): Moved to resource.c. 8166 (registerResource_libfunc): Likewise. 8167 (utf8_decl_list): Mark with GTY; now static. 8168 * jcf-parse.c (classify_zip_file): New function. 8169 (parse_zip_file_entries): Use it; compile .properties files. 8170 (process_zip_dir): Use classify_zip_file and compute_class_name. 8171 Don't write class name into zip directory. 8172 (java_parse_file): Call write_resource_constructor. 8173 (compute_class_name): New function. 8174 * jcf-io.c (read_zip_member): Reindented. 8175 81762003-01-21 Tom Tromey <tromey@redhat.com> 8177 8178 * class.c (supers_all_compiled): New function. 8179 (make_class_data): Use it. 8180 81812003-01-21 Tom Tromey <tromey@redhat.com> 8182 8183 * parse.y (method_header): Native method can't be strictfp. 8184 No method can be transient or volatile. 8185 81862003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 8187 8188 Make-lang.in (jvspec.o-warn): Add -Wno-error. 8189 81902003-01-18 Kazu Hirata <kazu@cs.umass.edu> 8191 8192 * check-init.c: Fix comment typos. 8193 * class.c: Likewise. 8194 * constants.c: Likewise. 8195 * decl.c: Likewise. 8196 * except.c: Likewise. 8197 * expr.c: Likewise. 8198 * java-except.h: Likewise. 8199 * java-tree.h: Likewise. 8200 * javaop.h: Likewise. 8201 * jcf-dump.c: Likewise. 8202 * jcf-io.c: Likewise. 8203 * jcf-parse.c: Likewise. 8204 * jcf-write.c: Likewise. 8205 * lang.c: Likewise. 8206 * mangle.c: Likewise. 8207 * typeck.c: Likewise. 8208 * verify.c: Likewise. 8209 82102003-01-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 8211 8212 * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H). 8213 * jcf-write.c: Include "tm_p.h". 8214 82152003-01-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 8216 8217 * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*. 8218 82192003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 8220 8221 * builtins.c (java_build_function_call_expr): Renamed from 8222 build_function_call_expr. All callers changed. 8223 8224 * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H). 8225 * jcf-parse.c: Include tm_p.h. 8226 8227 * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned 8228 warning. 8229 82302003-01-14 Tom Tromey <tromey@redhat.com> 8231 8232 * class.c (make_class_data): Check that super is compiled before 8233 building class reference to it. 8234 82352003-01-14 Andrew Haley <aph@redhat.com> 8236 8237 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a 8238 varargs function -- correct. 8239 82402003-01-14 Andrew Haley <aph@redhat.com> 8241 8242 * decl.c (java_init_decl_processing): Temporarily back out previous patch. 8243 82442003-01-14 Andrew Haley <aph@redhat.com> 8245 8246 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a 8247 varargs function -- correct. 8248 8249 * parse.y (patch_assignment): Copy the rhs of an assignment into a 8250 temporary if the RHS is a reference. 8251 82522003-01-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 8253 8254 * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf. 8255 * keyword.h: Regenerated. 8256 8257 * All Files: Convert to ISO C style function definitions. 8258 82592003-01-09 Nathanael Nerode <neroden@gcc.gnu.org> 8260 8261 * parse.y (check_pkg_class_access): ANSIfy definition. 8262 82632003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 8264 8265 * decl.c, parse-scan.y, parse.y: Don't cast return value of 8266 xmalloc et al. 8267 8268 * class.c, gjavah.c, parse.y, verify.c: Don't use PTR. 8269 82702003-01-09 Geoffrey Keating <geoffk@apple.com> 8271 8272 Merge from pch-branch: 8273 8274 2002-12-02 Geoffrey Keating <geoffk@apple.com> 8275 8276 * Make-lang.in (java/gjavah.o): Update dependencies. 8277 * gjavah.c: Include ggc.h. 8278 8279 2002-08-16 Geoffrey Keating <geoffk@redhat.com> 8280 8281 * Make-lang.in (GCJH_OBJS): Add ggc-none.o. 8282 (JCFDUMP_OBJS): Add ggc-none.o. 8283 (java/jcf-dump.o): Depend on GGC_H. 8284 * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate 8285 CPool substructures. 8286 * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs. 8287 * jcf-dump.c: Include ggc.h. 8288 8289 2002-08-08 Geoffrey Keating <geoffk@redhat.com> 8290 8291 * jcf.h (union cpool_entry): New. 8292 (struct CPool): Use gengtype to mark. Change field 'data' to be 8293 an array of unions. 8294 (struct JCF): Use gengtype to mark. 8295 (CPOOL_UINT): Update for new cpool_entry type. 8296 (CPOOL_USHORT1): Likewise. 8297 (CPOOL_USHORT2): Likewise. 8298 (CPOOL_FINISH): Use GC to free cpool subfields. 8299 * parse.h (struct parser_ctxt): Mark field current_jcf. 8300 * lex.c (java_init_lex): Use GC to allocate struct JCF. 8301 * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type. 8302 (main_jcf): Use gengtype to mark. 8303 (ggc_mark_jcf): Delete. 8304 (get_constant): Update for new cpool_entry type. 8305 (give_name_to_class): Likewise. 8306 (get_class_constant): Likewise. 8307 (init_outgoing_cpool): Use GGC to allocate struct CPool. 8308 (java_parse_file): Use GGC to allocate struct JCF. 8309 (init_jcf_parse): Don't call ggc_add_root. 8310 * jcf-reader.c (jcf_parse_constant_pool): Update for new 8311 cpool_entry type. 8312 * java-tree.h (current_jcf): Use gengtype to mark. 8313 (CPOOL_UTF): Update for new cpool_entry type. 8314 (outgoing_cpool): Use gengtype to mark. 8315 (struct lang_type): GC struct JCF and struct CPool. 8316 * config-lang.in (gtfiles): Add jcf.h. 8317 * constants.c (find_tree_constant): New. 8318 (set_constant_entry): Allocate cpool subfields using GGC. Update 8319 for new cpool_entry type. 8320 (find_constant1): Update for new cpool_entry type. 8321 (find_constant2): Likewise. 8322 (find_utf8_constant): Use find_tree_constant. 8323 (find_class_or_string_constant): Remove unnecessary cast to jword. 8324 Update for new cpool_entry type. 8325 (count_constant_pool_bytes): Update for new cpool_entry type. 8326 (write_constant_pool): Likewise. 8327 (alloc_name_constant): Use find_tree_constant. 8328 (build_constants_constructor): Update for new cpool_entry type. 8329 8330 2002-08-08 Geoffrey Keating <geoffk@redhat.com> 8331 8332 * parse.y (mark_parser_ctxt): Delete. 8333 (goal): Don't use ggc_add_root. 8334 (create_new_parser_context): Use GC to allocate struct parser_ctxt. 8335 (java_pop_parser_context): Let GC free parser_ctxt. 8336 (java_parser_context_resume): Likewise. 8337 * parse.h (struct parser_ctxt): Use gengtype to mark. 8338 (ctxp): Likewise. 8339 (ctxp_for_generation): Likewise. 8340 * lex.h (struct java_lc_s): Mark for gengtype. 8341 (java_lexer): Rearrange for gengtype. 8342 * config-lang.in (gtfiles): Add lex.h, parse.h. 8343 83442003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 8345 8346 * All Files: Remove PARAMS macro. 8347 8348 * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c, 8349 jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or 8350 `__STDC__' macros. 8351 8352 * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and 8353 VA_CLOSE. 8354 83552003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de> 8356 8357 * Make-lang.in (java.install-common, java.uninstall, 8358 java.install-info, java.install-man): Prepend $(DESTDIR) 8359 to destination paths in all (un)installation commands. 8360 (java.install-common): Rewrite $(LN) command to support 8361 DESTDIR with "ln" as well as with "ln -s". 8362 83632003-01-08 Nathanael Nerode <neroden@gcc.gnu.org> 8364 8365 * java-tree.h: Protect against multiple inclusion. 8366 83672003-01-07 Tom Tromey <tromey@redhat.com> 8368 8369 * class.c (add_assume_compiled): Don't adjust parent if we're 8370 already at the root of tree. 8371 83722003-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 8373 8374 * lang.c (dump_compound_expr): Prototype. 8375 83762003-01-03 Tom Tromey <tromey@redhat.com> 8377 8378 Fix for PR java/8712: 8379 * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR, 8380 when simply checking against `null'. 8381 83822003-01-03 Tom Tromey <tromey@redhat.com> 8383 8384 * gcj.texi (Standard Properties): Document http.proxyHost and 8385 http.proxyPort. 8386 8387 * gcj.texi (GNU Classpath Properties): Document new properties. 8388 83892003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl> 8390 8391 * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf, 8392 java/lang-options.h, java/mangle.c, java/mangle_name.c, 8393 java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years. 8394 83952003-01-01 Steven Bosscher <s.bosscher@student.tudelft.nl> 8396 8397 * Make-lang.in, boehm.c, buffer.c, 8398 buffer.h, builtins.c, class.c, 8399 config-lang.in, constants.c, 8400 convert.h, decl.c, except.c, 8401 expr.c, java-except.h, 8402 java-tree.h, javaop.def, 8403 jcf-parse.c, jcf-write.c, 8404 jv-scan.c, jvgenmain.c, 8405 jvspec.c, keyword.gperf, 8406 keyword.h, lang-options.h, 8407 lang-specs.h, lang.c, lex.c, 8408 lex.h, mangle.c, mangle_name.c, 8409 parse-scan.y, parse.h, parse.y, 8410 typeck.c, verify.c, xref.c, 8411 xref.h: Replace "GNU CC" with 8412 "GCC" in the copyright header. 8413 8414 * check-init.c, gjavah.c, javaop.h, 8415 jcf-depend.c, jcf-dump.c, jcf-io.c, 8416 jcf-path.c, jcf-reader.c, jcf.h, 8417 zextract.c, zipfile.h: These files are 8418 "part of GCC". Also say "GCC" not "GNU CC". 8419 84202002-12-30 DJ Delorie <dj@redhat.com> 8421 8422 * Make-lang.in: Protect against texi2pod/pod2man failing. 8423 84242002-12-28 Joseph S. Myers <jsm@polyomino.org.uk> 8425 8426 * gcj.texi: Use @copying. 8427 84282002-12-27 Mark Mitchell <mark@codesourcery.com> 8429 8430 * gjavah.c (print_name_for_stub_or_jni): Adjust call to 8431 print_cxx_classname. 8432 (print_cxx_classname): Add add_scope parameter. 8433 (print_class_decls): Do not emit a semicolon after the extern 8434 "Java" block. 8435 (process_file): Adjust calls to print_cxx_classname. 8436 84372002-12-23 Joseph S. Myers <jsm@polyomino.org.uk> 8438 8439 * gcj.texi: Include Cover Texts in man page. 8440 84412002-12-23 Jeff Sturm <jsturm@one-point.com> 8442 8443 * class.c (build_static_field_ref): Check FIELD_FINAL. 8444 8445 * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF 8446 instead of current_constant_pool_data_ref. 8447 * java-tree.h (current_constant_pool_data_ref): Undefine. 8448 (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove. 8449 * jcf-parse.c (init_outgoing_cpool): Don't initialize 8450 current_constant_pool_data_ref. 8451 8452 * except.c (prepare_eh_table_type ): Use DECL_NAME of class type, 8453 not build_internal_class_name. 8454 8455 * parse.y (patch_incomplete_class_ref): Always emit `class$' method. 8456 Use it when class ref isn't certain to be compiled. 8457 84582002-12-23 Joseph S. Myers <jsm@polyomino.org.uk> 8459 8460 * gcj.texi: Include gcc-common.texi. 8461 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on 8462 $(srcdir)/doc/include/gcc-common.texi. 8463 84642002-12-22 Anthony Green <green@redhat.com> 8465 8466 * gcj.texi (Limitations): Add note about org.xml.sax and 8467 org.w3c.dom. 8468 84692002-12-20 Tom Tromey <tromey@redhat.com> 8470 8471 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case 8472 where minimum case value is Integer.MIN_VALUE. 8473 Fixes PR java/8955. 8474 84752002-12-18 Andrew Haley <aph@redhat.com> 8476 8477 * parse.y (patch_invoke): Force evaluation order when `check' is 8478 set. For PR libgcj/8945. 8479 84802002-12-16 Mark Mitchell <mark@codesourcery.com> 8481 8482 * gcj.texi: Change version number to 3.4. 8483 84842002-12-05 Ranjit Mathew <rmathew@hotmail.com> 8485 Andrew Haley <aph@redhat.com> 8486 8487 * parse.y (source_end_java_method): Remove custom encoding of line 8488 numbers for a function decl before passing it to the back end. 8489 84902002-12-03 Andrew Haley <aph@redhat.com> 8491 8492 * class.c (make_class_data): New field, "chain". 8493 * decl.c (java_init_decl_processing): Likewise. 8494 84952002-12-02 Tom Tromey <tromey@redhat.com> 8496 8497 For PR java/8740: 8498 * parse.y (do_resolve_class): Handle qualified name via 8499 recursion. 8500 85012002-11-30 Zack Weinberg <zack@codesourcery.com> 8502 8503 * boehm.c, buffer.c, builtins.c, check-init.c, class.c, 8504 constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c, 8505 jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c, 8506 jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c, 8507 parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c: 8508 Include coretypes.h and tm.h. 8509 * Make-lang.in: Update dependencies. 8510 85112002-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 8512 8513 * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant. 8514 85152002-11-25 Diego Novillo <dnovillo@redhat.com> 8516 8517 * jcf-reader.c: Don't expand JCF_readu4 inside the 8518 expansion of JCF_SKIP. 8519 85202002-11-25 Diego Novillo <dnovillo@redhat.com> 8521 8522 * jcf-reader.c: Don't expand JCF_readu4 inside the 8523 expansion of JCF_SKIP. 8524 85252002-11-22 Tom Tromey <tromey@redhat.com> 8526 8527 * parse.y (patch_binop): Cast right hand side of shift expression 8528 to `int'. Fixes PR java/8676. 8529 85302002-11-22 Ranjit Mathew <rmathew@hotmail.com> 8531 Andrew Haley <aph@redhat.com> 8532 8533 * gcc/java/jcf-write.c (write_classfile): Remove target 8534 class file, if it exists, before renaming the temporary 8535 class file to it. 8536 85372002-11-19 Jason Thorpe <thorpej@wasabisystems.com> 8538 8539 * jvspec.c (lang_specific_spec_functions): New. 8540 85412002-11-18 Tom Tromey <tromey@redhat.com> 8542 8543 Fix for PR java/7912: 8544 * expr.c (can_widen_reference_to): Allow cast of array to 8545 Cloneable or Serializable. 8546 * java-tree.h (java_lang_cloneable_identifier_node): Declare. 8547 (java_io_serializable_identifier_node): Likewise. 8548 * parse.y (java_lang_cloneable, java_io_serializable): Removed. 8549 (valid_ref_assignconv_cast_p): Use new identifier nodes. 8550 * lex.c (java_init_lex): Don't initialize java_lang_cloneable and 8551 java_io_serializable. 8552 * decl.c (java_init_decl_processing): Initialize 8553 java_lang_cloneable_identifier_node and 8554 java_io_serializable_identifier_node. 8555 (java_lang_cloneable_identifier_node): New global. 8556 (java_io_serializable_identifier_node): Likewise. 8557 85582002-11-14 Jens-Michael Hoffmann <jensmh@gmx.de> 8559 8560 * buffer.c: Remove unnecessary casts. 8561 * check-init.c: Likewise. 8562 * class.c: Likewise. 8563 * constants.c: Likewise. 8564 * decl.c: Likewise. 8565 * except.c: Likewise. 8566 * gjavah.c: Likewise. 8567 * jcf-io.c: Likewise. 8568 * jcf-parse.c: Likewise. 8569 * jcf-path.c: Likewise. 8570 * jvspec.c: Likewise. 8571 * lang.c: Likewise. 8572 * lex.c: Likewise. 8573 * verify.c: Likewise. 8574 85752002-11-06 Tom Tromey <tromey@redhat.com> 8576 8577 * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in 8578 a JNI header. 8579 85802002-11-05 Tom Tromey <tromey@redhat.com> 8581 8582 Fix for PR java/6388. 8583 * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while. 8584 * java-tree.h (enum java_tree_index): New values 8585 JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE. 8586 (decimal_int_max, decimal_long_max): New defines. 8587 * lex.c (yylex): Rewrote range checking. Sign extend literals. 8588 (error_if_numeric_overflow): Rewrote range checking. 8589 * decl.c (java_init_decl_processing): Initialize decimal_int_max, 8590 decimal_long_max. 8591 85922002-11-02 Tom Tromey <tromey@redhat.com> 8593 8594 * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE. 8595 8596 * class.c (make_method_value): Put class name, not signature, into 8597 `throws' field. For PR java/8415. 8598 85992002-10-24 Tom Tromey <tromey@redhat.com> 8600 8601 * gcj.texi (Invoking gij): Document --showversion. 8602 (Standard Properties): java.library.path now set. 8603 86042002-10-23 Tom Tromey <tromey@redhat.com> 8605 8606 * gjavah.c (decode_signature_piece): In JNI mode, print 8607 `jobjectArray' when array depth is nonzero. 8608 Fixes PR java/8296. 8609 86102002-10-15 Andrew Haley <aph@redhat.com> 8611 8612 * parse.y (patch_invoke): Call force_evaluation_order on a static 8613 arg list. 8614 (resolve_qualified_expression_name): Call force_evaluation_order 8615 on a arg list that is part of a Qualified Expression Name. 8616 8617 * lang.c (dump_compound_expr): New. 8618 (java_dump_tree): New. 8619 86202002-10-20 Ranjit Mathew <rmathew@hotmail.com> 8621 8622 * gcj.texi: Added item describing the GCJ runtime property 8623 "gnu.gcj.progname". 8624 86252002-10-15 Richard Henderson <rth@redhat.com> 8626 8627 * jcf-parse.c (get_constant): Fix type warning. 8628 86292002-10-15 Andrew Haley <aph@redhat.com> 8630 8631 * java-tree.h (java_inlining_merge_static_initializers): Declare. 8632 (java_inlining_map_static_initializers): Declare. 8633 86342002-10-14 Andrew Haley <aph@redhat.com> 8635 8636 * tree-inline.c (remap_block): All local class initialization 8637 flags go in the outermost scope. 8638 (expand_call_inline): Call java_inlining_map_static_initializers. 8639 (expand_call_inline): Call java_inlining_merge_static_initializers. 8640 * java/lang.c (merge_init_test_initialization): New. 8641 (java_inlining_merge_static_initializers): New. 8642 (inline_init_test_initialization): New. 8643 (java_inlining_map_static_initializers): New. 8644 86452002-10-11 Mark Wielaard <mark@klomp.org> 8646 8647 * gcj.texi (Compatibility): Add Limitations and Extensions section. 8648 86492002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 8650 8651 * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer. 8652 86532002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 8654 8655 * parse.y (merge_string_cste): Add parentheses around & within |. 8656 86572002-10-08 Tom Tromey <tromey@redhat.com> 8658 8659 * parse.y (variable_declarator_id): Simplify error path for 8660 array declarator error. For PR java/8003. 8661 86622002-10-08 Zack Weinberg <zack@codesourcery.com> 8663 8664 * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with 8665 bug_report_url. 8666 86672002-10-08 Andrew Haley <aph@redhat.com> 8668 8669 * parse.y (attach_init_test_initialization_flags): Check for 8670 error_mark_node. 8671 86722002-10-07 Anthony Green <green@redhat.com> 8673 8674 * parse.y (merge_string_cste): Fix bug in string concatenation. 8675 86762002-10-03 Michael Koch <konqueror@gmx.de> 8677 8678 * gcj.texi (Standard properties): 8679 Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit. 8680 86812002-10-02 Roger Sayle <roger@eyesopen.com> 8682 8683 PR optimization/6627 8684 * lang.c (java_init): If storing the vbit in function 8685 pointers, ensure that force_align_functions_log is atleast 8686 one to aid compatability with g++ vtables. 8687 86882002-10-01 Nathan Sidwell <nathan@codesourcery.com> 8689 8690 * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall 8691 foul of type-based aliasing. 8692 86932002-09-30 Anthony Green <green@redhat.com> 8694 8695 * gcj.texi (Invoking jv-scan): Fix texinfo. 8696 86972002-09-28 Anthony Green <green@redhat.com> 8698 8699 * gcj.texi (Invoking jv-scan): Add --no-assert documentation. 8700 (Code Generation): Add -fno-assert documentation. 8701 * jv-scan.c (flag_assert): New global. 8702 (options): Add assert option. 8703 (help): Add --no-assert documentation. 8704 * parse-scan.y (flag_assert): New global. 8705 * lang.c (lang_f_options): Add -fassert/-fno-assert support. 8706 (flag_assert): New global. 8707 * java-tree.h (flag_assert): New global. 8708 * lex.c (java_lex): Obey flag_assert. 8709 * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when 8710 calling cc1. 8711 87122002-09-26 Andrew Haley <aph@redhat.com> 8713 8714 * expr.c (build_java_array_length_access): Check for null pointer. 8715 * expr.c (expand_java_arrayload): Likewise. 8716 87172002-09-21 Richard Henderson <rth@redhat.com> 8718 8719 * jcf-parse.c (get_constant): Decode from IEEE no matter 8720 what the target format. 8721 87222002-09-20 Kazu Hirata <kazu@cs.umass.edu> 8723 8724 * ChangeLog: Follow spelling conventions. 8725 * class.c: Likewise. 8726 * decl.c: Likewise. 8727 * expr.c: Likewise. 8728 * gjavah.c: Likewise. 8729 * java-tree.h: Likewise. 8730 * jcf-dump.c: Likewise. 8731 * jcf-parse.c: Likewise. 8732 * jvspec.c: Likewise. 8733 * lang.c: Likewise. 8734 * mangle.c: Likewise. 8735 * parse.y: Likewise. 8736 87372002-09-17 Tom Tromey <tromey@redhat.com> 8738 8739 * lex.c (java_read_unicode_collapsing_terminators): Handle case 8740 where \r appears at EOF. Fixes PR java/7950. 8741 87422002-09-16 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 8743 8744 * jvspec.c (lang_specific_driver): Remove unused variable. 8745 87462002-09-16 Geoffrey Keating <geoffk@apple.com> 8747 8748 * java-tree.h (union lang_tree_node): Add chain_next option. 8749 87502002-09-16 Richard Henderson <rth@redhat.com> 8751 8752 * jcf-parse.c (get_constant): Runtime check for IEEE format; 8753 use new real.h interface. 8754 * jcf-write.c (find_constant_index): Use new real.h interface. 8755 * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL. 8756 87572002-09-15 Kazu Hirata <kazu@cs.umass.edu> 8758 8759 * lang.c: Follow spelling conventions. 8760 87612002-09-11 Per Bothner <per@bothner.com> 8762 8763 * parse.y (fold_constant_for_init): If a VAR_DECL, convert numerical 8764 constant to the type of the field. 8765 (java_complete_tree): Remove now-redundant code. 8766 8767 * parse.y (fold_constant_for_init): 'null' is not a constant expr. 8768 87692002-09-03 Jesse Rosenstock <jmr@ugcs.caltech.edu> 8770 8771 For PR java/5794: 8772 * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the 8773 return label if a ret instruction for the jsr has been reached. 8774 87752002-09-09 Ranjit Mathew <rmathew@hotmail.com> 8776 8777 * parse.y (DIR_SEPARATOR): Don't define. 8778 (check_class_interface_creation): Use IS_DIR_SEPARATOR. 8779 87802002-08-28 Andrew Haley <aph@redhat.com> 8781 8782 * verify.c (verify_jvm_instructions): Allow exception handler 8783 inside code that is being protected, but generate a warning. 8784 * except.c (link_handler): Initialize `expanded' in new eh_range. 8785 (binding_depth, is_class_level, current_pc): Declare extern. 8786 87872002-09-01 Mark Wielaard <mark@klomp.org> 8788 8789 * gcj.texi: Add chapter about system properties. 8790 Fixed some typos. 8791 87922002-08-26 Tom Tromey <tromey@redhat.com> 8793 8794 * parse.y (try_builtin_assignconv): Allow narrowing primitive 8795 conversion if RHS_TYPE is byte, short, or char. 8796 87972002-08-22 Tom Tromey <tromey@redhat.com> 8798 8799 * gcj.texi (Invoking gij): Document -cp and -classpath. 8800 88012002-08-21 Tom Tromey <tromey@redhat.com> 8802 8803 * Make-lang.in (java/jcf-path.o): Use $(datadir), not 8804 $(prefix)/share. For PR libgcj/7633. 8805 8806 For PR java/6005 and PR java/7611: 8807 * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define. 8808 (java_can_use_bit_fields_p): New function. 8809 88102002-08-16 Tom Tromey <tromey@redhat.com> 8811 8812 * gcj.texi (Class Initialization): Mention class initialization of 8813 arrays. 8814 88152002-07-30 Andrew Haley <aph@cambridge.redhat.com> 8816 8817 * Make-lang.in (java-tree-inline.o): New. 8818 (JAVA_OBJS): Add java-tree-inline.o. 8819 * parse.y (source_end_java_method): Call java_optimize_inline. 8820 (java_expand_method_bodies): Save method's tree in 8821 DECL_SAVED_TREE. 8822 (add_stmt_to_compound): Keep track of the number of statments. 8823 * lang.c (java_init): Enable flag_inline_trees. 8824 (java_post_options): If flag_inline_functions is on, enable 8825 flag_inline_trees instread. 8826 (decl_constant_value): New. 8827 (java_tree_inlining_walk_subtrees): New. 8828 * java-tree.h (DECL_NUM_STMTS): New macro. 8829 (java_optimize_inline): Declare. 8830 * expr.c (java_expand_expr): Allow a BLOCK to return a value. 8831 Handle a LABEL_EXPR. 8832 * decl.c (build_result_decl): If we already have a DECL_RESULT 8833 don't make another. 8834 (dump_function): New. 8835 (java_optimize_inline): New. 8836 (dump_function): New. 8837 88382002-08-13 Jesse Rosenstock <jmr@fulcrummicro.com> 8839 8840 For PR java/7483: 8841 * parse.y (build_assertion): Invert return from 8842 desiredAssertionStatus. 8843 88442002-08-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz> 8845 8846 * jcf-write.c (get_access_flags): Return correct access flags for 8847 private and protected inner classes. 8848 88492002-08-08 Nathan Sidwell <nathan@codesourcery.com> 8850 8851 * java/Make-lang.in (java.mostlyclean): Remove coverage files. 8852 88532002-08-05 Geoffrey Keating <geoffk@redhat.com> 8854 8855 * mangle_name.c: Don't include obstack.h twice. 8856 * xref.c: Don't include obstack.h. 8857 88582002-08-04 Geoffrey Keating <geoffk@redhat.com> 8859 8860 * class.c: (permanent_obstack): Delete declaration. 8861 * constants.c: (permanent_obstack): Delete declaration. 8862 * except.c: (permanent_obstack): Delete declaration. 8863 * expr.c: (permanent_obstack): Delete declaration. 8864 * jcf-parse.c: (permanent_obstack): Delete declaration. 8865 (saveable_obstack): Delete declaration. 8866 * parse.h: (permanent_obstack): Delete declaration. 8867 * typeck.c: (permanent_obstack): Delete declaration. 8868 88692002-08-04 Joseph S. Myers <jsm@polyomino.org.uk> 8870 8871 * gcj.texi (version-gcc): Increase to 3.3. 8872 88732002-07-22 Tom Tromey <tromey@redhat.com> 8874 8875 * lex.c (java_lex): Check for `e' or `E' after 0. 8876 88772002-07-21 Richard Henderson <rth@redhat.com> 8878 8879 * lang.c (java_unsafe_for_reeval): New. 8880 (LANG_HOOKS_UNSAFE_FOR_REEVAL): New. 8881 88822002-07-21 Neil Booth <neil@daikokuya.co.uk> 8883 8884 * jcf-path.c (GET_ENV_PATH_LIST): Remove. 8885 (jcf_path_init): Use GET_ENVIRONMENT. 8886 88872002-07-10 Roger Sayle <roger@eyesopen.com> 8888 Zack Weinberg <zack@codesourcery.com> 8889 8890 * builtins.c (initialize_builtins): Remove defines that 8891 handled C/C++ specific junk hereby removed from builtins.def. 8892 88932002-07-07 Neil Booth <neil@daikokuya.co.uk> 8894 8895 * lang.c (java_post_options): Update prototype. 8896 88972002-07-05 Roger Sayle <roger@eyesopen.com> 8898 8899 * builtins.c (initialize_builtins): Ignore the additional 8900 parameter to DEF_BUILTIN. Handle more C/C++ specific junk in 8901 the builtins.def file. 8902 89032002-07-01 Tom Tromey <tromey@redhat.com> 8904 8905 For PR libgcj/7073: 8906 * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE 8907 specially. 8908 89092002-07-01 Roger Sayle <roger@eyesopen.com> 8910 8911 * java/decl.c (builtin_function): Accept additional parameter. 8912 (java_init_decl_processing): Pass an additional NULL_TREE 8913 argument to builtin_function. 8914 89152002-06-29 T.J. Mather <tjmather@maxmind.com> 8916 8917 * gcj.texi: Fixed gcj invocation example so that it compiles. 8918 89192002-06-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 8920 8921 * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11. 8922 * parse.y (mark_parser_ctxt): Likewise. 8923 (check_modifiers, declare_local_variables): Avoid incorrect 8924 hardcoded constant 10. 8925 8926 * lex.c (java_read_char): Avoid "comparison is always true" 8927 warning. 8928 89292002-06-25 Andreas Schwab <schwab@suse.de> 8930 8931 * expr.c (JSR): Avoid undefined operation on PC. 8932 89332002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 8934 8935 * decl.c (clear_binding_level): Const-ify. 8936 89372002-06-13 Akim Demaille <akim@epita.fr> 8938 8939 * parse.y (class_declaration, interface_declaration): Make sure 8940 all their rules have an action, in order to avoid meaningless `$$ 8941 = $1' and their type clashes. 8942 89432002-06-11 Tom Tromey <tromey@redhat.com> 8944 8945 * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC. 8946 * parse-scan.y (statement_without_trailing_substatement): Added 8947 assert_statement. 8948 (assert_statement): New rule. 8949 * java-tree.h (struct lang_type) [assertions]: New field. 8950 (TYPE_USES_ASSERTIONS): New macro. 8951 (CLASS_USES_ASSERTIONS): Likewise. 8952 (FIELD_SYNTHETIC): New define. 8953 * lex.c (java_lval;): Added ASSERT_TK. 8954 * parse.y (ASSERT_TK): Added. 8955 (statement_without_trailing_substatement): Added assert_statement. 8956 (assert_statement): New rule. 8957 (build_assertion): New function. 8958 (maybe_generate_pre_expand_clinit): Create and initialize 8959 $assertionsDisabled. 8960 (lookup_package_type): Removed decl. 8961 * keyword.h: Rebuilt. 8962 * keyword.gperf (assert): New token. 8963 89642002-06-10 Akim Demaille <akim@epita.fr> 8965 8966 * parse.y (interface_type_list, class_member_declaration) 8967 (unary_expression_not_plus_minus): Remove duplicate %type. 8968 Whitespace changes. 8969 89702002-06-09 Tom Tromey <tromey@redhat.com> 8971 8972 * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H. 8973 8974 * parse.y (method_header): Give error message in all cases. 8975 Fixes PR java/6865. 8976 89772002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz> 8978 8979 Don't use RTL inlining. Fix for PR java/6820. 8980 * lang.c (LANG_HOOKS_POST_OPTIONS): Define. 8981 (flag_really_inline): New. 8982 (java_decode_option): Set flag_really_inline if -finline-functions 8983 is seen. 8984 (java_post_options): New function. Turn off inlining unless 8985 flag_really_inline is set. 8986 89872002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz> 8988 8989 * gjavah.c (throwable_p): Accept argument as either a classname or 8990 signature fragment. Create null-terminated classname string for super 8991 when calling itself recursively. 8992 (decode_signature_piece): Skip first character from class name 8993 signature when calling throwable_p. 8994 89952002-06-08 H.J. Lu (hjl@gnu.org) 8996 8997 * jcf-path.c (jcf_path_init): Allocate 1 more byte for string. 8998 89992002-06-04 Tom Tromey <tromey@redhat.com> 9000 9001 * jcf-write.c (perform_relocations): Optmize a goto to a goto. 9002 90032002-06-04 Michael Koch <konqueror@gmx.de> 9004 9005 * gcj.texi (Input Options): Fixed typo. 9006 90072002-06-04 Zack Weinberg <zack@codesourcery.com> 9008 9009 * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y, 9010 typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks, 9011 all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE, 9012 and all now-pointless local variables. Rename other local 9013 variables to reflect their not being handles. 9014 9015 * java-tree.h, jcf-dump.c, jcf-io.c: Remove all 9016 #if JCF_USE_STDIO blocks. 9017 9018 * parse.y: Add missing semicolon at end of rule. 9019 90202002-06-03 Geoffrey Keating <geoffk@redhat.com> 9021 9022 * check-init.c (attach_initialized_static_class): Delete, unused. 9023 * parse.y: Use htab_t instead of struct hashtable, update 9024 all uses. 9025 * java-tree.h: Include hashtab.h instead of hash.h. 9026 (struct lang_decl_func): Use htab_t, set up for gengtype. 9027 (struct init_test_hash_entry): Delete. 9028 (struct treetreehash_entry): New. 9029 (java_treetreehash_find): New 9030 (java_treetreehash_new): New prototype. 9031 (java_treetreehash_create): New prototype. 9032 (java_mark_tree): Delete prototype. 9033 (java_hash_hash_tree_node): Delete prototype. 9034 (java_hash_compare_tree_node): Delete prototype. 9035 (attach_initialized_static_class): Delete prototype. 9036 * expr.c (build_class_init): Update to use java_treetreehash 9037 functions. 9038 (java_expand_expr): Update to use htab_t. 9039 (emit_init_test_initialization): Likewise. 9040 * decl.c (java_mark_tree): Delete. 9041 * class.c (init_test_hash_newfunc): Delete. 9042 (java_hash_hash_tree_node): Delete. 9043 (java_hash_compare_tree_node): Delete. 9044 (add_method_1): Update to use java_treetreehash functions. 9045 (JAVA_TREEHASHHASH_H): New macro. 9046 (java_treetreehash_hash): New function. 9047 (java_treetreehash_compare): New function. 9048 (java_treetreehash_find): New function. 9049 (java_treetreehash_new): New function. 9050 (java_treetreehash_create): New function. 9051 * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H. 9052 9053 * Make-lang.in (java/parse.o): Depend on debug.h. 9054 * java-tree.h (struct lang_identifier): Use gengtype. 9055 (union lang_tree_node): New. 9056 (struct lang_decl_func): Use gengtype. 9057 (struct lang_decl_var): Likewise. 9058 (struct lang_decl): Likewise. 9059 * parse.y: Include debug.h. 9060 * lang.c (LANG_HOOKS_MARK_TREE): Delete. 9061 9062 * lang.c (struct language_function): New dummy structure. 9063 9064 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set 9065 descriminator for DECL_LANG_SPECIFIC. 9066 (struct lang_decl_func): Rename from struct lang_decl. 9067 (enum lang_decl_desc): New. 9068 (struct lang_decl): Make it a union. Update all the accessor macros. 9069 (struct lang_type): Use gengtype. 9070 * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC. 9071 * decl.c (java_dup_lang_specific_decl): All lang_decl structures 9072 are now the same size. 9073 (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC; 9074 use discriminator to mark DECL_LANG_SPECIFIC. 9075 9076 * Make-lang.in (gt-java-builtins.h): New rule. 9077 (java/builtins.o): Add dependency on gt-<filename>.h. 9078 * builtins.c: Use gengtype for roots. 9079 (union string_or_tree): Use gengtype. 9080 (struct builtin_record): Use gengtype. 9081 * config-lang.in (gtfiles): Add builtins.c. 9082 9083 * Make-lang.in (gt-java-class.h, gt-java-constants.h, 9084 gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h, 9085 gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h, 9086 gt-java-parse.h, gtype-java.h): Add rules to generate. 9087 (parse.o): Add dependency on gt-java-parse.h, gt-java.h. 9088 (class.o): Add dependency on gt-*.h. 9089 (constants.o): Likewise. 9090 (decl.o): Likewise. 9091 (expr.o): Likewise. 9092 (jcf-parse.o): Likewise. 9093 (jcf-write.o): Likewise. 9094 (lang.o): Likewise. 9095 * config-lang.in (gtfiles): New. 9096 * class.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h. 9097 * constants.c: Replace uses of ggc_add_* with GTY markers. 9098 Include gt-*.h. 9099 * decl.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h. 9100 * expr.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h. 9101 * java-tree.h: Replace uses of ggc_add_* with GTY markers. 9102 * jcf-parse.c: Replace uses of ggc_add_* with GTY markers. 9103 Include gt-*.h. 9104 * jcf-write.c: Replace uses of ggc_add_* with GTY markers. 9105 Include gt-*.h. 9106 * lang.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h. 9107 * mangle.c: Replace uses of ggc_add_* with GTY markers. Include 9108 gt-*.h. 9109 * parse.y: Replace uses of ggc_add_* with GTY markers. Include gt-*.h. 9110 Include gtype-java.h. 9111 91122002-06-02 Tom Tromey <tromey@redhat.com> 9113 9114 Fix for PR java/5913: 9115 * parse.y (patch_binop): Call patch_string on op1. 9116 91172002-06-02 Tom Tromey <tromey@redhat.com> 9118 9119 Fix for PR java/1343, PR java/6336: 9120 * parse.y (make_nested_class_name): Remove extraneous `else'; fix 9121 formatting. Changed return type. 9122 (anonymous_class_counter): Moved to top of file. 9123 (maybe_make_nested_class_name): Append number to class name for 9124 function-local classes. 9125 91262002-05-28 Zack Weinberg <zack@codesourcery.com> 9127 9128 * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h. 9129 * Make-lang.in: Update dependency lists. 9130 91312002-05-18 Mark Mitchell <mark@codesourcery.com> 9132 9133 * gjavah.c (throwable_p): Do not free the name of the class after 9134 passing it to find_class. 9135 * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition. 9136 * jcf-io.c (dirent.h): Include it. 9137 (fnmatch.h): Likewise. 9138 (compare_path): New function. 9139 (java_or_class_file): Likewise. 9140 (memoized_dirlist_entry): New type. 9141 (memoized_dirlist_lookup_eq): New function. 9142 (memoized_dirlists): New variable. 9143 (caching_stat): New function. 9144 (memoized_class_lookup_eq): New function. 9145 (memoized_class_lookups): Likewise. 9146 (find_class): Use memoized_class_lookups and caching_stat. 9147 * jcf.h (JCF_USE_SCANDIR): Define. 9148 * parse.y (java_expand_classes): Write the class files in reverse 9149 order. 9150 91512002-05-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> 9152 9153 * Make-lang.in: Allow for PWDCMD to override hardcoded pwd. 9154 91552002-05-13 Mark Mitchell <mark@codesourcery.com> 9156 9157 * jcf-write.c (write_classfile): Unlink the temporary file if it 9158 cannot be renamed. Use concat to build up the name of the 9159 temporary file. 9160 91612002-05-08 Mark Mitchell <mark@codesourcery.com> 9162 9163 * jcf-write.c (write_classfile): Write the file to a 9164 temporary file and then rename it. 9165 91662002-05-07 Tom Tromey <tromey@redhat.com> 9167 9168 * gjavah.c (throwable_p): Use xstrdup, not strdup. 9169 9170 Fix for PR java/1200: 9171 * gjavah.c (throwable_p): New function. 9172 (decode_signature_piece): Use it. A `WeakReference' isn't the 9173 same as a `jweak'. 9174 Include hashtab.h. 9175 (gcjh_streq): New function. 9176 91772002-05-07 Andreas Jaeger <aj@suse.de> 9178 9179 * parse.y (finish_for_loop): Fix if statement. 9180 91812002-05-06 Tom Tromey <tromey@redhat.com> 9182 9183 Fix for PR java/5941: 9184 * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for 9185 loop update expression. 9186 (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR. 9187 * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro. 9188 91892002-05-04 Mark Wielaard <mark@klomp.org> 9190 9191 For PR java/6519: 9192 * parse.y (build_string_concatenation): Return just op1 only when op2 9193 is null and op1 is a STRING_CST, otherwise always construct a 9194 StringBuffer. 9195 91962002-04-27 Tom Tromey <tromey@redhat.com> 9197 9198 For PR java/6382: 9199 * parse.y (string_convert_int_cst): New function. 9200 (merge_string_cste): Use it. 9201 92022002-04-25 Neil Booth <neil@daikokuya.demon.co.uk> 9203 9204 * java-tree.h (java_parse_file): Update. 9205 (java_set_yydebug): Remove. 9206 * jcf-parse.c (yydebug): Remove. 9207 (java_set_yydebug): Die. 9208 (java_parse_file): Update. 9209 * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove. 9210 92112002-04-24 Tom Tromey <tromey@redhat.com> 9212 9213 For PR java/6425: 9214 * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose 9215 EXPR_WFL_QUALIFICATION of qual_wfl. 9216 92172002-04-23 Per Bothner <per@bothner.com> 9218 9219 * expr.c (PRE_JSR): Call NOTE_LABEL for return address. 9220 * java-tree.h (BCODE_RETURN_TARGET): Removed - never set. 9221 (BCODE_TARGET): Remove BCODE_RETURN_TARGET. 9222 92232002-04-23 Tom Tromey <tromey@redhat.com> 9224 9225 For PR java/6314: 9226 * jvspec.c (lang_specific_driver): Use --resource, not -R. Also 9227 recognize `-fcompile-resource='. 9228 * gcj.texi (Invoking gcj): Use --resource, not -R. Expanded text 9229 a bit. 9230 92312002-04-22 Alexandre Petit-Bianco <apbianco@redhat.com> 9232 9233 * jcf-parse.c: (yyparse): Don't prepend "./" to relative 9234 paths. Fixes PR java/2791. 9235 92362002-04-19 Andrew Haley <aph@redhat.com> 9237 9238 * jcf-write.c (push_long_const): lo, hi: New variables. 9239 Use rshift_double to extract the high part of a 64-bit long. 9240 Use WORD_TO_INT to extract the low part. 9241 9242 * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned 9243 HOST_WIDE_INT for num. Use JPOOL_UINT to get it. 9244 CONSTANT_Double: Use JPOOL_UINT to get both halve of a double. 9245 92462002-04-18 Neil Booth <neil@daikokuya.demon.co.uk> 9247 9248 * typeck.c (incomplete_type_error): Remove. 9249 92502002-04-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz> 9251 9252 * class.c (make_class_data): Set DECL_ALIGN on static class data, 9253 for hash synchronization. 9254 * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects. 9255 * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for 9256 class_type_node. 9257 92582002-04-16 Mark Wielaard <mark@klomp.org> 9259 9260 * jcf-write.c (generate_bytecode_insns): Only write const_0 if not 9261 negative zero. 9262 92632002-04-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz> 9264 9265 Fix for PR java/6294: 9266 * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner 9267 interfaces. 9268 92692002-04-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz> 9270 9271 Fix for PR java/6085: 9272 * parse.y (patch_method_invocation): Always use build_access_to_thisn 9273 to get enclosing "this" argument for inner-class constructor 9274 invocation. Pass correct arguments to build_access_to_thisn. 9275 92762002-04-10 Andreas Jaeger <aj@suse.de> 9277 9278 * gcj.texi (Input Options): Fix extdirs patch. 9279 92802002-04-10 Anthony Green <green@redhat.com> 9281 9282 * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration. 9283 92842002-04-09 Anthony Green <green@redhat.com> 9285 9286 * gcj.texi (Input Options): Add --extdirs documentation. 9287 * jcf-dump.c (OPT_extdirs): New macro. 9288 (options): Add extdirs option. 9289 (help): Describe --extdirs. 9290 (main): Handle OPT_extdirs. 9291 * gjavah.c (OPT_extdirs): New macro. 9292 (options): Add extdirs option. 9293 (help): Describe --extdirs. 9294 (main): Handle OPT_extdirs. 9295 * jcf-path.c (jcf_path_init): Add extdirs support. 9296 (jcf_path_extdirs_arg): New function. 9297 (extensions): New variable to hold extensions path entries. 9298 * jvspec.c: Remove -fextdirs= when compiling main(). 9299 * lang.c (java_decode_option): Handle -fextdirs=. 9300 * jcf.h (jcf_path_extdirs_arg): Declare new function. 9301 * Make-lang.in: Compile jcf-path with version info for use in 9302 identifying the appropriate libgcj.jar. 9303 93042002-04-08 Tom Tromey <tromey@redhat.com> 9305 9306 For PR libgcj/5303: 9307 * .cvsignore: Added rmic.1 and rmiregistry.1. 9308 * gcj.texi (Top): Link to new nodes. 9309 (Invoking rmic): New node. 9310 (Invoking rmiregistry): Likewise. 9311 * Make-lang.in (java.generated-manpages): Added rmic.1 and 9312 rmiregistry.1. 9313 (java.maintainer-clean): Likewise. 9314 ($(srcdir)/java/rmic.1): New target. 9315 ($(srcdir)/java/rmiregistry.1): Likewise. 9316 (java.install-man): Handle rmic.1 and rmiregistry.1. 9317 93182002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz> 9319 9320 * gcj.texi (Invocation): Update JvAttachCurrentThread documentation. 9321 Add note about handling uncaught exceptions. Add an exception handler 9322 to example. 9323 93242002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz> 9325 9326 * parse.y (resolve_qualified_expression_name): Clear "from_super" flag 9327 after using it to patch CALL_EXPR. 9328 93292002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz> 9330 9331 * gcj.texi (Invocation): Document CNI invocation API. 9332 93332002-04-04 Neil Booth <neil@daikokuya.demon.co.uk> 9334 9335 * expr.c (truthvalue_conversion): Rename. Update. 9336 (expand_compare): Update. 9337 * java-tree.h (java_truthvalue_conversion): New. 9338 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. 9339 93402002-04-01 Neil Booth <neil@daikokuya.demon.co.uk> 9341 9342 * java-tree.h (java_mark_addressable): New. 9343 * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine. 9344 * typeck.c (mark_addressable): Rename, update. 9345 93462002-04-01 Neil Booth <neil@daikokuya.demon.co.uk> 9347 9348 * expr.c (build_java_binop): Update. 9349 * java-tree.h (java_signed_type, java_unsigned_type, 9350 java_signed_or_unsigned_type): Update. 9351 * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, 9352 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New. 9353 * parse.y (patch_binop): Update. 9354 * typeck.c (signed_or_unsigned_type, unsigned_type, 9355 signed_type): Update. 9356 93572002-03-31 Neil Booth <neil@daikokuya.demon.co.uk> 9358 9359 * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine. 9360 (java_dummy_print): Remove. 9361 (lang_print_error): Rename. Exit early if inhibiting output. 9362 (inhibit_error_printing_function): New. 9363 (java_init): Don't set hook. 9364 (lang_init_source): Use new boolean. 9365 93662002-03-29 Martin Kahlert <martin.kahlert@infineon.com> 9367 9368 * parse.y (do_resolve_class): Fix infinite recursion. 9369 93702002-03-29 Tom Tromey <tromey@redhat.com> 9371 9372 * parse.y (check_inner_circular_reference): Ignore incomplete 9373 types. 9374 93752002-03-29 Neil Booth <neil@daikokuya.demon.co.uk> 9376 9377 * Make-lang.in (builtins.o): Update. 9378 * boehm.c (get_boehm_type_descriptor): Update. 9379 * builtins.c: Include langhooks.h. 9380 * decl.c (java_init_decl_processing): Update. 9381 * java-tree.h (java_type_for_mode, java_type_for_size): New. 9382 * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE): 9383 Redefine. 9384 * typeck.c (type_for_mode, type_for_size): Update. 9385 93862002-03-29 Martin Kahlert <martin.kahlert@infineon.com> 9387 9388 * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING. 9389 93902002-03-28 Tom Tromey <tromey@redhat.com> 9391 9392 * except.c (expand_end_java_handler): If the handler type is NULL, 9393 use java.lang.Throwable. Fixes PR java/5986. 9394 93952002-03-28 Alexandre Petit-Bianco <apbianco@redhat.com> 9396 9397 Fix for PR java/4715: 9398 * jcf-parse.c (parse_source_file_3): New function. 9399 (read_class): Call it. 9400 (java_parse_file): Likewise. 9401 94022002-03-28 Jan Hubicka <jh@suse.cz> 9403 9404 * java/lang.c (java_init_options): Set flag_trapping_math to 0. 9405 94062002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz> 9407 9408 * parse.y (resolve_package): Initialize "decl". 9409 (lookup_package_type): Remove unused function. 9410 94112002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz> 9412 9413 Fix for PR java/5993: 9414 * parse.y (resolve_package): Return the decl if resolution was 9415 successful. Don't special case "java.lang" and "java.lang.reflect" 9416 packages. Set type_name to the merged identifier. 9417 (resolved_qualified_expression_name): Print error using "name" if 9418 resolve_package returns NULL_TREE. 9419 94202002-03-27 Tom Tromey <tromey@redhat.com> 9421 9422 * expr.c (expand_invoke): Don't generate null pointer check if 9423 we're calling <init>. 9424 94252002-03-27 Neil Booth <neil@daikokuya.demon.co.uk> 9426 9427 * expr.c (java_lang_expand_expr): Rename java_expand_expr, 9428 fix prototype. 9429 * java-tree.h (java_lang_expand_expr): Similarly. 9430 * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine. 9431 (java_init): Don't set hook. 9432 94332002-03-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz> 9434 9435 Fix for PR java/5850: 9436 * parse.y (lookup_field_wrapper): Call itself recursively for enclosing 9437 context if field was not found in the current scope. 9438 * expr.c (lookup_field): Don't look in enclosing contexts. 9439 94402002-03-26 Tom Tromey <tromey@redhat.com> 9441 9442 Fix for PR java/5942: 9443 * parse.y (init_src_parse): Added sanity check. 9444 * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12 9445 elements, not 11. 9446 94472002-03-26 Neil Booth <neil@daikokuya.demon.co.uk> 9448 9449 * decl.c (lang_mark_tree): Rename java_mark_tree. 9450 * java-tree.h (java_mark_tree): New. 9451 * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine. 9452 94532002-03-25 Zack Weinberg <zack@codesourcery.com> 9454 9455 * lex.c: Change java_perform_atof to take normal parameters 9456 instead of a pointer to a parameter block. Call it directly 9457 from java_lex. 9458 94592002-03-22 Mark Wielaard <mark@klomp.org> 9460 9461 Fix for PR java/5368: 9462 * parse.y (resolve_qualified_expression_name): Use decl not field_decl 9463 when printing error message. 9464 94652002-03-25 Neil Booth <neil@daikokuya.demon.co.uk> 9466 9467 * decl.c (maybe_build_cleanup): Remove. 9468 94692002-03-22 Tom Tromey <tromey@redhat.com> 9470 9471 Andrew Haley <aph@cambridge.redhat.com> 9472 9473 * expr.c (build_field_ref): Don't build a check if the field is a 9474 member of `this'. 9475 94762002-03-21 Eric Blake <ebb9@email.byu.edu> 9477 9478 Fix for PR java/6026: 9479 * lex.c (java_lex): Fix parsing of consecutive floats. 9480 94812002-03-21 Tom Tromey <tromey@redhat.com> 9482 9483 * parse.y (build_access_to_thisn): Stop when FROM is not an inner 9484 class. 9485 94862002-03-21 Neil Booth <neil@daikokuya.demon.co.uk> 9487 9488 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block, 9489 insert_block, getdecls, kept_level_p, global_bindings_p): New. 9490 94912002-03-20 Nic Ferrier <nferrier@tapsellferrier.co.uk> 9492 9493 * gcj.texi: @code{gcj} becomes @command{gcj}. 9494 @code{gcc} becomes @command{gcc}. 9495 GcjRaw changed to gnu.gcc.RawData. 9496 94972002-03-20 Neil Booth <neil@daikokuya.demon.co.uk> 9498 9499 * decl.c (start_java_method): Use new hook. 9500 * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine. 9501 (java_init): Remove old hook. 9502 95032002-03-18 Alexandre Petit-Bianco <apbianco@redhat.com> 9504 9505 * builtins.c (define_builtin): Do nothing if `type' is null. 9506 Fixes PR java/5876. 9507 95082002-03-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz> 9509 9510 * parse.y (parser_check_super_interface): Fix error message 9511 grammar/order. 9512 95132002-03-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 9514 9515 * jcf-parse.c (get_constant): Delete unused variables. 9516 95172002-03-17 Neil Booth <neil@daikokuya.demon.co.uk> 9518 9519 * java-tree.h (java_parse_file): New. 9520 * jcf-parse.c (yyparse): Rename java_parse_file. 9521 * lang.c (LANG_HOOKS_PARSE_FILE): Redefine. 9522 95232002-03-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz> 9524 9525 * parse.y (craft_constructor): Return the constructor decl. 9526 (java_expand_classes): Update comments. 9527 (lookup_method_invoke): Call fix_constructors immediately for 9528 anonymous class. Fixes PR java/5935. 9529 95302002-03-15 Anthony Green <green@redhat.com> 9531 9532 * jcf-parse.c (yyparse): Don't emit class registration 9533 constructor when compiling resource files. 9534 95352002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 9536 9537 * lang.c (java_tree_code_type, java_tree_code_length, 9538 tree_code_name): Delete. 9539 (tree_code_type, tree_code_length, tree_code_name): Define. 9540 (java_init): Don't try to copy into the various tree_code 9541 arrays. 9542 95432002-03-12 Tom Tromey <tromey@redhat.com> 9544 9545 * jcf-parse.c (get_constant) [CONSTANT_String]: String values are 9546 UTF-8, not UCS-2. Fixes PR java/5923. 9547 9548 * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is 9549 a call_expr wrapped in a convert. Fixes PR java/5848. 9550 95512002-03-12 Bryce McKinlay <bryce@waitaki.otago.ac.nz> 9552 9553 * jcf-write.c (write_classfile): Improve error strings. 9554 95552002-03-11 Eric Blake <ebb9@email.byu.edu> 9556 9557 * lex.c: Adjust comments to GNU standards. 9558 95592002-03-11 Eric Blake <ebb9@email.byu.edu> 9560 9561 Fix for PR java/5902: 9562 * lex.c (java_lex): Fix parsing of literals. 9563 95642002-03-11 Bryce McKinlay <bryce@waitaki.otago.ac.nz> 9565 9566 * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr 9567 to prevent it getting evaluated twice in the store checking case. 9568 * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when 9569 examining OBJECT. 9570 95712002-03-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz> 9572 9573 * decl.c (java_init_decl_processing): Make sure class_type_node 9574 alignment is not less than 64 bits if hash synchronization is enabled. 9575 95762002-03-08 Per Bothner <per@bothner.com> 9577 9578 * parse.y (java_complete_lhs): Check if patch_assignment 9579 returned an error-mark. 9580 9581 * parse.y (try_builtin_assignconv): Don't special-case zero. 9582 95832002-03-08 Per Bothner <per@bothner.com> 9584 9585 Fix for PR java/5812. 9586 * expr.c (build_java_jsr): Take pc arguments, and do lookup_label 9587 here instead of in JSR macro. Likewise with load_type_state call. 9588 Do the latter on if the return_pc has been verified (the jsr returns). 9589 (JSR): Now just call build_java_jsr. 9590 95912002-03-07 Jeff Sturm <jsturm@one-point.com> 9592 9593 * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define. 9594 (java.install-common): Link native driver to 9595 JAVA_TARGET_INSTALL_NAME. 9596 95972002-03-05 David Billinghurst <David.Billinghurst@riotinto.com> 9598 9599 * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED 9600 * builtins.c(sin_builtin): Likewise 9601 * builtins.c(sqrt_builtin): Likewise 9602 96032002-03-03 Zack Weinberg <zack@codesourcery.com> 9604 9605 * java/expr.c, java/jcf-parse.c, java/lex.c: 9606 Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef 9607 REAL_ARITHMETIC blocks unconditional. Delete some further 9608 #ifdef blocks predicated on REAL_ARITHMETIC. 9609 96102002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 9611 9612 * class.c (init_class_processing): Use ARRAY_SIZE in lieu of 9613 explicit sizeof/sizeof. 9614 * decl.c (java_init_decl_processing): Likewise. 9615 * jcf-parse.c (init_jcf_parse): Likewise. 9616 * parse.y (init_src_parse): Likewise. 9617 96182002-03-02 Per Bothner <per@bothner.com> 9619 9620 Make --CLASSPATH by a synonym for --classpath and -classpath. 9621 Implement --bootclasspath. 9622 * jcf-path.c (classpath_u): Rename static variable to classpath_user. 9623 (classpath_l): Remove. 9624 (jcf_path_CLASSPATH_arg): Remove. 9625 (jcf_path_bootclasspath_arg): New function. 9626 (jcf_path_seal): Simplify accordingly. 9627 9628 * jcf.h (jcf_path_bootclasspath_arg): New declarations. 9629 (jcf_path_CLASSPATH): Remove declaration. 9630 * jvspec.c (jvgenmain_spec): Also accept -fbootclasspath*. 9631 (lang_specific_driver): Translate -bootclasspath. 9632 * lang-options.h: Add --bootclasspath. Update --CLASSPATH. 9633 * lang.c (decode_lang_options): Do jcf_path_init first. 9634 Handle -fCLASSPATH same as -fclasspath. Also process -fbootclasspath. 9635 * gjavah.c: Also handle --bootclasspath. 9636 Handle --CLASSPATH as a synonum for --classpath. 9637 * jcf-dump.c: Likewise. 9638 9639 "." is not part of system path, but is the default for --classpath. 9640 * jcf-path.c (jcf_path_init): Don't add "." to sys_dirs. 9641 (jcf_path_seal): Add "." if no CLASSPATH specified. 9642 9643 * gcj.texi: Document changes. 9644 96452002-03-01 Bryce McKinlay <bryce@waitaki.otago.ac.nz> 9646 9647 * expr.c (build_java_arraystore_check): Fix formatting. 9648 96492002-02-28 Alexandre Petit-Bianco <apbianco@redhat.com> 9650 9651 Fix for PR java/5758, java/5632: 9652 * jcf-parse.c (load_class): Renamed local variable, consider `.' an 9653 inner-class separator too. 9654 * parse.y (do_resolve_class): New local `decl_result.' 9655 Progressively build a name for what can have been loaded. 9656 96572002-02-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz> 9658 9659 * expr.c (java_array_data_offset): Removed function. 9660 (JAVA_ARRAY_LENGTH_OFFSET): Removed macro. 9661 (build_java_array_length_access): Obtain "length" value using a 9662 COMPONENT_REF, instead of INDIRECT_REF and arithmetic. 9663 (build_java_arrayaccess): Correct comment. Access "data" using a 9664 COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF. 9665 (build_java_arraystore_check): New function. 9666 (expand_java_arraystore): Use build_java_arraystore_check. 9667 * parse.y (patch_assignment): Simplify code to insert a store check 9668 when lvalue is an ARRAY_REF. Use build_java_arraystore_check. 9669 * check-init.c (check_init): Update to reflect that an array length 9670 access is now a COMPONENT_REF. 9671 * gcj.texi (Code Generation): Improve documentation of 9672 -fno-bounds-check. Add documentation for -fno-store-check. 9673 * java-tree.h (flag_store_check): Declare. 9674 (build_java_arraystore_check): Declare. 9675 * lang.c (flag_store_check): Initialize to 1. 9676 (lang_f_options): Add store-check option. 9677 * jvspec.c: Don't pass store-check option to jvgenmain. 9678 * lang-options.h: Add help string for -fno-store-check. 9679 96802002-02-28 Neil Booth <neil@daikokuya.demon.co.uk> 9681 9682 * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl. 9683 * java-tree.h (java_dup_lang_specific_decl): New. 9684 * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine. 9685 96862002-02-27 Zack Weinberg <zack@codesourcery.com> 9687 9688 * builtins.c, decl.c: Delete traditional-mode-related code 9689 copied from the C front end but not used, or used only to 9690 permit the compiler to link. 9691 96922002-02-22 Tom Tromey <tromey@redhat.com> 9693 9694 Fix for PR java/2369: 9695 * jvspec.c (verify_class_name): New function. 9696 (lang_specific_driver): Call it. 9697 (JAVA_START_CHAR_P): New macro. 9698 (JAVA_PART_CHAR_P): Likewise. 9699 97002002-02-22 Per Bothner <per@bothner.com> 9701 9702 * class.c: Change vtable to be more compatible with g++ v3 abi. 9703 (get_dispatch_table): Prepend offset-to-top (always 0) and 9704 type_info pointer (currently unimplemented hence NULL) to vtable. 9705 Specifically, prepend offset-to-top and typeinfo ptr (currently null). 9706 (make_class_data): Variable dtable_start_offset is sizeof 2 pointers. 9707 Adjust vtable pointers by dtable_start_offse - i.e. skip new words. 9708 (build_dtable_decl): Add declarations for new fields. 9709 97102002-02-20 Per Bothner <per@bothner.com> 9711 9712 * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call 9713 to finit$ (otherwise generate_bytecode_insns drops it). However, we 9714 don't need to set it on the COMPOUND_EXPR - the caller does that. 9715 97162002-02-20 Nic Ferrier <nferrier@tapsellferrier.co.uk> 9717 9718 * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option 9719 `--CLASSPATH' becomes `--classpath.' 9720 * gjavah.c: Likewise. 9721 * jcf-dump.c: Likewise. 9722 * lang-options.h: Likewise. 9723 * lang.c: Likewise. 9724 * jcf-path.c: Updated comment. 9725 (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.' 9726 (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.' 9727 * jcf.h (jcf_path_CLASSPATH_arg): Ditto. 9728 (jcf_path_CLASSPATH_arg): Ditto. 9729 (classpath_u): Updated leading comment. 9730 97312002-02-20 Per Bothner <per@bothner.com> 9732 9733 * builtins.c (check_for_builtin): New function. 9734 (build_call_or_builtin): Remove. 9735 * java-tree.h: Update accordingly. 9736 * expr.c (expand_invoke): Use build + check_for_builtin instead 9737 of build_call_or_builtin. 9738 * parse.y (patch_invoke): Likewise. This avoids needlessly creating 9739 a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER 9740 flag (which had caused jcf-write to incorrectly emit invokevirtual). 9741 97422002-02-17 Tom Tromey <tromey@redhat.com> 9743 9744 * java-tree.h (TYPE_STRICTFP): New macro. 9745 (struct lang_type) [strictfp]: New field. 9746 (CLASS_STRICTFP): New macro. 9747 (METHOD_STRICTFP): New macro. 9748 (struct lang_decl) [strictfp]: New field. 9749 * parse.y (method_header): Disallow strictfp constructor or 9750 abstract method. 9751 (STRICT_TK): Move before MODIFIER_TK. 9752 * parse.h (CLASS_MODIFIERS): Added ACC_STRICT. 9753 (METHOD_MODIFIERS): Likewise. 9754 (INTERFACE_MODIFIERS): Likewise. 9755 * jcf-write.c (get_access_flags): Likewise. 9756 * class.c (set_class_decl_access_flags): Recognize ACC_STRICT. 9757 (add_method_1): Likewise. 9758 (get_access_flags_from_decl): Likewise. 9759 * jcf-dump.c (print_access_flags): Print in standard order. Also, 9760 recognize strictfp flag. 9761 * jcf.h (ACC_STRICT): New define. 9762 97632002-02-12 David Billinghurst <Davod.Billinghurst@riotinto.com> 9764 9765 * class.c(build_utf8_ref): Move declaration of decl_size 9766 97672002-02-07 Tom Tromey <tromey@redhat.com> 9768 9769 * gcj.texi (Input Options): --CLASSPATH does not suppress system 9770 path. 9771 97722002-02-04 Anthony Green <green@redhat.com> 9773 9774 * class.c (build_utf8_ref): Put UTF-8 constants into merged 9775 sections if available. 9776 97772002-02-04 Bryce McKinlay <bryce@waitaki.otago.ac.nz> 9778 9779 * parse.y (java_expand_classes): Fix typo in static field loop. 9780 97812002-02-02 Richard Henderson <rth@redhat.com> 9782 9783 * class.c (add_field): Mark static fields external. 9784 (build_class_ref): Remove redundant set. 9785 * parse.y (java_expand_classes): Mark static fields of classes 9786 to be compiled as local. 9787 * jcf-parse.c (parse_class_file): Likewise. 9788 97892002-02-02 Nic Ferrier <nferrier@tapsellferrier.co.uk> 9790 9791 * gcj.texi (About CNI): New node. 9792 97932002-02-01 Craig Rodrigues <rodrigc@gcc.gnu.org> 9794 9795 PR java/5080 9796 * jcf-parse.c : Check for HAVE_LOCALE_H before using 9797 setlocale() with LC_CTYPE as a parameter. 9798 * jv-scan.c: Same. 9799 98002002-01-31 Joseph S. Myers <jsm28@cam.ac.uk> 9801 9802 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version): 9803 Follow GNU Coding Standards for --version. 9804 98052002-01-28 Tom Tromey <tromey@redhat.com> 9806 9807 * expr.c (build_jni_stub): Ensure storage for `meth' is 9808 generated. 9809 * parse.y (java_complete_expand_methods): Set 9810 current_function_decl before building JNI stub. 9811 98122002-01-26 Andreas Tobler <a.tobler@schweiz.ch> 9813 9814 * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not 9815 BUILT_IN_SQRTF. 9816 98172002-01-22 Tom Tromey <tromey@redhat.com> 9818 9819 * decl.c (java_init_decl_processing): Use add_predefined_file. 9820 Predefine RawData.java. 9821 (predef_filenames): Removed. 9822 (java_init_decl_processing): Don't register predef_filenames. 9823 * jcf-parse.c (add_predefined_file): New function. 9824 (predefined_filename_p): Rewrote. 9825 (predefined_filename_p): No longer static. 9826 * decl.c (java_init_decl_processing): Call initialize_builtins. 9827 * Make-lang.in (JAVA_OBJS): Added builtins.o. 9828 (java/builtins.o): New target. 9829 * builtins.c: New file. 9830 * parse.y (patch_invoke): Use build_call_or_builtin. 9831 * java-tree.h (build_call_or_builtin): Declare. 9832 (initialize_builtins): Declare. 9833 (java_set_exception_lang_code): Removed unused declaration. 9834 (PREDEF_FILENAMES_SIZE): Removed. 9835 (java_tree_index): Added JTI_PREDEF_FILENAMES. 9836 (predef_filenames): New define. 9837 (add_predefined_file): Declare. 9838 (predefined_filename_p): Declare. 9839 * expr.c (expand_invoke): Use build_call_or_builtin. 9840 98412002-01-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 9842 9843 * parse.y (patch_switch_statement): Fix format specifier. 9844 98452002-01-16 Tom Tromey <tromey@redhat.com> 9846 9847 More for PR java/5365: 9848 * gjavah.c (print_stub_or_jni): Cause exception to be thrown by 9849 default. 9850 (process_file): Generate include for 9851 java.lang.UnsupportedOperationExceptions. 9852 98532002-01-15 Andreas Jaeger <aj@suse.de> 9854 9855 * .cvsignore: Add man pages. 9856 98572002-01-15 Tom Tromey <tromey@redhat.com> 9858 9859 Fix for PR java/5365: 9860 * gjavah.c (process_file): Turn class name into a file name. 9861 98622002-01-14 Matthias Klose <doko@debian.org> 9863 9864 * gcj.texi: Fix whitespace and formatting errors in the 9865 synopsis of the man pages. Update copyright. 9866 98672002-01-14 Tom Tromey <tromey@redhat.com> 9868 9869 For PR libgcj/5303: 9870 * Make-lang.in (java.install-man): Handle jv-convert man page. 9871 (java.generated-manpages): Added jv-convert.1. 9872 (java.uninstall): Remove jv-convert.1. 9873 (java.maintainer-clean): Likewise. 9874 ($(srcdir)/java/jv-convert.1): New target. 9875 * gcj.texi (Top): Link to jv-convert node. 9876 (Individual utilities): Likewise. 9877 (Invoking jv-convert): New node. 9878 98792001-01-10 Jeff Sturm <jsturm@one-point.com> 9880 Martin Kahlert <martin.kahlert@infineon.com> 9881 9882 * jcf-parse.c (get_constant): Don't swap lo/hi for big 9883 endian targets when HOST_BITS_PER_WIDE_INT >= 64. 9884 98852002-01-03 Graham Stott <grahams@redhat.com> 9886 9887 * class.c (compile_resource_file): Update copyright date. 9888 Constify filename parameter. 9889 (java-tree.h): Update copyright date. 9890 (compile_resource_file): Constify filename parameter. 9891 98922002-01-03 Graham Stott <grahams@redhat.com> 9893 9894 * gcc/jcf-parse.c: Update copyright date. 9895 (yyparse): Constify resource_filename. 9896 98972002-01-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 9898 9899 * parse.y (src_parse_roots): Don't needlessly zero init. 9900 99012001-12-31 Tom Tromey <tromey@redhat.com> 9902 9903 * parse.y (dump_java_tree): New function. 9904 (source_end_java_method): Call it. 9905 (end_class_declaration): Likewise. 9906 * lang.c (java_decode_option): Call dump_switch_p. 9907 99082001-12-28 Tom Tromey <tromey@redhat.com> 9909 9910 * gen-table.pl: Don't process characters after \uffff. Added 9911 comment pointing to input file. 9912 99132001-12-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 9914 9915 * gen-table.pl: Const-ify output. Document the location of a 9916 suitable unicode input file. 9917 9918 * chartables.h: Regenerate. 9919 99202001-12-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 9921 9922 * chartables.h: Const-ify. 9923 * gjavah.c (options): Likewise. 9924 * jcf-dump.c (options): Likewise. 9925 * jv-scan.c (options): Likewise. 9926 * lex.c (java_start_char_p, java_part_char_p): Likewise. 9927 * parse.y (binop_lookup): Likewise. 9928 99292001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 9930 9931 * Make-lang.in (keyword.h): Pass -C to gperf to const-ify 9932 the static arrays that are output. 9933 * jvspec.c (jvgenmain_spec): Make static. 9934 * keyword.gperf (struct java_keyword, java_keyword): Const-ify. 9935 * keyword.h: Regenerate. 9936 * lang.c (string_option, process_option_with_no, lang_f_options, 9937 lang_W_options): Const-ify. 9938 * lex.c (java_lex): Likewise. 9939 99402001-12-21 Richard Henderson <rth@redhat.com> 9941 9942 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into .. 9943 (get_boehm_type_descriptor): ... here. Arrange for the 9944 TREE_TYPE to get set properly. 9945 99462001-12-21 Richard Henderson <rth@redhat.com> 9947 9948 * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor 9949 only if the target requires collect2. 9950 9951 * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL. 9952 99532001-12-20 Tom Tromey <tromey@redhat.com> 9954 9955 For PR java/4509: 9956 * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute 9957 CAN_COMPLETE_NORMALLY for the node. 9958 * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't 9959 generate code for second branch if first branch can't complete 9960 normally. 9961 (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to 9962 the loop head if the loop body can't complete normally. 9963 99642001-12-20 Tom Tromey <tromey@redhat.com> 9965 9966 For PR java/4766: 9967 * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle 9968 case where `finally' clause can't complete normally. 9969 99702001-12-20 Tom Tromey <tromey@redhat.com> 9971 9972 Fixes PR java/5057: 9973 * parse.y (analyze_clinit_body): Added this_class parameter. 9974 Check for more cases where we must keep <clinit>. 9975 (maybe_yank_clinit): Cleaned up flow control. 9976 99772001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz> 9978 9979 * decl.c (java_init_decl_processing): Don't initialize 9980 finit_leg_identifier_node. 9981 * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE. 9982 (finit_leg_identifier_node): Remove. 9983 (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE. 9984 99852001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz> 9986 9987 * mangle.c (mangle_member_name): Don't special-case for 9988 NO_DOLLAR_IN_LABEL. 9989 * mangle_name.c (unicode_mangling_length): Likewise. 9990 (append_unicode_mangled_name): Likewise. 9991 * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL 9992 code. 9993 99942001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz> 9995 9996 * expr.c (build_java_array_length_access): Don't force null pointer 9997 check unless flag_check_references is set. 9998 99992001-12-20 Tom Tromey <tromey@redhat.com> 10000 10001 Fix for PR java/3417: 10002 * parse.y (patch_assignment): Added special processing for 10003 `return'. 10004 (patch_return): Don't convert booleans to integers, and don't 10005 special-case `null'. 10006 100072001-12-20 Joseph S. Myers <jsm28@cam.ac.uk> 10008 10009 * config-lang.in (diff_excludes): Remove. 10010 100112001-12-17 Joseph S. Myers <jsm28@cam.ac.uk> 10012 10013 * gcj.texi: Update link to GCC manual. 10014 100152001-12-17 Tom Tromey <tromey@redhat.com> 10016 10017 * parse.y (link_nested_class_to_enclosing): Removed useless 10018 statement. 10019 100202001-12-16 Tom Tromey <tromey@redhat.com> 10021 10022 * mangle.c (mangle_method_decl): Never emit `C2' constructor. 10023 Fixes PR java/5088. 10024 100252001-12-16 Joseph S. Myers <jsm28@cam.ac.uk> 10026 10027 * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h, 10028 jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix 10029 spelling errors. 10030 100312001-12-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 10032 10033 * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value. 10034 100352001-12-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz> 10036 10037 * decl.c (java_init_decl_processing): Build otable_type correctly. 10038 otable_decl is an otable_type. 10039 100402001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz> 10041 10042 * java-tree.h (otable_methods, otable_decl, otable_syms_decl, 10043 otable_type, otable_ptr_type, method_symbol_type, 10044 method_symbols_array_type, method_symbols_array_ptr_type): New 10045 field/global tree definitions. 10046 (flag_indirect_dispatch): New flag. 10047 * decl.c (java_init_decl_processing): Initialize new otable and 10048 otable_syms type nodes and decls. Add new field "index" to 10049 method_type_node. 10050 * class.c (build_method_symbols_entry): New function. 10051 (make_method_value): Set "index" to to method's vtable index for 10052 virtual methods when indirect-dispatch is not used. 10053 (make_class_data): For indirect-dispatch, don't emit the dtable_decl, 10054 and set vtable_method_count to -1. Set otable and otable_syms field 10055 if indirect-dispatch is used and there was something to put in them. 10056 (build_method_symbols_entry): New function. 10057 (emit_offset_symbol_table): New function. 10058 * expr.c (get_offset_table_index): New function. 10059 (build_invokevirtual): Build array reference to otable at the index 10060 returned by get_offset_table_index, and use the result as the vtable 10061 offset. 10062 (build_invokeinterface): Similar. 10063 * jcf-parse.c (yyparse): If indirect-dispatch, call 10064 emit_offset_symbol_table at the end of compilation, after all classes 10065 have been generated. 10066 * jvspec.c: Don't pass findirect-dispatch to jvgenmain. 10067 * lang.c (flag_indirect_dispatch): Define. 10068 (lang_f_options): Add indirect-dispatch flag. 10069 100702001-12-14 Matthias Klose <doko@debian.org> 10071 10072 * gcj.texi: Markup for man page generation. Document missing 10073 options printed by <tool> --help. 10074 Terminate description of gij's -ms option with a dot. 10075 * Make-lang.in ($(srcdir)/java/*.1): New targets. 10076 (java.generated-manpages java.install-man, java.uninstall, 10077 java-maintainer-clean) Updated. 10078 100792001-12-14 Hans Boehm <Hans_Boehm@hp.com> 10080 10081 * class.c (get_dispatch_table): Fix java vtable layout 10082 for TARGET_VTABLE_USES_DESCRIPTORS. 10083 * decl.c (java_init_decl_processing): Initialize 10084 alloc_no_finalizer_node, finalize_identifier_node. 10085 * expr.c (class_has_finalize_method): New function. 10086 (expand_java_NEW): Generate calls for finalizer-free allocation. 10087 (build_invokevirtual): Fix java vtable layout for 10088 TARGET_VTABLE_USES_DESCRIPTORS. 10089 * java-tree.h (enum java_tree_index): New entries: 10090 JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE. 10091 (alloc_no_finalizer_node, finalize_deintifier_node): New macros. 10092 (class_has_finalize_method): declare. 10093 (HAS_FINALIZER_P): New macro. 10094 * parse.y (patch_invoke): Generate calls for finalizer-free 10095 allocation. 10096 100972001-12-12 Matthias Klose <doko@debian.org> 10098 10099 * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove 10100 whitespace at end of line. 10101 101022001-12-11 Tom Tromey <tromey@redhat.com> 10103 10104 * lex.c (java_init_lex): Define wfl_to_string as 10105 gnu.gcj.runtime.StringBuffer unless generating bytecode. 10106 101072001-12-11 Jeff Sturm <jsturm@one-point.com> 10108 10109 * class.c (make_method_value): Use null_pointer_node to 10110 represent empty exception table. 10111 101122001-12-10 Tom Tromey <tromey@redhat.com> 10113 10114 * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT. 10115 101162001-12-10 Douglas B. Rupp <rupp@gnat.com> 10117 10118 * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION). 10119 101202001-12-09 Per Bothner <per@bothner.com> 10121 10122 * check-init.c (current_switch_has_default): New static field. 10123 (check_init): Case DEFAULT_EXPR: Set current_switch_has_default. 10124 Case SWITCH_EXPR: Save/restore current_switch_has_default. If no 10125 DEFAULT_EXPR seen, simulate a default alternative that copies state. 10126 101272001-12-09 Tom Tromey <tromey@redhat.com> 10128 10129 * check-init.c (check_init): Don't allow pre- or post- increment 10130 or decrement of final variable. 10131 (final_assign_error): Minor error message rewording. 10132 101332001-12-08 Tom Tromey <tromey@redhat.com> 10134 10135 * java-tree.h: Fixed typo. 10136 10137 * gjavah.c (decompile_method): Don't decompile to `return this' 10138 for static methods. 10139 10140 * gjavah.c (cxx_keywords): Re-sorted. 10141 * lex.c (cxx_keywords): Re-sorted. 10142 10143 * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything 10144 else. 10145 10146 * gjavah.c (print_namelet): Clear subnamelets. 10147 (HANDLE_METHOD): Set `method_printed' earlier. 10148 101492001-12-07 Tom Tromey <tromey@redhat.com> 10150 10151 * lang.c (lang_f_options): Added 10152 optimize-static-class-initialization. 10153 (java_decode_option): Removed special case. 10154 101552001-12-07 Per Bothner <per@bothner.com> 10156 10157 * check-init.c (check_init): Fix typo freeing memory twice. 10158 101592001-12-05 Per Bothner <per@bothner.com> 10160 10161 Restore support for static class initialization optimization. 10162 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable. 10163 * check-init.c (check_int): At end of BLOCK handle initialization 10164 blocks, which used to be done in java_complete_expand_method but did 10165 not handle the case where check_for_initialization might allocate 10166 more than a word of bits. 10167 * decl.c (lang_make_tree): The smic field is now a tree. 10168 * expr.c (build_class_init): Set DECL_FUNCTION_INIT_TEST_CLASS field. 10169 * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE): New macro. 10170 10171 * parse.y (emit_test_initialization): Combine hash_lookup calls. 10172 10173 * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): 10174 Change from a hash table to a list. 10175 (struct_lang_decl): Change field 'smic' to match. 10176 * class.c (add_method_1): Initialize 10177 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list. 10178 * parse.y (adjust_init_test_initialization): Removed - inlined into - 10179 (java_expand_method_bodies): -here, since 'smic' is now a list. 10180 (patch_invoke): Add to 'smic' list, instead of hash_lookup. 10181 10182 * check-init.c (WORD_SIZE): Use BITS_PER_UNIT. 10183 10184 * class.c (java_hash_compare_tree_node): Fix casts. 10185 101862001-12-04 Per Bothner <per@bothner.com> 10187 10188 * check-init.c: Handle definite unassignment to finals in addition 10189 to definite assignment. 10190 (loop_current_locals): New field. 10191 (num_current_locals, int start_current_locals, num_current_words): 10192 Make static. 10193 (SET_P, CLEAR_P, SET_BIT): Add needed but missing parentheses. 10194 (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED, 10195 CLEAR_ASSIGNED, CLEAR_UNASSIGNED): New macros. 10196 (get_variable_decl, check_final_reassigned): New functions. 10197 (check_init, check_bool_init): Modify as needed for checking finals. 10198 (check_for_initialization): Take extra parameter and return void. 10199 Do extra start-up logic to check final fields for assignment. 10200 * parse.y (check_static_final_variable_assignment_flag, 10201 reset_static_final_variable_assignment_flag, check_final_assignment, 10202 check_final_variable_local_assignment_flag, 10203 reset_final_variable_indirect_assignment_flag, 10204 reset_final_variable_global_assignment_flag): Remove functions. 10205 (java_complete_expand_methods, outer_field_access_fix, 10206 patch_assignment): Remove no-longer used logic. 10207 * java-tree.h (DECL_FIELD_FINAL_IUD): Change usage and comments. 10208 * parse.y (register_fields, java_complete_tree): Update accordingly. 10209 10210 * check-init.c (ALLOC_WORDS/FREE_WORDS): Use xmalloc/free, not alloca. 10211 (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER): New. 10212 (check_cond_init, check_bool2_init): Use DECLARE_BUFFERS. 10213 10214 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Temporarily turn off. 10215 10216 * java-tree.h (DECL FINAL): New bit-field. 10217 (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL): Define as DECL_FINAL. 10218 (LOCAL_FINAL_P): Use DECL_FINAL rather than old LOCAL_FINAL. 10219 (DECL_INIT_CALLS_THIS): New macro. 10220 (struct lang_decl): New bit-field init_calls_this. 10221 (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC, 10222 DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE 10223 (DECL_BIT_INDEX): Change to use pointer_alias_set since we now 10224 use it for both local variables and final fields. 10225 (struct lang_decl_var): Remove bit-fields final_liic, final_ierr, 10226 and local_final. 10227 (struct lang_type): Remove hfv bit-field. 10228 (check_for_initialization): Change to return void. 10229 10230 * java-tree.h (IS_ARRAY_LENGTH_ACCESS): New macros. 10231 * expr.c (build_java_array_length_access): Set IS_ARRAY_LENGTH_ACCESS. 10232 * check-init.c (final_assign_error): New helper function. 10233 (check_final_reassigned, check_init): Use it. 10234 (check_init): Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length. 10235 10236 * java-tree.h (struct lang_decl, struct lang_decl_var): Change all 10237 bit-fields to unsigned. 10238 102392001-12-03 Per Bothner <per@bothner.com> 10240 10241 * parse.y (patch_binop): Minor constant folding. 10242 10243 * parse.y (build_current_thisn): Shorter 'buffer'. 10244 102452001-12-03 Per Bothner <per@bothner.com> 10246 10247 * decl.c (complete_start_java_method): Now generate TRY_FINALLY_EXPR 10248 instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR. 10249 * jcf-write.c (generate_bytecode_insns): Remove support for 10250 CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used. 10251 * check-init.c (check_init): Likewise. 10252 102532001-12-03 Per Bothner <per@bothner.com> 10254 10255 * verify.c (subroutine_nesting): New function. 10256 (verify_jvm_instructions): Use it to fix logic for checking that 10257 we're done with the current subroutine. 10258 10259 * verify.c (verify_jvm_instruction): For OPCODE_checkcast and 10260 OPCODE_instanceof use POP_TYPE macro for better diagnostics. 10261 102622001-12-03 Per Bothner <per@bothner.com> 10263 10264 * jcf.h: Fix obvious typo in comment. 10265 * typeck.c (build_null_signature): Add comment. 10266 102672001-12-03 Neil Booth <neil@daikokuya.demon.co.uk> 10268 10269 * expr.c: Remove leading capital from diagnostic messages, as 10270 per GNU coding standards. 10271 * jcf-io.c: Similarly. 10272 * jcf-parse.c: Similarly. 10273 * jv-scan.c: Similarly. 10274 * jvspec.c: Similarly. 10275 * mangle.c: Similarly. 10276 102772001-12-02 Tang Ching-Hui <nicholas@cs.nthu.edu.tw> 10278 Alexandre Petit-Bianco <apbianco@redhat.com> 10279 10280 * expr.c (build_java_arrayaccess): Call save_expr on array for 10281 correct evaluation order, modified comment, fixed indentation. 10282 * parse.y: (patch_assignment): Correctly extract the array base 10283 from the tree generate by build_java_arrayaccess, added comments. 10284 (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF. 10285 Fixes PR java/3096, PR java/3803, PR java/3965. 10286 102872001-12-01 Neil Booth <neil@daikokuya.demon.co.uk> 10288 10289 * expr.c (expand_byte_code): Remove trailing periods from messages. 10290 * jcf-parse.c (load_class, jcf_parse): Similarly. 10291 * jcf-write.c (generate_classfile): Similarly. 10292 * lex.c (java_lex): Similarly. 10293 102942001-11-30 Bryce McKinlay <bryce@waitaki.otago.ac.nz> 10295 10296 * class.c (add_interface_do): Set BINFO_VPTR_FIELD. 10297 102982001-11-29 Joseph S. Myers <jsm28@cam.ac.uk> 10299 10300 * Make-lang.in (java.generated-manpages): New dummy target. 10301 103022001-11-27 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> 10303 10304 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks 10305 ASM_FINAL_SPEC. 10306 (lang_specific_pre_link): Use set_input to set input_filename. 10307 Append `main' here. 10308 * jvgenmain.c (usage): Append literal `main' to CLASSNAME. 10309 (main): Fix definition. 10310 Strip `main' from classname. 10311 Fixes PR java/227. 10312 103132001-11-18 Roger Sayle <roger@eyesopen.com> 10314 10315 * parse.h (java_expand_switch): Remove old prototype. 10316 103172001-11-18 Tom Tromey <tromey@redhat.com> 10318 10319 Fix for PR java/1401: 10320 * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where 10321 arg0 is null. 10322 (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case 10323 correctly. 10324 103252001-11-18 Neil Booth <neil@daikokuya.demon.co.uk> 10326 10327 * lang.c (finish_parse): Rename to java_finish. 10328 (LANG_HOOKS_FINISH, java_finish): New. 10329 103302001-11-15 Neil Booth <neil@daikokuya.demon.co.uk> 10331 10332 * decl.c (init_decl_processing): Rename java_init_decl_processing. 10333 * java-tree.h: New prototype. 10334 * lang.c (java_init): Update prototype. Combine with old init_parse. 10335 103362001-11-13 Tom Tromey <tromey@redhat.com> 10337 10338 * gjavah.c (method_signature): New global. 10339 (HANDLE_METHOD): Set it. 10340 (decompile_return_statement): New function. 10341 (decompile_method): Use it. 10342 (print_method_info): Removed `synth' argument. 10343 103442001-11-09 Neil Booth <neil@daikokuya.demon.co.uk> 10345 10346 * java-tree.h (java_set_yydebug): New. 10347 * jcf-parse.c (set_yydebug): Rename java_set_yydebug. 10348 * lang.c (LANG_HOOKS_SET_YYDEBUG): Override. 10349 (print_lang_decl, print_lang_type, print_lang_identifier, 10350 print_lang_statistics, lang_print_xnode): Remove. 10351 103522001-11-09 Neil Booth <neil@daikokuya.demon.co.uk> 10353 10354 * jcf-parse.c (init_lex): Remove. 10355 * lang.c (language_string, lang_identify): Remove. 10356 (struct lang_hooks): Constify. 10357 (LANG_HOOKS_NAME): Override. 10358 (init_parse): Update. 10359 103602001-11-08 Andreas Franck <afranck@gmx.de> 10361 10362 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle 10363 program_transform_name the way suggested by autoconf. 10364 (java.install-common): Also transform auxiliary program names with 10365 program_transform_name. 10366 103672001-11-08 Tom Tromey <tromey@cygnus.com> 10368 10369 * parse.y (trap_overflow_corner_case): New rule. 10370 (unary_expression): Use it. 10371 * lex.c (java_init_lex): Don't set minus_seen. 10372 (yylex): Don't use minus_seen. Communicate overflow to parser for 10373 it to handle. 10374 (error_if_numeric_overflow): New function. 10375 * parse.h (minus_seen): Removed field. 10376 (JAVA_RADIX10_FLAG): New define. 10377 103782001-11-07 Tom Tromey <tromey@redhat.com> 10379 10380 Patch for PR java/1414: 10381 * parse.y (case_label_list): New global. 10382 (goal): Register case_label_list with GC. 10383 (java_complete_lhs): Save new case on case_label_list. 10384 (patch_switch_statement): Check for duplicate case labels. 10385 103862001-11-07 Alexandre Petit-Bianco <apbianco@redhat.com> 10387 10388 * parse.y (patch_assignment): Removed unused third argument. 10389 (java_complete_lhs): Removed unused third argument to patch_assignment. 10390 103912001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk> 10392 10393 * lang.c: Include langhooks-def.h. 10394 * Make-lang.in: Update. 10395 103962001-10-31 Zack Weinberg <zack@codesourcery.com> 10397 10398 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated. 10399 104002001-10-29 Bryce McKinlay <bryce@waitaki.otago.ac.nz> 10401 10402 * mangle.c (find_compression_record_match): Don't match compression 10403 records for package name elements unless they occur at the start of 10404 the name. Fix for PR java/4717. 10405 104062001-10-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz> 10407 10408 * expr.c (expand_java_field_op): Don't special-case references to 10409 java.lang.PRIMTYPE.TYPE. 10410 (build_primtype_type_ref): Removed. 10411 * java-tree.h (build_primtype_type_ref): Remove prototype. 10412 * parse.y (maybe_build_primttype_type_ref): Removed. 10413 (complete_function_arguments): Don't special-case references to 10414 java.lang.PRIMTYPE.TYPE. 10415 (patch_assignment): Likewise. 10416 (array_constructor_check_entry): Likewise. 10417 104182001-10-24 Alexandre Petit-Bianco <apbianco@redhat.com> 10419 10420 * mangle.c (static tree compression_table): Fixed leading comment. 10421 * parse.h (struct parser_ctxt): Fixed field comment. 10422 * parse.y (check_pkg_class_access): New prototype, fixed leading 10423 comment, new parameter used to emit error only if passed as true. 10424 (parse_check_super): Pass extra argument to check_pkg_class_access. 10425 (do_resolve_class): Likewise. 10426 (process_imports): Likewise. 10427 (read_import_dir): Fixed indentation. 10428 (find_in_imports_on_demand): New local class_type_name. Local 10429 node_to_use deleted. while loop changed into for loop. Report 10430 multiple definition only for accessible classes. Improved error 10431 message. 10432 (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS 10433 assigned to parameter list, fixed indentation. while loop changed 10434 into for loop, restore TREE_CHAIN on local `tem' before the next 10435 iteration. 10436 104372001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 10438 10439 * lang.c (lang_get_alias_set): Deleted. 10440 104412001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 10442 10443 * gjavah.c (jni_print_char): Fix thinko in last change. 10444 10445 * gjavah.c (jni_print_char, decode_signature_piece): Use 10446 safe-ctype macros and/or fold extra calls into fewer ones. 10447 * lex.c (java_read_unicode, java_lex): Likewise. 10448 * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT, 10449 JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise. 10450 * mangle_name.c (append_unicode_mangled_name, 10451 unicode_mangling_length): Likewise. 10452 104532001-10-17 Richard Henderson <rth@redhat.com> 10454 10455 * Make-lang.in (java/lang.o): Depend on langhooks.h. 10456 104572001-10-15 Alexandre Petit-Bianco <apbianco@redhat.com> 10458 10459 * lang.c (langhooks.h): Included. 10460 (LANG_HOOKS_INIT): Redefined. 10461 (LANG_HOOKS_INIT_OPTIONS): Likewise. 10462 (LANG_HOOKS_DECODE_OPTION): Likewise. 10463 (struct lang_hooks lang_hooks): New initialization. 10464 104652001-10-11 Per Bothner <per@bothner.com> 10466 10467 * parse.y (patch_synchronized_statement): Use a TRY_FINALLY_EXPR 10468 rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair. 10469 The former is simpler, and jcf-write.c handles it better. 10470 (java_complete_lhs): No longer need to handle CLEANUP_POINT_EXPR 10471 or WITH_CLEANUP_EXPR. 10472 * jcf-write.c: Revert Alex's change from 2000-10-18. It is no 10473 longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine. 10474 10475 * parse.y (patch_if_else_statement): If the condition is constant, 10476 optimize away the test. 10477 104782001-10-09 Alexandre Petit-Bianco <apbianco@redhat.com> 10479 10480 * parse.y (patch_cast): Call patch_string on the first operand of 10481 the incoming node, update it if necessary. Fixes PR java/4510. 10482 104832001-10-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz> 10484 10485 * parse.y (find_as_inner_class): Don't disregard the enclosing scope 10486 when name qualifier matches a package name. 10487 104882001-10-08 Tom Tromey <tromey@redhat.com> 10489 10490 Fix for PR java/4489: 10491 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always 10492 force a new label when computing `body_block'. 10493 104942001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 10495 10496 * jcf-io.c (format_uint): Const-ify. 10497 * lang.c (java_tree_code_type, java_tree_code_length): Likewise. 10498 * lex.c (java_get_line_col): Likewise. 10499 * parse.y (build_incdec): Likewise. 10500 105012001-10-05 Alexandre Petit-Bianco <apbianco@redhat.com> 10502 10503 * parse.y (register_incomplete_type): Set JDEP_SUPER to be given 10504 a NULL enclosing context if appropriate. Fixes PR java/4466. 10505 105062001-10-03 Alexandre Petit-Bianco <apbianco@redhat.com> 10507 10508 * parse.y (patch_assignment): Use lvalue's original TYPE when 10509 building the final COMPOUND_EXPR. 10510 (try_reference_assignconv): Fixed leading comment. 10511 105122001-09-26 Alexandre Petit-Bianco <apbianco@redhat.com> 10513 10514 * parse.y (check_final_variable_indirect_assignment): For 10515 COMPOUND_EXPR, return only if finals were found initialized 10516 properly, if not, keep on checking. 10517 (check_final_variable_global_assignment_flag): New local 10518 error_found, set when appropriate and used to decide whether to 10519 report uninitialized finals. Fixed typo in comment. 10520 105212001-09-22 Alexandre Petit-Bianco <apbianco@redhat.com> 10522 10523 * decl.c (init_decl_processing): Fixed typo in predef_filenames 10524 last three initializations. Fixes PR java/4360. 10525 105262001-09-21 Richard Henderson <rth@redhat.com> 10527 10528 * class.c (get_dispatch_table): Handle function descriptors. 10529 (build_dtable_decl): Likewise. 10530 * expr.c (build_invokevirtual): Likewise. 10531 105322001-09-20 Alexandre Petit-Bianco <apbianco@redhat.com> 10533 10534 * parse.y (patch_method_invocation): Build class initialization 10535 when static finals are used to qualify method invocation. 10536 Fixes PR java/4366. 10537 105382001-09-19 Alexandre Petit-Bianco <apbianco@redhat.com> 10539 10540 * parse.h: (WFL_STRIP_BRACKET): Re-written using 10541 build_type_name_from_array_name. 10542 (STRING_STRIP_BRACKETS): New macro. 10543 * parse.y (build_type_name_from_array_name): New function. 10544 (array_creation_expression:): Accumulate []s instead of [s. 10545 (cast_expression:): Accumulate []s instead of [s after cast type 10546 name. 10547 (build_array_from_name): Local string deleted, use 10548 build_type_name_from_array_name. 10549 (build_unresolved_array_type): Accumulate []s instead of [s after 10550 type name. 10551 (register_fields): Fixed comment. 10552 (resolve_class): Local name, base deleted, new locals tname and 10553 array_dims. Use build_type_name_from_array_name. Use array_dims to 10554 build array type. 10555 (purify_type_name): Use STRING_STRIP_BRACKETS. 10556 105572001-09-18 Andreas Jaeger <aj@suse.de> 10558 10559 * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout. 10560 * jv-scan.c: Likewise. 10561 105622001-09-17 Alexandre Petit-Bianco <apbianco@redhat.com> 10563 10564 * parse.y (patch_method_invocation): Inner class creation context 10565 check not enforced within constructors. Fixes PR java/1873. 10566 105672001-09-16 Tom Tromey <tromey@redhat.com> 10568 10569 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call 10570 NOTE_PUSH for single-case push. Fixes PR java/4189. 10571 105722001-09-13 Alexandre Petit-Bianco <apbianco@redhat.com> 10573 10574 * java-tree.h (TYPE_IMPORT_LIST): New macro. 10575 (TYPE_IMPORT_DEMAND_LIST): Likewise. 10576 (struct lang_type): New fields import_list and import_demand_list. 10577 * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and 10578 TYPE_IMPORT_DEMAND_LIST with ctxp counterparts. 10579 (do_resolve_class): New local saved_enclosing_type, initialized, 10580 passed as parameter to find_in_imports and find_in_imports_on_demand. 10581 (find_in_imports): Added paramater enclosing_type, use its 10582 TYPE_IMPORT_LIST when applicable. 10583 (find_in_imports_on_demand): Added parameter enclosing_type, use 10584 its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals 10585 declaration and initialization. 10586 (fold_constant_for_init): Switch/restore current_class to the 10587 appropriate context. 10588 105892001-09-13 Mark Mitchell <mark@codesourcery.com> 10590 10591 * verify.c (verify_jvm_instructions): Fix typo. 10592 105932001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 10594 10595 * expr.c (expand_invoke): Const-ification. 10596 * parse.y (patch_method_invocation): Likewise. 10597 105982001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 10599 10600 * gjavah.c (cxx_keywords): Const-ification. 10601 * keyword.gperf (java_keyword): Likewise. 10602 * lang.c (java_tree_code_name): Likewise. 10603 * lex.c (cxx_keywords): Likewise. 10604 * parse.y (java_parser_context_suspend, merge_string_cste): Likewise. 10605 106062001-09-11 Richard Henderson <rth@redhat.com> 10607 10608 * parse.h (ctxp_for_generation): Mark extern. 10609 106102001-09-10 Richard Henderson <rth@redhat.com> 10611 10612 * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl. 10613 106142001-09-07 Matt Kraai <kraai@alumni.carnegiemellon.edu> 10615 10616 * typeck.c (java_array_type_length, build_prim_array_type): 10617 Represent empty arrays by NULL index. 10618 106192001-09-06 Alexandre Petit-Bianco <apbianco@redhat.com> 10620 10621 * java-tree.h (compile_resource_file): Grouped with other prototypes. 10622 * jvspec.c (lang_specific_driver): Removed unused local `ptr.' 10623 106242001-09-06 Anthony Green <green@redhat.com> 10625 10626 * class.c (O_BINARY): Define if necessary. 10627 (registerResource_libfunc): Declare. 10628 (init_class_processing): Initilize registerResource_libfunc. 10629 (compile_resource_file): New function. 10630 * java-tree.h (resource_name): Declare. 10631 (compile_resource_file): Declare. 10632 * jcf-parse.c (yyparse): Handle compiling java resource files. 10633 * lang.c (java_decode_option): Handle -fcompile-resource option. 10634 * jvspec.c (lang_specific_driver): Handle -R flag for compiling 10635 resource files. 10636 * gcj.texi (Code Generation): Add documentation for -R flag. 10637 106382001-09-05 Alexandre Petit-Bianco <apbianco@redhat.com> 10639 10640 * jcf-write.c (generate_classfile): Issue an error in case of 10641 field/initial value mismatch. 10642 * parse.y (analyze_clinit_body): Keep <clinit> if an array is 10643 being initialized and we're generating bytecode. 10644 (java_complete_lhs): In MODIFY_EXPR section: added comments, 10645 set DECL_INITIAL properly when appropriate. 10646 Fixes PR java/4230 10647 Fixes PR java/4204 10648 106492001-09-01 Per Bothner <per@bothner.com> 10650 10651 * parse.y (maybe_yank_clinit): A field without an initializer is not 10652 relevant. All initializers except static final and constant require 10653 <clinit>, regardless of flag_emit_class_files. 10654 106552001-08-31 Per Bothner <per@bothner.com> 10656 10657 * class.c (set_constant_value): When not emitting class files, then a 10658 String ConstantValue is a utf8const_ptr_type. 10659 106602001-08-30 Per Bothner <per@bothner.com> 10661 10662 * jcf-write.c (generate_classfile): Check that field is primitive 10663 or string before emitting ConstantValue attribute. 10664 106652001-08-30 Per Bothner <per@bothner.com> 10666 10667 * parse.y (resolve_qualified_expression_name): If creating a 10668 COMPOUND_EXPR, set it's type correctly. 10669 106702001-08-30 Per Bothner <per@bothner.com> 10671 10672 * jcf-io.c (open_class): Set filename field. 10673 10674 * jcf-parse,c (parse_class_file): Set current_function_decl 10675 for better error message when Code attribute is missing. 10676 10677 * lang.c (put_decl_node, lang_print_error): Re-arrange for 10678 better diagnostics, especially for constructors. 10679 106802001-08-30 Per Bothner <per@bothner.com> 10681 10682 * jcf-write.c (generate_classfile): Don't write ConstantValue 10683 attribute if field is not final, for compatibility with jdk. 10684 10685 * jcf-write.c (generate_classfile): Convert ConstantValue values 10686 to correct type. Work-around for front-end bug. 10687 * class.c (set_constant_value): Error if constant has wrong type. 10688 106892001-08-30 Per Bothner <per@bothner.com> 10690 10691 * jcf-dump.c (print_constant): Fix fencepost error so "Float" and 10692 "Double" are printed at verbosity 1. 10693 10694 * jcf-dump.c (main): Disable flag_print_attributes if --javap. 10695 10696 * jcf-dump.c (SPECIAL_IINC): Remove unneeded casts to long. 10697 106982001-08-30 Alexandre Petit-Bianco <apbianco@redhat.com> 10699 10700 * parse.y (patch_assignment): Don't verify final re-assignment here. 10701 (java_complete_lhs): Verify assignments to finals calling 10702 patch_assignment. Verify re-assignments to finals before calling 10703 patch_assignment. 10704 107052001-08-29 Alexandre Petit-Bianco <apbianco@redhat.com> 10706 10707 * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs. 10708 Fixes PR java/1413 10709 107102001-08-28 Alexandre Petit-Bianco <apbianco@redhat.com> 10711 10712 * lex.c (java_lex): new local found_hex_digits. Set and then used 10713 in test to reject invalid hexadecimal numbers. 10714 * parse.y (java_complete_tree): Prevent unwanted cast with 10715 initialized floating point finals. 10716 (patch_binop): Emit a warning when detecting a division by zero, 10717 mark result not constant, don't simplify non integer division. 10718 107192001-08-28 Per Bothner <per@bothner.com> 10720 10721 * jcf-write.c (generate_bytecode_insns): For increments and 10722 decrements just recurse to push constant. Improvement on Mark's patch. 10723 107242001-08-28 Mark Mitchell <mark@codesourcery.com> 10725 10726 * jcf-write.c (generate_bytecode_insns): Generate an integer to 10727 real conversion for increments and decrements of reals. 10728 107292001-08-27 Alexandre Petit-Bianco <apbianco@redhat.com> 10730 10731 * parse.y (resolve_qualified_expression_name): Handle unresolved 10732 qualified expressions, prevent numerical qualifiers, fixed typo. 10733 Fixes PR java/4141 10734 107352001-08-24 Alexandre Petit-Bianco <apbianco@redhat.com> 10736 10737 * parse.y (check_deprecation): Handle TYPE_DECL in a special case, 10738 don't report anything but deprecated class when marked so. Handle 10739 VAR_DECL. 10740 (patch_method_invocation): Check deprecation on methods and types. 10741 (patch_binop): code becomes an enum tree_code, added default: to 10742 switch to handle that. Detect division by zero, try to fold and 10743 return before using a subroutine. 10744 107452001-08-23 Alexandre Petit-Bianco <apbianco@redhat.com> 10746 10747 * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a 10748 file smaller than 4 bytes. 10749 * parse.y (check_inner_circular_reference): New function. 10750 (check_circular_reference): Likewise. 10751 (array_initializer:): Accept {,}. 10752 (java_check_circular_reference): Rewritten using 10753 check_circular_reference and check_inner_circular_reference. 10754 (java_complete_expand_method): Unconditionally save and restore 10755 the unpurged exception list. 10756 (build_dot_class_method_invocation): Unmangle signature parameter. 10757 107582001-08-21 Tom Tromey <tromey@redhat.com> 10759 10760 * decl.c (init_decl_processing): Add `throws' field to method 10761 descriptor. 10762 * class.c (make_method_value): Compute `throws' field for method. 10763 107642001-08-22 Alexandre Petit-Bianco <apbianco@redhat.com> 10765 10766 * parse.y (resolve_inner_class): Keep local_enclosing to NULL if 10767 circularity is detected. 10768 (ctors_unchecked_throws_clause_p): Fixed leading comment. 10769 107702001-08-17 Richard Henderson <rth@redhat.com> 10771 10772 * class.c (emit_register_classes): Add align parameter to 10773 call to assemble_integer. 10774 107752001-08-16 Alexandre Petit-Bianco <apbianco@redhat.com> 10776 10777 * jcf-parse.c (load_class): New locals saved and class_loaded. If 10778 loading a class_or_name fails, try considering an innerclass name 10779 and load the enclosing context. 10780 * parse.y (resolve_inner_class): New function. 10781 (find_as_inner_class): Added leading comment. 10782 (register_incomplete_type): Keep the current context as enclosing 10783 context for JDEP_FIELD dependencies. 10784 (do_resolve_class): Locals new_class_decl and super initialized to 10785 NULL. Call resolve_inner_class, explore the enclosing context 10786 superclass if necessary. 10787 Fixes PR java/4007 10788 107892001-08-16 Tom Tromey <tromey@redhat.com> 10790 10791 * jcf-dump.c (main): Updated for change to jcf_path_seal. 10792 * gjavah.c (main): Updated for change to jcf_path_seal. 10793 * lang.c (version_flag): New global. 10794 (java_decode_option): Recognize `-version'. 10795 (java_init): Update for change to jcf_path_seal. 10796 * jcf.h (jcf_path_seal): Added `print' argument. 10797 * jcf-path.c (jcf_path_seal): Added `print' argument. 10798 107992001-08-13 Zack Weinberg <zackw@panix.com> 10800 10801 * Make-lang.in (java/decl.o): Update dependencies. 10802 * decl.c: Include libfuncs.h, don't include toplev.h. 10803 108042001-08-12 Alexandre Petit-Bianco <apbianco@redhat.com> 10805 10806 * decl.c (init_decl_processing): exception_type_node, 10807 class_not_found_type_node, and no_class_def_found_type_node 10808 initialized. predef_filenames augmented accordingly. 10809 instinit_identifier_node initialized. 10810 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed. 10811 * java-tree.h (enum java_tree_index): New entries 10812 JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE, 10813 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE. 10814 (exception_type_node): New macro. 10815 (class_not_found_type_node): Likewise. 10816 (no_class_def_found_type_node): Likewise. 10817 (instinit_identifier_node): Likewise. 10818 (PREDEF_FILENAMES_SIZE): Adjusted. 10819 (TYPE_HAS_FINAL_VARIABLE): Fixed typo. 10820 (struct lang_type): Fixed typo in bitfield name. 10821 (DECL_INSTINIT_P): New macro. 10822 (ID_INSTINIT_P): Likewise. 10823 * jcf-write.c (generate_classfile): instinit$ bears the Synthetic 10824 attribute. 10825 * parse.y (encapsulate_with_try_catch): New function. 10826 (generate_instinit): Likewise. 10827 (build_instinit_invocation): Likewise. 10828 (ctors_unchecked_throws_clause_p): Likewise. 10829 (add_instance_initializer): Deleted. 10830 (build_instance_initializer): Likewise. 10831 (in_instance_initializer): Likewise. 10832 (check_method_redefinition): instinit$ not to be verified. 10833 (java_complete_expand_methods): Generate instinit$, simplified code. 10834 (build_dot_class_method): Eliminated unnecessary locals. Use 10835 encapsulate_with_try_catch, removed unnecessary code. 10836 (fix_constructors): New local iii. Use build_instinit_invocation. 10837 (patch_method_invocation): Added comment. 10838 (maybe_use_access_method): Don't consider instinit$. 10839 (find_applicable_accessible_methods_list): Shorten the search for 10840 instinit$ too. 10841 (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed. 10842 (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer. 10843 (patch_throw_statement): Likewise. Fixed typo. 10844 108452001-08-12 David Edelsohn <edelsohn@gnu.org> 10846 10847 Revert: 10848 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> 10849 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks 10850 ASM_FINAL_SPEC. 10851 (lang_specific_pre_link): Use set_input to set input_filename. 10852 Append `main' here. 10853 * jvgenmain.c (usage): Append literal `main' to CLASSNAME. 10854 (main): Fix definition. 10855 Strip `main' from classname. 10856 Fixes PR java/227. 10857 108582001-08-11 Zack Weinberg <zackw@panix.com> 10859 10860 * lex.h: Don't include setjmp.h. Don't define 10861 SET_FLOAT_HANDLER or prototype set_float_handler. 10862 108632001-08-09 Alexandre Petit-Bianco <apbianco@redhat.com> 10864 10865 * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and 10866 `poplevel' in the right order. 10867 108682001-08-09 Richard Henderson <rth@redhat.com> 10869 10870 * Make-lang.in (class.o): Depend on TARGET_H. 10871 * class.c (emit_register_classes): Use target hooks instead of 10872 assemble_constructor and assemble_destructor. 10873 108742001-08-08 Alexandre Petit-Bianco <apbianco@redhat.com> 10875 10876 * check-init.c (flags.h): Include 10877 (check_init): Don't report uninitialized static class 10878 initialization flags, don't free bit index when doing static class 10879 initialization optimization. 10880 (check_for_initialization): Return type changed to `unsigned int.' 10881 (attach_initialized_static_class): New function. 10882 * class.c (add_method_1): Create the initialized static class 10883 table if necessary. 10884 (finish_class): Always emit deferred inline methods. 10885 * decl.c (emit_init_test_initialization): Moved to expr.c 10886 (complete_start_java_method): Don't traverse 10887 DECL_FUNCTION_INIT_TEST_TABLE. 10888 (lang_mark_tree): Mark hash tables in function decls. 10889 * expr.c (emit_init_test_initialization): Moved from decl.c. 10890 (build_class_init): Create LAG_DECL_SPECIFIC for the static class 10891 initialization flag, set DECL_CONTEXT and 10892 LOCAL_CLASS_INITIALIZATION_FLAG. 10893 (java_lang_expand_expr): Emit initialization code for static class 10894 initialized flags when entering block, if necessary. 10895 * gcj.texi (-fno-optimize-static-class-initialization): Documented. 10896 * java-tree.h (flag_optimize_sci): New global variable declaration. 10897 (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro. 10898 (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise. 10899 (LOCAL_FINAL_P): Fixed typo in comment. 10900 (FINAL_VARIABLE_P): Likewise. 10901 (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro. 10902 (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise. 10903 (struct lang_decl): New fields `ict', `smic' and `cif.' 10904 (check_for_initialization): New returned value for global. 10905 (attach_initialized_static_class): New global function. 10906 (STATIC_CLASS_INIT_OPT_P): New macro. 10907 * lang-options.h (-fno-optimize-static-class-initialization): New flag. 10908 * lang.c (java_decode_option): Handle 10909 `-fno-optimize-static-class-initialization' 10910 * parse.y (start_complete_expand_method): New function. 10911 (java_expand_method_bodies): Likewise. 10912 (attach_init_test_initialization_flags): Likewise. 10913 (adjust_init_test_initialization): Likewise. 10914 (emit_test_initialization): Likewise. 10915 (java_complete_expand_methods): Nullify abstract and native method 10916 bodies. 10917 (java_complete_expand_method): New locals `fbody', `block_body' 10918 and `exception_copy.' Reorganized: directly return on empty method 10919 bodies, call `start_complete_expand_method', remember definitely 10920 initialized static class in function, don't expand method bodies. 10921 (java_expand_classes): Call `java_expand_method_bodies' before 10922 `finish_class' when compiling to native. 10923 (resolve_expression_name): Use `orig' after building outer class 10924 field access. 10925 (patch_invoke): Remember static method invocations. 10926 109272001-08-06 Richard Henderson <rth@redhat.com> 10928 10929 * class.c (emit_register_classes): Pass a symbol_ref and priority 10930 to assemble_constructor. 10931 109322001-08-02 Alexandre Petit-Bianco <apbianco@redhat.com> 10933 10934 * java-tree.h (all_class_filename): New macro. 10935 (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.' 10936 (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link 10937 newly created IDENTIFIER_NODE to `all_class_filename.' 10938 109392001-08-01 Jeff Sturm <jsturm@one-point.com> 10940 10941 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): 10942 Use ggc_add_tree_root to register roots. 10943 109442001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com> 10945 10946 * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its 10947 second operand calling check_init. 10948 * decl.c (complete_start_java_method): Swaped second and third 10949 arguments while creating WITH_CLEANUP_EXPR node. 10950 * jcf-write.c (generate_bytecode_insns): Use second operand 10951 instead of third when handling WITH_CLEANUP_EXPR. 10952 * parse.y (java_complete_lhs): Expand second operand of 10953 WITH_CLEANUP_EXPR nodes. 10954 (patch_synchronized_statement): Swaped second and third arguments 10955 while creating WITH_CLEANUP_EXPR node. 10956 109572001-07-18 Alexandre Petit-Bianco <apbianco@redhat.com> 10958 10959 * parse.y (create_interface): Avoid cyclic inheritance report when 10960 syntax error encountered during class definition. 10961 Fixes PR java/2956 10962 109632001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> 10964 10965 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks 10966 ASM_FINAL_SPEC. 10967 (lang_specific_pre_link): Use set_input to set input_filename. 10968 Append `main' here. 10969 * jvgenmain.c (usage): Append literal `main' to CLASSNAME. 10970 (main): Fix definition. 10971 Strip `main' from classname. 10972 Fixes PR java/227. 10973 109742001-07-18 Tom Tromey <tromey@redhat.com> 10975 10976 For PR java/2812: 10977 * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H. 10978 * lex.c (java_new_lexer): Use ICONV_CONST. 10979 (java_read_char): Likewise. 10980 * Make-lang.in (jc1$(exeext)): Link against LIBICONV. 10981 (jv-scan$(exeext)): Likewise. 10982 109832001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com> 10984 10985 * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.' 10986 * parse.y (check_class_interface_creation): Allow `private' if the 10987 enclosing is not an interface. 10988 (create_interface): Interface tagged public if the enclosing 10989 context is an interface. 10990 (create_class): Class tagged public if the enclosing context 10991 is an interface. 10992 Fixes PR java/2959 10993 109942001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com> 10995 10996 * class.c (push_class): Set DECL_SIZE to `integer_zero_node.' 10997 Fixes PR java/2665 10998 109992001-07-14 Tim Josling <tej@melbpc.org.au> 11000 11001 * check-init.c (check_init): Remove references to EXPON_EXPR. 11002 110032001-07-13 Alexandre Petit-Bianco <apbianco@redhat.com> 11004 11005 * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset 11006 TREE_CONSTANT_OVERFLOW of CASE_EXPR value. 11007 Fixes PR java/3602 11008 110092001-07-13 Tom Tromey <tromey@redhat.com> 11010 11011 * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1 11012 invocation. 11013 110142001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com> 11015 11016 * parse.y (patch_method_invocation): Don't override primary if one 11017 is already provided, but let this$<n> be built. Fixed comment. 11018 110192001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com> 11020 11021 * parse.y (empty_statement:): Report empty statement error only 11022 when found at class declaration level. 11023 Fixes PR java/3635 11024 110252001-07-12 Tom Tromey <tromey@redhat.com> 11026 11027 * expr.c (expand_load_internal): New function. 11028 (LOAD_INTERNAL): Use it. 11029 110302001-07-11 Alexandre Petit-Bianco <apbianco@redhat.com> 11031 11032 * parse.y (verify_constructor_super): Compare anonymous class ctor 11033 args with `valid_method_invocation_conversion_p.' 11034 Fixes PR java/3285 11035 110362001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com> 11037 11038 * lang-specs.h: Forbit the use if `-femit-class-file{s}' without 11039 `-fsyntax-only.' Fixes PR java/3248 11040 110412001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com> 11042 11043 * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603 11044 110452001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com> 11046 11047 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the 11048 current function is static. Fixes PR java/1970 11049 110502001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com> 11051 11052 * parse.y (patch_method_invocation): Add enclosing context to ctor 11053 calls if necessary. Fixes PR java/2953 11054 110552001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com> 11056 11057 * parse.y (resolve_package): Abort if qualified expression member 11058 isn't right. 11059 (qualify_ambiguous_name): Don't qualify as type if `this' in use. 11060 Fixes PR java/1391 11061 110622001-07-07 Zack Weinberg <zackw@stanford.edu> 11063 11064 * verify.c: Don't use // comments. 11065 110662001-07-05 Tom Tromey <tromey@redhat.com> 11067 11068 * lang.c (flag_assume_compiled): Removed. 11069 * java-tree.h (flag_assume_compiled): Removed. 11070 * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc, 11071 -fhash-synchronization, -fuse-divide-subroutine, 11072 -fcheck-references, -femit-class-file, -femit-class-files, 11073 -fassume-compiled. Updated --encoding information. Changed 11074 -foutput-class-dir to `-d'. 11075 110762001-07-04 Daniel Berlin <dan@cgsoftware.com> 11077 11078 * jcf-parse.c (parse_class_file): Add lineno parameter to 11079 debug_start_source_file call. 11080 110812001-07-04 Joseph S. Myers <jsm28@cam.ac.uk> 11082 11083 * gcj.texi: Use gpl.texi. 11084 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update 11085 dependencies and use doc/include in search path. 11086 110872001-07-03 Jeff Sturm <jsturm@one-point.com> 11088 11089 * parse.y (fix_constructors): Test if a CALL_EXPR invokes 11090 `this'. If so, don't build instance initializers. 11091 110922001-07-03 Alexandre Petit-Bianco <apbianco@redhat.com> 11093 11094 * parse.y (resolve_expression_name): Improved error message for 11095 inner class cases. Fixes PR java/1958 11096 110972001-06-28 Gabriel Dos Reis <gdr@codesourcery.com> 11098 11099 * lang.c: #include diagnostic.h 11100 (lang_print_error): Add a `diagnostic_context *' parameter. 11101 (java_dummy_print): Likewise. 11102 * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h 11103 111042001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com> 11105 11106 * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF. 11107 * jcf.h (typedef struct JCF): New bitfield `finished.' 11108 (JCF_FINISH): Set `finished.' 11109 (JCF_ZERO): Reset `finished.' 11110 Fixes PR java/2633 11111 111122001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com> 11113 11114 * parse.y (class_body_declaration:): Don't install empty instance 11115 initializers. 11116 Fixes PR java/1314 11117 111182001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com> 11119 11120 * class.c (set_super_info): Call `set_class_decl_access_flags.' 11121 (set_class_decl_access_flags): New function. 11122 * java-tree.h (set_class_decl_access_flags): New prototype. 11123 * jcf-parse.c (handle_innerclass_attribute): Read and set access flags. 11124 (parse_class_file): New local `decl_max_locals.' Take wide types 11125 into account to compute DECL_MAX_LOCALS. 11126 * parse.y (type_import_on_demand_declaration:): Ignore duplicate 11127 imports on demand. 11128 111292001-06-22 Jan van Male <jan.vanmale@fenk.wau.nl> 11130 11131 * zipfile.h: Use GCC_JCF_H instead of JCF_H. 11132 111332001-06-20 Alexandre Petit-Bianco <apbianco@redhat.com> 11134 11135 * class.c (java_hash_tree_node): Fixed indentation in leading comment. 11136 * parse.y (do_resolve_class): Moved comments out to leading comment 11137 section. Removed local `start', New local `_ht' and 11138 `circularity_hash.' Record `enclosing' in hash table and search 11139 it to detect circularity. Use `enclosing' as an argument to 11140 `lookup_cl.' Free the hash table when done. 11141 111422001-06-19 Tom Tromey <tromey@redhat.com> 11143 11144 * lex.c (java_read_char): Disallow invalid and overlong 11145 sequences. Fixes PR java/2319. 11146 111472001-06-05 Jeff Sturm <jsturm@one-point.com> 11148 11149 * decl.c (create_primitive_vtable): Don't call make_decl_rtl. 11150 111512001-06-04 Alexandre Petit-Bianco <apbianco@redhat.com> 11152 11153 * expr.c (force_evaluation_order): Match wrapped ctor calls, locate 11154 arguments accordingly. 11155 111562001-06-02 Joseph S. Myers <jsm28@cam.ac.uk> 11157 11158 * gcj.texi: Move contents to just after title page. 11159 111602001-06-01 Alexandre Petit-Bianco <apbianco@redhat.com> 11161 11162 * parse.y (type_literals:): Use `build_incomplete_class_ref' with 11163 builtin type. 11164 (patch_incomplete_class_ref): Build the class ref, build the class 11165 init if necessary, complete the tree. 11166 Fixes PR java/2605 11167 111682001-05-31 Alexandre Petit-Bianco <apbianco@redhat.com> 11169 11170 * parse.y (lookup_field_wrapper): Test `name' code. 11171 (resolve_qualified_expression_name): Test `qual_wfl' code. 11172 (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation, 11173 handle `qual_wfl' by code. 11174 (maybe_build_primttype_type_ref): Test `wfl' code. 11175 111762001-05-23 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr> 11177 11178 * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on 11179 fdl.texi. 11180 (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls. Create 11181 the dvi file in the java directory. 11182 111832001-05-25 Sam TH <sam@uchicago.edu> 11184 11185 * gen-table.pl javaop.h jcf.h lex.h, 11186 parse.h: Fix header include guards. 11187 111882001-05-23 Joseph S. Myers <jsm28@cam.ac.uk> 11189 11190 * jv-scan.c (version): Update copyright year. 11191 111922001-05-21 Per Bothner <per@bothner.com> 11193 11194 * jcf-parse.c (read_class): If class is from .class or .zip file 11195 and it's already been read, don't push/pop parser context. 11196 111972001-05-18 Per Bothner <per@bothner.com> 11198 11199 * jvspec.c (lang_specific_pre_link): Re-arrange the linker 11200 command line so the jvgenmain-generated main program comes first. 11201 112022001-05-15 Tom Tromey <tromey@redhat.com> 11203 11204 * class.c (build_utf8_ref): Don't generate identifier based on 11205 utf8const contents. 11206 112072001-05-12 Richard Henderson <rth@redhat.com> 11208 11209 * java-tree.def (JAVA_EXC_OBJ_EXPR): New. 11210 * expr.c (java_lang_expand_expr): Expand it. 11211 (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of 11212 calling build_exception_object_ref. 11213 * parse.y (catch_clause_parameter): Likewise. 11214 (build_dot_class_method): Likewise. 11215 (try_reference_assignconv): Likewise. 11216 * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR. 11217 * jcf-write.c (generate_bytecode_insns): Likewise. 11218 112192001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com> 11220 11221 * parse.y (build_unresolved_array_type): Set 11222 EXPR_WFL_QUALIFICATION on the newly created wfl. 11223 Fixes PR java/2538. Fixes PR java/2535. 11224 112252001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com> 11226 11227 * parse.y (fix_constructors): Removed unnecessary assignment to 11228 local. Moved assignment to `this$<n>', fixed comments and 11229 indentation. 11230 (build_wfl_wrap): Fixed indentation. 11231 Fixes PR java/2598, java/2579 and java/2658. 11232 112332001-05-03 Mo DeJong <mdejong@redhat.com> 11234 11235 * lex.c (java_new_lexer): Call iconv_close on temp handle used to 11236 check for byte swap. 11237 112382000-05-02 Jeff Sturm <jsturm@one-point.com> 11239 11240 * expr.c (build_class_init): Move MODIFY_EXPR 11241 outside of COND_EXPR. Remove variable `call'. 11242 112432001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 11244 11245 * decl.c: NULL_PTR -> NULL. 11246 * jcf-write.c: Likewise. 11247 112482001-05-01 Tom Tromey <tromey@redhat.com> 11249 11250 * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'. 11251 (java/gcj.dvi): Added $(srcdir) to TEXINPUTS. 11252 * gcj.texi: Updated copyright text. Include fdl.texi. 11253 (Top): Link to new node. 11254 112552001-05-01 Per Bothner <per@bothner.com> 11256 11257 * parse.h (REGISTER_IMPORT): Use tree_cons instead of chainon. 11258 112592001-05-01 Per Bothner <per@bothner.com> 11260 11261 * parse.y (java_pop_parser_context): The TREE_VALUE of a link in the 11262 import_list contains the name, not the TREE_PURPOSE. 11263 112642001-04-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 11265 11266 * jcf-io.c (read_zip_member): Cast to long in comparison with 11267 signed value. 11268 11269 * jvspec.c (lang_specific_driver): Initialize variables. 11270 11271 * mangle.c (find_compression_record_match): Likewise. 11272 11273 * typeck.c (build_null_signature): Provide static prototype. Mark 11274 parameter with ATTRIBUTE_UNUSED. 11275 11276 * verify.c (verify_jvm_instructions): Initialize variable. 11277 112782001-04-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz> 11279 11280 * parse.y (do_resolve_class): Check for cyclic inheritance during 11281 inner class resolution. 11282 112832001-04-27 Per Bothner <per@bothner.com> 11284 11285 * parse.y (java_expand_classes): Don't change ctxp_for_generation 11286 while iterating, since that could cause gc to lose stuff. 11287 112882001-04-26 Per Bothner <per@bothner.com> 11289 11290 Fix method search wrt scope of inner classes to match JLS2. 11291 * typeck.c (build_null_signature): New static function. 11292 (has_method): New function. Uses build_null_signature and lookup_do. 11293 * java-tree.h (has_method): New declaration. 11294 * parse.y (find_applicable_accessible_methods_list): Do not search 11295 context of inner classes here. 11296 (patch_method_invocation): Search scope, ie. current and outer clases, 11297 for method matching simple name, to find class. 11298 112992001-04-26 Per Bothner <per@bothner.com> 11300 11301 * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR): 11302 Fix thinko: If a single case, use if_icmpeq, not ifeq. 11303 11304 * constants.c (find_methodref_with_class_index): New function. 11305 (find_methodref_index): Use find_methodref_with_class_index. 11306 * java-tree.h (find_methodref_with_class_index): New declaration. 11307 * jcf-write.c (generate_bytecode_insns case CALL_EXPR): Don't change 11308 DECL_CONTEXT, instead use new find_methodref_with_class_index function. 11309 If context changed from interface to class, don't use invokeinterface. 11310 113112001-04-25 Per Bothner <per@bothner.com> 11312 11313 * verify.c (verify_jvm_instructions): For field instructions, 11314 check that field index is valid. For invoke instructions, check that 11315 method index is valid. 11316 113172001-04-25 Alexandre Oliva <aoliva@redhat.com> 11318 11319 * config-lang.in (target_libs): Copy from $libgcj_saved. 11320 113212001-04-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz> 11322 11323 * decl.c (init_decl_processing): Add new class "protectionDomain" 11324 field. 11325 * class.c (make_class_data): Set initial value for "protectionDomain". 11326 113272001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 11328 11329 * jvspec.c (lang_specific_driver): Fix memory allocation 11330 deficit, by using concat in lieu of xmalloc/sprintf. 11331 113322001-04-20 Per Bothner <per@bothner.com> 11333 11334 Fixes to compile multiple .class files at once. 11335 * decl.c (init_decl_processing): Don't set CLASS_LOADED_P. 11336 * java-tree.h (CLASS_PARSED_P): New macro. 11337 (CLASS_LOADED_P): Re-define to use TYPE_SIZE and CLASS_PARSED_P. 11338 * jcf-parse.c (jcf_parse_source): Inline into read_class. 11339 (read_class): Avoid some code duplication. 11340 Don't call JCF_FINISH for a .class file - might be needed later. 11341 (jcf_parse): Don't call layout_class here. Check/set CLASS_PARSED_P 11342 rather than CLASS_LOADED_P, since latter implies class laid out. 11343 (yyparse): Do layout_class and JCF_FINISh here instead, in pass 2. 11344 * parse.y: Don't need to set CLASS_LOADED_P for array types. 11345 113462001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 11347 11348 * Make-lang.in (java/boehm.o): Depend on toplev.h. 11349 11350 * boehm.c: Include toplev.h. 11351 113522001-04-06 Tom Tromey <tromey@redhat.com> 11353 Alexandre Petit-Bianco <apbianco@redhat.com> 11354 11355 Fix for PR gcj/1404 and PR gcj/2332: 11356 * parse.y (build_array_from_name): If we use the type_wfl then 11357 accumulate dimensions from the original type as well. 11358 (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place. 11359 113602001-04-06 Tom Tromey <tromey@redhat.com> 11361 11362 * parse.y (analyze_clinit_body): Return true if the second operand 11363 of a METHOD_EXPR is nonzero. 11364 113652001-04-06 Tom Tromey <tromey@redhat.com> 11366 11367 * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build 11368 directory. 11369 ($(srcdir)/java/parse.c): Likewise. 11370 113712001-04-05 Alexandre Petit-Bianco <apbianco@redhat.com> 11372 11373 * gcj.texi: Use `which-gcj' instead of `which-g77.' 11374 (version-gcc): Initialized. 11375 (which-gcj): Likewise. 11376 113772001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com> 11378 11379 * java-tree.h (struct lang_decl): New macro 11380 `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.' 11381 * parse.y (build_instance_initializer): New function. 11382 (add_instance_initializer): Use it. 11383 (java_fix_constructors): Set `current_class' before fix pass. 11384 (fix_constructors): Just return if already fixed. Move `super()' 11385 invocation ahead. Use `build_instance_initializer.' 11386 Fixes PR java/1315. 11387 113882001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com> 11389 11390 * parse.y (resolve_qualified_expression_name): Pass field's 11391 DECL_CONTEXT to `not_accessible_p.' 11392 (not_accessible_p): Changed parameters order in `inherits_from_p' 11393 invocation. 11394 113952001-03-27 Andrew Haley <aph@cambridge.redhat.com> 11396 11397 * lang-options.h: Add flag_check_references. 11398 113992001-04-04 Per Bothner <per@bothner.com> 11400 11401 * java-tree.h (CONSTANT_VALUE_P): New macro. 11402 * jcf-write.c (generate_classfile): Use CONSTANT_VALUE_P. 11403 * parse.y (maybe_build_class_init_for_field): New static function. 11404 (resolve_expression_name, resolve_field_access): Use 11405 maybe_build_class_init_for_field instead of build_class_init 11406 This does not do the init if the field is compile-time-constant. 11407 (resolve_field_access): Simplify. 11408 11409 * parse.y (fold_constant_for_init): Merge test into switch. 11410 114112001-04-03 Zack Weinberg <zackw@stanford.edu> 11412 11413 * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend 11414 on gansidecl.h. 11415 * buffer.c, jvgenmain.c: Don't include gansidecl.h. 11416 114172001-04-02 Zack Weinberg <zackw@stanford.edu> 11418 11419 * expr.c (pop_type_0): Save the result of the first 11420 lang_printable_name call in a scratch buffer, so it 11421 won't be clobbered by the second call. 11422 114232001-03-30 Alexandre Petit-Bianco <apbianco@redhat.com> 11424 11425 * parse-scan.y (array_type:): Rewritten. 11426 (type_declaration:): `empty_statement' replaces `SC_TK.' 11427 (class_member_declaration:): `empty statement' added. 11428 (method_body:): Simplified. 11429 (static_initializer:): Likewise. 11430 (primary_no_new_array:): Use `type_literals.' 11431 (type_literals:): New rule. 11432 (dims:): Set and update `bracket_count.' 11433 Fixes PR java/1074. Fixes PR java/2412. 11434 114352001-03-28 Hans Boehm <boehm@acm.org> 11436 11437 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.' 11438 (get_boehm_type_descriptor): Set type on returned value to be a 11439 pointer length integer. 11440 114412001-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 11442 11443 * expr.c (pop_type_0): Call `concat' rather than building the 11444 string manually. 11445 (pop_type): Add format specifier in call to `error'. 11446 11447 * parse.y (patch_method_invocation): Avoid casting away 11448 const-ness. 11449 114502001-03-28 Jeffrey Oldham <oldham@codesourcery.com> 11451 11452 * jvgenmain.c (do_mangle_classname): End string constant with '\0'. 11453 114542001-03-28 Richard Henderson <rth@redhat.com> 11455 11456 IA-64 ABI Exception Handling: 11457 * Make-lang.in (except.o): Don't depend on eh-common.h. 11458 * check-init.c (check_init): Handle EXC_PTR_EXPR. 11459 * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw. 11460 [soft_exceptioninfo_call_node]: Remove. 11461 [eh_personality_libfunc, lang_eh_runtime_type]: New. 11462 (end_java_method): No emit_handlers. 11463 * except.c (java_set_exception_lang_code): Remove. 11464 (method_init_exceptions): Don't call it. 11465 (prepare_eh_table_type): No CATCH_ALL_TYPE. 11466 (build_exception_object_ref): New. 11467 (expand_end_java_handler): Update for except.h name changes. 11468 (emit_handlers, expand_resume_after_catch): Remove. 11469 * expr.c (java_lang_expand_expr): Update for except.h name changes. 11470 (process_jvm_instruction): Use build_exception_object_ref. 11471 * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove. 11472 (soft_exceptioninfo_call_node): Remove. 11473 (build_exception_object_ref): Declare. 11474 * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No 11475 soft_exceptioninfo_call_node. Move processing ... 11476 [EXC_PTR_EXPR]: ... here. 11477 * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code. 11478 * parse.y (catch_clause_parameter): Use build_exception_object_ref. 11479 (source_end_java_method): No java_set_exception_lang_code or 11480 emit_handlers. 11481 (build_dot_class_method): Use build_exception_object_ref. 11482 (try_reference_assignconv): Check EXC_PTR_EXPR not 11483 soft_exceptioninfo_call_node. 11484 114852001-03-28 Richard Henderson <rth@redhat.com> 11486 11487 * java-tree.h (throw_node): Define as a single member of 11488 java_global_trees instead of a separate array. 11489 (JTI_THROW_NODE): New. 11490 * decl.c (throw_node): Don't declare. 11491 (init_decl_processing): Init a scalar throw_node. 11492 Don't register it for gc. 11493 * check-init.c (check_init): Reference scalar throw_node. 11494 * expr.c (build_java_athrow): Likewise. 11495 * jcf-write.c (generate_bytecode_insns): Likewise. 11496 * parse.h (BUILD_THROW): Likewise. 11497 114982001-03-28 Richard Henderson <rth@redhat.com> 11499 11500 * decl.c (end_java_method): Do not save and restore 11501 flag_non_call_exceptions. 11502 * parse.y (source_end_java_method): Likewise. 11503 * lang.c (flag_exceptions): Don't declare. 11504 (java_init_options): Set flag_non_call_exceptions. Set 11505 flag_exceptions here ... 11506 (java_init): ... not here. 11507 115082001-03-27 Richard Henderson <rth@redhat.com> 11509 11510 * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of 11511 exceptions_via_longjmp. 11512 11513 * lang.c (flag_new_exceptions): Don't declare it. 11514 (java_init_options): Or set it. 11515 115162001-03-27 Richard Henderson <rth@redhat.com> 11517 11518 * decl.c (end_java_method): Rename asynchronous_exceptions to 11519 flag_non_call_exceptions. 11520 * parse.y (source_end_java_method): Likewise. 11521 115222001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 11523 11524 * Make-lang.in: Depend on $(SYSTEM_H), not system.h. 11525 115262001-03-26 Mark Mitchell <mark@codesourcery.com> 11527 11528 * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE. 11529 115302001-03-26 Alexandre Petit-Bianco <apbianco@redhat.com> 11531 11532 * parse.y (find_as_inner_class): Follow current package 11533 indications not to mistakingly load an unrelated class. 11534 115352001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 11536 11537 * constants.c (PUTN): Use memcpy, not bcopy. 11538 11539 * lex.c (java_read_char): Use memmove, not bcopy. 11540 11541 * parse.y (java_parser_context_resume): Use memcpy, not bcopy. 11542 115432001-03-23 Per Bothner <per@bothner.com> 11544 11545 * verify.c (verify_jvm_instructions): Replace 3 pop_type by POP_TYPE 11546 macro for better error pin-pointing. 11547 * java-tree.h: Fix typo in comment. 11548 11549 * jcf-write.c (generate_bytecode_insns): Changes to TRY_FINALLY_EXPR. 11550 Don't include jsr/goto in exception range. 11551 Check if start and end of exception range are the same (also TRY_EXPR). 11552 Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false. 11553 However, do emit the following goto even if try_block is empty. 11554 Defer freeing exception_decl until after the finalizer, to make 11555 sure the local isn't reused in the finalizer. Fixes PR java/1208. 11556 11557 * parse.y (java_complete_lhs): If the try-clause is empty, just 11558 return the finally-clause and vice versa. 11559 115602001-03-23 Alexandre Petit-Bianco <apbianco@redhat.com> 11561 11562 * gcj.texi (Input Options): documented the check for attribute 11563 `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag. 11564 * java-tree.h (flag_force_classes_archive_check): Declared extern. 11565 * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro. 11566 (jcf_parse): Check for the right classes archive if necessary. 11567 * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it. 11568 (jcf_parse_fields): Fixed indentation. 11569 * jcf-write.c (append_gcj_attribute): New function. 11570 (generate_classfile): Compute the attribute count, invoke 11571 `append_gcj_attribute'. 11572 * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source' 11573 turned into bit-fields. New bit-field `right_zip.' 11574 (JCF_ZERO): Set `right_zip' to zero. 11575 * lang-options.h (-fforce-classes-archive-check): Added flag. 11576 * lang.c (flag_force_classes_archive_check): New flag. 11577 (lang_f_options): New entry `force-classes-archive-check.' 11578 Fixes PR java/1213. 11579 115802001-02-07 Andrew Haley <aph@redhat.com> 11581 11582 * gcj.texi (Configure-time Options): Add -fcheck-references. 11583 * expr.c (build_java_indirect_ref): New function. 11584 (java_check_reference): New function. 11585 (build_java_array_length_access): Use build_java_indirect_ref to 11586 check for null references. 11587 (build_java_arrayaccess): Likewise. 11588 (build_get_class): Likewise. 11589 (build_field_ref): Likewise. 11590 (invoke_build_dtable): Likewise. 11591 (build_invokeinterface): Likewise. 11592 * lang.c (lang_f_options): Add flag_check_references. 11593 * jvspec.c (jvgenmain_spec): Add flag_check_references. 11594 * java-tree.h (flag_check_references): New variable. 11595 * lang.c (flag_check_references): Likewise. 11596 * parse.y (patch_invoke): Use java_check_reference. 11597 (patch_assignment): Allow for extra nesting in 11598 _Jv_CheckArrayStore. 11599 116002001-03-23 Bryce McKinlay <bryce@albatross.co.nz> 11601 11602 * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c. 11603 * lex.c (cxx_keywords): Likewise. 11604 116052001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com> 11606 11607 * parse.y (qualify_ambiguous_name): Broaden `length' 11608 recognition. Help MODIFY_EXPR be resolved as expression names. 11609 Fixes PR java/2066. Fixes PR java/2400. 11610 116112001-03-21 Bryce McKinlay <bryce@albatross.co.nz> 11612 11613 * gjavah.c (process_file): Mark interface definitions with 11614 "__attribute__ ((java_interface))". 11615 116162001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com> 11617 11618 * class.c (layout_class): Fixed push_super_field's second 11619 argument. Fixes PR java/2333. 11620 (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's 11621 too early to lay innerclasses out. 11622 116232001-03-20 Tom Tromey <tromey@redhat.com> 11624 Alexandre Petit-Bianco <apbianco@redhat.com> 11625 11626 * parse.y (patch_assignment): Handle the case of a SAVE_EXPR 11627 inside an array reference. Insertion of the array store check 11628 rewritten. Fixes PR java/2299. 11629 116302001-03-20 Tom Tromey <tromey@redhat.com> 11631 11632 * lex.c (java_read_unicode): Only accept leading `u's. 11633 116342001-03-20 Tom Tromey <tromey@redhat.com> 11635 11636 * jcf-parse.c (read_class): Initialize `class'. 11637 116382001-03-20 Matt Kraai <kraai@alumni.carnegiemellon.edu> 11639 11640 * jcf_parse.c (jcf_parse): Eliminate unused variable. 11641 116422001-03-19 Mark Mitchell <mark@codesourcery.com> 11643 11644 * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME. 11645 (layout_class): Likewise. 11646 (layout_class_method): Likewise. 11647 (emit_register_classes): Likewise. 11648 * decl.c (builtin_function): Likewise. 11649 (give_name_to_locals): Likewise. 11650 116512001-03-19 Per Bothner <per@bothner.com> 11652 11653 * jcf-parse.c (load_inner_classes): Check CLASS_LOADED_P 11654 before trying to load an inner class. 11655 11656 Fixes to process to command-line .class files in two passes. 11657 * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P): New flags. 11658 (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P): Rename to .. 11659 (CLASS_FROM_CURRENTLY_COMPILED_P): ... because it is more general now. 11660 * class.c (is_compiled_class): Fix for renamed flag. 11661 * parse.y (maybe_create_class_interface_decl): Likewise. 11662 * jcf-parse.c (yyparse): Also set if compiling .class files. 11663 * jcf-parse.c (read_class); Read current_class. 11664 (jcf_parse): Make static. 11665 (load_inner_classes): New function, with code moved from jcf_parse, 11666 because we need to inner classes after the command-line files are read. 11667 (yyparse): Set finput to NULL when it doesn't need to be closed. 11668 Reduce use of main_jcf (basically only for archive) and 11669 use finput instead of main_jcf->read_state. 11670 Inline jcf_figure_file_type into yyparse. 11671 Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name. 11672 Defer load_inner_classes and parse_class_file to a second pass, 11673 after we've correctly mapped command-line .clas fiels to classes. 11674 (jcf_figure_file_type): Removed. 11675 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): Removed flags. 11676 (JCF_ZERO): Also clear zipd field. 11677 * zipfile.h: Conditionalize on JCF_H insread of JCF_ZIP. 11678 116792001-03-18 Matt Kraai <kraai@alumni.carnegiemellon.edu> 11680 11681 * jcf-parse.c (yyparse): Change ch from char * to char. 11682 116832001-03-19 Per Bothner <per@bothner.com> 11684 11685 * jvspec.c (lang_specific_driver): Check for .zip and .jar files. 11686 Add constructed filelist-file at end, following -xjava. Thus any .o 11687 and library files are not affected by the -xjava. Also wrap 11688 explicit @FILE with -xjava and -xnone. 11689 116902001-03-19 Andrew Haley <aph@cambridge.redhat.com> 11691 11692 * class.c (build_static_field_ref): Call make_decl_rtl() after 11693 setting the DECL_EXTERNAL flag. 11694 116952001-03-17 Per Bothner <per@bothner.com> 11696 11697 * decl.c (clear_binding_level): Fix initializer (broke 03-15). 11698 11699 * jcf-write.c (generate_bytecode_insns): Handle emitting iinc 11700 when result is is needed (target is STACK_TARGET). 11701 11702 * parse.h (JDEP_SOLV): Removed. 11703 * parse.y (register_incomplete_type): Use JDEP_TO_RESOLVE instead. 11704 11705 * parse.y (incomplete_class_list): Removed. 11706 (obtain_incomplete_type): Don't use or set incomplete_class_list. 11707 It doesn't work if resolve_class changes the name of an array type 11708 that is on the list and then someone else looks for the modified name. 11709 Also, seems liable to break when compiling multiple source files at 11710 once. So the simplest is to just remove incomplete_class_list - 11711 it is only a minor space win and it is not even clear it saves time. 11712 11713 * parse.y (resolve_class): Remove unneeded promote_type. 11714 117152001-03-15 Per Bothner <per@bothner.com> 11716 11717 * java-tree.h (BLOCK_IS_IMPLICIT): New flag. 11718 * parse.h (BLOCK_EXPR_ORIGIN): Removed macro. 11719 * parse.y (declare_local_variables, maybe_absorb_scoping_blocks): 11720 Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN. 11721 11722 * jcf-parse.c (yyparse): Set/reset input_filename for source file. 11723 * parse.y (java_expand_classes): Likewise. 11724 11725 * parse.y (expand_start_java_method): Was only called once and had a 11726 misleading name, so inline in caller java_complete_expand_method. 11727 (enter_a_block): Likewise inline in enter_block and remove. 11728 11729 Remove junk from when gcc/java was created (by copying from C/C++). 11730 * decl.c (keep_next_level_flag, keep_next_if_subblocks): Remove. 11731 (struct binding_level): Remove fields keep, keep_if_subblocks, 11732 more_cleanups_ok, have_cleanups (which have never been used). 11733 (pushlevel, poplevel): Remove related useless code. 11734 11735 * class.c (make_class_data): The class_dtable_decl (i.e. the 11736 vtable for Class) should be external, except when compiling Class. 11737 11738 * jvspec.c (lang_specific_driver): Fix -C handling. 11739 Check -save-temps to see if temp @FILE should be deleted. 11740 Follow-up to/fix for February 16 patch. 11741 11742 * verify.c (verify_jvm_instructions): Better error msgs for dup. 11743 (type_stack_dup): Remove no-longer neded error check. 11744 117452001-03-15 Bryce McKinlay <bryce@albatross.co.nz> 11746 11747 * mangle.c (mangle_record_type): Rename 'from_pointer' argument 11748 to 'for_pointer'. If this type is for a pointer (argument) mangling, 11749 don't surround the element with 'N..E' if the type name is 11750 unqualified. 11751 117522001-03-14 Mark Mitchell <mark@codesourcery.com> 11753 11754 * class.c (build_static_field_ref): Use COPY_DECL_RTL, 11755 DECL_RTL_SET_P, etc. 11756 (make_method_value): Likewise. 11757 (get_dispatch_table): Likewise. 11758 11759 * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc. 11760 117612001-03-07 Tom Tromey <tromey@redhat.com> 11762 11763 * config-lang.in (lang_requires): Define. 11764 117652001-03-07 Brad Lucier <lucier@math.purdue.edu> 11766 11767 * typeck.c (convert): Check flag_unsafe_math_optimizations, 11768 not flag_fast_math. 11769 117702001-03-05 Per Bothner <per@bothner.com> 11771 11772 Fix a problem where rest_of_decl_compilation applied to 11773 class_dtable_decl causes problems because it was done too early, 11774 before output file was opened. 11775 * decl.c (init_decl_processing): Remove init of class_dtable_decl. 11776 * class.c (class_dtable_decl): Add macro - element of class_roots. 11777 (make_class_data): Define class_dtable_decl. 11778 * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl): Removed. 11779 117802001-03-01 Zack Weinberg <zackw@stanford.edu> 11781 11782 * java/class.c, java/decl.c, java/java-tree.h: Replace all 11783 uses of 'boolean' with 'bool'. 11784 117852001-03-01 Zack Weinberg <zackw@stanford.edu> 11786 11787 * lang-specs.h: Add zero initializer for cpp_spec field to all 11788 array elements. 11789 117902001-02-16 Per Bothner <per@bothner.com> 11791 11792 Handle compiling multiple input files at once, and @FILE syntax. 11793 * gcj.texi: Updated documentation to match. 11794 * java-tree.h (flag_filelist_file, init_src_parse): New declarations. 11795 * jcf-parse.c (parse_source_file): Split into ... 11796 (parse_source_file_1): New function - and: 11797 (parse_source_file_2): New function. 11798 (yyparse): On -ffilelist-file, open and scan named file. 11799 On first pass over files, only do parse_source_file_1. 11800 A new second pass calls parse_source_file_2 for each file to compile. 11801 (init_jcf_parse): Call init_src_parse. 11802 * jvspec.c (INDIRECT_FILE_ARG): New flag. 11803 (lang_specific_driver): Support @FILELIST-FILE syntax, as well 11804 as multiple input file combined in one compilation. 11805 * lang-options.h: Add -ffilelist-file 11806 * lang.c (flag_filelist_file): New flag variable. 11807 (lang_f_options): Handle -ffilelist-file. 11808 * lex.c (java_init_lex): Don't clear ctxp->incomplete_class. 11809 * parse.h (struct parse_ctxt): Remove fields incomplete_class and 11810 gclass_list - use global fields of src_parse_roots instead. 11811 * parse.y (src_parse_roots): New array. 11812 (incomplete_class_list, gclass_list): New macros. 11813 (push_parser_context, java_pop_parser_context, 11814 java_parser_context_resume): Don't fiddle with deleted fields. 11815 (various): Use incomplete_class gclass_list and global macros 11816 instead of parse_ctxt fields - the lists are global. 11817 (init_src_parse): New function. 11818 118192001-02-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 11820 11821 * decl.c (set_block): Set NAMES and BLOCKS from BLOCK. 11822 118232001-02-20 Alexandre Petit-Bianco <apbianco@redhat.com> 11824 11825 * parse.y (check_inner_class_access): Moved declaration of local 11826 `enclosing_decl_type' to the right location. 11827 118282001-02-19 Bryce McKinlay <bryce@albatross.co.nz> 11829 11830 * parse.y (parser_check_super_interface): Don't call 11831 check_pkg_class_access for an inner interface. 11832 (parser_check_super): Don't call check_pkg_class_access for inner 11833 class. 11834 (do_resolve_class): Simplify enclosing type loop. Don't call 11835 check_pkg_class_access if CL and DECL are not set. 11836 (find_in_imports_on_demand): Set DECL if class_type needed to be 11837 loaded. Don't call check_pkg_class_access for an inner class. 11838 (check_inner_class_access): Rewritten to implement member access 11839 rules as per spec 6.6.1. 11840 (check_pkg_class_access): Handle the empty package correctly. 11841 (in_same_package): New function. Determine if two classes are in the 11842 same package. 11843 118442001-02-18 Bryce McKinlay <bryce@albatross.co.nz> 11845 11846 * typeck.c (build_java_array_type): Don't try to poke a public `clone' 11847 method into array types. 11848 * parse.y (patch_method_invocation): Bypass access check on clone call 11849 to array instance. 11850 118512001-02-15 Alexandre Petit-Bianco <apbianco@redhat.com> 11852 11853 * expr.c (build_instanceof): Check for arrays when trying fold to 11854 false. 11855 118562001-02-15 Jim Meyering <meyering@lucent.com> 11857 11858 * Make-lang.in (java.install-common): Depend on `installdirs'. 11859 (java.install-info): Likewise. 11860 118612001-02-15 Bryce McKinlay <bryce@albatross.co.nz> 11862 11863 * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o. 11864 118652001-02-14 Tom Tromey <tromey@redhat.com> 11866 Alexandre Petit-Bianco <apbianco@cygnus.com> 11867 11868 Fix for PR java/1261. 11869 * typeck.c (build_java_array_type): Add public `clone' method to 11870 arrays. 11871 * parse.y (resolve_qualified_expression_name): Use current_class 11872 when checking for inaccessibility. 11873 (patch_method_invocation): Fixed error message when accessibility 11874 denied. Added `from_super' argument. 11875 118762001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com> 11877 11878 * parse.y (resolve_class): Don't build a fake decl. Use the one 11879 already built. 11880 * typeck.c (build_java_array_type): Build and assign decl to array 11881 type. 11882 118832001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com> 11884 11885 * parse.y (not_accessible_p): Changed leading comment. Added extra 11886 `where' argument. Use it to enforce protected access rules. 11887 (resolve_qualified_expression_name): Added extra argument to 11888 not_accessible_p. 11889 (patch_method_invocation): Use argument `primary' to provide 11890 not_accessible_p with an extra argument. 11891 (lookup_method_invoke): Added extra argument to not_accessible_p. 11892 (search_applicable_method_list): Likewise. 11893 118942001-02-13 Alexandre Petit-Bianco <apbianco@redhat.com> 11895 11896 * parse.y (resolve_qualified_expression_name): Try to resolve as 11897 an inner class access only if `decl' is a TYPE_DECL. 11898 118992001-02-13 Alexandre Petit-Bianco <apbianco@cygnus.com> 11900 11901 * decl.c (classdollar_identifier_node): Initialize. 11902 * java-tree.h (enum java_tree_index): New entry 11903 `JTI_CLASSDOLLAR_IDENTIFIER_NODE.' 11904 (classdollar_identifier_node): New macro. 11905 (ID_CLASSDOLLAR_P): Likewise. 11906 * parse.y (build_dot_class_method): Use `classdollar_identifier_node.' 11907 (build_dot_class_method_invocation): Likewise. 11908 (find_applicable_accessible_methods_list): `class$' can't be 11909 inherited. 11910 119112001-02-09 Raja R Harinath <harinath@cs.umn.edu> 11912 11913 * Make-lang.in (java/mangle_name.o): Add 'make' prereqs. 11914 119152001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com> 11916 11917 * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o' 11918 * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now 11919 gone. 11920 119212001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com> 11922 11923 * mangle_name (append_unicode_mangled_name): Emit `_' or `U' 11924 outside of the `__U' sequence too. 11925 (unicode_mangling_length): Count `_' or `U' outside of the `__U' 11926 sequence too. 11927 119282001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com> 11929 11930 * jvgenmain.c (error): Reversed 2001-02-01 deletion. 11931 119322001-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com> 11933 11934 * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o 11935 (JVGENMAIN_OBJS): Likewise. 11936 * java-tree.h (append_gpp_mangled_name): New prototype. 11937 * jcf-parse.c (ggc_mark_jcf): Argument now `void *.' 11938 Removed cast calling `gcc_add_root.' 11939 * jvgenmain.c (mangle_obstack): New global, initialized. 11940 (main): Use it. 11941 (do_mangle_class): Constify local `ptr.' 11942 Removed macro `MANGLE_NAME.' Removed cast in `for.' Call 11943 append_gpp_mangle_name and update `count' if necessary. 11944 Use `mangle_obstack.' 11945 * mangle.c (append_unicode_mangled_name): Removed. 11946 (append_gpp_mangled_name): Likewise. 11947 (unicode_mangling_length): Likewise. 11948 (mangle_member_name): Return type set to `void.' 11949 (mangle_field_decl): Don't append `U' in escaped names. 11950 (mangle_method_decl): Likewise. 11951 (mangle_member_name): Just use `append_gpp_mangled_name.' 11952 * mangle_name.c: New file. 11953 119542001-02-07 Per Bothner <per@bothner.com> 11955 11956 * check-init.c (check_init): Fix TRY_FINALLY_EXPR logic. 11957 11958 * check-init.c (check_init): Don't call done_alternative after 11959 processing loop code, as a LOOP_EXPR never terminates normally. 11960 119612001-02-08 Joseph S. Myers <jsm28@cam.ac.uk> 11962 11963 * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org. 11964 119652001-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com> 11966 11967 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field 11968 DECLs. 11969 119702001-02-06 Tom Tromey <tromey@redhat.com> 11971 11972 * lex.c (java_new_lexer): Longer error message. 11973 119742001-02-05 Jeff Sturm <jeff.sturm@commerceone.com> 11975 Alexandre Petit-Bianco <apbianco@cygnus.com> 11976 11977 * typeck.c (build_prim_array_type): Added leading comment. 11978 (build_java_array_type): Moved locals out of 11979 block. Always create the `data' field, fixed alignment to match 11980 C++. 11981 119822001-02-04 Tom Tromey <tromey@redhat.com> 11983 11984 * expr.c (java_lang_expand_expr): Don't bother recomputing 11985 `length'. Use rest_of_decl_compilation, not make_decl_rtl. 11986 Fixes PR java/1866. 11987 119882001-02-05 Alexandre Petit-Bianco <apbianco@cygnus.com> 11989 11990 * parse.y (process_imports): Save the original name of the import 11991 for better error report. 11992 119932001-02-04 Bryce McKinlay <bryce@albatross.co.nz> 11994 11995 * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list 11996 of macros used when compiling jvspec.c. 11997 * jvspec.c (lang_specific_driver): Link with the shared 11998 libgcc by default. 11999 120002001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 12001 12002 * check-init.c (check_init): Call internal_error instead of fatal. 12003 * expr.c (java_lang_expand_expr): Likewise. 12004 * jcf-parse.c (get_constant): Likewise. 12005 * mangle.c (java_mangle_decl): Likewise. 12006 * parse.y (make_nested_class_name, java_complete_lhs): Likewise. 12007 (operator_string): Likewise. 12008 * check-init.c (check_init): Call abort instead of fatal. 12009 * class.c (build_class_ref): Likewise. 12010 * constants.c (write_constant_pool): Likewise. 12011 * decl.c (start_java_method): Likewise. 12012 * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise. 12013 (java_stack_dup, encode_newarray_type): Likewise. 12014 (build_java_array_length_access): Likewise. 12015 (build_java_check_indexed_type, expand_java_pushc): Likewise. 12016 (build_java_soft_divmod, build_invokeinterface): Likewise. 12017 * java-tree.h (INNER_CLASS_P): Likewise. 12018 * jcf-parse.c (parse_signature, get_name_constant): Likewise. 12019 (give_name_to_class, get_class_constant): Likewise. 12020 * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise. 12021 (find_constant_index, generate_bytecode_conditional): Likewise. 12022 (generate_bytecode_insns, perform_relocations): Likewise. 12023 * lex.c (java_unget_unicode, java_lex): Likewise. 12024 * mangle.c (mangle_type, mangle_record_type): Likewise. 12025 (mangle_pointer_type, mangle_array_type, init_mangling): Likewise. 12026 (finish_mangling): Likewise. 12027 * parse.h (MARK_FINAL_PARMS): Likewise. 12028 * parse.y (pop_current_osb, unreachable_stmt_error): Likewise. 12029 (obtain_incomplete_type, java_complete_class): Likewise. 12030 (java_check_regular_methods, java_complete_expand_method): Likewise. 12031 (cut_identifier_in_qualified, check_deprecation): Likewise. 12032 (patch_invoke, find_applicable_accessible_methods_list): Likewise. 12033 (java_complete_lhs, lookup_name_in_blocks): Likewise. 12034 (check_final_variable_indirect_assignment, build_unaryop): Likewise. 12035 * typeck.c (set_local_type, parse_signature_type): Likewise. 12036 (parse_signature_string, build_java_signature): Likewise; 12037 (set_java_signature): Likewise. 12038 * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise. 12039 * class.c (add_method): Call fatal_error instead of fatal. 12040 (build_static_field_ref): Likewise. 12041 * expr.c (build_known_method_ref, expand_invoke): Likewise. 12042 * jcf-parse.c (get_constant, jcf_parse): Likewise. 12043 * lex.c (java_new_new_lexer): Likewise. 12044 * jv-scan.c (main): Likewise. 12045 (fatal_error): Renamed from fatal. 12046 * jcf-parse.c (yyparse): Call fatal_io_error instead of 12047 pfatal_with_name. 12048 * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal. 12049 (yyparse): Likewise. 12050 * jcf-write.c (make_class_file_name, write_classfile): Likewise. 12051 * lex.c (java_get_line_col): Likewise. 12052 * jcf-parse.c (load_class): Make errors non-fatal. 12053 * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV. 12054 120552001-02-01 Bryce McKinlay <bryce@albatross.co.nz> 12056 12057 * jvgenmain.c (class_mangling_suffix): Remove unused string. 12058 (error): Remove unused function. 12059 (main): Don't use "__attribute__ alias" on generated class symbol. 12060 120612001-01-30 Alexandre Petit-Bianco <apbianco@cygnus.com> 12062 12063 * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last 12064 argument. 12065 * parse.y (finish_method_declaration): Code accounting for WFLed 12066 method DECL_NAMEs deleted. 12067 (check_abstract_method_definitions): Likewise. 12068 (resolve_type_during_patch): Layout resolved type. 12069 * typeck.c (lookup_do): Removed unused local. 12070 120712001-01-30 Bryce McKinlay <bryce@albatross.co.nz> 12072 12073 * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE. 12074 * decl.c (init_decl_processing): Use integer_minus_one_node, not 12075 integer_negative_one_node. 12076 * expr.c (build_java_binop): Likewise. 12077 120782001-01-24 Jeff Sturm <jeff.sturm@commerceone.com> 12079 12080 * zextract.c (read_zip_archive): Read file_offset before writing 12081 zipd and consequently clobbering the header contents. 12082 120832001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 12084 12085 * Make-lang.in: Remove all dependencies on defaults.h. 12086 * decl.c: Don't include defaults.h. 12087 * expr.c: Likewise. 12088 * parse.y: Likewise. 12089 120902001-01-25 Alexandre Petit-Bianco <apbianco@cygnus.com> 12091 12092 * ChangeLog (2001-01-21): Fixed typo. 12093 * class.c (layout_class_method): Code accounting for WFLed 12094 method DECL_NAMEs deleted. 12095 * constant.c (find_methodref_index): Likewise. 12096 * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl. 12097 * java-tree.h (DECL_FUNCTION_WFL): New macro. 12098 (struct lang_decl): New field `wfl'. 12099 (java_get_real_method_name): Prototype deleted. 12100 * mangle.c (mangle_method_decl): Code accounting for WFLed 12101 method DECL_NAMEs deleted. 12102 * parse.h (GET_METHOD_NAME): Macro deleted. 12103 * parse.y (reset_method_name): Deleted. 12104 (method_header): Set DECL_FUNCTION_WFL. 12105 (check_abstract_method_header): Code accounting for WFLed method 12106 DECL_NAMEs deleted. 12107 (java_get_real_method_name): Deleted. 12108 (check_method_redefinition): Code accounting for WFLed method 12109 DECL_NAMEs deleted. Use DECL_FUNCTION_WFL. 12110 (java_check_regular_methods): Likewise. 12111 (java_check_abstract_methods): Likewise. 12112 (java_expand_classes): Don't call `reset_method_name.' 12113 (search_applicable_method_list): Use DECL_NAMEs instead of 12114 GET_METHOD_NAME. 12115 * typeck.c (lookup_do): Code accounting for WFLed method 12116 DECL_NAMEs deleted. 12117 121182001-01-25 Richard Earnshaw <rearnsha@arm.com> 12119 12120 * lex.c (java_read_char): Check for EOF from getc first. 12121 121222001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com> 12123 12124 * class.c (layout_class): Don't lay the superclass out if it's 12125 already being laid out. 12126 * jcf-parse.c (handle_innerclass_attribute): New function. 12127 (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke 12128 handle_innerclasses_attribute. 12129 (jcf_parse): Don't load an innerclasses if it's already being 12130 laid out. 12131 * jcf-write.c (append_innerclass_attribute_entry): Static 12132 `anonymous_name' and its initialization deleted. `ocii' and `ini' 12133 to be zero for anonymous classes. 12134 121352001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com> 12136 12137 * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if 12138 necessary. 12139 * jcf-parse.c (set_source_filename): Use 12140 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary. 12141 121422001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com> 12143 12144 * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it 12145 gets a unique asm name. 12146 121472001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com> 12148 12149 * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method. 12150 (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC 12151 if necessary. 12152 (HANDLE_SYNTHETIC_ATTRIBUTE): New macro. 12153 * jcf-reader.c (get_attribute): Handle `Synthetic' attribute. 12154 * parse.y (lookup_package_type_and_set_next): Deleted. 12155 (resolve_package): Removed unnecessary code. 12156 (find_applicable_accessible_methods_list): `finit$' can't be 12157 inherited. 12158 * verify.c (pop_argument_types): Added missing prototype. 12159 121602001-01-23 Bryce McKinlay <bryce@albatross.co.nz> 12161 12162 * config-lang.in: Disable java by default. 12163 121642001-01-23 Tom Tromey <tromey@redhat.com> 12165 12166 * gcj.texi (Copying): New node. 12167 Added copyright information. 12168 121692001-01-21 Per Bothner <per@bothner.com> 12170 12171 Various fixes to allow compiling a compressed .jar/.zip archive. 12172 * zipfile.h (struct ZipFileCache): Replace by struct ZipFile. 12173 (struct ZipFile): Add fields name and next (from ZipFileCache). 12174 (struct ZipDirectory): New field zipf points to owning ZipFile. 12175 * jcf.h (struct ZipDirectory): Add forward declaration. 12176 (struct JCF): Declare zipd field to have type struct ZipDirectory. 12177 Remove seen_in_zip and zip_offset fields. 12178 (JCF_SEEN_IN_ZIP): New macro. 12179 * zextract.c (read_zip_archive): Set ZipDirectory's zipf field. 12180 * jcf-io.c: Change all ZipFileCache to ZipFile. 12181 (read_zip_member): New function. 12182 (open_in_zip): Call read_zip_member. 12183 * jcf-parse.c (find_in_current_zip): Remove function. 12184 (read_class): Merge in find_in_current_zip functionality. 12185 Call read_zip_member if needed. 12186 (parse_zip_file_entries): Use read_zip_member. 12187 (process_zip_dir): Update for removed and added JCF fields. 12188 (jcf_figure_file_type): Re-use, don't copy initial ZipFile struct. 12189 121902001-01-21 Per Bothner <per@bothner.com> 12191 12192 Minor optimization of static ggc roots. 12193 * jcf-parse.c (parse_roots): New static field. 12194 (current_field, current_method, current_file_list): Replace by macros 12195 naming fields of parse_roots. 12196 (init_jcf_parse): Combine 3 ggc_add_tree_root calls to 1. 12197 * class.c (class_roots): New static field. 12198 (registered_class, fields_ident, info_ident, class_list): 12199 New macros naming fields of parse_roots. 12200 (build_static_field_ref): Don't register roots here. 12201 (layout_class): Static field list replaced by macro class_list. 12202 (init_class_processing): Call ggc_add_tree_root for 4 roots. 12203 Initialize fields_ident and info_ident here. 12204 122052001-01-21 Per Bothner <per@bothner.com> 12206 12207 * jcf-parse.c (ggc_mark_jcf): New function. 12208 (init_jcf_parse): Register current_jcf as ggc root. 12209 122102001-01-21 Per Bothner <per@bothner.com> 12211 12212 * lang.c (put_decl_node): Print method's name. 12213 122142001-01-21 Per Bothner <per@bothner.com> 12215 12216 * verify.c (VERIFICATION_ERROR_WITH_INDEX): New macro. 12217 (verify_jvm_instructions): Use it, for better error messages on loads. 12218 122192001-01-21 Per Bothner <per@bothner.com> 12220 12221 * verify.c (merge_type_state): Still may have to merge even if 12222 LABEL_VERIFIED (label). 12223 122242001-01-21 Per Bothner <per@bothner.com> 12225 12226 * parse.y (method_header): Don't set the DECL_NAME of a FUNCTION_DECL 12227 to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong. 12228 122292001-01-19 Per Bothner <per@bothner.com> 12230 12231 * expr.c (pop_type_0): Only return object_ptr_type_node on mismatch 12232 if expeting an interface type. Refines Tom's change of 2000-09-12. 12233 122342001-01-18 Per Bothner <per@bothner.com> 12235 12236 * gcj.texi (Input Options): Mention .java files. 12237 122382001-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com> 12239 12240 * lang-options.h (-Wunsupported-jdk11): Removed. 12241 * lang.c (flag_not_overriding): Deleted. 12242 (flag_static_local_jdk1_1): Likewise. 12243 (lang_W_options): Removed "unsupported-jdk11" entry. 12244 * parse.y (java_check_methods): Removed dead code. 12245 122462001-01-17 Tom Tromey <tromey@redhat.com> 12247 12248 Changes suggested by Per Bothner: 12249 * gcj.texi (Input Options): Don't mention input files. 12250 (Code Generation): Updated --main information. 12251 (Invoking jcf-dump): Mention that --javap is incomplete. 12252 From Alexandre Petit-Bianco: 12253 (Warnings): Don't mention -Wunsupported-jdk11. 12254 My stuff: 12255 (Compatibility): Mention JDK 1.2-ness of libraries. 12256 (Resources): Mention resources used when writing gcj. 12257 122582001-01-17 Tom Tromey <tromey@redhat.com> 12259 12260 * gcj.texi: New file. 12261 * Make-lang.in ($(srcdir)/java/gcj.info): New target. 12262 (java.info): Depend on gcj.info. 12263 (java/gcj.dvi): New target. 12264 (java.dvi): Depend on gcj.dvi. 12265 (java.install-info): Wrote. 12266 122672001-01-16 Jeff Sturm <jeff.sturm@appnet.com> 12268 12269 * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after 12270 having called make_decl_rtl. 12271 122722001-01-14 Per Bothner <per@bothner.com> 12273 12274 Various patches to emit better messages on verification errors. 12275 * expr.c (push_type_0): Return error indication on stack overflow, 12276 instead of callinfg fatal. 12277 (push_type): Now just call push_type_0 (nd fatal on overflow). 12278 (pop_type_0): Return detailed error message (in a char** argument). 12279 (pop_type): If pop_type_0 fails, print error message. 12280 (pop_argument_types): Moved to verify.c. 12281 * verify.c (pop_argument_types): Moved from expr.c. 12282 Return a (possible) error message, rather than void. 12283 (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING): New macros. 12284 (verify_jvm_instruction): Use new macros, improving error messages. 12285 For case OPCODE_astore use object_ptr_type_node. 12286 * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED): New macros. 12287 (pop_type_0, push_type_0, pop_argument_types): Update accordingly. 12288 12289 * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is 12290 constant, return body without wrapper. (Improves constant folding.) 12291 * lex.c (build_wfl_node): Clear TREE_TYPE from returned node. 12292 122932001-01-13 Per Bothner <per@bothner.com> 12294 12295 * expr.c (expand_java_field_op): Assigning to a final field outside 12296 an initializer does not violate JVM spec, so should be warning, not 12297 error. (Sun's verifier does not complain - though MicroSoft's does.) 12298 122992001-01-12 Joseph S. Myers <jsm28@cam.ac.uk> 12300 12301 * gjavah.c (version), jcf-dump.c (version): Update copyright year 12302 to 2001. 12303 123042001-01-11 Bryce McKinlay <bryce@albatross.co.nz> 12305 12306 * parse.y (resolve_expression_name): Permit instance variables from 12307 enclosing context in super constructor call. 12308 (resolve_qualified_expression_name): Permit enclosing class's qualified 12309 "this" in super constructor call. 12310 123112001-01-10 Mark Mitchell <mark@codesourcery.com> 12312 12313 * class.c (build_utf8_ref): Remove last argument in call to 12314 make_decl_rtl; use make_function_rtl instead of make_decl_rtl. 12315 (build_class_ref): Likewise. 12316 (build_static_field_ref): Likewise. 12317 (get_dispatch_table): Likewise. 12318 (layout_class_method): Likewise. 12319 (emit_register_classes): Likewise. 12320 * constants.c (build_constant_data_ref): Likewise. 12321 * decl.c (builtin_function): Likewise. 12322 (create_primitive_vtable): Likewise. 12323 * expr.c (build_known_method_def): Likewise. 12324 (build_jni_stub): Likewise. 12325 (java_lang_expand_expr): Likewise. 12326 123272001-01-10 Tom Tromey <tromey@redhat.com> 12328 12329 * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation. 12330 123312001-01-08 Alexandre Petit-Bianco <apbianco@cygnus.com> 12332 12333 * java-tree.h (lang_printable_name_wls): New prototype. 12334 * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT 12335 rather than `current_class' to print type name. Don't prepend type 12336 names when printing constructor names. 12337 (lang_printable_name_wls): New function. 12338 * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to 12339 `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE. 12340 * parse.y (patch_method_invocation): Message tuned for constructors. 12341 (not_accessible_p): Grant `private' access from within 12342 enclosing contexts. 12343 123442001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com> 12345 12346 All files with updated copyright when applicable. 12347 * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o. 12348 * class.c (mangle_class_field): Function removed. 12349 (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise. 12350 (utf8_cmp, cxx_keyword_p): Moved to lex.c. 12351 (build_class_ref): Call `java_mangle_class_field' instead of 12352 `mangle_class_field.' 12353 (build_dtable_decl): Rewritten to call `java_mangle_vtable.' 12354 (layout_class): Call `java_mangle_decl' instead of 12355 `mangle_static_field.' 12356 (cxx_keywords): Initialized static array moved to `lex.c.' 12357 (layout_class_method): Changed leading comment. Simplified to 12358 call `java_mangle_decl.' Local `ptr' moved in for loop body. 12359 * decl.c (lang_mark_tree): Mark field `package_list.' 12360 * java-tree.h (TYPE_PACKAGE_LIST): New macro. 12361 (struct lang_type): New field `package_list.' 12362 (unicode_mangling_length): Prototype removed. 12363 (append_gpp_mangled_name, append_gpp_mangled_classtype, 12364 emit_unicode_mangled_name): Likewise. 12365 (cxx_keyword_p): New prototype. 12366 (java_mangle_decl, java_mangle_class_field, 12367 java_mangle_class_field_from_string, java_mangle_vtable): Likewise. 12368 * jcf-parse.c (jcf_parse_source): Constify `file' argument to 12369 `build_expr_wfl.' 12370 * jvgenmain.c (main_method_prefix): Global variable removed. 12371 (main_method_suffix): Likewise. 12372 (do_mangle_classname): New function. 12373 (main): Call it. Format changed to accommodate new mangling scheme. 12374 * lex.c: (utf8_cmp): Conditionally prototyped. 12375 (cxx_keywords): Moved from class.c, conditionally defined. 12376 (utf8_cmp, cxx_keyword_p): Likewise. 12377 * mangle.c (obstack.h, ggc.h): Included. 12378 (mangle_field_decl): New function. 12379 (mangle_method_decl, mangle_type, mangle_pointer_type, 12380 mangle_array_type, mangle_record_type, 12381 find_compression_pointer_match, find_compression_array_match, 12382 find_compression_record_match, 12383 find_compression_array_template_match, set_type_package_list, 12384 entry_match_pointer_p, emit_compression_string, init_mangling, 12385 finish_mangling, compression_table_add, mangle_member_name): Likewise. 12386 (mangle_obstack): New global. 12387 (MANGLE_RAW_STRING): New macro. 12388 (unicode_mangling_length): Turned static. 12389 (append_unicode_mangled_name): Renamed from 12390 `emit_unicode_mangled_name.' Turned static. `mangle_obstack' 12391 replaces `obstack', removed from the parameter list. 12392 (append_gpp_mangled_name): Turned static. `mangle_obstack' 12393 replaces parameter `obstack', removed from the parameter list. Call 12394 `append_unicode_mangled_name' instead of `emit_unicode_mangled_name. 12395 (append_gpp_mangled_classtype): Removed. 12396 (compression_table, compression_next): New static variables. 12397 * parse.y (temporary_obstack): Extern declaration removed. 12398 123992001-01-05 Alexandre Petit-Bianco <apbianco@cygnus.com> 12400 12401 * parse.y (patch_binop): Compute missing type in error situations. 12402 124032001-01-05 Bryce McKinlay <bryce@albatross.co.nz> 12404 12405 * class.c (make_class_data): Push initial value for "arrayclass". 12406 * decl.c (init_decl_processing): Add new class field "arrayclass". 12407 124082001-01-05 Bryce McKinlay <bryce@albatross.co.nz> 12409 12410 From patha@softlab.ericsson.se: 12411 * parse.y (switch_label): Use build, not build1, to construct 12412 DEFAULT_EXPR. 12413 124142001-01-04 Neil Booth <neil@daikokuya.demon.co.uk> 12415 12416 * lang.c (lang_decode_option): Change -MA to -MP. 12417 * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target): 12418 Update to new prototype; do quote targets. 12419 (jcf_dependency_write): Update. 12420 124212000-12-22 Bryce McKinlay <bryce@albatross.co.nz> 12422 12423 Shorten primitive array allocation path: 12424 * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray 12425 to create new primitive arrays. 12426 * expr.c (build_newarray): If generating native code, call 12427 soft_newarray_node with a reference to the primitive TYPE identifier 12428 instead of type_value. 12429 124302000-12-17 Bryce McKinlay <bryce@albatross.co.nz> 12431 12432 Fix for PRs gcj/312 and gcj/253: 12433 * parse.y (valid_ref_assignconv_cast_p): Load classes for source and 12434 dest if they arn't already. 12435 * class.c (layout_class): Call maybe_layout_super_class on 12436 superinterfaces also, but only if compiling from bytecode. 12437 12438 Fix for PR gcj/373: 12439 * parse.y (create_class): Set ACC_STATIC if class is declared in an 12440 interface. 12441 124422000-12-15 Tom Tromey <tromey@redhat.com> 12443 12444 * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already 12445 set. 12446 124472000-12-14 Andrew Haley <aph@redhat.com> 12448 12449 * boehm.c (mark_reference_fields): Change test to correctly detect 12450 bitmap overflow. 12451 124522000-12-15 Andreas Jaeger <aj@suse.de> 12453 12454 * config-lang.in (lang_dirs): Added. 12455 124562000-12-15 Alexandre Petit-Bianco <apbianco@cygnus.com> 12457 12458 * parse.y (end_artificial_method_body): Fixed undefined behavior. 12459 Credits go to rth for finding it. 12460 124612000-12-13 Mike Stump <mrs@wrs.com> 12462 12463 * parse.y (check_static_final_variable_assignment_flag): Fix spelling. 12464 124652000-11-07 Tom Tromey <tromey@cygnus.com> 12466 12467 * Make-lang.in (JAVA_LEX_C): Added chartables.h. 12468 * lex.c (java_ignorable_control_p): Removed. 12469 (java_letter_or_digit_p): Removed. 12470 (java_start_char_p): New function. 12471 (java_read_char): Return `int', not `unicode_t'. Changed 12472 callers. 12473 (java_read_unicode): Likewise. 12474 (java_read_unicode_collapsing_terminators): Likewise. 12475 (java_get_unicode): Likewise. 12476 (java_new_lexer): Initialize hit_eof. 12477 (java_parse_end_comment): Take `int' argument. 12478 (java_parse_doc_section): Likewise. 12479 (java_parse_escape_sequence): Don't allow backlash-newline. 12480 Return `int'. 12481 * lex.h (JAVA_DIGIT_P): Removed. 12482 (_JAVA_LETTER_OR_DIGIT_P): Removed. 12483 (_JAVA_IDENTIFIER_IGNORABLE): Removed. 12484 (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P. 12485 (JAVA_PART_CHAR_P): New macro. 12486 (UEOF): Now -1. 12487 (JAVA_CHAR_ERROR): Now -2. 12488 (java_lexer): New field `hit_eof'. 12489 * chartables.h: New file. 12490 * gen-table.pl: new file. 12491 124922000-11-20 Tom Tromey <tromey@cygnus.com> 12493 Alexandre Petit-Bianco <apbianco@cygnus.com> 12494 12495 * parse.y (java_complete_lhs): Only allow compound assignment of 12496 reference type if type is String. 12497 124982000-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com> 12499 12500 * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip. 12501 jcf-path.c: Likewise. 12502 125032000-12-09 Anthony Green <green@redhat.com> 12504 12505 * zipfile.h (ZipDirectory): Declare size, uncompressed_size, 12506 filestart and filename_length as int values. 12507 125082000-12-07 Mo DeJong <mdejong@redhat.com> 12509 12510 * jcf-io.c (find_class): Correct the logic that tests to see if a 12511 .java file is newer than its .class file. The compiler was 12512 incorrectly printing a warning when file mod times were equal. 12513 125142000-12-07 Zack Weinberg <zack@wolery.stanford.edu> 12515 12516 * jvgenmain.c: Use ISPRINT not isascii. 12517 125182000-12-06 Alexandre Petit-Bianco <apbianco@cygnus.com> 12519 12520 * parse.y (end_artificial_method_body): Fixed typo. 12521 125222000-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com> 12523 12524 * parse.y (patch_method_invocation): Pick the correct enclosing 12525 context when creating inner class instances. 12526 Fixes gcj/332. 12527 125282000-11-26 Joseph S. Myers <jsm28@cam.ac.uk> 12529 12530 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version): 12531 Update copyright year to 2000. 12532 125332000-11-23 Anthony Green <green@redhat.com> 12534 12535 * jcf-parse.c (init_jcf_parse): Register current_file_list root. 12536 Move current_file_list out of yyparse and make it static. 12537 12538 * expr.c: Declare quick_stack and tree_list_free_list as static 12539 (init_expr_processing): Register quick_stack and 12540 tree_list_free_list roots. 12541 125422000-11-22 Alexandre Petit-Bianco <apbianco@cygnus.com> 12543 12544 * parse.y (build_outer_field_access): New local `decl_ctx', use 12545 it. Check for field's context and current class immediate outer 12546 context inheritance. 12547 (outer_field_access_p): Consider fields inherited from the last 12548 enclosing context. 12549 (build_access_to_thisn): Stop at the last enclosing context if 12550 necessary. 12551 Fixes gcj/367. 12552 125532000-11-23 J"orn Rennecke <amylaar@redhat.com> 12554 12555 * Make-lang.in (jvspec.o): Depend on $(CONFIG_H). 12556 125572000-11-22 Bryce McKinlay <bryce@albatross.co.nz> 12558 12559 * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the 12560 scratch buffer. 12561 125622000-11-20 Tom Tromey <tromey@cygnus.com> 12563 12564 * jv-scan.c (help): Document --complexity. 12565 (options): Added --complexity. 12566 (flag_complexity): New global. 12567 (main): Call `report'. 12568 * parse-scan.y (complexity): New global. 12569 (if_then_statement, if_then_else_statement, 12570 if_then_else_statement_nsi, switch_block_statement_group, 12571 while_expression, do_statement, for_begin, continue_statement, 12572 throw_statement, catch_clause, finally, method_invocation, 12573 conditional_and_expression, conditional_or_expression, 12574 conditional_expression): Update complexity. 12575 (reset_report): Reset complexity. 12576 (report): New function. 12577 125782000-11-20 Tom Tromey <tromey@cygnus.com> 12579 12580 * lex.c (yylex): Added STRICT_TK case. 12581 * parse.y (STRICT_TK): Added. 12582 * parse-scan.y (STRICT_TK): Added. 12583 * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and 12584 `;'. Use 4, not 3, with -k option. Correctly rename resulting 12585 file. 12586 * keyword.h: Rebuilt. 12587 * keyword.gperf (strictfp): Added. 12588 125892000-11-20 Tom Tromey <tromey@cygnus.com> 12590 12591 * lex.c (yylex): Recognize floating point constants with leading 12592 0. 12593 125942000-11-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 12595 12596 * java-tree.h (cyclic_inheritance_report): Constify. 12597 * parse.y (cyclic_inheritance_report): Likewise. 12598 125992000-11-17 Zack Weinberg <zack@wolery.stanford.edu> 12600 12601 * parse.y (goal): Remove call to ggc_add_string_root. 12602 126032000-11-16 Zack Weinberg <zack@wolery.stanford.edu> 12604 12605 * jcf-parse.c (get_constant), parse.y (do_merge_string_cste): 12606 Create string in scratch buffer, then pass to build_string. 12607 126082000-11-13 Joseph S. Myers <jsm28@cam.ac.uk> 12609 12610 * parse.y (issue_warning_error_from_context): Add 12611 ATTRIBUTE_PRINTF. 12612 126132000-11-11 Anthony Green <green@redhat.com> 12614 12615 * jcf-parse.c (process_zip_dir): Add finput parameter. 12616 (jcf_figure_file_type): Call process_zip_dir with appropriate 12617 argument. 12618 126192000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 12620 12621 * decl.c (copy_lang_decl): Use memcpy, not bcopy. 12622 * jcf-parse.c (jcf_figure_file_type): Likewise. 12623 126242000-11-09 Joseph S. Myers <jsm28@cam.ac.uk> 12625 12626 * parse.y (create_new_parser_context): Use memset () instead of 12627 bzero (). 12628 126292000-11-08 Tom Tromey <tromey@cygnus.com> 12630 12631 * gjavah.c (process_file): Only include gcj/cni.h when generating 12632 CNI stubs. 12633 126342000-11-07 Joseph S. Myers <jsm28@cam.ac.uk> 12635 12636 * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c 12637 (init_outgoing_cpool), lex.c (java_init_lex): Use memset () 12638 instead of bzero (). 12639 126402000-11-05 Tom Tromey <tromey@cygnus.com> 12641 12642 * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix. 12643 * lex.c (IS_ZERO): New define. 12644 (java_perform_atof): Error on floating point underflow. 12645 126462000-11-04 Tom Tromey <tromey@cygnus.com> 12647 12648 * lex.c (java_parse_escape_sequence): Only read two octal 12649 characters if the first one is greater than 3. Don't allow 12650 "octal" numbers to include the digits 8 or 9. 12651 126522000-11-05 Joseph S. Myers <jsm28@cam.ac.uk> 12653 12654 * Make-lang.in (java.distdir): Remove. 12655 126562000-11-03 Tom Tromey <tromey@cygnus.com> 12657 12658 * Make-lang.in (java.dvi): New target. 12659 Partial fix for PR other/567. 12660 12661 * lang-options.h: Mention -Wout-of-date. 12662 * jcf-dump.c (flag_newer): New global. 12663 * gjavah.c (flag_newer): New global. 12664 * jcf-io.c (find_class): Only warn when flag_newer set. 12665 * lang.c (flag_newer): New global. 12666 (struct string_option): New declaration. 12667 (lang_W_options): New global. 12668 (process_option_with_no): New function. 12669 (lang_decode_option): Use it. 12670 12671 * class.c (cxx_keyword_p): Accept keywords with trailing `$'s. 12672 * gjavah.c (cxx_keyword_subst): Handle any number of trailing 12673 `$'. 12674 12675 * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro. 12676 (JAVA_ID_CHAR_P): Also try java_ignorable_control_p. 12677 * lex.c (java_read_unicode): Removed `term_context' argument. 12678 Recognize any number of `u' in `\u'. 12679 (java_read_unicode_collapsing_terminators): New function. 12680 (java_get_unicode): Use it. 12681 (java_lineterminator): Removed. 12682 (yylex): Produce error if character literal is newline or single 12683 quote. Return if eof found in middle of `//' comment. EOF in 12684 `//' comment is only an error if pedantic. 12685 (java_ignorable_control_p): New function. 12686 (java_parse_end_comment): Return if eof found in middle of 12687 comment. 12688 Include flags.h. 12689 * jv-scan.c (pedantic): New global. 12690 126912000-10-31 Alexandre Petit-Bianco <apbianco@cygnus.com> 12692 12693 * parse.y (outer_field_access_p): Inherited fields aren't 12694 consider outer fields. 12695 (maybe_build_thisn_access_method): Use 12696 PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P. 12697 (resolve_expression_name): Trigger an error if a static field 12698 is being accessed as an outer field. 12699 127002000-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com> 12701 12702 * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'. 12703 Fixes gcj/365. 12704 127052000-10-27 Zack Weinberg <zack@wolery.stanford.edu> 12706 12707 * Make-lang.in: Move all build rules here from Makefile.in, 12708 adapt to new context. Wrap all rules that change the current 12709 directory in parentheses. Expunge all references to $(P). 12710 When one command depends on another and they're run all at 12711 once, use && to separate them, not ;. Add OUTPUT_OPTION to 12712 all object-file generation rules. Delete obsolete variables. 12713 12714 * Makefile.in: Delete. 12715 * config-lang.in: Delete outputs= line. 12716 127172000-10-25 Alexandre Petit-Bianco <apbianco@cygnus.com> 12718 12719 * parse.y (patch_method_invocation): NULLify this_arg when already 12720 inserted. 12721 (maybe_use_access_method): Handle call to methods unrelated to the 12722 current class. Fixed comment. 12723 Fixes gcj/361. 12724 127252000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com> 12726 12727 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in 12728 scope. 12729 127302000-10-24 Tom Tromey <tromey@cygnus.com> 12731 12732 * lex.c (java_new_lexer): Initialize new fields. Work around 12733 broken iconv() implementations. 12734 (java_read_char): Swap bytes if required. Use fallback decoder if 12735 required. 12736 (byteswap_init, need_byteswap): New globals. 12737 (java_destroy_lexer): Only close iconv handle if it is in use. 12738 * lex.h (java_lexer): New fields read_anything, byte_swap, 12739 use_fallback. 12740 Made out_buffer unsigned. 12741 127422000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com> 12743 12744 * parse.y (register_incomplete_type): Include JDEP_FIELD as a case 12745 where an enclosing context can be set on the jdep. 12746 (do_resolve_class): Fixed identation. 12747 127482000-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 12749 12750 * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define 12751 12752 * jcf-reader.c (peek_attribute, skip_attribute): Only define 12753 when requested. 12754 12755 * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN. 12756 12757 * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void. 12758 127592000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com> 12760 12761 * jcf-write.c (OP1): Update `last_bc'. 12762 (struct jcf_block): Fixed indentation and typo in comments. New 12763 field `last_bc'. 12764 (generate_bytecode_insns): Insert `nop' if `jsr' immediately 12765 follows `monitorenter'. 12766 * parse.y (patch_synchronized_statement): New local `tmp'. Call 12767 `patch_string'. 12768 Fixes gcj/232. 12769 127702000-10-16 Tom Tromey <tromey@cygnus.com> 12771 12772 * jvspec.c (lang_specific_driver): Recognize -MF and -MT. 12773 * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}. 12774 * lang-options.h: Added -MA, -MT, -MF.. 12775 * lang.c (lang_decode_option): Recognize -MA, -MT, -MF. 12776 (DEPEND_TARGET_SET): New macro. 12777 (DEPEND_FILE_ALREADY_SET): Likewise. 12778 (init_parse): Handle new flags. 12779 * jcf.h (jcf_dependency_print_dummies): Declare. 12780 * Make-lang.in (s-java): Added mkdeps.o. 12781 * Makefile.in (BACKEND): Added mkdeps.o. 12782 (../gcjh$(exeext)): Added mkdeps.o. 12783 (../jcf-dump$(exeext)): Added mkdeps.o. 12784 * jcf-depend.c: Include mkdeps.h. 12785 (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS, 12786 add_entry): Removed. 12787 (jcf_dependency_reset): Rewrote. 12788 (dependencies): New global. 12789 (jcf_dependency_set_target): Rewrote. 12790 (jcf_dependency_add_target): Likewise. 12791 (jcf_dependency_add_file): Likewise. 12792 (munge): Removed. 12793 (print_ents): Removed. 12794 (jcf_dependency_write): Rewrote. 12795 (print_dummies): New global. 12796 (jcf_dependency_print_dummies): New function 12797 (jcf_dependency_write): Call deps_dummy_targets if required. 12798 127992000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com> 12800 12801 * gjavah.c (add_class_decl): Removed unused variables `tname', 12802 `tlen' and `name_index'. 12803 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro. 12804 * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME 12805 in `wfl_operator' with value. 12806 (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE. 12807 (jcf_figure_file_type): Fixed identation. 12808 * lex.c (java_get_line_col): Use EOF. Tuned `^' placement. 12809 * parse.y (analyze_clinit_body): New function. 12810 (static_initializer:): Reset `current_static_block'. 12811 (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in 12812 `wfl_operator' with new value. 12813 (lookup_cl): Use EXPR_WFL_FILENAME. 12814 (maybe_yank_clinit): Handle bogus <clinit> bodies, call 12815 analyze_clinit_body. 12816 (build_outer_field_access): Access to this$<n> built from 12817 current_class, not its outer context. 12818 (build_access_to_thisn): Fixed leading comment. Tidied things up. 12819 (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'. 12820 (patch_method_invocation): Use `is_static_flag' when already 12821 initialized. 12822 (patch_newarray): Removed assignment in ternary operator. 12823 128242000-10-17 Alexandre Petit-Bianco <apbianco@cygnus.com> 12825 12826 * except.c (free_eh_ranges): Don't free `whole_range'. 12827 128282000-10-15 Anthony Green <green@redhat.com> 12829 12830 * decl.c (init_decl_processing): Call init_class_processing before 12831 anything else. 12832 128332000-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com> 12834 12835 * check-init.c (check_init): Fixed leading comment. Use 12836 LOCAL_FINAL_P. 12837 * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC. 12838 (give_name_to_locals): Likewise. 12839 (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl' 12840 fields in lang_decl_var. 12841 * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR, 12842 DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros. 12843 (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten. 12844 (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC, 12845 DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros. 12846 (LOCAL_FINAL): Rewritten. 12847 (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P 12848 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros. 12849 (struct lang_decl): Fixed comments. Added `synthetic_ctor' and 12850 `init_final' fields. 12851 (struct lang_decl_var): Fixed leading comment. Added `am', `wfl', 12852 `final_uid', `final_liic', `final_ierr' and `local_final' fields. 12853 (TYPE_HAS_FINAL_VARIABLE): New macro. 12854 (struct lang_type): Added `afv' field. 12855 * parse.y (check_static_final_variable_assignment_flag): New function. 12856 (reset_static_final_variable_assignment_flag): Likewise. 12857 (check_final_variable_local_assignment_flag): Likewise. 12858 (reset_final_variable_local_assignment_flag): Likewise. 12859 (check_final_variable_indirect_assignment): Likewise. 12860 (check_final_variable_global_assignment_flag): Likewise. 12861 (add_inner_class_fields): Use LOCAL_FINAL_P. 12862 (register_fields): Handle local finals and final variables. 12863 (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR. 12864 (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC. 12865 (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC 12866 on local finals. 12867 (java_complete_expand_methods): Loop to set 12868 TYPE_HAS_FINAL_VARIABLE. Call 12869 `reset_final_variable_local_assignment_flag' and 12870 `check_final_variable_local_assignment_flag' accordingly before 12871 and after constructor expansion. Call 12872 `reset_static_final_variable_assignment_flag' 12873 before expanding <clinit> and after call 12874 `check_static_final_variable_assignment_flag' if the 12875 current_class isn't an interface. After all methods have been 12876 expanded, call `check_final_variable_global_assignment_flag' and 12877 `check_static_final_variable_assignment_flag' if the current class 12878 is an interface. 12879 (maybe_yank_clinit): Fixed typo in comment. 12880 (build_outer_field_access_methods): Removed old sanity check. Use 12881 FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC. 12882 Don't create access methods for finals. 12883 (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'. 12884 (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if 12885 existing DECL_INIT has been processed. 12886 (java_complete_lhs): Likewise. 12887 (check_final_assignment): Filter input on `lvalue''s TREE_CODE. 12888 Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new 12889 logic. 12890 (patch_assignment): Use LOCAL_FINAL_P. 12891 (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if 12892 DECL_INITIAL is nullified. 12893 Fixes gcj/163. 12894 128952000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 12896 12897 * Make-lang.in (parse.c, parse-scan.c): Create atomically. 12898 12899 * Makefile.in (parse.c, parse-scan.c): Likewise. 12900 129012000-10-12 Mark Mitchell <mark@codesourcery.com> 12902 12903 * class.c (temporary_obstack): Remove. 12904 (make_class): Don't mess with obstascks. 12905 (push_class): Likewise. 12906 (set_super_info): Likewise. 12907 (add_method_1): Likewise. 12908 (add_method): Likewise. 12909 (add_field): Likewise. 12910 (build_utf8_ref): Likewise. 12911 (build_class_ref): Likewise. 12912 (build_static_field_ref): Likewise. 12913 (finish_class): Likewise. 12914 (push_super_field): Likewise. 12915 (layout_class): Likewise. 12916 (layout_class_methods): Likewise. 12917 (init_class_processing): Likewise. 12918 * constants.c (get_tag_node): Likewise. 12919 (build_constant_data_ref): Likewise. 12920 * decl.c (ggc_p): Remove. 12921 (copy_lang_decl): Use ggc_alloc. 12922 (complete_start_java_method): Don't mess with obstacks. 12923 (start_java_method): Likewise. 12924 (end_java_method): Likewise. 12925 * except.c (link_handler): Use xmalloc. 12926 (free_eh_ranges): New function. 12927 (method_init_exceptions): Use it. 12928 (add_handler): Use xmalloc. 12929 (expand_start_java_handler): Don't mess with obstacks. 12930 (prepare_eh_table_type): Likewise. 12931 (expand_end_java_handler): Likewise. 12932 * expr.c (push_value): Likewise. 12933 (create_label_decl): Likewise. 12934 (build_jni_stub): Likewise. 12935 (java_lang_expand_expr): Likewise. 12936 (note_instructions): Use xrealloc. 12937 (java_push_constant_from_pool): Don't mess with obstacks. 12938 (process_jvm_instruction): Likewise. 12939 * java-tree.h (cyclic_inheritance_report): Remove duplicate 12940 declaration. 12941 * jcf-parse.c (get_constant): Don't mess with obstacks. 12942 (read_class): Likewise. 12943 (jcf_parse): Likewise. 12944 * lex.c (expression_obstack): Remove. 12945 (java_lex): Don't use obstack_free. 12946 * parse.h (exit_java_complete_class): Don't mess with obstacks. 12947 (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust. 12948 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise. 12949 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise. 12950 * parse.y (gaol): Add more GC roots. 12951 (add_inner_class_fields): Adjust calls to MANGLE_* macros. 12952 (lookup_field_wrapper): Likewise. 12953 (obtain_incomplete_type): Don't mess with obstacks. 12954 (build_alias_initializer_parameter_list): Adjust calls to MANGLE_* 12955 macros. 12956 (craft_constructor): Don't mess with obstacks. 12957 (safe_layout_class): Likewise. 12958 (java_complete_class): Likewise. 12959 (source_end_java_method): Likewise. 12960 (build_outer_field_access_methods): Likewise. 12961 (build_outer_method_access_method): Likewise. 12962 (maybe_build_thisn_access_method): Likewise. 12963 (build_dot_class_method_invocation): Likewise. 12964 (java_complete_tree): Likewise. 12965 (java_complete_lhs): Likewise. 12966 (do_merge_string_cste): Likewise. 12967 (patch_string_cst): Likewise. 12968 (array_constructor_check_entry): Likewise. 12969 * typeck.c (build_java_array_type): Likewise. 12970 (parse_signature_string): Likewise. 12971 (build_java_signature): Likewise. 12972 129732000-10-12 Tom Tromey <tromey@cygnus.com> 12974 12975 Fix for PR gcj/356: 12976 * gjavah.c (add_class_decl): Don't special-case inner classes. 12977 (add_namelet): Likewise. 12978 129792000-10-11 Rodney Brown <RodneyBrown@mynd.com> 12980 12981 * java-tree.h: Constify current_encoding. 12982 * lang.c: Constify current_encoding. 12983 129842000-10-10 Jeff Sturm <jeff.sturm@appnet.com> 12985 12986 * jvgenmain.c (class_mangling_suffix): Omit `.'. 12987 (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'. 12988 129892000-10-10 Alexandre Petit-Bianco <apbianco@cygnus.com> 12990 12991 * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's 12992 patch. Fixes gcj/340. 12993 129942000-10-10 Tom Tromey <tromey@cygnus.com> 12995 12996 * lex.c (java_new_lexer): Initialize out_first and out_last 12997 fields. 12998 * lex.h (java_lexer): Added out_buffer, out_first, out_last. 12999 130002000-10-09 Alexandre Petit-Bianco <apbianco@cygnus.com> 13001 13002 * parse.y (pop_current_osb): New function. 13003 (array_type:): Use `dims:', changed actions 13004 accordingly. Suggested by Anthony Green. 13005 (array_creation_expression:): Used pop_current_osb. 13006 (cast_expression:): Likewise. 13007 (search_applicable_method_list): Fixed indentation. 13008 130092000-10-08 Anthony Green <green@redhat.com> 13010 13011 * parse.y (array_type_literal): Remove production. 13012 (type_literals): Refer to array_type, not array_type_literal. 13013 130142000-10-07 Alexandre Petit-Bianco <apbianco@cygnus.com> 13015 13016 Patch contributed by Corey Minyard. 13017 * decl.c (check_local_named_variable): New function. 13018 (tree check_local_unnamed_variable): Likewise. 13019 (find_local_variable): Splitted. Call check_local_{un}named_variable. 13020 130212000-10-07 Anthony Green <green@redhat.com> 13022 13023 * class.c (layout_class): Handle case where superclass can't be 13024 layed out yet. 13025 130262000-10-07 Joseph S. Myers <jsm28@cam.ac.uk> 13027 13028 * Makefile.in (keyword.h): Refer to GNU FTP site for updated 13029 gperf. 13030 130312000-10-05 Tom Tromey <tromey@cygnus.com> 13032 13033 * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'. 13034 * jvgenmain.c (class_mangling_prefix): Removed. 13035 (class_mangling_suffix): New global. 13036 (main): Use it. 13037 * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending 13038 `$'. 13039 (print_method_info): Handle overrides for static and final 13040 methods. 13041 (process_file): Generate declaration for class object field. 13042 * class.c (cxx_keywords): New array. 13043 (utf8_cmp): New function. 13044 (cxx_keyword_p): New function. 13045 (layout_class_method): Mangle C++ keywords by appending `$'. 13046 (mangle_field): New function. 13047 (mangle_class_field): Use mangle_field. Mangle class name as 13048 `class$'. 13049 (mangle_static_field): Use mangle_field. 13050 130512000-10-03 Alexandre Petit-Bianco <apbianco@cygnus.com> 13052 13053 * decl.c (find_local_variable): Removed uncessary type check and 13054 fixed range check typo. From Corey Minyard. 13055 130562000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com> 13057 13058 * decl.c (give_name_to_locals): New local `code_offset'. Call 13059 `maybe_adjust_start_pc'. 13060 * expr.c (note_instructions): New function. 13061 (expand_byte_code): Don't collect insn starts here. 13062 (peek_opcode_at_pc): New function. 13063 (maybe_adjust_start_pc): Likewise. 13064 * java-tree.h (maybe_adjust_start_pc): Declare. 13065 (note_instructions): Likewise. 13066 * jcf-parse.c (parse_class_file): Call `note_instructions'. 13067 130682000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com> 13069 13070 * parse.y (field_access:): Fixed indentation. 13071 (qualify_ambiguous_name): Properly qualify `this.a[b].c'. 13072 130732000-09-07 Tom Tromey <tromey@cygnus.com> 13074 13075 Fix for PR gcj/307: 13076 * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not 13077 JPRIMITIVE_TYPE_P, for arithmetic operators. 13078 (patch_method_invocation): Indentation fix. 13079 (try_builtin_assignconv): Handle boolean specially. Fixed typo. 13080 (valid_builtin_assignconv_identity_widening_p): Handle boolean. 13081 (do_unary_numeric_promotion): Cleaned up code. 13082 (valid_cast_to_p): Handle boolean correctly. 13083 130842000-09-27 Tom Tromey <tromey@cygnus.com> 13085 13086 * lex.c (java_read_unicode): Reset bs_count when finished with 13087 `\u' sequence. 13088 130892000-10-01 Mark Mitchell <mark@codesourcery.com> 13090 13091 Convert to GC. 13092 * Make-lang.in (s-java): Don't depend on ggc-callbacks.o. 13093 * Makefile.in (BACKEND): Don't include ggc-callbacks.o. 13094 (typeck.o): Depend on ggc.h. 13095 * class.c (add_method_1): Use GC functions for allocation. 13096 (init_class_processing): Register roots. 13097 * decl.c (ggc_p): Set to 1. 13098 (pending_local_decls): Make it static. 13099 (push_jvm_slot): Use GC functions for allocation. 13100 (init_decl_processing): Register roots. 13101 (give_name_to_locals): Use GC functions for allocation. 13102 (lang_mark_tree): New function. 13103 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC 13104 functions for allocation. 13105 * jcf-parse.c (jcf_parse_source): Use ggc_strdup. 13106 * lex.c (java_lex): Use build_string, rather than replicating it 13107 inline. 13108 * parse.y (goal): Add more roots. 13109 (mark_parser_ctxt): New function. 13110 * typeck.c: Include ggc.h. 13111 131122000-09-29 Alexandre Petit-Bianco <apbianco@cygnus.com> 13113 13114 * parse.y (maybe_yank_clinit): Also keep <clinit> if its body 13115 contains something else than MODIFY_EXPR. 13116 131172000-09-23 Mark Mitchell <mark@codesourcery.com> 13118 13119 * Make-lang.in (JAVA_SRCS): Include java-tree.h. 13120 * Makefile.in (parse.o): Depend on ggc.h. 13121 (class.o): Likewise. 13122 (constants.o): Likewise. 13123 (decl.o): Likewise. 13124 (expr.o): Likewise. 13125 (jcf-parse.o): Likewise. 13126 (jcf-write.o): Likewise. 13127 (mangle.o): Likewise. 13128 * class.c: Include ggc.h. 13129 (build_static_field_ref): Register GC roots. 13130 (layout_class): Likewise. 13131 (init_class_processing): Likewise. 13132 * constants.c: Include ggc.h. 13133 (current_constant_pool_data_ref): Remove. 13134 (tag_nodes): Move it to ... 13135 (get_tag_node): ... here. Register GC roots. 13136 * decl.c: Include ggc.h. Remove many global tree definitions. 13137 (throw_node): Define. 13138 (java_global_trees): Likewise. 13139 (predef_filenames): Make the size a constant. 13140 (init_decl_processing): Adjust accordingly. 13141 (init_decl_processing): Call init_jcf_parse. Register GC roots. 13142 * expr.c: Include ggc.h. 13143 (init_expr_processing): Register GC roots. 13144 (build_invokeinterface): Likewise. 13145 * java-tree.h: Replace extern tree declarations with macros. 13146 (java_global_trees): New variable. 13147 (java_tree_index): New enumeration. 13148 (init_jcf_parse): Declare. 13149 * jcf-parse.c: Include ggc.h. 13150 (current_class): Remove declaration. 13151 (main_class): Likewise. 13152 (all_class_list): Likewise. 13153 (predefined_filename_p): Adjust for constant size of 13154 predef_filenames. 13155 (init_jcf_parse): New function. 13156 * jcf-write.c: Include ggc.h. 13157 (generate_classfile): Register GC roots. 13158 (append_synthetic_attribute): Likewise. 13159 (append_innerclass_attribute_entry): Likewise. 13160 * lang.c: Include ggc.h. 13161 (lang_print_error): Register GC roots. 13162 * parse.h (struct parser_ctxt): Rename fields to avoid conflicts 13163 with macros. 13164 * parse.y: Include ggc.h. 13165 (wfl_operator): Remove. 13166 (goal): Register GC roots. 13167 (java_pop_parser_context): Adjust for new field names. 13168 (java_parser_context_save_global): Likewse. 13169 (java_parser_context_restore_global): Likewise. 13170 (java_parser_context_suspend): Likewise. 13171 (java_parser_context_resume): Likewise. 13172 (verify_constructor_circularity): Register GC roots. 13173 (lookup_cl): Likewise. 13174 (java_reorder_fields): Likewise. 13175 (build_current_this): Likewise. 13176 (class_in_current_package): Likewise. 13177 (argument_types_convertible): Likewise. 13178 (patch_cast): Rename wfl_op parameter to avoid macro conflicts. 13179 131802000-09-14 Tom Tromey <tromey@cygnus.com> 13181 13182 * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV. 13183 131842000-09-13 Tom Tromey <tromey@cygnus.com> 13185 13186 * jcf-parse.c: Include <locale.h>. 13187 * jv-scan.c: Include <locale.h>. 13188 131892000-09-12 Tom Tromey <tromey@cygnus.com> 13190 13191 * expr.c (pop_type_0): Return `Object' if trying to merge two 13192 interface types. 13193 * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for 13194 interface types; `Object' is always a valid supertype. 13195 131962000-09-12 Tom Tromey <tromey@cygnus.com> 13197 13198 Fix for PR gcj/33: 13199 * jv-scan.c (help): Document --encoding. 13200 (options): Added `encoding' entry. 13201 (OPT_ENCODING): New define. 13202 (main): Handle --encoding. 13203 Include <langinfo.h> if nl_langinfo exists. 13204 * lang-options.h: Document --classpath, --CLASSPATH, --main, and 13205 --encoding. 13206 * jcf-parse.c Include <langinfo.h> if we have nl_langinfo. 13207 (parse_source_file): Correctly call java_init_lex. Added `finput' 13208 argument. Use nl_langinfo to determine default encoding. 13209 * java-tree.h (current_encoding): Declare. 13210 * parse.y (java_parser_context_restore_global): Don't restore 13211 `finput'. 13212 (java_parser_context_save_global): Don't set `finput' field. 13213 (java_pop_parser_context): Don't restore `finput'. Free old lexer 13214 if required. 13215 * lang.c (current_encoding): New global. 13216 (lang_decode_option): Recognize `-fencoding='. 13217 (finish_parse): Don't close finput. 13218 * parse.h (struct parser_ctxt): Removed `finput' and 13219 `unget_utf8_value' fields. Added `lexer' field. 13220 (java_init_lex): Fixed declaration. 13221 * lex.c (java_new_lexer): New function. 13222 (java_destroy_lexer): Likewise. 13223 (java_read_char): Added `lex' argument. Handle iconv case. 13224 (java_read_unicode): Added `lex' argument. Count backslashes in 13225 lexer structure. 13226 (java_init_lex): Added `finput' and `encoding' arguments. Set 13227 `lexer' field in ctxp. 13228 (BAD_UTF8_VALUE): Removed. 13229 (java_lex): Handle seeing UEOF in the middle of a string literal. 13230 * lex.h: Include <iconv.h> if HAVE_ICONV defined. 13231 (java_lexer): New structure. 13232 (UNGETC): Removed. 13233 (GETC): Removed. 13234 (DEFAULT_ENCODING): New define. 13235 (java_destroy_lexer): Declare. 13236 132372000-09-12 Tom Tromey <tromey@cygnus.com> 13238 13239 Fix for PR gcj/343: 13240 * lex.c (java_init_lex): Initialize java_io_serializable. 13241 * parse.y (java_io_serializable): New global. 13242 (valid_ref_assignconv_cast_p): An array can be cast to 13243 serializable. 13244 132452000-09-10 Zack Weinberg <zack@wolery.cumb.org> 13246 13247 * decl.c, expr.c: Include defaults.h if not already included. 13248 Don't define the *_TYPE_SIZE macros. 13249 132502000-09-09 Geoffrey Keating <geoffk@cygnus.com> 13251 13252 * typeck.c (build_java_array_type): Correct first parameter 13253 in ADJUST_FIELD_ALIGN invocation. 13254 132552000-09-06 Tom Tromey <tromey@cygnus.com> 13256 13257 * lang-specs.h: Also recognize `-femit-class-files'. 13258 132592000-09-05 Alexandre Petit-Bianco <apbianco@cygnus.com> 13260 13261 * verify.c (merge_types): Load the types to merge if necessary. 13262 132632000-09-02 Anthony Green <green@redhat.com> 13264 13265 * jcf-io.c: Include zlib.h. 13266 (open_in_zip): Read compressed class file archives. 13267 * zipfile.h (ZipDirectory): Add uncompressed_size and 13268 compression_method fields. 13269 * zextract.c (read_zip_archive): Collect file compression info. 13270 132712000-08-15 Bryce McKinlay <bryce@albatross.co.nz> 13272 13273 * parse.y (do_resolve_class): Also explore superclasses of 13274 intermediate enclosing contexts when searching for inner classes. 13275 132762000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com> 13277 13278 * parse.y (variable_declarator_id:): Better error message. 13279 (expression_statement:): Use YYNOT_TWICE. 13280 (cast_expression:): Likewise. 13281 (assignment:): Likewise. 13282 132832000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com> 13284 13285 * parse.y (do_merge_string_cste): New locals. Create new 13286 STRING_CSTs each time, use memcpy. Fixes gcj/311. 13287 132882000-08-07 Hans Boehm <boehm@acm.org> 13289 13290 * boehm.c (mark_reference_fields): Set marking bits for all words in 13291 a multiple-word record. 13292 (get_boehm_type_descriptor): Use the procedure marking descriptor for 13293 java.lang.Class. 13294 132952000-08-31 Mike Stump <mrs@wrs.com> 13296 13297 * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext), 13298 jcf-dump$(exeext)): Make parallel safe. 13299 133002000-08-29 Zack Weinberg <zack@wolery.cumb.org> 13301 13302 * jcf-parse.c (set_source_filename): Constify a char *. 13303 * jcf-write.c (append_innerclasses_attribute, 13304 make_class_file_name): Constify a char *. Don't recycle a 13305 variable for an unrelated purpose. 13306 * parse.y: (build_alias_initializer_parameter_list): Constify a char *. 13307 (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings. 13308 133092000-08-29 Alexandre Petit-Bianco <apbianco@cygnus.com> 13310 13311 * expr.c (can_widen_reference_to): Fixed indentation. 13312 * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment. 13313 * parse.y: `finit$' replaces `$finit$' in comments. 13314 (try_builtin_assignconv): Fixed leading comment. 13315 133162000-08-25 Greg McGary <greg@mcgary.org> 13317 13318 * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE. 13319 133202000-08-24 Greg McGary <greg@mcgary.org> 13321 13322 * lang.c (lang_decode_option): Use ARRAY_SIZE. 13323 * parse.y (BINOP_LOOKUP): Likewise. 13324 133252000-08-22 Andrew Haley <aph@cygnus.com> 13326 13327 * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before 13328 sign extending. Fixes gcj/321. 13329 * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before 13330 combining to make a jlong. Fixes gcj/321. 13331 133322000-08-21 Nix <nix@esperi.demon.co.uk> 13333 13334 * lang-specs.h: Do not process -o or run the assembler if 13335 -fsyntax-only. 13336 133372000-08-16 Andrew Haley <aph@cygnus.com> 13338 13339 * typeck.c (build_java_array_type): Rewrite code to do array 13340 alignment. Take into account back-end macros when aligning array 13341 data. Remove setting of TYPE_USER_ALIGN; Java doesn't allow the 13342 user to set alignment. Fixes gcj/252 and 160. 13343 133442000-08-09 Tom Tromey <tromey@cygnus.com> 13345 13346 * parse.y (check_abstract_method_definitions): Now return `int'. 13347 Check implemented interfaces. Fixes PR gcj/305. 13348 13349 * parse.y (patch_switch_statement): Disallow `long' in switch 13350 expressions. Fixes PR gcj/310. 13351 133522000-08-15 Alexandre Petit-Bianco <apbianco@cygnus.com> 13353 13354 * decl.c (finit_leg_identifier_node): New global. 13355 (init_decl_processing): Use `finit$' to initialize 13356 finit_identifier_node. Use `$finit$' to initialize 13357 finit_leg_identifier_node. 13358 * expr.c (expand_java_field_op): Use ID_FINIT_P. 13359 * java-tree.h (finit_identifier_node): Changed attached comment. 13360 (finit_leg_identifier_node): New declaration. 13361 (ID_FINIT_P): Take finit_identifier_node and 13362 finit_leg_identifier_node into account. This is a backward 13363 compatibility hack. 13364 133652000-08-14 Alexandre Petit-Bianco <apbianco@cygnus.com> 13366 13367 * jcf-write.c (generate_bytecode_conditional): Re-installed lost 13368 Jan 6 2000 patch. 13369 (generate_bytecode_insns): Check `nargs' before emitting it. 13370 * verify.c (merge_type_state): Fixed typo. 13371 * ChangeLog: Fixed typo in some jcf-write.c entries mentioning 13372 generate_bytecode_{conditional,insns}. 13373 133742000-08-13 Anthony Green <green@redhat.com> 13375 13376 * check-init.c (check_init): Add case for BIT_FIELD_REF (required 13377 for -pg builds). 13378 133792000-08-10 Alexandre Petit-Bianco <apbianco@cygnus.com> 13380 13381 * class.c (maybe_layout_super_class): Fixed indentation. 13382 * java-tree.h (CLASS_METHOD_CHECKED_P): New macro. 13383 (java_check_methods): New function declaration. 13384 * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str' 13385 instead of `str_ptr'. 13386 * jcf-write.c (generate_bytecode_insns): Emit number the of args 13387 of a `invokeinterface' at the right time. 13388 * parse.h (WFL_STRIP_BRACKET): New macro. 13389 (SET_TYPE_FOR_RESOLUTION): Use it. 13390 * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'. 13391 (check_class_interface_creation): Don't check for cross package 13392 innerclass name clashes. 13393 (method_header): Behave properly if MDECL is `error_mark_node'. 13394 (method_declarator): Return `error_mark_node' if bogus current 13395 class. 13396 (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary. 13397 (resolve_and_layout): New local `decl_type', set and used. Call 13398 java_check_methods. 13399 (java_check_methods): New method. 13400 (java_layout_classes): Use it. 13401 (resolve_qualified_expression_name): No EH check necessary in 13402 access$<n>. 13403 (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating 13404 `case' statement. 13405 (patch_assignment): Set DECL_INITIAL on integral final local. 13406 134072000-08-08 Alexandre Petit-Bianco <apbianco@cygnus.com> 13408 13409 * java-tree.h (flag_extraneous_semicolon): New extern. 13410 * lang-options.h: (-Wextraneous-semicolon): New option. 13411 * lang.c (flag_redundant): Fixed typo in leading comment. 13412 (flag_extraneous_semicolon): New global. 13413 (lang_decode_option): Set `flag_extraneous_semicolon' when 13414 -Wall. Decode `-Wextraneous-semicolon'. 13415 * parse.y (type_declaration:): Removed `SC_TK' hack, added 13416 `empty_statement' rule. 13417 (class_body_declaration): Likewise. 13418 (method_body:): Accept `;' as a method body. 13419 (static_initializer:): Removed `SC_TK' hack. 13420 (constructor_block_end:): Likewise. 13421 (empty_statement:): Report deprecated empty declaration. Fixes 13422 gcj/295 13423 134242000-08-07 Alexandre Petit-Bianco <apbianco@cygnus.com> 13425 13426 * parse.y (build_dot_class_method_invocation): Changed parameter 13427 name to `type'. Build signature from `type' and convert it to a 13428 STRING_CST if it's an array. 13429 (patch_incomplete_class_ref): `build_dot_class_method_invocation' 13430 to use `ref_type' directly. 13431 134322000-08-06 Ovidiu Predescu <ovidiu@cup.hp.com> 13433 13434 * lang-options.h: Added a comma after the last element to avoid 13435 syntax errors when other languages define additional options. 13436 134372000-08-04 Zack Weinberg <zack@wolery.cumb.org> 13438 13439 * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist. 13440 * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS. 13441 (jc1): Link with $(BACKEND). 13442 (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND). 13443 134442000-08-02 Zack Weinberg <zack@wolery.cumb.org> 13445 13446 * jvspec.c: Adjust type of second argument to 13447 lang_specific_driver, and update code as necessary. 13448 13449 * class.c (build_dtable_decl): Initialize dummy. 13450 134512000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com> 13452 13453 * parse.y (maybe_yank_clinit): When generating bytecode: non empty 13454 method bodies not to rule out discarding `<clinit>'; don't use 13455 <clinit> to initialize static fields with constant initializers. 13456 134572000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com> 13458 13459 * gjavah.c (print_method_info): Added `synth' parameter. Skip 13460 synthetic methods. 13461 (method_synthetic): New global. 13462 (HANDLE_METHOD): Recognize synthetic method and tell 13463 `print_method_info' about it. 13464 (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're 13465 processing a synthetic method. 13466 * jcf-reader.c (skip_attribute): New function. 13467 ( skip_attribute): Likewise. 13468 134692000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com> 13470 13471 * parse.y (build_outer_field_access): Fixed comments. 13472 (fix_constructors): Emit the initialization of this$<n> before 13473 calling $finit$. 13474 (resolve_qualified_expression_name): Build an access to `decl' if 13475 necessary. 13476 134772000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com> 13478 13479 * parse-scan.y (curent_class): Non longer const. 13480 (inner_qualifier, inner_qualifier_length): Deleted. 13481 (current_class_length): New global. 13482 (bracket_count): Fixed typo in leading comment. 13483 (anonymous_count): New global. 13484 (class_instance_creation_expression:): Handle anonymous classes. 13485 (anonymous_class_creation:): New rule. 13486 (push_class_context): Rewritten. 13487 (pop_class_context): Likewise. 13488 (INNER_QUALIFIER): Macro deleted. 13489 (report_class_declaration): call `push_class_context' when 13490 entering the function. `fprintf' format modified not to use 13491 INNER_QUALIFIER. 13492 (report_class_declaration): Assign `package_name' and 13493 `current_class' to NULL separately. 13494 134952000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com> 13496 13497 * expr.c (build_invokeinterface): Call layout_class_methods on 13498 target interface. 13499 135002000-07-27 Tom Tromey <tromey@cygnus.com> 13501 Anthony Green <green@cygnus.com> 13502 Alexandre Petit-Bianco <apbianco@cygnus.com> 13503 13504 * class.c (make_class_data): Create vtable for abstract classes. 13505 (get_dispatch_table): Changed to cope with abstract classes. 13506 135072000-07-27 Tom Tromey <tromey@cygnus.com> 13508 13509 * parse.y (patch_method_invocation): Don't reverse the argument 13510 list when dealing with anonymous class constructors. Fixed typo in 13511 comment. 13512 135132000-07-27 Alexandre Petit-Bianco <apbianco@cygnus.com> 13514 13515 * parse.y (build_alias_initializer_parameter_list): Reverse 13516 crafted list when building aliases for anonymous class 13517 constructors. 13518 135192000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com> 13520 13521 * parse.y (jdep_resolve_class): Don't bother checking potential 13522 innerclass access if `decl' is NULL. 13523 (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the 13524 WFL. 13525 135262000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com> 13527 13528 * parse.c: Remove (again.) 13529 135302000-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com> 13531 13532 * parse.y (find_as_inner_class): Removed 2000-07-19 patches. 13533 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved 13534 outside the `if' statement, alias to innerclass removed, `decl' 13535 used to mark the class complete. 13536 135372000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com> 13538 13539 * parse.y (simple_name:): Fixed typo in error message. 13540 135412000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com> 13542 13543 * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node 13544 or its first operand can be error marks. 13545 135462000-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com> 13547 13548 * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC. 13549 * parse.y (method_header): Likewise. 13550 135512000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com> 13552 13553 * parse.y (process_imports): Consider that one might be trying to 13554 import an innerclass. Fixes gcj/254 13555 135562000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com> 13557 13558 * parse.y (find_as_inner_class): Handle the case where the 13559 enclosing context of an innerclass has been loaded as bytecode. 13560 135612000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com> 13562 13563 * parse.y (simple_name:): Reject `$' in type names. 13564 (resolve_type_during_patch): Use `type' as a second 13565 argument to resolve_no_layout. Fixes gcj/257. 13566 135672000-07-18 Bryce McKinlay <bryce@albatross.co.nz> 13568 13569 * parse.y (find_most_specific_methods_list): Select the only 13570 non-abstract method even if max has been set. 13571 Fixes gcj/285, gcj/298. 13572 135732000-07-18 Jeff Sturm <jeff.sturm@appnet.com> 13574 13575 * lang-specs.h: Added %(jc1) to java compiler options. 13576 135772000-07-14 Zack Weinberg <zack@wolery.cumb.org> 13578 13579 * .cvsignore: New file. 13580 135812000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com> 13582 13583 * parse.y (not_accessible_p): Access granted to innerclasses 13584 (indirectly) extending the reference type. Fixes gcj/249. 13585 135862000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com> 13587 13588 * parse.y (patch_method_invocation): Fixed comment. 13589 (maybe_use_access_method): Build this$<n>s to the context of the 13590 target method, or a type that extends it. Fixes gcj/242. 13591 135922000-07-13 Mark Mitchell <mark@codesourcery.com> 13593 13594 * parse.c: Remove. 13595 135962000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com> 13597 13598 * parse.y (fold_constant_for_init): Avoid bullish conversion. 13599 136002000-07-13 Tom Tromey <tromey@cygnus.com> 13601 13602 * lang-specs.h: Added %{I*}. 13603 136042000-07-13 Zack Weinberg <zack@wolery.cumb.org> 13605 13606 * lang-specs.h: Use the new named specs. Remove unnecessary braces. 13607 136082000-07-12 Mark Mitchell <mark@codesourcery.com> 13609 13610 * parse-scan.c: Remove. 13611 136122000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com> 13613 13614 * class.c (set_super_info): Handled protected inner classes. 13615 (common_enclosing_context_p): Bail early if arguments aren't both 13616 inner classes. 13617 (get_access_flags_from_decl): Handle private and protected inner 13618 classes. 13619 * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro. 13620 (CLASS_PROTECTED): Likewise. 13621 (struct lang_type): New bitfield `poic'. 13622 * parse.y (jdep_resolve_class): Call check_inner_class_access on 13623 inner classes only. 13624 (check_inner_class_access): Renamed arguments, added 13625 comments. Handles protected inner classes (fixes gcj/225) 13626 (not_accessible_p): Fixed comments. Avoid handling inner classes. 13627 136282000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com> 13629 13630 * parse.y (resolve_qualified_expression_name): Verify qualified 13631 access to `this'. Fixes gcj/239. 13632 136332000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com> 13634 13635 * jcf-write.c (generate_classfile): Don't install ConstantValue 13636 for null pointers. 13637 136382000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com> 13639 13640 * parse.y (resolve_qualified_expression_name): Handle inner class 13641 access. Fixes gcj/256. 13642 136432000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com> 13644 13645 * jcf-write.c (generate_classfile): Properly install the 13646 ConstantValue attribute and the initial value constant pool index 13647 on string constants. 13648 * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting 13649 class files. 13650 136512000-07-06 Alexandre Petit-Bianco <apbianco@cygnus.com> 13652 13653 * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while 13654 construct. 13655 * parse.y (find_as_inner_class): Fixed typo. 13656 (do_resolve_class): Explore enclosing contexts when searching for 13657 innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME. 13658 (check_inner_class_access): Check `decl' which can be null in case 13659 of previous errors. 13660 136612000-07-05 Alexandre Petit-Bianco <apbianco@cygnus.com> 13662 13663 * java-tree.h (java_debug_context): Declared `extern'. 13664 (safe_layout_class): Likewise. 13665 * parse.y (resolve_field_access): Field must be `static' in order 13666 to be replaced by its initial value. Added comments. 13667 (find_applicable_accessible_methods_list): Fixed typo. 13668 (find_most_specific_methods_list): Methods found in innerclasses 13669 take over methods founds in the enclosing contexts. 13670 (java_complete_tree): Loosen restrictions on the type of DECLs 13671 that can be replaced by their initialization values. 13672 (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'. 13673 136742000-07-05 Tom Tromey <tromey@cygnus.com> 13675 13676 * Make-lang.in (PARSE_DIR): New macro. 13677 (PARSE_RELDIR): Likewise. 13678 (PARSE_C): Likewise. 13679 (PARSE_SCAN_C): Likewise. 13680 ($(PARSE_C)): New target. 13681 ($(PARSE_SCAN_C)): Likewise. 13682 (SET_BISON): New macro. 13683 (BISONFLAGS): Likewise. 13684 (JAVABISONFLAGS): Likewise. 13685 136862000-07-02 Bryce McKinlay <bryce@albatross.co.nz> 13687 13688 * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream 13689 argument on the first pass for CNI as well as JNI. 13690 (print_method_info): Set up method name on the first pass only. 13691 136922000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com> 13693 13694 * parse.y (parser_qualified_classname): Removed parameter 13695 `is_static'. 13696 (create_interface): Removed first passed parameter to 13697 parser_qualified_classname. 13698 (create_class): Likewise. Don't install alias on static 13699 innerclasses. Fixes gcj/275. 13700 137012000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com> 13702 13703 * parse.y (maybe_generate_pre_expand_clinit): Don't build a 13704 debugable statement with empty_stmt_node. Fixes gcj/272 13705 137062000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com> 13707 13708 * expr.c (build_instanceof): Layout type after it's loaded. Fixes 13709 gcj/271. 13710 137112000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com> 13712 13713 * jcf-write.c (push_long_const): Appropriately cast short negative 13714 constant to jword. 13715 137162000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com> 13717 13718 * parse.y (verify_constructor_super): Use loop variable 13719 `m_arg_type' initialized with `mdecl_arg_type'. 13720 137212000-06-29 Tom Tromey <tromey@cygnus.com> 13722 13723 * parse.y (resolve_field_access): Handle case where `type_found' 13724 is NULL. 13725 137262000-06-27 Alexandre Petit-Bianco <apbianco@cygnus.com> 13727 13728 * expr.c (lookup_field): The same field can be found through two 13729 different interface. Don't declare it ambiguous in that case. 13730 137312000-06-27 Tom Tromey <tromey@cygnus.com> 13732 13733 * lex.c (java_lineterminator): Don't recognize \r after \n. If \r 13734 follows \r, then unget it at a lower level. 13735 137362000-06-26 Tom Tromey <tromey@cygnus.com> 13737 13738 * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to 13739 java_complete_tree. 13740 137412000-06-25 Tom Tromey <tromey@cygnus.com> 13742 13743 * parse.y (for_statement): Wrap expression in a WFL if it is a 13744 constant. For PR gcj/268. 13745 137462000-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com> 13747 13748 * parse.y (do_resolve_class): Minor optimiztion in the package 13749 list search. Removed unnecessary test and return statement. 13750 (valid_ref_assignconv_cast_p): Order of arguments to 13751 enclosing_context_p fixed. 13752 137532000-06-24 Tom Tromey <tromey@cygnus.com> 13754 13755 * expr.c (lookup_field): Print error and return error_mark_node if 13756 field reference is ambiguous. 13757 13758 * parse.y (check_abstract_method_definitions): Also check if 13759 `other_method' is abstract. 13760 137612000-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com> 13762 13763 * class.c (set_super_info): Handle ACC_PRIVATE for (inner) 13764 classes. 13765 * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro. 13766 (struct lang_type): New field `pic'. 13767 (CLASS_PRIVATE): New macro. 13768 * parse.y (check_inner_class_access): New function. 13769 (jdep_resolve_class): Call it. 13770 137712000-06-23 Tom Tromey <tromey@cygnus.com> 13772 13773 * parse.y (patch_incomplete_class_ref): Initialize the returned 13774 class. For PR gcj/260. 13775 137762000-06-21 Alexandre Petit-Bianco <apbianco@cygnus.com> 13777 13778 * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'. 13779 137802000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com> 13781 13782 * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for 13783 Java specific checks. 13784 * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage 13785 screened by DECL_P. 13786 * java-tree.def (CASE_EXPR): Marked 'e'. 13787 (DEFAULT_EXPR): Likewise. 13788 * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage 13789 screened by DECL_P. 13790 * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for 13791 Java specific checks. 13792 (generate_bytecode_insns): Test try_block for BLOCK before using 13793 BLOCK_EXPR_BODY. 13794 * parse.y (build_wfl_wrap): Added `location' argument. Set 13795 EXPR_WFL_LINECOL accordingly. 13796 (dim_expr:): Wrap constants with WFLs. 13797 (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC. 13798 (resolve_package): Check for `stmt' not being a BLOCK before 13799 building a debuggable statement with it. 13800 (make_qualified_primary): Added extra parameter to build_wfl_wrap 13801 invocation. 13802 (resolve_field_access): Make sure `decl' is a DECL before treating 13803 it as such. 13804 (maybe_build_primttype_type_ref): Make sure `wfl''s node is an 13805 IDENTIFIER_NODE before treating it as such. 13806 (patch_new_array_init): Make sure `elt' is a TREE_LIST before 13807 treating it as such. 13808 (find_applicable_accessible_methods_list): CLASS_INTERFACE macro 13809 to be applied only on non array types. 13810 138112000-06-16 Per Bothner <per@bothner.com> 13812 13813 * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN): Don't 13814 define in terms of DECL_RESULT, as that fails when --enable-checking. 13815 138162000-06-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 13817 13818 * jcf-write.c (CHECK_PUT): Add static prototype. Make pointer 13819 types the same in comparison. 13820 (CHECK_OP): Add static prototype. 13821 138222000-06-13 Jakub Jelinek <jakub@redhat.com> 13823 13824 * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN. 13825 * parse.y (java_complete_class): Set DECL_USER_ALIGN. 13826 * parse.c: Rebuilt. 13827 138282000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 13829 13830 * decl.c (create_primitive_vtable): Prototype. 13831 13832 * jcf-write.c (generate_bytecode_insns): Initialize variable 13833 `saved_context'. 13834 13835 * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED. 13836 138372000-06-09 Bryce McKinlay <bryce@albatross.co.nz> 13838 13839 * parse.y (find_applicable_accessible_methods_list): Use a hashtable 13840 to track searched classes, and do not search the same class more than 13841 once. Call find_applicable_accessible_methods_list on immediate 13842 superclass, instead of search_applicable_method_list on all ancestors. 13843 Fix for PR gcj/238. 13844 138452000-06-09 Bryce McKinlay <bryce@albatross.co.nz> 13846 13847 * parse.y (register_fields): Permit static fields in inner classes 13848 if they are final. Fix for PR gcj/255. 13849 138502000-06-06 Alexandre Petit-Bianco <apbianco@cygnus.com> 13851 13852 * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries. 13853 * parse.y (find_in_imports): Returned type changed to void, 13854 leading comment fixed. 13855 (register_package): New function. 13856 (qualify_and_find): Likewise. 13857 (package_declaration:): Use `register_package'. 13858 (single_type_import_declaration:): Removed local variable 13859 `node'. Added missing `;' for consistency. 13860 (type_import_on_demand_declaration:): Use `chainon' to link new 13861 entries. 13862 (lookup_field_wrapper): Lookup local variables defined in outer 13863 contexts first. 13864 (java_complete_class): Don't reverse the list of imported on demand. 13865 (do_resolve_class): Reorganized. Removed local variable 13866 `original_name'. Call `qualify_and_find' with the current package 13867 name, invoke `find_in_imports_on_demand' right after. Call 13868 `qualify_and_find' with the packages we've seen so far. Fixed 13869 operations numbering in comments. 13870 (java_expand_class): Don't reverse `package_list'. 13871 (find_most_specific_methods_list): New local variables `abstract' 13872 and `candidates'. Use them to pick the right method. 13873 138742000-06-06 Tom Tromey <tromey@ferrule.cygnus.com> 13875 13876 * parse.y (check_modifiers_consistency): Don't subtract out 13877 `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY. 13878 138792000-06-04 Philipp Thomas <pthomas@suse.de> 13880 13881 * Makefile.in (INTLLIBS): New. 13882 (LIBS): Add above. 13883 (DEPLIBS): Ditto. 13884 138852000-06-02 Alexandre Petit-Bianco <apbianco@cygnus.com> 13886 13887 * class.c (get_dispatch_table): Build the vtable dummy entry list 13888 element with a null purpose. Fixed leading comment. 13889 (build_dtable_decl): Build an accurate dtable type when appropriate 13890 and use it. 13891 138922000-06-02 Richard Henderson <rth@cygnus.com> 13893 13894 * lang.c (lang_get_alias_set): New. 13895 138962000-05-31 Alexandre Petit-Bianco <apbianco@cygnus.com> 13897 13898 * parse.y (resolve_field_access): Complete the DECL_INITIAL tree 13899 before using it as the accessed field. 13900 139012000-05-31 Tom Tromey <tromey@cygnus.com> 13902 13903 * java-tree.h (boolean_array_vtable, byte_array_vtable, 13904 char_array_vtable, short_array_vtable, int_array_vtable, 13905 long_array_vtable, float_array_vtable, double_array_vtable): 13906 Declare. 13907 * expr.c (get_primitive_array_vtable): New function. 13908 (create_primitive_vtable): New function. 13909 (java_lang_expand_expr): Enable code to statically generate 13910 arrays. 13911 * decl.c (init_decl_processing): Create primitive vtables. 13912 (boolean_array_vtable, byte_array_vtable, char_array_vtable, 13913 short_array_vtable, int_array_vtable, long_array_vtable, 13914 float_array_vtable, double_array_vtable): Define. 13915 139162000-05-26 Zack Weinberg <zack@wolery.cumb.org> 13917 13918 * java/parse.y (find_applicable_accessible_methods_list): 13919 Don't add an uninitialized value to the list. 13920 139212000-05-25 Tom Tromey <tromey@cygnus.com> 13922 13923 * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC 13924 when trying to see if field's class should be initialized. Always 13925 initialize field's declaring class, not qualified class. 13926 For PR gcj/162. 13927 13928 * parse.y (array_constructor_check_entry): Pass `wfl_value', not 13929 `wfl_operator', to maybe_build_primttype_type_ref. 13930 Fixes PR gcj/235. 13931 139322000-05-23 Bryce McKinlay <bryce@albatross.co.nz> 13933 13934 * parse.y (patch_method_invocation): Don't try to lookup methods 13935 in primitive types. 13936 139372000-05-02 Alexandre Petit-Bianco <apbianco@cygnus.com> 13938 13939 * parse.y (resolve_field_access): Call the appropriate <clinit> 13940 before accessing the length of a static array. Craft a decl for 13941 the field while its time. Fixes PR gcj/129. 13942 139432000-05-01 Alexandre Petit-Bianco <apbianco@cygnus.com> 13944 13945 * parse.y (resolve_package): Correctly set `*next' (was off by 13946 one.) 13947 (resolve_qualified_expression_name): Fixed comment. 13948 139492000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com> 13950 13951 * jcf-parse.c (jcf_parse_source): Reset current_class and 13952 current_function_decl to NULL before parsing a new file. 13953 139542000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com> 13955 13956 * parse.y (block_end:): If the collected block doesn't feature a 13957 statement, insert an empty statement. 13958 139592000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com> 13960 13961 * parse.y (maybe_yank_clinit): New function. 13962 (maybe_generate_pre_expand_clinit): Always link <clinit> at the 13963 end of the list of methods belonging to a class. 13964 (java_complete_expand_method): Check whether <clinit> is really 13965 necessary and expand it accordingly. 13966 139672000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com> 13968 13969 * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be 13970 processed by the method's switch statement. 13971 139722000-05-19 Tom Tromey <tromey@cygnus.com> 13973 13974 * java-tree.h: Added init state enum. 13975 * decl.c (emit_init_test_initialization): Initialize class 13976 initialization check variable by looking at class' state. 13977 139782000-05-19 Tom Tromey <tromey@cygnus.com> 13979 13980 * java-tree.h (build_instanceof): Declare. 13981 (build_get_class): Declare. 13982 * parse.y (patch_binop): Use build_instanceof. 13983 * expr.c (build_instanceof): New function. If class is final, 13984 don't make a function call. 13985 (expand_java_INSTANCEOF): Use it. 13986 (build_get_class): New function. 13987 139882000-05-18 Alexandre Oliva <oliva@lsd.ic.unicamp.br> 13989 13990 * jcf-write.c (generate_classfile): Scan the source_file for 13991 slashes with the right pointer variable. 13992 139932000-05-17 Andrew Cagney <cagney@b1.cygnus.com> 13994 13995 * lang.c (lang_decode_option): Update -Wunused flags by calling 13996 set_Wunused. 13997 * decl.c (poplevel): Replace warn_unused with warn_unused_label. 13998 139992000-05-09 Zack Weinberg <zack@wolery.cumb.org> 14000 14001 * check_init.c (check_init): Constify local char *. 14002 * class.c (push_class): Constify local char *. 14003 * java_tree.h: Update prototypes. 14004 * jcf-io.c (open_class): Constify filename parameter and 14005 return value. 14006 (find_class): Remove redundant string copy. Cast return from 14007 open_class. 14008 * jcf-parse.c (read_class, parse_class_file, yyparse): 14009 Constify local char *. 14010 * jcf-write.c (generate_bytecode_insns, generate_classfile): 14011 Constify local char *. 14012 * jcf.h (JCF): Constify filename and classname. 14013 (JCF_FINISH): Cast args to FREE to char * when appropriate. 14014 * lang.c (init_parse): Constify parameter and return value. 14015 * lex.c (java_get_line_col): Constify filename parameter. 14016 * parse.h: Constify parser_ctxt.filename. Update prototypes. 14017 * parse.y (java_parser_context_suspend, 14018 issue_warning_error_from_context, safe_layout_class): Constify 14019 local char *. 14020 * parse.c: Regenerate. 14021 140222000-05-08 Tom Tromey <tromey@cygnus.com> 14023 14024 * expr.c (build_jni_stub): Cache the result of 14025 _Jv_LookupJNIMethod. 14026 140272000-05-05 Alexandre Petit-Bianco <apbianco@cygnus.com> 14028 14029 * decl.c (predef_filenames_size): Now 7. 14030 (predef_filenames): New seventh entry. 14031 140322000-05-04 Tom Tromey <tromey@cygnus.com> 14033 14034 * boehm.c (mark_reference_fields): Don't mark RawData fields. 14035 Keep track of when we've seen a reference field after a 14036 non-reference field. 14037 (get_boehm_type_descriptor): Handle case where we see 14038 non-reference fields but no trailing reference field. 14039 * decl.c (rawdata_ptr_type_node): Define. 14040 (init_decl_processing): Initialize rawdata_ptr_type_node. 14041 * java-tree.h (rawdata_ptr_type_node): Declare. 14042 140432000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 14044 14045 * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format 14046 specifiers in calls to fprintf. 14047 140482000-05-03 Andrew Haley <aph@cygnus.com> 14049 14050 * expr.c (build_java_jsr): Use emit_jump, not expand_goto. 14051 14052 * javaop.h (WORD_TO_INT): New function. 14053 (IMMEDIATE_s4): Use WORD_TO_INT. 14054 * jcf.h (JPOOL_INT): Ditto. 14055 14056 * gjavah.c (decode_signature_piece): Don't treat `$' as namespace 14057 separator. 14058 140592000-04-19 Tom Tromey <tromey@cygnus.com> 14060 14061 * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE 14062 on native function. 14063 * jcf-parse.c (parse_class_file): Call build_jni_stub for native 14064 JNI methods. 14065 * expr.c (build_jni_stub): New function. 14066 * lang-specs.h: -fjni and -femit-class-file are incompatible. 14067 * parse.c: Rebuilt. 14068 * parse.y (java_complete_expand_methods): Expand a native method 14069 and call build_jni_stub if -fjni given. 14070 * lang-options.h: Document -fjni. 14071 * lang.c (flag_jni): New global. 14072 (lang_f_options): Added `jni' entry. 14073 * java-tree.h (soft_lookupjnimethod_node, 14074 soft_getjnienvnewframe_node, soft_jnipopsystemframe_node): 14075 Declare. 14076 (flag_jni): Declare. 14077 (build_jni_stub): Declare. 14078 (struct lang_decl): Added `native' flag. 14079 (METHOD_NATIVE): Redefined to use `native' field of lang specific 14080 structure. 14081 * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node, 14082 soft_jnipopsystemframe_node): New globals. 14083 (init_decl_processing): Set them. _Jv_InitClass only takes one 14084 argument. 14085 14086 * java-tree.def: Put into `C' mode. 14087 140882000-04-27 Tom Tromey <tromey@cygnus.com> 14089 14090 Fix for PR gcj/2: 14091 * expr.c (expand_invoke): Generate check to see if object pointer 14092 is null in nonvirtual invocation case. 14093 * java-tree.h (soft_nullpointer_node): Declare. 14094 * decl.c (soft_nullpointer_node): New global. 14095 (init_decl_processing): Initialize soft_nullpointer_node. 14096 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final' 14097 or `private' methods. 14098 (patch_invoke): Handle INVOKE_NONVIRTUAL case. 14099 141002000-04-26 Alexandre Petit-Bianco <apbianco@cygnus.com> 14101 14102 * decl.c (complete_start_java_method): Don't call _Jv_InitClass 14103 from <clinit> 14104 141052000-04-26 Tom Tromey <tromey@cygnus.com> 14106 14107 * zextract.c (find_zip_file_start): New function. 14108 (read_zip_archive): Use it. 14109 141102000-04-25 Alexandre Petit-Bianco <apbianco@cygnus.com> 14111 14112 * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS. 14113 141142000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com> 14115 14116 * class.c (common_enclosing_context_p): New function. 14117 * java-tree.h (common_enclosing_context_p): Added prototype. 14118 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow 14119 classes sharing an outer context with the current instance. 14120 * parse.y (build_access_to_thisn): Fixed leading comment. 14121 (verify_constructor_super): New local `supper_inner'. Skip 14122 enclosing context argument in the case of inner class constructors. 14123 (patch_method_invocation): Insert proper context as second 14124 parameter to pure inner class constructor super invocations. 14125 141262000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com> 14127 14128 * parse.y (end_class_declaration): Reset the interface number 14129 counter. 14130 141312000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com> 14132 14133 * parse.y (source_start_java_method): Deleted unnecessary code. 14134 (patch_method_invocation): Fixed comment. 14135 141362000-04-24 Robert Lipe <robertlipe@usa.net> 14137 14138 * parse.h (_jdep): Member `kind' now ENUM_BITFIELD. 14139 141402000-04-23 Tom Tromey <tromey@cygnus.com> 14141 14142 * boehm.c (mark_reference_fields): Use int_byte_position. 14143 141442000-04-22 Tom Tromey <tromey@cygnus.com> 14145 14146 * boehm.c (mark_reference_fields): Only call byte_position on 14147 non-static fields. 14148 141492000-04-22 Tom Tromey <tromey@cygnus.com> 14150 14151 * boehm.c (mark_reference_fields): Added `last_view_index' 14152 argument. Use DECL_FIELD_OFFSET to determine field's offset. 14153 141542000-04-20 Mo DeJong <mdejong@cygnus.com> 14155 14156 * parse.h (INTERFACE_INNER_MODIFIERS): New macro. 14157 * parse.y (check_class_interface_creation): Fixed comments. Select 14158 permitted modifiers for (inner) interfaces. Changed error message 14159 to report rejected modifiers used with local classes. 14160 141612000-04-20 Alexandre Petit-Bianco <apbianco@cygnus.com> 14162 14163 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes 14164 of directly inherited type considered in scope. 14165 * parse.y (do_resolve_class): Search inherited classes for inner 14166 classes. 14167 141682000-04-20 Tom Tromey <tromey@cygnus.com> 14169 14170 * parse.y (not_accessible_p): Use member's class, not current 14171 class, when doing inheritance check for protected reference. 14172 Fixes PR gcj/124. 14173 141742000-04-20 Jason Schroeder <shrode@subnature.com> 14175 14176 * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction. 14177 141782000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com> 14179 14180 * parse.y (lookup_field_wrapper): Search for final local aliases. 14181 (resolve_expression_name): Let lookup_field_wrapper search for 14182 final local aliases. Force the value of `name' if one is found. 14183 (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have 14184 an expression name. Fixed comments. 14185 141862000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com> 14187 14188 * parse.y (yyerror): `msg' can be null, don't use it in that case. 14189 141902000-04-19 Tom Tromey <tromey@cygnus.com> 14191 14192 * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop. 14193 141942000-04-18 Alexandre Petit-Bianco <apbianco@cygnus.com> 14195 14196 * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'. 14197 141982000-04-18 Tom Tromey <tromey@cygnus.com> 14199 14200 PR gcj/211: 14201 * gjavah.c (utf8_cmp): Changed return value. 14202 (cxx_keyword_subst): Handle all C++ keywords. Allocate new return 14203 result. 14204 (cxx_keywords): New global. 14205 (get_field_name): Handle new result of cxx_keyword_subst. 14206 (print_method_info): Likewise. 14207 142082000-04-17 Bryce McKinlay <bryce@albatross.co.nz> 14209 14210 * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names 14211 with a newline, for CNI. 14212 (print_stub_or_jni): Print a space or newline before method name for 14213 CNI as well as JNI. 14214 (print_cxx_classname): Don't write leading "::" in CNI stub method. 14215 (process_file): Include gcj/cni.h if generating CNI stubs. 14216 142172000-04-16 Tom Tromey <tromey@cygnus.com> 14218 14219 * gjavah.c (decompile_method): Use print_field_name. 14220 Fixes PR gcj/205. 14221 142222000-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com> 14223 14224 * parse.y (java_expand_classes): Reverse the package list once. 14225 (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string 14226 reduction. 14227 (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of 14228 the `==' and `!=' operators. 14229 142302000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com> 14231 14232 * jcf-write.c (generate_bytecode_insns): At invocation time, 14233 always relate an interface method to the type of its selector. 14234 142352000-04-05 Tom Tromey <tromey@cygnus.com> 14236 14237 Fix for PR gcj/2: 14238 * expr.c (expand_invoke): Generate check to see if object pointer 14239 is null in nonvirtual invocation case. 14240 * java-tree.h (soft_nullpointer_node): Declare. 14241 * decl.c (soft_nullpointer_node): New global. 14242 (init_decl_processing): Initialize soft_nullpointer_node. 14243 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final' 14244 or `private' methods. 14245 (patch_invoke): Handle INVOKE_NONVIRTUAL case. 14246 142472000-04-05 Tom Tromey <tromey@cygnus.com> 14248 14249 Fix for PR gcj/140: 14250 * parse.y (check_final_assignment): Recognize assignments to the 14251 `length' field of an array when generating class files. 14252 142532000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com> 14254 14255 * class.c (decl_hash): Prototype removed. 14256 (decl_compare): Likewise. 14257 142582000-04-05 Tom Tromey <tromey@cygnus.com> 14259 14260 * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter. 14261 * parse.y (check_modifiers_consistency): Check for final/volatile 14262 clash. Fixes PR gcj/164. 14263 142642000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com> 14265 14266 * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash', 14267 made global. 14268 (java_hash_compare_tree_node): Renamed from `decl_compare, made 14269 global. 14270 (add_method_1): Use `java_hash_hash_tree_node' and 14271 `java_hash_compare_tree_node'. 14272 * java-tree.h: (java_hash_hash_tree_node): Prototyped. 14273 (java_hash_compare_tree_node): Likewise. 14274 * parse.y (find_applicable_accessible_methods_list): Create, 14275 delete and use a hash table to remember already searched interfaces. 14276 142772000-04-03 Matt Welsh <mdw@cs.berkeley.edu> 14278 14279 * jcf-depend.c (add_entry): Fixed bug where list was always replaced 14280 with latest entry. 14281 142822000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 14283 14284 * boehm.c (mark_reference_fields, set_bit): Prototype. 14285 (set_bit): Un-ANSI-fy definition. 14286 14287 * class.c (init_test_hash_newfunc, decl_hash, decl_compare): 14288 Prototype. 14289 14290 * decl.c (emit_init_test_initialization): Likewise. 14291 14292 * gjavah.c (jni_print_char): Likewise. 14293 14294 * parse.y (create_new_parser_context): Likewise. 14295 142962000-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com> 14297 14298 * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000 14299 patch missing hunk. Fixed indentation. 14300 143012000-03-30 Tom Tromey <tromey@cygnus.com> 14302 14303 * gjavah.c (D_NAN_MASK): Only define as word-reversed when 14304 HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree. 14305 143062000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com> 14307 14308 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length' 14309 when negative *before* using it as an array index. 14310 * ChangeLog: Fixed typo. 14311 143122000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com> 14313 14314 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length' 14315 to 0 when it reaches -1. 14316 143172000-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com> 14318 14319 * jcf-parse.c (get_constant): Properly cast `num' during the 14320 invocation of `add_double'. 14321 * jcf-write.c (push_long_const): Properly cast `lo' before 14322 comparing it to short bounds. 14323 * parse-scan.y (interface_declaration:): Rule re-arrange so that 14324 `interface_body:' is reduced after the current interface is 14325 pushed. 14326 143272000-03-26 Tom Tromey <tromey@cygnus.com> 14328 14329 * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each 14330 Java-specific `-f' option. 14331 143322000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 14333 14334 * decl.c (init_decl_processing): Only call initialize_sizetypes once. 14335 Adjust order of making types. 14336 Make bitsize_*_node values. 14337 143382000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 14339 14340 * class.c (make_field_value): Use byte_position. 14341 * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position. 14342 (java_array_data_offset): Likewise. 14343 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to 14344 bzero call. 14345 143462000-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com> 14347 14348 * parse.y (check_abstract_method_definitions): New local 14349 `end_type_reached'. Make sure we also consider `end_type'. 14350 (java_check_abstract_method_definitions): Make sure we eventually 14351 consider `java.lang.Object'. 14352 (maybe_use_access_method): Don't use access method if not in the 14353 context of a pure inner class or if the method's context is right. 14354 (find_applicable_accessible_methods_list): New static flag 14355 `object_done'. Don't search abstract classes as interfaces. Fixed 14356 indentation. Fixed the `java.lang.Object' only search. Search 14357 class interface(s) first, then fully search enclosing contexts. 14358 (find_most_specific_methods_list): Pick the closest candidate when 14359 they're all abstract. 14360 143612000-03-20 Alexandre Petit-Bianco <apbianco@cygnus.com> 14362 14363 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR: 14364 properly initialize `finished_label'. Don't emit gotos for empty 14365 try statements. 14366 143672000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de> 14368 14369 * except.c (emit_handlers): Clear catch_clauses_last. 14370 143712000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com> 14372 14373 * parse.y (check_method_types_complete): New function. 14374 (create_class): Reset anonymous class counter only when seeing an 14375 non inner classe. 14376 (java_complete_class): JDEP_METHOD: Don't recompute signature 14377 if incomplete. 14378 143792000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com> 14380 14381 * class.c (build_static_ref): Fixed indentation in comment. 14382 * java-tree.def (TRY_EXPR): Fixed typo in name. 14383 (CLASS_LITERAL): Likewise. 14384 * java-tree.h: (TYPE_DOT_CLASS): New macro. 14385 (struct lang_type): New field `dot_class'. 14386 * jcf-write.c (generate_bytecode_insns): Fixed error message. 14387 (generate_classfile): Method `class$' is synthetic. 14388 * parse.y (build_do_class_method): New function. 14389 (build_dot_class_method_invocation): Likewise. 14390 (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary. 14391 (resolve_qualified_expression_name): Handle CLASS_LITERAL. 14392 (qualify_ambiguous_name): Likewise. 14393 (patch_incomplete_class_ref): Invoke synthetic method if necessary. 14394 (build_try_statement): Fixed leading comment. 14395 143962000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 14397 14398 * class.c (make_field_value): Properly handle sizes. 14399 (get_dispatch_vector): Use tree_low_cst and host_integerp. 14400 (layout_class_method): Count using trees. 14401 * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node. 14402 * expr.c (java_array_data_offset): Use int_bit_position. 14403 (build_newarray, build_anewarray): Use host_integerp and tree_low_cst. 14404 (build_invokevirtual): Use tree_low_cst and do computations with trees. 14405 144062000-03-16 Tom Tromey <tromey@cygnus.com> 14407 14408 * lang.c (flag_hash_synchronization): New global. 14409 (lang_f_options): Added `hash-synchronization'. 14410 * lang-options.h: Mention -fhash-synchronization. 14411 * java-tree.h (flag_hash_synchronization): Declare. 14412 * expr.c (java_lang_expand_expr): Only push `sync_info' value when 14413 hash table synchronization is disabled. 14414 * decl.c (init_decl_processing): Only push `sync_info' value when 14415 hash table synchronization is disabled. 14416 * class.c (make_class_data): Only push `sync_info' field when hash 14417 table synchronization is disabled. Removed dead code. 14418 144192000-03-16 Tom Tromey <tromey@cygnus.com> 14420 14421 * lang.c (lang_decode_option): Enable -Wunused when -Wall given. 14422 144232000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com> 14424 14425 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous 14426 classes. 14427 * parse.y (patch_method_invocation): Handle anonymous classes 14428 creation in static context. 14429 144302000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com> 14431 14432 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro. 14433 * parse.y (resolve_qualified_expression_name): Use it. 14434 (patch_method_invocation): Likewise. 14435 144362000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com> 14437 14438 * parse.y (register_incomplete_type): JDEP_ENCLOSING set 14439 depending on the type of dependency which dictates what the 14440 current class is. 14441 (unresolved_type_p): Resolved types limited to the current class. 14442 144432000-03-15 Tom Tromey <tromey@cygnus.com> 14444 14445 * decl.c (init_decl_processing): Set type of `sync_info' to be 14446 pointer to Object. 14447 14448 * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'. 14449 Correctly compute bit number for current slot. Zero `high' and 14450 `low' in DS_LENGTH case. Don't skip inherited fields. Use 14451 mark_reference_fields. 14452 (mark_reference_fields): New function. 14453 144542000-03-14 Alexandre Petit-Bianco <apbianco@cygnus.com> 14455 14456 * parse.y (register_incomplete_type): Fixed initialization of 14457 JDEP_ENCLOSING. 14458 144592000-02-28 Alexandre Petit-Bianco <apbianco@cygnus.com> 14460 14461 * parse-scan.y (inner_qualifier, inner_qualifier_length): New 14462 static globals. 14463 (push_class_context, pop_class_context): New function. 14464 (class_body:): Call pop_class_context. 14465 (interface_body:): Likewise. 14466 (INNER_QUALIFIER): New macro. 14467 (report_class_declaration): Changed output format and use 14468 INNER_QUALIFIER. Call push_class_context. 14469 144702000-02-14 Andrew Haley <aph@cygnus.com> 14471 14472 * check-init.c (check_init): Add new cases for unary and binary 14473 tree nodes. 14474 144752000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com> 14476 14477 * parse.y (resolve_package): Set `next' once a type name has been 14478 progressively discovered. 14479 (resolve_qualified_expression_name): Propagate resolution only if 14480 there are remaining qualifiers. Take into account `q' might have 14481 been cleared after re-qualification. 14482 * parse.y (patch_method_invocation): New local `resolved'. 14483 Section dealing with qualified expression rewritten to use 14484 resolve_field_access. 14485 144862000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com> 14487 14488 * parse.h (PUSH_CPC): Fixed indentation. 14489 (DEBUG_CPC): New macro. 14490 (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT, 14491 SET_CPC_INSTANCE_INITIALIZER_STMT): New macros. 14492 * parse.y (class_body_declaration:): Use 14493 SET_CPC_INSTANCE_INITIALIZER_STMT. 14494 (method_declaration:): Check for null current_function_decl. 14495 (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT. 14496 (java_parser_context_pop_initialized_field): Better handling of 14497 empty lists. 14498 (maybe_make_nested_class_name): Mark nested class name as 14499 qualified when necessary. 14500 (end_class_declaration): Don't call java_parse_context_resume when 14501 one or more error occurred. 14502 (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT. 14503 (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and 14504 SET_CPC_INITIALIZER_STMT. 14505 (method_header): Check for inner classes declaring static methods. 14506 (resolve_qualified_expression_name): Handle situation where `this' 14507 is implied. 14508 145092000-03-13 Hans Boehm <boehm@acm.org> 14510 14511 * typeck.c (build_prim_array_type): Correctly set the high word too. 14512 145132000-03-09 Alexandre Petit-Bianco <apbianco@cygnus.com> 14514 14515 * parse.y (java_complete_expand_methods): Leave <clinit> out of 14516 ordinary methods. 14517 (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the 14518 list of methods for interfaces. 14519 145202000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com> 14521 14522 * parse.y (qualify_ambiguous_name): Properly handle expressions 14523 using `null'. 14524 145252000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com> 14526 14527 * parse.y (check_final_assignment): Extended to process 14528 COMPOUND_EXPR. 14529 (patch_assignment): Have check_final_assignment called only once. 14530 145312000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com> 14532 14533 * java-tree.h (IS_INIT_CHECKED): New flag. 14534 * check-init.c (check_init): Test and set IS_INIT_CHECKED. 14535 * parse.y (patch_string): Call force_evaluation_order on the 14536 completed string concatenation tree. 14537 * expr.c (force_evaluation_order): Call force_evaluation_order on 14538 function's arguments too. 14539 145402000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 14541 14542 * decl.c (emit_init_test_initialization): Mark KEY as unused. 14543 * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT. 14544 (build_anewarray): Likewise. 14545 * parse.y (patch_newarray): Likewise. 14546 * parse.c: Regenerated. 14547 145482000-03-06 Bryce McKinlay <bryce@albatross.co.nz> 14549 14550 * decl.c (init_decl_processing): Added new class fields `depth', 14551 `ancestors', and `idt' to class_type_node. Use 14552 _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node. 14553 * class.c (make_class_data): Push initial values for new fields. 14554 * java-tree.h: Updated prototype for `build_invokeinterface'. 14555 * expr.c (build_invokeinterface): Changed parameters to accept 14556 `method' tree. Calculate index of `method' in its declaring 14557 interface. Build call to _Jv_LookupInterfaceMethodIdx. 14558 (expand_invoke): Call `build_invokeinterface' with new parameters. 14559 * parse.y (patch_invoke): Call `build_invokeinterface' with new 14560 parameters. 14561 145622000-03-06 Bryce McKinlay <bryce@albatross.co.nz> 14563 14564 * typeck.c (lookup_do): Search superinterfaces first 14565 when looking up an interface method. From Godmar Back 14566 <gback@cs.utah.edu> 14567 145682000-03-06 Tom Tromey <tromey@cygnus.com> 14569 14570 * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c. 14571 145722000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com> 14573 14574 * java-tree.h (lookup_argument_method2): Declared. 14575 (safe_layout_class): Prototype moved from parse.h. 14576 * parse.h (safe_layout_class): Prototype moved to java-tree.h. 14577 * parse.y (java_check_regular_methods): Local `super_class' gone. 14578 Call lookup_argument_method2 instead of lookup_argument_method. 14579 Perform modifier match for methods found declared in implemented 14580 interfaces. Fixed indentation problem. Overriding/hiding error 14581 report to take place only for methods found in classes. 14582 * typeck.c (lookup_argument_method): Changed leading 14583 comment. Re-written by calling lookup_do. 14584 (lookup_argument_method2): New function. 14585 (lookup_java_method): Re-written by calling lookup_do. 14586 (lookup_do): New function. 14587 145882000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com> 14589 14590 * check-init.c (check_init): Removed dead code. Handle (blank) 14591 final variables. 14592 * parse.y (declare_local_variables): New local `final_p', set it 14593 and use it to initialize LOCAL_FINAL. 14594 (check_final_assignment): Only check FIELD_DECLs. 14595 145962000-02-17 Tom Tromey <tromey@cygnus.com> 14597 14598 * Makefile.in (JAVA_OBJS): Added boehm.o. 14599 (boehm.o): New target. 14600 * Make-lang.in (JAVA_SRCS): Added boehm.c. 14601 * java-tree.h (flag_use_boehm_gc): Declare. 14602 (get_boehm_type_descriptor): Declare. 14603 * lang.c (lang_f_options): Added `use-boehm-gc'. 14604 (flag_use_boehm_gc): New global. 14605 * lang-options.h: Added -fuse-boehm-gc. 14606 * boehm.c: New file. 14607 * class.c (get_dispatch_table): If class uses a Boehm type 14608 descriptor, put it in the vtable. 14609 (make_class_data): Removed dead code. 14610 146112000-03-03 Per Bothner <per@bothner.com> 14612 14613 * decl.c (init_decl_processing): Initialize sizetype properly. 14614 146152000-03-01 Alexandre Petit-Bianco <apbianco@cygnus.com> 14616 14617 * java-tree.h (LOCAL_CLASS_P): New flag usage and macro. 14618 (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros. 14619 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro. 14620 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise. 14621 (jcf_parse): New local `current'. Load innerclasses seen in outer 14622 context being processed. 14623 * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro. 14624 * jcf-write.c (append_innerclasses_attribute): New function. 14625 (append_innerclasses_attribute_entry): Likewise. 14626 (get_access_flags): Handle static classes. Set anonymous and local 14627 classes to be private. 14628 (generate_classfile): Attribute count adjusted. Call 14629 append_innerclasses_attribute. 14630 * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use 14631 PURE_INNER_CLASS_TYPE_P. 14632 * parse.y (parser_qualified_classname): New parameter `is_static', 14633 produce non qualified name accordingly. 14634 (block_statement:): Set LOCAL_CLASS_P when declaring local class. 14635 (create_interface): Added argument to parser_qualified_classname. 14636 (create_class): Added argument to parser_qualified_classname. Setup 14637 alias for top level classes. Use PURE_INNER_CLASS_DECP_P. 14638 (add_inner_class_fields): Fixed indentation. 14639 (method_declarator): Use PURE_INNER_CLASS_DECP_P. 14640 (method_declarator): Fixed typo in comment. 14641 (craft_constructor): Use PURE_INNER_CLASS_DECP_P. 14642 (build_current_thisn): Likewise. 14643 (patch_method_invocation): Likewise. 14644 146452000-03-01 Martin von Löwis <loewis@informatik.hu-berlin.de> 14646 14647 * decl.c (current_function_decl): Move to toplev.c. 14648 146492000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 14650 14651 * java-tree.h (LABEL_PC): Relect name changes in ../tree.h. 14652 (DECL_BIT_INDEX): Use underlying representation. 14653 * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise. 14654 146552000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 14656 14657 * expr.c (build_java_ret): Pass proper type to size_binop. 14658 146592000-02-25 Anthony Green <green@cygnus.com> 14660 14661 * expr.c (build_class_init): Mark the decl to be ignored by 14662 check_init. 14663 * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c 14664 * check-init.c: Move DECL_BIT_INDEX to java-tree.h 14665 * class.c (init_test_hash_newfunc): New function. 14666 (decl_hash): New function. 14667 (decl_compare): New function. 14668 * decl.c (emit_init_test_initialization): New function. 14669 (complete_start_java_method): Traverse the init test hashtable, 14670 calling emit_init_test_initialization. 14671 (always_initialize_class_p): Define. 14672 * expr.c (build_class_init): Use initialization tests when 14673 emitting class initialization code. 14674 (always_initialize_class_p): Declare. 14675 * jcf-parse.c (parse_class_file): Set always_initialize_class_p to 14676 1. 14677 * java-tree.h: Include hash.h. 14678 (DECL_FUNCTION_INIT_TEST_TABLE): Define. 14679 (struct lang_decl): Add init_test_table field. 14680 (init_test_hash_entry): Define. 14681 146822000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com> 14683 14684 * gjavah.c (main): Avoid using `argi' to report unimplemented 14685 options. 14686 146872000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com> 14688 14689 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR: 14690 initialize locals to avoid warnings. Local `exception_type' moved 14691 into if statement. 14692 146932000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com> 14694 14695 * parse.y (resolve_expression_name): Use `orig' as a second 14696 argument to resolve_field_access. 14697 (resolve_field_access): Removed unnecessary code when dealing with 14698 static fields. 14699 147002000-02-23 Alexandre Petit-Bianco <apbianco@cygnus.com> 14701 14702 * class.c (push_super_field): Don't push the field twice. 14703 * jcf-parse.c (parse_source_file): Call java_reorder_fields. 14704 * parse.h (java_reorder_fields): Prototyped. 14705 * parse.y (java_reorder_fields): New function. 14706 (java_layout_class): Simplified not to worry about re-ordering. 14707 147082000-02-23 Tom Tromey <tromey@cygnus.com> 14709 14710 * gjavah.c (print_name): In JNI case, correctly quote string. 14711 (print_method_info): Don't handle overrides in JNI mode. 14712 147132000-02-22 Alexandre Petit-Bianco <apbianco@cygnus.com> 14714 14715 * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned 14716 value type set to `boolean_type_node'. 14717 147182000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de> 14719 14720 * jcf-dump.c (main): Test for correct condition after 14721 output file creation. 14722 147232000-02-19 Anthony Green <green@cygnus.com> 14724 14725 * jcf-depend.c (add_entry): Fix test for first list entry. 14726 147272000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 14728 14729 * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT. 14730 * constants.c (build_constants_constructor): Likewise. 14731 147322000-02-19 Anthony Green <green@cygnus.com> 14733 14734 * jcf-depend.c (add_entry): Add entries to the end of the list. 14735 147361999-11-03 Pekka Nikander <pekka.nikander@hut.fi> 14737 14738 * decl.c (INT_TYPE_SIZE): Define if necessary. 14739 (expand_java_return): Handle the case of a native integer smaller 14740 than a JVM integer. 14741 147422000-02-18 Martin von Löwis <loewis@informatik.hu-berlin.de> 14743 14744 * gjavah.c (help): Use GCCBUGURL. 14745 * jv-scan.c (help): Likewise. 14746 * jcf-dump.c (help): Likewise. 14747 147482000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com> 14749 14750 * jcf-write.c (generate_bytecode_insns): Don't generate empty 14751 `finally' clauses. 14752 147532000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com> 14754 14755 * jcf-parse.c (load_class): Call `fatal' if no file containing 14756 the target class are found. 14757 147582000-02-16 Zack Weinberg <zack@wolery.cumb.org> 14759 14760 * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on 14761 lex.c, lex.h, and PARSE_H to... 14762 (parse.o, parse-scan.o): ...here, respectively. 14763 14764 * lex.c: Split out code that may trigger SIGFPE from yylex() 14765 to its own function. 14766 * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value. 14767 147682000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 14769 14770 * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h. 14771 147722000-02-15 Alexandre Petit-Bianco <apbianco@cygnus.com> 14773 14774 * parse.y (outer_field_access_p): Stop in time when outer contexts 14775 are exhausted. 14776 (resolve_qualified_expression_name): Properly qualify *everything* 14777 after a package.type to be resoled as expression names. 14778 (find_applicable_accessible_methods_list): Save/restore `class' to 14779 isolate it from a possible outer context search. 14780 147812000-02-15 Tom Tromey <tromey@cygnus.com> 14782 14783 * gjavah.c (jni_print_char): New function. 14784 (print_full_cxx_name): Use it. 14785 (decode_signature_piece): Likewise. 14786 (print_cxx_classname): Likewise. 14787 147882000-02-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 14789 14790 * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with 14791 version.o. 14792 (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h. 14793 14794 * gjavah.c: Include version.h. 14795 14796 * jcf-dump.c: Likewise. 14797 14798 * jv-scan.c: Likewise. 14799 148002000-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com> 14801 14802 * parse.y (outer_field_access_fix): First parameter now a tree 14803 node. Check for assignment to final. First argument to 14804 build_outer_field_access_fix modified to accommodate prototype. 14805 (build_outer_field_access): Don't check for assignment to final 14806 here. 14807 (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node' 14808 possibly returned by outer_field_access_fix. Changed 14809 outer_field_access_fix's first argument. 14810 (check_final_assignment): $finit$'s context is OK. 14811 (patch_unaryop): Use node instead of its line/column value when 14812 calling outer_field_access_fix. 14813 148142000-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com> 14815 14816 * parse.y (interface_declaration:): No longer tagged 14817 <node>. Re-installed default action. 14818 (class_member_declaration:): Handle inner interfaces. 14819 (interface_member_declaration): Handle inner interfaces and 14820 classes. 14821 (create_interface): Push error if one seen. Suspend parsing 14822 context when processing an inner interface. 14823 (register_fields): Inner class static field limitations not to 14824 apply to inner interfaces. 14825 148262000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com> 14827 14828 * jcf-parse.c (load_class): Update `java_error_count' when a 14829 class' file can't be found. 14830 (parse.y): Avoid (byte)code generation when errors seen. 14831 148322000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com> 14833 14834 * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal' 14835 decodes a valid node. 14836 (patch_binop): Handle TRUNC_DIV_EXPR. 14837 148382000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com> 14839 14840 * parse.y (resolve_package): New local `acc'. Try to progressively 14841 build and guess a package and type name. 14842 148432000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com> 14844 14845 * parse.y (find_applicable_accessible_methods_list): Load and 14846 layout the search class if necessary. 14847 (java_complete_tree): Keep to original type of the folded initial 14848 value. 14849 148502000-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com> 14851 14852 * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT. 14853 Generate error message if circularity is detected. New static 14854 local `list'. 14855 * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro. * 14856 * jcf-write.c (generate_bytecode_insns): Very simply handle 14857 SAVE_EXPR. 14858 * parse.y (java_check_circular_reference): Use 14859 `cyclic_inheritance_report' during report, if necessary. 14860 (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid 14861 walking NEW_ARRAY_INIT twice. 14862 148632000-02-09 Tom Tromey <tromey@cygnus.com> 14864 14865 * parse.y (check_class_interface_creation): Allow inner classes to 14866 be `private' or `protected', check modifiers' consistency. Prevent 14867 block local classes from bearing any modifiers. 14868 148692000-02-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 14870 14871 * except.c (check_start_handlers): Re-add prototype lost in last 14872 patch. 14873 (maybe_start_try): Remove excess argument to `check_start_handlers'. 14874 148752000-02-09 Andrew Haley <aph@cygnus.com> 14876 14877 * decl.c (clear_binding_level): Remove excess initializer. 14878 (maybe_poplevels): Remove unused variable. 14879 (force_poplevels): Ditto. 14880 (struct binding_level): Add comment. 14881 148822000-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com> 14883 14884 * jcf-write.c (generate_classfile): Don't consider 14885 pre-initialization with reference value (use <clinit> instead.) 14886 * parse.y (java_fix_constructors): No generated constructor for 14887 interfaces. 14888 (build_outer_field_access): Removed debug message. 14889 (outer_field_expanded_access_p): Adapted to bytecode generation. 14890 (build_outer_field_access_method): Use fix_method_argument_names. 14891 (build_outer_method_access_method): Fixed indentation. Added 14892 comment. Handle access method generation for static and also void 14893 methods. 14894 (build_access_to_thisn): Inserted debug message. 14895 (maybe_build_thisn_access_method): Use fix_method_argument_names. 14896 (resolve_qualified_expression_name): Fixed comment. 14897 (not_accessible_p): Adapted to bytecode generation. Added comment. 14898 (patch_method_invocation): Added comment. 14899 (maybe_use_access_method): Fixed leading comment. Handle static 14900 methods. 14901 (java_complete_lhs): Don't shortcut handling of initialized upon 14902 declaration String type static fields when generating bytecode. 14903 (patch_unaryop): Handle outer field access when generating 14904 bytecode. 14905 149062000-02-03 Alexandre Petit-Bianco <apbianco@cygnus.com> 14907 14908 * java-tree.h (FIELD_THISN): New macro. 14909 * jcf-write.c (append_synthetic_attribute): New function. 14910 (generate_classfile): Set "Synthetic" attribute on this$<n>, 14911 val$<name> fields, access$<n> and $finit$ methods. Fixed indentation. 14912 * parse.y (add_inner_class_fields): Set FIELD_THISN for created 14913 this$<n> fields. 14914 (build_outer_field_access): Turned on access functions usage and 14915 generation when compiling to bytecode. 14916 (maybe_use_access_method): Likewise. 14917 149182000-01-25 Andrew Haley <aph@cygnus.com> 14919 14920 * java-except.h (struct eh_range): Add `expanded' field. 14921 (maybe_start_try): Add end_pc arg. 14922 (maybe_end_try): Ditto. 14923 * java-tree.h (force_poplevels): new function. 14924 * expr.c (expand_byte_code): Don't call maybe_start_try or 14925 maybe_end_try. 14926 * except.c (add_handler): Reset expanded. 14927 (expand_start_java_handler): Set expanded. 14928 (check_start_handlers): Don't expand a start handler that's 14929 already been expanded. 14930 (maybe_start_try): Add end_pc arg. Only expand a handler which 14931 ends after end_pc. 14932 (expand_end_java_handler): call force_poplevels. 14933 (force_poplevels): new function. 14934 * decl.c (binding_level): Add start_pc of binding level. 14935 (maybe_pushlevels): Call maybe_start_try when pushing binding 14936 levels. 14937 (maybe_poplevels): Call maybe_end_try when popping binding levels. 14938 (LARGEST_PC): Define. 14939 (clear_binding_level): Use LARGEST_PC. 14940 14941 * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define. 14942 * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define. 14943 (binding_depth, is_class_level, current_pc): new variables. 14944 (struct binding_level): ditto. 14945 (indent): new function. 14946 (push_jvm_slot): add debugging info. 14947 (maybe_pushlevels): ditto. 14948 (maybe_poplevels): ditto. 14949 (pushlevel): ditto. 14950 (poplevel): ditto. 14951 (start_java_method): ditto. 14952 (give_name_to_locals): comment only. 14953 * except.c (binding_depth, is_class_level, current_pc): 14954 new variables. 14955 (expand_start_java_handler): add debugging info. 14956 (expand_end_java_handler): ditto. 14957 149582000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 14959 14960 * gjavah.c (overloaded_jni_method_exists_p): Add prototype. 14961 (print_name_for_stub_or_jni, process_file): Constify a char*. 14962 149632000-02-03 Tom Tromey <tromey@cygnus.com> 14964 14965 * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input. 14966 149672000-01-31 Scott Bambrough <scottb@netwinder.org> 14968 14969 * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to 14970 assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is 14971 defined to be 1. 14972 149732000-02-02 Alexandre Petit-Bianco <apbianco@cygnus.com> 14974 14975 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code. 14976 * java-tree.h (TYPE_II_STMT_LIST): New macro. 14977 (struct lang_type): New field `ii_block'. 14978 * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST, 14979 CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST. 14980 * parse.h (struct parser_ctxt): New field `instance_initializers'. 14981 (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST, 14982 CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT, 14983 CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New 14984 macros. 14985 * parse.y (add_instance_initializer): New function. 14986 (in_instance_initializer): New static global. 14987 (class_body_declaration:): Link instance initializer block. 14988 (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT. 14989 (array_creation_expression:): Remove unused local. 14990 (java_parser_context_push_initialized_field): Fixed leading 14991 comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and 14992 CPC_INSTANCE_INITIALIZER_LIST. 14993 (java_parser_context_pop_initialized_field): Likewise. 14994 (add_inner_class_fields): Use CPC_INITIALIZER_STMT. 14995 (register_fields): Use CPC_STATIC_INITIALIZER_STMT and 14996 CPC_INITIALIZER_STMT. 14997 (fix_constructors): New local `class_type'. Use it. Call 14998 add_instance_initializer. 14999 (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR. 15000 (patch_return): Forbid return in instance initializers. 15001 (patch_throw_statement): Enforce exception handling in the context 15002 of instance initializers. 15003 150042000-02-03 Tom Tromey <tromey@cygnus.com> 15005 15006 * Make-lang.in (java.mostlyclean): Remove executables in 15007 `mostlyclean'. 15008 150092000-01-31 Scott Bambrough <scottb@netwinder.org> 15010 15011 * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when 15012 HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1. 15013 (java_float_finite): Convert to use union Word from javaop.h. 15014 (java_double_finite): Convert to use union DWord from javaop.h. 15015 150162000-02-02 Tom Tromey <tromey@cygnus.com> 15017 15018 * gjavah.c (options): Added `jni' entry. 15019 (help): Document -jni. 15020 (flag_jni): New global. 15021 (process_file): Handle JNI output. Don't print text from 15022 -prepend, -add, etc, when generating stubs. Only remove `.class' 15023 suffix if it actually exists. 15024 (main): Create a `.c' file when run with `--jni --stubs'. Create 15025 correct output file name with `--jni'. 15026 (print_include): Mangle header name differently in JNI case. 15027 (HANDLE_METHOD): In JNI mode, call print_method_info to generate 15028 method list. 15029 (print_method_info): Handle JNI case. Put signature info into 15030 method name. Handle case when STREAM is NULL. 15031 (print_name_for_stub_or_jni): New function. 15032 (print_stub_or_jni): Renamed from `print_stub'. Handle JNI. 15033 (print_cxx_classname): Handle JNI. 15034 (print_full_cxx_name): Likewise. 15035 (decode_signature_piece): Likewise. 15036 (overloaded_jni_method_exists_p): New function. 15037 (struct method_name): Added `signature' and `sig_length' fields. 15038 (HANDLE_END_FIELD): Do nothing in JNI mode. 15039 150402000-02-02 Tom Tromey <tromey@cygnus.com> 15041 15042 * jv-scan.c: Include version.c, <getopt.h>. 15043 (LONG_OPT, OPT_HELP, OPT_VERSION): New macros. 15044 (options): New array. 15045 (usage): New function. 15046 (version): New function. 15047 (main): Use getopt_long to parse command line. 15048 * jcf-dump.c: Include version.c, <getopt.h>. 15049 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION, 15050 OPT_JAVAP): New macros. 15051 (options): New array. 15052 (usage): Return `void'. Changed message. 15053 (help): New function. 15054 (version): New function. 15055 (main): Use getopt_long_only to parse command line. 15056 * gjavah.c: Include <getopt.h>. 15057 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP, 15058 OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M, 15059 OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros. 15060 (options): New array. 15061 (java_no_argument): Removed. 15062 (help): Updated with missing options. 15063 (main): Use getopt_long_only to parse command line. 15064 (usage): Changed message. 15065 150662000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com> 15067 15068 * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code. 15069 * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG, 15070 ANONYMOUS_ARRAY_INITIALIZER): New access macros. 15071 * parse.y (array_creation_expression:): Handle anonymous arrays. 15072 (build_array_from_name): Don't set `ret_name' if null. 15073 (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR. 15074 (qualify_ambiguous_name): Likewise. 15075 (java_complete_expand_class): Likewise. 15076 150772000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com> 15078 15079 * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo. 15080 * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro. 15081 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise. 15082 (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P. 15083 (AIPL_FUNCTION_FINIT_INVOCATION): Replaces 15084 AIPL_FUNCTION_COMPLETED_INVOCATION. 15085 (AIPL_FUNCTION_CTOR_INVOCATION): Replaces 15086 AIPL_FUNCTION_INVOCATION_READY. 15087 (AIPL_FUNCTION_DECLARATION): New enum entry. 15088 * parse.y (reorder_static_initialized): New function. 15089 (java_parser_context_pop_initialized_field): Use it. 15090 (add_inner_class_fields): Use 15091 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment 15092 augmented. Install marker after last alias initializer, if any. 15093 (generate_finit): Fixed typo. Don't try to retain only the used 15094 fields. 15095 (method_header): Compute and set DECL_FUNCTION_NAP. 15096 (method_declarator): Fixed comment. Insert alias initializer in 15097 parameter list. 15098 (build_alias_initializer_parameter_list): Fixed leading 15099 comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value 15100 replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. 15101 (java_complete_expand_class): Code to retain only used aliases 15102 removed. 15103 (java_complete_expand_methods): New local `first_decl'. Generate 15104 $finit$ first, then expand the constructors, regular methods and 15105 <clinit>. 15106 (java_complete_expand_method): Don't report error on missing 15107 return statement if previously detected bogus. 15108 (fix_constructors): Don't patch constructor parameters list. 15109 (patch_method_invocation): Use new AIPL enum values. Reverse 15110 alias initializer list for anonymous classes. 15111 151122000-01-30 Anthony Green <green@redhat.com> 15113 15114 * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to 15115 determine how many stack slots to pop. 15116 151172000-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com> 15118 15119 * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better 15120 error handling/recovery. 15121 * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment. 15122 151232000-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com> 15124 15125 * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS, 15126 FIELD_LOCAL_ALIAS_USED): New macros. 15127 (DECL_FUNCTION_NAP): New macro. 15128 (struct lang_decl): New field `nap'. 15129 (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros. 15130 (struct lang_type): New fields `finit_stmt_list' and 15131 `clinit_stmt_list'. 15132 (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST. 15133 * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro. 15134 (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS, 15135 UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros. 15136 (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION, 15137 AIPL_FUNCTION_INVOCATION_READY): New enum fields. 15138 (BUILD_THROW): Macro line separator re-indented. 15139 * parse.y (end_class_declaration): New function. 15140 (maybe_generate_pre_expand_clinit): New name for 15141 java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST, 15142 pre-expand static fields. 15143 (maybe_generate_clinit): Function deleted. 15144 (check_for_static_method_reference): Prototype's parameter list 15145 indented. 15146 (generate_finit): New name for maybe_generate_finit. Changed 15147 leading comment. Function rewritten to use 15148 TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list. 15149 (build_alias_initializer_parameter_list): New function. 15150 (java_parser_context_pop_initialized_field): Likewise. 15151 (add_inner_class_fields): Likewise. 15152 (type_declaration:): Call end_class_declaration. 15153 (class_member_declaration:): Likewise. 15154 (formal_parameter_list:): Fixed typos. 15155 (formal_parameter:): Use ARG_FINAL_P to mark created tree list 15156 element. Improved error handling. 15157 (block_statement:): Call end_class_declaration. 15158 (anonymous_class_creation:): Likewise. 15159 (create_anonymous_class): Fixed comments. 15160 (create_class): Call add_inner_class_fields. 15161 (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P. 15162 (method_header): Use MARK_FINAL_PARMS. 15163 (finish_method_declaration): Use UNMARK_FINAL_PARMS. 15164 (method_declarator): Propagate final argument flag. 15165 (craft_constructor): New local `artificial'. Call 15166 build_alias_initializer_parameter_list. Use 15167 CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP. 15168 (source_start_java_method): Mark parm decls with LOCAL_FINAL if 15169 necessary. 15170 (complete_expand_class): Get rid of unused outer context local 15171 alias fields. 15172 (java_complete_expand_methods): Fixed leading 15173 comment. Generate/pre-expand <clinit> first. Changed method 15174 expansion order to regular, $finit$, constructors, <clinit>. 15175 (java_complete_expand_method): Set current_function_decl. 15176 (fix_constructors): Fix constructor parameter list to account for 15177 outer context local alias initializers. 15178 (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS. 15179 (resolve_expression_name): Lookup outer context local aliases. New 15180 local `access', use it. 15181 (patch_method_invocation): Patch inner class ctor invocation with 15182 outer context local aliases initialization values. $finit$ 15183 invocation patching now includes things generated with 15184 build_alias_initializer_parameter_list. 15185 (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS. 15186 (build_super_invocation): Likewise. 15187 (patch_assignment): Changed comment. 15188 151892000-01-27 Andrew Haley <aph@cygnus.com> 15190 15191 * jcf-write.c (emit_goto): RESERVE 3 bytes for insn. 15192 (emit_if): Ditto. 15193 (emit_jsr): Ditto. 15194 151952000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 15196 15197 * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string 15198 concatenation. 15199 (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args. 15200 15201 * parse.y (register_fields): Don't pass a format specifier to 15202 OBSOLETE_MODIFIER_WARNING. 15203 (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2 15204 instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format 15205 specifier. 15206 (check_modifiers): Change function into a macro. 15207 (check_class_interface_creation): Pass a literal format string. 15208 152092000-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 15210 15211 * buffer.h: PROTO -> PARAMS. 15212 * check-init.c: Likewise. 15213 * class.c: Likewise. 15214 * constants.c: Likewise. 15215 * convert.h: Likewise. 15216 * decl.c: Likewise. 15217 * except.c: Likewise. 15218 * expr.c: Likewise. 15219 * gjavah.c: Likewise. 15220 * java-except.h: Likewise. 15221 * java-tree.h: Likewise. 15222 * jcf-depend.c: Likewise. 15223 * jcf-dump.c: Likewise. 15224 * jcf-parse.c: Likewise. 15225 * jcf-path.c: Likewise. 15226 * jcf-reader.c: Likewise. 15227 * jcf-write.c: Likewise. 15228 * jcf.h: Likewise. 15229 * jv-scan.c: Likewise. 15230 * jvgenmain.c: Likewise. 15231 * jvspec.c: Likewise. 15232 * lang.c: Likewise. 15233 * lex.c: Likewise. 15234 * lex.h: Likewise. 15235 * parse-scan.y: Likewise. 15236 * parse.h: Likewise. 15237 * parse.y: Likewise. 15238 * typeck.c: Likewise. 15239 * verify.c: Likewise. 15240 * xref.c: Likewise. 15241 * xref.h: Likewise. 15242 * zextract.c: Likewise. 15243 * zipfile.h: Likewise. 15244 152452000-01-18 Alexandre Petit-Bianco <apbianco@cygnus.com> 15246 15247 * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC. 15248 (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF. 15249 * constants.c (build_constant_data_ref): Check for cached 15250 current_constant_pool_data_ref. Cache current_constant_pool_data_ref 15251 in TYPE_CPOOL_DATE_REF. 15252 * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF, 15253 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros. 15254 (struct lang_type): New fields `cpool' and `cpool_data_ref'. 15255 (LOCAL_FINAL): New macro. 15256 * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing 15257 constant pool -- don't try to reuse. 15258 (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate 15259 TYPE_LANG_SPECIFIC. 15260 (find_in_current_zip): Use TYPE_JCF. 15261 * parse.h (java_check_final): Prototype removed. 15262 * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch. 15263 (maybe_create_class_interface_decl, 15264 check_class_interface_creation): Likewise. 15265 (java_expand_finals): Function removed. 15266 (class_declaration:): Reversed Jan 12, 2000 extra argument patch. 15267 (block_statement:): Fixed comment. 15268 (anonymous_class_creation:): Likewise. 15269 (check_class_interface_creation): Reversed Jan 12, 2000 extra 15270 argument patch. 15271 (check_class_interface_creation): Loosened error report on (inner) 15272 public class declarations. CPC_INNER_P replaces GET_CPC_LIST. 15273 (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch. 15274 (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra 15275 argument patch. 15276 (create_interface): Likewise. 15277 (anonymous_class_counter): New static global. 15278 (create_anonymous_class): Reversed Jan 12, 2000 extra argument 15279 patch. Fixed comments. 15280 (create_class): Reversed Jan 12, 2000 extra argument patch. Reset 15281 anonymous_class_counter when declaring a toplevel class. 15282 (craft_constructor): Fixed constructor name when handling 15283 anonymous classes. Anonymous class constructors to feature hidden 15284 this$<n> parameter. 15285 (java_fix_constructors): Added comment. 15286 (java_check_final): Function removed. 15287 (java_complete_expand_methods): Fixed comment. Don't generate 15288 class data, save its outgoing constant pool instead. 15289 (verify_constructor_super): Skip anonymous class constructor 15290 hidden this$<n> parameter. 15291 (java_expand_classes): New local `saved_ctxp'. Removed call to 15292 java_expand_finals and java_check_final. Expand anonymous class 15293 constructors. Generate class data. 15294 (build_super_invocation): Skip anonymous class hidden this$<n> 15295 parameter. 15296 * typeck.c (build_java_signature): Use TYPE_SIGNATURE and 15297 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC. 15298 (set_java_signature): Likewise. 15299 153002000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de> 15301 15302 * gjavah.c: Delete ACC_VISIBILITY define. 15303 * jcf.h: Add ACC_VISIBILITY define. 15304 * parse.y: final: rule tagged <value>. 15305 (java_check_regular_methods): Use ACC_VISIBILITY define for 15306 default package access check. 15307 (local_variable_declaration_statement): Use final: rule. 15308 153092000-01-17 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de> 15310 15311 * parse.y (format_parameter:): Use final: rule instead of modifiers:. 15312 (final:): New rule. 15313 153142000-01-17 Tom Tromey <tromey@cygnus.com> 15315 15316 * gjavah.c (print_field_info): Allow non-static final fields. 15317 153182000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com> 15319 15320 * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'. 15321 * parse.y (patch_anonymous_class): New function. 15322 (create_anonymous_class): Register incomplete type when the 15323 class/interface to extends/implement isn't known yet. 15324 (parser_check_super_interface): Simplify argument to CLASS_INTERFACE. 15325 (verify_constructor_super): Tuned error message. 15326 153272000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com> 15328 15329 * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P. 15330 (ANONYMOUS_CLASS_P): New macro. 15331 (TYPE_SIGNATURE, TYPE_JCF): New macros. 15332 (INNER_CLASS_TYPE_P): Fixed typo in leading comment. 15333 * parse.y (create_class): Added leading argument. 15334 (maybe_create_class_interface_decl, 15335 check_class_interface_creation): Likewise. 15336 (craft_constructor): New function. 15337 (verify_constructor_super): Added argument in prototype. 15338 (class_declaration:): Inserted leading argument. 15339 (for_begin:): Use FOR_LOOP_P. 15340 (anonymous_class_creation): Create WFL of the anonymous class to 15341 instantiate. Call build_new_invocation. Added comments. 15342 (check_class_interface_creation): Handle parameter `anonymous' in 15343 verbose mode class creation announce. 15344 (link_nested_class_to_enclosing): Exclude anonymous classes. 15345 (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on 15346 anonymous class, even though they appear to have an enclosing 15347 context. 15348 (create_interface): Pass extra argument to 15349 check_class_interface_creation. 15350 (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1. 15351 (create_class): Call check_class_interface_creation and 15352 maybe_create_class_interface_decl with extra new argument. Don't 15353 add private this$<n> to anonymous classes. 15354 (method_declarator): Insert hidden this$<n> to anonymous class 15355 constructors. 15356 (java_fix_constructors): Deleted code creating default 15357 constructor. Call craft_constructor instead. 15358 (java_check_regular_methods): Set `saw_constructor' to 1 for 15359 anonymous classes. 15360 (fix_constructors): Pass extra argument to verify_constructor_super. 15361 (verify_constructor_super): New local `sdecl', use it. Search for 15362 matching constructor (possibly featuring arguments) in super 15363 class. 15364 (lookup_method_invoke): Craft constructor according to arguments 15365 list when dealing with anonymous class constructors. 15366 (build_super_invocation): Pass arguments to anonymous class super 15367 constructors. 15368 (search_loop): Use FOR_LOOP_P. 15369 (labeled_block_contains_loop_p): Likewise. 15370 153712000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com> 15372 15373 * class.c (set_super_info): Set CLASS_STATIC when appropriate. 15374 (enclosing_context_p): New function. 15375 (get_access_flags_from_decl): Handle CLASS_STATIC. 15376 (maybe_layout_super_class): Extra first argument passed to 15377 do_resolve_class. 15378 (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and 15379 ID_INIT_P. 15380 * decl.c (access0_identifier_node): New global. 15381 (init_decl_processing): access0_identifier_node initialized. 15382 (pushdecl): Set DECL_CONTEXT only on non type decls. 15383 * expr.c (lookup_field): Lookup inner class fields in enclosing 15384 contexts. 15385 (expand_invoke): Use ID_INIT_P. 15386 (expand_java_field_op): Use DECL_CLINIT_P. 15387 * java-tree.def (CLASS_LITERAL): New tree code. 15388 * java-tree.h (DECL_FUNCTION_ACCESS_DECL, 15389 DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros. 15390 (struct lang_decl): New field `inner_access'. 15391 (enclosing_context_p): Prototyped. 15392 (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P, 15393 ID_CLINIT_P): New macros. 15394 (CLASS_STATIC): New macro. 15395 (CLASS_ACCESS0_GENERATED_P): New macro. 15396 (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P, 15397 TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P, 15398 INNER_CLASS_P): New macros. 15399 (DECL_INNER_CLASS_LIST): New macro. 15400 * jcf-parse.c (yyparse): Avoid the use of ANSI string 15401 concatenation. 15402 * jcf-write.c (generate_bytecode_insns): binop: Change the type of 15403 the shift value to int. Fixed typo in comment. 15404 * lex.c (inst_id, wpv_id): Initialize. 15405 * mangle.c (unicode_mangling_length): Take `$' into account. 15406 * parse.h (DRECOVER, RECOVER): Terminate properly. 15407 (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro. 15408 (typedef struct _jdep): New field `enclosing'. 15409 (JDEP_ENCLOSING): New macro. 15410 (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.) 15411 (struct parser_ctxt): New fields `marker_beginning', `marked_end'. 15412 (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE, 15413 GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC, 15414 GET_ENCLOSING_CPC_CONTEXT): New macros. 15415 (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros. 15416 (do_resolve_class): Added extra argument in prototype. 15417 * parse.y (resolve_class): Added extra argument in prototype. 15418 (maybe_create_class_interface_decl): Likewise. 15419 (maybe_use_access_method, build_wfl_wrap): New functions. 15420 (java_complete_expand_classes, java_complete_expand_class): 15421 Likewise. 15422 (java_parser_context_push_initialized_field, 15423 java_parser_context_suspend, java_parser_context_resume): 15424 Likewise. 15425 (maybe_make_nested_class_name, make_nested_class_name, 15426 set_nested_class_simple_name_value, 15427 link_nested_class_to_enclosing, find_as_inner_class, 15428 find_as_inner_class_do, check_inner_class_redefinition, 15429 build_thisn_assign, build_current_thisn, build_access_to_thisn, 15430 maybe_build_thisn_access_method, build_outer_field_access, 15431 build_outer_field_access_methods, build_outer_field_access_expr, 15432 build_outer_method_access_method, build_new_access_id, 15433 build_outer_field_access_method, outer_field_access_p, 15434 outer_field_expanded_access_p, outer_field_access_fix, 15435 build_incomplete_class_ref, patch_incomplete_class_ref, 15436 create_anonymous_class): Likewise. 15437 (inst_id, wpv_id): New static global variables. 15438 (synchronized:): New rule, tagged <node>. 15439 (type_declaration:): No longer tagged <node>. Call POP_CPC in sub 15440 rules. 15441 (anonymous_class_creation:): New rule, tagged <node>. 15442 (NEW_TK): Tagged <node>. 15443 (type_literals, array_type_literal): New rules, tagged <node>. 15444 (class_declaration:): Removed action when reducing by class_body: 15445 (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value 15446 using GET_CPC in sub-rules. 15447 (class_member_declaration): Handle inner classes. 15448 (method_declaration): When reducing method_header:, reset 15449 current_function_decl when appropriate. 15450 (method_declarator:): Set the number of formal parameter to 0 for 15451 method declared without arguments. 15452 (constructor_declarator:): Likewise. 15453 (static_initializer:): List of elements kept in a list. 15454 (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct 15455 use of the keyword `static' for type declarations. 15456 (block_statement:): Handle inner class declarations. 15457 (primary_no_new_array:): Use type_literals:. Fixed comment. Handle 15458 type qualified `this'. 15459 (class_instance_creation_expression): Use anonymous_class_creation: 15460 to handle inner class instances creation. Handle qualified `new'. 15461 (something_dot_new): Added appropriate actions. 15462 (create_new_parser_context): New function. 15463 (java_push_parser_context, java_parser_context_save_global, 15464 java_parser_context_suspend): Use create_new_parser_context. 15465 (check_modifiers): Changed leading comment. 15466 (check_class_interface_creation): Handle interclasses. 15467 (add_superinterfaces): Fixed comment. 15468 (create_interface): Build qualified name from the raw_name instead 15469 of its matching WFL. Push the initialized fields list. raw_name added 15470 as an extra argument to maybe_create_class_interface_decl. 15471 (create_class): Build qualified name from the raw_name instead of 15472 its matching WFL. Removed assignment to current_parsed_class_un. 15473 Call PUSH_ERROR before returning an error. Suspend the current 15474 parser context when processing an inner class. Push the 15475 initialized fields list. raw_name added as an extra argument to 15476 maybe_create_class_interface_decl. Add the private this$<n> 15477 field. 15478 (duplicate_declaration_error_p): Use GET_CPC when calling find_field. 15479 (register_fields): Get the class type from GET_CPC and handle 15480 previous errors. Added code to handle the creation of static 15481 fields in inner classes. Initialized fields initialization 15482 statements kept in a list of lists. 15483 (maybe_generate_finit): Initialized fields initialization 15484 statements kept in a list of lists. Use GET_CPC. 15485 (maybe_generate_clinit): Likewise. 15486 (method_header): Use GET_CPC and GET_CPC_UN. 15487 (parser_qualified_classname): Handle inner classes. 15488 (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC. 15489 (java_fix_constructors): Hide pointer to enclosing context 15490 instance in constructor list when dealing with inner classes. 15491 (jdep_resolve_class): Call resolve_class with extra first argument 15492 JDEP_ENCLOSING. 15493 (resolve_class): Add enclosing context as a first extra argument 15494 to do_resolve_class. 15495 (do_resolve_class): Call find_as_inner_class. Handle WFLs 15496 properly. 15497 (resolve_no_layout): Extra argument added to resolve_class 15498 invocation. 15499 (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P. 15500 (java_get_real_method_name): Use GET_CPC_UN. 15501 (check_abstract_method_definitions): Use DECL_CLINIT_P. 15502 (java_check_abstract_methods): Handle static method declared in 15503 inner classes by an error. 15504 (java_check_regular_methods): Use DECL_CLINIT_P. 15505 (source_start_java_method): Also set DECL_MAX_LOCALS. 15506 (create_artificial_method): Call java_parser_context_save_global 15507 and java_parser_context_restore_global instead of saving/restoring 15508 the context by hand. 15509 (expand_start_java_method): Improved verbose mode message. 15510 (java_complete_expand_methods): Fixed leading comment. Use 15511 DECL_CLINIT_P. 15512 (fix_constructors): Added assignment to this$<n> if necessary. 15513 (java_expand_classes): Call java_complete_expand_classes instead 15514 of java_complete_expand_methods. 15515 (make_qualified_primary): Simplified. 15516 (merge_qualified_name): Optimized for missing left or right parts. 15517 (resolve_expression_name): Handle access to outer class fields from 15518 interclasses. 15519 (resolve_qualified_expression_name): New macro 15520 RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner 15521 classes. Report error on non appropriate qualification of 15522 `new'. Handle qualified `this'. 15523 (not_accessible_p): Allow access to outer class private fields from 15524 inner classes. 15525 (patch_method_invocation): Handle method invocations through 15526 access methods and inner class constructor invocations. 15527 (find_applicable_accessible_methods_list): Search enclosing 15528 contexts of an inner class. 15529 (search_applicable_methods_list): Fixed typo. 15530 (argument_types_convertible): Handle inner class constructors' 15531 hidden outer context reference argument. 15532 (qualify_ambiguous_name): Handle qualified `this'. 15533 (java_complete_lhs): Handle use of field accessed through 15534 artificial access methods in various cases of assignments. Handle 15535 CLASS_LITERAL node. 15536 (check_final_assignment): Use DECL_CLINIT_P. 15537 (valid_ref_assignconv_cast_p): Handle the destination being an 15538 enclosing context of the source. 15539 (patch_unaryop): Handle use of field accessed through artificial 15540 access methods. 15541 (patch_return): Use DECL_CLINIT_P. 15542 (patch_throw_statement): Use DECL_CLINIT_P. 15543 (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P. 15544 * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and 15545 ID_INIT_P. 15546 155472000-01-16 Anthony Green <green@cygnus.com> 15548 15549 * parse.y (build_string_concatenation): Only use 15550 StringBuffer(String) shortcut if String arg is constant. 15551 155522000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com> 15553 15554 * jcf-write.c (generate_bytecode_insns): binop: Change the type of 15555 the shift value to int. Fixed typo in comment. 15556 155572000-01-11 Mumit Khan <khan@xraylith.wisc.edu> 15558 15559 * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros. 15560 * jcf-write.c: Likewise. 15561 * parse.y: Likewise. 15562 * parse.c: Regenerate. 15563 155642000-01-09 Anthony Green <green@cygnus.com> 15565 15566 * jcf-write.c (generate_bytecode_insns): Emit invokeinterface 15567 bytecodes in the correct order. 15568 155692000-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 15570 15571 * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS). 15572 155732000-01-06 Anthony Green <green@cygnus.com> 15574 15575 * expr.c (java_lang_expand_expr): Switch to permanent obstack 15576 before building constant array decl. 15577 155782000-01-06 Alexandre Petit-Bianco <apbianco@cygnus.com> 15579 15580 * jcf-write.c (generate_bytecode_conditional): Fixed indentation in 15581 method invocation and typo in conditional expression. 15582 (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue 15583 the appropriate NOTE_POP. 15584 * parse.y (patch_binop): Shift value mask to feature the right 15585 type. 15586 155871999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 15588 15589 * class.c (assume_compiled, assume_compiled_node): Add static 15590 prototype. 15591 (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup. 15592 15593 * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch. 15594 15595 * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN. 15596 15597 * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier' 15598 to `__modifier' to avoid stringifying it. 15599 15600 * parse.y (verify_constructor_circularity): Don't call a variadic 15601 function with a non-literal format string. 15602 (java_check_abstract_methods): Move unreachable code inside 15603 `continue' statement. 15604 (lookup_method_invoke): Call xstrdup, not strdup. 15605 15606 * expr.c (expand_java_field_op): Avoid the use of ANSI string 15607 concatenation. 15608 15609 * jcf-parse.c (yyparse): Likewise. 15610 15611 * jv-scan.c (main): Likewise. 15612 156131999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 15614 15615 * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK, 15616 ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC, 15617 ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string 15618 concatenation. 15619 15620 * parse.y (synchronized, variable_redefinition_error, 15621 check_class_interface_creation, create_interface, create_class, 15622 method_header, finish_method_declaration, 15623 check_modifiers_consistency, method_declarator, 15624 complete_class_report_errors, check_abstract_method_definitions, 15625 java_check_regular_methods, check_throws_clauses, 15626 java_check_abstract_methods, read_import_dir, 15627 check_pkg_class_access, declare_local_variables, fix_constructors, 15628 cut_identifier_in_qualified, resolve_expression_name, 15629 resolve_qualified_expression_name, patch_method_invocation, 15630 java_complete_lhs, patch_assignment, try_builtin_assignconv, 15631 patch_binop, patch_array_ref, patch_newarray, build_labeled_block, 15632 patch_exit_expr, patch_exit_expr, patch_switch_statement, 15633 patch_try_statement, patch_synchronized_statement, 15634 patch_throw_statement, check_thrown_exceptions, 15635 patch_conditional_expr): Likewise. 15636 156371999-12-24 Alexandre Petit-Bianco <apbianco@cygnus.com> 15638 15639 * Makefile.in (LIBDEPS): Added gcc's errors.o 15640 (../jcf-dump$(exeext):): Link with gcc's errors.o 15641 (../gcjh$(exeext):): Likewise. 15642 * expr.c (expand_java_NEW): Layout the entire target type instead of 15643 laying out its methods only. 15644 (lookup_field): Layout the class after having loaded it. 15645 * java-tree.h (java_debug_context): Declared. 15646 * jcf-io.c (toplev.h): Included. 15647 (find_class): Removed assignment to jcf's outofsynch 15648 field. Force source file to be read if newer than its matching 15649 class file. Tweaked debug messages. 15650 * jcf-parse.c (jcf_out_of_synch): Deleted. 15651 (read_class): Call to jcf_out_of_synch removed. 15652 * jcf.h (typedef struct JCF): Field `outofsynch' deleted. 15653 (jcf_out_of_synch): Prototype deleted. 15654 * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag', 15655 `deprecated' and `class_err': integer turned into bit-fields. 15656 New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments. 15657 * parse.y (package_list): New global. 15658 (package_declaration:): Record newly parsed package name. 15659 (extra_ctxp_pushed_p): Static global deleted. 15660 (java_parser_context_save_global): Create buffer context for the 15661 purpose of saving globals, if necessary. 15662 (java_parser_context_restore_global): Pop context pushed for the 15663 purpose of saving globals, if necessary. 15664 (java_debug_context_do): New prototype and function. 15665 (java_debug_context): Likewise. 15666 (do_resolve_class): Use already parsed package names to qualify 15667 and lookup class candidate. 15668 (java_pre_expand_clinit): Removed unnecessary local variable. 15669 156701999-12-17 Tom Tromey <tromey@cygnus.com> 15671 15672 * gjavah.c (decode_signature_piece): Print "::" in JArray<>. This 15673 fixes PR gcj/119. 15674 (process_file): Use `\n\' at end of each line in string. 15675 156761999-12-16 Alexandre Petit-Bianco <apbianco@cygnus.com> 15677 15678 * expr.c (expand_invoke): Layout the loaded class before 15679 attempting to use it. 15680 (expand_java_field_op): Allow final field assignments to take 15681 place in $finit$. 15682 * typeck.c (convert): Return error_mark_node if expr is null. 15683 156841999-12-14 Alexandre Petit-Bianco <apbianco@cygnus.com> 15685 15686 * class.c (class_depth): Return -1 if the class doesn't load 15687 properly. 15688 * expr.c (can_widen_reference_to): Check for errors during depth 15689 computation and return 0 accordingly. 15690 * jcf-parse.c (parse_source_file): Call java_fix_constructors to 15691 create default constructors and add an other error check. 15692 * parse.h (java_fix_constructors): Prototyped. 15693 * parse.y (java_pre_expand_clinit): Likewise. 15694 (build_super_invocation): Re-prototyped to feature one argument. 15695 (java_check_circular_reference): Directly use `current'. 15696 (java_fix_constructors): New function. 15697 (java_check_regular_methods): Don't create default constructors 15698 here, but abort if none were found. 15699 (java_complete_expand_methods): Pre-process <clinit> calling 15700 java_pre_expand_clinit. 15701 (java_pre_expand_clinit): New function. 15702 (fix_constructors): build_super_invocation invoked with the 15703 current method declaration as an argument. 15704 (build_super_invocation): Use the context of the processed method 15705 decl argument instead of current_class. 15706 * typeck.c (lookup_java_method): Take WFLs in method names into 15707 account. 15708 157091999-12-14 Per Bothner <per@bothner.com> 15710 15711 * class.c (make_class_data): flag_keep_inline_functions to keep 15712 private methods in the method array. 15713 157141999-12-15 Anthony Green <green@cygnus.com> 15715 15716 * check-init.c (check_init): Take into account both types of 15717 `throw's when checking for uninitialized variables. 15718 157191999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com> 15720 15721 * parse.y (java_complete_lhs): Force conversion of array 15722 dimensions to int_type_node, that's what runtime's ABI expects. 15723 157241999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com> 15725 15726 * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third 15727 operand of a WFL, until the Java front-end gets fixed with regard 15728 to Mark Mitchell's gcc/tree.h patch (1999-12-04.) 15729 157301999-12-10 Andrew Haley <aph@cygnus.com> 15731 15732 * parse.h (BUILD_THROW): Add support for sjlj-exceptions. 15733 decl.c (init_decl_processing): Add _Jv_Sjlj_Throw. 15734 expr.c (build_java_athrow): Add support for sjlj-exceptions. 15735 java-tree.h: Ditto. 15736 jcf-write.c: Ditto. 15737 157381999-12-08 Alexandre Petit-Bianco <apbianco@cygnus.com> 15739 15740 * expr.c (java_lang_expand_expr): Switch to permanent obstack 15741 before calling expand_eh_region_start and expand_start_all_catch. 15742 * except.c (expand_start_java_handler): Switch to permanent 15743 obstack before calling expand_eh_region_start. 15744 (expand_end_java_handler): Switch to permanent obstack before 15745 calling expand_start_all_catch. 15746 157471999-12-5 Anthony Green <green@cygnus.com> 15748 15749 * decl.c (init_decl_processing): Mark throw_node as a noreturn 15750 function with side effects. 15751 (init_decl_processing): Mark all memory allocating DECLs with 15752 DECL_IS_MALLOC. 15753 157541999-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com> 15755 15756 * except.c (expand_end_java_handler): Call 15757 expand_resume_after_catch and end_catch_handler. 15758 157591999-11-30 Anthony Green <green@cygnus.com> 15760 15761 * verify.c (verify_jvm_instructions): Create new return label 15762 chain if non existent (don't rely on the verified state of the jsr 15763 target.) 15764 157651999-11-30 Alexandre Petit-Bianco <apbianco@cygnus.com> 15766 15767 * jcf-write.c (generate_bytecode_insns): Fixed indentation for 15768 COMPOUND_EXPR and FIX_TRUNC_EXPR cases. 15769 15770 * parse.y (patch_assignment): Removed bogus final class test on 15771 lhs when checking on whether to emit an ArrayStoreException runtime 15772 check. 15773 * expr.c (expand_java_arraystore): Likewise. 15774 157751999-11-28 Anthony Green <green@cygnus.com> 15776 15777 * decl.c (find_local_variable): Reuse single slot decls when 15778 appropriate. 15779 157801999-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com> 15781 15782 * jcf-parse.c (saw_java_source): Global variable removed. 15783 (read_class): Don't use `saw_java_source'. Added extra braces. 15784 (yyparse): Code setting `saw_java_source' removed. 15785 157861999-11-24 Mark Mitchell <mark@codesourcery.com> 15787 15788 * except.c (emit_handlers): Zero catch_clauses after emitting them. 15789 157901999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com> 15791 15792 * verify.c (merge_type_state): Non verified subroutines being 15793 considered more than once to trigger passive type merge. 15794 157951999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com> 15796 15797 * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE 15798 in case of error. Error message tuned. 15799 158001999-11-21 Anthony Green <green@cygnus.com> 15801 15802 * constants.c (find_methodref_index): Unwrap method names before 15803 inserting them in the constant pool. 15804 15805 * jcf-parse.c (jcf_parse): Display `interface' when appropriate. 15806 15807 * class.c (assume_compiled_node): New typedef. 15808 (assume_compiled_tree): New static data. 15809 (find_assume_compiled_node): New function. 15810 (add_assume_compiled): New function. 15811 (assume_compiled): New function. 15812 * class.c (make_class_data): Use assume_compiled. 15813 (is_compiled_class): Use assume_compiled. 15814 15815 * java-tree.h (add_assume_compiled): Declare. 15816 15817 * lang.c (lang_decode_option): Parse new options. 15818 158191999-11-17 Alexandre Petit-Bianco <apbianco@cygnus.com> 15820 15821 * class.c (layout_class): Always convert TYPE_SIZE_UNIT to 15822 int_type_node: that's what `_Jv_AllocObject' expects. 15823 158241999-11-11 Alexandre Petit-Bianco <apbianco@cygnus.com> 15825 15826 * parse.y (lookup_method_invoke): Use lang_printable_name to 15827 reliably build the type name during error report. Fixes PR gcj/97. 15828 158291999-11-09 Tom Tromey <tromey@cygnus.com> 15830 15831 * jcf-path.c: Include <sys/stat.h>. 15832 (jcf_path_init): Search for libjava.zip. Fixes PR gcj/84. 15833 (DIR_UP): New macro. 15834 158351999-11-09 Alexandre Petit-Bianco <apbianco@cygnus.com> 15836 15837 * parse.y (source_end_java_method): Resume permanent allocation, 15838 reversing Apr 27 1998 patch. 15839 (patch_string_cst): Pop obstacks after having pushed the permanent 15840 ones. 15841 158421999-11-05 Tom Tromey <tromey@cygnus.com> 15843 15844 * class.c (finish_class): Emit inlined methods if any native 15845 methods exist in the class. Fixes PR gcj/85. 15846 158471999-11-04 Alexandre Petit-Bianco <apbianco@cygnus.com> 15848 15849 * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR. 15850 (qualify_ambiguous_name): Likewise. 15851 158521999-11-03 Godmar Back <gback@cs.utah.edu> 15853 15854 * typeck.c: (lookup_java_method): search all inherited 15855 interfaces when looking up interface method. 15856 158571999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com> 15858 15859 * parse.y (method_header:): Issue error message for rule `type 15860 error'. 15861 (synchronized:): Error report when not using synchronized. 15862 158631999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com> 15864 15865 * parse.y (resolve_qualified_expression_name): Prevent `this' from 15866 being used before the superclass constructor has been called. 15867 (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P 15868 instead of `CALL_THIS_CONSTRUCTOR_P'. 15869 158701999-10-30 Todd T. Fries <todd@lighthouse.fries.net> 15871 15872 * check-init.c: Fix typo in comment. 15873 158741999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com> 15875 15876 * class.c (add_method_1): Set DECL_INLINE to 1 for private, static 15877 and final method. 15878 158791999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com> 15880 15881 * parse.y (expression_statement:): Call function to report 15882 improper invocation of a constructor. 15883 (parse_ctor_invocation_error): New function. 15884 158851999-10-26 Mark Mitchell <mark@codesourcery.com> 15886 15887 * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call 15888 remember_end_note. 15889 158901999-10-21 Tom Tromey <tromey@cygnus.com> 15891 15892 * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set 15893 in generated `main'. 15894 158951999-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com> 15896 15897 * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR. 15898 (qualify_ambiguous_name): Likewise. 15899 159001999-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com> 15901 15902 * parse.y (java_complete_tree): fold_constant_for_init to work on 15903 permanent_obstack. 15904 (java_complete_lhs): Likewise. 15905 (array_constructor_check_entry): Complete an initializer element 15906 on permanent_obstack. 15907 159081999-10-19 Tom Tromey <tromey@cygnus.com> 15909 15910 * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file. 15911 From Mike Moreton <mike@pillim.demon.co.uk>. 15912 159131999-10-15 Greg McGary <gkm@gnu.org> 15914 15915 * java-tree.h (flag_bounds_check): Remove extern decl. 15916 * lang.c (flag_bounds_check): Remove global variable. 15917 (lang_f_options): Remove "bounds-check" entry. 15918 (lang_init_options): Default flag_bounds_check to "on". 15919 159201999-10-14 Tom Tromey <tromey@cygnus.com> 15921 15922 * jvgenmain.c (usage): New function. 15923 (main): Use it. Also, handle `-D' options. 15924 * jvspec.c (lang_specific_driver): Recognize -D. 15925 (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation. 15926 15927 * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'. 15928 159291999-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 15930 15931 * jcf-dump.c (print_constant, disassemble_method): Don't call a 15932 variadic function with a non-literal format string. 15933 15934 * parse-scan.y (report_main_declaration): Likewise. 15935 15936 * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise. 15937 15938 * parse.y (read_import_dir, patch_assignment, patch_binop, 15939 patch_array_ref): Likewise. 15940 15941 * typeck.c (build_java_array_type): Likewise. 15942 15943 * verify.c (verify_jvm_instructions): Likewise. 15944 159451999-10-12 Alexandre Petit-Bianco <apbianco@cygnus.com> 15946 15947 * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1. 15948 159491999-10-07 Anthony Green <green@cygnus.com> 15950 15951 * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases 15952 where CHECK_PUT may fail for valid reasons. 15953 15954 * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3, 15955 UNSAFE_PUTN): New macros. 15956 159571999-10-04 Tom Tromey <tromey@cygnus.com> 15958 15959 * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as 15960 well. Fixes Java PR gcj/59. 15961 * parse-scan.y (yyerror): Report errors. 15962 159631999-09-24 Glenn Chambers <GChambers@provsol.com> 15964 15965 * decl.c (insert_block): Remove unconditional `abort'. 15966 159671999-09-24 Bernd Schmidt <bernds@cygnus.co.uk> 15968 15969 * decl.c (builtin_function): No longer static. New arg CLASS. Arg 15970 FUNCTION_CODE now of type int. All callers changed. 15971 Set the builtin's DECL_BUILT_IN_CLASS. 15972 159731999-09-23 Tom Tromey <tromey@cygnus.com> 15974 15975 * jvspec.c (lang_specific_driver): Don't read spec file if 15976 -fsyntax-only given. 15977 159781999-09-22 Tom Tromey <tromey@cygnus.com> 15979 15980 * lang-specs.h: Added `%(jc1)' to the jc1 spec. 15981 15982 * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally. 15983 (WORDS_TO_LONG): Likewise. 15984 (WORDS_TO_DOUBLE): Likewise. 15985 159861999-09-14 Alexandre Petit-Bianco <apbianco@cygnus.com> 15987 15988 * jcf-write.c (RELOCATION_VALUE_0): New macro. 15989 (RELOCATION_VALUE_1): Likewise. 15990 (emit_iinc, emit_reloc, push_constant1, push_constant2, 15991 push_in_const, push_long_const): Prototyped. 15992 (push_constant1): Argument `index' is of type HOST_WIDE_INT. 15993 (push_constant2): Likewise. 15994 (push_int_const): Cast find_constant1's integer arguments to `jword'. 15995 (find_constant_wide): Cast find_constant2's integer arguments to 15996 `jword'. 15997 (find_constant_index): Cast find_constant2's and find_constant2's 15998 integer arguments to `jword'. 15999 (emit_pop): Argument `value' is of type HOST_WIDE_INT. 16000 (emit_switch_reloc): Use RELOCATION_VALUE_0. 16001 (emit_if): Use RELOCATION_VALUE_1. 16002 (emit_goto): Likewise. 16003 (emit_jsr): Likewise. 16004 (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second 16005 argument to push_long_const to HOST_WIDE_INT. 16006 160071999-09-15 Andreas Schwab <schwab@suse.de> 16008 16009 * Makefile.in (parse.o): Depend on $(JAVA_TREE_H). 16010 160111999-09-20 Nick Clifton <nickc@cygnus.com> 16012 16013 * lang.c (lang_decode_option): Extend comment. 16014 160151999-09-16 Alexandre Petit-Bianco <apbianco@cygnus.com> 16016 16017 * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK 16018 instead of fndecl. 16019 160201999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 16021 16022 * gjavah.c (get_field_name, print_method_info, print_include, 16023 add_namelet): Use xmalloc, not malloc. 16024 16025 * jcf-depend.c (add_entry): Likewise. Use xstrdup, not strdup. 16026 (munge): Use xrealloc, not realloc, trust xrealloc to handle a 16027 NULL pointer. 16028 16029 * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup. 16030 16031 * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise. 16032 16033 * jcf-path.c (add_entry): Likewise. 16034 16035 * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc. 16036 16037 * jv-scan.c (xmalloc): Remove definition. 16038 16039 * jvgenmain.c (xmalloc): Likewise. 16040 16041 * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero. 16042 16043 * lex.c (java_store_unicode): Use xrealloc, not realloc. 16044 16045 * parse-scan.y: Use concat, not of xmalloc/assign/strcpy. Use 16046 concat, not xmalloc/sprintf. 16047 (java_push_parser_context): Use xcalloc, not xmalloc/bzero. 16048 (xstrdup): Remove definition. 16049 16050 * parse.y (duplicate_declaration_error_p, 16051 constructor_circularity_msg, verify_constructor_circularity, 16052 check_abstract_method_definitions, java_check_regular_methods, 16053 java_check_abstract_methods, patch_method_invocation, 16054 check_for_static_method_reference, patch_assignment, patch_binop, 16055 patch_cast, array_constructor_check_entry, patch_return, 16056 patch_conditional_expr): Use xstrdup, not strdup. 16057 16058 * zextract.c (ALLOC): Use xmalloc, not malloc. 16059 160601999-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 16061 16062 * Make-lang.in (jvspec.o): Depend on system.h and gcc.h. 16063 16064 * jvspec.c: Include gcc.h. Don't include gansidecl.h. 16065 (do_spec, lang_specific_pre_link, lang_specific_driver, 16066 input_filename, input_filename_length): Don't declare. 16067 (main_class_name, jvgenmain_spec, lang_specific_driver): 16068 Constify a char*. 16069 (lang_specific_driver): All calls to the function pointer 16070 parameter now explicitly call `fatal'. 16071 160721999-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com> 16073 16074 * parse.y (find_applicable_accessible_methods_list): Search 16075 abstract classes as interfaces. 16076 160771999-09-09 Alexandre Petit-Bianco <apbianco@cygnus.com> 16078 16079 * class.c (finish_class): We're now outside a valid method 16080 declaration. Tell the rest of gcc so. 16081 160821999-09-08 Bruce Korb autogen@linuxbox.com 16083 16084 * Makefile.in: Give the gperf user a hint about why "gperf -F" fails. 16085 160861999-09-07 Tom Tromey <tromey@cygnus.com> 16087 16088 * gjavah.c (add_class_decl): Generate include for gcj/array.h, not 16089 java-array.h. 16090 (decode_signature_piece): Don't emit "::" in JArray<>. 16091 (print_namelet): Only print trailing `;' when printing a class. 16092 160931999-09-10 Bernd Schmidt <bernds@cygnus.co.uk> 16094 16095 * java-tree.h: Delete declarations for all tree nodes now moved to 16096 global_trees. 16097 * decl.c: Delete their definitions. 16098 160991999-09-04 Mark Mitchell <mark@codesourcery.com> 16100 16101 * Make-lang.in (jc1): Depend on ggc-callbacks.o. 16102 * Makefile.in (OBJS): Add ggc-callbacks.o. 16103 (OBJDEPS): Likewise. 16104 161051999-09-03 Tom Tromey <tromey@cygnus.com> 16106 16107 * parse.y (strip_out_static_field_access_decl): Return operand if 16108 it satisfies JDECL_P. 16109 161101999-09-02 Tom Tromey <tromey@cygnus.com> 16111 16112 * gjavah.c (decode_signature_piece): Emit "::" in JArray<>. 16113 Handle nested arrays, like `[[I'. 16114 161151999-09-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 16116 16117 * class.c (finish_class): Remove unused parameter, all callers 16118 changed. 16119 16120 * expr.c (build_java_athrow): Change return type to void. 16121 (java_lang_expand_expr): Make sure each case in switch returns a 16122 value. 16123 16124 * java-tree.h (finish_class): Fix prototype to take void args. 16125 16126 * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN. 16127 (main): Issue return from main, not exit. 16128 16129 * jcf-parse.c (parse_class_file): Fix call to `finish_class'. 16130 16131 * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN. 16132 16133 * jv-scan.c (main): Issue return from main, not exit. 16134 16135 * parse.y (check_abstract_method_definitions, 16136 java_check_abstract_method_definitions): Add static prototypes. 16137 (java_complete_expand_methods): Fix call to `finish_class'. 16138 16139 * verify.c (verify_jvm_instructions): Initialize variables `oldpc' 16140 and `prevpc'. 16141 161421999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 16143 16144 * lang.c (language_string): Constify. 16145 161461999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 16147 16148 * Makefile.in (LIBS): Fix definition so we link with $(CLIB). 16149 Remove hacks for stuff which comes from libiberty. 16150 16151 * Make-lang.in: Likewise. 16152 161531999-08-30 Hans-Peter Nilsson <hp@axis.se> 16154 16155 * Makefile.in (xref.o): Depend on xref.c explicitly. 16156 161571999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 16158 16159 * java-tree.h (lang_printable_name): Constify a char*. 16160 16161 * lang.c (lang_printable_name): Likewise. 16162 161631999-08-27 Jeffrey A Law (law@cygnus.com) 16164 16165 * gjavah.c, jcf-write.c, verify.c: Do not use C++ style 16166 comments in C code. 16167 161681999-08-26 Tom Tromey <tromey@cygnus.com> 16169 16170 * gjavah.c (print_cxx_classname): Print "::" before qualified 16171 name. 16172 161731999-08-26 Alexandre Petit-Bianco <apbianco@cygnus.com> 16174 16175 * parse.y (lookup_cl): Changed leading comment. Now does its best 16176 to set the column number. 16177 (qualify_ambiguous_name): Take WFL wrappers into account. 16178 161791999-08-25 Gregg Townsend <gmt@cs.arizona.edu> 16180 16181 * verify.c (verify_jvm_instructions): Don't check instruction 16182 validity beyond end of method. 16183 161841999-08-25 Tom Tromey <tromey@cygnus.com> 16185 16186 * jvspec.c (lang_specific_driver): Correctly handle --help again. 16187 161881999-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 16189 16190 * gjavah.c (print_name, print_base_classname, utf8_cmp, 16191 cxx_keyword_subst, generate_access, name_is_method_p, 16192 get_field_name, print_field_name, super_class_name, print_include, 16193 decode_signature_piece, print_class_decls, usage, help, 16194 java_no_argument, version, add_namelet, print_namelet): Add static 16195 prototype. 16196 (print_base_classname, utf8_cmp, cxx_keyword_subst, 16197 name_is_method_p): Constify a char*. 16198 (get_field_name): Likewise. Prefer xstrdup over malloc/strcpy. 16199 Provide a final else clause in an if-else-if. 16200 (print_field_info): Add missing final arg in function call to 16201 `print_field_name'. 16202 (print_method_info, decompile_method, decode_signature_piece, 16203 print_c_decl, print_full_cxx_name, print_stub, 16204 print_mangled_classname, super_class_name, print_include, 16205 add_namelet, add_class_decl, print_class_decls, process_file, 16206 help): Constify a char*. 16207 16208 * jcf-write.c (jcf_handler, push_constant1, push_constant2, 16209 push_int_const, find_constant_wide, find_constant_index, 16210 push_long_const, field_op, maybe_wide, emit_dup, emit_pop, 16211 emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop, 16212 emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc, 16213 emit_if, emit_goto, emit_jsr, call_cleanups, 16214 make_class_file_name): Add static prototypes. 16215 (generate_bytecode_return, generate_bytecode_insns): Pass a 16216 NULL_PTR, not a NULL_TREE. 16217 16218 * jv-scan.c: Include "jcf.h". 16219 (main): Declare using DEFUN macro. 16220 16221 * jvspec.c (find_spec_file, lang_specific_pre_link, 16222 lang_specific_driver): Add prototypes. 16223 (find_spec_file): Constify a char*. 16224 16225 * keyword.gperf (hash, java_keyword): Add prototypes. 16226 16227 * lang.c (lang_print_error): Add static prototype. 16228 (lang_init): Prefer memcpy over bcopy to avoid casts. 16229 16230 * lex.c (yylex): Add static prototype. 16231 16232 * parse-scan.y: Include "lex.c" earlier. 16233 16234 * parse.h: Remove redundant declaration for `yylex'. 16235 16236 * parse.y (java_decl_equiv, binop_compound_p, search_loop, 16237 labeled_block_contains_loop_p): Add static prototypes. 16238 (not_accessible_p): Make static to match prototype. 16239 16240 * verify.c (start_pc_cmp): Don't needlessly cast away const. 16241 162421999-08-22 Alexandre Petit-Bianco <apbianco@cygnus.com> 16243 16244 * parse.y (check_method_redefinition): Changed leading comment. 16245 (check_abstract_method_definitions): New function. 16246 (java_check_abstract_method_definitions): New function. 16247 (java_check_regular_methods): Call it. 16248 (verify_constructor_super): Fixed indentation. 16249 (lookup_method_invoke): Likewise. 16250 162511999-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com> 16252 16253 * parse.y (method_header): Return a null pointer if the current 16254 class node is null. 16255 (finish_method_declaration): Return if the current function decl 16256 is null. 16257 (source_start_java_method): Likewise. 16258 (java_method_add_stmt): Likewise. 16259 162601999-08-18 Alexandre Petit-Bianco <apbianco@cygnus.com> 16261 16262 * class.c (emit_register_class): Removed unnecessary call to 16263 start_sequence. 16264 * parse.y (labeled_block_contains_loop_p): Removed unused local 16265 variable. 16266 162671999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com> 16268 16269 * parse.y (java_refold): Added prototype. 16270 162711999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com> 16272 16273 * parse.y (BINOP_COMPOUND_CANDIDATES): New macro. 16274 (java_stabilize_reference): Removed unnecessary `else'. 16275 (java_complete_lhs): Set flag to remember boolean. Call 16276 java_refold. Added comments. 16277 (java_decl_equiv): New function. 16278 (binop_compound_p): Likewise. 16279 (java_refold): Likewise. 16280 (patch_unaryop): Striped static field access assigned to decl and 16281 op. Changed promotion scheme for ++/-- operators. 16282 (search_loop): New function. 16283 (labeled_block_contains_loop_p): Likewise. 16284 (patch_loop_statement): Call labeled_block_contains_loop_p. Added 16285 comment. 16286 (patch_bc_statement): Call search_loop. Fixed comment. 16287 162881999-08-14 Anthony Green <green@cygnus.com> 16289 16290 * expr.c (java_lang_expand_expr): Mark static array data as 16291 referenced. 16292 162931999-08-10 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> 16294 16295 * jvgenmain.c (main): NUL-terminate name_obstack. 16296 162971999-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 16298 16299 * check-init.c (check_bool2_init, done_alternative): Add static 16300 prototypes. 16301 16302 * class.c (add_interface_do, maybe_layout_super_class): Likewise. 16303 (add_method, build_utf8_ref, build_class_ref, 16304 append_gpp_mangled_type, layout_class_method): Constify a char*. 16305 16306 * decl.c (push_promoted_type, make_binding_level): Add static 16307 prototypes. 16308 (push_promoted_type, pushdecl): Constify a char*. 16309 16310 * except.c (find_handler_in_range, link_handler, 16311 check_start_handlers): Add static prototypes. 16312 16313 * expr.c (process_jvm_instruction): Constify a char*. 16314 16315 * gjavah.c (main): Constify a char*. 16316 16317 * java-tree.h (verify_jvm_instructions, process_jvm_instruction): 16318 Constify a char*. 16319 16320 * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add 16321 static prototypes. 16322 (add_entry, jcf_dependency_set_target, jcf_dependency_add_target, 16323 munge, print_ents): Constify a char*. 16324 16325 * jcf-dump.c (disassemble_method): Constify a char*. 16326 (print_constant_pool, print_exception_table): Add static prototypes. 16327 (print_constant, print_exception_table, main, disassemble_method): 16328 Constify a char*. 16329 16330 * jcf-io.c (find_classfile, find_class): Likewise. 16331 16332 * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise. 16333 (set_source_filename, predefined_filename_p): Add static prototypes. 16334 (set_source_filename, get_constant, get_class_constant, 16335 find_in_current_zip): Constify a char*. 16336 16337 * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add 16338 static prototypes. 16339 (add_entry, add_path, jcf_path_classpath_arg, 16340 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*. 16341 16342 * jcf-reader.c (get_attribute, jcf_parse_preamble, 16343 jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields, 16344 jcf_parse_one_method, jcf_parse_methods, 16345 jcf_parse_final_attributes): Add static prototypes. 16346 (get_attribute): Constify a char*. 16347 16348 * jcf.h (find_class, find_classfile, jcf_dependency_set_target, 16349 jcf_dependency_add_target, jcf_path_classpath_arg, 16350 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*. 16351 16352 * jv-scan.c (main): Constify a char*. 16353 (gcc_obstack_init): Add prototype arguments. 16354 16355 * jvgenmain.c (gcc_obstack_init): Likewise. 16356 (main): Constify a char*. 16357 16358 * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add 16359 static prototypes. 16360 (put_decl_string, lang_print_error): Constify a char*. 16361 (lang_init): Remove redundant extern prototype. 16362 16363 * mangle.c (emit_unicode_mangled_name): Constify a char*. 16364 16365 * typeck.c (convert_ieee_real_to_integer, parse_signature_type): 16366 Add static prototypes. 16367 (get_type_from_signature): Constify a char*. 16368 16369 * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ): 16370 Add static prototypes. 16371 (start_pc_cmp): Prefer PTR over GENERIC_PTR. 16372 (verify_jvm_instructions): Constify a char*. 16373 16374 * xref.c (xref_flag_value): Likewise. 16375 16376 * xref.h (xref_flag_value): Likewise. 16377 16378 * zextract.c (makeword, makelong): Add static prototypes. 16379 (makeword, makelong): Constify a uch*. 16380 163811999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 16382 16383 * lang.c (java_dummy_print): Constify a char*. 16384 (lang_print_error): Likewise. 16385 (lang_init): Remove redundant prototype for `print_error_function'. 16386 (lang_init_source): Likewise. 16387 (lang_identify): Constify a char*. 16388 163891999-08-09 Tom Tromey <tromey@cygnus.com> 16390 16391 * javaop.h (WORD_TO_FLOAT): only inline if building with gcc. 16392 (WORDS_TO_LONG): Likewise. 16393 (WORDS_TO_DOUBLE): Likewise. 16394 163951999-08-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 16396 16397 * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H). 16398 16399 * expr.c (java_stack_pop, java_array_data_offset, 16400 build_java_throw_out_of_bounds_exception, case_identity, 16401 build_java_check_indexed_type): Add static prototypes. 16402 (linenumber_table, expand_invoke, expand_java_field_op, 16403 build_primtype_type_ref, expand_byte_code): Constify a char*. 16404 16405 * java-tree.h (build_primtype_type_ref, linenumber_table): 16406 Constify a char*. 16407 (java_lang_expand_expr): Add prototype. 16408 16409 * lang.c: Include rtl.h and expr.h. Remove extern prototype for 16410 `java_lang_expand_expr'. 16411 16412 * lex.c (java_lex_error): Constify a char*. 16413 (java_get_unicode, java_read_char, java_allocate_new_line, 16414 java_unget_unicode, java_sneak_unicode): Prototype. 16415 16416 * parse-scan.y (current_class, package_name, method_declarator, 16417 report_class_declaration, yyerror): Constify a char*. 16418 16419 * parse.h (java_report_errors): Prototype. 16420 (yyerror): Constify a char*. 16421 16422 * parse.y (classitf_redefinition_error, check_modifiers, 16423 parse_jdk1_1_error, lookup_package_type, 16424 lookup_package_type_and_set_next, get_printable_method_name, 16425 purify_type_name): Constify a char*. 16426 (build_super_invocation, maybe_generate_finit, 16427 verify_constructor_super, parser_add_interface, 16428 add_superinterfaces, jdep_resolve_class, note_possible_classname, 16429 java_complete_expand_methods, java_expand_finals, 16430 cut_identifier_in_qualified, java_stabilize_reference, 16431 do_unary_numeric_promotion, operator_string, do_merge_string_cste, 16432 merge_string_cste): Prototype. 16433 (single_type_import_declaration, yyerror, 16434 variable_redefinition_error, build_array_from_name, 16435 build_unresolved_array_type, check_class_interface_creation, 16436 resolve_class, complete_class_report_errors, 16437 note_possible_classname, read_import_dir, 16438 find_in_imports_on_demand, resolve_package, fix_constructors, 16439 check_deprecation, lookup_method_invoke, 16440 maybe_build_primttype_type_ref, array_constructor_check_entry): 16441 Constify a char*. 16442 (java_complete_expand_methods, java_expand_finals): Make static. 16443 (convert_narrow): Remove static prototype. 16444 164451999-08-03 J"orn Rennecke <amylaar@cygnus.co.uk> 16446 16447 * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h. 16448 164491999-08-02 Richard Henderson <rth@cygnus.com> 16450 16451 * decl.c: Include defaults.h instead of expr.h. 16452 * parse.y: Likewise. 16453 164541999-08-02 Jakub Jelinek <jj@ultra.linux.cz> 16455 16456 * java/decl.c (start_java_method): Change all uses of 16457 PROMOTE_PROTOTYPES, so that it tests it as a C expression. 16458 Ensure expr.h is included. 16459 * java/expr.c (pop_arguments): Ditto. 16460 * java/parse.y (expand_start_java_method): Ditto. 16461 164621999-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 16463 16464 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'. 16465 164661999-07-31 Bernd Schmidt <bernds@cygnus.co.uk> 16467 16468 * decl.c: Include "function.h". 16469 * except.c: Likewise. 16470 * parse.y: Likewise. 16471 * Makefile.in: Update dependencies. 16472 164731999-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 16474 16475 * expr.c (build_java_soft_divmod): Provide a default case in switch. 16476 (java_lang_expand_expr): Mark parameters `target', `tmode' and 16477 `modifier' with ATTRIBUTE_UNUSED. 16478 16479 * gjavah.c (process_file): Add braces around ambiguous `else'. 16480 16481 * jcf-dump.c (print_access_flags, localvar_free): Change return 16482 type to void. 16483 16484 * parse.y (java_complete_expand_method): Initialize variable 16485 `exception_copy'. 16486 (resolve_qualified_expression_name): Likewise for `field_decl'. 16487 (patch_method_invocation): Likewise for `class_to_search'. 16488 (qualify_ambiguous_name): Likewise for `name' and `ptr_type'. 16489 (patch_assignment): Likewise for `lhs_type'. 16490 16491 * verify.c (verify_jvm_instructions): Remove unused variable 16492 `caller'. 16493 164941999-07-25 Richard Henderson <rth@cygnus.com> 16495 16496 * decl.c (va_list_type_node): New. 16497 164981999-07-25 Anthony Green <green@cygnus.com> 16499 16500 * gjavah.c (print_stub): New function. 16501 (METHOD_IS_NATIVE): New macro. 16502 (print_mangled_classname): Make static. 16503 (HANDLE_END_FIELD): Don't emit fields during stub generation. 16504 (process_file): Perform stub generation. 16505 (HANDLE_METHOD): Don't emit class decls during stub 16506 generation. 16507 (HANDLE_END_METHOD): Take into account stub generation. 16508 (print_method_info): Handle stub generation. 16509 (print_stub): New function. 16510 (print_cxx_classname): Make signature consistant with others. 16511 (help): Describe -stubs option. 16512 (main): Create stub file. 16513 (version): Use version.c. 16514 (print_full_cxx_name): New function. 16515 (print_c_decl): Use print_full_cxx_name. 16516 165171999-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com> 16518 16519 * check-init.c (check_init): Handle MAX_EXPR. 16520 165211999-07-15 Andrew Haley <aph@cygnus.com> 16522 16523 * lang.c (flag_use_divide_subroutine): New variable. 16524 * typeck.c: (convert_ieee_real_to_integer): Bounds check 16525 fp-to-integer conversion. 16526 (convert): Call convert_ieee_real_to_integer when flag_fast_math 16527 is not set. 16528 16529 * expr.c (build_java_soft_divmod): New function. 16530 (build_java_binop): Call build_java_soft_divmod if 16531 flag_use_divide_subroutine is set. 16532 * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree 16533 soft_lrem_node: new builtin functions. 16534 (init_decl_processing) Initialize the new builtins. 16535 * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree 16536 soft_lrem_node: new builtin functions. 16537 (build_java_soft_divmod): New function. 16538 * parse.y: Call build_java_soft_divmod if 16539 flag_use_divide_subroutine is set. 16540 * parse.c: Rebuilt. 16541 16542 * jvspec.c (lang_specific_driver): Always allow an extra arg (for 16543 a --specs= arg) even if not linking. 16544 * lang-options.h (DEFINE_LANG_NAME ("Java")): Add 16545 -fuse-divide-subroutine 16546 165471999-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com> 16548 16549 * parse.y (resolve_and_layout): Check methods only once. 16550 (resolve_qualified_expression_name): Verify thrown exceptions 16551 compatibility. 16552 (check_thrown_exceptions): Reject exceptions thrown in 16553 initializer. Error message tuned. 16554 165551999-07-14 Andrew Haley <aph@cygnus.com> 16556 16557 * expr.c (expand_expr): Do not return the last statement in a 16558 block as the block's value. 16559 165601999-07-03 Alexandre Petit-Bianco <apbianco@cygnus.com> 16561 16562 * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed 16563 CALL_EXPR, to avoid order of evaluation changes. 16564 165651999-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com> 16566 16567 * parse.y (qualify_ambiguous_name): Do not use 16568 IDENTIFIER_LOCAL_VALUE when name is a STRING_CST. 16569 165701999-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com> 16571 16572 * check-init.c (check_init): Handle MAX_EXPR. 16573 * expr.c (force_evaluation_order): Force method call arguments to 16574 be evaluated in left-to-right order. 16575 * parse.y (qualify_ambiguous_name): Loop again to qualify 16576 NEW_ARRAY_EXPR properly. 16577 165781999-06-30 Alexandre Petit-Bianco <apbianco@cygnus.com> 16579 16580 * parse.y (patch_invoke): Resolve unresolved invoked method 16581 returned type. 16582 (qualify_ambiguous_name): STRING_CST to qualify expression for 16583 type name resolution. 16584 165851999-06-24 Andrew Haley <aph@cygnus.com> 16586 16587 * class.c (finish_class): Whenever a deferred method is 16588 output, rescan the list of methods to see if a new candidate for 16589 output can be found. 16590 165911999-06-28 Tom Tromey <tromey@cygnus.com> 16592 16593 * jvspec.c (lang_specific_driver): Recognize --help. 16594 165951999-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com> 16596 16597 * parse.y (resolve_package): Fixed bogus return statement. 16598 (patch_method_invocation): Resolve method invocation beginning with 16599 a package name qualifier. 16600 166011999-06-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 16602 16603 * Make-lang.in (java.stage1): Depend on stage1-start. 16604 (java.stage2): Likewise for stage2-start. 16605 (java.stage3): Likewise for stage3-start. 16606 (java.stage4): Likewise for stage4-start. 16607 166081999-06-24 Alexandre Petit-Bianco <apbianco@cygnus.com> 16609 16610 * parse.y (java_complete_lhs): When doing cross referencing, don't 16611 try to keep file location on a WFL expanded as a CALL_EXPR. 16612 166131999-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com> 16614 16615 * parse.y (finish_method_declaration): Insert a RETURN_EXPR when 16616 compiling to class file a void method with an empty method body. 16617 As a side effect, the bytecode backend will generate the 16618 appropriate `return' instruction. 16619 166201999-06-22 Alexandre Petit-Bianco <apbianco@cygnus.com> 16621 16622 * parse.y (lookup_package_type_and_set_next): New function prototype. 16623 (resolve_package): Search current and imported packages. 16624 (lookup_package_type_and_set_next): New function. 16625 166261999-06-22 Andrew Haley <aph@cygnus.com> 16627 16628 * verify.c (verify_jvm_instructions): Check for pending blocks 16629 before invalid PC test and opcode switch, not after. 16630 166311999-06-21 Andrew Haley <aph@cygnus.com> 16632 16633 * except.c (find_handler_in_range): The upper limit for exception 16634 ranges is exclusive, not inclusive: (start <= pc < end). 16635 (link_handler): find child pointer which points to outer by 16636 searching sibling list: previous code incorrectly assumed that 16637 outer->outer->first_child must point to outer. 16638 * verify.c (verify_jvm_instructions): FIXME added to code for 16639 `athrow'. 16640 (verify_jvm_instructions): Do not assume that the last block 16641 processed in a subroutine is a block which ends with a `ret' 16642 instruction. With some control flows it is possible that the last 16643 block ends with an `athrow'. 16644 166451999-06-14 Alexandre Petit-Bianco <apbianco@cygnus.com> 16646 16647 * parse.y (qualify_ambiguous_name): Reorganized the post 16648 evaluation of non WFL leading expression nodes. 16649 166501999-06-11 Alexandre Petit-Bianco <apbianco@cygnus.com> 16651 16652 * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after 16653 CONVERT_EXPR. 16654 166551999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com> 16656 16657 * parse.y (qualify_ambiguous_name): Handle qualified expression 16658 beginning with a STRING_CST. 16659 166601999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com> 16661 16662 * parse.y (register_fields): Set DECL_INITIAL on both 16663 pre-initialized static and public fields. 16664 (resolve_field_access): Static field access expressions to always 16665 use pointer types. 16666 (qualify_ambiguous_name): Work out buried CALL_EXPR for proper 16667 qualification. CONVERT_EXPR to be resolved as an expression name. 16668 (java_complete_lhs): Identify and access qualified final 16669 initialized field in switch statement case expression. 16670 (fold_constant_for_init): Pre-initialized field decl constant to 16671 be folded. 16672 166731999-06-07 Alexandre Petit-Bianco <apbianco@cygnus.com> 16674 16675 * parse.y (note_possible_classname): Mark returned node with 16676 QUALIFIED_P only if the original class name contained a '/'. 16677 166781999-06-05 Anthony Green <green@cygnus.com> 16679 16680 * Make-lang.in (gcjh): More parallel build fixes. 16681 166821999-06-03 Mike Stump <mrs@wrs.com> 16683 16684 * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds. 16685 166861999-06-02 Anthony Green <green@cygnus.com> 16687 16688 * except.c (link_handler): Chain exception handlers in order. 16689 166901999-06-02 Anthony Green <green@cygnus.com> 16691 16692 * expr.c (expand_byte_code): Fill unreachable bytecode regions 16693 with nops and process as usual in order to always set correct EH 16694 ranges. Emit detailed warnings about unreachable bytecodes. 16695 166961999-06-02 Anthony Green <green@cygnus.com> 16697 16698 * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as 16699 constant. 16700 167011999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com> 16702 16703 * parse.y (lookup_field_wrapper): Unified returned value to NULL 16704 or the searched field decl. 16705 167061999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com> 16707 16708 * parse.y (fold_constant_for_init): Convert numerical constant 16709 values to the type of the assigned field. 16710 167111999-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com> 16712 16713 * expr.c (lookup_field): Relaxed the test on class loading error 16714 detection. 16715 * parse.y (fold_constant_for_init): Enabeled old code. 16716 167171999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com> 16718 16719 * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast' 16720 decide the validity of the cast of a java.lang.Cloneable reference 16721 to an array. 16722 (patch_conditional_expr): Fixed first argument passed to 16723 binary_numeric_promotion. 16724 167251999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com> 16726 16727 * parse.y (qualify_ambiguous_name): Take into account that a 16728 CONVERT_EXPR might specify a type as a WFL. 16729 167301999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com> 16731 16732 * parse.y (patch_assignment): Save the rhs before using it as an 16733 argument to _Jv_CheckArrayStore. 16734 167351999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com> 16736 16737 * lex.c (java_parse_doc_section): Fixed `tag' buffer size. 16738 167391999-05-24 Alexandre Petit-Bianco <apbianco@cygnus.com> 16740 16741 * lex.c (java_lex): Accepts `+' or `-' after the beginning of a 16742 floating point literal only when the exponent indicator has been 16743 parsed. 16744 167451999-05-22 Alexandre Petit-Bianco <apbianco@cygnus.com> 16746 16747 * parse.y (formal_parameter:): Construct argument tree list 16748 element even if a yet unsupported final parameter was encountered. 16749 167501999-05-18 Alexandre Petit-Bianco <apbianco@cygnus.com> 16751 16752 * parse.y (finish_method_declaration): Issue errors for native or 16753 abstract methods declared with a method body, as well as for non 16754 native or non abstract methods with no method body. 16755 167561999-05-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 16757 16758 * class.c (build_utf8_ref): Initialize variable `field'. 16759 16760 * decl.c (init_decl_processing): Initialize variable `field'. 16761 16762 * expr.c (build_known_method_ref): Mark parameters `method_type', 16763 `method_signature' and `arg_list' with ATTRIBUTE_UNUSED. 16764 (process_jvm_instruction): Likewise for parameter `length'. 16765 16766 * jvspec.c (lang_specific_driver): Mark variables `saw_math', 16767 `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with 16768 ATTRIBUTE_UNUSED. 16769 16770 * parse.y (maybe_generate_clinit): Remove unused variable 16771 `has_non_primitive_fields'. 16772 (find_in_imports_on_demand): Initialize variables `node_to_use' 16773 and `cl'. 16774 (patch_binop): Likewise for variable `prom_type'. 16775 (patch_unaryop): Likewise for variable `prom_type'. 16776 16777 * verify.c (verify_jvm_instructions): Likewise for variable `last'. 16778 16779 * xref.c (xref_table): Add missing initializer. 16780 167811999-05-14 Tom Tromey <tromey@cygnus.com> 16782 16783 * java-except.h (struct eh_range): Removed unused `next' member. 16784 * verify.c (verify_jvm_instructions): Call check_nested_ranges 16785 after adding all exception handlers. Sort exception ranges in 16786 order of start PC. 16787 (struct pc_index): New structure. 16788 (start_pc_cmp): New function. 16789 * except.c (add_handler): Return `void'. Don't call link_handler; 16790 instead construct an ordinary linked list and do range 16791 coalescing. 16792 (check_nested_ranges): New function. 16793 (link_handler): Changed interface to allow merging of eh_ranges. 16794 Split overlapping ranges. Return `void'. 16795 167961999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com> 16797 16798 * parse.y (constructor_block_end:): New rule, tagged <node>. 16799 (constructor_body:): Use `constructor_block_end' instead of 16800 `block_end'. 16801 168021999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com> 16803 16804 * parse.y (statement_nsi:): Pop `for' statement block. 16805 (java_complete_lhs): Labeled blocks containing no statement are 16806 marked as completing normally. 16807 168081999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com> 16809 16810 * xref.c (xref_set_current_fp): New function, defined. 16811 * xref.h (xref_set_current_fp): New function, prototyped. 16812 168131999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com> 16814 16815 * check-init.c (check_init): Take into account that 16816 LABELED_BLOCK_STMT can be empty. 16817 168181999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com> 16819 16820 * parse.y (java_check_regular_methods): Warning check on not 16821 overriding methods with default access in other packages does not 16822 apply to `<clinit>'. 16823 (java_complete_lhs): If block body is an empty_stmt_node, replace 16824 it by NULL_TREE. This prevents gcc from generating an irrelevant 16825 warning. 16826 168271999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com> 16828 16829 * check-init.c (check_init): Removed code accepting to see things 16830 falling through default:, when doing xrefs. 16831 * java-tree.h (do_not_fold): New global variable, declared. 16832 * parse.y (do_not_fold): New global variable, defined. 16833 (java_complete_expand_method): Set `do_not_fold' to the value of 16834 `flag_emit_xref'. When doing xrefs: copy the thrown exceptions, 16835 and reinstall them after them have been purged; do not check for 16836 initializations; do not issue missing return errors. 16837 (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes 16838 when doing xrefs. 16839 (patch_binop): Skip the fold part when doing xrefs. 16840 (build_string_concatenation): Skip the concatenation part when 16841 doing xrefs. 16842 (patch_synchronized_statement): Do not generate a try-finally when 16843 doing xrefs. 16844 (patch_throw_statement): When doing xrefs, do not call BUILD_THROW 16845 and keep the location where the throw was seen. 16846 * typeck.c (convert): When `do_not_fold' is set, do not attempt 16847 any treatment on the converted node an simply return a NOP_EXPR of 16848 the targeted type. 16849 * xref.c (xref_get_data): New function, defined. 16850 * xref.h (xref_get_data): New function, declared. 16851 (XREF_GET_DATA): Use xref_get_data. 16852 168531999-05-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 16854 16855 * gjavah.c (print_include): Cast the result of `strlen' to int 16856 when comparing against a signed value. 16857 (add_namelet): Likewise. 16858 168591999-05-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 16860 16861 * expr.c (expand_invoke): Mark parameter `nargs' with 16862 ATTRIBUTE_UNUSED. 16863 (PRE_LOOKUP_SWITCH): Likewise for variable `match'. 16864 16865 * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with 16866 ATTRIBUTE_UNUSED. 16867 16868 * jcf-reader.c (get_attribute): Cast a value to long 16869 when comparing against a signed expression. Likewise. 16870 16871 * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or 16872 HOST_BITS_PER_CHAR. 16873 168741999-05-11 Andrew Haley <aph@cygnus.com> 16875 16876 * parse.y (source_end_java_method): If the current method contains 16877 any exception handlers, force asynchronous_exceptions: this is 16878 necessary because signal handlers in libjava may throw exceptions. 16879 * decl.c (end_java_method): Ditto. 16880 168811999-05-11 Tom Tromey <tromey@cygnus.com> 16882 16883 * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x 16884 flags. 16885 * jvspec.c (THREAD_NAME): Removed. 16886 (GC_NAME): Likewise. 16887 (MATHLIB): Likewise. 16888 (WITHLIBC): Likewise. 16889 (GCLIB): Likewise. 16890 (THREADLIB): Likewise. 16891 (MATH_LIBRARY): Likewise. 16892 (lang_specific_driver): Don't add `-l' options to command line. 16893 Instead, add a single --specs option. Recognize `-L' options and 16894 use them to search for spec file. 16895 (find_spec_file): New function. 16896 (SPEC_FILE): New define. 16897 168981999-05-11 Dave Brolley <brolley@cygnus.com> 16899 16900 * lang-options.h: -MD, -MMD, -M and -MM not needed here for 16901 cpplib-enabled build. 16902 169031999-05-05 Per Bothner <bothner@cygnus.com> 16904 16905 * class.c (make_field_value): DECL_INITIAL may be a string literal; 16906 temporarily zero it while calling rest_of_decl_compilation. 16907 16908 * java-tree.h (string_ptr_type_node): Add declaration. 16909 * decl.c: Define and initialize string_ptr_type_node. 16910 * parse.y (patch_string_cst): Use string_ptr_type_node. 16911 16912 * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P): Removed. 16913 * parse.y (for_statement): Now unconditionally exit_block. 16914 (finish_labeled_statement): No longer exit_block if for-loop. 16915 (patch_loop_statement): Check harder if the loop is already labeled. 16916 16917 * parse.y (patch_initialized_static_field): Removed function. 16918 (maybe_generate_clinit): Removed special handling for interfaces. 16919 (java_complete_expand_methods): Do a preliminary java_complete_tree 16920 on <clinit> to determine if it can be removed. 16921 (java_complete_expand_method): Remove special handling for <clinit>. 16922 (java_complete_lhs): For BLOCK and EXPR_WITH_FILE_LOCATION 16923 optimize if we get back empty_stmt_node. 16924 For MODIFY_EXPR, re-do checking of static initializers. 16925 (fold_constant_for_init): Don't return immediate if VAR_DECL. 16926 For VAR_DECL, pass correct context. 16927 16928 * verify.c (verify_jvm_instructions): Better error messages. 16929 169301999-05-03 Tom Tromey <tromey@cygnus.com> 16931 16932 * parse-scan.y (interface_declaration): Call 16933 report_class_declaration for interfaces. 16934 169351999-04-30 20:54 -0400 Zack Weinberg <zack@rabi.columbia.edu> 16936 16937 * Makefile.in: Remove -v from bison command lines. 16938 169391999-04-30 Alexandre Petit-Bianco <apbianco@cygnus.com> 16940 16941 * check-init.c (check_init): Exclude a case of error when doing 16942 xrefs. 16943 * class.c (layout_class_method): Don't generate the error message 16944 twice when compiling from source. 16945 * lang-options.h: Added `-Wredundant-modifers' and 16946 `-Wunusupported-jdk11' flags and help text. 16947 * lang.c (lang_decode_option): Added support for 16948 `-Wunsupported-jdk11' and `-Wredundant-modifiers'. 16949 flag_static_local_jdk11 and flag_redundant set accordingly. 16950 * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK. 16951 * parse.h (EXPR_WFL_ADD_COL): New macro. 16952 (DECL_END_SOURCE_LINE): Likewise. 16953 (DECL_INHERITED_SOURCE_LINE): Likewise. 16954 * parse.y (static_ref_err): New function, prototyped. 16955 (CCB_TK): Now tagged <operator>. 16956 (class_body:): Remember the location of the closing '}' of a class 16957 definition when doing xrefs. 16958 (block:): Likewise. 16959 (block_end:): Likewise. 16960 (create_class): Remember the location of the inherited class 16961 identifier when doing xrefs. 16962 (register_fields): Added test on first operand of `init' before 16963 testing it TREE_CODE. 16964 (method_header): Store the location of the class identifier in the 16965 class decl when doing xrefs. 16966 (finish_method_declaration): Don't combine first/last method line 16967 when doing xref. 16968 (java_check_regular_methods): Warning check on not overriding 16969 methods with default access on other packages move before check on 16970 static methods. Initialization of `aflags' also moved up. 16971 (resolve_expression_name): Call static_ref_err to report the error. 16972 (static_ref_err): New function, implemented. 16973 (resolve_field_access): Returned simplified static field access 16974 when doing xrefs. 16975 (resolve_qualified_expression_name): Check for illegal use of 16976 static fields in a non static context. Call static_ref_err to 16977 report error in various places. 16978 (java_complete_tree): Do not fold initialized static fields when 16979 doing xrefs. 16980 (java_complete_lhs): Likewise. 16981 169821999-04-29 Anthony Green <green@cygnus.com> 16983 16984 * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to 16985 create internal labels. 16986 (lookup_label): Ditto. 16987 169881999-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com> 16989 16990 * class.c (layout_class_method): Generate <clinit>'s rtl for 16991 interfaces. 16992 * decl.c (complete_start_java_method): Don't call _Jv_InitClass 16993 for interfaces' <clinit>. 16994 * expr.c (lookup_field): Search for fields in interfaces. 16995 (expand_invoke): Fixed indentation. 16996 (expand_java_field_op): Likewise. Use IS_CLINIT. 16997 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed. 16998 (IS_CLINIT): New macro. 16999 * parse.y (type_declaration:): Call maybe_generate_clinit after an 17000 interface was parsed. 17001 (maybe_generate_clinit): Don't generate if the current class is an 17002 interface with only fields of primitive types. 17003 (reset_method_name): Use IS_CLINIT. 17004 (java_complete_expand_method): Expand <clinit> when it exists for 17005 interfaces. Use IS_CLINIT. 17006 (resolve_expression_name): Use DECL_CONTEXT instead of 17007 current_class to build static field references. 17008 (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on 17009 ARRAY_REF when doing xreferencing. 17010 (check_final_assignment): Fixed typo in leading comment. Use 17011 IS_CLINIT. 17012 (patch_array_ref): Don't fully expand array references when 17013 xreferencing. 17014 (patch_return): Use IS_CLINIT. 17015 (patch_throw_statement): Likewise. 17016 170171999-04-22 Tom Tromey <tromey@cygnus.com> 17018 17019 * Make-lang.in (JAVA_SRCS): Added check-init.c. 17020 170211999-04-21 Alexandre Petit-Bianco <apbianco@cygnus.com> 17022 17023 * decl.c (predef_filenames, predef_filenames_size): New globals 17024 (init_decl_processing): predef_filenames and predef_filenames_size 17025 initialized. 17026 * java-tree.h (predef_filenames, predef_filenames_size): Declared 17027 extern. 17028 * jcf-parse.c (predefined_filename_p): New function. 17029 (yyparse): Check that files on the command line are specified only 17030 once and issue a warning otherwise. 17031 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro. 17032 * parse.y (source_end_java_method): Nullify NOP method bodies, to 17033 avoid a gcc warning with -W -Wall turned on. 17034 (java_expand_classes): Abort if errors were encountered. 17035 (java_complete_lhs): If the cross reference flag is set, wrap 17036 field DECL node around a WFL when resolving expression name. 17037 170381999-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com> 17039 17040 * lang.c (lang_decode_option): Fixed returned value when parsing 17041 `-fxref=...' and `-Wall'. 17042 * parse.y (source_end_java_method): Do not generate code when 17043 flag_emit_xref is set. 17044 (resolve_expression_name): Do not build static field access when 17045 flag_emit_xref is set. 17046 (resolve_field_access): No special treatment on `length' when 17047 flag_emit_xref is set. Do not build qualified static field access 17048 when flag_emit_xref is set. 17049 (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR 17050 when flag_emit_xref is set. 17051 (patch_assignment): Do not generate array store runtime check when 17052 flag_emit_xref is set. 17053 * xref.c (xref_flag_value): Fixed function declaration 17054 indentation. 17055 (xset_set_data): New function. 17056 * xref.h (xref_set_data): Added prototype for new function. 17057 (typedef struct xref_flag_table): New field data. 17058 (XREF_GET_DATA): New macro. 17059 170601999-04-19 Tom Tromey <tromey@cygnus.com> 17061 17062 * xref.h (enum): Removed trailing comma. 17063 17064 * parse.y (resolve_qualified_expression_name): Added missing 17065 `break'. 17066 170671999-04-15 Anthony Green <green@cygnus.com> 17068 17069 * gjavah.c: New prototypes for java_float_finite and 17070 java_double_finite. 17071 170721999-04-12 Alexandre Petit-Bianco <apbianco@cygnus.com> 17073 17074 * parse.y (patch_unaryop): Fixed ++/-- operator check on array 17075 references. 17076 170771999-04-06 Jeffrey A Law (law@cygnus.com) 17078 17079 * Makefile.in (TREE_H): Add tree-check.h. 17080 (RTL_H): Add genrtl.h. 17081 170821999-04-06 Alexandre Petit-Bianco <apbianco@cygnus.com> 17083 17084 * parse.y (patch_assignment): Added ArrayStoreException runtime 17085 check. 17086 170871999-04-06 Per Bothner <bothner@cygnus.com> 17088 17089 * expr.c (pop_type_0): New function. 17090 (pop_type): Use pop_type_0. 17091 * java-tree.h (pop_type_0): New declaration. 17092 * verify.c (verify_jvm_instructions): Check return instructions. 17093 17094 * parse.y (patch_binop): Don't fold if non-constant and emiting 17095 class files. 17096 170971999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 17098 17099 * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H). 17100 17101 * gjavah.c: Include math.h earlier. Include tree.h/java-tree.h. 17102 (main_jcf): Don't define. 17103 (process_file): Don't set `main_jcf'. 17104 17105 * java-tree.h (main_jcf): Don't declare. 17106 17107 * jcf-parse.c (main_jcf): Add static definition. 17108 17109 * lang.c (main_jcf): Don't define. 17110 171111999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 17112 17113 * class.c (add_method_1): Cast the argument of `bzero' to PTR. 17114 17115 * decl.c (copy_lang_decl): Likewise for `bcopy'. 17116 17117 * jcf-depend.c: Include "config.h", not <config.h>. 17118 17119 * jcf-parse.c (jcf_figure_file_type): Cast the arguments of 17120 `bcopy' to PTR. 17121 17122 * jcf-path.c: Include "config.h", not <config.h>. 17123 17124 * lex.c: Don't include various system header files. 17125 (java_init_lex): Cast the argument of `bzero' to PTR 17126 17127 * parse-scan.y (java_push_parser_context): Likewise. 17128 17129 * parse.y (java_push_parser_context): Likewise. 17130 (patch_bc_statement): Match format specifier to variable argument. 17131 17132 * xref.c: Don't include <stdio.h>. 17133 171341999-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com> 17135 17136 * parse.y (struct parser_ctxt *ctxp): Now global. 17137 (declare_local_variables): Use WFL compound value for the 17138 declaration source line value, when doing cross-referencing. 17139 171401999-03-31 Tom Tromey <tromey@cygnus.com> 17141 17142 * gjavah.c (print_field_info): Allow constants of other types. 17143 (print_include): Generate include when new name is proper prefix 17144 of already printed name. 17145 (add_namelet): Likewise. 17146 (cxx_keyword_subst): New function. 17147 (print_method_info): Use it. 17148 (print_field_name): New function. 17149 (get_field_name): New function. 17150 (print_field_info): Use get_field_name and print_field_name. 17151 171521999-03-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 17153 17154 * Makefile.in (keyword.h): Generate using gperf language 'C', not 17155 'KR-C', so gperf uses the `const' keyword on strings. 17156 17157 * keyword.gperf (java_keyword): Const-ify a char*. 17158 171591999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com> 17160 17161 * parse.y (patch_bc_statement): Fixed identation and a bogus 17162 `printf' format. 17163 171641999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com> 17165 17166 * parse.y (patch_assignment): Allow static variables in other 17167 classes to be assigned. 17168 171691999-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 17170 17171 * class.c (maybe_add_interface): Remove unused variable 17172 `interface_binfo'. 17173 (make_class_data): Use = for assignment, not ==. Likewise. 17174 (emit_register_classes): Remove unused variable `decl'. 17175 17176 * lex.c: Fix comment so as not to contain an embedded `/*'. 17177 17178 * verify.c (verify_jvm_instructions): Remove unused variable 17179 `self_type'. 17180 171811999-03-27 Per Bothner <bothner@cygnus.com> 17182 17183 * parse.y (complete_loop_body): Rename to finish_loop_body. 17184 (complete_labeled_statement): Rename to finish_labeled_statement. 17185 (complete_for_loop): Rename to finish_for_loop. 17186 (complete_method_declaration): Rename to finish_method_declaration. 17187 17188 * java-tree.h (continue_identifier_node): New global node. 17189 * decl.c: Define and initialize continue_identifier_node. 17190 * parse.y (generate_labeled_block): Remove - no longer needed. 17191 (build_loop_body): Use continue_identifier_node for continue block. 17192 (finish_labeled_statement): Also do pop_labeled_block actions. 17193 (java_complete_lhs): POP_LOOP even if error. 17194 (build_labeled_block): Special handling for continue_identifier_node. 17195 (patch_loop_statement): Re-organize. 17196 (patch_bc_statement): Re-write. 17197 171981999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com> 17199 17200 * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count 17201 using a WFL compound value. 17202 * parse.y (xref.h): Include. 17203 (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the 17204 WFL compound value. 17205 (register_fields): Set WFL compound value to lineno if doing 17206 xrefs. 17207 (java_complete_expand_method): Call expand_xref if flag_emit_xref 17208 is set. 17209 * xref.c (system.h, jcf.h, parse.h, obstack.h): Include. 17210 * xref.h (expand_xref): Prototype renamed from xref_generate. 17211 172121999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com> 17213 17214 * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK. 17215 (GET_CURRENT_BLOCK): New macro. 17216 * parse.y (current_static_block): New global variable. 17217 (method_body:): Define action. 17218 (complete_method_declaration): Set current_function_decl to NULL 17219 when work on the current method is done. 17220 (declare_local_variables): Use GET_CURRENT_BLOCK. 17221 (java_method_add_stmt): Likewise. 17222 (java_complete_expand_method): Disable the use of `this' when 17223 expanding <clinit>. 17224 (enter_a_block): If no current method exist, use 17225 current_static_block to link static initializer blocks. 17226 (exit_block): Rewritten to use current_static_block when no current 17227 method decl exists. 17228 (lookup_name_in_blocks): Use GET_CURRENT_BLOCK. 17229 (patch_return): Forbid the use of `return' in static initializers. 17230 (patch_throw_statement): Fixed indentation. Issue specific error 17231 for uncaught thrown checked exception in static initializer 17232 blocks. Removed FIXME. 17233 172341999-03-25 Zack Weinberg <zack@rabi.columbia.edu> 17235 17236 * java/Make-lang.in: Remove all references to gcj.o/gcj.c. 17237 Link gcj from gcc.o. 17238 172391999-03-23 Alexandre Petit-Bianco <apbianco@cygnus.com> 17240 17241 * parse.y (find_applicable_accessible_methods_list): When dealing 17242 with interface: ensure that a given interface or java.lang.Object 17243 are searched only once. 17244 172451999-03-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 17246 17247 * gjavah.c (print_c_decl): Remove unused argument `flags'. 17248 17249 * jcf-dump.c (print_access_flags): Add braces around if-else. 17250 17251 * jvspec.c (lang_specific_driver): Wrap variable `len' in macro 17252 COMBINE_INPUTS. 17253 17254 * lex.c (build_wfl_node): Add static prototype. 17255 17256 * lex.h (build_wfl_node): Remove static prototype. 17257 17258 * parse.y: Include lex.c early enough to declare everything needed. 17259 Ensure calls to `build_wfl_node' pass the proper arguments. 17260 (create_class): Remove unused variable `super_decl'. 17261 (get_printable_method_name): Initialize variable `name'. 17262 172631999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com> 17264 17265 * Changelog: Fixed 1999-03-22 typos. 17266 * lang.c (lang_decode_option): Fixed typo in error string in the 17267 XARG section. 17268 172691999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com> 17270 17271 * Makefile.in (JAVA_OBJS): Added entry xref.o. 17272 (xref.o): New rule. 17273 * java-tree.h (flag_emit_xref): Declared extern. 17274 * lang.c (xref.h): Included. 17275 (flag_emit_xref): New global variable. 17276 (lang_decode_option): Added support for -fxref. 17277 * xref.c: Created. 17278 * xref.h: Likewise. 17279 172801999-03-21 Manfred Hollstein <manfred@s-direktnet.de> 17281 17282 * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be 17283 linked with. 17284 172851999-03-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 17286 17287 * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H) 17288 $(srcdir)/../system.h and $(JAVA_TREE_H). 17289 (jcf-io.o): Depend on $(JAVA_TREE_H). 17290 (mangle.o): Likewise. 17291 17292 * check-init.c (check_cond_init): Add static prototype. 17293 17294 * class.c (build_java_method_type, hashUtf8String, 17295 make_field_value, get_dispatch_vector, get_dispatch_table, 17296 append_gpp_mangled_type, mangle_static_field): Likewise. 17297 (strLengthUtf8): Hide unused definition. 17298 (hashUtf8String): Const-ify. 17299 (make_field_value): Un-ANSI-fy. 17300 17301 * constants.c: Move inclusion of jcf.h above java-tree.h. 17302 (set_constant_entry, find_class_or_string_constant, 17303 find_name_and_type_constant, get_tag_node, 17304 build_constant_data_ref): Add static prototype. 17305 17306 * decl.c (push_jvm_slot, builtin_function, 17307 lookup_name_current_level): Likewise. 17308 (builtin_function): Const-ify. 17309 17310 * except.c (expand_start_java_handler, expand_end_java_handler): 17311 Add static prototype. 17312 17313 * expr.c (flush_quick_stack, push_value, pop_value, 17314 java_stack_swap, java_stack_dup, build_java_athrow, 17315 build_java_jsr, build_java_ret, expand_java_multianewarray, 17316 expand_java_arraystore, expand_java_arrayload, 17317 expand_java_array_length, build_java_monitor, expand_java_pushc, 17318 expand_java_return, expand_java_NEW, expand_java_INSTANCEOF, 17319 expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label, 17320 expand_compare, expand_test, expand_cond, expand_java_goto, 17321 expand_java_call, expand_java_ret, pop_arguments, expand_invoke, 17322 expand_java_field_op, java_push_constant_from_pool): Likewise. 17323 17324 (decode_newarray_type, expand_iinc): Un-ANSI-fy. 17325 (build_java_arraynull_check): Mark parameters `node' and `type' 17326 with ATTRIBUTE_UNUSED. 17327 (note_label): Likewise for parameter `current_pc'. 17328 (expand_java_call, expand_java_ret): Hide unused definition. 17329 17330 * java-tree.h (make_class, build_constants_constructor, 17331 java_set_exception_lang_code, pop_labeled_block, emit_handlers, 17332 init_outgoing_cpool, register_class, emit_register_classes, 17333 java_layout_seen_class_methods): Prototype. 17334 (unicode_mangling_length): Const-ify. 17335 (append_gpp_mangled_name, append_gpp_mangled_classtype, 17336 emit_unicode_mangled_name, format_int, format_uint, 17337 jcf_trim_old_input, jcf_print_utf8, jcf_print_char, 17338 jcf_print_utf8_replace, open_class): Prototype. 17339 17340 * jcf-dump.c: Include "config.h", not <config.h>. Don't include 17341 <stdio.h>. Include tree.h/java-tree.h. 17342 (utf8_equal_string usage, process_class): Add static prototype. 17343 (open_class): Don't prototype this here. 17344 (utf8_equal_string): Match arguments to format specifiers. 17345 (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH, 17346 TABLE_SWITCH, disassemble_method): Likewise. 17347 17348 * jcf-io.c: Include tree.h/java-tree.h. 17349 (open_class, find_classfile, jcf_print_utf8, 17350 jcf_print_utf8_replace): Const-ify. 17351 17352 * jcf-parse.c (parse_zip_file_entries, process_zip_dir, 17353 parse_class_file): Add static prototype. 17354 (find_in_current_zip): Match definition to existing static 17355 prototype. 17356 17357 * jcf-write.c: Include jcf.h before tree.h/java-tree.h. 17358 (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label, 17359 finish_jcf_block, define_jcf_label, get_jcf_label_here, 17360 put_linenumber, localvar_alloc, localvar_free, get_access_flags, 17361 write_chunks, adjust_typed_op, generate_bytecode_conditional, 17362 generate_bytecode_return, perform_relocations, init_jcf_state, 17363 init_jcf_method, release_jcf_state, generate_classfile): 17364 Add static prototype. 17365 (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED. 17366 (make_class_file_name): Const-ify. 17367 17368 * jcf.h (find_classfile): Const-ify. 17369 17370 * jv-scan.c (reset_report): Remove prototype. 17371 17372 * jvgenmain.c: Include jcf.h/tree.h/java-tree.h. 17373 (error): Rewrite to allow varargs. 17374 17375 * lang.c (lang_f_options): Const-ify. 17376 17377 * lex.c (java_parse_escape_sequence): Add static prototype. 17378 (java_allocate_new_line): Match definition to existing static 17379 prototype. 17380 17381 * mangle.c Include tree.h/java-tree.h. 17382 (unicode_mangling_length, emit_unicode_mangled_name, 17383 append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify. 17384 17385 * parse.h (jdep_code): Remove trailing comma in enumeration. 17386 (java_get_line_col): Move prototype outside of !JC1_LITE test. 17387 (reset_report): Add prototype. 17388 17389 * verify.c (push_pending_label, merge_types): Add static 17390 prototypes. 17391 17392 * zipfile.h (opendir_in_zip, open_in_zip): Prototype. 17393 173941999-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com> 17395 17396 * parse.y (find_applicable_accessible_methods_list): Extend the 17397 search to superinterfaces when relevant. 17398 (search_applicable_methods_list): New function. 17399 174001999-03-18 Alexandre Petit-Bianco <apbianco@cygnus.com> 17401 17402 * class.c (unmangle_classname): Implemented stricter testing 17403 before setting the QUALIFIED_P flag on an identifier. 17404 174051999-03-16 Per Bothner <bothner@cygnus.com> 17406 17407 * parse.y (java_complete_lhs): Call force_evaluation_order 17408 after patch_newarray. 17409 (patch_binop): Don't call fold if there are side effects. 17410 174111999-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com> 17412 17413 * parse.y (java_stabilize_reference): Use save_expr instead of 17414 building a SAVE_EXPR node. 17415 (java_complete_lhs): Patch the resulting string of the `+=' 17416 operator (if necessary) and complete the RHS after having built 17417 the cast. 17418 174191999-03-15 Per Bothner <bothner@cygnus.com> 17420 17421 * class.c (make_class): Don't set CLASS_P here (because 17422 this function is also called by build_java_array_type). 17423 (push_class): Set CLASS_P here instead. 17424 * parse.h (TYPE_CLASS_P): Check for TYPE_ARRAY_P is redundant. 17425 17426 * jcf-dump.c (print_access_flags): Take extra parameter to indicate 17427 context. If the context is class, perfer "super" over "synchronized". 17428 * jcf-write.c (generate_classfile): Don't add ACC_SUPER if interface. 17429 17430 * parse.y (create_class): Don't call parser_check_super here; 17431 it is not robust. Always wait until later. 17432 17433 * parse.y (method_header): For interfaces, set ACC_ABSTRACT (to 17434 match what JDK 1.2 does), but don't set ACC_PUBLIC. 17435 174361999-03-13 Per Bothner <bothner@cygnus.com> 17437 17438 * lex.c (java_read_char): UNGET invalid non-initial utf8 character. 17439 * lex.h (UNGETC): Change misleading macro. 17440 174411999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com> 17442 17443 * parse.y (java_stabilize_reference): Return NODE when patching a 17444 COMPOUND_EXPR. 17445 (java_complete_lhs): Put parenthesis around truth values. 17446 174471999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com> 17448 17449 * class.c (layout_class_method): Don't make rtl for interface 17450 methods. 17451 * parse.h (GET_TYPE_NAME): New macro. 17452 * parse.y (if_then_statement:): Fixed indentation. 17453 (if_then_else_statement:): Likewise. 17454 (for_statement:): Fixed spacing. 17455 (try_statement:): Fixed indentation. 17456 (create_interface): Don't force interfaces to be abstract. 17457 (method_header): Abstract methods are OK in interfaces. 17458 (declare_local_variables): Fixed typo in comment. 17459 (java_complete_expand_method): Fixed indentation. 17460 (resolve_qualified_expression_name): Use GET_TYPE_NAME to report 17461 non accessible fields. 17462 (java_stabilize_reference): New function. 17463 (java_complete_lhs): Fixed indentation. Use 17464 java_stabilize_reference in compound assignment. Insert the 17465 cast. If not processing `+' fix string constants before processing 17466 binop. 17467 174681999-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 17469 17470 * constants.c (find_class_or_string_constant): Cast variable `j' 17471 to a `jword' when comparing against one. 17472 17473 * expr.c (java_lang_expand_expr): Remove unused variables 17474 `has_finally_p' and `op0'. 17475 17476 * gjavah.c (print_field_info): Cast a value to jint when comparing 17477 against one. Likewise for a jlong. 17478 (add_namelet): Likewise cast a `sizeof' to an int when comparing 17479 against a signed quantity. 17480 17481 * jcf-dump.c (print_signature_type): Remove unused variable `digit'. 17482 (print_signature): Don't needlessly dereference variable `str' 17483 17484 * jcf-reader.c (get_attribute): Mark variables `max_stack' and 17485 `max_locals' with ATTRIBUTE_UNUSED. 17486 (jcf_parse_class): Likewise for variable `index'. 17487 17488 * parse.h (reverse_jdep_list): Remove static prototype. 17489 17490 * parse.y (build_jump_to_finally): Remove prototype and definition. 17491 (reverse_jdep_list): Add static prototype. 17492 17493 * typeck.c (convert_ieee_real_to_integer): Remove unused variables 17494 `assignment' and `expr_decl'. 17495 17496 * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'. 17497 174981999-03-12 Andrew Haley <aph@cygnus.com> 17499 17500 * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes; 17501 we'll need a directory separator and a null character. 17502 175031999-03-10 Per Bothner <bothner@cygnus.com> 17504 17505 * jcf-write.c (generate_bytecode_insns): Handle __builtin_fmod, for %. 17506 17507Tue Mar 9 11:52:08 1999 Alexandre Petit-Bianco <apbianco@cygnus.com> 17508 17509 * parse.y (method_header): Don't set ACC_ABSTRACT flags on 17510 interfaces. 17511 175121999-03-05 Per Bothner <bothner@cygnus.com> 17513 17514 * lex.c (java_parse_end_comment): Take extra parameter (next char). 17515 17516 * class.c (build_utf8_ref): Fix possible name class/ambiguity. 17517 17518 * class.c (layout_class_method): A static method in a base class 17519 is never overridden, so treat it like it doesn't exist. 17520 However, do complain about private non-static method overriding 17521 public static method. 17522 17523 * parse.y: Don't set unused INITIALIZED_P flag. 17524 * java-tree.h (INITIALIZED_P): Removed no-longer needed flag. 17525 17526 * parse.y (find_expr_with_wfl): Optimize tail-calls. 17527 (build_array_from_name): Re-order &index[string] to &string[index]. 17528 17529 * parse.y (java_complete_lhs): Don't call patch_assignment if rhs is 17530 error_mark (it might catch more errors, but it is more likely to lose). 17531 175321999-03-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 17533 17534 * Makefile.in (jcf-parse.o): Depend on $(PARSE_H). 17535 (parse-scan.o): Depend on toplev.h. 17536 17537 * class.c (make_method_value): Add prototype. Make it static. 17538 Remove unused second argument, caller changed. 17539 17540 * expr.c (java_lang_expand_expr): Remove unused variable 17541 `return_label'. 17542 17543 * java-tree.h: Don't prototype find_in_current_zip. 17544 Add prototypes for verify_constant_pool, start_java_method, 17545 end_java_method, give_name_to_locals, expand_byte_code, 17546 open_in_zip, set_constant_value, find_constant1, find_constant2, 17547 find_utf8_constant, find_string_constant, find_class_constant, 17548 find_fieldref_index, find_methodref_index, write_constant_pool, 17549 count_constant_pool_bytes and encode_newarray_type. 17550 17551 * jcf-dump.c: Remove unused variable `LONG_temp'. 17552 17553 * jcf-parse.c: Include parse.h. 17554 (jcf_parse_source): Remove unused parameter, all callers changed. 17555 (jcf_figure_file_type): Add static prototype. 17556 (find_in_current_zip): Likewise. Also remove unused parameter, 17557 all callers changed. 17558 (read_class): Initialize variable `saved_pos'. 17559 17560 * jcf-reader.c (jcf_parse_preamble): Mark variables 17561 `minor_version' and `major_version' with ATTRIBUTE_UNUSED. 17562 17563 * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE. 17564 (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE. 17565 (java_parse_doc_section): Initialize variable `seen_star'. 17566 (java_lex): Wrap variable `number_beginning' in !JC1_LITE. 17567 (java_lex_error): Mark parameters `msg' and `forward' with 17568 ATTRIBUTE_UNUSED. 17569 (java_get_line_col): Mark parameters `filename' and `line' with 17570 ATTRIBUTE_UNUSED. 17571 17572 * parse-scan.y: Include toplev.h. 17573 (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED. 17574 17575 * parse.h: use `struct JCF', not plain `JCF'. 17576 (java_parser_context_save_global, java_expand_classes 17577 java_parser_context_restore_global, java_parse): Add prototypes. 17578 17579 * typeck.c (convert_ieee_real_to_integer): Remove unused variable 17580 `node'. 17581 175821999-02-24 Per Bothner <bothner@deneb.cygnus.com> 17583 17584 * check-init.c (check_init): COPYN takes word count, not bit count. 17585 175861999-02-26 Per Bothner <bothner@cygnus.com> 17587 17588 * typeck.c (convert_ieee_real_to_integer): Use save_expr instead of 17589 explicit build_decl. (Avoids crash in reload when optimizing.) 17590 175911999-02-25 Per Bothner <bothner@cygnus.com> 17592 17593 * decl.c (complete_start_java_method): Handle synchronized method 17594 even when compiling from bytecode. 17595 175961999-02-26 Tom Tromey <tromey@cygnus.com> 17597 17598 * gjavah.c (add_class_decl): Only generate `#include' if outer 17599 class is not the name of the class we are processing. Correctly 17600 append `.h' in #include. 17601 (process_file): Clean up newlines around generated `#include's. 17602 (decode_signature_piece): Correctly handle inner classes. 17603 (struct include): New structure. 17604 (all_includes): New global. 17605 (print_include): New function. 17606 (add_class_decl): Use it. 17607 (process_file): Likewise. 17608 (add_class_decl): Generate include for java-array.h if array 17609 seen. 17610 (process_file): Don't generate java-array.h include. 17611 17612 * gjavah.c (add_namelet): Check for standard package names here. 17613 (add_class_decl): Don't check for standard package names here. 17614 176151999-02-25 Tom Tromey <tromey@cygnus.com> 17616 17617 * parse.y (read_import_dir): Use `|=', not `+=', to set `found'. 17618 When reading a zip file, only use strncmp if both strings are 17619 bigger than the buffer length. Initialize `k' when looping 17620 through zip file. 17621 176221999-02-24 Tom Tromey <tromey@cygnus.com> 17623 17624 * gjavah.c (struct namelet): New structure. 17625 (add_namelet): New function. 17626 (print_namelet): New function. 17627 (print_class_decls): Use add_namelet and print_namelet to generate 17628 namespaces and not classes. 17629 (method_printed): New global. 17630 (HANDLE_END_METHOD): Examine method_printed. 17631 (print_method_info): Set method_printed when required. Print 17632 error if function to be ignored is marked virtual. Handle $finit$ 17633 method. 17634 (METHOD_IS_FINAL): New macro. 17635 (print_field_info): Use it. 17636 (HANDLE_METHOD): Clear method_printed. 17637 (method_pass): New global. 17638 (HANDLE_END_FIELD): Call add_class_decl on the first pass. 17639 (process_file): Do two passes over both fields and methods. 17640 (HANDLE_METHOD): Examine method_pass. 17641 (root): New global. 17642 (add_class_decl): New function. 17643 (print_class_decls): Don't scan over entire constant pool. 17644 176451999-02-23 Tom Tromey <tromey@cygnus.com> 17646 17647 * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and 17648 disable linking in that case. 17649 176501999-02-20 Tom Tromey <tromey@cygnus.com> 17651 17652 * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f, 17653 not 0x1f. 17654 176551999-02-21 Per Bothner <bothner@cygnus.com> 17656 17657 * decl.c (build_result_decl), java-tree.h: New method. 17658 (complete_start_java_method): Handle synchronized methods. 17659 Don't build DECL_RESULT here. (Ordering dependency problem.) 17660 (start_java_method): Call build_result_decl here instead ... 17661 * parse.y (java_complete_expand_method): ... and here. 17662 (expand_start_java_method): Don't call complete_start_java_method here. 17663 (java_complete_expand_method): Call it here instead. 17664 * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Moved to .. 17665 * java-tree.h: ... here. 17666 17667 * expr.c (force_evaluation_order): Fix typo, don't handle ARRAY_REF. 17668 * parse.y (java_complete_lhs): Don't call force_evaluation_order 17669 for ARRAY_REF - it doesn't work when array bounds are checked. 17670 (patch_array_ref): Handle it here instead. 17671 17672 * jcf-write.c (generate_classfile): Emit "Exceptions" attribute. 17673 176741999-02-19 Per Bothner <bothner@cygnus.com> 17675 17676 Force left-to-right evaluation of binary operations etc. 17677 * expr.c (force_evaluation_order), java-tree.h: New function. 17678 * parse.y (java_complete_lhs): Pass binary operations, procedure 17679 calls, and ARRAY_REFs to force_evaluation_order. 17680 (various): Set TREE_SIDE_EFFECTS more carefully. 17681 17682 Tolerate random (non-UTF8) encoding in comments without complaining. 17683 * lex.c (java_read_char): Return 0xFFFE if bad UTF8 encoding. 17684 (java_is_eol): Handle '\r' followed by '\n' instead of vice versa. 17685 17686 * parse.y (resolve_qualified_expression_name): Handle error_mark. 17687 (java_complete_node case EXPR_WITH_FILE_LOCATION): Likewise. 17688 17689 * parse.y (java_complete_lhs): Ignore an empty statement in a 17690 COMPOUND_EXPR. Don't complain about empty statement after return. 17691 176921999-02-19 Per Bothner <bothner@cygnus.com> 17693 17694 * parse.y (obtain_incomplete_type): Don't wrap unknown types 17695 in TREE_LIST - just chain the POINTER_TYPEs together. 17696 (resolve_class): If type already resolved, return decl. 17697 After resolving, update TREE_TYPE(class_type), and name (if array). 17698 * parse.h (do_resolve_class), parse.y: Make non-static. 17699 * class.c (maybe_layout_super_class): Take this_class argument. 17700 Do do_resolve_class if necessary. 17701 (layout_class, layout_class_methods): Adjust calls appropriately. 17702 * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED, 17703 JDEP_RESOLVED_P): Redefined for new TREE_LIST-less convention. 17704 * typeck.c (build_java_array_type): Don't call layout_class. 17705 177061999-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com> 17707 17708 * parse.y (check_pkg_class_access): Allow private class access 17709 within the same package. 17710 (strip_out_static_field_access_decl): New function. 17711 (patch_unaryop): Call strip_out_static_field_access_decl on ++/-- 17712 operator argument before testing its nature. 17713 177141999-02-03 Per Bothner <bothner@cygnus.com> 17715 17716 * java-tree.def (FINALLY_EXPR): Removed. (Now uses TRY_FINALLY_EXPR.) 17717 (TRY_EXPR): Simplify - it no longer has a finally clause. 17718 * check-init.c (check_init): Handle TRY_FINALLY_EXPR. 17719 Simpler handling of TRY_EXPR, which no longer has a finally clause. 17720 * expr.c (java_lang_expand_expr): Likewise. 17721 * java-tree.h (CATCH_EXPR_GET_EXPR): Removed - no longer needed. 17722 * parse.h (java_get_catch_block), parse.y: Removed - no longer needed. 17723 * parse.y (java_complete_lhs): Add support for TRY_FIANLLY_EXPR. 17724 (build_try_statement): Remove finally parameter and handling. 17725 (build_try_finally_statement): New function. 17726 (patch_try_statement): No longer need to support finally clause. 17727 (try_statement): Update grammar action rules. 17728 * jcf-write.c (generate_bytecode_insns): Handle TRY_FINALLY_EXPR. 17729 Simpler handling of TRY_EXPR, which no longer has a finally clause. 17730 177311998-11-26 Andrew Haley <aph@viagra.cygnus.co.uk> 17732 17733 * jcf-parse.c (get_constant): Add braces around computation of 'd' 17734 when REAL_ARITHMETIC is not defined. [Oct 26 fix got overwritten -PB] 17735 177361999-02-17 Andrew Haley <aph@cygnus.com> 17737 17738 * class.c (build_utf8_ref): Back out broken patch which was 17739 intended to to output signatures using '.' as a separator. 17740 17741 * class.c (make_class_data): Output signatures using '.' as a 17742 separator, rather than '/'. 17743 (mangled_classname): Likewise. 17744 (make_field_value): Likewise. 17745 (make_method_value): Likewise. 17746 * constants.c (alloc_class_constant): Likewise. 17747 * expr.c (build_invokeinterface): Likewise. 17748 177491999-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com> 17750 17751 * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid 17752 of an ancient workaround. 17753 177541999-02-10 Jeffrey A Law (law@cygnus.com) 17755 17756 * jvspec.c (xmalloc): Kill the prototype. It does not belong 17757 here anymore. 17758 177591999-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com> 17760 17761 * lex.c (yylex): Encode \0 as UTF8. 17762 177631999-02-10 Tom Tromey <tromey@cygnus.com> 17764 17765 * jvspec.c (lang_specific_driver): Use libgcj, not libjava. 17766 * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE. 17767 (libgcj_zip): Renamed. 17768 * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not 17769 LIBJAVA_ZIP_FILE. 17770 (jcf_path_init): Use LIBGCJ_ZIP_FILE. 17771 17772 * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop. 17773 (GC_NAME): Renamed -lgc to -lgcjgc. 17774 177751999-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com> 17776 17777 * lex.c (java_lang_cloneable): Initialize. 17778 * parse.y (java_lang_cloneable): New static variable. 17779 (qualify_ambiguous_name): Take CONVERT_EXPR into account when 17780 doing one more qualification round. 17781 (valid_ref_assignconv_cast_p): Reject null source or 17782 destination. Allow an array to be cast into java.lang.Cloneable. 17783 (patch_cast): Swapped two first arguments to first call to 17784 valid_ref_assignconv_cast_p. 17785 177861999-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com> 17787 17788 * parse.h: DECL_P renamed JDECL_P. 17789 * parse.y: DECL_P replaced by JDECL_P. 17790 (build_array_from_name): Always use pointer's type. 17791 (patch_bc_statement): Extra code to search continue target in a 17792 for loop. Fixed comments. Continue target is current loop when 17793 unlabeled. 17794 177951999-02-05 Andrew Haley <aph@cygnus.com> 17796 17797 * class.c (make_class_data): The superclass of an interface should 17798 be null, not class Object. 17799 17800 * lex.c (java_lex): Sign extend hex literals. 17801 178021999-02-04 Andrew Haley <aph@cygnus.com> 17803 17804 * class.c (build_utf8_ref): Output signatures using '.' as a 17805 separator, rather than '/'. 17806 (make_class_data): Likewise. 17807 178081999-02-03 Marc Espie <Marc.Espie@liafa.jussieu.fr> 17809 17810 * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and 17811 mkstemp.o. Get them from libiberty now. 17812 178131999-02-02 Jeffrey A Law (law@cygnus.com) 17814 17815 * jcf-io.c: Do not include sys/stat.h or sys/wait.h 17816 178171999-02-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 17818 17819 * jvspec.c (xmalloc): Fix the prototype to match the one obtained 17820 from libiberty.h 17821 178221999-02-02 Per Bothner <bothner@cygnus.com> 17823 17824 Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'. 17825 * jcf-write.c (generate_bytecode_return): New function. 17826 (generate_bytecode_insns): Use it, for RETURN_EXPR. 17827 17828 * jcf-write.c (generate_bytecode_insns): For REAL_CST that is 0 or 1, 17829 generate special [fd]const_[01] instructions. 17830 17831 * jcf-parse.c (yyparse): Don't emit_register_classes if -fsyntax-only. 17832 17833 * verify.c (verify_jvm_instructions): Do INVALIDATE_PC after 17834 handling OPCODE_lookupswitch or OPCODE_tableswitch. 17835 178361999-02-01 Per Bothner <bothner@cygnus.com> 17837 17838 * parse.y (patch_method_invocation): Handle calling static methods, 17839 even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS). 17840 17841 * parse.y (java_complete_lhs): Don't complain about unreachable 17842 exit condition in a do-while statement. 17843 178441999-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com> 17845 17846 * lex.c (java_read_char): Fixed utf8 decoding. 17847 (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff 17848 range. 17849 * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed 17850 comments. Local variable `all_primitive' is gone. Broadened 17851 acceptance of `0' to floating point targets. `long' can now be 17852 widened to `double' or `float'. 17853 (valid_method_invocation_conversion_p): Added leading 17854 comment. Fixed tabulation. 17855 (build_string_concatenation): Optimize out left or right empty 17856 string constants. 17857 178581999-01-28 Per Bothner <bothner@cygnus.com> 17859 17860 * jcf-write.c (localvar_alloc): Only emit entry for 17861 LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE. 17862 (generate_bytecode_insns): Only call put_linenumber if 17863 debug_info_level > DINFO_LEVEL_NONE. 17864 * jvspec.c (lang_specific_driver): If no -O* or -g* option 17865 is specified, add -g1 (for compatibility wih javac). 17866 178671999-01-28 Hans-Peter Nilsson <hp@axis.se> 17868 17869 * java/Makefile.in: Add missing dependencies for jcf-dump.o, 17870 gjavah.o, check-init.o, jv-scan.o 17871 178721999-02-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 17873 17874 * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h. 17875 17876 * gjavah.c: Include config.h and system.h. 17877 17878 * javaop.h (inline): Don't define, its handled by system.h. 17879 (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these 17880 from `inline' to `static inline'. 17881 17882 * jcf.h (inline): Don't define, its handled by system.h. 17883 17884 * lex.c (inline): Likewise. 17885 178861999-01-31 Zack Weinberg <zack@rabi.columbia.edu> 17887 17888 * lang-specs.h: Map -Qn to -fno-ident. 17889 178901999-01-29 Richard Henderson <rth@cygnus.com> 17891 17892 * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo. 17893 178941999-01-29 Tom Tromey <tromey@cygnus.com> 17895 17896 * parse.h (BUILD_APPEND): If ARG is a non-String object reference, 17897 then cast it to Object before calling `append' method. 17898 178991999-01-28 Per Bothner <bothner@cygnus.com> 17900 17901 * check-init.c (check_bool2_init, check_bool_init, check_init): 17902 Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR. 17903 * jcf-write.c (generate_bytecode_insns): Likewise. 17904 179051999-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com> 17906 17907 * jcf-parse.c (jcf_parse): Don't parse the same class file twice. 17908 * parse.y (patch_cast): Allow a boolean to be cast into a 17909 boolean. 17910 179111999-01-27 Alexandre Petit-Bianco <apbianco@cygnus.com> 17912 17913 * parse.y: (class_declaration:): Fixed indentation. 17914 (class_member_declaration:): Extra `;' after field declaration now 17915 accepted. 17916 (interface_declaration:): Removed debug messages in error reports. 17917 (patch_binop): Nodes created and returned inherit the orignal 17918 node's COMPOUND_ASSIGN_P flag value. 17919 (patch_cast): Fix cast from char to floating point. 17920 179211999-01-25 Andrew Haley <aph@cygnus.com> 17922 17923 * except.c, java-except.h (expand_resume_after_catch): new 17924 function. 17925 * expr.c (java_lang_expand_expr): call expand_resume_after_catch 17926 to branch back to main flow of control after a catch block. 17927 179281999-01-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 17929 17930 * Makefile.in (parse.o): Depend on $(CONFIG_H) and 17931 $(srcdir)/../system.h. 17932 (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h. 17933 (jcf-parse.o): Depend on $(srcdir)/../toplev.h. 17934 (jcf-write.o): Likewise. 17935 (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h. 17936 (mangle.o): Depend on $(srcdir)/../toplev.h. 17937 (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h. 17938 (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h. 17939 17940 * class.c: Include output.h and parse.h. 17941 (mangled_classname): Add the `const' keyword to a char*. 17942 (find_named_method): Hide unused function definition. 17943 (build_utf8_ref): Change type of variable `c' to unsigned char. 17944 Use ISALPHA/ISDIGIT instead of isalpha/isdigit. 17945 (build_class_ref): Add the `const' keyword to a char*. 17946 (layout_class_method): Remove unused variable `buf'. 17947 17948 * decl.c (find_local_variable): Remove unused variable `rtl'. 17949 (pushdecl): Likewise for variables `different_binding_level' and 17950 `oldglobal'. 17951 (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED. 17952 (maybe_build_cleanup): Likewise for parameter `decl'. 17953 17954 * except.c (expand_start_java_handler): Mark parameter `range' 17955 with ATTRIBUTE_UNUSED. 17956 17957 * expr.c: Include except.h. 17958 (pop_type): Remove unused variable `i'. 17959 (pop_value): Likewise for variables `n_words' and `i'. 17960 (expand_java_arrayload): Likewise for variable `convert'. 17961 (java_lang_expand_expr): Likewise for variables `op0', `type', 17962 `mode', `unsignedp', `node' and `elements'. 17963 (expand_byte_code): Likewise for variables `prev_eh_ranges' and 17964 `eh_ranges'. 17965 (process_jvm_instruction): Add a `const' qualifier to a char*. 17966 17967 * gjavah.c (output_directory): Add the `const' keyword to a char*. 17968 (temp_directory): Likewise. 17969 (print_c_decl): Likewise. 17970 (print_method_info): Likewise. 17971 (decode_signature_piece): Likewise. 17972 (print_mangled_classname): Likewise. 17973 17974 * java-except.h: Provide prototypes for maybe_start_try, 17975 maybe_end_try and add_handler. 17976 17977 * java-tree.h (mangled_classname): Add the `const' keyword to a char*. 17978 (parse_error_context): Likewise. Also add ATTRIBUTE_PRINTF_2. 17979 (pushdecl_top_level, alloc_class_constant, unicode_mangling_length, 17980 init_expr_processing, push_super_field, init_class_processing, 17981 can_widen_reference_to, class_depth, verify_jvm_instructions, 17982 maybe_pushlevels, maybe_poplevels, process_jvm_instruction, 17983 set_local_type, merge_type_state, push_type, load_type_state, 17984 add_interface, find_in_current_zip, append_gpp_mangled_classtype, 17985 emit_unicode_mangled_name): Add prototypes. 17986 17987 * jcf-dump.c (print_constant): Add the `const' keyword to a char*. 17988 (print_signature_type): Use ISDIGIT, not isdigit. 17989 (print_signature): Remove unused variable `j'. 17990 17991 * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to 17992 int when comparing against one. 17993 17994 * jcf-parse.c: Include toplev.h. 17995 17996 * jcf-write.c: Likewise. Don't include <string.h> or <sys/stat.h>. 17997 (localvar_free): Remove unused variable `i'. 17998 (generate_bytecode_conditional): Likewise for variable `kind'. 17999 18000 * jv-scan.c: Include config.h and system.h. Remove redundant 18001 OS header and gansidecl.h includes. 18002 (warning): Add the `const' keyword to a char*. Also add 18003 ATTRIBUTE_PRINTF_1 to the prototype. Check ANSI_PROTOTYPES, not 18004 __STDC__, when determining whether to use ANSI-isms. 18005 (fatal): Likewise. Also add ATTRIBUTE_UNUSED. 18006 (xmalloc): Don't redundantly prototype here. 18007 (main): Remove unused parameter `envp'. Also fix the arguments 18008 passed to function `fatal' to match the format specifier. 18009 18010 * lang.c (java_tree_code_name): Add the `const' keyword to a char*. 18011 18012 * mangle.c: Include toplev.h. 18013 (emit_unicode_mangled_name): Declare parameter `len'. 18014 18015 * parse.y (parse_warning_context): Add the `const' keyword to a 18016 char*. Also add ATTRIBUTE_PRINTF_2 to the prototype. Check 18017 `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms. 18018 (issue_warning_error_from_context): Add the `const' keyword to 18019 a char*. 18020 (parse_error_context): Likewise. Also check `ANSI_PROTOTYPES' 18021 not `__STDC__' for whether to use ANSI-isms. 18022 18023 * typeck.c (incomplete_type_error): Mark parameters `value' and 18024 `type' with ATTRIBUTE_UNUSED. 18025 (parse_signature_type): Use ISDIGIT, not isdigit. 18026 18027 * verify.c (check_pending_block): Add the `const' keyword to a char*. 18028 (verify_jvm_instructions): Likewise. Remove unused variables 18029 `field_name' and `default_val'. 18030 18031 * zextract.c: Include config.h and system.h. Remove redundant 18032 OS header includes. 18033 18034 * zipfile.h: Prototype `read_zip_archive'. 18035 180361999-01-21 Andrew Haley <aph@cygnus.com> 18037 18038 * typeck.c (convert): Allow conversions to void type: some 18039 optimizations in gcc do this. 18040 180411999-01-21 Andrew Haley <aph@cygnus.com> 18042 18043 * typeck.c (convert_ieee_real_to_integer): New function. 18044 (convert): When not using fast-math and using hardware fp, convert 18045 an IEEE NaN to zero. 18046 180471999-01-18 Andrew Haley <aph@cygnus.com> 18048 18049 * parse.y (patch_binop): Do a type conversion from signed to 18050 unsigned and then back to signed when a ">>>" is found. 18051 180521999-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com> 18053 18054 * java-tree.h: (check_for_initialization): Added prototype. 18055 * lex.c (java_parse_doc_section): `\n' breaks the `*/' string. 18056 * parse.y (do_resolve_class): Removed unused locals. 18057 (read_import_dir): Likewise. 18058 (resolve_qualified_expression_name): Array creation 18059 expressions are valid primary expressions. 18060 (qualify_ambiguous_name): Likewise. 18061 (patch_synchronized_statement): Removed unused local. 18062 180631999-01-17 Jeffrey A Law (law@cygnus.com) 18064 18065 * Makefile.in (zextract.o): Add dependencies. 18066 18067 * Makefile.in: Do not put ^Ls at the start of a line. 18068 180691999-01-15 Per Bothner <bothner@cygnus.com> 18070 18071 * expr.c (process_jvm_instruction): Coerce to correct Throwable 18072 sub-type the result of the call that gets the exception value. 18073 18074 * parse.y (java_complete_expand_methods): If flags_syntax_only, 18075 don't call finish_class. 18076 18077 * parse.y (java_check_regular_methods): If METHOD_PRIVATE, 18078 clear found before continuing. 18079 18080 * verify.c (verify_jvm_instructions): On an array load, allow 18081 and handle top of stack to be TYPE_NULL. 18082 18083 * gjavah.c (generate_access): Translate Java package private or 18084 protected access to C++ public, but with a comment. 18085 180861999-01-13 Andrew Haley <aph@cygnus.com> 18087 18088 * expr.c (generate_name): Name prefix changed to avoid clashes 18089 with assembler temp labels. 18090 18091 * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on 18092 MODIFY_EXPR. Without this, code for the assignment may not be 18093 generated at all and the synchronized statement will read an 18094 uninitialized variable. 18095 180961999-01-13 Alexandre Petit-Bianco <apbianco@cygnus.com> 18097 18098 * class.c (maybe_layout_super_class): Fixed returned value. 18099 * lex.c: Added 1999 to the copyright. 18100 (java_init_lex): Initialize java_lang_imported. 18101 * lex.h: Added 1999 to the copyright. 18102 * parse.h: Added 1999 to the copyright. 18103 (REGISTER_IMPORT): Fixed typo in trailing macro. 18104 (CURRENT_OSB): New macro. 18105 (struct parser_ctxt): New fields osb_depth, osb_limit. 18106 * parse.y (java_lang_id): New global variable. 18107 (type_import_on_demand_declaration): Don't import java.lang.* twice. 18108 (array_creation_expression:): Use CURRENT_OSB. 18109 (dims:): Uses a stack to keep track of array dimensions. 18110 (cast_expression:): Use CURRENT_OSB. 18111 (find_expr_with_wfl): Return NULL if node found doesn't meet the 18112 conditions. 18113 (register_fields): Fixed typos in comment. 18114 (check_method_redefinition): Fixed comment indentation. 18115 (java_check_regular_methods): Set saved found wfl to NULL after 18116 having reinstalled it in the previously found DECL_NAME. 18117 181181999-01-10 Richard Henderson <rth@cygnus.com> 18119 18120 * gjavah.c (java_float_finite): Use a union to do type punning. 18121 (java_double_finite): Likewise. 18122 181231999-01-09 Per Bothner <bothner@cygnus.com> 18124 18125 * parse.y (build_new_array_init): Don't set EXPR_WFL_LINECOL 18126 on CONSTRUCTOR (since that trashes TREE_CST_RTL). 18127 (patch_new_array_init): Clear TREE_CONSTANT also if INDIRECT_REF. 18128 (register_fields): Set TREE_STATIC on NEW_ARRAY_INIT, not on 18129 CONSTRUCTOR (which causes expand_expr to call output_constant_def). 18130 * expr.c (java_lang_expand_expr): Check TREE_STATIC of NEW_ARRAY_INIT. 18131 181321999-01-08 Per Bothner <bothner@cygnus.com> 18133 18134 * check-init.c (check_init): If compiling to native, we don't 18135 see THROW_EXPR. Instead, look for a call to throw_node (_Jv_Throw). 18136 181371999-01-08 Tom Tromey <tromey@cygnus.com> 18138 18139 * parse-scan.y (variable_declarator_id): Set or increment 18140 bracket_count. 18141 (bracket_count): New global. 18142 (formal_parameter): Handle case where bracket pairs trail variable 18143 declarator id. 18144 181451999-01-07 Andrew Haley <aph@viagra.cygnus.co.uk> 18146 18147 * jcf-parse.c (yyparse): variable len changed from a char to an 18148 int to prevent overflow. 18149 181501999-01-06 Per Bothner <bothner@cygnus.com> 18151 18152 * java-tree.h: Declare read_class. 18153 * jcf-parse.c (read_class): New function. 18154 (load_class): Now just call read_class. 18155 18156 * java-tree.h (java_parse_abort_on_error): Only return if new errors. 18157 * jcf-parse.c (parse_source_file): Declare save_error_count, 18158 which is needed by java_parse_abort_on_error macro, 18159 * parse.y (java_layout_classes, java_expand_classes): Likewise. 18160 18161 * parse.y (register_fields): Set TREE_STATIC flag of NEW_ARRAY_INIT 18162 constructor, if initializing a static field. 18163 (patch_new_array_init): Set TREE_CONSTANT if it is. 18164 * expr.c (java_lang_expand_expr): For a static array constructor 18165 of primitive elements, allocate the array itself statically. 18166 Disabled until we can set the vtable field statically. 18167 18168 * check-init.c: New file. Checks for definite assignment. 18169 * Makefile.in (JAVA_OBJS): Add check-init.o. 18170 * parse.y (java_complete_expand_method): Call check_for_initialization. 18171 * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY): Moved to java-tree.h. 18172 181731999-01-06 Graham <grahams@rcp.co.uk> 18174 18175 * parse.y : include system.h instead of including 18176 standard headers directly with the exception of <dirent.h>. 18177 181781999-01-06 Per Bothner <bothner@cygnus.com> 18179 18180 * lex.h: Moved static function declarations to lex.c, 18181 to shut up some -Wall warnings. 18182 * lex.c: Static function declarations moved here. 18183 * jcf-dump.c: Small fixes to shut up -Wall warnings. 18184 181851999-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 18186 18187 * Make-lang.in ($(GCJ).o): Depend on prefix.h. 18188 181891998-12-22 Per Bothner <bothner@cygnus.com> 18190 18191 * expr.c (process_jvm_instruction): Do load_type_state after JSR. 18192 * verify.c (verify_jvm_instructions): Fix off-by-one error. 18193 18194 * jcf-write.c (CHECK_PUT): Add (void) cast to avoid -Wall warnings. 18195 (localvar_alloc): Change return type to void, 18196 (emit_unop): Remove unused variable size. 18197 18198 * jcf-write.c (struct jcf_block): Add new union. 18199 (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC): New macros. 18200 (call_cleanups): New functions. 18201 (struct jcf_partial): New fields num_finalizers and return_value_decl. 18202 (generate_bytecode_insns): Support CLEANUP_POINT_EXPR and 18203 WITH_CLEANUP_EXPR. Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR. 18204 * lang.c (lang_init): Call using_eh_for_cleanups. 18205 * parse.y (java_complete_lhs): For SYNCHRONIZED_EXPR, defer 18206 completing operands to patch_synchronized_statement. 18207 Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR. 18208 (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and 18209 WITH_CLEANUP_EXPR instead of TRY_EXPR. 18210 182111998-12-20 John F. Carr <jfc@mit.edu> 18212 18213 * Make-lang.in: Comment out control-Ls; they upset some makes. 18214 182151998-12-18 Tom Tromey <tromey@cygnus.com> 18216 18217 * parse.y (check_class_interface_creation): Use DIR_SEPARATOR 18218 consistently. 18219 182201998-12-17 Tom Tromey <tromey@cygnus.com> 18221 18222 * parse.y (DIR_SEPARATOR): New define. 18223 (check_class_interface_creation): Use it. 18224 18225 * parse-scan.y (report_main_declaration): Recognize 18226 `java.lang.String' in argument to main. 18227 182281998-12-16 Per Bothner <bothner@cygnus.com> 18229 18230 * parse.y (create_interface): Remove bogus test. 18231 182321998-12-16 Per Bothner <bothner@cygnus.com> 18233 18234 * jcf-parse.c (get_constant): Set TREE_TYPE for string constants. 18235 (HANDLE_CONSTANTVALUE): If flag_emit_class_files, call get_constant. 18236 182371998-12-16 Tom Tromey <tromey@cygnus.com> 18238 18239 * parse-scan.y (qualified_name): Use correct sprintf format. 18240 182411998-12-15 Tom Tromey <tromey@cygnus.com> 18242 18243 * gjavah.c (print_field_info): Changed how most negative number is 18244 printed. 18245 182461998-12-14 Per Bothner <bothner@cygnus.com> 18247 18248 * parse.y (fold_constant_for_init): New function. 18249 (resolve_expression_name): Don't replace static final 18250 constant-initialized fields by its value. 18251 (java_complete_lhs): New. Same as java_complete_tree, except does 18252 not replace static final constant-initialized fields by their values. 18253 (register_fields): If there is an initializer, set DECL_INITIAL and 18254 MODIFY_EXPR_FROM_INITIALIZATION_P. 18255 (java_complete_tree): For MODIFY_EXPR, use java_complete_lhs for lhs. 18256 Only call patch_initialized_static_field if 18257 MODIFY_EXPR_FROM_INITIALIZATION_P. 18258 (patch_initialized_static_field): If not valid constant, clear 18259 DECL_INITIAL. 18260 18261 * parse.y (lookup_field_wrapper): Fix thinko. 18262 18263 * parse.y (java_complete_tree): In EXPR_WITH_FILE_LOCATION, 18264 set and restore global lineno. 18265 182661998-12-14 Tom Tromey <tromey@cygnus.com> 18267 18268 * gjavah.c (print_field_info): If value to print is the smallest 18269 value of its size, then print as hex to avoid later warnings from 18270 C++ compiler. 18271 182721998-12-14 Tom Tromey <tromey@cygnus.com> 18273 18274 * gjavah.c (decompile_method): Decompile `return null'. 18275 (process_file): Generate `#pragma interface'. 18276 (method_declared): New global. 18277 (print_method_info): Set it. 18278 (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set. 18279 (print_method_info): Handle abstract methods. 18280 182811998-12-13 Per Bothner <bothner@cygnus.com> 18282 18283 * parse.y (patch_method_invocation): If class_decl is null 18284 (e.g. an array type), use original type. 18285 18286 * parse.y (check_thrown_exceptions): Temporary hack to suppress 18287 errors about uncaught exception from clone (of array, specifically). 18288 182891998-12-13 Tom Tromey <tromey@cygnus.com> 18290 18291 * gjavah.c (decompile_method): Handle all types of `return' 18292 opcode. Decompile `return this' and `return'. 18293 (method_access): New global. 18294 (print_method_info): Set it. 18295 (decompile_method): Don't decompile a synchronized method. 18296 182971998-12-13 Tom Tromey <tromey@cygnus.com> 18298 18299 * jcf-reader.c (jcf_parse_one_method): Recognize 18300 HANDLE_END_METHOD. 18301 * gjavah.c (HANDLE_END_METHOD): New macro. 18302 (HANDLE_CODE_ATTRIBUTE): New macro. 18303 (decompile_method): New function. 18304 (print_method_info): Don't print `;\n' at end of function decl. 18305 Include java-opcodes.h. 18306 (decompiled): New global. 18307 183081998-12-12 Per Bothner <bothner@cygnus.com> 18309 18310 * class.c (build_class_ref): Handle PRIMTYPE.class if 18311 flag_emit_class_files. 18312 * expr.c (expand_java_field_op): Don't optimize java.lang.XXX.TYPE 18313 if flag_emit_class_files. 18314 * parse.y (java_complete_tree): Pre-liminary support for 18315 COMPONENT_REF - only to handle PRIMCLASS.TYPE. 18316 18317 * parse.y (patch_synchronized_statement): Don't call monitorexit 18318 unless block CAN_COMPLETE_NORMALLY. Propagate that flag properly. 18319 18320 * java-tree.h (DECL_LOCAL_STATIC_VALUE): Removed - no longer used. 18321 18322 * zipfile.h (opendir_in_zip): New declaration. 18323 * jcf-io.c (saw_java_source): Moved to jcf-parse.c. 18324 (opendir_in_zip): New function, using code from open_in_zip. 18325 (open_in_zip): Call opendir_in_zip. 18326 (find_class): Remove no-longer-used do_class_file parameter, 18327 but add source_ok parameter. Change logic so if we find a .java file, 18328 we don't look for .class in later classpath emtries. 18329 * jcf-parse.c (load_class): Pass saw_java_source to find_class. 18330 (jcf_figure_file_type): Only call open_in_zip if correct magic number. 18331 * gjavah.c: Update call to find_class. 18332 * jcf-dump.c: Likewise. 18333 18334 * jcf-write.c (put_linenumber): Handle duplicate line numbers. 18335 (generate_bytecode_insns): For EXPR_WITH_FILE_LOCATION, do 18336 nothing if body is empty_stmt_node. 18337 Various little fixes so SP gets correctly adjusted. 18338 For NEW_ARRAY_INIT, handle IGNORE_TARGET. 18339 For CALL_EXPR, test if static first. 18340 (generate_classfile): Ignore fields that are DECL_ARTIFICIAL, 18341 such as the ones we create for Object and Class. 18342 Set and restore current_function_decl. 18343 * parse.y: Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir. 18344 (note_possible_classname): New function. 18345 (read_import_entry): Removed. Merged with read_import_dir. 18346 (read_import_dir): Don't call find_class - that only gives us 18347 the first classpath entry having the needed package. 18348 Use the struct buffer data structure from buffer.h. 18349 (read_import_dir, find_in_imports_on_demand): The remembered 18350 class names now use '.' (not '/') as package separator. 18351 18352 * parse.y (java_complete_expand_methods): Call write_classfile 18353 here, and not in java_expand_classes (which only gets first class). 18354 183551998-12-12 Alexandre Petit-Bianco <apbianco@cygnus.com> 18356 18357 * parse.y (<type_declaration>): Do maybe_generate_clinit last. 18358 (register_fields): If a static fields has an initializer, just 18359 chain it on ctxp->static_initialized, and handle later. 18360 (java_complete_expand_methods): Force <clinit> first. 18361 (resolve_expression_name, resolve_field_access): Just get DECL_INITIAL 18362 - it's already been completed. 18363 (patch_initialized_static_field): New function. 18364 (java_complete_field): Call it. 18365 183661998-12-12 Per Bothner <bothner@cygnus.com> 18367 18368 * expr.c (encode_newarray_type, build_new_array): New functions. 18369 * java-tree.h: Declare build_new_array. 18370 * jcf-write.c (patch_newarray): Use build_new_array. 18371 18372 * expr.c (java_lang_expand_exp): Support NEW_ARRAY_INIT. 18373 * jcf-write.c (generate_bytecode_insns): Support NEW_ARRAY_INIT. 18374 18375 * parse.y (patch_new_array_init): Re-organize. 18376 Now is passed the actual array (pointer) type of the value. 18377 Set the type of the CONSTRUCTOR to be an ARRAY_TYPE. 18378 (patch_array_constructor): Removed - merged into patch_new_array_init. 18379 (java_complete_tree): Update patch_new_array_init. 18380 18381 * jcf-write.c (find_constant_index): New function. 18382 (generate_bytecode_insns): Use find_constant_index. 18383 (generate_classfile): Use find_constant_index for ConstantValue. 18384 183851998-12-11 Tom Tromey <tromey@cygnus.com> 18386 18387 * expr.c (invoke_build_dtable): Renamed dtable -> vtable. 18388 * decl.c (init_decl_processing): Renamed dtable -> vtable. 18389 * class.c (make_class_data): Renamed dtable -> vtable, and 18390 dtable_method_count -> vtable_method_count. 18391 183921998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com> 18393 18394 * decl.c (long_zero_node, float_zero_node, double_zero_node): New 18395 global variables, initialized. 18396 * java-tree.h (long_zero_node, float_zero_node, double_zero_node): 18397 Declared new global variables. 18398 * lex.c (java_lex): Return long_zero_node, float_zero_node, 18399 double_zero_node, integer_zero_node upon direct matching. 18400 * parse.y (purify_type_name): Added function prototype. 18401 (duplicate_declaration_error_p): Consider new_type as potentially 18402 being a incomplete type. Use purify_type_name on type string. 18403 (method_header): saved_type: unused variable removed. Don't figure 18404 return type if method name is invalid. 18405 (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was 18406 processed by patch_unaryop. 18407 (patch_unaryop): Fixed typo in comment. Re-convert pre/post 18408 increment/decrement node into its original type after binary 18409 numeric promotion on its operands. 18410 184111998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com> 18412 18413 * parse.y (array_initializer:): Array init operand is NULL_TREE 18414 instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is 18415 now an error. Fixed indentation problems. 18416 (patch_string): Handle error_mark_node as an argument. 18417 (patch_new_array_init): Fixed indentation problems. 18418 (array_constructor_check_entry): Removed check on null wfl_value. 18419 Return an error if wfl_value's walk returns an error. 18420 184211998-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com> 18422 18423 * java-tree.def (NEW_ARRAY_INIT): New Java tree code. 18424 * lex.c (java_lex): Remember column position before advancing one 18425 token. Retain location information on OCB_TK. 18426 * lex.h (typedef struct java_lc): Added new field. 18427 * parse.h (GET_SKIP_TYPE): New macro. 18428 (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE. 18429 * parse.y (build_new_array_init, patch_new_array_init, 18430 patch_array_constructor, maybe_build_array_element_wfl, 18431 array_constructor_check_entry): New function prototypes. 18432 (switch_block:): Tagged <node>. 18433 (OCB_TK): Tagged <operator>. 18434 (array_initializer:): Installed actions. 18435 (variable_initializer): Build location information on element if 18436 necessary. 18437 (switch_statement:): Fixed indentation typo. 18438 (switch_block:): Redefined default action. 18439 (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:. 18440 (patch_assignment): Removed duplicate code. 18441 (maybe_build_array_element_wfl, build_new_array_init, 18442 patch_new_array_init, patch_array_constructor, 18443 array_constructor_check_entry): New functions. 18444 184451998-12-07 Alexandre Petit-Bianco <apbianco@cygnus.com> 18446 18447 * parse.y (array_initializer): Tagged <node>. 18448 (variable_initializer:): Use default rule. 18449 (array_initializer:): Defined actions. 18450 (variable_initializers:): Likewise. 18451 (resolve_qualified_expression_name): Use DECL_CONTEXT to build 18452 non-static field accesses. 18453 (patch_invoke): Fixed indentation typo. 18454 (java_complete_tree): Likewise. 18455 (build_labeled_block): Changed leading comment. Generate an error 18456 in case of duplicate loop labels. 18457 (patch_conditional_expr): Patch results of string concatenation 18458 operations. 18459 184601998-12-06 Per Bothner <bothner@cygnus.com> 18461 18462 * constants.c (find_methodref_index): When the class is an interface, 18463 generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef. 18464 18465 * decl.c (finit_identifier_node): Use "$finit$", rather than 18466 "<finit>" (which Sun's verifier rejects). 18467 * parse.y (maybe_generate_finit): Leave out meaningless final flag. 18468 (generate_field_initialization_code): Removed. 18469 (fix_constructors) Don't add call to $finit$ here (wrong order). 18470 (patch_method_invocation): Add $finit$ call here. 18471 18472 * java-tree.h (CALL_USING_SUPER): New macro. 18473 * parse.y (patch_invoke): Remove im local variable. 18474 (patch_method_invocation, patch_invoke): Don't pass super parameter. 18475 (patch_invoke): Use CALL_USING_SUPER instead of from_super parameter. 18476 (resolve_qualified_expression_name): Maybe set CALL_USING_SUPER. 18477 18478 * jcf-write.c (get_access_flags): Fix typo ACC_PUBLIC -> ACC_FINAL. 18479 18480 * parse.y (java_complete_tree): Don't complain about unreachable 18481 statement if it is empty_stmt_node. 18482 18483 * jcf-write.c (find_constant_wide): New function. 18484 (push_long_const): Use find_constant_wide. 18485 18486 * jcf-write.c (generate_bytecode_insn): Fix bug in switch handling. 18487 (generate_bytecode_insn): Use correct dup variant for MODIFY_EXPR. 18488 Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set. 18489 Emit invokeinterface when calling an interface method. 18490 Emit invokespecial also when calling super or private methods. 18491 18492 * jcf-write.c (generate_classfile): Emit ConstantValue attributes. 18493 184941998-12-06 Per Bothner <bothner@cygnus.com> 18495 18496 * jcf-dump.c (INVOKE): If invokeinterface, print number of args. 18497 184981998-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com> 18499 18500 * java-tree.h (java_layout_seen_class_methods): New function 18501 prototype. 18502 (LAYOUT_SEEN_CLASS_METHODS): Macro removed. 18503 * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods. 18504 * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro. 18505 * parse.y (method_declarator:): Defined action. 18506 (issue_warning_error_from_context): input_filename saved, set to 18507 the appropriate value and restored after java_error is called. 18508 (build_unresolved_array_type): Fixed comment. 18509 (register_fields): Use PROMOTE_RECORD_IF_COMPLETE. 18510 (method_header): Deal with return type the same way type are 18511 handled for fields and method's parameters and local variables 18512 types are handled. 18513 (check_method_redefinition): Removed extra CR. 18514 (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE. 18515 (java_layout_seen_class_methods): New function. 18516 (java_layout_classes): Call java_layout_seen_class_methods. 18517 185181998-12-03 Per Bothner <bothner@cygnus.com> 18519 18520 * parse,y (patch_synchronized_statement): Set CAN_COMPLETE_NORMALLY. 18521 185221998-12-03 Per Bothner <bothner@cygnus.com> 18523 18524 * jcf-dump.c (main): Fix error message. 18525 * jcf-path.c (add_entry): Style fix. 18526 185271998-12-02 Alexandre Petit-Bianco <apbianco@cygnus.com> 18528 18529 * class.c (layout_class_method): Call build_java_argument_signature 18530 on constructors too. 18531 * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE. 18532 (patch_method_invocation): Define a primary when resolving an 18533 expression name. Augmented comment on code checking illegal `this' 18534 usage. Loosened it test by accepting NEW_CLASS_EXPR. 18535 185361998-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com> 18537 18538 * class.c (layout_class_method): Don't report error on non-static 18539 overriding static if the method is private. 18540 * java-tree.h (finish_class): Prototype added. 18541 * lex.c (java_get_line_col): Handle col argument -2 value. 18542 * parse.h: All static method declarations moved to parse.y. 18543 * parse.y: Now contains all static method declarations previously 18544 found in parse.h. 18545 (find_expr_with_wfl, missing_return_error, 18546 unreachable_stmt_error): New functions. 18547 (java_get_real_method_name): Identify constructors bearing class 18548 names in source code compiled classes only. 18549 (java_complete_expand_methods): Call missing_return_error. 18550 (invocation_mode): Private methods invoked as static methods. 18551 (java_complete_tree): Call unreachable_stmt_error. 18552 185531998-12-01 Tom Tromey <tromey@cygnus.com> 18554 18555 * Makefile.in (+target): Removed. 18556 (+xmake_file): Likewise. 18557 (+tmake_file): Likewise. 18558 (.NOEXPORT): Removed duplicate. 18559 185601998-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 18561 18562 * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK). 18563 18564 * jv-scan.c: Fix xmalloc prototype. Provide an xmalloc definition. 18565 18566 * jvgenmain.c: Remove the xmalloc prototype, we get it from 18567 libiberty.h. Provide an xmalloc definition. 18568 18569 * jvspec.c: Remove the xmalloc prototype. 18570 18571 * parse-scan.y: Include config.h and system.h. Don't include 18572 OS headers or gansidecl.h. Don't prototype xmalloc/xstrdup. 18573 Provide an xstrdup definition. 18574 185751998-11-26 Alexandre Oliva <oliva@dcc.unicamp.br> 18576 18577 * jcf-path.c (add_entry): Recognize ".jar" too. 18578 * lang-specs.h: Likewise. 18579 185801998-11-26 Per Bothner <bothner@cygnus.com> 18581 18582 * jcf-write.c (generate_bytecode_insns): In Call_EXPR, handle 18583 soft_monitorenter_node, soft_monitorexit_node, throw_node. 18584 18585 * jcf-write.c (generate_bytecode_insns): 18586 Handle pre/post-increment/decrement of long. 18587 18588 * jcf-write.c (generate_bytecode_insns): 18589 Handle missing exception handler (finally for synchronized). 18590 185911998-11-25 Per Bothner <bothner@cygnus.com> 18592 18593 * java-tree.h (end_params_node): Declare global. 18594 * decl.c (end_params_node): New global. 18595 (init_decl_processing, start_java_method): Use end_params_node for 18596 end of list of parameter types. Follows correct gcc conventions. 18597 * expr.c (pop_argument_types, pop_arguments): Likewise. 18598 * lang.c (put_decl_node): Likewise. 18599 * typeck.c (various places): Likewise. 18600 * class.y (various places): Likewise. 18601 * parse.y (various places): Likewise. 18602 18603 * parse.y (java_complete_tree): Move CAN_COMPLETE_NORMALLY. 18604 (build_jump_to_finally): Add missing CAN_COMPLETE_NORMALLY. 18605 18606 * class.c: Add #include flags.h, remove no-longer needed declaration. 18607 18608 * class.c (layout_class_method): Remove commented-out code, re-format. 18609 Don't add vtable entry (or index) for private methods. 18610 * expr.c (expand_invoke): A private method is implicitly final. 18611 * class.c (make_class_data): If inlining or optimizing, 18612 skip private methods. 18613 18614 * class.c (finish_class): New function. Calls existing methods, 18615 but alls emits deferred inline functions. 18616 * jcf-parse.c (parse_class_file): Call finish_class. 18617 * parse.y (java_complete_expand_methods): Likewise. 18618 18619 * expr.c (build_java_binop): Explicit default, to silence -Wall. 18620 18621 * expr.c (CHECK_PC_IN_RANGE): Add void cast to kill warnings. 18622 186231998-11-25 Marc Espie <espie@quatramaran.ens.fr> 18624 18625 * jcf-write.c (generate_bytecode_conditional): Fix typo. 18626 186271998-11-24 Per Bothner <bothner@cygnus.com> 18628 18629 * (generate_classfile): Always write class access flag with 18630 ACC_SUPER set. 18631 186321998-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com> 18633 18634 * class.c (maybe_layout_super_class): New function. 18635 (layout_class): Reorganized. Loop on class methods dispatched into 18636 a new function. Call maybe_layout_super_class. 18637 (layout_class_methods, layout_class_method): New functions. 18638 * expr.c (expand_java_NEW): Call layout_class_methods on loaded 18639 class. 18640 (expand_invoke): Likewise. 18641 * java-tree.h (all_class_list): New global variable declared. 18642 (layout_class_methods, layout_class_method): New function 18643 prototypes. 18644 (LAYOUT_SEEN_CLASS_METHODS): New macro. 18645 * jcf-parse.c (all_class_list): New global variable. 18646 (load_class): Extended what class_or_name can be. Use parser 18647 context mechanism to save globals before calling jcf_parse. 18648 (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P 18649 is set on the file name. 18650 (jcf_parse): Layout class methods when Object is loaded, otherwise 18651 record class in all_class_list for delayed method layout. 18652 (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS. 18653 * lang.c (put_decl_node): Decode <init> into the decl context 18654 class name. 18655 * lex.c (java_allocate_new_line): Use xmalloc. 18656 * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete 18657 pointers, not TREE_LIST elements. 18658 (struct parser_ctxt): Fixed comment indentations, added comments 18659 and reordered some fields. 18660 (java_check_methods): Function prototype removed. 18661 * parse.y (java_push_parser_context): Use xmalloc. 18662 (java_parser_context_restore_global): Pop extra pushed ctxp only 18663 when there's nothing next. 18664 (maybe_create_class_interface_decl): Fixed comment, add new 18665 created class decl to all_class_list. 18666 (method_header): Use GET_REAL_TYPE on argument's types. 18667 (method_declarator): Use GET_REAL_TYPE, change type to the real 18668 type in TREE_LIST dependency node. Build argument list with the 18669 real type. 18670 (create_jdep_list): Use xmalloc. Removed allocation error message. 18671 (obtain_incomplete_type): Fixed leading comment. Broadened 18672 incoming argument meaning. 18673 (register_incomplete_type): Use xmalloc. Removed allocation error 18674 message. 18675 (safe_layout_class): Fixed leading comment. 18676 (jdep_resolve_class): Reversed if statement condition and switch 18677 if and else bodies. 18678 (resolve_and_layout): Fixed leading comment. Broadened incoming 18679 argument meaning. 18680 (complete_class_report_errors): New local variable name, for 18681 clarity. purify_type_name used for all error cases. 18682 (java_get_real_method_name): Stricter check on constructors. 18683 (java_check_regular_methods): Reverse methods list only if not 18684 already laid out. Layout artificial constructor. 18685 (java_check_methods): Deleted. 18686 (source_start_java_method): Obtain incomplete type for patchable 18687 method arguments. 18688 (java_layout_classes): Fixed leading comment. Use 18689 LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else 18690 statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS 18691 before returning. Fixed comments. 18692 (java_expand_classes): Check for errors up front. 18693 (patch_method_invocation): Class to search is resolved and laid 18694 out. 18695 186961998-11-24 Per Bothner <bothner@cygnus.com> 18697 18698 * expr.c (java_lang_expand_expr): Add missing emit_queue. 18699 18700 * javaop.h (int8): Removed - not used. 18701 (jbyte): Redefine portably with correct signedness. 18702 18703 * jcf-write.c (generate_bytecode_insns): Don't free sw_state.cases. 18704 18705 * jcf-write.c (generate_bytecode_insns): Fix typo 18706 OPCODE_getstatic to OPCODE_getfield. 18707 18708 * java-tree.def (CASE_EXPR, DEFAULT_EXPR): Kind is 'x', not '1'. 18709 * parse.y (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR, 18710 set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them). 18711 187121998-11-19 Alexandre Petit-Bianco <apbianco@cygnus.com> 18713 18714 * jcf-parse.c (jcf_parse_source): Function returned type is 18715 void. Added prototype. 18716 (jcf_parse): Function returned type is void. 18717 (yyparse): Remove call to fclose on the last parsed file. 18718 18719 * java-tree.h (jcf_parse): Changed jcf_parse prototype. 18720 187211998-11-18 Alexandre Petit-Bianco <apbianco@cygnus.com> 18722 18723 * class.c (unmangle_classname): Set QUALIFIED_P when appropriate. 18724 (layout_class): Cope with methods featuring WFL in decl names. 18725 * decl.c (unqualified_object_id_node): New global variable, 18726 initialized. 18727 (build_decl_no_layout): Removed. 18728 * expr.c (build_primtype_type_ref): Handle Double. 18729 (java_lang_expand_expr): Fixed indentations. 18730 * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted. 18731 (flag_wall, flag_redundant, flag_not_overriding, 18732 flag_static_local_jdk1_1, unqualified_object_id_node): Global 18733 variable declarations. 18734 (build_decl_no_layout): Removed prototype. 18735 (java_get_real_method_name): Added prototype. 18736 (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P. 18737 (java_parse_abort_on_error): Macro now just returns. 18738 * jcf-parse.c (jcf_parse_source): Check fclose returned 18739 value. Call emit_register_classes if java_report_errors returns 18740 zero. 18741 * lanc.c (flag_wall, flag_redundant, flag_not_overriding, 18742 flag_static_local_jdk1_1): New integer flags. 18743 (lang_decode_option): New flags set here. 18744 * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros. 18745 (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to 18746 the flag_redundant variable. 18747 (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object 18748 when parsing java.lang.Object class. 18749 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal 18750 NULL_TREE to build. 18751 (resolve_qualified_expression_name): Fixed indentation. 18752 (patch_array_ref): Changed prototype. 18753 (not_initialized_as_it_should_p): Prototype removed. 18754 (java_report_errors): Added function prototype. 18755 * parse.y (formal_parameter:): Changed error message for not yet 18756 supported final parameters. 18757 (class_type_list:): Set both PURPOSE and VALUE of created 18758 TREE_LIST to be class_type. 18759 (primary_no_new_array:): Handle class literals on primitive types. 18760 (parse_warning_context): Reinstalled correct force_error and 18761 do_warning flags setups. 18762 (java_report_errors): Changed prototype. Return java_error_count 18763 value. 18764 (variable_redefinition_error): Consider treating variable type as 18765 a fake pointer. 18766 (create_interface): Warn about redundant abstract modifier if 18767 flag_redundant is set. Changed error message. 18768 (lookup_field_wrapper): Save/restore globals before/after looking 18769 up field. 18770 (duplicate_declaration_error_p): Consider treating declaration 18771 type as a fake pointer. 18772 (register_fields): Extract real type from dependency node. Check 18773 for duplicate field declaration after type adjustment. Use 18774 DECL_INITIAL to store static final initialized values. 18775 (method_header): Extract real function type from dependency node. 18776 (check_abstract_method_header): Use GET_METHOD_NAME. 18777 (obtain_incomplete_type): Layout fake pointer type. 18778 (safe_layout_class): Don't try to check for methods before layout. 18779 (java_complete_class): Don't check for correct throws clause 18780 elements inheritance here. 18781 (resolve_and_layout): Broadened name parameter meaning. 18782 (reset_method_name): Use GET_METHOD_NAME. 18783 (java_get_real_method_name): New function. 18784 (java_check_regular_methods): Don't check methods in 18785 java.lang.Object. Verify lineage of throws clause elements. Use 18786 flag_no_overriding in warning report. 18787 (check_throws_clauses): Don't check if class was from 18788 bytecode. Use IS_UNCHECKED_EXCEPTION_P macro. 18789 (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag. 18790 (declare_local_variables): Use flag_static_local_jdk1_1 to report 18791 warning on unsupported final local variables. Use build_decl 18792 instead of build_decl_no_layout. Get real local variable type from 18793 dependency node. 18794 (source_start_java_method): Get real parameter type from 18795 dependency node. Call build_decl instead of build_decl_no_layout. 18796 (java_layout_classes): Reverse tree and layout type and class as 18797 required. Mark class as loaded when done. 18798 (resolve_field_access): Fixed indentation. Restricted condition 18799 leading to static field access code generation. Set field_type 18800 decl's TREE_TYPE if QUAL_DECL_TYPE not available. 18801 (resolve_qualified_expression_name): Initialize type_found to 18802 null. Handle static field resolved during qualification. Fixed 18803 layout on non primitive field decl types. 18804 (not_accessible_p): Fixed typo in comment. 18805 (patch_method_invocation): Resolve and layout class to search from 18806 type. 18807 (lookup_method_invoke): Keep integer constant 0 as is. Resolve and 18808 layout non primitive type, if necessary. Make method node only to 18809 report errors. 18810 (find_applicable_accessible_methods_list): Consider WFL'ed method 18811 decl names. Fixed indentation. 18812 (argument_types_convertible): Resolve and layout target type if 18813 necessary. 18814 (java_complete_tree): Fixed indentation problems. Rewrote 18815 CALL_EXPR thrown exceptions check. Re-installed further processing 18816 of the assignment in certain cases. 18817 (patch_assignment): Call maybe_build_primttype_type_ref to perform 18818 inlining on class literals. 18819 (valid_builtin_assignconv_identity_widening_p): Cope with constant 18820 0 literal. 18821 (valid_method_invocation_conversion_p): Likewise. 18822 (patch_string): Temporary disable forbidden use of `this' in 18823 explicit constructor invocations when doing string concatenation 18824 within their scope. 18825 (patch_unaryop): Added comment. Reinstalled code to disable 18826 further check on assignment operation with cast expression RHS. 18827 (patch_switch_statement): Fixed indentation. 18828 (build_try_statement): Call build_decl instead of 18829 build_decl_no_layout. 18830 (patch_synchronized_statement): Likewise. 18831 (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of 18832 IS_UNCHECKED_EXPRESSION_P. 18833 (check_thrown_exceptions_do): Changed leading comment. Resolve and 18834 layout argument exception type. 18835 (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead 18836 of IS_UNCHECKED_EXPRESSION_P. 18837 188381998-11-18 Anthony Green <green@cygnus.com> 18839 18840 * jcf-parse.c (yyparse): Open class file in binary mode. 18841 188421998-11-15 Per Bothner <bothner@cygnus.com> 18843 18844 * jvgenmain.c: Need to #include "gansidecl.h" (to get PROTO). 18845 18846 * jcf-write.c (perform_relocations): Move check out one loop. 18847 188481998-11-15 Anthony Green <green@hoser.cygnus.com> 18849 18850 * Make-lang.in: Fix reference to srcdir. 18851 * jv-scan.c: Add missing xmalloc prototype. 18852 * jvgenmain.c: Ditto. 18853 188541998-11-15 Per Bothner <bothner@cygnus.com> 18855 18856 * decl.c (error_mark_node), java-tree.h: New global. 18857 * parse.y: Use empty_stmt_node instead of size_zero_node. 18858 (build_if_else_statement): If missing else, use empty_stmt_node. 18859 18860 * parse.y (not_initialized_as_it_should_p): Removed, with its callers. 18861 (java_complete_expand_method): Complain if return is missing. 18862 (java_check_regular_methods): Comment out incorrect error check. 18863 (not_accessible_p): Fix incorrect handling of protected methods. 18864 (patch_method_invocation): Pass correct context to not_accessible_p. 18865 (find_applicable_accessible_methods_list): Likewise. 18866 (qualify_ambiguous_name): If ARRAY_REF, it's an expression name. 18867 (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR, set 18868 TREE_TYPE (to void_type_node); otherwise expand_expr crashes. 18869 (patch_if_else_statement): Fix setting of CAN_COMPLETE_NORMALLY. 18870 18871 * jcf-write.c (CHECK_OP, CHECK_PUT): Add some error checking. 18872 (push_int_const): Remove reundant NOTE_PUSH. 18873 (generate_bytecode_insns - case STRING_CST): Do NOTE_PUSH. 18874 (- case SWITCH_EXPR): Fix code generation bug. 18875 (- case PREDECREMENT_EXPR etc): Remove redundant NOTE_PUSH. 18876 (generate_classfile): More robust for abstract methods. 18877 188781998-11-15 Anthony Green <green@cygnus.com> 18879 18880 * Makefile.in: jv-scan and jvgenmain all require libiberty. 18881 * Make-lang.in: Ditto. 18882 18883 * jv-scan.c: Remove xmalloc and xstrdup definitions. 18884 * jvgenmain: Ditto. 18885 188861998-11-15 Per Bothner <bothner@cygnus.com> 18887 18888 * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): New macro. 18889 18890 * jcf-io.c (find_class): Simpler/cleaner structure fixes a bug. 18891 188921998-11-14 Per Bothner <bothner@cygnus.com> 18893 18894 Allow uses of interface types to verify. This is not really 18895 type-safe, but it matches what Sun does, and is OK as long as 18896 there are appropriate run-time checks. 18897 * verify.c (merge_types): If merging two interface types, 18898 just set the result to java.lang.Object. 18899 * expr.c (pop_type): Any interface is matches by java.lang.Object. 18900 189011998-11-13 Tom Tromey <tromey@cygnus.com> 18902 18903 * gjavah.c (main): Handle --output-class-directory argument. 18904 * jvspec.c (lang_specific_driver): Translate `-d' into 18905 -foutput-class-dir. 18906 * jcf.h (jcf_write_base_directory): Declare. 18907 * lang.c (lang_decode_option): Recognize -foutput-class-dir. 18908 * lang-options.h: Mention -foutput-class-dir. 18909 * jcf-write.c (jcf_write_base_directory): New global. 18910 (make_class_file_name): Put generated .class file into `-d' 18911 directory, or into source directory if -d not given. Function now 18912 static. 18913 (write_classfile): Free class file name. Handle case where class 18914 file name is NULL. 18915 (DIR_SEPARATOR): New macro. 18916 Include <sys/stat.h> 18917 18918 * Makefile.in (prefix): New macro. 18919 189201998-11-12 Per Bothner <bothner@cygnus.com> 18921 18922 * parse.y (patch_invoke): Do less if flag_emit_class_files. 18923 * expr.c (build_known_method_ref): Don't check flag_emit_class_files 18924 here (done in patch_invoke instead). 18925 (case_identity): Moved here from parse.y. 18926 18927 * java-tree.h (CAN_COMPLETE_NORMALLY): New macro. 18928 * parse.y (java_complete_tree etc): Maybe set CAN_COMPLETE_NORMALLY. 18929 * parse.y (java_complete_tree): Re-order COMPOUND_EXPR in BLOCK 18930 so they can be efficiently scanned without recursion. 18931 Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR. 18932 * expr.c (java_lang_expand_expr): Expand statements of COMPOUND_EXPR 18933 in BLOCK iteratively, rather than recursively. 18934 18935 * parse.y (do_unary_numeric_promotion): New function. 18936 (patch_unaryop, patch_binop, patch_array_ref): Use it. 18937 18938 * parse.y (patch_newarray): Various fixes. 18939 18940 Re-do handling of switch statements (for proper block scoping). 18941 * parse.y: Add just a single block for the enture switch block, 18942 but don't create any "case blocks". 18943 (group_of_labels): Rmeoved unneeded non-terminal. 18944 CASE_EXPR and DEFAULT_EXPR are added to current block. 18945 * expr.c (java_lang_expand_expr): Inline SWITCH_EXPR here. 18946 Now also need to handle CASE_EXPR and DEFAULT_EXPR. 18947 * java-tree.h (SWITCH_HAS_DEFAULT): New macro. 18948 * parse.y (wfl_operator, print_int_node): Make non-static. 18949 (java_complete_tree): CASE_EXPR and DEFAULT_EXPR are now processed 18950 as part of recursive scan of block. 18951 (java_expand_switch ): Removed - inlined into java_lang_expand_expr. 18952 (patch_switch_statement): Most tests move dinto java_complete_tree. 18953 18954 * parse.y: Make various production be non-typed (void). 18955 * parse.y (parse_error): Merged into issue_warning_error_from_context. 18956 * parse.y (add_stmt_to_compound): Don't create/change extra node. 18957 (patch_method_invocation_stmt): Renamed to patch_method_invocation. 18958 18959 * jcf-write.c (struct jcf_handler): New type. 18960 (struct jcf_switch_state): New type. 18961 (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC): New relocation kinds. 18962 (alloc_handler, emit_unop, emit_reloc): New functions. 18963 (adjust_typed_op): Add extra parameter ("max type" offset). 18964 (emit_switch_reloc, emit_case-reloc): New function. 18965 (generate_bytecode_conditional): Handle REAL_TYPE comparisons. 18966 (generate_bytecode_insns): Support REAL_CST, switch statements, 18967 exception handling, method calls, object/array creation, and more. 18968 18969 * class.c: Remove some unused variables. 18970 * constants.c (find_string_constant): New function. 18971 (count_constant_pool_bytes): Fix to correctly handle wide constants. 18972 * decl.c (complete_start_java_method): Don't _Jv_InitClass 18973 if flag_emit_class_files. 18974 189751998-11-12 Tom Tromey <tromey@cygnus.com> 18976 18977 * jcf-io.c (find_class): Added explanatory comment. 18978 18979 * jcf-path.c (add_entry): Look for `.zip' at end of filename. Add 18980 trailing slash to `.zip' entries. 18981 18982 * jvspec.c (lang_specific_driver): Correctly handle case where 18983 GC_NAME not defined. 18984 189851998-11-11 Tom Tromey <tromey@cygnus.com> 18986 18987 * jvspec.c (GC_NAME): New define. 18988 (lang_specific_driver): Use GC_NAME. Add GC_NAME to command line 18989 if required. 18990 * Make-lang.in (jvspec.o): Define WITH_GC_<name>. 18991 189921998-11-11 Per Bothner <bothner@cygnus.com> 18993 18994 * jcf-dump.c (TABLE_SWITCH): Fix typos. 18995 189961998-11-11 Tom Tromey <tromey@cygnus.com> 18997 18998 * jcf-dump.c (main): Correctly recognize `--'-style long options. 18999 190001998-11-10 Alexandre Petit-Bianco <apbianco@cygnus.com> 19001 19002 * class.c (is_compiled_class): Call safe_layout_class for class 19003 compiled from source. 19004 * conver.h (convert_to_integer, convert_to_real, 19005 convert_to_pointer): Added prototypes. 19006 * decl.c (init_decl_processing): Non longer push the decls of 19007 `methodtable', `constants', `Class', `Field', `dispatchTable' 19008 `jexception' and `Method'. 19009 * expr.c (build_invokeinterface): New function. 19010 (expand_invoke): static variable CLASS_IDENT now in 19011 build_invokeinterface. Use build_invokeinterface. 19012 (expand_java_field_op): Moved code to inline 19013 java.lang.PRIMTYPE.TYPE into a function. 19014 (build_primtype_type_ref): New function. 19015 * java-tree.def (INSTANCEOF_EXPR): New tree code. 19016 * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED, 19017 FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros. 19018 (DECL_CONSTRUCTOR_P): Fixed typo in comment. 19019 (DECL_LOCAL_STATIC_VALUE): New macro. 19020 (build_invokeinterface, build_primtype_type_ref): New function 19021 prototypes. 19022 (java_parse_abort_on_error): Macro rewritten. 19023 * jcf-parse.c (current_method): Add comment to declaration. 19024 (parse_zip_file_entries, process_zip_dir, void parse_source_file): 19025 Function prototypes fixed. 19026 (jcf_parse_source): push/pop parser context. save/restore global. 19027 (parse_source_file): Fixed leading comment. Now take a 19028 IDENTIFIER_NODE as an argument. Doesn't check methods, layout 19029 classes and pop the parser context anymore. 19030 (yyparse): Push parser context, save globals, parse the source 19031 file, restore globals and pop the parser context when processing a 19032 source file. 19033 * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define. 19034 * lex.c (java_parse_doc_section): New function. 19035 (java_lex): Call java_parse_doc_section when appropriate. Build an 19036 operator around INSTANCEOF_TK. 19037 * lex.h (java_lineterminator, java_sprint_unicode, 19038 java_unicode_2_utf8, java_lex_error, java_store_unicode): 19039 Prototypes rewritten. 19040 (java_parse_escape_sequence, java_letter_or_digit_p, 19041 java_parse_doc_section, java_parse_end_comment, java_get_unicode, 19042 java_read_unicode, java_store_unicode, java_read_char, 19043 java_allocate_new_line, java_unget_unicode, java_sneak_unicode): 19044 Added function prototypes. 19045 * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG 19046 define. 19047 (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT): 19048 New macros 19049 (struct parser_ctxt): New fields: deprecated, 19050 current_parsed_class_un, gclass_list. 19051 (fix_method_argument_names, issue_warning_error_from_context, 19052 resolve_package, lookup_package_type): New function prototypes. 19053 (resolve_expression_name): Fixed function prototype. 19054 (find_applicable_accessible_methods_list): Fixed indentation, added 19055 extra argument in prototype. 19056 (check_final_assignment, build_null_of_type, check_deprecation, 19057 check_method_redefinition, reset_method_name, 19058 java_check_regular_methods, java_check_abstract_methods, 19059 maybe_build_primttype_type_ref): New function prototype. 19060 * parse.y (conver.h): Include. 19061 (INSTANCEOF_TK): Tagged <operator>. 19062 (single_type_import_declaration): Use REGISTER_IMPORT macro. 19063 (relational_expression:): Build binop for instanceof. 19064 (java_push_parser_context): Remember ctxp->gclass_list across 19065 contexts. 19066 (java_pop_parser_context): Simply return if no context 19067 exists. Remember gclass_list across contexts. 19068 (issue_warning_error_from_context): New function. 19069 (parse_error_context): Don't setup ctxp->elc here. Call 19070 issue_warning_error_from_context instead. 19071 (parse_warning_context): Likewise. 19072 (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL 19073 setup. Link new class/interface to ctxp->gclass_list. 19074 (add_superinterfaces): Register interface as incomplete if not 19075 loaded. 19076 (create_class): Remember class unqualified name in 19077 ctxp->current_parsed_class_un. Check class deprecation. 19078 (register_fields): Check field deprecation. Remember static final 19079 field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part 19080 processing INIT. 19081 (method_header): New local variable ORIG_ARG. Use unqualified 19082 current class name for check on constructor errors. Promote return 19083 type if of record type. Argument list fix moved in 19084 fix_method_argument_names, called here. Check method deprecation. 19085 (fix_method_argument_names): New function. 19086 (method_declarator): Promote record typed arguments. 19087 (safe_layout_class): Check class methods before layout. 19088 (java_complete_class): Compute field layout when patched. 19089 (do_resolve_class): Try to load class after having it renamed 19090 after the package name. 19091 (get_printable_method_name): Use DECL_CONTEXT. 19092 (reset_method_name): New function. 19093 (check_method_redefinition): Use reset_method_name. 19094 (java_check_regular_methods): New local variable 19095 SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method 19096 names for error report. Check for compile-time error when method 19097 found has default (package) access. 19098 (java_check_abstract_methods): Now takes an interface DECL node as 19099 an argument. Also reinstall real name on unchecked 19100 overriding/hiding methods for error report. 19101 (java_check_methods): Fixed leading comment. Get classes to verify 19102 from ctxp->gclass_list. Use CHECK_METHODS macro and set 19103 CLASS_METHOD_CHECKED_P on class verification. 19104 (lookup_java_method2): Get real method name if necessary. 19105 (find_in_imports): Don't check package class access here. 19106 (resolve_package, lookup_package_type): New functions. 19107 (java_layout_classes): Fixed leading comment. Take classes to be 19108 laid out from ctxp->gclass_list. 19109 (java_complete_expand_methods): Don't expand native and abstract 19110 methods. 19111 (java_expand_classes): New function. 19112 (resolve_expression_name): Use additional argument ORIG. Retrieve 19113 values of static final field of primitive types. 19114 (resolve_field_access): Handles static final field of promotive 19115 type. 19116 (resolve_qualified_expression_name): Handle STRING_CST as 19117 primaries and package name resolution. Check deprecation on found 19118 decls. Set where_found and type_found on non static field resolved 19119 during qualification. Layout non primitive field decl types. 19120 (check_deprecation): New function. 19121 (maybe_access_field): Simplified. 19122 (patch_method_invocation_stmt): Local variable CLASS_TYPE 19123 removed. Reverse method's argument when primary is a type. Don't 19124 use CLASS_TYPE to report problems, use IDENTIFIER_WFL 19125 instead. Include abstract class in the list of class searchable 19126 for constructors. Use DECL_CONTEXT of found method for access 19127 checks. Check method deprecation. 19128 (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when 19129 converting arguments. Handle INVOKE_INTERFACE. 19130 (lookup_method_invoke): Search constructor using existing 19131 infrastructure (don't rely on lookup_java_constructor anymore). 19132 (find_applicable_accessible_methods_list): Extra argument flag 19133 LC. Now include constructor in the search. 19134 (qualify_ambiguous_name): Conditional expression are primaries. 19135 (not_initialized_as_it_should_p): static final are always 19136 initialized. 19137 (java_complete_tree): Pass extra NULL argument to 19138 resolve_expression_name. Stricter test to carry on patching 19139 assignments. New case for INSTANCEOF_EXPR. 19140 (complete_function_arguments): Inline PRIMTYPE.TYPE read access. 19141 (check_final_assignment, maybe_build_primttype_type_ref): New 19142 functions. 19143 (patch_assignment): Detect resolved static finals and carry normal 19144 assignment error check on them. Inline PRIMTYPE.TYPE read access. 19145 (try_builtin_assignconv): Access constant 0 on all primitive 19146 types. 19147 (valid_builtin_assignconv_identity_widening_p): Accept identical 19148 types. Accept all promoted type on int type. 19149 (valid_ref_assignconv_cast_p): Accept a null pointer to be 19150 assigned to a reference. 19151 (valid_method_invocation_conversion_p): Accept to check null 19152 pointers. 19153 (build_binop): Merge declaration and initialization of local 19154 variable BINOP. 19155 (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all 19156 numeric types. Improved validity test for qualify operators on 19157 references. 19158 (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR 19159 and PREINCREMENT_EXPR. Also detect resolved static finals of a 19160 primitive type and issue the appropriate error message. 19161 (resolve_type_during_patch): Mark class loaded when resolved. 19162 (patch_cast): Allow null to be cased to reference types. 19163 (build_null_of_type): New function. 19164 (patch_array_ref): Handle array on references correctly. 19165 (patch_return): Removed unused local variable MODIFY. Force 19166 boolean to be returned as integers. Allows null to be returned by 19167 a function returning a reference. 19168 * typeck.c (convert_to_integer, convert_to_real, 19169 convert_to_pointer): Prototypes moved to convert.h 19170 (lookup_argument_method): Use method real name, if necessary. 19171 191721998-10-30 Tom Tromey <tromey@cygnus.com> 19173 19174 * class.c (build_class_ref): Changed name of primitive classes to 19175 start with `_Jv_'. 19176 19177 * class.c (make_class_data): Renamed fields: nmethods to 19178 method_count, method_count to dtable_method_count. Always set 19179 `state' field to 0. 19180 * decl.c (init_decl_processing): Likewise. 19181 191821998-10-28 Alexandre Petit-Bianco <apbianco@cygnus.com> 19183 19184 * class.c (layout_class): Don't mangle <finit>, produce 19185 __finit<class> instead. Don't verify artificial methods. 19186 * decl.c (finit_identifier_node): New declared global. 19187 (init_decl_processing): finit_identifier_node initialized. 19188 * java-tree.def (CONDITIONAL_EXPR): New Java tree code. 19189 * java-tree.h (finit_identifier_node): Declared as extern. 19190 (struct lang_decl): New field called_constructor. 19191 (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor. 19192 (CLASS_HAS_FINIT_P): New macro. 19193 (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks 19194 explicit constructor invocation. 19195 (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P, 19196 CALL_SUPER_CONSTRUCTOR_P): New macros. 19197 (write_classfile): Added prototype. 19198 * jcf-parse.c (jcf_parse_source): Parse and remember for 19199 generation if the file was seen on the command line. 19200 (parse_source_file): Don't write the class file here. 19201 (yyparse): Loop on files rewritten. Set current_jcf. 19202 (parse_zip_file_entries): Parse class file only if it was found. 19203 * lang.c (init_parse): Don't open command line provided filename 19204 here. 19205 (lang_parse): Don't set main_jcf anymore. 19206 * parse.h (ABSTRAC_CHECK): Capitalized arguments. 19207 (JCONSTRUCTOR_CHECK): New macro. 19208 (JBSC_TYPE_P): New macro. 19209 (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment. 19210 (COMPLETE_CHECK_OP_2): New macro. 19211 (struct parse_ctxt): New field explicit_constructor_p. 19212 (check_class_interface_creation): Fixed prototype indentation. 19213 (patch_method_invocation_stmt): Prototype reflects added argument. 19214 (patch_invoke): Likewise. 19215 (complete_method_declaration, build_super_invocation, 19216 verify_constructor_circularity, 19217 build_this_super_qualified_invocation, get_printable_method_name, 19218 patch_conditional_expr, maybe_generate_finit, fix_constructors, 19219 verify_constructor_super, create_artificial_method, 19220 start_artificial_method_body, end_artificial_method_body, 19221 generate_field_initialization_code): New function prototypes. 19222 * parse.y: Fixed leading comment 19223 (constructor_header:, constructor_body:, block_end:): Rules tagged 19224 <node>. 19225 (type_declaration:): Call maybe_generate_finit. 19226 (method_declaration:): Action for method_body: placed in new 19227 function complete_method_declaration, called here. 19228 (constructor_declaration:): Defined actions. Removed leading 19229 FIXME. 19230 (constructor_header:): New rule with action. 19231 (constructor_body:): Rule rewritten using block_begin: and 19232 block_end:. Defined actions. 19233 (constructor_declarator:, explicit_constructor_invocation:): 19234 Defined actions. 19235 (block:): Use new rules block_begin: block_end:. 19236 (block_begin:, block_end:): New rules and actions. 19237 (block_statements:): Fixed error message for explicit 19238 constructors. 19239 (method_invocation:): Call build_this_super_qualified_invocation 19240 if primary is `this' or `super' was seen. 19241 (conditional_expression:): Action defined. 19242 (extra_ctxp_pushed_p): New static global flag. 19243 (java_parser_context_save_global): Create parser context if 19244 necessary. Use extra_ctxp_pushed_p to remember it. 19245 (java_parser_context_restore_global): Pop extra parser context if 19246 one exists. 19247 (build_array_from_name): Array on primitive types are marked 19248 loaded. 19249 (register_fields): Restore new name in field initializer 19250 expression if type was altered. Non static fields initialized upon 19251 declaration marked initialized. 19252 (maybe_generate_finit): New function. 19253 (maybe_generate_clinit): Use create_artificial_method, 19254 start_artificial_method_body, end_artificial_method_body. Generate 19255 debug info for enclosed initialization statements. 19256 (method_header): Fixed leading comment. Check constructor 19257 flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P 19258 accordingly. 19259 (complete_method_declaration, constructor_circularity_msg, 19260 verify_constructor_circularity): New functions. 19261 (get_printable_method_name): New function. 19262 (check_method_redefinition): Don't rename <finit> methods. Fix 19263 declared constructor names. Error message for 19264 constructors modified. 19265 (java_check_regular_methods): Local variable seen_constructor 19266 renamed saw_constructor. Skip verification on constructors. Create 19267 default constructor with create_artificial_method. 19268 (java_check_methods): Removed unnecessary empty line. 19269 (create_artificial_method, start_artificial_method_body, 19270 end_artificial_method_body): New functions. 19271 (java_layout_classes): Changed leading comment. Reverse fields 19272 list if necessary. Always layout java.lang.Object if being 19273 defined. 19274 (java_complete_expand_methods): Verify constructor circularity. 19275 (java_complete_expand_method): Call fix_constructor on 19276 constructors. Local variable no_ac_found removed. Restore 19277 bindings if method body expansion failed. 19278 (fix_constructors, verify_constructor_super, 19279 generate_field_initialization_code): New function. 19280 (java_expand_classes): Fixed leading comment. Write class file 19281 here. 19282 (resolve_expression_name): Check for illegal instance variable 19283 usage within the argument scope of an explicit constructor 19284 invocation. 19285 (resolve_qualified_expression_name): Pass extra from_super flag 19286 when invoking patch_method_invocation_stmt. New case for 19287 conditional expression when used as a primary. Check for error 19288 when acquiring super. 19289 (patch_method_invocation_stmt): Added extra argument super. New 19290 local variable is_static_flag. Set class_to_search according to 19291 the nature of the constructor invocation. Don't add `this' 19292 argument when expanding NEW_CLASS_EXPR. Check for illegal method 19293 invocation within the argument scope of explicit constructor 19294 invocation. Set is_static according to is_static_flag. Provide 19295 extra `super' argument to patch_invoke invocation. 19296 (patch_invoke): New argument from_super. Loop on arguments 19297 indentation fixed. Pass from_super to invocation_mode. New switch 19298 case INVOKE_SUPER. Fixed error message in switch default case. 19299 Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node 19300 value. 19301 (invocation_mode): Return INVOKE_SUPER mode when appropriate. 19302 (lookup_method_invoke): Fixed prototypes in candidates list. Error 19303 message takes constructors into account. 19304 (find_applicable_accessible_methods_list): Fixed indentation. 19305 (qualify_ambiguous_name): Take explicit constructor invocation 19306 into account. Deal with a conditional expression as a primary to 19307 a method call. 19308 (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR 19309 case. Added extra argument to patch_method_invocation_stmt. 19310 Register calls made to explicit constructor `this'. Don't call 19311 save_expr in ARRAY_REF case when emitting class files. Check for 19312 illegal use of this when expanding explicit constructor invocation 19313 arguments. 19314 (complete_function_arguments): Set and reset parser context 19315 explicit_constructor_p field value when appropriate. 19316 (build_super_invocation, build_this_super_qualified_invocation): 19317 New functions. 19318 (patch_assignment): Fixed typo. 19319 (patch_unaryop): Check on final fields occurs only when a decl 19320 exits. 19321 (patch_return): Take constructors into account. 19322 (patch_conditional_expr): New function. 19323 * typeck.c (build_java_signature): Removed unnecessary empty line. 19324 193251998-10-28 Jeffrey A Law (law@cygnus.com) 19326 19327 * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too. 19328 193291998-10-28 Tom Tromey <tromey@cygnus.com> 19330 19331 * decl.c (init_decl_processing): Renamed fields. 19332 * class.c (make_class_data): Renamed bfsize, nfields, nsfields, 19333 interface_len, msize fields. 19334 19335 * class.c (make_class_data): Removed subclass_head and 19336 subclass_next fields. 19337 * decl.c (init_decl_processing): Removed subclass_head and 19338 subclass_next fields. 19339 193401998-10-28 Jeffrey A Law (law@cygnus.com) 19341 19342 * jcf-write.c (emit_load_or_store): Avoid implicit int arguments. 19343 * mangle.c (emit_unicode_mangled_name): Similarly. 19344 193451998-10-26 Nick Clifton <nickc@cygnus.com> 19346 19347 * jcf-parse.c (get_constant): Place braces around code to compute 19348 'd' when REAL_ARITHMETIC is not defined. 19349 193501998-10-25 H.J. Lu (hjl@gnu.org) 19351 19352 * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to 19353 dependency. 19354 193551998-10-23 Tom Tromey <tromey@cygnus.com> 19356 19357 * lang-specs.h: `.zip' files are input to jc1. 19358 193591998-10-22 Per Bothner <bothner@cygnus.com> 19360 19361 * jvspecs.c: Add (but don't enable) support for combining multiple 19362 .class and .java input filenames to a single jc1 invocation. 19363 Add support for -C flag (copile to .class files). 19364 Translate -classpath and -CLASSPATH arguments. 19365 * lang-specs.h: Don't set %2 spec. 19366 193671998-10-22 Tom Tromey <tromey@cygnus.com> 19368 19369 * jcf-path.c (add_entry): Don't add trailing separator if entry is 19370 a .zip file. 19371 (add_path): Don't add trailing separator to non-empty path 19372 elements. 19373 19374 * lang.c (lang_decode_option): Check for -fclasspath and 19375 -fCLASSPATH before examining other `-f' options. 19376 19377 * java-tree.h (finalize_identifier_node): Don't declare. 19378 * class.c (make_class_data): Don't push "final" field. 19379 * decl.c (init_decl_processing): Don't push "final" field. 19380 (finalize_identifier_node): Removed. 19381 (init_decl_processing): Don't set finalize_identifier_node. 19382 19383 * config-lang.in (stagestuff): Added jcf-dump and jv-scan. 19384 193851998-10-11 Anthony Green <green@cygnus.com> 19386 19387 * Make-lang.in (java): Depend on jcf-dump and jv-scan. 19388 (JV_SCAN_SOURCES): New macro. 19389 (JCF_DUMP_SOURCES): Likewise. 19390 (jcf-dump$(exeext)): New target. 19391 (jv-scan$(exeext)): New target. 19392 193931998-10-22 Tom Tromey <tromey@cygnus.com> 19394 19395 * Makefile.in (LEX): Removed. 19396 (LEXFLAGS): Likewise. 19397 (SET_BISON): New macro. 19398 (BISON): Removed. 19399 ($(PARSE_C)): Use SET_BISON. Run bison from srcdir to avoid 19400 spurious diffs in parse.c. 19401 ($(PARSE_SCAN_C)): Likewise. 19402 (PARSE_DIR): New macro. 19403 (PARSE_C): Use it. 19404 (PARSE_SCAN_C): Likewise. 19405 (PARSE_RELDIR): New macro. 19406 19407 * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c. 19408 19409 * jcf-io.c (find_class): Use saw_java_source to determine when to 19410 look for `.java' file. 19411 * jcf-parse.c (saw_java_source): New global. 19412 (yyparse): Set it if `.java' file seen. 19413 19414 * Make-lang.in (JAVA_SRCS): Added jcf-path.c. 19415 (GCJH_SOURCES): Likewise. 19416 * Makefile.in (datadir): New macro. 19417 (libjava_zip): Likewise. 19418 (JAVA_OBJS): Added jcf-path.o. 19419 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o. 19420 (../gcjh$(exeext)): Likewise. 19421 (jcf-path.o): New target. 19422 * java-tree.h (fix_classpath): Removed decl. 19423 * jcf-parse.c (fix_classpath): Removed. 19424 (load_class): Don't call fix_classpath. 19425 * parse.y (read_import_dir): Don't call fix_classpath. 19426 * lex.h: Don't mention classpath. 19427 * lex.c (java_init_lex): Don't initialize classpath. 19428 * jcf-io.c (classpath): Removed global. 19429 (find_class): Use jcf_path iteration functions. Correctly search 19430 class path for .java file. 19431 (open_in_zip): New argument `is_system'. 19432 * jcf-dump.c (main): Call jcf_path_init. Recognize all new 19433 classpath-related options. 19434 * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH, 19435 and -I. 19436 (lang_init): Call jcf_path_init. 19437 * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH. 19438 * lang-specs.h: Handle -I. Minor cleanup to -M options. 19439 Correctly put braces around second string in each entry. 19440 * gjavah.c (main): Call jcf_path_init. Recognize all the new 19441 classpath-related options. 19442 (help): Updated for new options. 19443 * jcf.h: Declare functions from jcf-path.c. Don't mention 19444 `classpath' global. 19445 * jcf-path.c: New file. 19446 19447 * jcf-depend.c: Include jcf.h. 19448 19449 * jcf-write.c (localvar_alloc): Returns `void'. 19450 (localvar_free): Removed unused variable. 19451 19452 * lang.c (OBJECT_SUFFIX): Define if not already defined. 19453 (init_parse): Use OBJECT_SUFFIX, not ".o". 19454 194551998-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com> 19456 19457 * class.c (emit_register_classes): Renamed from 19458 emit_register_class. 19459 * java-tree.h (emit_register_classes): Prototype renamed from 19460 emit_register_class. 19461 * jcf-parse.c (yyparse): Call emit_register_classes once before 19462 returning. 19463 * parse.y (java_expand_classes): No longer register classes. 19464 194651998-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com> 19466 19467 * class.c (is_compiled_class): New local variable 19468 seen_in_zip. Identify classes found in currently compiled source 19469 file(s). 19470 * decl.c (complete_start_java_method): Fixed typo. 19471 * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P, 19472 HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros. 19473 (CLASS_P): Moved around. 19474 (java_parse_abort_on_error): Macro moved from jcf-parse.c 19475 * jcf-parse.c (java_parse_abort_on_error): Macro moved to 19476 java-tree.h 19477 (jcf_parse_source): Changed leading comment. Removed unnecessary 19478 fclose and CLASS_FROM_SOURCE_P marking. 19479 (parse_source_file): New local variables remember_for_generation 19480 and filename. Mark parsed file name identifier node. Removed block 19481 executed when parse_only was null. Set remember_for_generation. 19482 Use it as an argument to java_pop_parser_context. 19483 (yyparse): New local variables several_files, list, next node and 19484 current_file_list. Split ampersand separated file names into 19485 current_file_list. Iterate through the list and parse accordingly. 19486 * parse.h (java_pop_parser_context): New function prototype. 19487 * parse.y (ctxp_for_generation): New static global variable. 19488 (java_pop_parser_context): New argument generate. Link popped ctxp 19489 to ctxp_for_generation list accordingly. 19490 (java_complete_expand_methods): Fixed indentation. 19491 (java_expand_classes): New function. 19492 194931998-10-17 Per Bothner <bothner@cygnus.com> 19494 19495 * Makefile.in: Link with libiberty.a instead of memmove.o. 19496 194971998-10-16 Alexandre Petit-Bianco <apbianco@cygnus.com> 19498 19499 * lex.c (setjmp.h): No longer included. 19500 * lex.h (setjmp.h): Included. 19501 * parse.h (SET_TYPE_FOR_RESOLUTION): New macro. 19502 (duplicate_declaration_error_p): Renamed from 19503 duplicate_declaration_error. 19504 (build_array_from_name): New function prototype. 19505 * parse.y (setjmp.h): No longer included. 19506 (variable_declarator_id): Define action. 19507 (build_array_from_name): New function. 19508 (duplicate_declaration_error_p): Renamed from 19509 duplicate_declaration_error. Fixed leading comment. 19510 (register_fields): Main `for' loop reorganized. Uses 19511 SET_TYPE_FOR_RESOLUTION and build_array_from_name. 19512 (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call 19513 build_array_from_name. 19514 (resolve_class): Set CLASS_LOADED_P on newly build array dimension 19515 types. 19516 (read_import_dir): Don't try to skip `.' and `..'. 19517 (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and 19518 build_array_from_name. Main `for' loop reorganized. 19519 (resolve_qualified_expression_name): When building access to a 19520 field, use the type where the field was found, not its own type. 19521 (maybe_access_field): Use field DECL_CONTEXT if the type where the 19522 field was found is null. 19523 (qualify_ambiguous_name): Sweep through all successive array 19524 dimensions. 19525 195261998-10-14 Alexandre Petit-Bianco <apbianco@cygnus.com> 19527 19528 * java-tree.h (pop_labeled_block, lang_printable_name, 19529 maybe_add_interface, set_super_info, get_access_flags_from_decl, 19530 interface_of_p, inherits_from_p, fix_classpath, 19531 complete_start_java_method, emit_handlers, init_outgoing_cpool, 19532 make_class_data, register_class, alloc_name_constant): New 19533 function prototypes. 19534 * lang.c (lang_decode_option): Set argc argument unused. Fixed 19535 indentation. Added cast to remove warning. 19536 (lang_printable_name): Set v argument unused. 19537 (lang_print_error): Added argument to lang_printable_name call. 19538 (java_dummy_print, print_lang_decl, print_lang_type, 19539 print_lang_identifier, lang_print_xnode): All argument marked 19540 unused. 19541 * lex.c (java_unget_unicode): Removed unnecessary argument. 19542 (java_allocate_new_line): Unused local variable is gone. 19543 (java_read_char): Added parenthesis in expressions to remove 19544 warnings. Added final return statement. 19545 (java_read_unicode): Added parenthesis in expression to remove 19546 warning. 19547 (java_parse_end_comment): Fixed java_unget_unicode invocation. 19548 (java_parse_escape_sequence): Likewise. 19549 (java_lex): Unused local variables are gone. Fixed 19550 java_unget_unicode invocation. 19551 * lex.h (set_float_handler): Prototype added when JC1_LITE not 19552 defined. 19553 * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed 19554 lang_printable_name invocation in macro. 19555 (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL): 19556 Likewise. 19557 (duplicate_declaration_error): Suppressed unused argument in 19558 prototype. 19559 (identical_subpath_p): Function declaration is gone. 19560 (patch_invoke): Suppressed unused argument in prototype. 19561 (patch_cast, build_labeled_block, check_thrown_exceptions): 19562 Likewise. 19563 * parse.y (setjmp.h): Included 19564 (toplev.h): Likewise. 19565 (field_declaration:): Suppressed unused local 19566 (label_decl:): Fixed build_labeled_block invocation. 19567 (java_pop_parser_context): Put extra parenthesis around assignment 19568 in if. 19569 (yyerror): Suppressed unused local variables. 19570 (variable_redefinition_error): Fixed lang_printable_name 19571 invocation. 19572 (create_interface): Suppressed unused local variables. 19573 (create_class): Likewise. 19574 (duplicate_declaration_error): Suppressed unused argument. Fixed 19575 lang_printable_name invocation. 19576 (register_fields): Suppressed unused local variable. Fixed 19577 duplicate_declaration_error invocation. 19578 (method_header): Suppressed unused local variable. 19579 (method_declarator, parser_check_super): Likewise. 19580 (java_complete_class): Suppressed unused local variable. Fixed 19581 fatal error message. 19582 (complete_class_report_errors): Added default: in switch. 19583 (java_check_regular_methods): Fixed lang_printable_name 19584 invocations. 19585 (check_throws_clauses): Likewise. 19586 (java_check_abstract_methods): Suppressed unused local 19587 variable. Fixed lang_printable_name invocation. 19588 (read_import_entry): Added supplemental return statement. 19589 (read_import_dir): Suppressed unused local variables. 19590 (check_pkg_class_access, declare_local_variables): Likewise. 19591 (source_start_java_method): Suppressed unused extern variable 19592 declarations 19593 (expand_start_java_method): Suppressed unused extern and local 19594 variable declarations. 19595 (java_complete_expand_methods): Likewise. 19596 (java_complete_expand_method): Suppressed unused local variables. 19597 (make_qualified_name): Likewise. 19598 (resolve_qualified_expression_name): Added default: in 19599 switch. Fixed lang_printable_name invocation. 19600 (class_instance_creation_expression): Added parenthesis around 19601 expressions. 19602 (patch_method_invocation_stmt): Fixed lang_printable_name and 19603 patch_invoke invocations. 19604 (check_for_static_method_reference): Fixed lang_printable_name 19605 invocation. 19606 (patch_invoke): Suppressed unused arguments and local variables. 19607 (lookup_method_invoke): Suppressed unused local variables. 19608 (qualify_ambiguous_name): Added default: in switch. 19609 (identical_subpath_p): Function removed. 19610 (patch_assignment): Suppressed unused local variables. Suppressed 19611 unnecessary if statement. Fixed lang_printable_name invocations. 19612 (try_builtin_assignconv): Fixed lang_printable_name invocations. 19613 (valid_ref_assignconv_cast_p): Parenthesis around 19614 expression. Suppressed unused local variables. 19615 (build_binop): Suppressed unused local variables. fixed 19616 lang_printable_name invocations. 19617 (string_constant_concatenation): Suppressed unused local 19618 variables. 19619 (patch_unaryop): Fixed lang_printable_name invocation. 19620 (patch_cast): Suppressed unnecessary argument. Fixed 19621 lang_printable_name invocation. 19622 (patch_array_ref): Fixed lang_printable_name invocation. 19623 (patch_newarray, patch_return, patch_if_else_statement): Likewise. 19624 (build_labeled_block): Suppressed unused argument. 19625 (generate_labeled_block): Fixed build_labeled_block invocation. 19626 (build_loop_body): Suppressed unused local variables. 19627 (patch_loop_statement): Likewise. 19628 (patch_exit): Fixed lang_printable_name invocation. 19629 (patch_switch_statement): Likewise. 19630 (case_identity): First argument marked unused. 19631 (patch_try_statement): Fixed lang_printable_name invocations. 19632 (patch_synchronized_statement, patch_throw_statement): Likewise. 19633 (check_thrown_exceptions): Fixed check_thrown_exceptions and 19634 lang_printable_name invocations. 19635 (check_thrown_exceptions_do): Suppressed unused argument. 19636 196371998-10-14 Tom Tromey <tromey@cygnus.com> 19638 19639 * jcf-write.c (write_classfile): Add output class file as target. 19640 * lang-options.h: Added -MD, -MMD, -M, and -MM. 19641 * jcf.h: Added declarations for dependency-tracking functions. 19642 * lang-specs.h: Handle -M, -MM, MD, and -MMD. 19643 * lang.c (lang_decode_option): Recognize -MD and -MMD. 19644 (finish_parse): Call jcf_dependency_write. 19645 (dependency_tracking): New global. 19646 (DEPEND_SET_FILE): New define. 19647 (DEPEND_ENABLE): New define. 19648 (init_parse): Enable dependency tracking if required. 19649 Include "flags.h". 19650 * Makefile.in (JAVA_OBJS): Added jcf-depend.o. 19651 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o. 19652 (../gcjh$(exeext)): Likewise. 19653 (jcf-depend.o): New target. 19654 * Make-lang.in (JAVA_SRCS): Added jcf-depend.c. 19655 (GCJH_SOURCES): Likewise. 19656 * jcf-io.c (open_class): Call jcf_dependency_add_file. Added 19657 dep_name argument. 19658 (find_classfile): Added dep_name argument. 19659 (find_class): Compute name of dependency. 19660 (open_in_zip): Call jcf_dependency_add_file. 19661 * gjavah.c (output_file): No longer global. 19662 (usage): Don't mention "gjavah". 19663 (help): Likewise. 19664 (java_no_argument): Likewise. 19665 (version): Likewise. 19666 (main): Recognize and handle -M family of options. 19667 (print_mangled_classname): Return is void. 19668 (process_file): Handle case where output is suppressed. 19669 (HANDLE_END_FIELD): Likewise. 19670 (HANDLE_METHOD): Likewise. 19671 * jcf-depend.c: New file. 19672 196731998-10-13 Jeffrey A Law (law@cygnus.com) 19674 19675 * java-tree.def: Add missing newline at EOF. 19676 196771998-10-13 Tom Tromey <tromey@cygnus.com> 19678 19679 * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1. 19680 (main): Likewise. Exit with SUCCESS_EXIT_CODE at end of 19681 function. 19682 Include <config.h> and "system.h". 19683 (disassemble_method): Undefine RET to avoid clash with 19684 config/i386/i386.h. 19685 196861998-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com> 19687 19688 * decl.c (runtime_exception_type_node, error_exception_type_node): 19689 New global variables. 19690 (init_decl_processing): Initialized. 19691 * expr.c (java_lang_expand_expr): Set caught exception type to 19692 null if catch handler argument doesn't exit. 19693 * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific 19694 tree codes. 19695 * java-tree.h (runtime_exception_type_node, 19696 error_exception_type_node): Global variables declared. 19697 (DECL_FUNCTION_THROWS): New macro. 19698 (DECL_FUNCTION_BODY): Modified comment. 19699 (DECL_SPECIFIC_COUNT): Likewise. 19700 (struct lang_decl): New field throws_list. 19701 (IS_UNCHECKED_EXPRESSION_P): New macro. 19702 * lex.c (java_lex): Generate location information for THROW_TK. 19703 * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P, 19704 EXCEPTIONS_P): New macros. 19705 (enum jdep_code): New value JDEP_EXCEPTION. 19706 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT, 19707 BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR, 19708 PATCH_METHOD_RETURN_ERROR): New macros. 19709 (patch_method_invocation_stmt): Added new argument to prototype. 19710 (patch_synchronized_statement, patch_throw_statement, 19711 check_thrown_exceptions, check_thrown_exceptions_do, 19712 purge_unchecked_exceptions, check_throws_clauses): New function 19713 prototypes. 19714 * parse.y Fixed typo in keyword section. 19715 (throw:): Rule tagged <node>. 19716 (THROW_TK): Keyword tagged <operator>. 19717 (method_header:): Last argument to call to method_header passed 19718 from throws: rule. 19719 (throws:, class_type_list:, throw_statement:, 19720 synchronized_statement:, synchronized:): Defined actions. 19721 (method_header): New local variable current. Register exceptions 19722 from throws clause. 19723 (java_complete_tree): Complete and verify exceptions from throws 19724 clause. 19725 (complete_class_report_errors): Error message on exceptions not 19726 found 19727 (java_check_regular_methods): Fixed typo. Shortcut on private 19728 overriding methods. Changed error message on method 19729 redefinition. Check for throws clause compatibility. 19730 (check_throws_clauses): New function. 19731 (java_check_abstract_methods): Use DECL_NAME for wfl or current 19732 method. Changed error message on method redefinition. 19733 (currently_caught_type_list): New static variable. 19734 (java_complete_expand_methods): Purge unchecked exceptions from 19735 throws clause list. Call PUSH_EXCEPTIONS before walk and 19736 POP_EXCEPTIONS after. 19737 (resolve_qualified_expression_name): Pass new argument as NULL to 19738 patch_method_invocation_stmt. 19739 (patch_method_invocation_stmt): New argument ref_decl. Invoke 19740 PATCH_METHOD_RETURN_ERROR when returning with error. Reverse 19741 argument list when appropriate. Use new argument if non null to 19742 store selected method decl. 19743 (patch_invoke): Convert if necessary args of builtin types before 19744 forming CALL_EXPR. Argument list no longer reversed here. 19745 (invocation_mode): Treat final methods as static methods. 19746 (java_complete_tree): New cases for THROW_EXPR: and 19747 SYNCHRONIZED_EXPR:. Check thrown exceptions when completing 19748 function call. 19749 (complete_function_arguments): No more RECORD_TYPE 19750 conversion. Function parameter nodes no longer saved. 19751 (valid_ref_assignconv_cast_p): Avoid handling null type. 19752 (patch_binop): Fixed null constant reference handling. 19753 (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and 19754 BUILD_THROW macros. 19755 (patch_try_statement): Fixed comments. Record caught types in 19756 list, push the list, expand try block and pop the list. 19757 (patch_synchronized_statement, patch_throw_statement, 19758 check_thrown_exceptions, check_thrown_exceptions_do, 19759 purge_unchecked_exceptions): New functions. 19760 * typeck.c (lookup_argument_method): Allow WFL in place of method 19761 DECL_NAME during method definition check 19762 197631998-10-09 Tom Tromey <tromey@cygnus.com> 19764 19765 * gjavah.c (decode_signature_piece): New function. 19766 (print_c_decl): Use it. Added `name_override' argument. 19767 (print_method_info): Use name_override argument to print_c_decl. 19768 (seen_fields): Removed. 19769 (print_field_info): Don't update seen_fields. 19770 (struct method_name): New structure. 19771 (method_name_list): New global. 19772 (print_method_info): Add new method to list of methods. 19773 (name_is_method_p): New function. 19774 (print_field_info): If field name has same name as method, then 19775 change field name. 19776 (process_file): Parse methods before fields. 19777 (field_pass): New global. 19778 (HANDLE_END_FIELD): Take field_pass into account. 19779 197801998-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 19781 19782 * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf. 19783 (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs). 19784 197851998-10-03 Anthony Green <green@cygnus.com> 19786 19787 * jvspec.c: Fix bug in jvgenmain_spec patch. 19788 197891998-10-02 Alexandre Petit-Bianco <apbianco@cygnus.com> 19790 19791 * Makefile.in (lang.o:): Install dependency on java-tree.def. 19792 * decl.c (soft_exceptioninfo_call_node): New global variable. 19793 (init_decl_processing): Fixed indentation. soft_badarrayindex_node 19794 takes extra integer argument. soft_exceptioninfo_call_node 19795 initialized. 19796 * except.c (java_set_exception_lang_code): New function 19797 (method_init_exceptions): Called here. 19798 (prepare_eh_table_type): New function. 19799 (expand_end_java_handler): Called here. 19800 * expr.c (build_java_throw_out_of_bounds_exception): Now features 19801 one argument. Modified generation of call to 19802 soft_badarrayindex_node to use new argument. 19803 (build_java_arrayaccess): Pass faulty index value to 19804 build_java_throw_out_of_bounds_exception. 19805 (generate_name): New function. 19806 (java_lang_expand_expr): New local variables node, current, 19807 has_finally_p. Expand TRY_EXPR node. 19808 (process_jvm_instruction): Replace top of the stack with thrown 19809 object reference when entering exception handler. 19810 * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java 19811 specific tree codes. 19812 * java-tree.h (soft_exceptioninfo_call_node): Declaration of new 19813 global. 19814 (DECL_SPECIFIC_COUNT): New macro. 19815 (prepare_eh_table_type, java_set_exception_lang_code, 19816 generate_name): New function declarations. 19817 (match_java_method): Declaration deleted. 19818 (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New 19819 macros. 19820 * lex.c (TRY_TK, CATCH_TK): Generate location information. 19821 * parse.h (redefinition_error, refine_accessible_methods_list, 19822 can_cast_to_p): Function declaration removed. 19823 (classitf_redefinition_error, variable_redefinition_error, 19824 parse_jdk1_1_error, find_applicable_accessible_methods_list, 19825 find_most_specific_methods_list, argument_types_convertible, 19826 enter_a_block, valid_builtin_assignconv_identity_widening_p, 19827 valid_cast_to_p, valid_method_invocation_conversion_p, 19828 try_reference_assignconv, add_stmt_to_compound, 19829 build_jump_to_finally, build_tree_list, patch_try_statement, 19830 java_get_catch_block): New function declarations. 19831 * parse.y (string_buffer_type): Global variable deleted. 19832 (group_of_labels, catches, catch_clause, catch_clause_parameter, 19833 finally): Rules tagged <node>. 19834 (TRY_TK, CATCH_TK): Token tagged <operator>. 19835 (class_body_declaration:, class_member_declaration:, 19836 formal_parameter:, explicit_constructor_invocation:, 19837 interface_member_declaration:, constant_declaration:, 19838 primary_no_new_array:, class_instance_creation_expression:, 19839 array_creation_expression:): Issue error on unsuported JDK1.1 19840 features. 19841 (try_statement:, catches:, finally:): Define actions. 19842 (catch_clause_parameter): New rule. 19843 (catch_clause:): Use new rule catch_clause_parameter. 19844 (parse_jdk1_1_error): New function. 19845 (redefinition_error): Renamed classitf_redefinition_error. 19846 (variable_redefinition_error): New function. 19847 (check_class_interface_creation): Call 19848 classitf_redefinition_error. 19849 (java_complete_tree): Added error message on JDEP_TYPE: case. 19850 (complete_class_report_errors): Fixed indentation. 19851 (declare_local_variables): Call variable_redefinition_error. 19852 (source_end_java_method): Call java_set_exception_lang_code and 19853 emit_handlers where appropriate. 19854 (java_method_add_stmt): Call add_stmt_to_block. 19855 (add_stmt_to_block): New function. 19856 (lookup_method_invoke): Fixed outside comment. new local variable 19857 candicates. Call find_applicable_accessible_methods_list and 19858 find_most_specific_methods_list when searching for a 19859 method. Modified error report to list possible candidates when 19860 applicable. 19861 (find_applicable_accessible_methods_list, 19862 find_most_specific_methods_list, argument_types_convertible): New 19863 function. 19864 (refine_accessible_methods_list): Function deleted. 19865 (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save 19866 expr (if applicable) before calling patch_array_ref. 19867 (build_expr_block): Fixed BLOCK_EXPR_BODY assignment. 19868 (enter_block): Fixed comment. 19869 (enter_a_block): New function. 19870 (patch_assignment): Reorganized. Call try_reference_assignconv for 19871 references. Call valid_cast_to_p instead of can_cast_to_p. 19872 (try_reference_assignconv, 19873 valid_builtin_assignconv_identity_widening_p): New functions. 19874 (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL. 19875 (valid_cast_to_p, valid_method_invocation_conversion_p): New 19876 functions. 19877 (build_string_concatenation): Don't resolve StringBuffer. 19878 (patch_cast): Fixed inverted arguments. 19879 (patch_array_ref): Code to save array expr deleted. Call 19880 valid_cast_to_p instead of can_cast_to_p. 19881 (generate_labeled_block): Call generate_name. 19882 (build_jump_to_finally, build_try_statement, java_get_catch_block, 19883 patch_try_statement): New functions. 19884 * typeck.c (match_java_method): Function deleted. 19885 198861998-10-02 Anthony Green <green@cygnus.com> 19887 19888 * jvspec.c: jvgenmain_spec uses different temporary file names. 19889 198901998-10-02 Anthony Green <green@cygnus.com> 19891 19892 * jvspec.c (lang_specific_driver): Fail if user specifies 19893 --main= when not linking. 19894 198951998-09-28 Tom Tromey <tromey@cygnus.com> 19896 19897 * class.c (make_class_data): Push value for `thread' field. 19898 * decl.c (init_decl_processing): Added `thread' field to class. 19899 19900 * class.c (add_field): Always make static fields externally 19901 visible. 19902 199031998-09-26 Anthony Green <green@cygnus.com> 19904 19905 * expr.c (build_java_athrow, 19906 build_java_throw_out_of_bounds_exception, expand_invoke, 19907 build_newarray, expand_java_multianewarray, build_java_monitor): 19908 Update comments to reflect _Jv_* function names. 19909 199101998-09-25 Per Bothner <bothner@cygnus.com> 19911 19912 * decl.c (complete_start_java_method): DECL_RESULT is always promoted. 19913 * decl.c (start_java_method): Handle PROMOTE_PROTOTYPES target macro. 19914 * parse.y (expand_start_java_method): Likewise. 19915 199161998-09-24 Per Bothner <bothner@cygnus.com> 19917 19918 * expr.c (pop_arguments): Handle PROMOTE_PROTOTYPES target macro. 19919 19920 * class.c (push_class): IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE. 19921 (add_field): No longer need to convert from RECORD_TYPE to pointer, 19922 * expr.c: Remove no-longer-needed calls to promote_type. 19923 * decl.c (give_name_to_locals): Liekwise. 19924 * jcf-parse.c (get_class_constant): Compensate for new signatures. 19925 * parse.y: Add/remove promote_type calls as appropriate. 19926 * typeck.c (parse_signature_type): Returns POINTER_TYPE for objects. 19927 (parse_signature_string): Likewise. 19928 (build_java_array_type): Fix for now signature convenions. 19929 19930 * lex.c (java_lex): Fix (from Alex) for JC1_LITE problem. 19931 199321998-09-23 Tom Tromey <tromey@cygnus.com> 19933 19934 * class.c (init_class_processing): libjava function renamed to 19935 _Jv_RegisterClass. 19936 199371998-09-22 Alexandre Petit-Bianco <apbianco@cygnus.com> 19938 19939 * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR. 19940 * java-tree.def: Fixed DEFTREECODE third argument. 19941 (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR, 19942 CASE_EXPR, DEFAULT_EXPR): New tree codes for Java. 19943 * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro. 19944 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, 19945 JAVA_THIS_EXPR): Now replaced by tree code definitions. 19946 (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR. 19947 * lang.c (java_tree_code_type, java_tree_code_length, 19948 java_tree_code_name): New arrays. 19949 (lang_init): Append Java tree node definitions to Gcc ones. 19950 * lex.c (expression_obstack): Declared as extern when JC1_LITE 19951 defined. 19952 (java_init_lex): Initialize wfl_append, wfl_string_buffer, 19953 wfl_to_string. 19954 (java_lex): Allow declaration of empty string constants. Retain 19955 location information on CASE_TK and DEFAULT_TK. 19956 * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P, 19957 JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P): 19958 Modified to be more robust. 19959 (BUILD_APPEND, BUILD_STRING_BUFFER): New macros. 19960 (build_new_invocation, try_builtin_assignconv, 19961 patch_switch_statement, string_constant_concatenation, 19962 build_string_concatenation, patch_string_cst, patch_string, 19963 java_expand_switch): New function declarations. 19964 * parse.y: Rules related to switch and EH tagged <node>. 19965 (label_id): Set to NULL_TREE 19966 (wfl_string_buffer, wfl_append, wfl_to_string): New static global 19967 tree nodes. 19968 (this_or_super:): Fixed indentation. 19969 (statement:, statement_nsi:, statement_without_trailing_substatement:, 19970 statement_expression:): Removed call to RULE on all sub-rules. 19971 (switch_expression:, switch_labels:): New rules. 19972 (switch_statement:, switch_block:, switch_block_statement_groups:, 19973 switch_block_statement_group:, switch_labels:, switch_label:): 19974 Defined actions. 19975 (throw_statement:, synchronized_statement:, try_statement:): 19976 Defined temporary actions. 19977 (class_instance_creation_expression:): Call 19978 build_new_invocation. Fixed indentation. 19979 (field_access): Fixed indentation. 19980 (method_invocation): Likewise. 19981 (make_qualified_primary): Use THIS_EXPR. 19982 (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When 19983 resolving from SUPER, set *type_found. 19984 (qualify_ambiguous_name): Use NEW_CLASS_EXPR. 19985 (java_complete_tree): Removed unused local variable `location'. Case 19986 for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR, 19987 NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling 19988 on MODIFY_EXPR: and all binary operator tree code cases. Removed 19989 STRING_CST: case. default: checks for patchable strings. 19990 (complete_function_arguments): Transform string constant or 19991 crafted StringBuffer if necessary. 19992 (build_method_invocation): Fixed comments. 19993 (build_new_invocation): New function. 19994 (patch_assignment): Call try_builtin_assignconv to figure a valid 19995 assignment conversion between builtin types. 19996 (try_builtin_assignconv): New function. 19997 (build_binop): Use URSHIFT_EXPR directly to call build. 19998 (operator_string): Use UNARY_PLUS_EXPR. 19999 (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation 20000 operator. 20001 (do_merge_string_cste, merge_string_cste, 20002 string_constant_concatenation, build_string_concatenation, 20003 patch_string, patch_string_cst): New function. 20004 (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR. 20005 (patch_unaryop): Likewise. New test of valid ++/-- operands. 20006 (build_newarray_node): Use NEW_ARRAY_EXPR. 20007 (build_this): Use THIS_EXPR. 20008 (build_return): Enable debug information on return statement. 20009 (build_if_else_statement): Likewise. 20010 (complete_labeled_statement): Fixed related comment. 20011 (build_loop_body): Fixed comment. 20012 (build_bc_statement): Enable debug information on break/continue 20013 statements. 20014 (patch_bc_statement): Fixed typos. Handle SWITCH statement 20015 context. 20016 (patch_switch_statement, case_identity, java_expand_switch): New 20017 functions. 20018 200191998-09-21 Per Bothner <bothner@cygnus.com> 20020 20021 * buffer.h (BUFFER_INIT): New macro. 20022 * jcf-write.c (struct jcf_partial): New type. Put global stuff here. 20023 Pass (struct jcf_partial *state) to most functions. 20024 (jcf_block, jcf_relocation): New types. 20025 Support labels, branches, conditionals, loops. 20026 200271998-09-21 Tom Tromey <tromey@cygnus.com> 20028 20029 * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined. 20030 200311998-09-21 Per Bothner <bothner@cygnus.com> 20032 20033 * decl.c (integer_type_node): Make it have INT_TYPE_SIZE. 20034 * verify.c (verify_jvm_instructions): Use int_type_not (32 bits), 20035 not integer_type_node (INT_TYPE_SIZ bits). 20036 20037 * parse.y (patch_if_else_statement): Accept promoted_boolean_type_node. 20038 20039 * jcf-reader.c (get_attribute): New HANDLE_EXCEPTION_TABLE hook. 20040 * jcf-dump.c (print_exception_table): New function. 20041 (disassemble_method): Better handling of wide instructions. 20042 Make more robust for bad input. 20043 200441998-09-30 Jeffrey A Law (law@cygnus.com) 20045 20046 * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on 20047 FreeBSD. 20048 200491998-09-17 Jeffrey A Law (law@cygnus.com) 20050 20051 * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too. 20052 200531998-09-17 Tom Tromey <tromey@cygnus.com> 20054 20055 * Makefile.in ($(PARSE_H)): Removed target. 20056 200571998-09-17 Jeffrey A Law (law@cygnus.com) 20058 20059 * Makefile.in (JAVA_OBJS): Add memmove.o 20060 (memmove.o): New target & rules. 20061 200621998-09-15 Tom Tromey <tromey@cygnus.com> 20063 20064 * expr.c (expand_invoke): Don't generate a call to the class init 20065 code. 20066 200671998-09-14 Jeffrey A Law (law@cygnus.com) 20068 20069 * Makefile.in: Add many missing dependencies. 20070 * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h 20071 as appropriate. 20072 * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise. 20073 * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise. 20074 200751998-09-11 Per Bothner <bothner@cygnus.com> 20076 20077 * decl.c (complete_start_java_method): If method is static (and 20078 not private) call _Jv_InitClass. 20079 * expr.c (expand_invoke): Don't call build_class_init. 20080 20081 * jvspec.c (jvgenmain_spec): Fix spec for generated .o file. 20082 200831998-09-10 Jeffrey A Law (law@cygnus.com) 20084 20085 * Make-lang.in (GCJ): Define before using. 20086 200871998-09-09 Jeffrey A Law (law@cygnus.com) 20088 20089 * gjavah.c (java_no_argument): Renamed from no_argument to avoid 20090 losing due to namespace pollution in GNU getopt.h 20091 200921998-09-09 Tom Tromey <tromey@cygnus.com> 20093 20094 * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh. 20095 (java.all.cross): Likewise. 20096 (java.rest.encap): Likewise. 20097 200981998-09-08 Jeffrey A Law (law@cygnus.com) 20099 20100 * gjavah.c (print_class_decls): Fix thinko in arglist 20101 * jcv-io.c (find_classfile): Similarly. 20102 201031998-09-07 Jeffrey A Law (law@cygnus.com) 20104 20105 * Makefile.in (INCLUDES): Update for recent toplevel gcc changes. 20106 201071998-09-05 Tom Tromey <tromey@cygnus.com> 20108 20109 * Make-lang.in (java.maintainer-clean): Don't remove parse.h. 20110 (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h. 20111 * Makefile.in (PARSE_C): New macro. 20112 (PARSE_H): Likewise. 20113 (PARSE_SCAN_C): Likewise. 20114 ($(PARSE_C)): Target renamed from parse.c. 20115 ($(PARSE_SCAN_C)): Target renamed from parse-scan.c. 20116 (clean): Remove parse-scan.c as well. 20117 (parse.o): Depend on $(PARSE_C). 20118 201191998-09-05 Anthony Green <green@cygnus.com> 20120 20121 * README, license.terms: Removed. 20122 20123 * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c, 20124 decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h, 20125 javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c, 20126 jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c, 20127 keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c, 20128 lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c, 20129 verify.c, zextract.c, zipfile.h: Fixed copyright assignment, 20130 and Java trademark attribution. 20131 201321998-09-04 Tom Tromey <tromey@cygnus.com> 20133 20134 * Makefile.in: Use gcjh, not gjavah. 20135 * config-lang.in (stagestuff): Use gcjh, not gjavah. 20136 * Make-lang.in: Changed gjavah to gcjh everywhere. 20137 201381998-09-03 Per Bothner <bothner@cygnus.com> 20139 20140 * gjavah.c: Support new -prepend -add -append flags. 20141 (print_method_info): Method is not virtual if class is final. 20142 201431998-09-03 Alexandre Petit-Bianco <apbianco@cygnus.com> 20144 20145 * jv-scan.c: Fixed copyright assignment. 20146 * keyword.gperf: Likewise. 20147 * keyword.h: Likewise. 20148 * lex.c: Fixed copyright assignment. 20149 (java_lex): Push unicode back when parsing '<'. 20150 * lex.h: Fixed copyright assignment. 20151 * parse-scan.y: Likewise. 20152 * parse.h: Fixed copyright assignment. 20153 (build_debugable_stmt, complete_for_loop): New function prototypes. 20154 * parse.y: Fixed copyright assignment. 20155 (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be 20156 size_zero_node when completing a loop with no exit condition. 20157 (for_statement_nsi:): Define action. 20158 (for_init:, for_update:): Return size_zero_node when empty. 20159 (declare_local_variables): Call build_debugable_stmt. 20160 (build_debugable_stmt): New function. 20161 (build_loop_body): Build debugable statement around loop 20162 condition part. 20163 (complete_loop_body): Take into account the debugable statement 20164 around the EXIT_EXPR. 20165 (complete_loop_body): New function. 20166 (patch_exit_expr): Fixed condition inversion. 20167 201681998-09-02 Tom Tromey <tromey@cygnus.com> 20169 20170 * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct 20171 name of thread define. 20172 * jvspec.c (THREAD_NAME): New macro. 20173 (GCLIB): Likewise. 20174 (THREADLIB): Likewise. 20175 (lang_specific_driver): Recognize attempt to link with thread 20176 library or gc library. Recognize -ljava on command line so it 20177 isn't linked against more than once. 20178 201791998-09-02 Alexandre Petit-Bianco <apbianco@cygnus.com> 20180 20181 * parse-scan.y (report_main_declaration): Name of the class 20182 containing `main' can be a qualified name. 20183 201841998-08-31 Tom Tromey <tromey@cygnus.com> 20185 20186 * config-lang.in: Changed gjavac to gjc everywhere. 20187 * Make-lang.in: Changed gjavac to gjc everywhere. 20188 201891998-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com> 20190 20191 * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable. 20192 (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS 20193 and install the files. 20194 * Makefile.in (JAVA_OBJS_LITE): New variable. 20195 (compiler:): Now include jv-scan as a dependency. 20196 (../jv-scan$(exeext), parse-scan.c): New targets. 20197 (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before. 20198 * config-lang.in (compilers): Removed gcj, gjavah from the list. 20199 * jcf-parse.c (parse_source_file): Call java_layout_classes and 20200 check for errors even if parse_only. 20201 * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is 20202 defined. 20203 (yylex): New function. Uses java_lex body. 20204 (java_lex): Removed commented out statement. Remove local variable 20205 literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where 20206 appropriate. Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE, 20207 DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF, 20208 SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST 20209 if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use 20210 SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER 20211 where appropriate. 20212 (java_lex_error): Empty if JC1_LITE is defined. 20213 (java_get_line_col): Return 0 if JC1_LITE is defined. 20214 * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, 20215 SET_MODIFIER_CTX): Moved into the section containing the macros 20216 conditionally defined by JC1_LITE. 20217 (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN 20218 argument if JC1_LITE is defined. 20219 (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF, 20220 REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE 20221 is defined. 20222 (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF, 20223 FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION, 20224 SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set 20225 to different values according to JC1_LITE. 20226 * parse.h (int_fits_type_p, stabilize_reference): Prototype not 20227 declared if JC1_LITE set. 20228 (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not 20229 defined if JC1_LITE not set. 20230 (struct parser_ctx): Reorganized and skip the jc1 front end part 20231 if JC1_LITE set. 20232 (java_layout_classes): New function definition. 20233 (java_push_parser_context, java_init_lex, yyparse, yylex, 20234 yyerror): Prototype always declared. All other static function 20235 prototypes declared only if JC1_LITE is not set. 20236 * parse.y (yyparse, yylex, yyerror): No longer declared here. Now 20237 declared in parse.h. 20238 (java_layout_classes): New function. 20239 (java_complete_expand_methods): No longer layout the class here. 20240 * parse-scan.y: New file. 20241 * jv-scan.c: New file. 20242 202431998-08-25 Tom Tromey <tromey@cygnus.com> 20244 20245 * gjavah.c (main): Handle -friend option. 20246 (friend_specs): New global. 20247 (generate_access): Handle friend_specs. 20248 (process_file): Likewise. 20249 (MAX_FRIENDS): New macro. 20250 (friend_count): New global. 20251 (print_cxx_classname): Added `prefix' argument. Ignore arrays. 20252 Changed all callers. 20253 202541998-08-24 Per Bothner <bothner@cygnus.com> 20255 20256 * jcf-dump.c (process_class): Move JCF_FINISH use to main, 20257 (main): Handle processing all the entries of a named .zip archive. 20258 * jcf-io.c (jcf_trim_old_input): New function. 20259 * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le): New macros. 20260 202611998-08-24 Per Bothner <bothner@cygnus.com> 20262 20263 * lang.c (flag_assume_compiled): Make default be on. 20264 202651998-08-21 Per Bothner <bothner@cygnus.com> 20266 20267 * jcf-dump.c: Add bunches of flags to control output more. 20268 (process_class): New function; support printing more than one class. 20269 (main): Support new --print-main and --javap flags. 20270 * jcf-reader.c (IGNORE_ATTRIBUTE): New hook. 20271 * jcf.h (CPOOL_INDEX_IN_RANGE): New macro. 20272 202731998-08-20 Per Bothner <bothner@cygnus.com> 20274 20275 Change mangling of dispatch table to match C++ vtable (w/thunks). 20276 * class.c (build_dtable_decl), java-tree.h: New function. 20277 (make_class_data): Call it. 20278 * decl.c (init_decl_processing): Likewise. 20279 202801998-08-19 Warren Levy <warrenl@cygnus.com> 20281 20282 * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not 20283 soft_anewarray; adjust args passed. 20284 * expr.c (build_anewarray): Adjust args for soft_anewarray_node to 20285 match _Jv_NewObjectArray. 20286 202871998-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com> 20288 20289 * decl.c (push_labeled_block, pop_labeled_block): New functions. 20290 * expr.c (loopup_label): Call create_label_decl. 20291 (create_label_decl): New function. 20292 (java_lang_expand_expr): Call expand_start_bindings with argument 20293 set to zero. 20294 * java-tree.h Added space after PROTO in function declarations 20295 when necessary. 20296 (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros. 20297 (create_label_decl, push_labeled_block): New function 20298 declarations. 20299 * lex.c (label_id): Initialize. 20300 (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final 20301 switch. 20302 * parse.h Added space after PROTO in function declarations when 20303 necessary. 20304 (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK, 20305 LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY, 20306 LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P, 20307 PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New 20308 macros. 20309 (struct parser_ctxt): New fields current_loop, 20310 current_labeled_block. 20311 (build_if_else_statement, patch_if_else_statement, 20312 add_stmt_to_compound, patch_exit_expr, build_labeled_block, 20313 generate_labeled_block, complete_labeled_statement, 20314 build_bc_statement, patch_bc_statement, patch_loop_statement, 20315 build_new_loop, build_loop_body, complete_loop_body): New function 20316 declarations. 20317 * parse.y (java_warning_count): New global variable. 20318 (label_id): New static variable. 20319 (BREAK_TK, CONTINUE_TK): Token tagged <operator>. 20320 (block:): Return size_zero_node when block is empty. 20321 (empty_statement:): Return size_zero_node. 20322 (statement:): Implement supplemental action when for_statement: is 20323 reduced. 20324 (label_decl:): New rule. 20325 (labeled_statement:): Rewritten using label_decl. Actions 20326 implemented. 20327 (labeled_statement_nsi:): Likewise. 20328 (if_then_statement): Actions implemented. 20329 (while_expression): New rule. 20330 (while_statement:): Rewritten using while_expression. Actions 20331 implemented. 20332 (while_statement_nsi:): Likewise. 20333 (do_statement_begin:): New rule. 20334 (do_statement:): Rewritten using do_statement_begin. Actions 20335 implemented. 20336 (for_statement:): Rewritten using for_begin. Actions implemented. 20337 (for_statement_nsi:): Likewise. 20338 (for_header:, for_begin:): New rules. 20339 (for_init:): Actions implemented. 20340 (statement_expression_list:, break_statement:, 20341 continue_statement:): Likewise. 20342 (yyerror): Count number of issued warning(s). 20343 (java_report_errors): Report error(s) and/or warning(s). 20344 (java_complete_class): Use build_java_argument_signature to 20345 recompute completed method signature. 20346 (java_check_regular_methods): New locals method_wfl and aflags. 20347 Use method_wfl instead of lookup_cl during error reports. Fixed 20348 indentation and modified some error messages. Use 20349 lang_printable_name in method instead of the DECL_NAME. New code 20350 to issue warnings on methods not overriding corresponding methods 20351 private to a different package. 20352 (java_method_add_stmt): Call add_stmt_to_compound. 20353 (add_stmt_to_compound): New function. 20354 (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR, 20355 LOOP_EXPR, EXIT_EXPR and COND_EXPR. 20356 (build_if_else_statement, patch_if_else_statement, 20357 build_labeled_block, generate_labeled_block, 20358 complete_labeled_statement, build_new_loop, build_loop_body, 20359 complete_loop_body, patch_loop_statement, build_bc_statement, 20360 patch_bc_statement, patch_exit_expr): New functions. 20361 * typeck.c (build_java_signature): Build argument signature before 20362 enclosing it in between parenthesis. 20363 203641998-08-17 Warren Levy <warrenl@cygnus.com> 20365 20366 * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in 20367 (JAVA_OBJS): Added reminder comment 20368 203691998-08-13 Nick Clifton <nickc@cygnus.com> 20370 20371 * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to 20372 be interpreted as a long long. 20373 203741998-08-13 Warren Levy <warrenl@cygnus.com> 20375 20376 * decl.c (init_decl_processing): Use _Jv_InitClass, not 20377 soft_initialise_class. Use _Jv_NewMultiArray, not 20378 soft_multianewarray. Use _Jv_ThrowBadArrayIndex, not 20379 soft_badarrayindex. Use _Jv_CheckCast, not soft_checkcast. Use 20380 _Jv_CheckArrayStore, not soft_checkarraystore. Use 20381 _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod. 20382 203831998-08-12 Per Bothner <bothner@cygnus.com> 20384 20385 * decl.c, java-tree.h (this_identifier_node, super_identifier_node, 20386 length_identifier_node): New global tree node constants. 20387 * parse.y (kw_super, kw_this, kw_length): Removed globals. 20388 Replace uses by super_identifier_node etc. 20389 * lex.c (kw_super, kw_this, kw_length): Don't initialize. 20390 20391 * parse.y (resolve_field_access): Don't special-case ".length" if 20392 flag_emit_class_files. 20393 (patch_array_ref): Leave as ARRAY_REF if flag_emit_class_files. 20394 * jcf-write.c (generate_bytecode_insns): Handle ARRAY_REF opcode 20395 and ARRAY.length. 20396 203971998-08-11 Per Bothner <bothner@cygnus.com> 20398 20399 * decl.c (init_decl_processing): Remove unused method_type_node fields. 20400 * class.c (make_method_value): Remove init for removed fields. 20401 20402 * class.c (layout_class): Use build_java_argument_signature. 20403 * java-tree.h (TYPE_ARGUMENT_SIGNATURE): New macro. 20404 20405 * typeck.c (push_java_argument_signature): Removed. Merged into ... 20406 (build_java_argument_signature): Use TYPE_ARGUMENT_SIGNATURE cache. 20407 (build_java_signature): Don't use push_java_argument_signature. 20408 20409 * typeck.c (lookup_argument_method): New function. 20410 * parse.y (java_check_regular_methods): Use lookup_argument_method 20411 instead of lookup_java_method2 followed by lookup_java_method. 20412 20413 * parse.y (check_method_redefinition): Minor optimization. 20414 20415 * jcf-write.c (generate_bytecode_insns): Handle RETURN_EXPR, 20416 MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR. 20417 204181998-08-10 Tom Tromey <tromey@cygnus.com> 20419 20420 * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or 20421 c-pragma.o. 20422 20423 * gjavah.c (java_float_finite): Use K&R-style definition. 20424 (java_double_finite): Likewise. 20425 (generate_access): Now returns void. Changed all callers. 20426 (last_access_generated): Removed. 20427 (process_file): Only make a single pass over the .class file. 20428 204291998-07-29 Per Bothner <bothner@cygnus.com> 20430 20431 * class.c (get_dispatch_table): Add extra dummy vtable entry, 20432 for compatibility for G++ (with -fvtable-thunks). 20433 * expr.c (build_invokevirtual): Add one for extra dummy vtable entry. 20434 20435 * gjavah.c (process_file): Use public inheritance for super-class. 20436 204371998-07-29 Alexandre Petit-Bianco <apbianco@cygnus.com> 20438 20439 * lex.c (java_init_lex): Initialize ctxp->package. 20440 * parse.h (struct parser_ctxt): package and package_len replaced 20441 by tree package, an identifier node. Field method_decl_list is 20442 gone. Fixed comments. 20443 (lookup_field_wrapper, merge_qualified_name, not_accessible, 20444 class_in_current_package): New function prototypes. 20445 * parse.y (array_type:): Set class loaded flag on primitive type 20446 arrays. 20447 (package_declaration:): Assign ctxp->package to the 20448 identifier node. 20449 (method_invocation:): Handle invocation of method qualified by 20450 `super'. 20451 (single_type_import_declaration:): Removed ambiguity check. 20452 (java_pop_parser_context): New local variable `next'. Reset and 20453 set IMPORT_CLASSFILE_NAME flags on current and previous import 20454 list. 20455 (java_accstring_lookup): Use new local macro COPY_RETURN. 20456 (lookup_field_wrapper): New function. 20457 (parser_qualified_classname): Use merge_qualified_name. 20458 (parser_check_super_interface): Broaden error message. 20459 (do_resolve_class): Check for qualified class name in the current 20460 compilation unit if appropriate. 20461 (process_imports): Check for already defined classes. 20462 (check_pkg_class_access): Got rid of call to 20463 get_access_flags_from_decl. 20464 (java_complete_expand_methods): Call safe_layout_class based on 20465 the current class size. 20466 (make_qualified_primary): Build a WFL qualification on primary if 20467 none exists. 20468 (merge_qualified_name): New function. 20469 (make_qualified_name): Use merge_qualified_name. 20470 (resolve_expression_name): Use safe_lookup_field. 20471 (resolve_field_access): Got rid of call to get_access_flags_from_decl. 20472 (resolve_qualified_expression_name): Likewise. Check on resolved 20473 element accessibility. 20474 (not_accessible_p, class_in_current_package): New functions. 20475 (maybe_access_field): Got rid of call to get_access_flags_from_decl. 20476 (patch_method_invocation_stmt): Merged common pieces. Check 20477 accessibility of invoked method. 20478 (check_for_static_method_reference): Add returned type in error 20479 message. 20480 (invocation_mode): Get rid of bogus check on PRIVATE methods. 20481 (refine_accessible_methods_list): Merged two conditions in test. 20482 (java_complete_class): Sanity check on stabilize_ref gone. 20483 * zextract.c (read_zip_archive): Cast lseek second argument to long. 20484 204851998-07-28 Per Bothner <bothner@cygnus.com> 20486 20487 * class.c (hashUtf8String): Fix - use new JavaSoft specification. 20488 204891998-07-24 Tom Tromey <tromey@cygnus.com> 20490 20491 * gjavah.c (F_NAN): Removed. 20492 (F_NAN_MASK): New macro. 20493 (F_POSITIVE_INFINITY): Removed. 20494 (F_NEGATIVE_INFINITY): Likewise. 20495 (java_float_finite): Rewrote. 20496 (D_NAN_MASK): Renamed. 20497 (java_double_finite): Rewrote. 20498 (D_POSITIVE_INFINITY): Removed. 20499 (D_NEGATIVE_INFINITY): Likewise. 20500 20501 * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float] 20502 If verbose, print underlying representation of value in hex. 20503 205041998-07-24 Per Bothner <bothner@cygnus.com> 20505 20506 * buffer.h, buffer.c: New files. 20507 * Makefile.in (JAVA_OBJS): Add buffer.o. 20508 20509 Support locals variables and writing their debug entries to .class. 20510 * jcf-write.c: Simplify some by user new buffer type. 20511 (vode_buffer_grow): Removed. 20512 (struct localvar_info): New type. 20513 (localsvars, localvartable): New buffers. 20514 (localvar_alloc, localvar_free): New functions. 20515 (generate_bytecode_insns): Handle local variables. 20516 (generate_classfile): Write LocalVariableTable attribute. 20517 205181998-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com> 20519 20520 * jcf-io.c (open_in_zip): Check the zipfile magic number. 20521 * zipfile.h (ZIPMAGIC): New macro. 20522 205231998-07-24 Tom Tromey <tromey@cygnus.com> 20524 20525 * Makefile.in (gjavah.o): Updated dependencies. 20526 (jcf-dump.o): Likewise. 20527 (all.indirect): Use ../gjavah. 20528 (../gjavah$(exeext)): Likewise. 20529 (clean): Don't remove gjavah. 20530 (clean): Remove parse.c, not java/parse.c. 20531 * Make-lang.in (java): Added gjavah. 20532 (gjavah$(exeext)): New target. 20533 (GJAVAH_SOURCES): New macro. 20534 (java.all.build): Added gjavah. 20535 (java.all.cross): Likewise. 20536 (java.rest.encap): Likewise. 20537 * config-lang.in (compilers, stagestuff): Added gjavah. 20538 205391998-07-23 Tom Tromey <tromey@cygnus.com> 20540 20541 * gjavah.c (java_float_finite): New function. 20542 (java_double_finite): Likewise. 20543 (F_POSITIVE_INFINITY): New macro. 20544 (F_NEGATIVE_INFINITY): Likewise. 20545 (F_NAN): Likewise. 20546 (D_POSITIVE_INFINITY): Likewise. 20547 (D_NEGATIVE_INFINITY): Likewise. 20548 (D_NAN): Likewise. 20549 (print_field_info): Use java_float_finite and java_double_finite. 20550 205511998-07-23 Per Bothner <bothner@cygnus.com> 20552 20553 * parse.y (method_header): Name "this" implicit argument. 20554 205551998-07-22 Per Bothner <bothner@cygnus.com> 20556 20557 * jcf-write.c: Write out LineNumberTable attribute in .class file. 20558 (linenumber_buffer, linenumber_ptr, linenumber_limit): New statics. 20559 (put_linenumber): New function. 20560 (generate_bytecode_insns, generate_classfile): Write line numbers. 20561 205621998-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com> 20563 20564 * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P. 20565 (lookup_name, build_known_method_ref, build_class_init, 20566 build_invokevirtual, invoke_build_dtable, match_java_method, 20567 build_field_ref, pushdecl_force_head, build_java_binop, 20568 binary_numeric_promotion, build_decl_no_layout, 20569 build_java_arrayaccess, build_newarray, build_anewarray, 20570 build_java_array_length_access, build_java_arraynull_check): New 20571 extern function prototypes. 20572 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, 20573 JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in 20574 java-tree.h. 20575 * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref 20576 to NULL 20577 * jcf.h (jcf_out_of_synch): New extern function prototype. 20578 * parse.h: Static/global function implemented in parse.y 20579 prototyped and declarations moved at the end of the file. 20580 (DECL_P): Check that the argument isn't null. 20581 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, 20582 JAVA_THIS_EXPR): No longer defined here. See java-tree.h 20583 (QUAL_DECL_TYPE): New macro. 20584 (PARAMS): Macro definition removed. 20585 * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS. 20586 (return_statement:): Call build_return. 20587 (field_access:): Call make_qualified_primary in sub rule. 20588 (method_invocation:): Build method invocation and call 20589 make_qualified_primary when processing primaries. 20590 (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling 20591 get_type_from_signature. 20592 (java_check_regular_method): Extra integer 0 argument when calling 20593 lookup_java_method2. 20594 (lookup_java_interface_method2): Extra method DECL argument when 20595 calling lookup_java_interface_method2. 20596 (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created 20597 COMPOUND_EXPR node. 20598 (java_complete_expand_method): Layout current class iff not 20599 already done. Don't process interface's methods. 20600 (java_complete_expand_method): Use super class only if it 20601 exists. Use current class otherwise. 20602 (make_qualified_primary): New function. 20603 (resolve_expression_name): Process qualified expression or 20604 expression from primary the same way. 20605 (resolve_expression_name): Two last arguments to 20606 resolve_field_access are now NULL_TREEs. 20607 (resolve_field_access): New variable is_static. Local field must 20608 be DECLs. is_static computed on field DECLs only. Append code in 20609 where_found to the field access if necessary. Use QUAL_DECL_TYPE 20610 to initialize field_type. 20611 (resolve_qualified_expression_name): New local variable, 20612 previous_call_static and is_static. Handle primaries with function 20613 calls, casts, array references and `this'. `super' now handled as 20614 `(super_class)this'. Use is_static to clarify boolean expressions. 20615 Added code to handle case where a proper handle is required to 20616 access a field. Use QUAL_DECL_TYPE where applicable. 20617 (maybe_access_field): New function. 20618 (patch_method_invocation_stmt): New arguments primary, where, 20619 is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P 20620 deleted. Use `where' as a type to search from if specified. Check 20621 for static method reference where forbidden. Append primary or 20622 current_this to the argument list if not calling constructor nor 20623 static methods. 20624 (check_for_static_method_reference): New function. 20625 (patch_invoke): Layout the class on which new is done if 20626 necessary. 20627 (lookup_method_invoke): Changed format to report errors on 20628 methods. 20629 (qualify_ambiguous_name): New local variable this_found. Now 20630 handle things from primaries. Method call are considered 20631 expression names. 20632 (identical_subpath_p): NULL_TREE arguments to breakdown_qualified 20633 changed into NULLs. 20634 (not_initialized_as_it_should_p): Comply with the new DECL_P. 20635 (java_complete_tree): New case fo RETURN_EXPR. Process function 20636 call arguments in separate function. 20637 (complete_function_arguments): New function. 20638 (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P 20639 anymore. 20640 (patch_assignment): Take the return function slot into account as 20641 a RHS. Distinguish assignment from a return. 20642 (valid_ref_assignconv_cast_p): Use build_java_argument_signature 20643 when checking methods in interfaces. 20644 (resolve_type_during_patch): NULL argument to unresolve_type_p 20645 instead of NULL_TREE. 20646 (patch_newarray): Fixed typo in comment. 20647 (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL. 20648 (build_return, patch_return): New functions. 20649 * typeck.c (lookup_java_constructor): Fixed typo in comment. 20650 206511998-07-21 Per Bothner <bothner@cygnus.com> 20652 20653 * constants.c (find_name_and_type_constant, find_fieldref_index, 20654 find_methodref_index): New methods. 20655 * expr.c (build_invoke_non_interface): If flag_emit_class_files, 20656 just return given method. Also, rename to build_known_method_ref. 20657 (expand_invoke): Rename call to build_invoke_non_interface. 20658 * java-tree.h, parse.h: Update prototype. 20659 * parse.y, decl.c, jcf-parse.c: Suppress calls to back-end functions 20660 (such as expand_expr_stmt) if flag_emit_class_files. 20661 * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP, 20662 STACK_TARGET, IGNORE_TARGET): New macros. 20663 (code_buffer, code_ptr, code_limit, code_S, code_SP_max): New globals. 20664 (generate_bytecode_insn): New function to generate method's bytecode. 20665 (generate_classfile): Node generate Code attribute for a method. 20666 (code_buffer_grow, push_constant1, push_constant2, push_int_const, 20667 push_long_const, field_op, adjust_typed_op, maybe_wide): 20668 New functions used by generate_bytecode_insn. 20669 20670 * typeck.c (signature_include_return): Remove variable. 20671 (push_java_argument_signature, build_java_argument_signature): New. 20672 (build_java_signature): Use push_java_argument_signature. 20673 * parse.y: Use build_java_argument_signature instead of fiddling 20674 with signature_include_return. 20675 206761998-07-17 Tom Tromey <tromey@cygnus.com> 20677 20678 * gjavah.c (print_c_decl): Always generate JArray<>* for array 20679 types. 20680 20681 * Makefile.in (all.indirect): Added gjavah$(exeext). 20682 (gjavah$(exeext)): Added $(exeext). 20683 (clean): Likewise. 20684 206851998-07-16 Alexandre Petit-Bianco <apbianco@cygnus.com> 20686 20687 * class.c (layout_class): Call to java_layout_parsed_class replace 20688 by safe_layout_class. 20689 * expr.c (build_java_array_length_access): Removed static storage 20690 class in the function definition. 20691 (build_java_arraynull_check): Likewise. 20692 Also fixed typos in two comments. 20693 * lex.c (java_init_lex): Initialize static global kw_length. 20694 (java_lex): Use BUILD_OPERATOR on RETURN_TK. 20695 * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to 20696 java_lex_error. 20697 (JAVA_INTEGRAL_RANGE_ERROR): Likewise. 20698 * parse.h (resolve_no_layout): New static function declaration. 20699 (get_identifier_in_static): Declaration removed. 20700 (java_layout_parsed_class): Function name declaration changed to 20701 safe_layout_class. 20702 (build_newarray_node, patch_newarray, resolve_type_during_patch, 20703 not_initialized_as_it_should_p, build_this): New static function 20704 declarations. 20705 (pushdecl_force_head, build_java_binop, int_fits_type_p, 20706 binary_numeric_promotion, stabilize_reference, 20707 build_decl_no_layout, build_java_arrayaccess): Extern function 20708 declarations moved into their own section. 20709 (build_newarray, build_anewarray, build_java_array_length_access, 20710 build_java_arraynull_check): New extern function declarations. 20711 (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR. 20712 (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New 20713 fake tree codes. 20714 (CALL_CONSTRUCTOR_P): New macro. 20715 * parse.y (kw_length): New static global tree node. 20716 (return_statement): Tagged <node>. 20717 (RETURN_TK): Tagged <operator>. 20718 (variable_declarator_id:): Build variable declaration with an 20719 empty initialization value if a syntax error was found in the 20720 initialization part of the variable declaration. 20721 (statement_without_trailing_substatement:): return_statement: now 20722 uses the default rule. 20723 (return_statement:): Temporarily fixed to return NULL_TREE. 20724 (primary_no_new_array:): Call build_this when THIS_TK was parsed. 20725 (class_instance_creation_expression:): Class creation rules now 20726 call build_method_invocation upon reduction. 20727 (array_creation_expression:): Rules call build_newarray_node upon 20728 reduction. 20729 (dim_exprs:): Build a list of dimension expressions. 20730 (dim_expr:): Store location of the OSB_TK in the dimension 20731 expression node. 20732 (method_invocation:): Added a new error rule. 20733 (build_unresolved_array_type): WFL argument may also be an array 20734 on a primitive type. Name of the argument changed to reflect this. 20735 (method_declarator): Insert argument type at the beginning of the 20736 argument type list and later reverse the list. 20737 (unresolved_type_p): Argument 'returned' may be optionally 20738 NULL_TREE. 20739 (java_layout_class_from_source): Function renamed 20740 safe_layout_class. 20741 (resolve_and_layout): Now call resolve_no_layout and 20742 safe_layout_class. 20743 (resolve_no_layout): New function. 20744 (purify_type_name): New function. 20745 (complete_class_report_errors): Call purify_type_name during error 20746 report on a type not found. 20747 (process_imports): error_found local variable doesn't need to be 20748 initialized to zero. 20749 (declare_local_variables): New local type_wfl. Fixed typo in error 20750 message. type_wfl assigned to unresolved type and used to register 20751 incomplete type. Build a WFL around the variable initialization 20752 statement so that debug info can be generated on it. 20753 (source_start_java_method): Reverse argument list after they've 20754 been processed. 20755 (current_this): New static global variable. 20756 (java_complete_expand_methods): Set current_this when appropriate. 20757 (resolve_expression_name): Build correct static and non static 20758 field access bearing a simple name. 20759 (resolve_field_access): Resolve the length field of arrays. Handle 20760 f.m() cases. 20761 (patch_method_invocation_stmt): Set the type of the method 20762 invocation to error_mark_node. This value is later overridden by a 20763 valid type, if any. Don't handle qualified constructor invocation 20764 as qualified method invocation. Call lookup_method_invoke with its 20765 new flag. It's no longer necessary to access the selected method 20766 as the value of a tree list. Handle constructor invocation. 20767 (patch_invoke): Reverse argument list when invoking non interface 20768 methods. Insert call to new as the first argument of the 20769 constructor. 20770 (invocation_mode): Return a INVOKE_STATIC is the invoked method is 20771 defined within a final class. Return INVOKE_STATIC if the invoked 20772 method is a constructor. 20773 (lookup_method_invoke): New lc argument is a flag to indicate a 20774 constructor lookup. Now handle constructor lookup. Choose the most 20775 specific method in case several were matching the invocation 20776 requirements. Return a method decl instead of a tree list featuring 20777 one single method decl element. 20778 (refine_accessible_methods_list): New lc flag argument to 20779 indicate that a constructor is being looked up. 20780 (not_initialized_as_it_should_p): New function. 20781 (java_complete_tree): Now process fake tree codes 20782 JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call 20783 save_expr on resolved function call arguments. Case on 20784 UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR. 20785 (patch_assignment): LHS can be a field access expression. When 20786 dealing with reference, lhs_type is the promoted type of the 20787 rhs_type, not the RHS. Use not_initialized_as_it_should_p where 20788 applicable. 20789 (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR. 20790 (patch_binop): Use not_initialized_as_it_should_p where 20791 applicable. 20792 (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR. 20793 (patch_unaryop): Likewise. And use not_initialized_as_it_should_p 20794 where applicable. 20795 (resolve_type_during_patch): New function. 20796 (patch_cast): Call resolve_type_during_patch to resolve type and 20797 report error accordingly. 20798 (patch_array_ref): Use not_initialized_as_it_should_p where 20799 applicable. Array base expression is saved before being 20800 used. Promote the type of an array elements if it contains non 20801 builtin types. 20802 (build_newarray_node, patch_newarray, build_this): New functions. 20803 208041998-07-16 Tom Tromey <tromey@cygnus.com> 20805 20806 * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't 20807 increment it in `for' statement. 20808 (print_field_info): If number is inf or nan, don't print it. 20809 (print_method_info): If method name is `delete', just ignore it. 20810 (print_c_decl): Special-case jstringArray. 20811 20812 * gjavah.c (help): New function. 20813 (no_argument): New function. 20814 (usage): Changed text. 20815 (main): Rewrote argument handling. Now handles -v, --help, 20816 --version. 20817 (version): New function. 20818 (found_error): New global. 20819 (main): Return found_error. 20820 (generate_access): Set found_error. 20821 (print_c_decl): Likewise. 20822 208231998-07-15 Tom Tromey <tromey@cygnus.com> 20824 20825 * gjavah.c (print_c_decl): Don't print "," when examining field. 20826 Skip type name when looking at "[L" types. 20827 (process_file): Now static. 20828 (generate_access): Now returns int. 20829 (last_access_generated): New global. 20830 (process_file): Clear last_access_generated; make multiple passes 20831 over the class. 20832 (print_field_info): Just return if generate_access returns true. 20833 (print_method_info): Likewise. Also, allow <init> functions to 20834 pass through. 20835 (print_c_decl): Added is_init argument. Print constructors 20836 properly. 20837 (print_cxx_classname): Use UTF8_GET to extract characters from 20838 string. 20839 (print_base_classname): New function. 20840 (print_class_decls): New function. 20841 (process_file): Use it. 20842 (utf8_cmp): New function. 20843 208441998-07-13 Nick Clifton <nickc@cygnus.com> 20845 20846 * lang-options.h: Format changed to match changes in gcc/toplev.c 20847 to implement a --help option. 20848 208491998-07-10 Brendan Kehoe <brendan@cygnus.com> 20850 20851 * decl.c (init_decl_processing): Revert change to dtable_type. 20852 208531998-07-09 Per Bothner <bothner@cygnus.com> 20854 20855 * java-tree.h (CLASS_P): Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4. 20856 208571998-07-08 Brendan Kehoe <brendan@cygnus.com> 20858 20859 * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type. 20860 20861 * lang.c (lang_init): Default flag_exceptions to 1, without 20862 checking to see if it's 2 first. 20863 208641998-07-08 Jeffrey A Law (law@cygnus.com) 20865 20866 * constants.c: Include "system.h". 20867 * decl.c: Likewise. 20868 * lang.c (flag_new_exceptions): Get via extern now. 20869 (lang_init_options): New functions. Turn on flag_new_exceptions. 20870 208711998-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com> 20872 20873 * lex.c (java_lex): Return 0 when we see an invalid character in 20874 the input. 20875 20876 * lex.c (java_read_char): Specify extra argument when calling 20877 java_lex_error. 20878 (java_read_unicode, java_parse_end_comment, 20879 java_parse_escape_sequence): Likewise, 20880 (java_lex): Specify extra argument when calling 20881 java_lex_error. Test that IDs are beginning with a legal character 20882 for IDs. Handle invalid characters with an error message and a 20883 call to java_lex_error. 20884 (java_lex_error): Adjust column position by new argument 20885 `forward'. Issue an error even if in the middle of reporting an 20886 other error. 20887 208881998-07-07 Brendan Kehoe <brendan@cygnus.com> 20889 20890 * jcf-io.c (find_class): Zero out BUFFER before we use it, since 20891 we don't explicitly put a null pointer when we're copying it. 20892 208931998-07-07 Tom Tromey <tromey@cygnus.com> 20894 20895 * gjavah.c (print_cxx_classname): New function. 20896 (super_class_name): Likewise. 20897 (print_super_fields): Removed. 20898 (in_super): Removed. 20899 (print_field_info): Never generate #defines. 20900 (print_c_decl): Changed generated types to match JNI. No longer 20901 print class name before method name. 20902 (print_method_info): Print "static" before static methods. 20903 Print "virtual" before non-final methods. 20904 (usage): Use exit(1), not exit(-1). 20905 (main): Likewise. 20906 (print_field_info): Use %.17g to print a double. 20907 (last_access): New globals. 20908 (process_file): Initialize last_access. 20909 (usage): Now static. 20910 (ACC_VISIBILITY): New define. 20911 (generate_access): New function. 20912 (print_field_info): Call it. 20913 (print_method_info): Likewise. Also, generate information for all 20914 methods, not just native methods. Return void. 20915 (print_c_decl): Return void. 20916 (print_field_info): Return void. 20917 209181998-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com> 20919 20920 * Makefile.in (JAVABISONFLAGS): Specific flag for bison when 20921 processing the jc1 grammar file. Prefix bison functions and 20922 variables with java_. 20923 (parse.c): Dependencies on parse.h and lex.h 20924 * expr.c (build_java_arrayaccess): Function now global. 20925 * java-tree.h: Comment reorganized to carry on previous 20926 classification effort. 20927 (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P, 20928 RESOLVE_TYPE_NAME_P): New flags on WFLs. 20929 * jcf-parse.c (parse_source_file): java_parse_source_file renamed 20930 java_parse (new prefix java_ generated by bison). 20931 (java_layout_parsed_class, java_register_parsed_class): Function 20932 call removed. 20933 (yyparse): Removed unnecessary call to init_outgoing_cpool. 20934 * lex.c (static tree wfl_op): Variable deleted. 20935 (java_init_lex): Initialize kw_super and kw_this. Initialize more 20936 ctxp fields to NULL_TREE. 20937 (java_lex): No longer create WFL for operators. Filename caching 20938 mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings 20939 created as STRING_CST and later expanded. Removed extra argument 20940 to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS 20941 and SUPER. 20942 (build_wfl_node): Removed code in comments. 20943 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but 20944 store token and location data in the current bison token. 20945 * parse.h: Removed pre-processor based symbol prefixes hack. Moved 20946 static/extern function declaration at the beginning of the file. 20947 (struct qualification): Data structure definition deleted. 20948 (RESOLVE_CHAIN_REMAINDER): Macro definition deleted. 20949 (qualify_ambiguous_name): Function declaration modified. Function 20950 now returns nothing. 20951 (build_array_ref, patch_array_ref, make_qualified_name, 20952 resolve_qualified_expression_name, maybe_generate_clinit, 20953 resolve_field_access): New static function declarations. 20954 (build_java_arrayaccess): New extern function declaration. 20955 (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted. 20956 (CALL_EXPR_PRIMARY): Macro deleted. 20957 (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros. 20958 (struct parser_ctxt): Field initialized_final 20959 removed. non_static_initialized, static_initialized: New fields. 20960 * parse.y (static tree kw_super, static tree kw_this): New global 20961 static. 20962 (%union): tree wfl field of operator member replaced by int 20963 location. WFLs are non longer created for operators. 20964 (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>. 20965 (qualified_name:): Now calls make_qualified_name to build the 20966 identifier. 20967 (type_declaration:): Consider generating <clinit> when class 20968 parsing completed. 20969 (variable_declarator:): Directly build an assignment node when the 20970 variable is initialized when declared. 20971 (this_or_super:): Build a WFL and set current location when THIS 20972 or SUPER are parsed. 20973 (expression_statement:): Wrap statement around a WFL. 20974 (primary_no_new_array:): Fixed typo. Changed value returned by 20975 THIS_TK because of its new type (temporary). 20976 (dim_exprs:): Temporary fix because of OSB_TK's new type. 20977 (field_access:): Build qualified name with SUPER. 20978 (method_invocation:): Fixed returned value because of SUPER's new 20979 type. 20980 (array_access:): Use OSB_TK location information. 20981 (post_increment_expression:, post_decrement_expression:, 20982 unary_expression:, pre_increment_expression:, 20983 pre_decrement_expression:, unary_expression_not_plus_minus:, 20984 cast_expression:, multiplicative_expression:, 20985 additive_expression:, shift_expression:, relational_expression:, 20986 equality_expression:, and_expression:, exclusive_or_expression:, 20987 inclusive_or_expression:, conditional_and_expression:, 20988 conditional_or_expression:, assignment:): Use new location/token 20989 information available on operators. 20990 (create_class): Set super_decl_type to NULL_TREE when processing 20991 java.lang.Object. 20992 (register_fields): Field initialization is now a MODIFY_EXPR 20993 node. Chain initialization code to the matching lists (according 20994 to the field declaration modifiers). 20995 (maybe_generate_clinit): New function. 20996 (method_header): Don't set method's DECL_NAME to a WFL when adding 20997 methods to java.lang.Object. 20998 (resolve_and_layout): Now can return NULL_TREE if the type 20999 resolution fails. Otherwise, return the class DECL instead of its 21000 TYPE. 21001 (check_method_redefinition): Don't patch method DECL_NAME if it 21002 belongs to java.lang.Object. 21003 (process_imports): Simply assign error_found to the value returned 21004 by check_pkg_class_access. 21005 (declare_local_variables): Don't use their init statements (if 21006 any) when parsing error were previously found. Reuse MODIFY_EXPR 21007 build during parsing as an init statement. 21008 (java_method_add_stmt): Now return the current method body. 21009 (java_layout_parsed_class, java_register_parsed_class): Functions 21010 removed. 21011 (java_complete_expand_methods): Initialize the constant pool on a 21012 per class basis. Layout the classes before expanding their method 21013 bodies. Don't try expand artificial constructor code if error were 21014 found. Make the classes data and register them if no error were 21015 found. 21016 (java_complete_expand_method): Retrieve an artificial constructor 21017 argument list before entering its body. Assign the top block to 21018 the artificial constructor function body and set types of declared 21019 blocks and compound statements to void. Walk method body if not an 21020 artificial constructor. 21021 (make_qualified_name, cut_identifier_in_qualified): New functions. 21022 (resolve_expression_name): Fixed comments. Save/restore the 21023 current class CLASS_LOADED_P flag value. Build non qualified 21024 static field access and handle qualified expression names. 21025 (resolve_field_access, resolve_qualified_expression_name): New 21026 functions. 21027 (patch_method_invocation_stmt): Use the new expression resolution 21028 scheme, calling resolve_field_access when the function call is 21029 resolved as an expression. 21030 (qualify_ambiguous_name): Function rewritten to work on qualified 21031 expression produced by make_qualified_name. 21032 (java_complete_tree): Promote type when function's argument are 21033 RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch 21034 the assignment to discover further errors if RHS is a expression 21035 name that fails to evaluate. Declare LHS initialized even though 21036 the assignment failed. Don't use the location variable and removed 21037 extra argument in patch function calls. Now handle the ARRAY_REF 21038 case and build internal string representation when STRING_CSTs are 21039 walked. 21040 (build_method_invocation): Don't wrap function call around a WFL. 21041 (build_assignment): Likewise. Use the operator location 21042 information. 21043 (patch_assignment): Handle array access LHSs. Handle error 21044 provenance, resulting in a better error report. 21045 (build_binop): Use op_location from operator as binop location 21046 information. 21047 (build_unaryop, build_incdec, build_cast): Likewise. 21048 (patch_binop): Extract location information from the node. Fixed 21049 typo in error message. 21050 (patch_unary_op): Extract location information from the node. 21051 (build_array_ref, patch_array_ref): New functions. 21052 210531998-07-01 Tom Tromey <tromey@cygnus.com> 21054 21055 * expr.c (expand_java_INSTANCEOF): Changed calling convention to 21056 match _Jv_IsInstanceOf. 21057 * decl.c (init_decl_processing): Use _Jv_NewArray, not 21058 soft_newarray. Use _Jv_IsInstanceOf, not soft_instanceof. 21059 210601998-06-30 Tom Tromey <tromey@cygnus.com> 21061 21062 * decl.c (init_decl_processing): Functions are now named 21063 _Jv_MonitorEnter and _Jv_MonitorExit, and return jint. 21064 210651998-06-29 Per Bothner <bothner@cygnus.com> 21066 21067 * java-tree.h (load_class): Add prototype. 21068 * class.c (is_compiled_class): Add missing arg to load_class. 21069 * expr.c (expand_java_NEW): Call load_class. 21070 * parse.y (process_import): Removed bogus use of void return value. 21071 210721998-06-25 Per Bothner <bothner@cygnus.com> 21073 21074 * decl.c, java-tree.h (soft_athrow_node): Renamed to soft_node. 21075 Function name is "_Jv_Throw" instead of "soft_athrow". 21076 * decl.c, java-tree.h (soft_new_node): Renamed to alloc_object_node. 21077 Function name is "_Jv_AllocObject" instead of "soft_new". 21078 Takes an extra parameter (object size). 21079 * expr.c: Update calls. 21080 210811998-06-24 Per Bothner <bothner@cygnus.com> 21082 21083 * lex.c (java_get_line_col): Handle end-of-file. 21084 * except.c (expand_end_java_handler): Handle null type (i.e. finally). 21085 210861998-06-24 Andrew MacLeod <amacleod@cygnus.com> 21087 21088 * lang.c (lang_init): Make -fexceptions the default. 21089 * except.c (maybe_start_try, maybe_end_try): Don't do anything if 21090 exception handling is not turned on. 21091 210921998-06-23 Andrew MacLeod <amacleod@cygnus.com> 21093 21094 * lang.c (flag_new_exceptions): Make this this default. 21095 * decl.c (end_java_method): Call emit_handlers. 21096 * except.c (method_init_exceptions): Set language code and version. 21097 (expand_start_java_handler): Enable exception, and call 21098 expand_eh_region_start. 21099 (expand_end_java_handler): Enable exception, and set up catch blocks. 21100 (emit_handlers): New routine to generate the saved handlers. 21101 * java-except.h (emit_handlers): Add prototype. 21102 211031998-06-12 Per Bothner <bothner@cygnus.com> 21104 21105 We used to have three different representations of the constant pool: 21106 the CPool structure, the tree_constant_pool, and the constructures 21107 used to build the Class object (which may need class and string 21108 constants) in compiled code. None were appropriate for compiling 21109 to .class files, so I did a major overhaul. 21110 21111 First, the tree_constant_pool array was removed. Things were 21112 modified to the CPool structure in the JCF could be used. 21113 Second, a "capacity" field was added to the CPool, and functions 21114 written to search for a matching constant, adding one if not found. 21115 The code that generated the Class object was changed to use a CPool. 21116 The actual TREE_LISTs used to build the CONSTRUCTORs used for 21117 the static Class object are now only in build_constants_constructor. 21118 Finally, I wrote code which can generate a .class file (including its 21119 constant pool) from the RECORD_TYPE of a class. This is a big step 21120 on the way to compiling Java source into .class files. 21121 21122 * jcf-write.c: New file. Writes out a RECORD_TYPE as a .class file. 21123 * Makefile.in (JAVA_OBJS): Added jcf-write.o. 21124 21125 * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag, 21126 CONSTANT_ResolvedString, CONSTANT_ResolvedClass): New macros. 21127 (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME, 21128 COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined. 21129 (COMPONENT_REF_CLASS): Replaced by COMPONENT_REF_CLASS_INDEX. 21130 (lang_type): Removed constant_pool field. 21131 * jcf.h (CPool): Renamed size to count. Added field capacity. 21132 (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2, 21133 CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT): New macros. 21134 Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros. 21135 21136 * constants.c (current_constant_pool_tags, current_constant_pool_data, 21137 current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool. 21138 * constants.c (build_constants_constructor): Use new outgoing_cpool. 21139 (set_constant_entry, find_constant1, find_constant2, 21140 find_class_constant, count_constant_pool_bytes, write_constant_pool, 21141 find_utf8_constant, find_class_or_string_constant): New functions. 21142 21143 * jcf-parse.c (load_class): Don't save/restore tree-constant_pool. 21144 (get_constant): Use current_jcf.cpool instead of tree_constant_pool. 21145 (give_name_to_class, get_class_constant): Likewise. 21146 * jcf-parse.c, java-tree.h (tree_constant_pool): Removed. 21147 (get_name_and_type_constant, get_ref_constant): Removed. 21148 * parse.h (parser_ctxt): Remove field tree_constant_pool. 21149 * parse.y: Don't save/restore tree_constant_pool. 21150 * verify.c (verify_jvm_instructions): Update for new approach. 21151 * expr.c (expand_invoke, expand_java_field_op): Likewise. 21152 21153 * lang-options.h: Added -femit-class-file, -femit-class-files. 21154 * lang.c (flag_emit_class_files), java-tree.h: New flag. 21155 (lang_f_options): Added "emit-class-file(s)". 21156 21157 * expr.c (build_java_arrayaccess): Generate more efficient array 21158 bounds checking, by using unsigned compare. 21159 21160 * expr.c (expand_invoke): Re-arrange error checks to make more robust. 21161 211621998-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com> 21163 21164 * parse.h: New comment on the handling of unresolved type 21165 identifiers. JDEPs are now part of the jdep_code enum. 21166 (typedef struct jdep): Now use enum jdep_code or int, depending on 21167 availability. Both are narrowed down to an 8 bits bitfield. 21168 (CALL_EXPR_PRIMARY): Fixed comment. 21169 211701998-06-10 Tom Tromey <tromey@cygnus.com> 21171 21172 * Make-lang.in (java): Added gjavac and jvgenmain. 21173 (java.start.encap): Depend on gjavac. 21174 (java.rest.encap): Depend on jvgenmain. 21175 21176 * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++. 21177 (JAVA_CROSS_NAME): Likewise. 21178 (java.all.build): Depend on jvgenmain and gjavac. 21179 (java.all.cross): Depend on jvgenmain and gjavac-cross. 21180 (jvgenmain$(exeext)): New target. 21181 (java.install-common): Wrote. 21182 * config-lang.in (compilers, stagestuff): Added gjavac and 21183 jvgenmain. 21184 211851998-06-10 Dave Brolley <brolley@cygnus.com> 21186 21187 * lang.c (lang_decode_option): New argc/argv interface. 21188 211891998-06-09 Alexandre Petit-Bianco <apbianco@cygnus.com> 21190 21191 * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard. 21192 * decl.c (build_decl_no_layout): New function. 21193 * expr.c (java_lang_expand_expr): Layout declarations found in 21194 blocks before they're pushed. 21195 * jcf-parse.c (load_class): Save current line when parsing class 21196 file. 21197 (parse_source_file): Register class before expanding their 21198 methods. 21199 * lang.c (put_decl_node): Produce `null' when `void *' is 21200 processed. 21201 * lex.c (static tree wfl_op): New static global, for error report 21202 on casts. 21203 (java_init_lex): wfl_operator and wfl_op initialized 21204 here. Filename caching added for wfl_op. Return wfl_op when `(' is 21205 parsed. 21206 * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast, 21207 patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p, 21208 build_unresolved_array_type): New static function definitions. 21209 (build_decl_no_layout): New extern function declared. 21210 (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the 21211 faulty modifier exists. 21212 (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros. 21213 (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned. 21214 (UNARY_PLUS_EXPR): New fake operator. 21215 (struct parser_ctxt): New field osb_number. 21216 * parse.y (static tree wfl_operator): New static WFL for operator 21217 bound error messages. 21218 (DECR_TK, INCR_TK): Moved. 21219 (OP_TK): Tagged <operator>. 21220 (array_type:): Now call build_unresolved_array_type. 21221 (dim_expr:): Count the number of '[' seen. 21222 (post_increment_expression, post_decrement_expression, 21223 pre_increment_expression, pre_decrement_expression, 21224 unary_expression_not_plus_minus, unary_expression:): Actions are 21225 now building the corresponding unary expressions. 21226 (cast_expression:): Actions are now building cast expressions. 21227 (build_unresolved_array_type): New function. 21228 (create_interface): Reset the number of declared interfaces. 21229 (create_class): Likewise. 21230 (method_header): Methods declared within the scope of an interface 21231 are now implicitly set public and abstract. 21232 (java_complete_class): Variable's and parameter's type are patched 21233 with a promoted type. 21234 (declare_local_variables): Resolved non builtin types are promoted 21235 before being used to build a variable decl. Removed type patch 21236 posted on variable initialization statement. 21237 (source_start_java_method): Use build_decl_no_layout to build the 21238 decl of a parameter of incomplete type. 21239 (java_register_parsed_class): Process interfaces too. Call 21240 rest_of_decl_compilation on each processed class declarations. 21241 (java_complete_expand_methods): Don't attempt to expand things in 21242 interfaces. 21243 (java_complete_tree): Process CONVERT_EXPR, even though it always 21244 has a type. Propagate error_mark_node to node's type too. Promote 21245 method's call argument type and return error_mark_node if 21246 argument's completion didn't work. MODIFY_EXPR can have a WFL as a 21247 RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now 21248 handle unary operator nodes. 21249 (build_assignment): Added comment. 21250 (print_int_node): New function. 21251 (patch_assignment): New second argument. New error handling. Use 21252 print_int_node. Handle references. Use can_cast_to_p to issue 21253 different error message according to the context and check upon 21254 the initialization of the RHS. 21255 (can_cast_to_p, valid_ref_assignconv_cast_p): New functions. 21256 (operator_string): Handle more operators. 21257 (patch_binop): No longer use a function static 21258 wfl_operator. Improved error message on shift distance. 21259 (build_unaryop, build_incdec, build_cast, patch_unaryop, 21260 patch_cast): New functions. 21261 212621998-06-05 Per Bothner <bothner@cygnus.com> 21263 21264 * jvspec.c: New file. 21265 * Make-lang.in: New rules to build gjavac from jvspec.c and ../gcc.c. 21266 21267 * java-tree.h (identifier_subst): Add declaration. 21268 212691998-06-04 Tom Tromey <tromey@cygnus.com> 21270 21271 * jvgenmain.c (main): Generate call to JvRunMain. 21272 21273 * class.c (make_class_data): Push value for "sync_info" field. 21274 * decl.c (init_decl_processing): Push "sync_info" field. 21275 212761998-06-03 Per Bothner <bothner@cygnus.com> 21277 21278 * typeck.c (build_java_array_type): Set TYPE_NAME to actual 21279 Java (source) name, not signature. 21280 Set TYPE_ALIGN to (at least) that of element_type. 21281 212821998-06-02 Per Bothner <bothner@cygnus.com> 21283 21284 * class.c: Moved classname-mangling-rekated code to ... 21285 * mangle.c: ... this new file. 21286 * jvgenmain.c: New program (needs mangle.c) to generate main program. 21287 * Makefile.in: Update for above changes. 21288 212891998-06-01 Alexandre Petit-Bianco <apbianco@cygnus.com> 21290 21291 * expr.c (truthvalue_conversion): Convert integer and floating 21292 point value to their truth value. 21293 * lex.c (java_lex): Handle the `null' literal. 21294 * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros. 21295 (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC, 21296 ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED): 21297 New macros. 21298 21299 * parse.y: Reorganization/documentation on token declaration. 21300 (binop_lookup[]): New added new tree codes. 21301 (relational_expression): Build corresponding binary operators. 21302 (equality_expression, conditional_and_expression, 21303 conditional_or_expression): Likewise. 21304 (java_complete_class): Fix crash in debug message. 21305 (java_complete_tree): Check initialization of method call 21306 arguments. Further bogus node evaluation to detect more error 21307 during assignments. Handles more binary operators. 21308 (patch_assignment): Use DECL_P. 21309 (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree 21310 code. 21311 (operator_string): Handle more case. Compacted source. 21312 (patch_binop): Changed function comment. Checking for 21313 uninitialized first operand takes the compound assignment into 21314 account and uses DECL_P. Checking for uninitialized second operand 21315 delayed to routine's end. Use macros to issue type bound error 21316 messages and issue messages on both operands if their types are 21317 different. Force fixed type into node. Handle all binary 21318 operators. 21319 213201998-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com> 21321 21322 * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros. 21323 * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to 21324 build operator node and return tokens. 21325 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros. 21326 * parse.h (java_complete_tree): Changed returned type in prototype. 21327 (build_method_invocation, build_assignment, patch_assignment, 21328 patch_binop): New static function declarations. 21329 (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P, 21330 BUILD_EXPR_WFL): New macros. 21331 * parse.y (enum tree_code binop_lookup[]): New static for token to 21332 TREE_CODE lookup. 21333 (%union): Parser union has new sub-structure `operator'. 21334 (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK, 21335 PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK, 21336 ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK, 21337 ASSIGN_ANY_TK): Tokens tagged `operator'. 21338 (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK, 21339 AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK, 21340 MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK, 21341 REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'. 21342 (assignment_operator:): Rule tagged `operator'. 21343 (expression_statement:): Re-installed default rule. 21344 (method_invocation:): Sub rules call build_method_invocation. 21345 (postfix_expression:): Don't attempt to resolve name here. Just 21346 return an ID. 21347 (multiplicative_expression:): Sub-rules build corresponding binop 21348 expression node. 21349 (additive_expression:, shift_expression:, and_expression:, 21350 exclusive_or_expression:, inclusive_or_expression:): Likewise. 21351 (assignment:): Sub rule invoke build_assignment. 21352 (assignment_operator:): Default rules on sub rules. 21353 (force_error): Added documentation on this variable. 21354 (declare_local_variables): Build initialization calling 21355 build_assignment. 21356 (expand_start_java_method): Removed unused rtx declaration. Mark 21357 arguments as already initialized. 21358 (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL. 21359 (java_complete_expand_methods): Don't process next method if 21360 completion of the previous one triggered errors. 21361 (java_complete_expand_method): Call source_end_java_method if no 21362 error were found during completion. 21363 (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve 21364 locals declaratilon. Handle names found within a class. Return 21365 error_mark_node when things aren't found. 21366 (patch_method_invocation_stmt): Return error_mark_node on failures. 21367 (patch_invoke): Removed unused local. Return the correct node. 21368 (java_complete_tree): Now returns a value. The BLOCK section binds 21369 local identifiers and the type of a BLOCK is now void. Assign the 21370 result of operand completion on COMPOUND_EXPR. Assign the 21371 encapsulated node of a WFL to the result of its completion, except 21372 when the node is an identifier. Now handle MODIFY_EXPR and several 21373 binary operators. Return error_mark_node on errors. 21374 (build_method_invocation, build_assignment, patch_assignment, 21375 build_binop, operator_string, patch_binop): New functions. 21376 * typeck.c (binary_numeric_promotion): New function. 21377 213781998-05-21 Per Bothner <bothner@cygnus.com> 21379 21380 * class.c (identifier_subst): New convenience wrapper for ident_subst. 21381 Replace most uses of ident_subst by identifier_subst. 21382 21383 * class.c (push_class_static_dummy_field): Removed function. 21384 (build_class_ref): Find Class object decl by looking up "CNAME.class", 21385 instead of looking got "class" static field. Create that decl here. 21386 (class_identifier_node): Removed; no longer needed. 21387 (init_class_processing): Don't init class_identifier_node. 21388 * jcf-parse.c (jcf_parse): Don't call push_class_static_dummy_field. 21389 Do nreverse 0 times (instead of twice) for Object and Class. 21390 * parse.y (java_layout_parsed_class): No push_class_static_dummy_field. 21391 213921998-05-20 Per Bothner <bothner@cygnus.com> 21393 21394 * jcf-parse.c (parse_class-file): Set lino to smallest line number, 21395 while initializing linenumber_count and linenumber_table. 21396 Do it before init_function_start (which calls emit_line_note). 21397 * expr.c (expand_byte_code): Don't need to clear lineno here. 21398 213991998-05-18 Tom Tromey <tromey@cygnus.com> 21400 21401 * class.c (append_gpp_mangled_type): If `qualifications' is >=9, 21402 then mangle number as _N_. 21403 21404 * class.c (mangle_class_field): New function. 21405 (build_class_ref): Set assembler name of class reference using 21406 mangle_class_field. 21407 (push_class_static_dummy_field): Likewise. 21408 214091998-05-17 Michael Tiemann <tiemann@cygnus.com> 21410 21411 * parse.y (source_start_java_method): Use TREE_SET_CODE instead 21412 of assigning to TREE_CODE. The latter method exploits a feature 21413 of GCC that is not ANSI compliant. 21414 214151998-05-12 Alexandre Petit-Bianco <apbianco@cygnus.com> 21416 21417 * decl.c (pushdecl_force_head): New function. 21418 (pushlevel): Removed conditional printf. 21419 (complete_start_java_method): Don't enter local variable scope if 21420 function is compiled from source code. 21421 * expr.c: parse.h now included 21422 (java_lang_expand_expr): New function. 21423 * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of 21424 printf. Terminate buffer when doing directories. 21425 * jcf-parse.c (parse_source_file): Call lang_init_source before 21426 parsing and before code generation. 21427 * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally 21428 use printf if the macro is defined. 21429 * lang.c (lang_init): Install lang_expand_expr hook on 21430 java_lang_expand_expr. 21431 (java_dummy_print): New function. 21432 (lang_init_source): New function. 21433 * lex.c (java_lex): Remember location of an opening brace at the 21434 second nesting level. 21435 (java_is_eol): Unget character seen after a CR if it is EOF. 21436 * parse.h: Now includes lex.h 21437 (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use 21438 printf if the macro is defined. 21439 (expand_start_java_method, build_expr_block, enter_block, 21440 exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks): 21441 New static function declarations. 21442 (pushdecl_force_head): New extern function declaration. 21443 (INCOMPLETE_TYPE_P): New macro. 21444 (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum. 21445 (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY, 21446 BLOCK_EXPR_ORIGIN): New macros. 21447 (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST, 21448 DECL_SOURCE_LINE_LAST): New macros. 21449 (struct parser_ctxt): Removed field current_method_decl, redundant 21450 with the field current_function_decl. Added fields 21451 first_ccb_indent1 and pending_block. 21452 * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK, 21453 BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules 21454 tagged <node> 21455 (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs. 21456 (compilation_unit:): Cosmetic on sub rule. 21457 (type_declaration:): Cosmetic on sub rules. Added an error rule. 21458 (variable_initializer:): Installed default rule on expression:. 21459 (method_declaration:): method_header: starts a new 21460 method. method_body: installs the function body, absorbs blocks 21461 emitted for temporary variable scopings, pops function's body block 21462 and merges function's last statement lineno in DECL_SOURCE_LINE. 21463 (method_body:): Installed default rules. 21464 (block:): Call enter_block when an opening brace is seen. Absorb 21465 scoping blocks and call exit_block when a closing brace is seen. 21466 (block_statement:): Cosmetic changes. 21467 (method_invocation:): Create WFL around CALL_EXPR node. 21468 (patch_stage): Added comment around definition. 21469 (method_header): Try to use first_ccb_indent1 as the first line of 21470 the method, so BP debug info are emitted at the first opening 21471 brace of the function. If the function has no body, use the 21472 location of the function's name. Override currently defined method 21473 name with the matching WFL so we can point redefinition errors 21474 using the location where the function's name was declared. 21475 (check_abstract_method_header): Interprets DECL_NAME as an 21476 identifier or as a WFL, accordingly. 21477 (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM. 21478 (check_method_redefinition): Use DECL_NAME as a WFL. Extract 21479 location and name information out of it and reinstall DECL_NAME to 21480 its original identifier node value. 21481 (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the 21482 function's source code). 21483 (read_import_dir): Test the value returned by find_class and issue 21484 a fatal accordingly. 21485 (declare_local_variables): Push a new block for the scope of the 21486 new variable(s) if code has been already generated at that nesting 21487 level. Pinpoint redefinition errors using the variable id 21488 WFLs. Generate initialization code if necessary. If the variable 21489 type is incomplete, register a patch on its decl. 21490 (source_start_java_method): Rewritten. Define a new block for the 21491 function's parameters. Build parameter decl out of function's 21492 arguments and register them for a patch if their types are 21493 incomplete. 21494 (expand_start_java_method): Includes the part of 21495 source_start_java_method that was pushing the parameter decls and 21496 completing the method start code. 21497 (source_end_java_method): Removed call the expand_end_bindings and 21498 poplevel (already taken care of). Reinstall function's arguments 21499 and get function's last line of code before calling 21500 expand_function_end. 21501 (java_method_add_stmt): New comment before the function's 21502 code. Complement the second operand of the current COMPOUND_EXPR 21503 if necessary. 21504 (java_complete_expand_methods): Don't generate debug info on line 21505 zero when expanding a generated constructor. 21506 (java_complete_expand_method): Set start and end line numbers for 21507 a artificially generated constructor to one and manually call 21508 enter_block and exit_block when defining it. For all methods: 21509 expand function's start calling the new expand_start_java_method 21510 and invoke java_complete_tree on the effective method's body, if 21511 any. 21512 (resolve_expression_name): Now use lookup_name_in_blocks to search 21513 local variable decls and print out an error when variables are 21514 undefined. 21515 (patch_method_invocation_stmt): Inserted comment before the 21516 function's code. 21517 (lookup_method_invoke): Chain method's arguments using chainon 21518 with the current arg list as a second argument. Inserted missing 21519 IDENTIFIER_POINTER when reporting an error on methods not found. 21520 (refine_accessible_methods_list): Don't retain constructors. 21521 (patch_arguments): Function removed. 21522 (java_complete_tree): Inserted comment before the function's 21523 code. New case for BLOCKs. Moved the WFL case a bit 21524 further. Complete function's arguments. 21525 (build_expr_block, enter_block, exit_block, lookup_name_in_blocks, 21526 maybe_absorb_scoping_blocks): New functions. 21527 215281998-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com> 21529 21530 * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if 21531 previously set. 21532 * jcf-parse.c (parse_source_file, java_error_count): New forward 21533 and extern declarations. 21534 (java_parse_abort_on_error): Macro moved. 21535 (jcf_parse_source): fatal called if fopen fails. Now calls 21536 parse_source_file. 21537 (parse_source_file): New parse_only parameter. Reflects the 21538 elimination of the second pass. 21539 (yyparse): parse_source_file called with argument set to 0. 21540 * jcf.h (JCF_ZERO): Sets java_source to zero. 21541 * lex.c (java_init_lex): pass argument is gone. Function modified 21542 to be called once during the analysis of a file. 21543 (java_unget_unicode): Fixed typo in fatal message. 21544 (java_get_line_col): Likewise. 21545 (java_lval): Likewise. String literals no longer built during 21546 second pass. 21547 * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into 21548 account. 21549 * parse.h (MODIFIER_WFL): New macro. 21550 (parse_check_super, parser_check_super_interface): Now return int. 21551 (parser_chain_incomplete_item, not_builtin_p, 21552 complete_method_decl): Declarations removed. 21553 (build_method_invocation_stmt, build_invoke): Renamed using the 21554 `patch' instead of `build' 21555 (register-incomplete_type, obtain_incomplete_type, 21556 java_complete_tree, java_complete_expand_method, 21557 unresolved_type_p, create_jdep_list): New function declarations. 21558 (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS, 21559 END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted. 21560 (jdep): New typedef on new struct _jdep. 21561 (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL, 21562 JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN, 21563 JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED, 21564 JDEP_RESOLVED_P): New macros. 21565 (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD, 21566 JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE, 21567 JDEP_VARIABLE): New enum values and jdep kinds. 21568 (jdeplist): New typedef on struct _jdeplist. 21569 (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New 21570 macros. 21571 (CALL_EXPR_PRIMARY): New macro. 21572 (struct parser_ctxt): Fields java_pass, current_method_decl, 21573 method_decl_list deleted. New field jdeplist. 21574 (INCOMPLETE_P): Macro deleted. 21575 * parse.y (single_type_import_declaration:): Removed pass switch. 21576 (type_import_on_demand_declaration): Likewise. 21577 (field_declaration:): Removed pass switch on all sub rules. 21578 (class_declaration:): Call the complete_class_decl removed on 21579 class_body rules. 21580 (method_declaration:): Removed second pass switch. No longer chain 21581 methods decl when method_header reduced. 21582 (method_header:): Sub rules no longer depend on pass switch. 21583 (method_declarator:): Likewise. 21584 (method_body:): Likewise. 21585 (abstract_method_declaration:): Likewise. 21586 (block_statement:): Likewise. 21587 (local_variable_declaration:): Likewise. 21588 (argument_list:): Likewise. 21589 (method_invocation:): Likewise. Call to build_method_invocation_stmt 21590 removed. Partial CLASS_EXPR tree node built instead. 21591 (postfix_expression:): Removed pass switch on all sub rules. 21592 (java_pop_parser_context): Free classd_list content. 21593 (yyerror): Call obstrack_grow0 to finalize error message. 21594 (check_class_interface_creation): Comment modified to reflect new 21595 returned value meaning. Removed second pass switch. Return 1 if an 21596 error was found, 0 otherwise. Adjust pointer on filename if a 21597 leading path separator was found. 21598 (maybe_create_class_interface_decl): Removed first pass switch 21599 when linking the class decl to the class_list. Install a new 21600 jdep_list for the class. 21601 (add_superinterfaces): List of unresolved interfaces is 21602 gone. Unresolved interfaces are directly added to the current 21603 dependencies list. 21604 (create_interface): Second pass shortcut removed. 21605 ctpx->modifier_ctx access through MODIFIER_WFL. 21606 (create_class): Second pass shortcut removed. Call to 21607 register_incomplete_type replaces the call to 21608 parser_chain_incomplete_item. 21609 (complete_class_decl): Function removed. 21610 (duplicate_declaration_error): New way of retrieving redeclared 21611 item type. 21612 (register_fields): Call to lookup_modifier_cl replaced by 21613 MODIFIER_WFL. New way of handling unresolved type, using 21614 unresolved_type_p and obtain_incomplete_type. 21615 register_incomplete_type replaces call to parser_chain_incomplete_item. 21616 (patch_stage): New static global variable. 21617 (method_header): New way of handling unresolved type, using 21618 unresolved_type_p and obtain_incomplete_type. patch_stage used to 21619 indicates that the method decl needs to be patched. 21620 (check_abstract_method_header): Call to lookup_modifier_cl 21621 replaced by MODIFIER_WFL. 21622 (method_declarator): Incomplete argument type are registered 21623 calling register_incomplete_type. Patch on the declared method is 21624 issued in that case. 21625 (unresolved_type_p): New function. 21626 (parser_check_super_interface): New comment to reflect function's 21627 modified returned type (int). Function and has a new argument 21628 this_wfl. Call to parse_error_context uses this_wfl instead of 21629 relying on lookup_cl. 21630 (parser_check_super): Comment reflects function's new returned 21631 type (int). Function returns nonzero value on error. 21632 (create_jdep_list, reverse_jdep_list, obtain_incomplete_type, 21633 register_incomplete_type, jdep_resolve_class): New functions to 21634 handle incomplete types in declarations. 21635 (java_complete_class): Rewritten to work with the new incomplete 21636 type handling scheme. 21637 (complete_class_report_errors): Likewise. 21638 (complete_method_decl): Removed: it jobs is now handled by 21639 java_complete_class. 21640 (do_resolve_class): Class loaded in not already loaded and not 21641 found in Java source code. 21642 (java_check_regular_methods, java_check_abstract_methods): Don't 21643 call complete_method_decl anymore. 21644 (lookup_modifier_cl, not_builtin_p): Functions deleted. 21645 (read_import_dir): Got rid of the pass number dependency. 21646 (declare_local_variables): New handling of unresolved types (patch 21647 issued). 21648 (source_start_java_method): New parameter level. Function called 21649 with level set to 1 when argument types are potentially 21650 unresolved. Called to complete the job with level set to 2 once 21651 types are complete. 21652 (source_end_java_method): Call to permanent_allocation 21653 removed. Waiting to be replaced by a more suitable obstack 21654 management. 21655 (java_complete_expand_methods, java_complete_expand_method, 21656 java_expand_finals): New functions. 21657 (build_method_invocation_stmt): Renamed 21658 patch_method_invocation_stmt. Extracts function call expression 21659 (wfl) and arguments (args) from CALL_EXPR tree operands. 21660 (build_invoke): Renamed patch_invoke. Fixed typo in fatal 21661 call. Patch the function and argument operand of the CALL_EXPR 21662 tree argument. 21663 (patch_argument, java_complete_tree): New functions. 21664 216651998-04-20 Per Bothner <bothner@cygnus.com> 21666 21667 Recover from missing fields and methods (i.e. error instead of fatal). 21668 * decl.c, java-tree.h (TYPE_identifier_node): New global constant. 21669 * expr.c (expand_invoke): Recover from missing method. 21670 (expand_java_field_op): Recover from missing field. 21671 Inline references to java.lang.{Integer,Char,...}.TYPE. 21672 * typeck.c (get_type_from_signature), java-tree.h: New function. 21673 * class.c (add_method): Use get_type_from_signature. 21674 (build_class_ref): Handle a class that was not found. 21675 * typeck.c (convert): Handle conversion to pointers (for convenience). 21676 * verify.c (verify_jvm_instructions): Use get_type_from_signature 21677 instead of lookup_field to handle missing fields. 21678 21679 * jcf-parse.c (process_zip_dir): Set java_source. 21680 216811998-04-20 Brendan Kehoe <brendan@cygnus.com> 21682 21683 * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME. 21684 216851998-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com> 21686 21687 * jcf-parse.c (load_class): Don't change input_filename before 21688 calling jcf_parse_source (but still do it before calling 21689 jcf_parse). 21690 (jcf_parse_source): Assign input_filename after having saved the 21691 parser context. 21692 * lex.c (java_init_lex): Chain a WFL node to the import on demand 21693 list. ctxp->modifier_ctx zeroed according to its new 21694 definition. ctxp->filename initialized. Removed 21695 JAVA_MODIFIER_CTX_UNMARK. 21696 (java_unget_unicode): Update the character based column position. 21697 (java_allocate_new_line): ref_count not used anymore. Always free 21698 ctxp->p_line. Initialize c_line->char_col to 0. 21699 (java_get_unicode): Update the character based column position. 21700 (java_lex): Use ctxp->elc to store current position in source 21701 file, at the beginning of the parsed token. Set modifier_ctx entry 21702 corresponding to the parse modifier to a WFL node. Return a WFL 21703 node when an identifier is parsed. 21704 (java_lex_error): Now uses ctxp->elc to store current position in 21705 source. 21706 (build_wfl_node, java_is_eol, java_get_line_col): New functions. 21707 * lex.h (build_wfl_node): New function definitions. 21708 (struct java_line): ref_count and next fields are gone. New field 21709 char_col. 21710 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN, 21711 JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted. 21712 (JAVA_COLUMN_DELTA): New macro. 21713 (java_lc): New typedef on new struct _java_lc. 21714 * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types. 21715 (parse_error_context, parse_warning_context): Changed prototypes. 21716 (java_get_line_col): Added as an available global function. 21717 (JAVA_MODIFIER_CTX_UNMARK): Macro removed. 21718 (IC_DECL): Replaced by macro IC_TYPE 21719 (DEPEND_WFL): New macro. 21720 (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first 21721 wrong modifier. 21722 (exit_java_complete_class): Removed a commented out statement. 21723 (struct parser_ctxt): Added comments on fields. modifier_ctx is 21724 now an array of tree nodes. Deleted fields line_list and 21725 e_line. New field elc, to replace e_line. 21726 * parse.y (array_type:): Build WFL node. 21727 (qualified_name:): Build a single WFL node out of two. Retain 21728 the location information of the first node in the resulting node. 21729 (package_declaration:): Use package name as a WFL node 21730 (single_type_import_declaration:): Use imported name as a WFL node. 21731 (type_import_on_demand_declaration:): Use root of the imported 21732 packages as a WFL node. 21733 (field_declaration:): Removed unused local variable cl. 21734 (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK. 21735 (yyerror): New static elc. Removed static error_line, error_pos. 21736 New local code_from_source. Save ctxp->elc into elc at the first 21737 pass. Call java_get_line_col to get a string of the line where 21738 the error occurred. 21739 (debug_line): Removed static function. 21740 (parse_error_context, parse_warning_context): Parameter cl is now 21741 a WFL node. Use its value to initialize ctxp->elc. 21742 (redefinition_error): Parameter cl is now a WFL node. 21743 (parse_add_interface): New parameter wfl. No longer call 21744 lookup_cl, use wfl instead. 21745 (check_class_interface_creation): Parameter cl is now a WFL node. 21746 (maybe_create_class_interface_decl): Likewise. 21747 (add_superinterfaces): New function. 21748 (create_interface): Removed local cl, node, super_decl, 21749 super_decl_type. Function now uses id as a WFL node. Better 21750 warning/error report on obsolete or forbidden mix of 21751 modifiers. Now calls add_superinterfaces to register interfaces. 21752 (create_class): Removed local cl, node. Local variable id is used 21753 as a WFL node. Better error report on forbidden modifier 21754 mix. Uses add_superinterfaces to register interfaces. 21755 (find_field): Argument cl is now a WFL node. Now store the WFL 21756 node of a fields that needs to be checked for their 21757 initialization. 21758 (method_header): Local variable node non longer used. Local 21759 variable id replaces cl. 21760 (check_modifiers_consistency): Local variable cl is now a WFL 21761 node. 21762 (method_declarator): Local variable cl replaced by parameter id. 21763 (parser_qualified_name): Now uses parameter name as a WFL node. 21764 (parser_check_super_interface): New parameter wfl, for achieve 21765 greater accuracy during error reports. 21766 (parser_chain_incomplete_item): New parameter named location. Used, 21767 along the decl, to construct the incomplete item node. 21768 (java_complete_class): resolve_class now uses WFL node extracted 21769 from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE 21770 where appropriate. 21771 (complete_method_decl): Unresolved function's argument types are WFL. 21772 (resolve_class): Parameter cl is now a WFL node. 21773 (resolve_and_layout): Likewise. 21774 (do_resolve_class): Likewise. Try first to use cl and then do the 21775 lookup on the decl when calling check_pkg_class_access. 21776 (complete_class_report_errors): Use IC_TYPE in place of 21777 TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency 21778 instead of doing a lookup over the decl. 21779 (java_check_final): Use WFL info from field tree list. 21780 (lookup_cl): Rewritten and returns a statically defined WFL node. 21781 (lookup_modifier_cl): Now uses information from WFL nodes. 21782 (process_imports): Likewise. 21783 (read_import_dir): name and cl arguments replaced by a single WFL 21784 node. Function modified accordingly. 21785 (find_in_imports_on_demand): Now uses WFL node. 21786 (check_pkg_class_access): cl argument is now a WFL node. 21787 (declare_local_variables): Fixed to use WFL nodes. 21788 (resolve_expression_name): Likewise. 21789 (build_method_invocation_stmt): name_combo argument renamed 21790 wfl. Function modified to use WFL nodes. 21791 (build_invoke): cl used as a WFL node when calling build_expr_wfl. 21792 (lookup_method_invoke): cl is now a WFL node. Added missing 21793 IDENTIFIER_POINTER to class type decl name. 21794 217951998-04-14 Dave Brolley <brolley@cygnus.com> 21796 21797 * lang.c (init_parse): Now returns char* containing the filename. 21798 217991998-04-10 Per Bothner <bothner@cygnus.com> 21800 21801 * class.c (layout_class): Mangle repeated arg types to match cc1plus. 21802 21803 * decl.c, java-tree.h (integer_four_node): New INTEGER_CST node. 21804 * class.c (make_class_data): If flag_assume_compiled, initial class 21805 state is CSTATE_PREPARED; make superclass and interfaces direct 21806 references, rather than constant pool indexes. 21807 218081998-04-09 Alexandre Petit-Bianco <apbianco@cygnus.com> 21809 21810 * parser.y: Include flags.h. Removed debug variable pl. 21811 (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl. 21812 (block:): Likewise. 21813 (labeled_statement_nsi:): Generate debug info when reducing 21814 expression_statement:. 21815 (check_pkg_class_access): get_access_flags_from_decl invocation 21816 fixed for new CLASS_* flags location. 21817 (source_end_java_method): Save/restore parser context when 21818 entering/leaving this routine. Restore lineno to its right value 21819 before calling expand_end_bindings. 21820 (build_method_invocation_stmt): build_invoke called with the 21821 current line information. 21822 (build_invoke): New argument cl. Wrap the function call around a 21823 wfl node. 21824 (refine_accessible_methods_list): Changed comment, removed 21825 unnecessary code. 21826 * parse.h: Fixed typo in comments. 21827 (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location. 21828 (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro. 21829 (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1, 21830 parser_ccb_indent. 21831 * lex.c (java_lex): Record the last closing curly bracket of a 21832 function. 21833 * jcf-parse.c (jcf_parse_source): Now calls 21834 java_check_methods. Clarified comment, fixed typo. 21835 218361998-04-09 Dave Brolley <brolley@cygnus.com> 21837 21838 * lang.c (init_parse): Expose for non USE_CPPLIB builds. 21839 (finish_parse): Expose for non USE_CPPLIB builds. 21840 218411998-04-08 Jeffrey A Law (law@cygnus.com) 21842 21843 * lang.c (lang_print_xnode): New function. 21844 218451998-04-03 Per Bothner <bothner@cygnus.com> 21846 21847 * decl.c (class_dtable_decl), java-tree.h: New tree node. 21848 * class.c (get_dispatch_vector, get_dispatch_table): New functions 21849 used to build a class's dispatch table. 21850 (make_class_data): Generate dispatch table if flag_assume_compiled. 21851 Set dtable of class object to address of class_dtable_decl. 21852 21853 * decl.c (int_decl_processing): Make soft_badarrayindex_node 21854 be volatile and have side effects - generates better code. 21855 21856 * class.c, expr.c, parse.y: CLASS_INTERFACE, CLASS_FINAL, etc: 21857 These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs. 21858 21859 * expr.c (expand_invoke): If class is final, method is 21860 effectively final, so can call it directly. 21861 21862 * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE): New macros. 21863 21864 * Makefile.in, Make-lang.in: Add missing $(exeext)s. 21865 218661998-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com> 21867 21868 * parse.y (build_method_invocation_stmt): Removed extra argument 21869 to build_invoke. 21870 218711998-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com> 21872 21873 * expr.c (dtable_indent): Now static global. 21874 (expand_invoke): Now call invoke_build_dtable and 21875 build_invokevirtual. 21876 (invoke_build_dtable, build_invokevirtual): New functions. 21877 * jcf-io.c (find_class): Defer issuing a warning by setting 21878 jcf->outofsynch to 1. 21879 * jcf-parse.c (jcf_out_of_synch): New function. 21880 (load_class): Test this_jcf.outofsynch flag and call 21881 jcf_out_of_synch accordingly. 21882 * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in 21883 comment indentation. 21884 * lex.c (java_get_unicode): Fixed code indentation. 21885 (java_lex): Create string literal. Fixed typo. Removed several 21886 premature obstack_free. 21887 * parse.h: New enums for name resolution and invocation mode. 21888 (struct qualification): New data structure. 21889 (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros. 21890 (do_resolve_class, build_method_invocation_stmt, 21891 breakdown_qualified, qualify_ambiguous_name, resolve_and_layout, 21892 debug_line, identical_subpath_p, invocation_mode, 21893 refine_accessible_methods_list, build_invoke, 21894 lookup_method_invoke): New functions declared. 21895 (build_invokevirtual, invoke_build_dtable, match_java_method, 21896 build_field_ref, jcf_out_of_synch): New references to external 21897 functions. 21898 (struct parse_ctxt): Removed artificial_constructor field. 21899 * parse.y: (array_type:): Type defined for this rule. 21900 (class_type:): Installed default rule for interface_type:. 21901 (array_type:): Now build Java array type. 21902 (qualified_name:): Now use obstack_grow0. 21903 (method_declaration:): Skip the artificial constructor added to 21904 the list, if any. 21905 (abstract_method_declaration:): Execute the code only during pass 1. 21906 (block:): Installed default rule in block_statements:. 21907 (block_statement:): Add the statement to the method during pass 2. 21908 (statement_expression): Installed default rule for 21909 method_invocation:. 21910 (argument_list:): Added code to build the argument list. 21911 (method_invocation:): Added call to create the method invocation 21912 node. 21913 (yyerror): Now use obstack_grow0. Removed bogus obstack_free. 21914 (debug_line): New function for debug. 21915 (complete_class_decl): No longer do something during pass 1. 21916 (method_header): Use BUILD_PTR_FROM_NAME. 21917 (parser_qualified_classname): Use obstack_grow0. Removed bogus 21918 obstack_free. 21919 (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified 21920 function's main comment. 21921 (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete 21922 classes. 21923 (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types. 21924 (resolve_class): Now works with arrays. 21925 (do_resolve_class, resolve_and_layout): New functions. 21926 (java_check_regular_methods): Reverse method list before and after 21927 having processed it. No longer set ctxp->artificial_constructor. 21928 (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch 21929 accordingly. Fixed typo in issued error message. Now use 21930 obstack_grow0. 21931 (find_in_imports_on_demand): Now use obstack_grow0. 21932 (declare_local_variables): Use BUILD_PTR_FROM_NAME. 21933 (source_end_java_method): Call expand_expr_stmt instead of 21934 expand_expr. Calls it before calling expand_function_end. 21935 (java_method_add_stmt): Do nothing if errors were found during 21936 parsing. 21937 (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo. 21938 (build_method_invocation_stmt, build_invoke, invocation_mode, 21939 lookup_method_invoke, refine_accessible_methods_list, 21940 qualify_ambiguous_name, breakdown_qualified, identical_subpath_p): 21941 New functions. 21942 * typeck.c (build_java_signature): Properly end method signature 21943 if return type skipped. 21944 (match_java_method): New function. 21945 219461998-03-16 Per Bothner <bothner@cygnus.com> 21947 21948 * jcf-io.c (find_classfile): If USE_JCF_STDIO, fopen in binary mode. 21949 219501998-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com> 21951 21952 * expr.c (build_invoke_non_interface): New function. 21953 (methods_ident, ncode_ident): Now static globals. 21954 (expand_invoke): Use build_invoke_non_interface. 21955 * java-tree.h (struct lang_decl): New field function_decl_body. 21956 (DECL_FUNCTION_BODY): New macro. 21957 * jcf-parse.c (jcf_parse_source): Deeper check before setting 21958 CLASS_FROM_SOURCE_P. 21959 (parse_source_file): Fixed typos. Call java_layout_parsed_class 21960 before starting pass 2. Call to java_generate_parsed_class replaced 21961 by java_register_parsed_class. 21962 * lex.c: Fixed typo in header. Some line width related formating. 21963 * lex.h: Some line width related formating. 21964 * parse.h (source_end_java_method, resolve_expression_name, 21965 complete_class_decl, maybe_create_class_interface_decl, 21966 check_class_interface_creation): New static function declarations. 21967 (java_layout_parsed_class, java_method_add_stmt): New function 21968 declarations. 21969 (struct parser_ctxt): Field mark_class_generate removed. New 21970 fields class_list and artificial_constructor. 21971 * parse.y: Fixed typo in header. 21972 (class_declaration:): Call complete_class_decl when class body 21973 parsed. 21974 (method_declaration:): Call source_end_java_method in pass 2 when 21975 the method body is defined. 21976 (postfix_expression:): Do expression name resolution on sub-rule 21977 name during pass 2. 21978 (create_class, create_interface): Merged common pieces. 21979 (check_class_interface_creation, maybe_create_class_interface_decl): 21980 New functions. 21981 (complete_class_decl): New function. 21982 (register_fields): Fixed line width related typo. 21983 (method_header): Correctly skip first argument when fixing 21984 argument line. Changed the loop. 21985 (java_check_circular_reference): Now use ctxp->class_list. 21986 (java_complete_class): Removed start/stop marking. 21987 (java_check_regular_methods): Now takes a class decl as an 21988 argument. Add default constructor if none were encountered. 21989 (java_check_methods): Now use ctxp->class_list. Changed call to 21990 java_check_regular_methods. 21991 (source_start_java_method): Set DECL_ARG_TYPE for each function 21992 arguments. 21993 (source_end_java_method, java_method_add_stmt): New functions. 21994 (java_generate_parsed_class): No longer exists. 21995 (java_layout_parsed_class, java_register_parsed_class): New functions. 21996 (resolve_expression_name): New function. 21997 219981998-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com> 21999 22000 * jcf-parse.c: (parse_source_file): Check on errors after init lex. 22001 * lex.c: (java_init_lex): Defer ctxp->java_pass initialization 22002 until pass initializations are done. Call read_import_dir with 22003 pass set to 0. 22004 * parse.h: (lookup_modifier_cl): New function declared. 22005 (INTERFACE_FIELD_MODIFIERS): New macro. 22006 (OBSOLETE_MODIFIER_WARNING): New macro. 22007 * parse.y: (register_fields): Class type and current field name in 22008 local variables. Check modifier(s) if adding field(s) to an interface. 22009 (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING 22010 and report errors using the faulty modifier line context. 22011 (lookup_modifier_cl): New function. 22012 (read_import_dir): Detect and report default import processing 22013 failure. 22014 220151998-02-11 Brendan Kehoe <brendan@cygnus.com> 22016 22017 Add a pair of -fassume-compiled/-fno-assume-compiled options. 22018 * class.c (is_compiled_class): Return 1 after making sure it 22019 qualifies as loaded, if FLAG_ASSUME_COMPILED is set. 22020 * lang-options.h: Add -fassume-compiled/-fno-assume-compiled. 22021 * java-tree.h (flag_assume_compiled): Add decl. 22022 * lang.c (lang_f_options): Add the flag. 22023 (flag_assume_compiled): Add decl, default to 0. 22024 220251998-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com> 22026 22027 * class.c (class_depth): Call to load_class uses extra VERBOSE arg. 22028 (is_compiled_class): Likewise. 22029 (layout_class): Likewise. 22030 (layout_class): Detect and lay out classes defined in source code. 22031 (interface_of_p, add_interface_do, may_add_interface): New 22032 function. 22033 (add_interface): Now use add_interface_do. 22034 (add_method_1): New function. 22035 (add_method): Now use add_method_1. 22036 (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG. 22037 (complete_start_java_method): New function. 22038 (start_java_mehod): Now call complete_start_java_method. 22039 * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg. 22040 (expand_invoke): Likewise and fixed typo. 22041 *gjava.c: (print_super_field): Use new argument to find_class 22042 DO_CLASS_FILE. 22043 (main): Likewise. 22044 *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE. 22045 (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME, 22046 QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on 22047 IDENTIFIER_NODE. 22048 (CLASS_COMPLETE_P): New flag on TYPE_DECL. 22049 (add_method_1, push_class): New prototypes. 22050 *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument. 22051 *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip 22052 directory where the class was found. 22053 (find_class): New argument DO_CLASS_FILE. Function find_class 22054 modified accordingly. 22055 *jcf-parse.c: (fix_class_path): New function. 22056 (load_class): Use new VERBOSE argument. load_class now finds and 22057 loads/parses .class/.java files. Save read_state of current_jcf 22058 if necessary. 22059 (java_parser_abort_on_error): New macro. 22060 (jcf_parse_source, parse_source_file): New function. 22061 (jcf_parse): Fixed typo. 22062 (yyparse): Call parse_source_file () only. 22063 (process_zip_dir): Fixed typo, fix zdir->filename_length when 22064 writing the real class name back in the zip directory entry. 22065 (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null. 22066 (jcf_figure_file_type): Fixed bogus alloc and bcopy. 22067 *jcf.h: (typedef struct JCF): New fields java_source and zipd. 22068 (find_class): Prototype fixed. 22069 *lex.c: Added 1998 time stamp. 22070 Removed all static global variables, moved into the parser 22071 context data structure.. Now include unistd.h if SEEK_SET not 22072 defined. 22073 (java_init_lex): Rewritten. 22074 (java_sneak_unicode): Modified current unicode access in current line. 22075 (java_unget_unicode): Likewise. 22076 (java_allocate_new_line): New allocation management. 22077 (java_read_char): Modified access and storage of unget_utf8_value. 22078 New way of processing current unicode. 22079 (java_store_unicode, java_read_unicode): Fixed typo in declaration. 22080 (java_get_unicode): Now use the parser context. 22081 (java_lineterminator): Likewise. 22082 (java_lex): Now used java_lval argument (pointer to YYSTYPE), part 22083 of the reentrant parser implementation. Function now use the 22084 parser context data structure and java_lval. Fixed production of 22085 the float and double constant "out of range" error message. Fixed 22086 obstack use. Return integer value when hitting a modifier. Now 22087 return type for TRUE, FALSE and other predefined types. Return 22088 identifier as a TREE_LIST list containing the current line context 22089 as the TREE_VALUE sub-node. 22090 (java_unicode_2_utf8): Fixed typo in declaration. 22091 (java_lex_error): Now use the parser context data structure. 22092 *lex.h: Added 1998 time stamp. 22093 (struct java_line): New fields ref_count and next. 22094 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN, 22095 JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros. 22096 (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed. 22097 *parse.h: Added 1998 time stamp. 22098 (java_parse_source_file): Renamed from parse_source_file. 22099 (YYERROR_NOW, YYNOT_TWICE): Fixed. 22100 (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS, 22101 INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS, 22102 JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL, 22103 THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS, 22104 END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class, 22105 CLASS_OR_INTERFACE, INCOMPLETE_P): New macros. 22106 (struct parser_ctxt): New data structure to keep the parser context. 22107 *parse.y: Added 1998 time stamp, got rid of static global variables. 22108 (java_error_count, ctxp): New global variables. 22109 (%union): New value field. 22110 (numeric_type, integral_type): Rules removed. 22111 (primitive_type): Rule defined to handle integral, float, double and 22112 boolean types. 22113 (qualified_name, package_declaration, 22114 single_type_import_declaration, type_import_on_demand_declaration, 22115 modifiers, class_declaration, super, interfaces, 22116 interface_type_list, class_body, field_declaration, 22117 field_declaration, variable_declarators, variable_declarator, 22118 variable_declarator_id, method_declaration, method_header, 22119 formal_parameter_list, formal_parameter, method_body, block, 22120 static, interface_declaration, extends_interfaces, 22121 abstract_method_declaration, local_variable_declarators): Rules now 22122 define actions. 22123 (force_error, do_warning): New global statics. 22124 (push_parser_context, parser_context_save_global, 22125 parser_context_restore_global, pop_parser_context): New functions. 22126 (yyerror): Now uses the global parser context. Fixed use of obstack. 22127 (parse_error, parse_error_context, parse_warning_context, 22128 java_accstring_lookup, redefinition_error, check_modifiers, 22129 parser_add_interface, create_interface, create_class, find_field, 22130 duplicate_declaration_error, register_fields, method_header, 22131 check_modifiers_consistency, check_abstract_method_header, 22132 method_declarator, parser_qualified_classname, 22133 parser_check_super_interface, parser_check_super, 22134 parser_chain_incomplete_item, java_check_circular_reference, 22135 layout_class_from_source, java_complete_class, 22136 complete_method_decl, resolve_class, complete_class_report_errors, 22137 java_check_final, check_method_redefinition, 22138 java_check_regular_methods, java_check_abstract_methods, 22139 java_check_methods, lookup_java_interface_method2, 22140 lookup_java_method2, lookup_cl, find_name_in_single_imports, 22141 process_imports, find_in_imports, read_import_entry, 22142 read_import_dir, find_in_imports_on_demand, 22143 check_pkg_class_access, not_builtin_p, declare_local_variables, 22144 source_start_java_method, java_generate_parsed_class): New 22145 functions. 22146 *typeck.c: (signature_include_return): New global variable. 22147 (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether 22148 to add the function returned type in the signature. 22149 221501998-02-09 Brendan Kehoe <brendan@cygnus.com> 22151 22152 * jcf-io.c (open_in_zip): Use strncmp and LEN. 22153 221541998-01-29 Dave Brolley <brolley@cygnus.com> 22155 22156 * Make-lang.in (java.info): Added. 22157 (java.install-info): Added 22158 221591998-01-27 Brendan Kehoe <brendan@cygnus.com> 22160 22161 * Makefile.in (clean): Also remove java/parse.c. 22162 221631998-01-26 Brendan Kehoe <brendan@cygnus.com> 22164 22165 Add a pair of -fbounds-check/-fno-bounds-check options. 22166 * lang.c (lang_decode_option): Add code to grok arguments. 22167 (flag_bounds_check): Add decl. 22168 (lang_f_options): New array w/ the option in it. 22169 * java-tree.h (flag_bounds_check): Add decl. 22170 * lang-options.h: New file. 22171 * expr.c (build_java_arrayaccess): Use flag_bounds_check instead 22172 of a static macro value. 22173 (JAVA_ARRAY_EXCEPTION): Delete macro. 22174 221751998-01-23 Per Bothner <bothner@cygnus.com> 22176 22177 * typeck.c (build_java_array_type): Fix two bugs in previous change. 22178 * expr.c (build_anewarray): Add missing promote_type. 22179 221801998-01-22 Per Bothner <bothner@cygnus.com> 22181 22182 Add array types with known length to optimize bounds checking. 22183 * typeck.c (build_java_array_type): Take length parameter. 22184 (java_array_type_length, build_prim_array_type): New functions. 22185 * java-tree.h: Update for new functions. 22186 * expr.c, typeck.c, verify.c: Update build_java_array_type calls. 22187 * class.c: Use build_prim_array_type. 22188 * expr.c (can_widen_reference_to): Handle known-length array types. 22189 (verify_jvm_instructions): Keep track of integer push instructions 22190 followed by newarray/anewarray, so we can build known-length arrays. 22191 (JAVA_ARRAY_DATA_OFFSET): Replace by ... 22192 (java_array_data_offset): New function. 22193 (build_java_array_length_access): New function. Optimize if constant. 22194 (build_java_arrayaccess): Constant fold bounds check. 22195 (expand_java_newarray, expand_java_anewarray): Replaced by ... 22196 (build_newarray, build_anewarray): New functions. 22197 (ARRAY_NEW_NUM, ARRAY_NEW_PTR): Use build_{a,}newarray. 22198 * verify.c (merge_types): Handle known-lengh array types. 22199 222001998-01-19 Per Bothner <bothner@cygnus.com> 22201 22202 * expr.c (expand_byte_code): Fix performace bug, which caused 22203 searching linenumber_table to be linear rather than constant. 22204 222051997-12-12 Per Bothner <bothner@cygnus.com> 22206 22207 * Makefile.in (BISON, BISONFLAGS): Add missing macros. 22208 22209 * decl.c, java-tree.h (soft_fmod_node): New global. 22210 * decl.c (init_decl_processing): Define __builtin_fmod. 22211 * expr.c (build_java_binop): Implement TRUNC_MOD_EXPR for REAL_TYPE 22212 using __builtin_fmod. 22213 222141997-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com> 22215 22216 * keyword.h: New file, output of keyword.gperf as processed by 22217 gperf. 22218 * lex.c (java_lex_init): Initialize java_error_flag. 22219 * parse.c (YYERROR_NOW): Uses java_error_flag. 22220 * parse.y: New static java_error_flag. Useless definition of 22221 buffer_error gone. 22222 * parse.y (java_error): Portable error recovery using 22223 java_error_flag (not yet completely tuned). 22224 222251997-12-04 Brendan Kehoe <brendan@lisa.cygnus.com> 22226 22227 * Makefile.in (parse.c): Use $(srcdir) for parse.y. 22228 222291997-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com> 22230 22231 * Makefile.in: (JAVA_OBJS): New object jcf-parse.o. 22232 (parse.c, lex.c, keyword.h): New rules for Java source code 22233 front-end. 22234 * parse.c: Renamed into jcf-parse.c. 22235 * jcf-parse.c (yyparse): Invoke the parser to process Java source code. 22236 * keyword.gperf: New file, Java keywords. 22237 * parse.y: New file, Java language grammar. 22238 * parse.h: New file, Java language grammar definitions. 22239 * lex.c: New file, Java language lexer. 22240 * lex.h: New file, Java language lexer definitions. 22241 222421997-12-03 Per Bothner <bothner@cygnus.com> 22243 22244 * decl.c (clinit_identifier_node), java-tree.h: New global. 22245 * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P): Removed. 22246 * verify.c (verify_jvm_instructions): Inline use of removed macros. 22247 * expr.c (expand_java_field_op): Check for invalid assignment 22248 to final field. 22249 22250 * jcf-reader.c (get_attribute): Test for wrong attribute length. 22251 222521997-10-27 Per Bothner <bothner@cygnus.com> 22253 22254 * verify.c (verify_jvm_instructions): When processing a handler, 22255 attempt to set the current_subr to the right value. 22256 (More complicated code combines Sep 17 and Oct 22 versions.) 22257 222581997-10-24 Per Bothner <bothner@cygnus.com> 22259 22260 * class.c (push_class): Figure out (guess) name of source file. 22261 * parse.c (set_source_filename): Set DECL_SOURCE_FILE of class decl. 22262 (give_name_to_class): Don't guess source name; use DECL_SOURCE_FILE. 22263 (parse_class_file): Change return type from int to void. 22264 Call debug_start_source_file/debug_end_source_file. 22265 22266 * expr.c (build_java_binop): Fix masking 2nd operand. 22267 * decl.c (init_decl_processing): Set sizetype first. 22268 222691997-10-22 Per Bothner <bothner@cygnus.com> 22270 22271 * verify.c (verify_jvm_instructions): Don't set current_subr to NULL. 22272 (Revert Sep 17 change.) 22273 222741997-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com> 22275 22276 * parse.c (process_zip_dir): Skip ZIP entries not bearing the 22277 .class extension in their name and fix thing so we don't process 22278 them parse_zip_file_entries(). 22279 (parse_zip_file_entries): Cleaned unused local variables. 22280 222811997-10-20 Per Bothner <bothner@cygnus.com> 22282 22283 * expr.c (can_widen_reference_to): Allows equal array element types. 22284 (expand_byte_code): PRE_RET must expand OPERAND_VALUE (to get index). 22285 * jcf-dump.c (RET): Get (and print) index. 22286 22287 * verify.c (verify_jvm_instructions case OPCODE_anewarray): 22288 Promote element type to POINTER_TYPE. 22289 222901997-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com> 22291 22292 * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir, 22293 find_in_current_zip, jcf_figure_file_type): Moved from 22294 jcf-reader.c to parse.c. 22295 * zextract.c: (read_zip_archive): takes file_comment_length possible 22296 field into account. 22297 222981997-10-20 Per Bothner <bothner@cygnus.com> 22299 22300 * verify.c (verify_jvm_instructions): Var can also be promoted to int. 22301 22302 * verify.c (merge_types): Handle array types even better ... 22303 223041997-10-17 Per Bothner <bothner@cygnus.com> 22305 22306 * expr.c (java_stack_pop): Fix use of NULL_TREE for TYPE_SECOND. 22307 22308 * java-tree.h (PUSH_FIELD): Set DECL_ARTIFICIAL. 22309 * class.c (make_class_data): Don't build fields_decl if no fields. 22310 When building fields_decl, skip if DECL_ARTIFICIAL. 22311 22312 * expr.c (java_stack_swap): Update stack_type_map. 22313 * verify.c (merge_types): Handle array types better. 22314 223151997-10-15 Per Bothner <bothner@cygnus.com> 22316 22317 * class.c (add_field): Don't promote short integral fields to 22318 int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't. 22319 * expr.c (push_value): Promote and convert short integral values. 22320 22321 * decl.c, java-tree.h (integer_two_node): New constant node. 22322 * verify.c (merge_types): Check for TYPE_RETURN_ADDR. 22323 223241997-10-15 Alexandre Petit-Bianco <apbianco@cygnus.com> 22325 22326 * class.c (append_gpp_mangled_type): Use function argument 22327 unpromoted type to generate mangled name. 22328 223291997-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com> 22330 22331 * constants.c (build_constant_data_ref): Now uses current_class 22332 instead of main_class. 22333 (build_constants_constructor): Now uses current_class instead of 22334 main_class. 22335 * zipfile.h: (struct ZipFileCache): Now defined here. Declaration 22336 of the global variable SeepZipFiles done here. 22337 * zextract.c (read_zip_archive): extra_field optional field taken 22338 into account while computing the position of the class file in the 22339 archive. 22340 * verify.c (verify_jvm_instructions): Use current_jcf to search 22341 the constant pool. 22342 * parse.c (load_class): First search for the class to load in the 22343 current zip file. Saves current_jcf (restored before returning 22344 from that function). Don't call JCF_FINISH in the class was found 22345 in the current ZIP file. 22346 (jcf_parse): If the class was found in the current ZIP file, save 22347 its tree_constant_pool (for later reuse). 22348 (parse_class_file): New function. Process each method defined in 22349 the current class and record the class as to be later registered. 22350 (yyparse): Rewritten. Figure the type of the current file and switch 22351 accordingly. 22352 * lang.c: New global variable current_jcf. 22353 (lang_init): Removed compiling_from_source test (done later, in 22354 yyparse). Removed call the jcf_parse (). 22355 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values. 22356 (typedef struct JCF): New fields seen_in_zip (to mark a class found 22357 in the current ZIP file) and zip_offset (offset to the class data in 22358 the current zip file). 22359 * jcf-reader.c: zipfile.h included. 22360 localToFile: New ZipFileCache static global variable 22361 (parse_zip_file_entries): New function. Browse the current ZIP 22362 file directory and process each class found. 22363 (process_zip_dir): New function. Register each class found in the 22364 ZIP file directory. The class aren't parsed but a valid JCF is 22365 link to each of them. 22366 (find_in_current_zip): New function. Search for a class in the 22367 current ZIP file directory. If found, prepare the class so that it 22368 can be loaded. 22369 (jcf_figure_file_type): New function. Examine the file structure 22370 to figure a class file, a ZIP file. If none of these categories are 22371 matched, a source file is assumed. 22372 * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h). 22373 SeenZipFile: New global variable. 22374 (open_in_zip): Use zipmember's length to accelerate the search for 22375 a member. If zipmember was NULL and zip file successfully read, 22376 return 0. 22377 * java-tree.h: New global variable current_jcf declared. Added 22378 declaration for current_constant_pool_tags, current_constant_pool_data, 22379 current_constant_pool_length, current_constant_pool_data_ref. 22380 (struct lang_type): Augmented with two fields. struct JCF *jcf (to 22381 store the JCF of classes seen in a zip file) and tree *constant_pool 22382 (to save a loaded class constant pool). current_class declared here. 22383 * expr.c (expand_invoke): Use current_jcf instead of main_jcf to 22384 retrieve method_ref_constant. 22385 (PUSHC): java_push_constant_from_pool now uses current_jcf. 22386 (OBJECT): get_class_constant now uses current_jcf. 22387 (ARRAY_NEW_PTR): get_class_constant now uses current_jcf. 22388 (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf. 22389 (expand_invoke): Now uses current_class instead of main_class 22390 (build_class_init): Now uses current_class instead of main_class 22391 * class.c: New static global variable registered_class. 22392 (register_class): New function. 22393 (emit_register_class): Modified to use registered_class instead of 22394 main_class 22395 (is_compiled_class): Now take into account class seen in the archive. 22396 223971997-10-06 Per Bothner <bothner@cygnus.com> 22398 22399 * except.h: Renamed to: java-except.h. 22400 * parse.c, except.c, expr.c, verify.c: Update #include accordingly. 22401 * except.c: Add semi-working (commented out) implementation. 22402 22403 * expr.c (expand_iinc): Add needed flush_quick_stack. 22404 * parse.c (set_source_filename): New function. 22405 (give_name_to_class): Set input_filename from package.classname.java. 22406 22407 * jcf-io.c (find_class): Don't look first in ".". 22408 224091997-10-01 Alexandre Petit-Bianco <apbianco@cygnus.com> 22410 22411 * zextract.c (read_zip_archive): Now takes into account the 22412 extra_field field. 22413 * expr.c (can_widen_reference_to): Modified to handle sub-interfaces. 22414 224151997-09-20 Per Bothner <bothner@cygnus.com> 22416 22417 * constants.c, java-tree.h (build_internal_class_name): New function. 22418 (alloc_class_constant): Re-implement using build_internal_class_name. 22419 * class.c (make_class_data): Likewise. 22420 * class.c (hashUtf8String): Make hash algorithm match String.hashCode. 22421 224221997-09-17 Per Bothner <bothner@cygnus.com> 22423 22424 * verify.c (verify_jvm_instructions): Temporarily set current_subr 22425 to NULL before pushing an exception handler target. 22426 22427 * expr.c (flush_quick_stack): Save from low stack indexes to high. 22428 (java_stack_swap, java_stack_dup): Re-write to be safe from 22429 clobbering registers. 22430 (build_class_init): New function. 22431 224321997-09-17 Alexandre Petit-Bianco <apbianco@cygnus.com> 22433 22434 * typeck.c (build_java_array_type): Temporary use 22435 permanent_obstack to create the array 'length' field. 22436 * expr.c (lookup_label): Temporay use permanent_obstack to create 22437 label if not found. 22438 * class.c (push_super_field): Tempory use permanent_obstack. 22439 224401997-09-15 Alexandre Petit-Bianco <apbianco@cygnus.com> 22441 22442 * typeck.c (type_for_mode): Now handles double_type_node and 22443 float_type_node. 22444 * verify.c (verify_jvm_instructions): The instruction following 22445 the wide bytecode is checked. OPCODE_ret added to the list of 22446 wide. 22447 224481997-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com> 22449 22450 * class.c (make_class): Temporary use permanent_obstack. Set the 22451 class CLASS_P field to 1. 22452 (push_class): Temporary use permanent_obstack. 22453 (set_super_info): Temporary use permanent_obstack. 22454 (add_method): Temporary use permanent_obstack, set 22455 METHOD_TRANSIENT(). 22456 (add_field): Temporary use permanent_obstack. Sets 22457 FIELD_VOLATILE() and FIELD_TRANSIENT(). 22458 (build_class_ref): Temporary use permanent_obstack if the class 22459 isn't compiled. 22460 (build_static_field_ref): Temporary use permanent_obstack when 22461 creating field's rtl. 22462 (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT, 22463 ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods 22464 and fields. Function finalized, as far as flag handling. 22465 (push_class_static_dummy_field): Temporary use permanent_obstack. 22466 (emit_register_class): Force generation of class registration at 22467 -O3 or deeper. 22468 * decl.c (end_java_method): Call permanent_allocation() before 22469 returning. 22470 * expr.c (can_widen_reference_to): Added comment to interface 22471 handling, fixed typo. 22472 (lookup_field): Now uses CLASS_P() to correct FIXME 22473 (expand_invoke): Verification on public && !static && 22474 !abstract moved into soft_lookupinterfacemethod (kaffe). 22475 Use Object class dtable if objectref is an array when expanding 22476 invokeinterface. 22477 (java_push_constant_from_pool): Temporary use permanent_obstack 22478 for CONSTANT_string 22479 * parse.c (get_ref_constant): Temporary use permanent_obstack to 22480 create constant references. 22481 (get_constant): Temporary use permanent_obstack to create constant. 22482 (load_class): Temporary use permanent_obstack to load class. 22483 (jcf_parse): Temporary use permanent_obstack to perform class 22484 layout. 22485 * typeck.c: (parse_signature_string): Temporary use permanent_obstack. 22486 (build_java_signature): Temporary use permanent_obstack. 22487 * verify.c: (verify_jvm_instruction): removed unnecessary verification 22488 on ACC_SUPER flag. 22489 * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined. 22490 (FIELD_VOLATILE, FIELD_TRANSIENT): Defined. 22491 (CLASS_P): Defined 22492 224931997-09-11 Per Bothner <bothner@cygnus.com> 22494 22495 * class.c (append_gpp_mangled_type): Fix typo. 22496 (emit_register_class): Use main_class to get class object, rather 22497 than looking for no-longer-existing static decl starting with _CL. 22498 * typeck.c (parse_signature_type): Promote array element type 22499 if it is a RECORD_TYPE. 22500 225011997-09-10 Per Bothner <bothner@cygnus.com> 22502 22503 * class.c (push_class_static_dummy_field): New function. 22504 (mangle_static_field): New. Do G++-style mangling of static fields. 22505 (layout_class): Mandle static fields here, not in add_field. 22506 (build_class_ref): The class object is now a dummy static field. 22507 * decl.c (find_local_variable): Look for best, instead of first match. 22508 * expr.c (push_type): Always promote_type, not just for RECORD_TYPE. 22509 (build_java_athrow): Don't check here if exception is Throwable. 22510 * java-tree.h (TYPE_UNSET): Renamed to TYPE_UNKNOWN. 22511 (TYPE_USED): Removed. No longer used ... 22512 * parse.c (jcf_parse): Call push_class_static_dummy_field. 22513 * verify.c (push_pending_label): New function. 22514 (push_pending_block): Renamed to check_pending_block. 22515 (merge_types): Remove unneeded suuport for TYPE_UNUSED. 22516 (verify_jvm_instructions): Only reset prev_eh_ranges (to force 22517 re-checking possible handlers) after a store (less wasted work). 22518 Check for null handler (finally) before calling add_handler. 22519 Various changes to (finally?) correctly handle try/finally. 22520 225211997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com> 22522 22523 * class.c: Include stdio.h. 22524 225251997-09-04 Per Bothner <bothner@cygnus.com> 22526 22527 * expr.c (expand_invoke): Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS) 22528 to make sure class is initialized before static/special invoke. 22529 22530 * verify.c (verify_jvm_instructions): On a store instruction, 22531 call find_local_variable to force pre-allocation of decl and rtx. 22532 * decl.c (push_jvm_slot): Set DECL_REGISTER on stack slots. 22533 225341997-09-03 Per Bothner <bothner@cygnus.com> 22535 22536 * class.c (build_class_ref): Strip off "promoted_" if need be. 22537 (make_field_value): Call build_java_signature when needed. 22538 (layout_class): Don't make_function_rtl if METHOD_ABSTRACT. 22539 * expr.c (build_java_athrow): Don't push_value of exception. 22540 (build_java_binop): Implement COMPARE_L_EXPR and COMPARE_G_EXPR to 22541 match specification of [fd]cmp[lg] for NaNs. 22542 (expand_byte_code): Add support for exception handler ranges. 22543 * except.c: Add skeleton for EH code-generation. 22544 * verify.c (merge_types): Treat all promoted integral types as equal. 22545 * constants.c (build_constants_constructor): To force creation of 22546 current_constant_pool_data_ref, call build_constant_data_ref. 22547 22548 * javaop.def (lload): Fix typo. 22549 * jcf-dump.c (main): Clear filename to prevent possibly-bad free. 22550 225511997-09-02 Brendan Kehoe <brendan@lisa.cygnus.com> 22552 22553 * parse.c: Don't include function.h. 22554 225551997-08-27 Per Bothner <bothner@cygnus.com> 22556 22557 * except.[ch]: New files. 22558 * Makefile.in (JAVA_OBJS): Add except.o 22559 * expr.c: Temporary warning about unimplemented exceptions. 22560 * verify.c: Verify exception handlers. 22561 22562 * jcf-dump.c (disassemble_method): Print exception table. 22563 225641997-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com> 22565 22566 * expr.c (verify_jvm_instructions): Started a thorough 22567 verification of invoke* bytecodes. 22568 (expand_byte_code): flush quick stack if PC is the target of a 22569 branch. and undef RET (conflicting with config/i386/i386.h). 22570 (expand_java_arrayload): Fixed bogus cast, when Boolean type is 22571 used. 22572 (expand_invoke): Now handles invokeinterface and do more 22573 verification according to the bytecode. 22574 (lookup_field): Don't try to load the class if processing 22575 dtable_type. 22576 (can_widen_reference_to): Now handles interfaces. 22577 * decl.c (init_decl_processing): New global variable 22578 soft_lookupinterfacemethod_node, declared in java-tree.h. 22579 Call set_super_info on string_type_node. 22580 * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now 22581 defined. 22582 * class.c (set_super_info): Fills the CLASS_* flags according to 22583 access_flags. 22584 (get_access_flags_from_decl): Handles all class flags. 22585 225861997-08-26 Per Bothner <bothner@cygnus.com> 22587 22588 * class.c (add_method): Zero out newly-allocated DECL_LANG_SPECIFIC. 22589 * parse.c (yyparse): Check for abstract method, and missing code. 22590 * expr.c (expand_byte_code): Change interface. 22591 * lang.c (put_decl_node): Print promoted types prettier. 22592 * verify.c (verify_jvm_instruction): Change interface. 22593 Partial support for scanning exception table. 22594 For load instructions, handle promoted integral types. 22595 225961997-08-21 Per Bothner <bothner@cygnus.com> 22597 22598 * verify.c: New file, with contents moved from expr.c. 22599 * expr.c: Bunch of stuff (mostly verification) moved to verify.c. 22600 * typeck.c (is_array_type_p): Moved here from expr.c. 22601 * java-tree.h: Add some now-needed function declarations. 22602 * Makefile.in (JAVA_OBJS): Added verify.o. 22603 226041997-08-20 Alexandre Petit-Bianco <apbianco@cygnus.com> 22605 22606 * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the 22607 METHOD_ABSTRACT flag. 22608 22609 * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4. 22610 (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros. 22611 (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5 22612 22613 * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global 22614 variables. 22615 (start_java_method): Hook for SYNCHRONIZED methods. 22616 22617 * expr.c (build_java_jsr, build_java_ret): New functions 22618 (JSR,PRE): New macros 22619 (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured. 22620 (verify_jvm_instructions): tableswitch, lookupswitch, 22621 monitorenter, monitorexit, goto_w: verified. 22622 (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label 22623 (build_java_monitor): New function. 22624 (MONITOR_OPERATION): Modified to call build_java_monitor() 22625 (verify_jvm_instructions): Started a thorough verification of 22626 invoke* bytecodes. 22627 226281997-08-19 Per Bothner <bothner@cygnus.com> 22629 22630 Support verification of jsr/ret subroutines (used for try/finally). 22631 * decl.c (return_address_type_node): New type node. 22632 * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE, 22633 RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR, 22634 LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED): New macros. 22635 (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED, 22636 TYPE_USED): New macros for special types in type_map. 22637 22638 * java-tree.h (BCODE_JUMP_TARGET): Renamed to BCODE_TARGET. 22639 (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET): Replaced by 22640 BCODE_JUMP_TARGET. 22641 * expr.c (expand_byte_code): Fix logic to warn of unused instructions. 22642 22643 * expr.c (can_widen_reference_to): New function. 22644 (pop_type): Use it. 22645 (merge_type_state): Support handling start of subroutine. 22646 (push_pending_block): Return char* error message, instead of calling 22647 fatal on an error. Also handle subroutines. 22648 (verify_jvm_instructions): Handle errors from push_poending_block. 22649 Support jsr and ret instructions. 22650 226511997-08-19 Per Bothner <bothner@cygnus.com> 22652 22653 * jcf-io.c (find_classfile): Fix thinko. 22654 * jcf-dump.c: Add CONVERT2 (to match changed javaop.def). 22655 226561997-08-12 Jason Merrill <jason@yorick.cygnus.com> 22657 22658 * Makefile.in (BISON): Remove. 22659 226601997-08-07 Per Bothner <bothner@cygnus.com> 22661 22662 * Makefile.in: Convert to autoconf. 22663 * config-lang.in (outputs): Added java/Makefile. 22664 22665 * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in: 22666 Rename cc1java to jc1. 22667 22668 * lang.c (init_parse, finihs_parse): New functions #ifdef USE_CPPLIB. 22669 * Makefile.in (INTERNAL_CFLAGS): Add @extra_c_flags. 22670 22671 * class.c (class_depth): Do load_class if needed. 22672 22673 Mostly better verification. 22674 * decl.c (pushdecl): Set TYPE_STUB_DECL for a type. 22675 (init_decl_processing): Change return type of soft_checkcast. 22676 * expr.c (expand_java_CHECKCAST): Do push_value of the "casted" value. 22677 * lang.c (put_decl_string, put_decl_node, lang_printable_name, 22678 lang_print_error): New functions. 22679 (lang_init): Set global hook print_error_function to lang_print_error. 22680 * expr.c: In the type_map ptr_type_node is only used for null now. 22681 (pop_type, merge_types): Hence ptr_type_node matches any reference. 22682 (merge_types): Dererence pointer to record types before comparing. 22683 (decode_newarray_type, merge_types): On error just return NULL. 22684 (build_java_binop): Add preliminary implementation (with warning) 22685 for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]). 22686 (lookup_label): Set DECL_IGNORED_P (for dwarf2out). 22687 (expand_compare, expand_java_goto, expand_java_call): Don't 22688 push_pending_block, since that only makes sense when verifying. 22689 (merge_type_state): Different return codes. 22690 (push_pending_block): A block may need to be verified more than once. 22691 (expand_byte_code): Warn about unused code at code generation time. 22692 (verify_jvm_instruction): Changed logic, since code may need to be 22693 re-verified if type-state has changed. Also, better error handling. 22694 Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof. 22695 Improve newarray, anewarray, ?aload, athrow, 22696 * java-tree.h (LABEL_CHANGED): New macro. 22697 226981997-08-05 Alexandre Petit-Bianco <apbianco@cygnus.com> 22699 22700 * decl.c (soft_athrow_node): New global variable initialized. 22701 * javaop.def (i2b, i2c, i2s): Invoke CONVERT2 22702 * typeck.c (convert): Added support for REAL_TYPE. 22703 (convert_to_char): New function. 22704 (convert): Handle CHAR_TYPE. 22705 * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/ 22706 SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT. 22707 (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to 22708 promoted type. 22709 (verify_jvm_instructions): Added break a the end of bogus unop: label. 22710 (OPCODE_<b|c|s>astore): Pop an int operand from the type stack 22711 (OPCODE_<b|c|s>astore): Push the promoted type onto the stack 22712 (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b. 22713 (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified 22714 to Use The Right Things. 22715 (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as 22716 compatible with INT. BOOLEAN is made equivalent to BYTE. 22717 (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull, 22718 OPCODE_ifnonnull): Now supported. 22719 (build_java_athrow): New function. 22720 227211997-08-04 Per Bothner <bothner@cygnus.com> 22722 22723 Rename method name <init> to match G++ (and fix mangling). 22724 * class.c (layout_class): Replace method name of <init> by class name. 22725 (make_method_value): Do inverse renaming of constructor from <init>. 22726 * java-tree.h (DECL_CONSTRUCTOR_P): New macro. 22727 * typeck.c (lookup_java_constructor): New function. 22728 * expr.c (expand_invoke): If method_name is <init>, call 22729 lookup_java_constructor to find constructor. 22730 22731 * parse.c (get_constant): Handle CONSTANT_Float and CONSTANT_Double. 22732 227331997-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com> 22734 22735 * parse.c (get_class_constant): Modified to handle array "classes" 22736 * typeck.c (set_local_type): Bug fixed when filling type_map[] with 22737 wide type. 22738 (convert): Modified to handle real type. 22739 * java-tree.h (soft_badarrayindex_node, soft_anewarray_node, 22740 soft_multianewarray, soft_newarray_node, soft_throw_node): New global 22741 variables declared. 22742 * decl.c (soft_badarrayindex_node, soft_anewarray_node, 22743 soft_multianewarray, soft_newarray_node, soft_throw_node): New 22744 global variables initialized. 22745 (find_local_variable): Handles the case of a pointer 22746 (end_java_method): Restore the use of one more scope 22747 * expr.c (build_java_arraynull_check, build_java_arrayaccess, 22748 build_java_array_length_access, expand_java_arrayload, 22749 expand_java_arraystore, expand_java_array_length, 22750 expand_java_multianewarray, expand_java_anewarray, 22751 build_java_check_indexed_type, is_array_type_p, 22752 build_java_throw_out_of_bound_exception): New functions. 22753 (STORE_INTERNAL): Now forces type of the decl to be type of the value. 22754 (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore, 22755 OPCODE_<t>aload): Implemented code for verification. 22756 (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM 22757 ARRAY_NEW_MULTI): Macro defined. 22758 (CONVERT): Modified to invoke convert(). 22759 (case OPCODE_aload2): Fixed index typo from 2 to 1. 22760 227611997-07-31 Per Bothner <bothner@cygnus.com> 22762 22763 * class.c (push_class): Set DECL_ARTIFICIAL (for dbxout.c). 22764 (build_class_ref, is_compiled_class): Handle pointer-to-record types. 22765 (make_class_data): Field name needs '/' as package prefix. 22766 * expr.c (type_stack_dup, java_stack_dup): Fix fencepost errors. 22767 227681997-07-25 Per Bothner <bothner@cygnus.com> 22769 22770 Implement debug information for local variables. 22771 * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT, 22772 DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC, 22773 DECL_LOCAL_SLOT_CHAIN): New macros. 22774 (struct lang_decl_var): New type. 22775 * parse.c (give_name_to_locals): Move to decl.c. 22776 * decl.c (give_name_to_locals): Re-written to Do The Right Thing. 22777 (start_java_method): Re-write parameter handling. 22778 (pending_local_decls): New global variable. 22779 (push_jvm_slot, maybe_pushlevels, maybe_poplevels): New functions. 22780 (find_local_variable): Accept pc so we can skips decls not in range. 22781 (struct binding_level): Add end_pc field. 22782 * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels. 22783 (various): Change so current pc gets passed to find_local_variable. 22784 22785 * decl.c (init_decl_processing): Re-arrange fields in 22786 class_type_node and and method_type_node to match kaffe 0.9.1. 22787 * class.c (make_method_value, make_class_data): Update 22788 initializations to match. 22789 227901997-07-16 Per Bothner <bothner@cygnus.com> 22791 22792 * class.c (unicode_mangling_length, emit_unicode_mangled_name, 22793 append_gpp_mangled_name, append_gpp_mangled_type): New functions. 22794 (push_super_field): New function. 22795 (make_class_data): Handle inheritance of class static initializer. 22796 (layout_class): New name mangling. 22797 * constants.c (build_constant_data_ref): Init type of data array 22798 to a one-element array. 22799 (build_constants_constructor): Set DECL_SIZE from complete array type. 22800 * decl.c: Rename class_type, object_type etc to class_type_node, 22801 object_type_node etc. Make former inherit from latter. 22802 * expr.c (expand_invoke): Add cast of function address. 22803 * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE): New. 22804 * parse.c (yyparse): Don't call layout_class here. 22805 * typeck.c (build_java_array_type): Set TYPE_ARRAY_ELEMENT. 22806 228071997-06-14 Per Bothner <bothner@cygnus.com> 22808 22809 * decl.c, class.c: Update method type to match latest Kaffe snapshot. 22810 * constants.c (lookup_name_constant): Renamed to alloc_name_constant. 22811 (alloc_class_constant): New. 22812 * expr.c (expand_invoke): Make sure method's class is initialized. 22813 * class.c (interits_from_p, emit_register_class): New functions. 22814 * parse.c (yyparse): Call emit_register_class. 22815 228161997-06-09 Per Bothner <bothner@cygnus.com> 22817 22818 * constants.c: New file, to handle constant pool. 22819 * Makefile.in (JAVA_OBJS): Add constants.o. 22820 * decl.c (init_decl_processing): Update, fix, finish various structs. 22821 (pushdecl_top_level): New. 22822 * parse.c (layout_class): Moved to class.c. 22823 * expr.c (java_push_constant_from_pool): New function. 22824 * class.c (build_class_ref): Make work fully 22825 (make_class_data): Emit super-class, constant pool, interface vector. 22826 228271997-06-03 Per Bothner <bothner@cygnus.com> 22828 22829 java-tree.h (DECL_SIGNATURE, BCODE_EMITTED): Remove. 22830 (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P): New. 22831 * class.c (class_depth): New function. 22832 (lookup_named_class): Replaced by new function lookup_class. 22833 * decl.c (object_type_node, string_type_node): New. 22834 Remove various types that we no longer need. 22835 * expr.c (verify_jvm_instructions): New separate verifier pass. 22836 (push_type, pop_type): New functions for verifier. 22837 (type_stack_dup, pop_argument_types, merge_types): Likewise. 22838 (expand_byte_code): Simplify, since we assume already verified. 22839 (expand_invoke): Now mostly works. 22840 * javaop.def: Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w. 22841 * lang.c (main_class): Move to parse.c. Don't make_class yet. 22842 * parse.c: Wait to allocate class object until we know its name. 22843 (layout_class): Calculate DECL_VINDEX for each virtual method. 22844 * typeck.c (get_array_type): Rename to ... 22845 (build_java_array_type): ... and provide working implementation. 22846 (build_java_signature): New function - build Java signature of type. 22847 (set_java_signature): New function - cache signature with type. 22848 (lookup_java_method): New function. 22849 228501997-05-06 Per Bothner <bothner@deneb.cygnus.com> 22851 22852 * class.c (ident_subst): Take extra SUFFIX parameter. 22853 (add_field): Set DECL_ASSEMBLER_NAME of static fields; more. 22854 (set_constant_value, build_static_field_ref, is_compiled_class): New. 22855 (build_class_ref): Actually implement. 22856 * decl.c, java-tree.h: Renamed some xx_type to xx_type_node. 22857 * decl.c (builtin_function): New. 22858 (init_decl_processing): Update for current Kaffe. Declare some 22859 builtin Kaffe functions. 22860 * expr.c (build_address_of): New. 22861 (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST): 22862 Renamed (from expand_java_new etc), and added working implementations. 22863 (build_field_ref): Now also handle static fields. 22864 (expand_invoke): Implement invokestatic, and start implement rest. 22865 * java-opcodes.h: Use javaop.def to avoid duplicated list. 22866 * javaop.def: Rename invokevirt -> invokevirtual. 22867 * lang.c (use_handles): Removed. 22868 * parse.c: Add support for ConstantValue attribute. 22869 Handle nested loading of a class. (JPOOL_UTF): New. 22870 228711997-03-11 Per Bothner <bothner@deneb.cygnus.com> 22872 22873 * expr.c (expand_java_pushc): Support #ifndef REAL_ARITHMETIC case. 22874 228751997-02-27 Per Bothner <bothner@deneb.cygnus.com> 22876 22877 * Make-lang.in (java.install-man): New empty rule. 22878 * typeck.c (set_local_type): New function. 22879 * expr.c (STORE_INTERNAL): Call find_local_variable, 22880 not find_stack_slot. Call set_local_type. 22881 228821997-02-12 Per Bothner <bothner@kalessin.cygnus.com> 22883 22884 * java-tree.h: Various new macros for constructing RECORD_TYPEs, 22885 and building RECORD_TYPE CONSTRUCTORs. 22886 Also support for creating Utf8Const objects from an INDETIFIER_NODE. 22887 22888 * lang.c (use_handles): Change the default to 0. 22889 * decl.c: Define and build class_type, field_type, utf8const_type. 22890 * class.c (make_class_data, make_field_value, 22891 get_access_flags_from_decl, build_class_ref, build_utf8_ref, 22892 hashUtf8String, strLengthUtf8, mangled_classname: 22893 Functions to build reflective data structures. 22894 * parse.c (yyparse): Call make_class_data. 22895 22896 * jcf-io.c (open_class, find_classfile): New functions. 22897 * jcf-dump.c: Support reading classfile from explicitly-named 22898 class file (without CLASSPATH searching). 22899 229001996-10-24 Per Bothner <bothner@deneb.cygnus.com> 22901 22902 * jcf-reader.c: Add parameter list to HANDLE_CONSTANT_Utf8. 22903 * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8): 22904 Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here. 22905 (get_constant): Now trivial for CONSTANT_Utf8. 22906 22907 * jcf.h: Make NEW_CPOOL the default. 22908 * jcf.h, jcf-reader.c, parse.c: Remove support for !NEW_CPOOL. 22909 229101996-10-24 Per Bothner <bothner@deneb.cygnus.com> 22911 22912 New directory. 22913 22914 22915Copyright (C) 1996-2014 Free Software Foundation, Inc. 22916 22917Copying and distribution of this file, with or without modification, 22918are permitted in any medium without royalty provided the copyright 22919notice and this notice are preserved. 22920