diff -Nrc3pad gcc-3.2.3/boehm-gc/acinclude.m4 gcc-3.3/boehm-gc/acinclude.m4 *** gcc-3.2.3/boehm-gc/acinclude.m4 2001-10-16 09:01:35.000000000 +0000 --- gcc-3.3/boehm-gc/acinclude.m4 2002-05-16 17:41:54.000000000 +0000 *************** *** 1,4 **** ! # Copyright (c) 1999-2001 by Red Hat, Inc. All rights reserved. # # THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED # OR IMPLIED. ANY USE IS AT YOUR OWN RISK. --- 1,4 ---- ! # Copyright (c) 1999-2001, 2002 by Red Hat, Inc. All rights reserved. # # THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED # OR IMPLIED. ANY USE IS AT YOUR OWN RISK. *************** fi *** 52,58 **** AC_CANONICAL_SYSTEM # This works around an automake problem. ! mkinstalldirs="`cd $ac_aux_dir && pwd`/mkinstalldirs" AC_SUBST(mkinstalldirs) AM_INIT_AUTOMAKE(gc, 6.1a1, no-define) --- 52,58 ---- AC_CANONICAL_SYSTEM # This works around an automake problem. ! mkinstalldirs="`cd $ac_aux_dir && ${PWDCMD-pwd}`/mkinstalldirs" AC_SUBST(mkinstalldirs) AM_INIT_AUTOMAKE(gc, 6.1a1, no-define) diff -Nrc3pad gcc-3.2.3/boehm-gc/aclocal.m4 gcc-3.3/boehm-gc/aclocal.m4 *** gcc-3.2.3/boehm-gc/aclocal.m4 2003-04-22 06:56:18.000000000 +0000 --- gcc-3.3/boehm-gc/aclocal.m4 2003-05-14 00:18:14.000000000 +0000 *************** dnl but WITHOUT ANY WARRANTY, to the ext *** 10,16 **** dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A dnl PARTICULAR PURPOSE. ! # Copyright (c) 1999-2001 by Red Hat, Inc. All rights reserved. # # THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED # OR IMPLIED. ANY USE IS AT YOUR OWN RISK. --- 10,16 ---- dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A dnl PARTICULAR PURPOSE. ! # Copyright (c) 1999-2001, 2002 by Red Hat, Inc. All rights reserved. # # THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED # OR IMPLIED. ANY USE IS AT YOUR OWN RISK. *************** fi *** 64,70 **** AC_CANONICAL_SYSTEM # This works around an automake problem. ! mkinstalldirs="`cd $ac_aux_dir && pwd`/mkinstalldirs" AC_SUBST(mkinstalldirs) AM_INIT_AUTOMAKE(gc, 6.0, no-define) --- 64,70 ---- AC_CANONICAL_SYSTEM # This works around an automake problem. ! mkinstalldirs="`cd $ac_aux_dir && ${PWDCMD-pwd}`/mkinstalldirs" AC_SUBST(mkinstalldirs) AM_INIT_AUTOMAKE(gc, 6.0, no-define) diff -Nrc3pad gcc-3.2.3/boehm-gc/alloc.c gcc-3.3/boehm-gc/alloc.c *** gcc-3.2.3/boehm-gc/alloc.c 2002-02-12 04:37:53.000000000 +0000 --- gcc-3.3/boehm-gc/alloc.c 2003-03-04 06:38:30.000000000 +0000 *************** void GC_maybe_gc() *** 306,311 **** --- 306,312 ---- GC_bool GC_try_to_collect_inner(stop_func) GC_stop_func stop_func; { + if (GC_dont_gc) return FALSE; if (GC_incremental && GC_collection_in_progress()) { # ifdef CONDPRINT if (GC_print_stats) { *************** int n; *** 386,391 **** --- 387,393 ---- { register int i; + if (GC_dont_gc) return; if (GC_incremental && GC_collection_in_progress()) { for (i = GC_deficit; i < GC_RATE*n; i++) { if (GC_mark_some((ptr_t)0)) { *************** GC_stop_func stop_func; *** 446,451 **** --- 448,456 ---- CLOCK_TYPE start_time, current_time; # endif + # if defined(REGISTER_LIBRARIES_EARLY) + GC_cond_register_dynamic_libraries(); + # endif STOP_WORLD(); # ifdef PRINTTIMES GET_TIME(start_time); diff -Nrc3pad gcc-3.2.3/boehm-gc/ChangeLog gcc-3.3/boehm-gc/ChangeLog *** gcc-3.2.3/boehm-gc/ChangeLog 2003-04-22 06:14:05.000000000 +0000 --- gcc-3.3/boehm-gc/ChangeLog 2003-05-14 00:08:56.000000000 +0000 *************** *** 1,10 **** ! 2003-04-22 Release Manager ! * GCC 3.2.3 Released. ! 2003-02-05 Release Manager ! * GCC 3.2.2 Released. 2003-01-27 Alexandre Oliva --- 1,61 ---- ! 2003-05-13 Release Manager ! * GCC 3.3 Released. ! 2003-05-13 Release Manager ! * GCC 3.3 Released. ! ! 2003-05-13 Release Manager ! ! * GCC 3.3 Released. ! ! 2003-05-13 Release Manager ! ! * GCC 3.3 Released. ! ! 2003-04-28 Mohan Embar ! ! * configure.in: define GC_DLL under mingw if --enable-shared ! * configure: rebuilt ! * win32_threads.c: add #ifdef GC_DLL around DllMain ! ! 2003-04-09 Tom Tromey ! ! * include/private/gcconfig.h (LINUX_STACKBOTTOM): Define for ! POWERPC. ! (STACK_GRAN, HEURISTIC1): Don't define for POWERPC. ! ! 2003-03-04 Hans Boehm ! * include/private/gcconfig.h (GC_data_start): declare when needed. ! * include/private/gc_priv.h: Include gcconfig.h after ptr_t ! declaration. ! ! 2003-03-03 Hans Boehm ! * mark_rts.c (GC_cond_register_dynamic_libraries): add. ! (GC_push_roots): explicitly mark free list headers, register ! dynamic libraries only if !REGISTER_LIBRARIES_EARLY. ! * alloc.c (GC_stopped_mark): Conditionally call ! GC_cond_register_dynamic_libraries(). ! (GC_collect_a_little_inner, GC_try_to_collect_inner): Check GC_dont_gc. ! * dyn_load.c (GC_register_main_static_data): define. ! (GC_register_dyn_libraries (Linux /proc, Linux ELF versions)): ! no longer skip main data. Register main data for static executable. ! * misc.c (GC_REGISTER_MAIN_STATIC_DATA): define. ! (GC_init_inner): Make main data registration conditional. ! * include/private/gc_priv.h (GC_register_main_static_data): declare. ! * include/private/gcconfig.h (REGISTER_LIBRARIES_EARLY): define ! for LINUX. ! ! 2003-02-20 Alexandre Oliva ! ! * configure.in: Propagate ORIGINAL_LD_FOR_MULTILIBS to ! config.status. ! * configure: Rebuilt. ! ! 2003-02-11 Andreas Tobler ! ! * include/private/gcconfig.h: undefine MPROTECT_VDB for MACOSX 2003-01-27 Alexandre Oliva *************** *** 13,58 **** * Makefile.am (toolexecdir, toolexeclibdir): Don't override. * Makefile.in, configure: Rebuilt. ! 2002-11-19 Release Manager ! * GCC 3.2.1 Released. ! 2002-11-19 Release Manager ! * GCC 3.2.1 Released. ! 2002-11-18 Release Manager ! * GCC 3.2.1 Released. ! 2002-10-07 Kaveh R. Ghazi ! * Makefile.am (all-multi): Fix multilib parallel build. 2002-08-23 Adam Megacz * win32_threads.cc: Removed extraneous ABORT() ! 2002-08-14 Release Manager ! * GCC 3.2 Released. ! 2002-07-25 Release Manager ! * GCC 3.1.1 Released. ! 2002-06-28 Hans Boehm ! Jonathan Clark ! * win32_threads.c (GC_push_all_stacks): Tolerate bad sp. ! 2002-05-14 Release Manager ! * GCC 3.1 Released. ! 2002-05-14 Release Manager ! * GCC 3.1 Released. 2002-05-08 Alexandre Oliva --- 64,158 ---- * Makefile.am (toolexecdir, toolexeclibdir): Don't override. * Makefile.in, configure: Rebuilt. ! 2002-12-31 Tom Tromey ! For PR libgcj/8933: ! * include/Makefile.in: Rebuilt. ! * include/Makefile.am (noinst_HEADERS): Renamed from ! include_HEADERS. ! 2002-11-19 Rainer Orth ! * ltconfig (osf[345]): Append $major to soname_spec. ! Reflect this in library_names_spec. ! * ltmain.sh (osf): Prefix $major with . for use as extension. ! 2002-10-02 Andreas Jaeger ! * include/private/gcconfig.h (HBLKSIZE): Define for x86-64. ! 2002-09-28 Richard Earnshaw ! * include/private/gcconfig.h: Don't check for __XSCALE__. Instead ! check for __arm__ or __thumb__. ! ! 2002-09-27 Ulrich Weigand ! ! * include/private/gcconfig: Add machine type S390. Add s390x support. ! * include/private/gc_locks.h (GC_test_and_set): Implement for s390. ! (GC_compare_and_exchange): Likewise. ! ! 2002-09-24 Jason Thorpe ! ! * include/private/gcconfig.h: Fix NetBSD/mips parameters. 2002-08-23 Adam Megacz * win32_threads.cc: Removed extraneous ABORT() ! 2002-09-22 Kaveh R. Ghazi ! * Makefile.am (all-multi): Fix multilib parallel build. ! 2002-07-18 Bo Thorsen ! * include/private/gcconfig.h: Add x86-64 definitions. ! * os_dep.c: Add x86-64 support. ! * configure.in: Likewise. ! * configure: Regenerate. ! 2002-07-18 H.J. Lu ! * mach_dep.c (GC_push_regs): Remove the unused Linux/mips code. ! 2002-07-18 H.J. Lu (hjl@gnu.org) ! * configure.in (machdep): Don't add mips_sgi_mach_dep.lo for ! Linux/mips. ! 2002-06-28 Hans Boehm ! Jonathan Clark ! * win32_threads.c (GC_push_all_stacks): Tolerate bad sp. ! ! 2002-06-09 H.J. Lu (hjl@gnu.org) ! ! * include/private/gc_locks.h (GC_test_and_set): Support ! Linux/mips. ! (GC_TEST_AND_SET_DEFINED): Likewise. ! ! * include/private/gcconfig.h (DYNAMIC_LOADING): Defined for ! Linux/mips. ! (DATAEND): Likewise. ! (LINUX_STACKBOTTOM): Likewise. ! (STACKBOTTOM): Removed for Linux/mips. ! ! Sun May 19 11:32:03 2002 Mark P Mitchell ! ! * irix_threads.cc (GC_pthread_detach): Do not use REAL_FUNC. ! (GC_pthread_create): Fix typo. ! (GC_TRY_LOCK): Likewise. ! * include/private/gc_locks.h (GC_test_and_set): Only take one ! one argument. ! (LOCK): Adjust appropriately. ! * include/private/gc_priv.h (SIG_SUSPEND): Use SIGRTMIN if ! _SIGRTMIN is unavailable. ! ! 2002-05-16 Rainer Orth ! ! * acinclude.m4: Allow for PWDCMD to override hardcoded pwd. ! * aclocal.m4: Regenerate. ! * configure: Regenerate. 2002-05-08 Alexandre Oliva *************** *** 83,99 **** SPARC Linux. 2002-04-09 Loren J. Rittle - Richard Henderson * include/private/gcconfig.h (DATAEND): Update comment example ! to match reality. Clarify comment. ! Change all likely references to linker script synthesized ! symbols to use this idiom: extern int etext[]; etext ! * os_dep.c (GC_init_linux_data_start): Fix references to ! __data_start and _end. 2002-04-08 Hans Boehm ! * include/private/gc_priv.h (WARN macro): Add "GC warning:" prefix. (GC_large_alloc_warn_interval, GC_large_alloc_warn_suppressed): declare. --- 183,198 ---- SPARC Linux. 2002-04-09 Loren J. Rittle * include/private/gcconfig.h (DATAEND): Update comment example ! to match reality. ! ! 2002-04-08 Loren J. Rittle ! ! * include/private/gcconfig.h (DATAEND): Clarify comment. 2002-04-08 Hans Boehm ! * include/private/gc_priv.h (WARN macro): Add "GC warning:" prefix. (GC_large_alloc_warn_interval, GC_large_alloc_warn_suppressed): declare. *************** *** 101,107 **** frequency for blacklist warning message. * misc.c (GC_large_alloc_warn_interval, GC_large_alloc_warn_suppressed): define. ! (GC_init_inner): Check GC_NO_BLACKLIST_WARNING and GC_LARGE_ALLOC_WARN_INTERVAL environment variables. * doc/README.environment (GC_NO_BLACKLIST_WARNING): Deprecate. (GC_LARGE_ALLOC_WARN_INTERVAL): Add documentation. --- 200,206 ---- frequency for blacklist warning message. * misc.c (GC_large_alloc_warn_interval, GC_large_alloc_warn_suppressed): define. ! (GC_init_inner): Check GC_NO_BLACKLIST_WARNING and GC_LARGE_ALLOC_WARN_INTERVAL environment variables. * doc/README.environment (GC_NO_BLACKLIST_WARNING): Deprecate. (GC_LARGE_ALLOC_WARN_INTERVAL): Add documentation. *************** *** 114,126 **** memory hole between the end of the initialized data segment and the start of the BSS on FreeBSD/i386. - 2002-04-01 Loren J. Rittle - - * include/private/gcconfig.h: Add unified test for FreeBSD. - Support FreeBSD/alpha. - * os_dep.c: Do not include unless available. - (GC_freebsd_stack_base): Fix types. - 2002-03-30 Krister Walfridsson * include/private/gcconfig.h: define DYNAMIC_LOADING for ELF --- 213,218 ---- *************** *** 138,147 **** Safer definition for INVALID_QTID, quick_thread_id. Fix/add comments. Rearrange tse fields. ! 2002-03-24 Jeff Sturm * linux_threads.c (GC_get_nprocs): Close file descriptor. 2002-03-15 Anthony Green * misc.c (GC_init_inner): Initialize GC_write_cs before use. --- 230,262 ---- Safer definition for INVALID_QTID, quick_thread_id. Fix/add comments. Rearrange tse fields. ! 2002-03-27 Richard Henderson ! ! * os_dep.c (GC_init_linux_data_start): Fix references to ! __data_start and _end. ! ! 2002-03-25 Loren J. Rittle ! ! * include/private/gcconfig.h: Change all likely references ! to linker script synthesized symbols to use this idiom: ! extern int etext[]; etext ! ! 2002-03-25 Jeff Sturm * linux_threads.c (GC_get_nprocs): Close file descriptor. + 2002-03-21 Loren J. Rittle + + * include/private/gcconfig.h: Add unified test for FreeBSD. + Support FreeBSD/alpha. + * os_dep.c: Do not include unless available. + (GC_freebsd_stack_base): Fix types. + + 2002-03-17 Bryce McKinlay + + * Makefile.am: Make a convenience library. + * Makefile.in: Rebuilt. + 2002-03-15 Anthony Green * misc.c (GC_init_inner): Initialize GC_write_cs before use. *************** *** 159,175 **** compiling with GCC. * mark.c (GC_mark_some): We no longer use SEH if compiling with GCC. ! 2002-03-09 Bryce McKinlay ! * include/gc_priv.h: Define ALIGN_DOUBLE on 32 bit targets if GCJ support is enabled, for hash synchronization. - 2002-03-17 Bryce McKinlay - - * Makefile.am: Make a convenience library. - * Makefile.in: Rebuilt. - 2002-02-24 Adam Megacz * Makefile.am: Added win32_threads.c to sources list. --- 274,285 ---- compiling with GCC. * mark.c (GC_mark_some): We no longer use SEH if compiling with GCC. ! 2002-03-09 Bryce McKinlay ! * include/gc_priv.h: Define ALIGN_DOUBLE on 32 bit targets if GCJ support is enabled, for hash synchronization. 2002-02-24 Adam Megacz * Makefile.am: Added win32_threads.c to sources list. *************** *** 183,190 **** 2002-02-13 Bryce McKinlay * dbg_mlc.c (GC_debug_generic_malloc): Removed. ! ! * sparc_mach_dep.S: Rename from sparc_mach_dep.s as it is a preprocessor file. * mips_sgi_mach_dep.S: Likewise. * Makefile.am: Update for above changes. --- 293,300 ---- 2002-02-13 Bryce McKinlay * dbg_mlc.c (GC_debug_generic_malloc): Removed. ! ! * sparc_mach_dep.S: Rename from sparc_mach_dep.s as it is a preprocessor file. * mips_sgi_mach_dep.S: Likewise. * Makefile.am: Update for above changes. *************** *** 231,237 **** * boehm-gc on win32 now automatically detects if it is being built as a DLL; see http://gcc.gnu.org/ml/java/2001-12/msg00240.html ! 2002-01-25 David Edelsohn * include/gc.h (GC_INIT): Add DATASTART and DATAEND roots on AIX. --- 341,347 ---- * boehm-gc on win32 now automatically detects if it is being built as a DLL; see http://gcc.gnu.org/ml/java/2001-12/msg00240.html ! 2002-01-25 David Edelsohn * include/gc.h (GC_INIT): Add DATASTART and DATAEND roots on AIX. *************** *** 252,258 **** 2001-12-16 Craig Rodrigues PR other/3725 ! * configure.in: Add AC_SUBST(target_alias). * configure: Regenerated. 2001-11-26 Loren J. Rittle --- 362,368 ---- 2001-12-16 Craig Rodrigues PR other/3725 ! * configure.in: Add AC_SUBST(target_alias). * configure: Regenerated. 2001-11-26 Loren J. Rittle *************** *** 300,306 **** * solaris_threads.c (MAX_ORIG_STACK_SIZE) [I386]: Provide special Solaris 2/Intel definition. ! * configure.in (i?86-*-solaris2.[89]*): Define SOLARIS25_PROC_VDB_BUG_FIXED. * include/private/gcconfig.h [I386 && SUNOS5]: Use it. --- 410,416 ---- * solaris_threads.c (MAX_ORIG_STACK_SIZE) [I386]: Provide special Solaris 2/Intel definition. ! * configure.in (i?86-*-solaris2.[89]*): Define SOLARIS25_PROC_VDB_BUG_FIXED. * include/private/gcconfig.h [I386 && SUNOS5]: Use it. *************** *** 485,492 **** functions. * Makefile.in: Rebuilt. * configure: Rebuilt. ! ! * linux_thread.c (GC_thr_init, GC_suspend_handler): Add SIGABRT to the list of signals which are not blocked during suspend in the NO_SIGNALS case. --- 595,602 ---- functions. * Makefile.in: Rebuilt. * configure: Rebuilt. ! ! * linux_thread.c (GC_thr_init, GC_suspend_handler): Add SIGABRT to the list of signals which are not blocked during suspend in the NO_SIGNALS case. *************** *** 513,519 **** 2000-09-30 Bryce McKinlay ! * configure.in: Define GC_GCJ_SUPPORT. Define NO_DEBUGGING in cross-compile configuration only. * Makefile.am: Build gcj_mlc.c. * configure, Makefile.in: Rebuilt. --- 623,629 ---- 2000-09-30 Bryce McKinlay ! * configure.in: Define GC_GCJ_SUPPORT. Define NO_DEBUGGING in cross-compile configuration only. * Makefile.am: Build gcj_mlc.c. * configure, Makefile.in: Rebuilt. *************** *** 596,602 **** Imported version version 5.0alpha6. * acinclude.m4: Bump version to 5.0a6. * configure.in: Don't use alpha_mach_dep.s. ! * include/private/config.h, irix_threads.c gc_watcom.asm: Delete obsolete files. * Makefile.am, Makefile.in: irix_threads.c is now hpux_irix_threads.c. --- 706,712 ---- Imported version version 5.0alpha6. * acinclude.m4: Bump version to 5.0a6. * configure.in: Don't use alpha_mach_dep.s. ! * include/private/config.h, irix_threads.c gc_watcom.asm: Delete obsolete files. * Makefile.am, Makefile.in: irix_threads.c is now hpux_irix_threads.c. *************** Fri Jan 28 17:13:20 2000 Anthony Green *** 628,634 **** 1999-12-19 Anthony Green ! * gcconfig.h: Use libgcj hack for Alpha Linux. Undefine MPROTEXT_VDB (from Jeff Sturm). * os_dep.c: Remove Alpha Linux hacks. * misc.c: Ditto. --- 738,744 ---- 1999-12-19 Anthony Green ! * gcconfig.h: Use libgcj hack for Alpha Linux. Undefine MPROTEXT_VDB (from Jeff Sturm). * os_dep.c: Remove Alpha Linux hacks. * misc.c: Ditto. *************** Mon Aug 2 23:09:41 1999 Rainer Orth < *** 825,831 **** (LTCOMPILE): Renamed; added libtool invocation. (LINK): Added libtool invocation. (.s.o): use LTCOMPILE. ! * configure.in: Call AM_PROG_LIBTOOL. (target_all): Set to libgcjgc.la. Mention `.lo' forms of object files. --- 935,941 ---- (LTCOMPILE): Renamed; added libtool invocation. (LINK): Added libtool invocation. (.s.o): use LTCOMPILE. ! * configure.in: Call AM_PROG_LIBTOOL. (target_all): Set to libgcjgc.la. Mention `.lo' forms of object files. *************** Mon Aug 2 23:09:41 1999 Rainer Orth < *** 909,915 **** * configure.in: likewise * misc.c (GC_write): add eCos support. * os_dep.c (tiny_sbrk): add eCos support. ! Thu Dec 10 18:24:34 1998 Warren Levy * misc.c (GC_init_inner): Moved STACKBASE code to os_dep.c. --- 1019,1025 ---- * configure.in: likewise * misc.c (GC_write): add eCos support. * os_dep.c (tiny_sbrk): add eCos support. ! Thu Dec 10 18:24:34 1998 Warren Levy * misc.c (GC_init_inner): Moved STACKBASE code to os_dep.c. *************** Thu Dec 10 18:24:34 1998 Warren Levy < *** 921,929 **** 1998-11-20 Andrew Haley ! * Makefile.am, Makefile.in, configure.host: tx39 build option "-G 0" added. ! 1998-11-17 Tom Tromey * configure: Rebuilt. --- 1031,1039 ---- 1998-11-20 Andrew Haley ! * Makefile.am, Makefile.in, configure.host: tx39 build option "-G 0" added. ! 1998-11-17 Tom Tromey * configure: Rebuilt. *************** Wed Apr 15 11:40:56 1998 Tom Tromey &6 ! echo "configure:597: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 604,610 ---- # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 ! echo "configure:608: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** test -z "$INSTALL_SCRIPT" && INSTALL_SCR *** 646,652 **** test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 ! echo "configure:650: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile --- 657,663 ---- test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 ! echo "configure:661: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile *************** test "$program_suffix" != NONE && *** 703,709 **** test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 ! echo "configure:707: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 714,720 ---- test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 ! echo "configure:718: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** else *** 736,747 **** fi echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 ! echo "configure:740: checking for Cygwin environment" >&5 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:751: checking for Cygwin environment" >&5 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else --- 763,769 ---- return __CYGWIN__; ; return 0; } EOF ! if { (eval echo configure:767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else *************** echo "$ac_t""$ac_cv_cygwin" 1>&6 *** 769,787 **** CYGWIN= test "$ac_cv_cygwin" = yes && CYGWIN=yes echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 ! echo "configure:773: checking for mingw32 environment" >&5 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else --- 780,798 ---- CYGWIN= test "$ac_cv_cygwin" = yes && CYGWIN=yes echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 ! echo "configure:784: checking for mingw32 environment" >&5 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else *************** else { echo "configure: error: can not r *** 892,898 **** fi echo $ac_n "checking host system type""... $ac_c" 1>&6 ! echo "configure:896: checking host system type" >&5 host_alias=$host case "$host_alias" in --- 903,909 ---- fi echo $ac_n "checking host system type""... $ac_c" 1>&6 ! echo "configure:907: checking host system type" >&5 host_alias=$host case "$host_alias" in *************** host_os=`echo $host | sed 's/^\([^-]*\)- *** 913,919 **** echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 ! echo "configure:917: checking target system type" >&5 target_alias=$target case "$target_alias" in --- 924,930 ---- echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 ! echo "configure:928: checking target system type" >&5 target_alias=$target case "$target_alias" in *************** target_os=`echo $target | sed 's/^\([^-] *** 931,937 **** echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 ! echo "configure:935: checking build system type" >&5 build_alias=$build case "$build_alias" in --- 942,948 ---- echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 ! echo "configure:946: checking build system type" >&5 build_alias=$build case "$build_alias" in *************** test "$host_alias" != "$target_alias" && *** 955,961 **** # This works around an automake problem. ! mkinstalldirs="`cd $ac_aux_dir && pwd`/mkinstalldirs" --- 966,972 ---- # This works around an automake problem. ! mkinstalldirs="`cd $ac_aux_dir && ${PWDCMD-pwd}`/mkinstalldirs" *************** fi *** 971,977 **** missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 ! echo "configure:975: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. --- 982,988 ---- missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 ! echo "configure:986: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. *************** else *** 984,990 **** fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 ! echo "configure:988: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. --- 995,1001 ---- fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 ! echo "configure:999: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. *************** else *** 997,1003 **** fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 ! echo "configure:1001: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. --- 1008,1014 ---- fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 ! echo "configure:1012: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. *************** else *** 1010,1016 **** fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 ! echo "configure:1014: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. --- 1021,1027 ---- fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 ! echo "configure:1025: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. *************** else *** 1023,1029 **** fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 ! echo "configure:1027: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. --- 1034,1040 ---- fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 ! echo "configure:1038: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. *************** fi *** 1049,1055 **** # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1053: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1060,1066 ---- # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1064: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** if test -z "$CC"; then *** 1079,1085 **** # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1083: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1090,1096 ---- # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1094: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 1128,1134 **** fi echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 ! echo "configure:1132: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1139,1145 ---- fi echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 ! echo "configure:1143: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 1137,1143 **** yes; #endif EOF ! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no --- 1148,1154 ---- yes; #endif EOF ! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1152: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no *************** if test $ac_cv_prog_gcc = yes; then *** 1152,1158 **** ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 ! echo "configure:1156: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1163,1169 ---- ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 ! echo "configure:1167: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** do *** 1189,1195 **** # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1193: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1200,1206 ---- # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1204: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** test -n "$CXX" || CXX="gcc" *** 1222,1228 **** test -z "$CXX" && { echo "configure: error: no acceptable c++ found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 ! echo "configure:1226: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1233,1239 ---- test -z "$CXX" && { echo "configure: error: no acceptable c++ found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 ! echo "configure:1237: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 1231,1237 **** yes; #endif EOF ! if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no --- 1242,1248 ---- yes; #endif EOF ! if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no *************** if test $ac_cv_prog_gxx = yes; then *** 1246,1252 **** ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 ! echo "configure:1250: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1257,1263 ---- ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 ! echo "configure:1261: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 1279,1285 **** # NEWLIB_CONFIGURE, which doesn't work because that means that it will # be run before AC_CANONICAL_HOST. echo $ac_n "checking build system type""... $ac_c" 1>&6 ! echo "configure:1283: checking build system type" >&5 build_alias=$build case "$build_alias" in --- 1290,1296 ---- # NEWLIB_CONFIGURE, which doesn't work because that means that it will # be run before AC_CANONICAL_HOST. echo $ac_n "checking build system type""... $ac_c" 1>&6 ! echo "configure:1294: checking build system type" >&5 build_alias=$build case "$build_alias" in *************** echo "$ac_t""$build" 1>&6 *** 1300,1306 **** # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1304: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1311,1317 ---- # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1315: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 1332,1338 **** # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1336: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1343,1349 ---- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1347: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 1364,1370 **** # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1368: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1375,1381 ---- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1379: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** if test -n "$ac_tool_prefix"; then *** 1396,1402 **** # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1400: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1407,1413 ---- # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1411: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 1441,1447 **** # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 ! echo "configure:1445: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 1452,1458 ---- # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 ! echo "configure:1456: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** test -z "$INSTALL_DATA" && INSTALL_DATA= *** 1495,1501 **** echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 ! echo "configure:1499: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" --- 1506,1512 ---- echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 ! echo "configure:1510: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" *************** if false; then *** 1533,1539 **** echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 ! echo "configure:1537: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1544,1550 ---- echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 ! echo "configure:1548: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 1543,1552 **** rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= ! if { (eval echo configure:1547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in ! *.c | *.o | *.obj) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done --- 1554,1563 ---- rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= ! if { (eval echo configure:1558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in ! *.c | *.o | *.obj | *.ilk | *.pdb) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done *************** ac_prog=ld *** 1665,1671 **** if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 ! echo "configure:1669: checking for ld used by GCC" >&5 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw --- 1676,1682 ---- if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 ! echo "configure:1680: checking for ld used by GCC" >&5 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw *************** echo "configure:1669: checking for ld us *** 1695,1704 **** esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 ! echo "configure:1699: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 ! echo "configure:1702: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 1706,1715 ---- esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 ! echo "configure:1710: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 ! echo "configure:1713: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** else *** 1733,1739 **** fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 ! echo "configure:1737: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1744,1750 ---- fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 ! echo "configure:1748: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** with_gnu_ld=$lt_cv_prog_gnu_ld *** 1750,1756 **** echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 ! echo "configure:1754: checking for $LD option to reload object files" >&5 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1761,1767 ---- echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 ! echo "configure:1765: checking for $LD option to reload object files" >&5 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** reload_flag=$lt_cv_ld_reload_flag *** 1762,1768 **** test -n "$reload_flag" && reload_flag=" $reload_flag" echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 ! echo "configure:1766: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1773,1779 ---- test -n "$reload_flag" && reload_flag=" $reload_flag" echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 ! echo "configure:1777: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** NM="$lt_cv_path_NM" *** 1800,1806 **** echo "$ac_t""$NM" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 ! echo "configure:1804: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1811,1817 ---- echo "$ac_t""$NM" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 ! echo "configure:1815: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 1821,1827 **** fi echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 ! echo "configure:1825: checking how to recognise dependant libraries" >&5 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1832,1838 ---- fi echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 ! echo "configure:1836: checking how to recognise dependant libraries" >&5 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** gnu*) *** 1893,1901 **** ;; hpux10.20*|hpux11*) ! lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' ! lt_cv_file_magic_cmd=/usr/bin/file ! lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; irix5* | irix6*) --- 1904,1921 ---- ;; hpux10.20*|hpux11*) ! case $host_cpu in ! hppa*) ! lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' ! lt_cv_file_magic_cmd=/usr/bin/file ! lt_cv_file_magic_test_file=/usr/lib/libc.sl ! ;; ! ia64*) ! lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' ! lt_cv_file_magic_cmd=/usr/bin/file ! lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ! ;; ! esac ;; irix5* | irix6*) *************** file_magic_cmd=$lt_cv_file_magic_cmd *** 1985,1997 **** deplibs_check_method=$lt_cv_deplibs_check_method echo $ac_n "checking for object suffix""... $ac_c" 1>&6 ! echo "configure:1989: checking for object suffix" >&5 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftest* echo 'int i = 1;' > conftest.$ac_ext ! if { (eval echo configure:1995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; --- 2005,2017 ---- deplibs_check_method=$lt_cv_deplibs_check_method echo $ac_n "checking for object suffix""... $ac_c" 1>&6 ! echo "configure:2009: checking for object suffix" >&5 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftest* echo 'int i = 1;' > conftest.$ac_ext ! if { (eval echo configure:2015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; *************** case $deplibs_check_method in *** 2015,2021 **** file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 ! echo "configure:2019: checking for ${ac_tool_prefix}file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2035,2041 ---- file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 ! echo "configure:2039: checking for ${ac_tool_prefix}file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 2077,2083 **** if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo $ac_n "checking for file""... $ac_c" 1>&6 ! echo "configure:2081: checking for file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2097,2103 ---- if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo $ac_n "checking for file""... $ac_c" 1>&6 ! echo "configure:2101: checking for file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** esac *** 2148,2154 **** # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2152: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2168,2174 ---- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2172: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** if test -n "$ac_tool_prefix"; then *** 2180,2186 **** # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2184: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2200,2206 ---- # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2204: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 2215,2221 **** # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2219: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2235,2241 ---- # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2239: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** if test -n "$ac_tool_prefix"; then *** 2247,2253 **** # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2251: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2267,2273 ---- # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2271: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** test x"$pic_mode" = xno && libtool_flags *** 2314,2321 **** case $host in *-*-irix6*) # Find out which ABI we are using. ! echo '#line 2318 "configure"' > conftest.$ac_ext ! if { (eval echo configure:2319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" --- 2334,2354 ---- case $host in *-*-irix6*) # Find out which ABI we are using. ! echo '#line 2338 "configure"' > conftest.$ac_ext ! if { (eval echo configure:2339: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! if test "$lt_cv_prog_gnu_ld" = yes; then ! case `/usr/bin/file conftest.$ac_objext` in ! *32-bit*) ! LD="${LD-ld} -melf32bsmip" ! ;; ! *N32*) ! LD="${LD-ld} -melf32bmipn32" ! ;; ! *64-bit*) ! LD="${LD-ld} -melf64bmip" ! ;; ! esac ! else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" *************** case $host in *** 2327,2332 **** --- 2360,2424 ---- LD="${LD-ld} -64" ;; esac + fi + fi + rm -rf conftest* + ;; + + ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo configure:2372: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + case "`/usr/bin/file conftest.o`" in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; + + x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo configure:2388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + case "`/usr/bin/file conftest.o`" in + *32-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac fi rm -rf conftest* ;; *************** case $host in *** 2336,2342 **** SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 ! echo "configure:2340: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2428,2434 ---- SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 ! echo "configure:2432: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** ac_link='${CC-cc} -o conftest${ac_exeext *** 2349,2362 **** cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else --- 2441,2454 ---- cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else *************** echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6 *** 2386,2392 **** esac echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 ! echo "configure:2390: checking how to run the C++ preprocessor" >&5 if test -z "$CXXCPP"; then if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2478,2484 ---- esac echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 ! echo "configure:2482: checking how to run the C++ preprocessor" >&5 if test -z "$CXXCPP"; then if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** ac_link='${CXX-g++} -o conftest${ac_exee *** 2399,2410 **** cross_compiling=$ac_cv_prog_cxx_cross CXXCPP="${CXX-g++} -E" cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : --- 2491,2502 ---- cross_compiling=$ac_cv_prog_cxx_cross CXXCPP="${CXX-g++} -E" cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2500: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : *************** fi *** 2551,2557 **** echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 ! echo "configure:2555: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" --- 2643,2649 ---- echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 ! echo "configure:2647: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" *************** if false; then *** 2584,2590 **** echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 ! echo "configure:2588: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2676,2682 ---- echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 ! echo "configure:2680: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 2594,2603 **** rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= ! if { (eval echo configure:2598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in ! *.c | *.o | *.obj) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done --- 2686,2695 ---- rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= ! if { (eval echo configure:2690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in ! *.c | *.o | *.obj | *.ilk | *.pdb) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done *************** ac_exeext=$EXEEXT *** 2617,2623 **** fi echo $ac_n "checking for thread model used by GCC""... $ac_c" 1>&6 ! echo "configure:2621: checking for thread model used by GCC" >&5 THREADS=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'` if test -z "$THREADS"; then THREADS=no --- 2709,2715 ---- fi echo $ac_n "checking for thread model used by GCC""... $ac_c" 1>&6 ! echo "configure:2713: checking for thread model used by GCC" >&5 THREADS=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'` if test -z "$THREADS"; then THREADS=no *************** case "$THREADS" in *** 2646,2652 **** THREADS=posix THREADLIBS=-lpthread case "$host" in ! x86-*-linux* | ia64-*-linux* | i586-*-linux* | i686-*-linux*) cat >> confdefs.h <<\EOF #define GC_LINUX_THREADS 1 EOF --- 2738,2744 ---- THREADS=posix THREADLIBS=-lpthread case "$host" in ! x86-*-linux* | ia64-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* ) cat >> confdefs.h <<\EOF #define GC_LINUX_THREADS 1 EOF *************** EOF *** 2737,2742 **** --- 2829,2840 ---- #define NO_GETENV 1 EOF + if test $enable_shared = yes; then + cat >> confdefs.h <<\EOF + #define GC_DLL 1 + EOF + + fi ;; decosf1 | irix | mach | os2 | solaris | dce | vxworks) { echo "configure: error: thread package $THREADS not yet supported" 1>&2; exit 1; } *************** esac *** 2748,2754 **** echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 ! echo "configure:2752: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2846,2852 ---- echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 ! echo "configure:2850: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** else *** 2756,2762 **** ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else --- 2865,2871 ---- dlopen() ; return 0; } EOF ! if { (eval echo configure:2869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else *************** EOF *** 2875,2880 **** --- 2973,2980 ---- mips-dec-ultrix*) machdep="mips_ultrix_mach-dep.lo" ;; + mips*-*-linux*) + ;; mips-*-*) machdep="mips_sgi_mach_dep.lo" cat >> confdefs.h <<\EOF *************** EOF *** 2984,2990 **** EOF ;; ! x86-*-linux* | i586-*-linux* | i686-*-linux* ) cat >> confdefs.h <<\EOF #define MAKE_BACK_GRAPH 1 EOF --- 3084,3090 ---- EOF ;; ! x86-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* ) cat >> confdefs.h <<\EOF #define MAKE_BACK_GRAPH 1 EOF *************** trap 'rm -f $CONFIG_STATUS conftest*; ex *** 3084,3117 **** # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. ! # ! # If the first sed substitution is executed (which looks for macros that ! # take arguments), then we branch to the quote section. Otherwise, ! # look for a macro that doesn't take arguments. ! cat >confdef2opt.sed <<\_ACEOF ! t clear ! : clear ! s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g ! t quote ! s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g ! t quote ! d ! : quote ! s,[ `~#$^&*(){}\\|;'"<>?],\\&,g ! s,\[,\\&,g ! s,\],\\&,g ! s,\$,$$,g ! p ! _ACEOF ! # We use echo to avoid assuming a particular line-breaking character. ! # The extra dot is to prevent the shell from consuming trailing ! # line-breaks from the sub-command output. A line-break within ! # single-quotes doesn't work because, if this script is created in a ! # platform that uses two characters for line-breaks (e.g., DOS), tr ! # would break. ! ac_LF_and_DOT=`echo; echo .` ! DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` ! rm -f confdef2opt.sed # Without the "./", some shells look in PATH for config.status. --- 3184,3198 ---- # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. ! cat > conftest.defs <<\EOF ! s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g ! s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g ! s%\[%\\&%g ! s%\]%\\&%g ! s%\$%$$%g ! EOF ! DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` ! rm -f conftest.defs # Without the "./", some shells look in PATH for config.status. *************** cat >> $CONFIG_STATUS <<\EOF *** 3242,3248 **** # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ! ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. ac_file=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_cmds # Line after last line for current file. --- 3323,3329 ---- # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ! ac_max_sed_cmds=60 # Maximum number of lines to put in a sed script. ac_file=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_cmds # Line after last line for current file. *************** ac_configure_args="${multilib_arg} ${ac_ *** 3344,3349 **** --- 3425,3431 ---- CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} gc_basedir=${gc_basedir} CC="${CC}" + ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}" DEFS="$DEFS" EOF diff -Nrc3pad gcc-3.2.3/boehm-gc/configure.in gcc-3.3/boehm-gc/configure.in *** gcc-3.2.3/boehm-gc/configure.in 2003-01-28 01:44:36.000000000 +0000 --- gcc-3.3/boehm-gc/configure.in 2003-04-28 20:55:07.000000000 +0000 *************** case "$THREADS" in *** 73,79 **** THREADS=posix THREADLIBS=-lpthread case "$host" in ! x86-*-linux* | ia64-*-linux* | i586-*-linux* | i686-*-linux*) AC_DEFINE(GC_LINUX_THREADS) AC_DEFINE(_REENTRANT) if test "${enable_parallel_mark}"; then --- 73,79 ---- THREADS=posix THREADLIBS=-lpthread case "$host" in ! x86-*-linux* | ia64-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* ) AC_DEFINE(GC_LINUX_THREADS) AC_DEFINE(_REENTRANT) if test "${enable_parallel_mark}"; then *************** case "$THREADS" in *** 116,121 **** --- 116,124 ---- win32) AC_DEFINE(GC_WIN32_THREADS) AC_DEFINE(NO_GETENV) + if test $enable_shared = yes; then + AC_DEFINE(GC_DLL) + fi ;; decosf1 | irix | mach | os2 | solaris | dce | vxworks) AC_MSG_ERROR(thread package $THREADS not yet supported) *************** case "$host" in *** 182,187 **** --- 185,192 ---- mips-dec-ultrix*) machdep="mips_ultrix_mach-dep.lo" ;; + mips*-*-linux*) + ;; mips-*-*) machdep="mips_sgi_mach_dep.lo" AC_DEFINE(NO_EXECUTE_PERMISSION) *************** AC_ARG_ENABLE(full-debug, *** 257,263 **** ia64-*-linux* ) AC_DEFINE(MAKE_BACK_GRAPH) ;; ! x86-*-linux* | i586-*-linux* | i686-*-linux* ) AC_DEFINE(MAKE_BACK_GRAPH) AC_MSG_WARN("Client must not use -fomit-frame-pointer.") AC_DEFINE(SAVE_CALL_COUNT, 8) --- 262,268 ---- ia64-*-linux* ) AC_DEFINE(MAKE_BACK_GRAPH) ;; ! x86-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* ) AC_DEFINE(MAKE_BACK_GRAPH) AC_MSG_WARN("Client must not use -fomit-frame-pointer.") AC_DEFINE(SAVE_CALL_COUNT, 8) *************** ac_configure_args="${multilib_arg} ${ac_ *** 299,303 **** --- 304,309 ---- CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} gc_basedir=${gc_basedir} CC="${CC}" + ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}" DEFS="$DEFS" ) diff -Nrc3pad gcc-3.2.3/boehm-gc/dyn_load.c gcc-3.3/boehm-gc/dyn_load.c *** gcc-3.2.3/boehm-gc/dyn_load.c 2002-04-09 00:03:24.000000000 +0000 --- gcc-3.3/boehm-gc/dyn_load.c 2003-03-04 06:38:30.000000000 +0000 *************** void GC_register_dynamic_libraries() *** 355,364 **** /* Stack mapping; discard */ continue; } - if (start <= datastart && end > datastart && maj_dev != 0) { - /* Main data segment; discard */ - continue; - } # ifdef THREADS if (GC_segment_is_thread_stack(start, end)) continue; # endif --- 355,360 ---- *************** void GC_register_dynamic_libraries() *** 384,389 **** --- 380,392 ---- } } + /* We now take care of the main data segment ourselves: */ + GC_bool GC_register_main_static_data() + { + return FALSE; + } + + # define HAVE_REGISTER_MAIN_STATIC_DATA // // parse_map_entry parses an entry from /proc/self/maps so we can // locate all writable data segments that belong to shared libraries. *************** static int GC_register_dynlib_callback(i *** 469,481 **** + sizeof (info->dlpi_phnum)) return -1; - /* Skip the first object - it is the main program. */ - if (*(int *)ptr == 0) - { - *(int *)ptr = 1; - return 0; - } - p = info->dlpi_phdr; for( i = 0; i < (int)(info->dlpi_phnum); ((i++),(p++)) ) { switch( p->p_type ) { --- 472,477 ---- *************** static int GC_register_dynlib_callback(i *** 491,496 **** --- 487,493 ---- } } + * (int *)ptr = 1; /* Signal that we were called */ return 0; } *************** static int GC_register_dynlib_callback(i *** 500,515 **** GC_bool GC_register_dynamic_libraries_dl_iterate_phdr() { - int tmp = 0; - if (dl_iterate_phdr) { ! dl_iterate_phdr(GC_register_dynlib_callback, &tmp); return TRUE; } else { return FALSE; } } # else /* !LINUX || version(glibc) < 2.2.4 */ /* Dynamic loading code for Linux running ELF. Somewhat tested on --- 497,527 ---- GC_bool GC_register_dynamic_libraries_dl_iterate_phdr() { if (dl_iterate_phdr) { ! int did_something = 0; ! dl_iterate_phdr(GC_register_dynlib_callback, &did_something); ! if (!did_something) { ! /* dl_iterate_phdr may forget the static data segment in */ ! /* statically linked executables. */ ! GC_add_roots_inner(DATASTART, (char *)(DATAEND), TRUE); ! # if defined(DATASTART2) ! GC_add_roots_inner(DATASTART2, (char *)(DATAEND2), TRUE); ! # endif ! } return TRUE; } else { return FALSE; } } + /* Do we need to separately register the main static data segment? */ + GC_bool GC_register_main_static_data() + { + return (dl_iterate_phdr == 0); + } + + #define HAVE_REGISTER_MAIN_STATIC_DATA + # else /* !LINUX || version(glibc) < 2.2.4 */ /* Dynamic loading code for Linux running ELF. Somewhat tested on *************** void GC_register_dynamic_libraries() *** 775,784 **** } # endif ! # ifndef MSWINCE extern GC_bool GC_no_win32_dlls; ! # endif void GC_register_dynamic_libraries() { MEMORY_BASIC_INFORMATION buf; --- 787,809 ---- } # endif ! # ifdef MSWINCE ! /* Do we need to separately register the main static data segment? */ ! GC_bool GC_register_main_static_data() ! { ! return FALSE; ! } ! # else /* win32 */ extern GC_bool GC_no_win32_dlls; ! ! GC_bool GC_register_main_static_data() ! { ! return GC_no_win32_dlls; ! } ! # endif /* win32 */ + # define HAVE_REGISTER_MAIN_STATIC_DATA + void GC_register_dynamic_libraries() { MEMORY_BASIC_INFORMATION buf; *************** void GC_register_dynamic_libraries(){} *** 1079,1082 **** --- 1104,1118 ---- int GC_no_dynamic_loading; #endif /* !PCR */ + #endif /* !DYNAMIC_LOADING */ + + #ifndef HAVE_REGISTER_MAIN_STATIC_DATA + + /* Do we need to separately register the main static data segment? */ + GC_bool GC_register_main_static_data() + { + return TRUE; + } + #endif /* HAVE_REGISTER_MAIN_STATIC_DATA */ + diff -Nrc3pad gcc-3.2.3/boehm-gc/include/Makefile.am gcc-3.3/boehm-gc/include/Makefile.am *** gcc-3.2.3/boehm-gc/include/Makefile.am 2001-09-12 01:57:03.000000000 +0000 --- gcc-3.3/boehm-gc/include/Makefile.am 2002-12-31 17:52:45.000000000 +0000 *************** *** 1,6 **** AUTOMAKE_OPTIONS = foreign ! include_HEADERS = gc.h gc_backptr.h gc_local_alloc.h \ gc_pthread_redirects.h gc_cpp.h --- 1,6 ---- AUTOMAKE_OPTIONS = foreign ! noinst_HEADERS = gc.h gc_backptr.h gc_local_alloc.h \ gc_pthread_redirects.h gc_cpp.h diff -Nrc3pad gcc-3.2.3/boehm-gc/include/Makefile.in gcc-3.3/boehm-gc/include/Makefile.in *** gcc-3.2.3/boehm-gc/include/Makefile.in 2002-02-12 04:37:56.000000000 +0000 --- gcc-3.3/boehm-gc/include/Makefile.in 2002-12-31 17:52:45.000000000 +0000 *************** target_all = @target_all@ *** 96,106 **** AUTOMAKE_OPTIONS = foreign ! include_HEADERS = gc.h gc_backptr.h gc_local_alloc.h \ gc_pthread_redirects.h gc_cpp.h CONFIG_CLEAN_FILES = ! HEADERS = $(include_HEADERS) DIST_COMMON = Makefile.am Makefile.in --- 96,106 ---- AUTOMAKE_OPTIONS = foreign ! noinst_HEADERS = gc.h gc_backptr.h gc_local_alloc.h \ gc_pthread_redirects.h gc_cpp.h CONFIG_CLEAN_FILES = ! HEADERS = $(noinst_HEADERS) DIST_COMMON = Makefile.am Makefile.in *************** Makefile: $(srcdir)/Makefile.in $(top_b *** 119,139 **** && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status - install-includeHEADERS: $(include_HEADERS) - @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(includedir) - @list='$(include_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \ - echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p"; \ - $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p; \ - done - - uninstall-includeHEADERS: - @$(NORMAL_UNINSTALL) - list='$(include_HEADERS)'; for p in $$list; do \ - rm -f $(DESTDIR)$(includedir)/$$p; \ - done - tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) --- 119,124 ---- *************** install-info: install-info-am *** 191,210 **** install-exec-am: install-exec: install-exec-am ! install-data-am: install-includeHEADERS install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-am ! uninstall-am: uninstall-includeHEADERS uninstall: uninstall-am all-am: Makefile $(HEADERS) all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: - $(mkinstalldirs) $(DESTDIR)$(includedir) mostlyclean-generic: --- 176,194 ---- install-exec-am: install-exec: install-exec-am ! install-data-am: install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-am ! uninstall-am: uninstall: uninstall-am all-am: Makefile $(HEADERS) all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: mostlyclean-generic: *************** maintainer-clean-am: maintainer-clean-t *** 236,249 **** maintainer-clean: maintainer-clean-am ! .PHONY: uninstall-includeHEADERS install-includeHEADERS tags \ ! mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \ ! distdir info-am info dvi-am dvi check check-am installcheck-am \ ! installcheck install-info-am install-info install-exec-am install-exec \ ! install-data-am install-data install-am install uninstall-am uninstall \ ! all-redirect all-am all installdirs mostlyclean-generic \ ! distclean-generic clean-generic maintainer-clean-generic clean \ ! mostlyclean distclean maintainer-clean # Tell versions [3.59,3.63) of GNU make to not export all variables. --- 220,232 ---- maintainer-clean: maintainer-clean-am ! .PHONY: tags mostlyclean-tags distclean-tags clean-tags \ ! maintainer-clean-tags distdir info-am info dvi-am dvi check check-am \ ! installcheck-am installcheck install-info-am install-info \ ! install-exec-am install-exec install-data-am install-data install-am \ ! install uninstall-am uninstall all-redirect all-am all installdirs \ ! mostlyclean-generic distclean-generic clean-generic \ ! maintainer-clean-generic clean mostlyclean distclean maintainer-clean # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nrc3pad gcc-3.2.3/boehm-gc/include/private/gcconfig.h gcc-3.3/boehm-gc/include/private/gcconfig.h *** gcc-3.2.3/boehm-gc/include/private/gcconfig.h 2002-04-22 06:05:04.000000000 +0000 --- gcc-3.3/boehm-gc/include/private/gcconfig.h 2003-04-10 00:08:01.000000000 +0000 *************** *** 44,50 **** # endif /* Determine the machine type: */ ! # if defined(__XSCALE__) # define ARM32 # if !defined(LINUX) # define NOSYS --- 44,50 ---- # endif /* Determine the machine type: */ ! # if defined(__arm__) || defined(__thumb__) # define ARM32 # if !defined(LINUX) # define NOSYS *************** *** 95,102 **** # if defined(nec_ews) || defined(_nec_ews) # define EWS4800 # endif ! # if !defined(LINUX) && !defined(EWS4800) ! # if defined(ultrix) || defined(__ultrix) || defined(__NetBSD__) # define ULTRIX # else # if defined(_SYSTYPE_SVR4) || defined(SYSTYPE_SVR4) \ --- 95,102 ---- # if defined(nec_ews) || defined(_nec_ews) # define EWS4800 # endif ! # if !defined(LINUX) && !defined(EWS4800) && !defined(NETBSD) ! # if defined(ultrix) || defined(__ultrix) # define ULTRIX # else # if defined(_SYSTYPE_SVR4) || defined(SYSTYPE_SVR4) \ *************** *** 107,115 **** # endif # endif # endif /* !LINUX */ - # if defined(__NetBSD__) && defined(__MIPSEL__) - # undef ULTRIX - # endif # define mach_type_known # endif # if defined(sequent) && (defined(i386) || defined(__i386__)) --- 107,112 ---- *************** *** 193,198 **** --- 190,199 ---- # define I386 # define mach_type_known # endif + # if defined(LINUX) && defined(__x86_64__) + # define X86_64 + # define mach_type_known + # endif # if defined(LINUX) && (defined(__ia64__) || defined(__ia64)) # define IA64 # define mach_type_known *************** *** 369,375 **** # define mach_type_known # endif # if defined(__s390__) && defined(LINUX) ! # define S370 # define mach_type_known # endif # if defined(__GNU__) --- 370,376 ---- # define mach_type_known # endif # if defined(__s390__) && defined(LINUX) ! # define S390 # define mach_type_known # endif # if defined(__GNU__) *************** *** 418,424 **** /* (CX_UX and DGUX) */ /* S370 ==> 370-like machine */ /* running Amdahl UTS4 */ ! /* or a 390 running LINUX */ /* ARM32 ==> Intel StrongARM */ /* IA64 ==> Intel IPF */ /* (e.g. Itanium) */ --- 419,426 ---- /* (CX_UX and DGUX) */ /* S370 ==> 370-like machine */ /* running Amdahl UTS4 */ ! /* S390 ==> 390-like machine */ ! /* running LINUX */ /* ARM32 ==> Intel StrongARM */ /* IA64 ==> Intel IPF */ /* (e.g. Itanium) */ *************** *** 427,432 **** --- 429,435 ---- /* (HPUX) */ /* SH ==> Hitachi SuperH */ /* (LINUX & MSWINCE) */ + /* X86_64 ==> AMD x86-64 */ /* *************** *** 666,675 **** # define ALIGNMENT 4 /* Guess. Can someone verify? */ /* This was 2, but that didn't sound right. */ # define OS_TYPE "LINUX" - # define HEURISTIC1 # define DYNAMIC_LOADING ! # undef STACK_GRAN ! # define STACK_GRAN 0x10000000 /* Stack usually starts at 0x80000000 */ # define LINUX_DATA_START extern int _end[]; --- 669,676 ---- # define ALIGNMENT 4 /* Guess. Can someone verify? */ /* This was 2, but that didn't sound right. */ # define OS_TYPE "LINUX" # define DYNAMIC_LOADING ! # define LINUX_STACKBOTTOM /* Stack usually starts at 0x80000000 */ # define LINUX_DATA_START extern int _end[]; *************** *** 682,688 **** # define DATASTART ((ptr_t) get_etext()) # define STACKBOTTOM ((ptr_t) 0xc0000000) # define DATAEND /* not needed */ ! # define MPROTECT_VDB # include # define GETPAGESIZE() getpagesize() # endif --- 683,689 ---- # define DATASTART ((ptr_t) get_etext()) # define STACKBOTTOM ((ptr_t) 0xc0000000) # define DATAEND /* not needed */ ! # undef MPROTECT_VDB # include # define GETPAGESIZE() getpagesize() # endif *************** *** 819,830 **** # define DATAEND (_end) # define SVR4 # ifdef __arch64__ - # define DATASTART (ptr_t)GC_SysVGetDataStart(0x100000, _etext) /* libc_stack_end is not set reliably for sparc64 */ # define STACKBOTTOM ((ptr_t) 0x80000000000) # else - # define DATASTART (ptr_t)GC_SysVGetDataStart(0x10000, _etext) # define LINUX_STACKBOTTOM # endif # endif # ifdef OPENBSD --- 820,831 ---- # define DATAEND (_end) # define SVR4 # ifdef __arch64__ /* libc_stack_end is not set reliably for sparc64 */ # define STACKBOTTOM ((ptr_t) 0x80000000000) + # define DATASTART (ptr_t)GC_SysVGetDataStart(0x100000, _etext) # else # define LINUX_STACKBOTTOM + # define DATASTART (ptr_t)GC_SysVGetDataStart(0x10000, _etext) # endif # endif # ifdef OPENBSD *************** *** 1141,1155 **** /* This was developed for a linuxce style platform. Probably */ /* needs to be tweaked for workstation class machines. */ # define OS_TYPE "LINUX" extern int __data_start[]; # define DATASTART ((ptr_t)(__data_start)) # define ALIGNMENT 4 # define USE_GENERIC_PUSH_REGS ! # define STACKBOTTOM ((ptr_t)0x7fff8000) ! /* Older toolchains may need 0x80000000. */ ! /* In many cases, this should probably use LINUX_STACKBOTTOM */ ! /* instead. But some kernel versions seem to give the wrong */ ! /* value from /proc. */ # endif /* Linux */ # ifdef EWS4800 # define HEURISTIC2 --- 1142,1155 ---- /* This was developed for a linuxce style platform. Probably */ /* needs to be tweaked for workstation class machines. */ # define OS_TYPE "LINUX" + # define DYNAMIC_LOADING + extern int _end[]; + # define DATAEND (_end) extern int __data_start[]; # define DATASTART ((ptr_t)(__data_start)) # define ALIGNMENT 4 # define USE_GENERIC_PUSH_REGS ! # define LINUX_STACKBOTTOM # endif /* Linux */ # ifdef EWS4800 # define HEURISTIC2 *************** *** 1222,1242 **** # define DATAEND /* not needed */ # endif # if defined(NETBSD) - /* This also checked for __MIPSEL__ . Why? NETBSD recognition */ - /* should be handled at the top of the file. */ - # define ALIGNMENT 4 # define OS_TYPE "NETBSD" # define HEURISTIC2 # define USE_GENERIC_PUSH_REGS ! # ifdef __ELF__ ! extern int etext[]; ! # define DATASTART GC_data_start ! # define NEED_FIND_LIMIT ! # define DYNAMIC_LOADING ! # else ! # define DATASTART ((ptr_t) 0x10000000) ! # define STACKBOTTOM ((ptr_t) 0x7ffff000) ! # endif /* _ELF_ */ # endif # endif --- 1222,1236 ---- # define DATAEND /* not needed */ # endif # if defined(NETBSD) # define OS_TYPE "NETBSD" + # define ALIGNMENT 4 # define HEURISTIC2 # define USE_GENERIC_PUSH_REGS ! extern int _fdata[]; ! # define DATASTART ((ptr_t)(_fdata)) ! extern int _end[]; ! # define DATAEND ((ptr_t)(_end)) ! # define DYNAMIC_LOADING # endif # endif *************** *** 1528,1539 **** # define DATAEND (_end) # define HEURISTIC2 # endif # ifdef LINUX # define OS_TYPE "LINUX" ! # define HEURISTIC1 # define DYNAMIC_LOADING extern int __data_start[]; # define DATASTART ((ptr_t)(__data_start)) # endif # endif --- 1522,1550 ---- # define DATAEND (_end) # define HEURISTIC2 # endif + # endif + + # ifdef S390 + # define MACH_TYPE "S390" + # define USE_GENERIC_PUSH_REGS + # ifndef __s390x__ + # define ALIGNMENT 4 + # define CPP_WORDSZ 32 + # else + # define ALIGNMENT 8 + # define CPP_WORDSZ 64 + # define HBLKSIZE 4096 + # endif # ifdef LINUX # define OS_TYPE "LINUX" ! # define LINUX_STACKBOTTOM # define DYNAMIC_LOADING extern int __data_start[]; # define DATASTART ((ptr_t)(__data_start)) + extern int _end[]; + # define DATAEND (_end) + # define CACHE_LINE_SIZE 256 + # define GETPAGESIZE() 4096 # endif # endif *************** *** 1625,1630 **** --- 1636,1679 ---- # define DATAEND /* not needed */ # endif + # ifdef X86_64 + # define MACH_TYPE "X86_64" + # define ALIGNMENT 8 + # define CPP_WORDSZ 64 + # define HBLKSIZE 4096 + # define CACHE_LINE_SIZE 64 + # define USE_GENERIC_PUSH_REGS + # ifdef LINUX + # define OS_TYPE "LINUX" + # define LINUX_STACKBOTTOM + # if !defined(GC_LINUX_THREADS) || !defined(REDIRECT_MALLOC) + # define MPROTECT_VDB + # else + /* We seem to get random errors in incremental mode, */ + /* possibly because Linux threads is itself a malloc client */ + /* and can't deal with the signals. */ + # endif + # ifdef __ELF__ + # define DYNAMIC_LOADING + # ifdef UNDEFINED /* includes ro data */ + extern int _etext[]; + # define DATASTART ((ptr_t)((((word) (_etext)) + 0xfff) & ~0xfff)) + # endif + # include + # define LINUX_DATA_START + extern int _end[]; + # define DATAEND (_end) + # else + extern int etext[]; + # define DATASTART ((ptr_t)((((word) (etext)) + 0xfff) & ~0xfff)) + # endif + # define PREFETCH(x) \ + __asm__ __volatile__ (" prefetch %0": : "m"(*(char *)(x))) + # define PREFETCH_FOR_WRITE(x) \ + __asm__ __volatile__ (" prefetchw %0": : "m"(*(char *)(x))) + # endif + # endif + #ifdef LINUX_DATA_START /* Some Linux distributions arrange to define __data_start. Some */ /* define data_start as a weak symbol. The latter is technically */ *************** *** 1750,1755 **** --- 1799,1817 ---- # define CACHE_LINE_SIZE 32 /* Wild guess */ # endif + # ifdef LINUX + # define REGISTER_LIBRARIES_EARLY + /* We sometimes use dl_iterate_phdr, which may acquire an internal */ + /* lock. This isn't safe after the world has stopped. So we must */ + /* call GC_register_dynamic_libraries before stopping the world. */ + /* For performance reasons, this may be beneficial on other */ + /* platforms as well, though it should be avoided in win32. */ + # endif /* LINUX */ + + # if defined(SEARCH_FOR_DATA_START) && defined(GC_PRIVATE_H) + extern ptr_t GC_data_start; + # endif + # ifndef CLEAR_DOUBLE # define CLEAR_DOUBLE(x) \ ((word*)x)[0] = 0; \ *************** *** 1818,1824 **** # define CAN_SAVE_CALL_STACKS # define CAN_SAVE_CALL_ARGS #endif ! #if defined(I386) && defined(LINUX) /* SAVE_CALL_CHAIN is supported if the code is compiled to save */ /* frame pointers by default, i.e. no -fomit-frame-pointer flag. */ # define CAN_SAVE_CALL_STACKS --- 1880,1886 ---- # define CAN_SAVE_CALL_STACKS # define CAN_SAVE_CALL_ARGS #endif ! #if (defined(I386) || defined(X86_64)) && defined(LINUX) /* SAVE_CALL_CHAIN is supported if the code is compiled to save */ /* frame pointers by default, i.e. no -fomit-frame-pointer flag. */ # define CAN_SAVE_CALL_STACKS diff -Nrc3pad gcc-3.2.3/boehm-gc/include/private/gc_locks.h gcc-3.3/boehm-gc/include/private/gc_locks.h *** gcc-3.2.3/boehm-gc/include/private/gc_locks.h 2001-10-16 09:01:39.000000000 +0000 --- gcc-3.3/boehm-gc/include/private/gc_locks.h 2002-09-27 20:40:06.000000000 +0000 *************** *** 209,214 **** --- 209,227 ---- } # define GC_TEST_AND_SET_DEFINED # endif /* ARM32 */ + # ifdef S390 + inline static int GC_test_and_set(volatile unsigned int *addr) { + int ret; + __asm__ __volatile__ ( + " l %0,0(%2)\n" + "0: cs %0,%1,0(%2)\n" + " jl 0b" + : "=&d" (ret) + : "d" (1), "a" (addr) + : "cc", "memory"); + return ret; + } + # endif # endif /* __GNUC__ */ # if (defined(ALPHA) && !defined(__GNUC__)) # define GC_test_and_set(addr) __cxx_test_and_set_atomic(addr, 1) *************** *** 219,229 **** # define GC_TEST_AND_SET_DEFINED # endif # ifdef MIPS ! # if __mips < 3 || !(defined (_ABIN32) || defined(_ABI64)) \ || !defined(_COMPILER_VERSION) || _COMPILER_VERSION < 700 ! # define GC_test_and_set(addr, v) test_and_set(addr,v) # else ! # define GC_test_and_set(addr, v) __test_and_set(addr,v) # define GC_clear(addr) __lock_release(addr); # define GC_CLEAR_DEFINED # endif --- 232,246 ---- # define GC_TEST_AND_SET_DEFINED # endif # ifdef MIPS ! # ifdef LINUX ! # include ! # define GC_test_and_set(addr) _test_and_set((int *) addr,1) ! # define GC_TEST_AND_SET_DEFINED ! # elif __mips < 3 || !(defined (_ABIN32) || defined(_ABI64)) \ || !defined(_COMPILER_VERSION) || _COMPILER_VERSION < 700 ! # define GC_test_and_set(addr) test_and_set(addr, 1) # else ! # define GC_test_and_set(addr) __test_and_set(addr,1) # define GC_clear(addr) __lock_release(addr); # define GC_CLEAR_DEFINED # endif *************** *** 326,331 **** --- 343,369 ---- } # endif /* 0 */ # endif /* IA64 */ + # if defined(S390) + # if !defined(GENERIC_COMPARE_AND_SWAP) + inline static GC_bool GC_compare_and_exchange(volatile C_word *addr, + GC_word old, GC_word new_val) + { + int retval; + __asm__ __volatile__ ( + # ifndef __s390x__ + " cs %1,%2,0(%3)\n" + # else + " csg %1,%2,0(%3)\n" + # endif + " ipm %0\n" + " srl %0,28\n" + : "=&d" (retval), "+d" (old) + : "d" (new_val), "a" (addr) + : "cc", "memory"); + return retval == 0; + } + # endif + # endif # if !defined(GENERIC_COMPARE_AND_SWAP) /* Returns the original value of *addr. */ inline static GC_word GC_atomic_add(volatile GC_word *addr, *************** *** 431,437 **** # define NO_THREAD (pthread_t)(-1) # define UNSET_LOCK_HOLDER() GC_lock_holder = NO_THREAD # define I_HOLD_LOCK() (pthread_equal(GC_lock_holder, pthread_self())) ! # define LOCK() { if (GC_test_and_set(&GC_allocate_lock, 1)) GC_lock(); } # define UNLOCK() GC_clear(&GC_allocate_lock); extern VOLATILE GC_bool GC_collecting; # define ENTER_GC() \ --- 469,475 ---- # define NO_THREAD (pthread_t)(-1) # define UNSET_LOCK_HOLDER() GC_lock_holder = NO_THREAD # define I_HOLD_LOCK() (pthread_equal(GC_lock_holder, pthread_self())) ! # define LOCK() { if (GC_test_and_set(&GC_allocate_lock)) GC_lock(); } # define UNLOCK() GC_clear(&GC_allocate_lock); extern VOLATILE GC_bool GC_collecting; # define ENTER_GC() \ diff -Nrc3pad gcc-3.2.3/boehm-gc/include/private/gc_priv.h gcc-3.3/boehm-gc/include/private/gc_priv.h *** gcc-3.2.3/boehm-gc/include/private/gc_priv.h 2002-04-09 00:03:24.000000000 +0000 --- gcc-3.3/boehm-gc/include/private/gc_priv.h 2003-03-04 17:56:49.000000000 +0000 *************** *** 44,53 **** # include "../gc_mark.h" # endif - # ifndef GCCONFIG_H - # include "gcconfig.h" - # endif - typedef GC_word word; typedef GC_signed_word signed_word; --- 44,49 ---- *************** typedef char * ptr_t; /* A generic point *** 60,65 **** --- 56,65 ---- /* Preferably identical to caddr_t, if it */ /* exists. */ + # ifndef GCCONFIG_H + # include "gcconfig.h" + # endif + # ifndef HEADERS_H # include "gc_hdrs.h" # endif *************** GC_bool GC_is_tmp_root GC_PROTO((ptr_t p *** 1462,1467 **** --- 1462,1472 ---- # endif void GC_register_dynamic_libraries GC_PROTO((void)); /* Add dynamic library data sections to the root set. */ + + GC_bool GC_register_main_static_data GC_PROTO((void)); + /* We need to register the main data segment. Returns */ + /* TRUE unless this is done implicitly as part of */ + /* dynamic library registration. */ /* Machine dependent startup routines */ ptr_t GC_get_stack_base GC_PROTO((void)); /* Cold end of stack */ *************** void GC_err_puts GC_PROTO((GC_CONST char *** 1916,1922 **** # define SIG_SUSPEND SIGPWR # endif # else /* !GC_LINUX_THREADS */ ! # define SIG_SUSPEND _SIGRTMIN + 6 # endif # endif /* !SIG_SUSPEND */ --- 1921,1931 ---- # define SIG_SUSPEND SIGPWR # endif # else /* !GC_LINUX_THREADS */ ! # if defined(_SIGRTMIN) ! # define SIG_SUSPEND _SIGRTMIN + 6 ! # else ! # define SIG_SUSPEND SIGRTMIN + 6 ! # endif # endif # endif /* !SIG_SUSPEND */ diff -Nrc3pad gcc-3.2.3/boehm-gc/irix_threads.c gcc-3.3/boehm-gc/irix_threads.c *** gcc-3.2.3/boehm-gc/irix_threads.c 2002-02-12 04:37:53.000000000 +0000 --- gcc-3.3/boehm-gc/irix_threads.c 2002-05-19 17:36:14.000000000 +0000 *************** int GC_pthread_detach(pthread_t thread) *** 519,525 **** LOCK(); thread_gc_id = GC_lookup_thread(thread); UNLOCK(); ! result = REAL_FUNC(pthread_detach)(thread); if (result == 0) { LOCK(); thread_gc_id -> flags |= DETACHED; --- 519,525 ---- LOCK(); thread_gc_id = GC_lookup_thread(thread); UNLOCK(); ! result = pthread_detach(thread); if (result == 0) { LOCK(); thread_gc_id -> flags |= DETACHED; *************** GC_pthread_create(pthread_t *new_thread, *** 599,605 **** si -> start_routine = start_routine; si -> arg = arg; LOCK(); ! if (!GC_initialized) GC_init(); if (NULL == attr) { stack = 0; (void) pthread_attr_init(&new_attr); --- 599,605 ---- si -> start_routine = start_routine; si -> arg = arg; LOCK(); ! if (!GC_is_initialized) GC_init(); if (NULL == attr) { stack = 0; (void) pthread_attr_init(&new_attr); *************** VOLATILE GC_bool GC_collecting = 0; *** 655,661 **** #define SLEEP_THRESHOLD 3 unsigned long GC_allocate_lock = 0; ! # define GC_TRY_LOCK() !GC_test_and_set(&GC_allocate_lock,1) # define GC_LOCK_TAKEN GC_allocate_lock void GC_lock() --- 655,661 ---- #define SLEEP_THRESHOLD 3 unsigned long GC_allocate_lock = 0; ! # define GC_TRY_LOCK() !GC_test_and_set(&GC_allocate_lock) # define GC_LOCK_TAKEN GC_allocate_lock void GC_lock() diff -Nrc3pad gcc-3.2.3/boehm-gc/linux_threads.c gcc-3.3/boehm-gc/linux_threads.c *** gcc-3.2.3/boehm-gc/linux_threads.c 2002-03-29 22:33:34.000000000 +0000 --- gcc-3.3/boehm-gc/linux_threads.c 2002-03-29 22:52:12.000000000 +0000 *************** void * GC_start_routine(void * arg) *** 1361,1366 **** --- 1361,1369 ---- GC_printf1("start_routine = 0x%lx\n", start); # endif start_arg = si -> arg; + # ifdef DEBUG_THREADS + GC_printf1("sem_post from 0x%lx\n", my_pthread); + # endif sem_post(&(si -> registered)); /* Last action on si. */ /* OK to deallocate. */ pthread_cleanup_push(GC_thread_exit_proc, 0); *************** WRAP_FUNC(pthread_create)(pthread_t *new *** 1429,1434 **** --- 1432,1441 ---- while (0 != sem_wait(&(si -> registered))) { if (EINTR != errno) ABORT("sem_wait failed"); } + # ifdef DEBUG_THREADS + GC_printf1("sem_wait complete from thread 0x%X\n", + pthread_self()); + # endif sem_destroy(&(si -> registered)); LOCK(); GC_INTERNAL_FREE(si); diff -Nrc3pad gcc-3.2.3/boehm-gc/ltconfig gcc-3.3/boehm-gc/ltconfig *** gcc-3.2.3/boehm-gc/ltconfig 2001-08-17 18:39:16.000000000 +0000 --- gcc-3.3/boehm-gc/ltconfig 2002-11-20 15:59:06.000000000 +0000 *************** os2*) *** 2017,2024 **** osf3* | osf4* | osf5*) version_type=osf need_version=no ! soname_spec='${libname}${release}.so' ! library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' shlibpath_var=LD_LIBRARY_PATH # this will be overridden with pass_all, but let us keep it just in case deplibs_check_method='file_magic COFF format alpha shared library' --- 2017,2024 ---- osf3* | osf4* | osf5*) version_type=osf need_version=no ! soname_spec='${libname}${release}.so$major' ! library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' shlibpath_var=LD_LIBRARY_PATH # this will be overridden with pass_all, but let us keep it just in case deplibs_check_method='file_magic COFF format alpha shared library' diff -Nrc3pad gcc-3.2.3/boehm-gc/ltmain.sh gcc-3.3/boehm-gc/ltmain.sh *** gcc-3.2.3/boehm-gc/ltmain.sh 2001-08-17 18:39:16.000000000 +0000 --- gcc-3.3/boehm-gc/ltmain.sh 2002-11-20 15:59:07.000000000 +0000 *************** compiler." *** 1715,1721 **** ;; osf) ! major=`expr $current - $age` versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" --- 1715,1721 ---- ;; osf) ! major=.`expr $current - $age` versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" diff -Nrc3pad gcc-3.2.3/boehm-gc/mach_dep.c gcc-3.3/boehm-gc/mach_dep.c *** gcc-3.2.3/boehm-gc/mach_dep.c 2002-02-12 04:37:53.000000000 +0000 --- gcc-3.3/boehm-gc/mach_dep.c 2002-07-18 20:06:00.000000000 +0000 *************** void GC_push_regs() *** 81,103 **** register long TMP_SP; /* must be bound to r11 */ # endif - # if defined(MIPS) && defined(LINUX) - /* I'm not sure whether this has actually been tested. */ - # define call_push(x) asm("move $4," x ";"); asm("jal GC_push_one") - call_push("$2"); - call_push("$3"); - call_push("$16"); - call_push("$17"); - call_push("$18"); - call_push("$19"); - call_push("$20"); - call_push("$21"); - call_push("$22"); - call_push("$23"); - call_push("$30"); - # undef call_push - # endif /* MIPS && LINUX */ - # ifdef VAX /* VAX - generic code below does not work under 4.2 */ /* r1 through r5 are caller save, and therefore */ --- 81,86 ---- diff -Nrc3pad gcc-3.2.3/boehm-gc/mark_rts.c gcc-3.3/boehm-gc/mark_rts.c *** gcc-3.2.3/boehm-gc/mark_rts.c 2002-02-12 04:37:53.000000000 +0000 --- gcc-3.3/boehm-gc/mark_rts.c 2003-03-04 06:38:29.000000000 +0000 *************** void GC_push_gc_structures GC_PROTO((voi *** 506,511 **** --- 506,522 ---- void GC_mark_thread_local_free_lists(); #endif + void GC_cond_register_dynamic_libraries() + { + # if (defined(DYNAMIC_LOADING) || defined(MSWIN32) || defined(MSWINCE) \ + || defined(PCR)) && !defined(SRC_M3) + GC_remove_tmp_roots(); + if (!GC_no_dls) GC_register_dynamic_libraries(); + # else + GC_no_dls = TRUE; + # endif + } + /* * Call the mark routines (GC_tl_push for a single pointer, GC_push_conditional * on groups of pointers) on every top level accessible pointer. *************** void GC_push_roots(all, cold_gc_frame) *** 519,537 **** GC_bool all; ptr_t cold_gc_frame; { ! register int i; /* * Next push static data. This must happen early on, since it's * not robust against mark stack overflow. */ ! /* Reregister dynamic libraries, in case one got added. */ ! # if (defined(DYNAMIC_LOADING) || defined(MSWIN32) || defined(MSWINCE) \ ! || defined(PCR)) && !defined(SRC_M3) ! GC_remove_tmp_roots(); ! if (!GC_no_dls) GC_register_dynamic_libraries(); ! # else ! GC_no_dls = TRUE; # endif /* Mark everything in static data areas */ --- 530,549 ---- GC_bool all; ptr_t cold_gc_frame; { ! int i; ! int kind; /* * Next push static data. This must happen early on, since it's * not robust against mark stack overflow. */ ! /* Reregister dynamic libraries, in case one got added. */ ! /* There is some argument for doing this as late as possible, */ ! /* especially on win32, where it can change asynchronously. */ ! /* In those cases, we do it here. But on other platforms, it's */ ! /* not safe with the world stopped, so we do it earlier. */ ! # if !defined(REGISTER_LIBRARIES_EARLY) ! GC_cond_register_dynamic_libraries(); # endif /* Mark everything in static data areas */ *************** ptr_t cold_gc_frame; *** 541,546 **** --- 553,570 ---- GC_static_roots[i].r_end, all); } + /* Mark all free list header blocks, if those were allocated from */ + /* the garbage collected heap. This makes sure they don't */ + /* disappear if we are not marking from static data. It also */ + /* saves us the trouble of scanning them, and possibly that of */ + /* marking the freelists. */ + for (kind = 0; kind < GC_n_kinds; kind++) { + GC_PTR base = GC_base(GC_obj_kinds[kind].ok_freelist); + if (0 != base) { + GC_set_mark_bit(base); + } + } + /* Mark from GC internal roots if those might otherwise have */ /* been excluded. */ if (GC_no_dls || roots_were_cleared) { diff -Nrc3pad gcc-3.2.3/boehm-gc/misc.c gcc-3.3/boehm-gc/misc.c *** gcc-3.2.3/boehm-gc/misc.c 2002-04-09 00:03:24.000000000 +0000 --- gcc-3.3/boehm-gc/misc.c 2003-03-04 06:38:30.000000000 +0000 *************** *** 75,80 **** --- 75,88 ---- #undef STACKBASE #endif + /* Dont unnecessarily call GC_register_main_static_data() in case */ + /* dyn_load.c isn't linked in. */ + #ifdef DYNAMIC_LOADING + # define GC_REGISTER_MAIN_STATIC_DATA() GC_register_main_static_data() + #else + # define GC_REGISTER_MAIN_STATIC_DATA() TRUE + #endif + GC_FAR struct _GC_arrays GC_arrays /* = { 0 } */; *************** void GC_init_inner() *** 619,625 **** /* Add initial guess of root sets. Do this first, since sbrk(0) */ /* might be used. */ ! GC_register_data_segments(); GC_init_headers(); GC_bl_init(); GC_mark_init(); --- 627,633 ---- /* Add initial guess of root sets. Do this first, since sbrk(0) */ /* might be used. */ ! if (GC_REGISTER_MAIN_STATIC_DATA()) GC_register_data_segments(); GC_init_headers(); GC_bl_init(); GC_mark_init(); diff -Nrc3pad gcc-3.2.3/boehm-gc/os_dep.c gcc-3.3/boehm-gc/os_dep.c *** gcc-3.2.3/boehm-gc/os_dep.c 2002-04-10 01:18:07.000000000 +0000 --- gcc-3.3/boehm-gc/os_dep.c 2002-07-19 08:54:43.000000000 +0000 *************** SIG_PF GC_old_segv_handler; /* Also old *** 2174,2180 **** char * addr = (char *) (scp -> si_addr); # endif # ifdef LINUX ! # ifdef I386 char * addr = (char *) (sc.cr2); # else # if defined(M68K) --- 2174,2180 ---- char * addr = (char *) (scp -> si_addr); # endif # ifdef LINUX ! # if defined(I386) || defined (X86_64) char * addr = (char *) (sc.cr2); # else # if defined(M68K) diff -Nrc3pad gcc-3.2.3/boehm-gc/win32_threads.c gcc-3.3/boehm-gc/win32_threads.c *** gcc-3.2.3/boehm-gc/win32_threads.c 2002-09-24 00:59:04.000000000 +0000 --- gcc-3.3/boehm-gc/win32_threads.c 2003-04-28 20:55:07.000000000 +0000 *************** DWORD WINAPI main_thread_start(LPVOID ar *** 527,532 **** --- 527,534 ---- LONG WINAPI GC_write_fault_handler(struct _EXCEPTION_POINTERS *exc_info); + #ifdef GC_DLL + /* * This isn't generally safe, since DllMain is not premptible. * If another thread holds the lock while this runs we're in trouble. *************** BOOL WINAPI DllMain(HINSTANCE inst, ULON *** 635,640 **** --- 637,644 ---- return TRUE; } + # endif /* GC_DLL */ + # endif /* !MSWINCE */ #endif /* GC_WIN32_THREADS */ diff -Nrc3pad gcc-3.2.3/fastjar/acinclude.m4 gcc-3.3/fastjar/acinclude.m4 *** gcc-3.2.3/fastjar/acinclude.m4 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/fastjar/acinclude.m4 2002-09-09 21:19:16.000000000 +0000 *************** *** 0 **** --- 1,133 ---- + + dnl Host type sizes probe. + dnl By Kaveh R. Ghazi. One typo fixed since. + dnl + AC_DEFUN([gcc_AC_COMPILE_CHECK_SIZEOF], + [changequote(<<, >>)dnl + dnl The name to #define. + define(<>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl + dnl The cache variable name. + define(<>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl + changequote([, ])dnl + AC_MSG_CHECKING(size of $1) + AC_CACHE_VAL(AC_CV_NAME, + [for ac_size in 4 8 1 2 16 $3 ; do # List sizes in rough order of prevalence. + AC_TRY_COMPILE([#include "confdefs.h" + #include + $2 + ], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size) + if test x$AC_CV_NAME != x ; then break; fi + done + ]) + if test x$AC_CV_NAME = x ; then + AC_MSG_ERROR([cannot determine a size for $1]) + fi + AC_MSG_RESULT($AC_CV_NAME) + AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1]) + undefine([AC_TYPE_NAME])dnl + undefine([AC_CV_NAME])dnl + ]) + + dnl Utility macro used by next two tests. + dnl AC_EXAMINE_OBJECT(C source code, + dnl commands examining object file, + dnl [commands to run if compile failed]): + dnl + dnl Compile the source code to an object file; then convert it into a + dnl printable representation. All unprintable characters and + dnl asterisks (*) are replaced by dots (.). All white space is + dnl deleted. Newlines (ASCII 0x10) in the input are preserved in the + dnl output, but runs of newlines are compressed to a single newline. + dnl Finally, line breaks are forcibly inserted so that no line is + dnl longer than 80 columns and the file ends with a newline. The + dnl result of all this processing is in the file conftest.dmp, which + dnl may be examined by the commands in the second argument. + dnl + AC_DEFUN([gcc_AC_EXAMINE_OBJECT], + [AC_LANG_SAVE + AC_LANG_C + dnl Next bit cribbed from AC_TRY_COMPILE. + cat > conftest.$ac_ext < conftest.dmp + $2 + ifelse($3, , , else + $3 + )dnl + fi + rm -rf conftest* + AC_LANG_RESTORE]) + + dnl Host endianness probe. + dnl Differs from AC_C_BIGENDIAN in that it does not require + dnl running a program on the host. + dnl + AC_DEFUN([fastjar_AC_COMPILE_C_BIGENDIAN], + [AC_CACHE_CHECK(byte ordering, ac_cv_c_compile_endian, + [ac_cv_c_compile_endian=unknown + gcc_AC_EXAMINE_OBJECT([ + #ifdef HAVE_LIMITS_H + # include + #endif + /* This structure must have no internal padding. */ + struct { + char prefix[sizeof "\nendian:" - 1]; + short word; + char postfix[2]; + } tester = { + "\nendian:", + #if SIZEOF_SHORT == 4 + ('A' << (CHAR_BIT * 3)) | ('B' << (CHAR_BIT * 2)) | + #endif + ('A' << CHAR_BIT) | 'B', + 'X', '\n' + };], + [if grep 'endian:AB' conftest.dmp >/dev/null 2>&1; then + ac_cv_c_compile_endian=big-endian + elif grep 'endian:BA' conftest.dmp >/dev/null 2>&1; then + ac_cv_c_compile_endian=little-endian + fi]) + ]) + if test $ac_cv_c_compile_endian = unknown; then + AC_MSG_ERROR([*** unable to determine endianness]) + elif test $ac_cv_c_compile_endian = big-endian; then + AC_DEFINE(WORDS_BIG_ENDIAN, 1, + [Define if the host machine stores words of multi-word integers in + big-endian order.]) + fi + ]) + + dnl Define MKDIR_TAKES_ONE_ARG if mkdir accepts only one argument instead + dnl of the usual 2. + AC_DEFUN(gcc_AC_FUNC_MKDIR_TAKES_ONE_ARG, + [AC_CACHE_CHECK([if mkdir takes one argument], gcc_cv_mkdir_takes_one_arg, + [AC_TRY_COMPILE([ + #include + #ifdef HAVE_SYS_STAT_H + # include + #endif + #ifdef HAVE_UNISTD_H + # include + #endif + #ifdef HAVE_DIRECT_H + # include + #endif], [mkdir ("foo", 0);], + gcc_cv_mkdir_takes_one_arg=no, gcc_cv_mkdir_takes_one_arg=yes)]) + if test $gcc_cv_mkdir_takes_one_arg = yes ; then + AC_DEFINE(MKDIR_TAKES_ONE_ARG, 1, [Define if host mkdir takes a + single argument.]) + fi + ]) diff -Nrc3pad gcc-3.2.3/fastjar/aclocal.m4 gcc-3.3/fastjar/aclocal.m4 *** gcc-3.2.3/fastjar/aclocal.m4 2002-01-09 23:22:20.000000000 +0000 --- gcc-3.3/fastjar/aclocal.m4 2003-05-14 00:18:14.000000000 +0000 *************** dnl but WITHOUT ANY WARRANTY, to the ext *** 10,15 **** --- 10,149 ---- dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A dnl PARTICULAR PURPOSE. + + dnl Host type sizes probe. + dnl By Kaveh R. Ghazi. One typo fixed since. + dnl + AC_DEFUN([gcc_AC_COMPILE_CHECK_SIZEOF], + [changequote(<<, >>)dnl + dnl The name to #define. + define(<>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl + dnl The cache variable name. + define(<>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl + changequote([, ])dnl + AC_MSG_CHECKING(size of $1) + AC_CACHE_VAL(AC_CV_NAME, + [for ac_size in 4 8 1 2 16 $3 ; do # List sizes in rough order of prevalence. + AC_TRY_COMPILE([#include "confdefs.h" + #include + $2 + ], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size) + if test x$AC_CV_NAME != x ; then break; fi + done + ]) + if test x$AC_CV_NAME = x ; then + AC_MSG_ERROR([cannot determine a size for $1]) + fi + AC_MSG_RESULT($AC_CV_NAME) + AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1]) + undefine([AC_TYPE_NAME])dnl + undefine([AC_CV_NAME])dnl + ]) + + dnl Utility macro used by next two tests. + dnl AC_EXAMINE_OBJECT(C source code, + dnl commands examining object file, + dnl [commands to run if compile failed]): + dnl + dnl Compile the source code to an object file; then convert it into a + dnl printable representation. All unprintable characters and + dnl asterisks (*) are replaced by dots (.). All white space is + dnl deleted. Newlines (ASCII 0x10) in the input are preserved in the + dnl output, but runs of newlines are compressed to a single newline. + dnl Finally, line breaks are forcibly inserted so that no line is + dnl longer than 80 columns and the file ends with a newline. The + dnl result of all this processing is in the file conftest.dmp, which + dnl may be examined by the commands in the second argument. + dnl + AC_DEFUN([gcc_AC_EXAMINE_OBJECT], + [AC_LANG_SAVE + AC_LANG_C + dnl Next bit cribbed from AC_TRY_COMPILE. + cat > conftest.$ac_ext < conftest.dmp + $2 + ifelse($3, , , else + $3 + )dnl + fi + rm -rf conftest* + AC_LANG_RESTORE]) + + dnl Host endianness probe. + dnl Differs from AC_C_BIGENDIAN in that it does not require + dnl running a program on the host. + dnl + AC_DEFUN([fastjar_AC_COMPILE_C_BIGENDIAN], + [AC_CACHE_CHECK(byte ordering, ac_cv_c_compile_endian, + [ac_cv_c_compile_endian=unknown + gcc_AC_EXAMINE_OBJECT([ + #ifdef HAVE_LIMITS_H + # include + #endif + /* This structure must have no internal padding. */ + struct { + char prefix[sizeof "\nendian:" - 1]; + short word; + char postfix[2]; + } tester = { + "\nendian:", + #if SIZEOF_SHORT == 4 + ('A' << (CHAR_BIT * 3)) | ('B' << (CHAR_BIT * 2)) | + #endif + ('A' << CHAR_BIT) | 'B', + 'X', '\n' + };], + [if grep 'endian:AB' conftest.dmp >/dev/null 2>&1; then + ac_cv_c_compile_endian=big-endian + elif grep 'endian:BA' conftest.dmp >/dev/null 2>&1; then + ac_cv_c_compile_endian=little-endian + fi]) + ]) + if test $ac_cv_c_compile_endian = unknown; then + AC_MSG_ERROR([*** unable to determine endianness]) + elif test $ac_cv_c_compile_endian = big-endian; then + AC_DEFINE(WORDS_BIG_ENDIAN, 1, + [Define if the host machine stores words of multi-word integers in + big-endian order.]) + fi + ]) + + dnl Define MKDIR_TAKES_ONE_ARG if mkdir accepts only one argument instead + dnl of the usual 2. + AC_DEFUN(gcc_AC_FUNC_MKDIR_TAKES_ONE_ARG, + [AC_CACHE_CHECK([if mkdir takes one argument], gcc_cv_mkdir_takes_one_arg, + [AC_TRY_COMPILE([ + #include + #ifdef HAVE_SYS_STAT_H + # include + #endif + #ifdef HAVE_UNISTD_H + # include + #endif + #ifdef HAVE_DIRECT_H + # include + #endif], [mkdir ("foo", 0);], + gcc_cv_mkdir_takes_one_arg=no, gcc_cv_mkdir_takes_one_arg=yes)]) + if test $gcc_cv_mkdir_takes_one_arg = yes ; then + AC_DEFINE(MKDIR_TAKES_ONE_ARG, 1, [Define if host mkdir takes a + single argument.]) + fi + ]) + # Do all the work for Automake. This macro actually does too much -- # some checks are only needed if your package does certain things. # But this isn't really a big deal. diff -Nrc3pad gcc-3.2.3/fastjar/ChangeLog gcc-3.3/fastjar/ChangeLog *** gcc-3.2.3/fastjar/ChangeLog 2003-04-22 06:14:21.000000000 +0000 --- gcc-3.3/fastjar/ChangeLog 2003-05-14 00:09:11.000000000 +0000 *************** *** 1,22 **** ! 2003-04-22 Release Manager ! * GCC 3.2.3 Released. ! 2003-02-05 Release Manager ! * GCC 3.2.2 Released. ! 2002-11-19 Release Manager ! * GCC 3.2.1 Released. ! 2002-11-19 Release Manager ! * GCC 3.2.1 Released. ! 2002-11-18 Release Manager ! * GCC 3.2.1 Released. 2002-11-11 Tom Tromey --- 1,65 ---- ! 2003-05-13 Release Manager ! * GCC 3.3 Released. ! 2003-05-13 Release Manager ! * GCC 3.3 Released. ! 2003-05-13 Release Manager ! * GCC 3.3 Released. ! 2003-05-13 Release Manager ! * GCC 3.3 Released. ! 2003-03-30 Joseph S. Myers ! * fastjar.texi: Remove @ at start of file. ! ! 2003-03-10 Mohan Embar ! ! * dostime.c: add #include for definition of NULL ! ! 2003-02-04 Joseph S. Myers ! ! * fastjar.texi: Update to GFDL 1.2. ! ! 2003-01-31 Daiki Ueno ! ! * jartool.c (extract_jar): Don't lseek to skip extra fields. ! (consume): If the stream is seekable, do lseek. ! ! 2003-01-28 Ranjit Mathew ! ! * jargrep.c: Include xregex.h from libiberty instead of ! system regex.h for better portability. ! ! 2003-01-21 Ranjit Mathew ! ! * jartool.c (list_jar): Terminate the 'ascii_date' buffer ! with a '\0' to guard against the case where the formatted ! time string is more than the size allowed by the buffer. ! ! 2002-12-30 DJ Delorie ! ! * Makefile.am (jar.1, grepjar.1): Protect against ! texi2pod/pod2man failing. ! * Makefile.in: Regenerated. ! ! 2002-12-23 Joseph S. Myers ! ! * fastjar.texi: Include Cover Texts in man page. ! ! 2002-12-04 Jakub Jelinek ! ! * fastjar.texi (jar @direntry, grepjar @direntry): Add (fastjar). ! ! 2002-11-21 Ranjit Mathew ! ! * jartool.c (extract_jar): Use "open" with O_BINARY instead of ! "creat" to create extracted files. 2002-11-11 Tom Tromey *************** *** 25,50 **** (unix2dostime): Handle years before 1980. Correctly compute month and day of month. 2002-11-07 Tom Tromey * dostime.c: Rewrote from scratch. * dostime.h (dostime): Removed. ! 2002-08-14 Release Manager ! * GCC 3.2 Released. ! 2002-07-25 Release Manager ! * GCC 3.1.1 Released. ! 2002-05-14 Release Manager ! * GCC 3.1 Released. ! 2002-05-14 Release Manager ! * GCC 3.1 Released. 2002-03-18 Bryce McKinlay --- 68,145 ---- (unix2dostime): Handle years before 1980. Correctly compute month and day of month. + 2002-11-10 Jakub Jelinek + + * jartool.c (add_to_jar): Only compare file to jarfile if jarfile is + non-NULL. + + * configure.in (AC_CHECK_HEADERS): Add limits.h. + * configure, config.h.in: Rebuilt. + 2002-11-07 Tom Tromey * dostime.c: Rewrote from scratch. * dostime.h (dostime): Removed. ! 2002-10-20 Tom Tromey ! * jartool.c: Use mode 0666 when opening new file. ! 2002-10-15 Ranjit Mathew ! * configure, config.h.in: Rebuilt. ! * configure.in: Call gcc_AC_FUNC_MKDIR_TAKES_ONE_ARG. ! 2002-09-11 Tom Tromey ! * Makefile.in: Rebuilt. ! * Makefile.am (TEXINFO_TEX): New macro. ! (info_TEXINFOS): Likewise. ! (fastjar_TEXINFOS): Likewise. ! (man_MANS): Likewise. ! (EXTRA_DIST): Likewise. ! (my_makei_flags): Likewise. ! (fastjar.info): New rule. ! (fastjar_TEXINFOS): Don't mention `$(srcdir)'. ! (TEXINFO_TEX): Likewise. ! (AUTOMAKE_OPTIONS): Added `cygnus'. ! 2002-09-11 Matthias Klose ! * Makefile.am: Revert the previous patch. ! * Makefile.in: Regenerated. ! ! 2002-09-10 Matthias Klose ! ! * fastjar.texi: New. ! * Makefile.am: Support building info docs and manpages. ! * Makefile.in: Regenerated. ! * configure.in: Set gcc_version. ! * configure: Regenerated. ! * jargrep.c: Update usage and help strings. ! ! 2002-09-09 Tom Tromey ! ! * jartool.c (mkdir): Define. ! * config.h.in: Rebuilt. ! * aclocal.m4, configure: Rebuilt. ! * acinclude.m4: New file. Copied gcc_AC_COMPILE_CHECK_SIZEOF, ! gcc_AC_EXAMINE_OBJECT, and fastjar_AC_COMPILE_C_BIGENDIAN from ! aclocal.m4. ! ! 2002-09-04 Tom Tromey ! ! From greenrd@hotmail.com: ! * jartool.c (list_jar): Correctly determine when new `filename' ! buffer must be allocated. Fixes PR java/7830. ! ! 2002-06-03 Geoffrey Keating ! ! * configure.in: Support cross-compiling. ! * configure: Regenerate. ! * aclocal.m4 (gcc_AC_COMPILE_CHECK_SIZEOF): New. ! (gcc_AC_EXAMINE_OBJECT): New. ! (fastjar_AC_COMPILE_C_BIGENDIAN): New. 2002-03-18 Bryce McKinlay diff -Nrc3pad gcc-3.2.3/fastjar/config.h.in gcc-3.3/fastjar/config.h.in *** gcc-3.2.3/fastjar/config.h.in 2002-01-09 23:22:20.000000000 +0000 --- gcc-3.3/fastjar/config.h.in 2002-11-10 21:04:24.000000000 +0000 *************** *** 9,33 **** /* Define if your declares struct tm. */ #undef TM_IN_SYS_TIME - /* Define if your processor stores words with the most significant - byte first (like Motorola and SPARC, unlike Intel and VAX). */ - #undef WORDS_BIGENDIAN - - /* The number of bytes in a char. */ - #undef SIZEOF_CHAR - - /* The number of bytes in a int. */ - #undef SIZEOF_INT - - /* The number of bytes in a long. */ - #undef SIZEOF_LONG - - /* The number of bytes in a long long. */ - #undef SIZEOF_LONG_LONG - - /* The number of bytes in a short. */ - #undef SIZEOF_SHORT - /* Define if you have the header file. */ #undef HAVE_DIRENT_H --- 9,14 ---- *************** *** 40,45 **** --- 21,29 ---- /* Define if you have the header file. */ #undef HAVE_STDLIB_H + /* Define if you have the header file. */ + #undef HAVE_LIMITS_H + /* Define if you have the header file. */ #undef HAVE_SYS_DIR_H *************** *** 58,60 **** --- 42,67 ---- /* Version number of package */ #undef VERSION + /* Define if host mkdir takes a + single argument. */ + #undef MKDIR_TAKES_ONE_ARG + + /* The number of bytes in type char */ + #undef SIZEOF_CHAR + + /* The number of bytes in type short */ + #undef SIZEOF_SHORT + + /* The number of bytes in type int */ + #undef SIZEOF_INT + + /* The number of bytes in type long */ + #undef SIZEOF_LONG + + /* The number of bytes in type long long */ + #undef SIZEOF_LONG_LONG + + /* Define if the host machine stores words of multi-word integers in + big-endian order. */ + #undef WORDS_BIG_ENDIAN + diff -Nrc3pad gcc-3.2.3/fastjar/configure gcc-3.3/fastjar/configure *** gcc-3.2.3/fastjar/configure 2002-01-09 23:22:20.000000000 +0000 --- gcc-3.3/fastjar/configure 2003-05-14 00:18:14.000000000 +0000 *************** EOF *** 1691,1697 **** fi ! for ac_hdr in fcntl.h unistd.h sys/param.h stdlib.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --- 1691,1697 ---- fi ! for ac_hdr in fcntl.h unistd.h sys/param.h stdlib.h limits.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 *************** EOF *** 1800,1837 **** fi echo $ac_n "checking size of char""... $ac_c" 1>&6 ! echo "configure:1805: checking size of char" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ! if test "$cross_compiling" = yes; then ! { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } ! else cat > conftest.$ac_ext < ! main() ! { ! FILE *f=fopen("conftestval", "w"); ! if (!f) exit(1); ! fprintf(f, "%d\n", sizeof(char)); ! exit(0); ! } EOF ! if { (eval echo configure:1824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ! then ! ac_cv_sizeof_char=`cat conftestval` else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_char=0 fi ! rm -fr conftest* fi fi echo "$ac_t""$ac_cv_sizeof_char" 1>&6 cat >> confdefs.h <&6 + echo "configure:1806: checking if mkdir takes one argument" >&5 + if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #ifdef HAVE_SYS_STAT_H + # include + #endif + #ifdef HAVE_UNISTD_H + # include + #endif + #ifdef HAVE_DIRECT_H + # include + #endif + int main() { + mkdir ("foo", 0); + ; return 0; } + EOF + if { (eval echo configure:1828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + gcc_cv_mkdir_takes_one_arg=no + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + gcc_cv_mkdir_takes_one_arg=yes + fi + rm -f conftest* + fi + + echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6 + if test $gcc_cv_mkdir_takes_one_arg = yes ; then + cat >> confdefs.h <<\EOF + #define MKDIR_TAKES_ONE_ARG 1 + EOF + + fi + + echo $ac_n "checking size of char""... $ac_c" 1>&6 ! echo "configure:1850: checking size of char" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ! for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < ! ! ! int main() { ! switch (0) case 0: case (sizeof (char) == $ac_size):; ! ; return 0; } EOF ! if { (eval echo configure:1866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! rm -rf conftest* ! ac_cv_sizeof_char=$ac_size else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 fi ! rm -f conftest* ! if test x$ac_cv_sizeof_char != x ; then break; fi ! done ! fi + if test x$ac_cv_sizeof_char = x ; then + { echo "configure: error: cannot determine a size for char" 1>&2; exit 1; } fi echo "$ac_t""$ac_cv_sizeof_char" 1>&6 cat >> confdefs.h <&6 ! echo "configure:1844: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ! if test "$cross_compiling" = yes; then ! { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } ! else cat > conftest.$ac_ext < ! main() ! { ! FILE *f=fopen("conftestval", "w"); ! if (!f) exit(1); ! fprintf(f, "%d\n", sizeof(short)); ! exit(0); ! } EOF ! if { (eval echo configure:1863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ! then ! ac_cv_sizeof_short=`cat conftestval` else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_short=0 fi ! rm -fr conftest* fi fi echo "$ac_t""$ac_cv_sizeof_short" 1>&6 cat >> confdefs.h <&6 ! echo "configure:1889: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ! for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < ! ! ! int main() { ! switch (0) case 0: case (sizeof (short) == $ac_size):; ! ; return 0; } EOF ! if { (eval echo configure:1905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! rm -rf conftest* ! ac_cv_sizeof_short=$ac_size else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 fi ! rm -f conftest* ! if test x$ac_cv_sizeof_short != x ; then break; fi ! done ! fi + if test x$ac_cv_sizeof_short = x ; then + { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } fi echo "$ac_t""$ac_cv_sizeof_short" 1>&6 cat >> confdefs.h <&6 ! echo "configure:1883: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ! if test "$cross_compiling" = yes; then ! { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } ! else cat > conftest.$ac_ext < ! main() ! { ! FILE *f=fopen("conftestval", "w"); ! if (!f) exit(1); ! fprintf(f, "%d\n", sizeof(int)); ! exit(0); ! } EOF ! if { (eval echo configure:1902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ! then ! ac_cv_sizeof_int=`cat conftestval` else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_int=0 fi ! rm -fr conftest* fi fi echo "$ac_t""$ac_cv_sizeof_int" 1>&6 cat >> confdefs.h <&6 ! echo "configure:1928: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ! for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < ! ! ! int main() { ! switch (0) case 0: case (sizeof (int) == $ac_size):; ! ; return 0; } EOF ! if { (eval echo configure:1944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! rm -rf conftest* ! ac_cv_sizeof_int=$ac_size else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 fi ! rm -f conftest* ! if test x$ac_cv_sizeof_int != x ; then break; fi ! done ! fi + if test x$ac_cv_sizeof_int = x ; then + { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } fi echo "$ac_t""$ac_cv_sizeof_int" 1>&6 cat >> confdefs.h <&6 ! echo "configure:1922: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ! if test "$cross_compiling" = yes; then ! { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } ! else cat > conftest.$ac_ext < ! main() ! { ! FILE *f=fopen("conftestval", "w"); ! if (!f) exit(1); ! fprintf(f, "%d\n", sizeof(long)); ! exit(0); ! } EOF ! if { (eval echo configure:1941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ! then ! ac_cv_sizeof_long=`cat conftestval` else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_long=0 fi ! rm -fr conftest* fi fi echo "$ac_t""$ac_cv_sizeof_long" 1>&6 cat >> confdefs.h <&6 ! echo "configure:1967: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ! for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < ! ! ! int main() { ! switch (0) case 0: case (sizeof (long) == $ac_size):; ! ; return 0; } EOF ! if { (eval echo configure:1983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! rm -rf conftest* ! ac_cv_sizeof_long=$ac_size else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 fi ! rm -f conftest* ! if test x$ac_cv_sizeof_long != x ; then break; fi ! done ! fi + if test x$ac_cv_sizeof_long = x ; then + { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } fi echo "$ac_t""$ac_cv_sizeof_long" 1>&6 cat >> confdefs.h <&6 ! echo "configure:1961: checking size of long long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ! if test "$cross_compiling" = yes; then ! { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } ! else cat > conftest.$ac_ext < ! main() ! { ! FILE *f=fopen("conftestval", "w"); ! if (!f) exit(1); ! fprintf(f, "%d\n", sizeof(long long)); ! exit(0); ! } EOF ! if { (eval echo configure:1980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ! then ! ac_cv_sizeof_long_long=`cat conftestval` else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_long_long=0 fi ! rm -fr conftest* fi fi echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 cat >> confdefs.h <&6 ! echo "configure:2006: checking size of long long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ! for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < ! ! ! int main() { ! switch (0) case 0: case (sizeof (long long) == $ac_size):; ! ; return 0; } EOF ! if { (eval echo configure:2022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! rm -rf conftest* ! ac_cv_sizeof_long_long=$ac_size else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 fi ! rm -f conftest* ! if test x$ac_cv_sizeof_long_long != x ; then break; fi ! done ! fi + if test x$ac_cv_sizeof_long_long = x ; then + { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; } fi echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 cat >> confdefs.h <&6 ! echo "configure:2001: checking whether byte ordering is bigendian" >&5 ! if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ! ac_cv_c_bigendian=unknown ! # See if sys/param.h defines the BYTE_ORDER macro. ! cat > conftest.$ac_ext < ! #include ! int main() { - #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN - bogus endian macros - #endif - ; return 0; } - EOF - if { (eval echo configure:2019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < - #include - int main() { ! #if BYTE_ORDER != BIG_ENDIAN ! not big endian #endif ! ; return 0; } ! EOF ! if { (eval echo configure:2034: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! rm -rf conftest* ! ac_cv_c_bigendian=yes ! else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! ac_cv_c_bigendian=no ! fi ! rm -f conftest* ! else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! fi ! rm -f conftest* ! if test $ac_cv_c_bigendian = unknown; then ! if test "$cross_compiling" = yes; then ! { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } ! else ! cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ! then ! ac_cv_c_bigendian=no ! else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -fr conftest* ! ac_cv_c_bigendian=yes ! fi ! rm -fr conftest* fi - fi fi ! echo "$ac_t""$ac_cv_c_bigendian" 1>&6 ! if test $ac_cv_c_bigendian = yes; then cat >> confdefs.h <<\EOF ! #define WORDS_BIGENDIAN 1 EOF fi --- 2041,2115 ---- ! echo $ac_n "checking byte ordering""... $ac_c" 1>&6 ! echo "configure:2046: checking byte ordering" >&5 ! if eval "test \"`echo '$''{'ac_cv_c_compile_endian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ! ac_cv_c_compile_endian=unknown ! ! ac_ext=c ! # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ! ac_cpp='$CPP $CPPFLAGS' ! ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ! cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext < #endif ! /* This structure must have no internal padding. */ ! struct { ! char prefix[sizeof "\nendian:" - 1]; ! short word; ! char postfix[2]; ! } tester = { ! "\nendian:", ! #if SIZEOF_SHORT == 4 ! ('A' << (CHAR_BIT * 3)) | ('B' << (CHAR_BIT * 2)) | ! #endif ! ('A' << CHAR_BIT) | 'B', ! 'X', '\n' ! }; EOF ! if { (eval echo configure:2080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! od -c conftest.o | ! sed 's/^[0-7]*[ ]*/ / ! s/\*/./g ! s/ \\n/*/g ! s/ [0-9][0-9][0-9]/./g ! s/ \\[^ ]/./g' | ! tr -d ' ! ' | tr -s '*' ' ! ' | fold | sed '$a\ ! ' > conftest.dmp ! if grep 'endian:AB' conftest.dmp >/dev/null 2>&1; then ! ac_cv_c_compile_endian=big-endian ! elif grep 'endian:BA' conftest.dmp >/dev/null 2>&1; then ! ac_cv_c_compile_endian=little-endian ! fi fi + rm -rf conftest* + ac_ext=c + # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. + ac_cpp='$CPP $CPPFLAGS' + ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' + ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' + cross_compiling=$ac_cv_prog_cc_cross + fi ! echo "$ac_t""$ac_cv_c_compile_endian" 1>&6 ! if test $ac_cv_c_compile_endian = unknown; then ! { echo "configure: error: *** unable to determine endianness" 1>&2; exit 1; } ! elif test $ac_cv_c_compile_endian = big-endian; then cat >> confdefs.h <<\EOF ! #define WORDS_BIG_ENDIAN 1 EOF fi *************** ZINCS= *** 2100,2106 **** use_zlib=maybe if test "$with_system_zlib" = yes; then echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6 ! echo "configure:2104: checking for deflate in -lz" >&5 ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2128,2134 ---- use_zlib=maybe if test "$with_system_zlib" = yes; then echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6 ! echo "configure:2132: checking for deflate in -lz" >&5 ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** else *** 2108,2114 **** ac_save_LIBS="$LIBS" LIBS="-lz $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else --- 2147,2153 ---- deflate() ; return 0; } EOF ! if { (eval echo configure:2151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else *************** fi *** 2154,2159 **** --- 2182,2197 ---- + # Get the version trigger filename from the toplevel + if test "${with_gcc_version_trigger+set}" = set; then + gcc_version_trigger=$with_gcc_version_trigger + else + gcc_version_trigger=${srcdir}/version.c + fi + gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'` + gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'` + + trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure *************** s%@CPP@%$CPP%g *** 2312,2317 **** --- 2350,2356 ---- s%@ZLIBS@%$ZLIBS%g s%@ZDEPS@%$ZDEPS%g s%@ZINCS@%$ZINCS%g + s%@gcc_version@%$gcc_version%g CEOF EOF *************** cat >> $CONFIG_STATUS <<\EOF *** 2320,2326 **** # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ! ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. ac_file=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_cmds # Line after last line for current file. --- 2359,2365 ---- # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ! ac_max_sed_cmds=60 # Maximum number of lines to put in a sed script. ac_file=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_cmds # Line after last line for current file. diff -Nrc3pad gcc-3.2.3/fastjar/configure.in gcc-3.3/fastjar/configure.in *** gcc-3.2.3/fastjar/configure.in 2002-01-09 23:22:20.000000000 +0000 --- gcc-3.3/fastjar/configure.in 2002-11-10 21:04:24.000000000 +0000 *************** dnl Checks for header files. *** 24,44 **** AC_HEADER_DIRENT AC_HEADER_STDC AC_STRUCT_TM ! AC_CHECK_HEADERS(fcntl.h unistd.h sys/param.h stdlib.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_TYPE_OFF_T AC_STRUCT_TM dnl Check for type-widths ! AC_CHECK_SIZEOF(char) ! AC_CHECK_SIZEOF(short) ! AC_CHECK_SIZEOF(int) ! AC_CHECK_SIZEOF(long) ! AC_CHECK_SIZEOF(long long) dnl Check byte order ! AC_C_BIGENDIAN AC_ARG_WITH(system-zlib, [ --with-system-zlib use installed libz]) --- 24,47 ---- AC_HEADER_DIRENT AC_HEADER_STDC AC_STRUCT_TM ! AC_CHECK_HEADERS(fcntl.h unistd.h sys/param.h stdlib.h limits.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_TYPE_OFF_T AC_STRUCT_TM + # mkdir takes a single argument on some systems. + gcc_AC_FUNC_MKDIR_TAKES_ONE_ARG + dnl Check for type-widths ! gcc_AC_COMPILE_CHECK_SIZEOF(char) ! gcc_AC_COMPILE_CHECK_SIZEOF(short) ! gcc_AC_COMPILE_CHECK_SIZEOF(int) ! gcc_AC_COMPILE_CHECK_SIZEOF(long) ! gcc_AC_COMPILE_CHECK_SIZEOF(long long) dnl Check byte order ! fastjar_AC_COMPILE_C_BIGENDIAN AC_ARG_WITH(system-zlib, [ --with-system-zlib use installed libz]) *************** AC_SUBST(ZLIBS) *** 63,66 **** --- 66,81 ---- AC_SUBST(ZDEPS) AC_SUBST(ZINCS) + # Get the version trigger filename from the toplevel + if test "${with_gcc_version_trigger+set}" = set; then + gcc_version_trigger=$with_gcc_version_trigger + else + gcc_version_trigger=${srcdir}/version.c + fi + changequote(,)dnl + gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'` + gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'` + changequote([,])dnl + AC_SUBST(gcc_version) + AC_OUTPUT(Makefile install-defs.sh) diff -Nrc3pad gcc-3.2.3/fastjar/.cvsignore gcc-3.3/fastjar/.cvsignore *** gcc-3.2.3/fastjar/.cvsignore 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/fastjar/.cvsignore 2002-09-12 00:40:12.000000000 +0000 *************** *** 0 **** --- 1,3 ---- + fastjar.info + grepjar.1 + jar.1 diff -Nrc3pad gcc-3.2.3/fastjar/dostime.c gcc-3.3/fastjar/dostime.c *** gcc-3.2.3/fastjar/dostime.c 2002-11-11 22:22:31.000000000 +0000 --- gcc-3.3/fastjar/dostime.c 2003-03-10 19:53:26.000000000 +0000 *************** *** 21,26 **** --- 21,28 ---- #include + #include + #include "dostime.h" /* diff -Nrc3pad gcc-3.2.3/fastjar/fastjar.info gcc-3.3/fastjar/fastjar.info *** gcc-3.2.3/fastjar/fastjar.info 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/fastjar/fastjar.info 2003-05-14 01:25:14.000000000 +0000 *************** *** 0 **** --- 1,956 ---- + This is fastjar.info, produced by makeinfo version 4.2 from + fastjar.texi. + + INFO-DIR-SECTION Programming + START-INFO-DIR-ENTRY + * fastjar: (fastjar). GNU jar utilities + END-INFO-DIR-ENTRY + + INFO-DIR-SECTION Individual utilities + START-INFO-DIR-ENTRY + * jar: (fastjar)Invoking jar. + An archive tool for Java archives + * grepjar: (fastjar)Invoking grepjar. + Search files in a jar file for a pattern + END-INFO-DIR-ENTRY + + Copyright (C) 2002 Free Software Foundation, Inc. + + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 or + any later version published by the Free Software Foundation; with the + Invariant Sections being "GNU General Public License", the Front-Cover + texts being (a) (see below), and with the Back-Cover Texts being (b) + (see below). A copy of the license is included in the section entitled + "GNU Free Documentation License". + + (a) The FSF's Front-Cover Text is: + + A GNU Manual + + (b) The FSF's Back-Cover Text is: + + You have freedom to copy and modify this GNU Manual, like GNU + software. Copies published by the Free Software Foundation raise + funds for GNU development. + +  + File: fastjar.info, Node: Top, Next: Invoking jar, Up: (dir) + + Introduction + ************ + + This manual describes how to use `jar' and `grepjar'. + + * Menu: + + * Invoking jar:: Options supported by `jar' + * Invoking grepjar:: Options supported by `grepjar' + * Copying:: The GNU General Public License + * GNU Free Documentation License:: + How you can share and copy this manual + +  + File: fastjar.info, Node: Invoking jar, Next: Invoking grepjar, Prev: Top, Up: Top + + Invoking jar + ************ + + `fastjar' is an implementation of Sun's jar utility that comes with + the JDK, written entirely in C, and runs in a fraction of the time while + being feature compatible. + + If any file is a directory then it is processed recursively. The + manifest file name and the archive file name needs to be specified in + the same order the `-m' and `-f' flags are specified. + + Exactly one of the following actions must be specified: + + `-c' + Create new archive. + + `-t' + List table of contents for archive. + + `-x' + Extract named (or all) files from archive. + + `-u' + Update existing archive. This option is disabled due to bugs + (currently fails with exit status 1 and does nothing). + + The following parameters are optional: + + `-@' + Read the names of the files to add to the archive from stdin. This + option is supported only in combination with `-c' or `-u'. Non + standard option added in the GCC version. + + `-C DIRECTORY' + Change to the DIRECTORY and include the following file. + + `-E' + Prevent fastjar from reading the content of a directory when + specifying one (and instead relying on the provided list of files + to populate the archive with regard to the directory entry). Non + standard option added in the GCC version. + + `-M' + Do not create a manifest file for the entries. + + `-0' + Store only; use no ZIP compression. + + `-V' + `--version' + Display version information. + + `-f ARCHIVE' + Specify archive file name. + + `-m MANIFEST' + Include manifest information from specified MANIFEST file. + + `-v' + Generate verbose output on standard output. + + All remaining options are considered to be names of files. + +  + File: fastjar.info, Node: Invoking grepjar, Next: Copying, Prev: Invoking jar, Up: Top + + Invoking grepjar + **************** + + The `grepjar' program can be used to search files in a jar file for + a pattern. + + `-b' + Print byte offset of match. + + `-c' + Print number of matches. + + `-i' + Compare case-insensitively. + + `-n' + Print line number of each match. + + `-s' + Suppress error messages. + + `-w' + Force PATTERN to match only whole words. + + `-e PATTERN' + Use PATTERN as regular expression. + + `--help' + Print help, then exit. + + `-V' + `--version' + Print version number, then exit. + +  + File: fastjar.info, Node: Copying, Next: GNU Free Documentation License, Prev: Invoking grepjar, Up: Top + + GNU GENERAL PUBLIC LICENSE + ************************** + + Version 2, June 1991 + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + ======== + + The licenses for most software are designed to take away your + freedom to share and change it. By contrast, the GNU General Public + License is intended to guarantee your freedom to share and change free + software--to make sure the software is free for all its users. This + General Public License applies to most of the Free Software + Foundation's software and to any other program whose authors commit to + using it. (Some other Free Software Foundation software is covered by + the GNU Library General Public License instead.) You can apply it to + your programs, too. + + When we speak of free software, we are referring to freedom, not + price. Our General Public Licenses are designed to make sure that you + have the freedom to distribute copies of free software (and charge for + this service if you wish), that you receive source code or can get it + if you want it, that you can change the software or use pieces of it in + new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid + anyone to deny you these rights or to ask you to surrender the rights. + These restrictions translate to certain responsibilities for you if you + distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether + gratis or for a fee, you must give the recipients all the rights that + you have. You must make sure that they, too, receive or can get the + source code. And you must show them these terms so they know their + rights. + + We protect your rights with two steps: (1) copyright the software, + and (2) offer you this license which gives you legal permission to copy, + distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain + that everyone understands that there is no warranty for this free + software. If the software is modified by someone else and passed on, we + want its recipients to know that what they have is not the original, so + that any problems introduced by others will not reflect on the original + authors' reputations. + + Finally, any free program is threatened constantly by software + patents. We wish to avoid the danger that redistributors of a free + program will individually obtain patent licenses, in effect making the + program proprietary. To prevent this, we have made it clear that any + patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and + modification follow. + + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + 0. This License applies to any program or other work which contains a + notice placed by the copyright holder saying it may be distributed + under the terms of this General Public License. The "Program", + below, refers to any such program or work, and a "work based on + the Program" means either the Program or any derivative work under + copyright law: that is to say, a work containing the Program or a + portion of it, either verbatim or with modifications and/or + translated into another language. (Hereinafter, translation is + included without limitation in the term "modification".) Each + licensee is addressed as "you". + + Activities other than copying, distribution and modification are + not covered by this License; they are outside its scope. The act + of running the Program is not restricted, and the output from the + Program is covered only if its contents constitute a work based on + the Program (independent of having been made by running the + Program). Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's + source code as you receive it, in any medium, provided that you + conspicuously and appropriately publish on each copy an appropriate + copyright notice and disclaimer of warranty; keep intact all the + notices that refer to this License and to the absence of any + warranty; and give any other recipients of the Program a copy of + this License along with the Program. + + You may charge a fee for the physical act of transferring a copy, + and you may at your option offer warranty protection in exchange + for a fee. + + 2. You may modify your copy or copies of the Program or any portion + of it, thus forming a work based on the Program, and copy and + distribute such modifications or work under the terms of Section 1 + above, provided that you also meet all of these conditions: + + a. You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b. You must cause any work that you distribute or publish, that + in whole or in part contains or is derived from the Program + or any part thereof, to be licensed as a whole at no charge + to all third parties under the terms of this License. + + c. If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display + an announcement including an appropriate copyright notice and + a notice that there is no warranty (or else, saying that you + provide a warranty) and that users may redistribute the + program under these conditions, and telling the user how to + view a copy of this License. (Exception: if the Program + itself is interactive but does not normally print such an + announcement, your work based on the Program is not required + to print an announcement.) + + These requirements apply to the modified work as a whole. If + identifiable sections of that work are not derived from the + Program, and can be reasonably considered independent and separate + works in themselves, then this License, and its terms, do not + apply to those sections when you distribute them as separate + works. But when you distribute the same sections as part of a + whole which is a work based on the Program, the distribution of + the whole must be on the terms of this License, whose permissions + for other licensees extend to the entire whole, and thus to each + and every part regardless of who wrote it. + + Thus, it is not the intent of this section to claim rights or + contest your rights to work written entirely by you; rather, the + intent is to exercise the right to control the distribution of + derivative or collective works based on the Program. + + In addition, mere aggregation of another work not based on the + Program with the Program (or with a work based on the Program) on + a volume of a storage or distribution medium does not bring the + other work under the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, + under Section 2) in object code or executable form under the terms + of Sections 1 and 2 above provided that you also do one of the + following: + + a. Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of + Sections 1 and 2 above on a medium customarily used for + software interchange; or, + + b. Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a + medium customarily used for software interchange; or, + + c. Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with + such an offer, in accord with Subsection b above.) + + The source code for a work means the preferred form of the work for + making modifications to it. For an executable work, complete + source code means all the source code for all modules it contains, + plus any associated interface definition files, plus the scripts + used to control compilation and installation of the executable. + However, as a special exception, the source code distributed need + not include anything that is normally distributed (in either + source or binary form) with the major components (compiler, + kernel, and so on) of the operating system on which the executable + runs, unless that component itself accompanies the executable. + + If distribution of executable or object code is made by offering + access to copy from a designated place, then offering equivalent + access to copy the source code from the same place counts as + distribution of the source code, even though third parties are not + compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program + except as expressly provided under this License. Any attempt + otherwise to copy, modify, sublicense or distribute the Program is + void, and will automatically terminate your rights under this + License. However, parties who have received copies, or rights, + from you under this License will not have their licenses + terminated so long as such parties remain in full compliance. + + 5. You are not required to accept this License, since you have not + signed it. However, nothing else grants you permission to modify + or distribute the Program or its derivative works. These actions + are prohibited by law if you do not accept this License. + Therefore, by modifying or distributing the Program (or any work + based on the Program), you indicate your acceptance of this + License to do so, and all its terms and conditions for copying, + distributing or modifying the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the + Program), the recipient automatically receives a license from the + original licensor to copy, distribute or modify the Program + subject to these terms and conditions. You may not impose any + further restrictions on the recipients' exercise of the rights + granted herein. You are not responsible for enforcing compliance + by third parties to this License. + + 7. If, as a consequence of a court judgment or allegation of patent + infringement or for any other reason (not limited to patent + issues), conditions are imposed on you (whether by court order, + agreement or otherwise) that contradict the conditions of this + License, they do not excuse you from the conditions of this + License. If you cannot distribute so as to satisfy simultaneously + your obligations under this License and any other pertinent + obligations, then as a consequence you may not distribute the + Program at all. For example, if a patent license would not permit + royalty-free redistribution of the Program by all those who + receive copies directly or indirectly through you, then the only + way you could satisfy both it and this License would be to refrain + entirely from distribution of the Program. + + If any portion of this section is held invalid or unenforceable + under any particular circumstance, the balance of the section is + intended to apply and the section as a whole is intended to apply + in other circumstances. + + It is not the purpose of this section to induce you to infringe any + patents or other property right claims or to contest validity of + any such claims; this section has the sole purpose of protecting + the integrity of the free software distribution system, which is + implemented by public license practices. Many people have made + generous contributions to the wide range of software distributed + through that system in reliance on consistent application of that + system; it is up to the author/donor to decide if he or she is + willing to distribute software through any other system and a + licensee cannot impose that choice. + + This section is intended to make thoroughly clear what is believed + to be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in + certain countries either by patents or by copyrighted interfaces, + the original copyright holder who places the Program under this + License may add an explicit geographical distribution limitation + excluding those countries, so that distribution is permitted only + in or among countries not thus excluded. In such case, this + License incorporates the limitation as if written in the body of + this License. + + 9. The Free Software Foundation may publish revised and/or new + versions of the General Public License from time to time. Such + new versions will be similar in spirit to the present version, but + may differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the + Program specifies a version number of this License which applies + to it and "any later version", you have the option of following + the terms and conditions either of that version or of any later + version published by the Free Software Foundation. If the Program + does not specify a version number of this License, you may choose + any version ever published by the Free Software Foundation. + + 10. If you wish to incorporate parts of the Program into other free + programs whose distribution conditions are different, write to the + author to ask for permission. For software which is copyrighted + by the Free Software Foundation, write to the Free Software + Foundation; we sometimes make exceptions for this. Our decision + will be guided by the two goals of preserving the free status of + all derivatives of our free software and of promoting the sharing + and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO + WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE + LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT + HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT + WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT + NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE + QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE + PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY + SERVICING, REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN + WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY + MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE + LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, + INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR + INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF + DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU + OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY + OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN + ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + ============================================= + + If you develop a new program, and you want it to be of the greatest + possible use to the public, the best way to achieve this is to make it + free software which everyone can redistribute and change under these + terms. + + To do so, attach the following notices to the program. It is safest + to attach them to the start of each source file to most effectively + convey the exclusion of warranty; and each file should have at least + the "copyright" line and a pointer to where the full notice is found. + + ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES. + Copyright (C) YEAR NAME OF AUTHOR + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + Also add information on how to contact you by electronic and paper + mail. + + If the program is interactive, make it output a short notice like + this when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) YEAR NAME OF AUTHOR + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details + type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + + The hypothetical commands `show w' and `show c' should show the + appropriate parts of the General Public License. Of course, the + commands you use may be called something other than `show w' and `show + c'; they could even be mouse-clicks or menu items--whatever suits your + program. + + You should also get your employer (if you work as a programmer) or + your school, if any, to sign a "copyright disclaimer" for the program, + if necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + SIGNATURE OF TY COON, 1 April 1989 + Ty Coon, President of Vice + + This General Public License does not permit incorporating your + program into proprietary programs. If your program is a subroutine + library, you may consider it more useful to permit linking proprietary + applications with the library. If this is what you want to do, use the + GNU Library General Public License instead of this License. + +  + File: fastjar.info, Node: GNU Free Documentation License, Prev: Copying, Up: Top + + GNU Free Documentation License + ****************************** + + Version 1.2, November 2002 + Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + 0. PREAMBLE + + The purpose of this License is to make a manual, textbook, or other + functional and useful document "free" in the sense of freedom: to + assure everyone the effective freedom to copy and redistribute it, + with or without modifying it, either commercially or + noncommercially. Secondarily, this License preserves for the + author and publisher a way to get credit for their work, while not + being considered responsible for modifications made by others. + + This License is a kind of "copyleft", which means that derivative + works of the document must themselves be free in the same sense. + It complements the GNU General Public License, which is a copyleft + license designed for free software. + + We have designed this License in order to use it for manuals for + free software, because free software needs free documentation: a + free program should come with manuals providing the same freedoms + that the software does. But this License is not limited to + software manuals; it can be used for any textual work, regardless + of subject matter or whether it is published as a printed book. + We recommend this License principally for works whose purpose is + instruction or reference. + + 1. APPLICABILITY AND DEFINITIONS + + This License applies to any manual or other work, in any medium, + that contains a notice placed by the copyright holder saying it + can be distributed under the terms of this License. Such a notice + grants a world-wide, royalty-free license, unlimited in duration, + to use that work under the conditions stated herein. The + "Document", below, refers to any such manual or work. Any member + of the public is a licensee, and is addressed as "you". You + accept the license if you copy, modify or distribute the work in a + way requiring permission under copyright law. + + A "Modified Version" of the Document means any work containing the + Document or a portion of it, either copied verbatim, or with + modifications and/or translated into another language. + + A "Secondary Section" is a named appendix or a front-matter section + of the Document that deals exclusively with the relationship of the + publishers or authors of the Document to the Document's overall + subject (or to related matters) and contains nothing that could + fall directly within that overall subject. (Thus, if the Document + is in part a textbook of mathematics, a Secondary Section may not + explain any mathematics.) The relationship could be a matter of + historical connection with the subject or with related matters, or + of legal, commercial, philosophical, ethical or political position + regarding them. + + The "Invariant Sections" are certain Secondary Sections whose + titles are designated, as being those of Invariant Sections, in + the notice that says that the Document is released under this + License. If a section does not fit the above definition of + Secondary then it is not allowed to be designated as Invariant. + The Document may contain zero Invariant Sections. If the Document + does not identify any Invariant Sections then there are none. + + The "Cover Texts" are certain short passages of text that are + listed, as Front-Cover Texts or Back-Cover Texts, in the notice + that says that the Document is released under this License. A + Front-Cover Text may be at most 5 words, and a Back-Cover Text may + be at most 25 words. + + A "Transparent" copy of the Document means a machine-readable copy, + represented in a format whose specification is available to the + general public, that is suitable for revising the document + straightforwardly with generic text editors or (for images + composed of pixels) generic paint programs or (for drawings) some + widely available drawing editor, and that is suitable for input to + text formatters or for automatic translation to a variety of + formats suitable for input to text formatters. A copy made in an + otherwise Transparent file format whose markup, or absence of + markup, has been arranged to thwart or discourage subsequent + modification by readers is not Transparent. An image format is + not Transparent if used for any substantial amount of text. A + copy that is not "Transparent" is called "Opaque". + + Examples of suitable formats for Transparent copies include plain + ASCII without markup, Texinfo input format, LaTeX input format, + SGML or XML using a publicly available DTD, and + standard-conforming simple HTML, PostScript or PDF designed for + human modification. Examples of transparent image formats include + PNG, XCF and JPG. Opaque formats include proprietary formats that + can be read and edited only by proprietary word processors, SGML or + XML for which the DTD and/or processing tools are not generally + available, and the machine-generated HTML, PostScript or PDF + produced by some word processors for output purposes only. + + The "Title Page" means, for a printed book, the title page itself, + plus such following pages as are needed to hold, legibly, the + material this License requires to appear in the title page. For + works in formats which do not have any title page as such, "Title + Page" means the text near the most prominent appearance of the + work's title, preceding the beginning of the body of the text. + + A section "Entitled XYZ" means a named subunit of the Document + whose title either is precisely XYZ or contains XYZ in parentheses + following text that translates XYZ in another language. (Here XYZ + stands for a specific section name mentioned below, such as + "Acknowledgements", "Dedications", "Endorsements", or "History".) + To "Preserve the Title" of such a section when you modify the + Document means that it remains a section "Entitled XYZ" according + to this definition. + + The Document may include Warranty Disclaimers next to the notice + which states that this License applies to the Document. These + Warranty Disclaimers are considered to be included by reference in + this License, but only as regards disclaiming warranties: any other + implication that these Warranty Disclaimers may have is void and + has no effect on the meaning of this License. + + 2. VERBATIM COPYING + + You may copy and distribute the Document in any medium, either + commercially or noncommercially, provided that this License, the + copyright notices, and the license notice saying this License + applies to the Document are reproduced in all copies, and that you + add no other conditions whatsoever to those of this License. You + may not use technical measures to obstruct or control the reading + or further copying of the copies you make or distribute. However, + you may accept compensation in exchange for copies. If you + distribute a large enough number of copies you must also follow + the conditions in section 3. + + You may also lend copies, under the same conditions stated above, + and you may publicly display copies. + + 3. COPYING IN QUANTITY + + If you publish printed copies (or copies in media that commonly + have printed covers) of the Document, numbering more than 100, and + the Document's license notice requires Cover Texts, you must + enclose the copies in covers that carry, clearly and legibly, all + these Cover Texts: Front-Cover Texts on the front cover, and + Back-Cover Texts on the back cover. Both covers must also clearly + and legibly identify you as the publisher of these copies. The + front cover must present the full title with all words of the + title equally prominent and visible. You may add other material + on the covers in addition. Copying with changes limited to the + covers, as long as they preserve the title of the Document and + satisfy these conditions, can be treated as verbatim copying in + other respects. + + If the required texts for either cover are too voluminous to fit + legibly, you should put the first ones listed (as many as fit + reasonably) on the actual cover, and continue the rest onto + adjacent pages. + + If you publish or distribute Opaque copies of the Document + numbering more than 100, you must either include a + machine-readable Transparent copy along with each Opaque copy, or + state in or with each Opaque copy a computer-network location from + which the general network-using public has access to download + using public-standard network protocols a complete Transparent + copy of the Document, free of added material. If you use the + latter option, you must take reasonably prudent steps, when you + begin distribution of Opaque copies in quantity, to ensure that + this Transparent copy will remain thus accessible at the stated + location until at least one year after the last time you + distribute an Opaque copy (directly or through your agents or + retailers) of that edition to the public. + + It is requested, but not required, that you contact the authors of + the Document well before redistributing any large number of + copies, to give them a chance to provide you with an updated + version of the Document. + + 4. MODIFICATIONS + + You may copy and distribute a Modified Version of the Document + under the conditions of sections 2 and 3 above, provided that you + release the Modified Version under precisely this License, with + the Modified Version filling the role of the Document, thus + licensing distribution and modification of the Modified Version to + whoever possesses a copy of it. In addition, you must do these + things in the Modified Version: + + A. Use in the Title Page (and on the covers, if any) a title + distinct from that of the Document, and from those of + previous versions (which should, if there were any, be listed + in the History section of the Document). You may use the + same title as a previous version if the original publisher of + that version gives permission. + + B. List on the Title Page, as authors, one or more persons or + entities responsible for authorship of the modifications in + the Modified Version, together with at least five of the + principal authors of the Document (all of its principal + authors, if it has fewer than five), unless they release you + from this requirement. + + C. State on the Title page the name of the publisher of the + Modified Version, as the publisher. + + D. Preserve all the copyright notices of the Document. + + E. Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. + + F. Include, immediately after the copyright notices, a license + notice giving the public permission to use the Modified + Version under the terms of this License, in the form shown in + the Addendum below. + + G. Preserve in that license notice the full lists of Invariant + Sections and required Cover Texts given in the Document's + license notice. + + H. Include an unaltered copy of this License. + + I. Preserve the section Entitled "History", Preserve its Title, + and add to it an item stating at least the title, year, new + authors, and publisher of the Modified Version as given on + the Title Page. If there is no section Entitled "History" in + the Document, create one stating the title, year, authors, + and publisher of the Document as given on its Title Page, + then add an item describing the Modified Version as stated in + the previous sentence. + + J. Preserve the network location, if any, given in the Document + for public access to a Transparent copy of the Document, and + likewise the network locations given in the Document for + previous versions it was based on. These may be placed in + the "History" section. You may omit a network location for a + work that was published at least four years before the + Document itself, or if the original publisher of the version + it refers to gives permission. + + K. For any section Entitled "Acknowledgements" or "Dedications", + Preserve the Title of the section, and preserve in the + section all the substance and tone of each of the contributor + acknowledgements and/or dedications given therein. + + L. Preserve all the Invariant Sections of the Document, + unaltered in their text and in their titles. Section numbers + or the equivalent are not considered part of the section + titles. + + M. Delete any section Entitled "Endorsements". Such a section + may not be included in the Modified Version. + + N. Do not retitle any existing section to be Entitled + "Endorsements" or to conflict in title with any Invariant + Section. + + O. Preserve any Warranty Disclaimers. + + If the Modified Version includes new front-matter sections or + appendices that qualify as Secondary Sections and contain no + material copied from the Document, you may at your option + designate some or all of these sections as invariant. To do this, + add their titles to the list of Invariant Sections in the Modified + Version's license notice. These titles must be distinct from any + other section titles. + + You may add a section Entitled "Endorsements", provided it contains + nothing but endorsements of your Modified Version by various + parties--for example, statements of peer review or that the text + has been approved by an organization as the authoritative + definition of a standard. + + You may add a passage of up to five words as a Front-Cover Text, + and a passage of up to 25 words as a Back-Cover Text, to the end + of the list of Cover Texts in the Modified Version. Only one + passage of Front-Cover Text and one of Back-Cover Text may be + added by (or through arrangements made by) any one entity. If the + Document already includes a cover text for the same cover, + previously added by you or by arrangement made by the same entity + you are acting on behalf of, you may not add another; but you may + replace the old one, on explicit permission from the previous + publisher that added the old one. + + The author(s) and publisher(s) of the Document do not by this + License give permission to use their names for publicity for or to + assert or imply endorsement of any Modified Version. + + 5. COMBINING DOCUMENTS + + You may combine the Document with other documents released under + this License, under the terms defined in section 4 above for + modified versions, provided that you include in the combination + all of the Invariant Sections of all of the original documents, + unmodified, and list them all as Invariant Sections of your + combined work in its license notice, and that you preserve all + their Warranty Disclaimers. + + The combined work need only contain one copy of this License, and + multiple identical Invariant Sections may be replaced with a single + copy. If there are multiple Invariant Sections with the same name + but different contents, make the title of each such section unique + by adding at the end of it, in parentheses, the name of the + original author or publisher of that section if known, or else a + unique number. Make the same adjustment to the section titles in + the list of Invariant Sections in the license notice of the + combined work. + + In the combination, you must combine any sections Entitled + "History" in the various original documents, forming one section + Entitled "History"; likewise combine any sections Entitled + "Acknowledgements", and any sections Entitled "Dedications". You + must delete all sections Entitled "Endorsements." + + 6. COLLECTIONS OF DOCUMENTS + + You may make a collection consisting of the Document and other + documents released under this License, and replace the individual + copies of this License in the various documents with a single copy + that is included in the collection, provided that you follow the + rules of this License for verbatim copying of each of the + documents in all other respects. + + You may extract a single document from such a collection, and + distribute it individually under this License, provided you insert + a copy of this License into the extracted document, and follow + this License in all other respects regarding verbatim copying of + that document. + + 7. AGGREGATION WITH INDEPENDENT WORKS + + A compilation of the Document or its derivatives with other + separate and independent documents or works, in or on a volume of + a storage or distribution medium, is called an "aggregate" if the + copyright resulting from the compilation is not used to limit the + legal rights of the compilation's users beyond what the individual + works permit. When the Document is included an aggregate, this + License does not apply to the other works in the aggregate which + are not themselves derivative works of the Document. + + If the Cover Text requirement of section 3 is applicable to these + copies of the Document, then if the Document is less than one half + of the entire aggregate, the Document's Cover Texts may be placed + on covers that bracket the Document within the aggregate, or the + electronic equivalent of covers if the Document is in electronic + form. Otherwise they must appear on printed covers that bracket + the whole aggregate. + + 8. TRANSLATION + + Translation is considered a kind of modification, so you may + distribute translations of the Document under the terms of section + 4. Replacing Invariant Sections with translations requires special + permission from their copyright holders, but you may include + translations of some or all Invariant Sections in addition to the + original versions of these Invariant Sections. You may include a + translation of this License, and all the license notices in the + Document, and any Warrany Disclaimers, provided that you also + include the original English version of this License and the + original versions of those notices and disclaimers. In case of a + disagreement between the translation and the original version of + this License or a notice or disclaimer, the original version will + prevail. + + If a section in the Document is Entitled "Acknowledgements", + "Dedications", or "History", the requirement (section 4) to + Preserve its Title (section 1) will typically require changing the + actual title. + + 9. TERMINATION + + You may not copy, modify, sublicense, or distribute the Document + except as expressly provided for under this License. Any other + attempt to copy, modify, sublicense or distribute the Document is + void, and will automatically terminate your rights under this + License. However, parties who have received copies, or rights, + from you under this License will not have their licenses + terminated so long as such parties remain in full compliance. + + 10. FUTURE REVISIONS OF THIS LICENSE + + The Free Software Foundation may publish new, revised versions of + the GNU Free Documentation License from time to time. Such new + versions will be similar in spirit to the present version, but may + differ in detail to address new problems or concerns. See + `http://www.gnu.org/copyleft/'. + + Each version of the License is given a distinguishing version + number. If the Document specifies that a particular numbered + version of this License "or any later version" applies to it, you + have the option of following the terms and conditions either of + that specified version or of any later version that has been + published (not as a draft) by the Free Software Foundation. If + the Document does not specify a version number of this License, + you may choose any version ever published (not as a draft) by the + Free Software Foundation. + + ADDENDUM: How to use this License for your documents + ==================================================== + + To use this License in a document you have written, include a copy of + the License in the document and put the following copyright and license + notices just after the title page: + + Copyright (C) YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. + A copy of the license is included in the section entitled ``GNU + Free Documentation License''. + + If you have Invariant Sections, Front-Cover Texts and Back-Cover + Texts, replace the "with...Texts." line with this: + + with the Invariant Sections being LIST THEIR TITLES, with + the Front-Cover Texts being LIST, and with the Back-Cover Texts + being LIST. + + If you have Invariant Sections without Cover Texts, or some other + combination of the three, merge those two alternatives to suit the + situation. + + If your document contains nontrivial examples of program code, we + recommend releasing these examples in parallel under your choice of + free software license, such as the GNU General Public License, to + permit their use in free software. + + +  + Tag Table: + Node: Top1236 + Node: Invoking jar1618 + Node: Invoking grepjar3399 + Node: Copying4005 + Node: GNU Free Documentation License23222 +  + End Tag Table diff -Nrc3pad gcc-3.2.3/fastjar/fastjar.texi gcc-3.3/fastjar/fastjar.texi *** gcc-3.2.3/fastjar/fastjar.texi 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/fastjar/fastjar.texi 2003-03-30 17:01:58.000000000 +0000 *************** *** 0 **** --- 1,265 ---- + \input texinfo @c -*-texinfo-*- + @setfilename fastjar.info + @settitle Guide to GNU jar utilites + + @c Note: When reading this manual you'll find lots of strange + @c circumlocutions like ``compiler for the Java language''. + @c This is necessary due to Sun's restrictions on the use of + @c the word ``Java'. + + @c When this manual is copyrighted. + @set copyrights-fastjar 2002 + + @include gcc-common.texi + + @c Versions + @set which-gcj GCC-@value{version-GCC} + + @ifinfo + @format + @dircategory Programming + @direntry + * fastjar: (fastjar). GNU jar utilities + @end direntry + + @dircategory Individual utilities + @direntry + * jar: (fastjar)Invoking jar. + An archive tool for Java archives + * grepjar: (fastjar)Invoking grepjar. + Search files in a jar file for a pattern + @end direntry + @end format + + @c man begin COPYRIGHT + Copyright (C) @value{copyrights-fastjar} Free Software Foundation, Inc. + + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 or + any later version published by the Free Software Foundation; with the + Invariant Sections being ``GNU General Public License'', the Front-Cover + texts being (a) (see below), and with the Back-Cover Texts being (b) + (see below). A copy of the license is included in the + @c man end + section entitled + ``GNU Free Documentation License''. + @ignore + @c man begin COPYRIGHT + man page gfdl(7). + @c man end + @end ignore + + @c man begin COPYRIGHT + + (a) The FSF's Front-Cover Text is: + + A GNU Manual + + (b) The FSF's Back-Cover Text is: + + You have freedom to copy and modify this GNU Manual, like GNU + software. Copies published by the Free Software Foundation raise + funds for GNU development. + @c man end + @end ifinfo + + @titlepage + @title GNU jar utilites + @author Brian Burns + + @page + @vskip 0pt plus 1filll + Copyright @copyright{} @value{copyrights-gcj} Free Software Foundation, Inc. + @sp 2 + For the @value{which-gcj} Version* + @sp 1 + Published by the Free Software Foundation @* + 59 Temple Place - Suite 330@* + Boston, MA 02111-1307, USA@* + @sp 1 + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 or + any later version published by the Free Software Foundation; with the + Invariant Sections being ``GNU General Public License'', the Front-Cover + texts being (a) (see below), and with the Back-Cover Texts being (b) + (see below). A copy of the license is included in the section entitled + ``GNU Free Documentation License''. + + (a) The FSF's Front-Cover Text is: + + A GNU Manual + + (b) The FSF's Back-Cover Text is: + + You have freedom to copy and modify this GNU Manual, like GNU + software. Copies published by the Free Software Foundation raise + funds for GNU development. + @end titlepage + @contents + @page + + + @node Top + @top Introduction + + This manual describes how to use @command{jar} and @command{grepjar}. + + @menu + * Invoking jar:: Options supported by @command{jar} + * Invoking grepjar:: Options supported by @command{grepjar} + * Copying:: The GNU General Public License + * GNU Free Documentation License:: + How you can share and copy this manual + @end menu + + @node Invoking jar + @chapter Invoking jar + + @c man title jar archive tool for Java archives + + @c man begin DESCRIPTION jar + + @code{fastjar} is an implementation of Sun's jar utility that comes with + the JDK, written entirely in C, and runs in a fraction of the time while + being feature compatible. + + If any file is a directory then it is processed recursively. The + manifest file name and the archive file name needs to be specified in + the same order the @option{-m} and @option{-f} flags are specified. + + @c man end + + @ignore + @c man begin SYNOPSIS jar + jar @option{-ctxu} [@option{OPTIONS}] [@var{jar-file}] [@var{manifest-file}] [@option{-C} @var{dir}] @var{files}@dots{} + @c man end + @c man begin SEEALSO jar + gcj(1), gij(1), grepjar(1) + and the Info entry for @file{gcj}. + @c man end + @end ignore + + @c man begin OPTIONS jar + + Exactly one of the following actions must be specified: + + @table @gcctabopt + + @item -c + Create new archive. + + @item -t + List table of contents for archive. + + @item -x + Extract named (or all) files from archive. + + @item -u + Update existing archive. This option is disabled due to bugs (currently + fails with exit status 1 and does nothing). + + @end table + + The following parameters are optional: + + @table @gcctabopt + + @item -@@ + Read the names of the files to add to the archive from stdin. This + option is supported only in combination with @option{-c} or @option{-u}. + Non standard option added in the GCC version. + + @item -C @var{directory} + Change to the @var{directory} and include the following file. + + @item -E + Prevent fastjar from reading the content of a directory when specifying + one (and instead relying on the provided list of files to populate the + archive with regard to the directory entry). Non standard option added + in the GCC version. + + @item -M + Do not create a manifest file for the entries. + + @item -0 + Store only; use no ZIP compression. + + @item -V + @itemx --version + Display version information. + + @item -f @var{archive} + Specify archive file name. + + @item -m @var{manifest} + Include manifest information from specified @var{manifest} file. + + @item -v + Generate verbose output on standard output. + + @end table + + All remaining options are considered to be names of files. + + @c man end + + @node Invoking grepjar + @chapter Invoking grepjar + + @c man title grepjar search files in a jar file for a pattern + + @c man begin DESCRIPTION grepjar + + The @code{grepjar} program can be used to search files in a jar file for + a pattern. + + @c man end + + @ignore + @c man begin SYNOPSIS grepjar + grepjar [@option{-bcinsw}] @option{-e} @var{PATTERN} | @var{PATTERN} @var{files}@dots{} + @c man end + @c man begin SEEALSO grepjar + jar(1), gcj(1), gij(1), gfdl(7) and the Info entry for @file{gcj}. + @c man end + @end ignore + + @c man begin OPTIONS grepjar + + @table @gcctabopt + @item -b + Print byte offset of match. + + @item -c + Print number of matches. + + @item -i + Compare case-insensitively. + + @item -n + Print line number of each match. + + @item -s + Suppress error messages. + + @item -w + Force @var{PATTERN} to match only whole words. + + @item -e @var{PATTERN} + Use @var{PATTERN} as regular expression. + + @item --help + Print help, then exit. + + @item -V + @itemx --version + Print version number, then exit. + @end table + + @c man end + + @include gpl.texi + + @include fdl.texi + + @bye diff -Nrc3pad gcc-3.2.3/fastjar/grepjar.1 gcc-3.3/fastjar/grepjar.1 *** gcc-3.2.3/fastjar/grepjar.1 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/fastjar/grepjar.1 2003-05-14 01:25:21.000000000 +0000 *************** *** 0 **** --- 1,202 ---- + .\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13 + .\" + .\" Standard preamble: + .\" ======================================================================== + .de Sh \" Subsection heading + .br + .if t .Sp + .ne 5 + .PP + \fB\\$1\fR + .PP + .. + .de Sp \" Vertical space (when we can't use .PP) + .if t .sp .5v + .if n .sp + .. + .de Vb \" Begin verbatim text + .ft CW + .nf + .ne \\$1 + .. + .de Ve \" End verbatim text + .ft R + .fi + .. + .\" Set up some character translations and predefined strings. \*(-- will + .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left + .\" double quote, and \*(R" will give a right double quote. | will give a + .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to + .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' + .\" expand to `' in nroff, nothing in troff, for use with C<>. + .tr \(*W-|\(bv\*(Tr + .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' + .ie n \{\ + . ds -- \(*W- + . ds PI pi + . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch + . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch + . ds L" "" + . ds R" "" + . ds C` "" + . ds C' "" + 'br\} + .el\{\ + . ds -- \|\(em\| + . ds PI \(*p + . ds L" `` + . ds R" '' + 'br\} + .\" + .\" If the F register is turned on, we'll generate index entries on stderr for + .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index + .\" entries marked with X<> in POD. Of course, you'll have to process the + .\" output yourself in some meaningful fashion. + .if \nF \{\ + . de IX + . tm Index:\\$1\t\\n%\t"\\$2" + .. + . nr % 0 + . rr F + .\} + .\" + .\" For nroff, turn off justification. Always turn off hyphenation; it makes + .\" way too many mistakes in technical documents. + .hy 0 + .if n .na + .\" + .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). + .\" Fear. Run. Save yourself. No user-serviceable parts. + . \" fudge factors for nroff and troff + .if n \{\ + . ds #H 0 + . ds #V .8m + . ds #F .3m + . ds #[ \f1 + . ds #] \fP + .\} + .if t \{\ + . ds #H ((1u-(\\\\n(.fu%2u))*.13m) + . ds #V .6m + . ds #F 0 + . ds #[ \& + . ds #] \& + .\} + . \" simple accents for nroff and troff + .if n \{\ + . ds ' \& + . ds ` \& + . ds ^ \& + . ds , \& + . ds ~ ~ + . ds / + .\} + .if t \{\ + . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" + . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' + . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' + . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' + . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' + . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' + .\} + . \" troff and (daisy-wheel) nroff accents + .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' + .ds 8 \h'\*(#H'\(*b\h'-\*(#H' + .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] + .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' + .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' + .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] + .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] + .ds ae a\h'-(\w'a'u*4/10)'e + .ds Ae A\h'-(\w'A'u*4/10)'E + . \" corrections for vroff + .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' + .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' + . \" for low resolution devices (crt and lpr) + .if \n(.H>23 .if \n(.V>19 \ + \{\ + . ds : e + . ds 8 ss + . ds o a + . ds d- d\h'-1'\(ga + . ds D- D\h'-1'\(hy + . ds th \o'bp' + . ds Th \o'LP' + . ds ae ae + . ds Ae AE + .\} + .rm #[ #] #H #V #F C + .\" ======================================================================== + .\" + .IX Title "GREPJAR 1" + .TH GREPJAR 1 "2003-05-14" "gcc-3.3" "GNU" + .SH "NAME" + grepjar \- search files in a jar file for a pattern + .SH "SYNOPSIS" + .IX Header "SYNOPSIS" + grepjar [\fB\-bcinsw\fR] \fB\-e\fR \fI\s-1PATTERN\s0\fR | \fI\s-1PATTERN\s0\fR \fIfiles\fR... + .SH "DESCRIPTION" + .IX Header "DESCRIPTION" + The \f(CW\*(C`grepjar\*(C'\fR program can be used to search files in a jar file for + a pattern. + .SH "OPTIONS" + .IX Header "OPTIONS" + .IP "\fB\-b\fR" 4 + .IX Item "-b" + Print byte offset of match. + .IP "\fB\-c\fR" 4 + .IX Item "-c" + Print number of matches. + .IP "\fB\-i\fR" 4 + .IX Item "-i" + Compare case\-insensitively. + .IP "\fB\-n\fR" 4 + .IX Item "-n" + Print line number of each match. + .IP "\fB\-s\fR" 4 + .IX Item "-s" + Suppress error messages. + .IP "\fB\-w\fR" 4 + .IX Item "-w" + Force \fI\s-1PATTERN\s0\fR to match only whole words. + .IP "\fB\-e\fR \fI\s-1PATTERN\s0\fR" 4 + .IX Item "-e PATTERN" + Use \fI\s-1PATTERN\s0\fR as regular expression. + .IP "\fB\-\-help\fR" 4 + .IX Item "--help" + Print help, then exit. + .IP "\fB\-V\fR" 4 + .IX Item "-V" + .PD 0 + .IP "\fB\-\-version\fR" 4 + .IX Item "--version" + .PD + Print version number, then exit. + .SH "SEE ALSO" + .IX Header "SEE ALSO" + \&\fIjar\fR\|(1), \fIgcj\fR\|(1), \fIgij\fR\|(1), \fIgfdl\fR\|(7) and the Info entry for \fIgcj\fR. + .SH "COPYRIGHT" + .IX Header "COPYRIGHT" + Copyright (C) 2002 Free Software Foundation, Inc. + .PP + Permission is granted to copy, distribute and/or modify this document + under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.2 or + any later version published by the Free Software Foundation; with the + Invariant Sections being ``\s-1GNU\s0 General Public License'', the Front-Cover + texts being (a) (see below), and with the Back-Cover Texts being (b) + (see below). A copy of the license is included in the + man page \fIgfdl\fR\|(7). + .PP + (a) The \s-1FSF\s0's Front-Cover Text is: + .PP + .Vb 1 + \& A GNU Manual + .Ve + .PP + (b) The \s-1FSF\s0's Back-Cover Text is: + .PP + .Vb 3 + \& You have freedom to copy and modify this GNU Manual, like GNU + \& software. Copies published by the Free Software Foundation raise + \& funds for GNU development. + .Ve diff -Nrc3pad gcc-3.2.3/fastjar/jar.1 gcc-3.3/fastjar/jar.1 *** gcc-3.2.3/fastjar/jar.1 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/fastjar/jar.1 2003-05-14 01:25:20.000000000 +0000 *************** *** 0 **** --- 1,231 ---- + .\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13 + .\" + .\" Standard preamble: + .\" ======================================================================== + .de Sh \" Subsection heading + .br + .if t .Sp + .ne 5 + .PP + \fB\\$1\fR + .PP + .. + .de Sp \" Vertical space (when we can't use .PP) + .if t .sp .5v + .if n .sp + .. + .de Vb \" Begin verbatim text + .ft CW + .nf + .ne \\$1 + .. + .de Ve \" End verbatim text + .ft R + .fi + .. + .\" Set up some character translations and predefined strings. \*(-- will + .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left + .\" double quote, and \*(R" will give a right double quote. | will give a + .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to + .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' + .\" expand to `' in nroff, nothing in troff, for use with C<>. + .tr \(*W-|\(bv\*(Tr + .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' + .ie n \{\ + . ds -- \(*W- + . ds PI pi + . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch + . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch + . ds L" "" + . ds R" "" + . ds C` "" + . ds C' "" + 'br\} + .el\{\ + . ds -- \|\(em\| + . ds PI \(*p + . ds L" `` + . ds R" '' + 'br\} + .\" + .\" If the F register is turned on, we'll generate index entries on stderr for + .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index + .\" entries marked with X<> in POD. Of course, you'll have to process the + .\" output yourself in some meaningful fashion. + .if \nF \{\ + . de IX + . tm Index:\\$1\t\\n%\t"\\$2" + .. + . nr % 0 + . rr F + .\} + .\" + .\" For nroff, turn off justification. Always turn off hyphenation; it makes + .\" way too many mistakes in technical documents. + .hy 0 + .if n .na + .\" + .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). + .\" Fear. Run. Save yourself. No user-serviceable parts. + . \" fudge factors for nroff and troff + .if n \{\ + . ds #H 0 + . ds #V .8m + . ds #F .3m + . ds #[ \f1 + . ds #] \fP + .\} + .if t \{\ + . ds #H ((1u-(\\\\n(.fu%2u))*.13m) + . ds #V .6m + . ds #F 0 + . ds #[ \& + . ds #] \& + .\} + . \" simple accents for nroff and troff + .if n \{\ + . ds ' \& + . ds ` \& + . ds ^ \& + . ds , \& + . ds ~ ~ + . ds / + .\} + .if t \{\ + . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" + . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' + . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' + . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' + . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' + . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' + .\} + . \" troff and (daisy-wheel) nroff accents + .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' + .ds 8 \h'\*(#H'\(*b\h'-\*(#H' + .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] + .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' + .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' + .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] + .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] + .ds ae a\h'-(\w'a'u*4/10)'e + .ds Ae A\h'-(\w'A'u*4/10)'E + . \" corrections for vroff + .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' + .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' + . \" for low resolution devices (crt and lpr) + .if \n(.H>23 .if \n(.V>19 \ + \{\ + . ds : e + . ds 8 ss + . ds o a + . ds d- d\h'-1'\(ga + . ds D- D\h'-1'\(hy + . ds th \o'bp' + . ds Th \o'LP' + . ds ae ae + . ds Ae AE + .\} + .rm #[ #] #H #V #F C + .\" ======================================================================== + .\" + .IX Title "FASTJAR 1" + .TH FASTJAR 1 "2003-05-14" "gcc-3.3" "GNU" + .SH "NAME" + jar \- archive tool for Java archives + .SH "SYNOPSIS" + .IX Header "SYNOPSIS" + jar \fB\-ctxu\fR [\fB\s-1OPTIONS\s0\fR] [\fIjar-file\fR] [\fImanifest-file\fR] [\fB\-C\fR \fIdir\fR] \fIfiles\fR... + .SH "DESCRIPTION" + .IX Header "DESCRIPTION" + \&\f(CW\*(C`fastjar\*(C'\fR is an implementation of Sun's jar utility that comes with + the \s-1JDK\s0, written entirely in C, and runs in a fraction of the time while + being feature compatible. + .PP + If any file is a directory then it is processed recursively. The + manifest file name and the archive file name needs to be specified in + the same order the \fB\-m\fR and \fB\-f\fR flags are specified. + .SH "OPTIONS" + .IX Header "OPTIONS" + Exactly one of the following actions must be specified: + .IP "\fB\-c\fR" 4 + .IX Item "-c" + Create new archive. + .IP "\fB\-t\fR" 4 + .IX Item "-t" + List table of contents for archive. + .IP "\fB\-x\fR" 4 + .IX Item "-x" + Extract named (or all) files from archive. + .IP "\fB\-u\fR" 4 + .IX Item "-u" + Update existing archive. This option is disabled due to bugs (currently + fails with exit status 1 and does nothing). + .PP + The following parameters are optional: + .IP "\fB\-@\fR" 4 + .IX Item "-@" + Read the names of the files to add to the archive from stdin. This + option is supported only in combination with \fB\-c\fR or \fB\-u\fR. + Non standard option added in the \s-1GCC\s0 version. + .IP "\fB\-C\fR \fIdirectory\fR" 4 + .IX Item "-C directory" + Change to the \fIdirectory\fR and include the following file. + .IP "\fB\-E\fR" 4 + .IX Item "-E" + Prevent fastjar from reading the content of a directory when specifying + one (and instead relying on the provided list of files to populate the + archive with regard to the directory entry). Non standard option added + in the \s-1GCC\s0 version. + .IP "\fB\-M\fR" 4 + .IX Item "-M" + Do not create a manifest file for the entries. + .IP "\fB\-0\fR" 4 + .IX Item "-0" + Store only; use no \s-1ZIP\s0 compression. + .IP "\fB\-V\fR" 4 + .IX Item "-V" + .PD 0 + .IP "\fB\-\-version\fR" 4 + .IX Item "--version" + .PD + Display version information. + .IP "\fB\-f\fR \fIarchive\fR" 4 + .IX Item "-f archive" + Specify archive file name. + .IP "\fB\-m\fR \fImanifest\fR" 4 + .IX Item "-m manifest" + Include manifest information from specified \fImanifest\fR file. + .IP "\fB\-v\fR" 4 + .IX Item "-v" + Generate verbose output on standard output. + .PP + All remaining options are considered to be names of files. + .SH "SEE ALSO" + .IX Header "SEE ALSO" + \&\fIgcj\fR\|(1), \fIgij\fR\|(1), \fIgrepjar\fR\|(1) + and the Info entry for \fIgcj\fR. + .SH "COPYRIGHT" + .IX Header "COPYRIGHT" + Copyright (C) 2002 Free Software Foundation, Inc. + .PP + Permission is granted to copy, distribute and/or modify this document + under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.2 or + any later version published by the Free Software Foundation; with the + Invariant Sections being ``\s-1GNU\s0 General Public License'', the Front-Cover + texts being (a) (see below), and with the Back-Cover Texts being (b) + (see below). A copy of the license is included in the + man page \fIgfdl\fR\|(7). + .PP + (a) The \s-1FSF\s0's Front-Cover Text is: + .PP + .Vb 1 + \& A GNU Manual + .Ve + .PP + (b) The \s-1FSF\s0's Back-Cover Text is: + .PP + .Vb 3 + \& You have freedom to copy and modify this GNU Manual, like GNU + \& software. Copies published by the Free Software Foundation raise + \& funds for GNU development. + .Ve diff -Nrc3pad gcc-3.2.3/fastjar/jargrep.c gcc-3.3/fastjar/jargrep.c *** gcc-3.2.3/fastjar/jargrep.c 2002-01-09 23:22:20.000000000 +0000 --- gcc-3.3/fastjar/jargrep.c 2003-01-28 22:25:27.000000000 +0000 *************** *** 1,6 **** /* jargrep.c - main functions for jargrep utility ! Copyright (C) 2002 Free Software Foundation Copyright (C) 1999, 2000 Bryan Burns Copyright (C) 2000 Cory Hollingsworth --- 1,6 ---- /* jargrep.c - main functions for jargrep utility ! Copyright (C) 2002, 2003 Free Software Foundation Copyright (C) 1999, 2000 Bryan Burns Copyright (C) 2000 Cory Hollingsworth *************** will test some other platforms later. *** 105,111 **** #include "config.h" #include #include - #include #include #include #include --- 105,110 ---- *************** will test some other platforms later. *** 115,120 **** --- 114,122 ---- #ifdef HAVE_STDLIB_H #include #endif + + #include "xregex.h" + #include "jargrep.h" #include "jartool.h" #include "pushback.h" *************** will test some other platforms later. *** 126,132 **** void version(void); void help(const char *name); ! #define Usage "Usage: %s [-bcinsw] <-e PATTERN | PATTERN> FILE ...\n" /* Function name: opt_valid --- 128,134 ---- void version(void); void help(const char *name); ! #define Usage "Usage: %s [-bcinsVw] [--version|--help] <-e PATTERN | PATTERN> FILE ...\n" /* Function name: opt_valid *************** Search files in a jar file for a pattern *** 769,775 **** -n print line number of each match\n\ -s suppress error messages\n\ -w force PATTERN to match only whole words\n\ ! -e PATTERN use PATTERN as regular exprssion\n\ "); exit (0); --- 771,779 ---- -n print line number of each match\n\ -s suppress error messages\n\ -w force PATTERN to match only whole words\n\ ! -e PATTERN use PATTERN as regular expression\n\ ! -V|--version print version number and exit\n\ ! --help print help\n\ "); exit (0); diff -Nrc3pad gcc-3.2.3/fastjar/jartool.c gcc-3.3/fastjar/jartool.c *** gcc-3.2.3/fastjar/jartool.c 2002-03-18 11:08:59.000000000 +0000 --- gcc-3.3/fastjar/jartool.c 2003-01-31 22:48:13.000000000 +0000 *************** *** 239,244 **** --- 239,250 ---- #include "pushback.h" #include "compress.h" + /* Some systems have mkdir that takes a single argument. */ + #ifdef MKDIR_TAKES_ONE_ARG + # define mkdir(a,b) mkdir(a) + #endif + + #ifdef WORDS_BIGENDIAN #define L2BI(l) ((l & 0xff000000) >> 24) | \ *************** int main(int argc, char **argv){ *** 433,440 **** /* create the jarfile */ if(action == ACTION_CREATE){ if(jarfile){ ! jarfd = open(jarfile, O_CREAT | O_BINARY | O_WRONLY | O_TRUNC, ! S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); if(jarfd < 0){ fprintf(stderr, "Error opening %s for writing!\n", jarfile); --- 439,445 ---- /* create the jarfile */ if(action == ACTION_CREATE){ if(jarfile){ ! jarfd = open(jarfile, O_CREAT | O_BINARY | O_WRONLY | O_TRUNC, 0666); if(jarfd < 0){ fprintf(stderr, "Error opening %s for writing!\n", jarfile); *************** int add_to_jar(int fd, const char *new_d *** 838,844 **** } } ! if(!strcmp(file, jarfile)){ if(verbose) printf("skipping: %s\n", file); return 0; /* we don't want to add ourselves.. */ --- 843,849 ---- } } ! if(jarfile && !strcmp(file, jarfile)){ if(verbose) printf("skipping: %s\n", file); return 0; /* we don't want to add ourselves.. */ *************** int add_to_jar(int fd, const char *new_d *** 919,925 **** while(!use_explicit_list_only && (de = readdir(dir)) != NULL){ if(de->d_name[0] == '.') continue; ! if(!strcmp(de->d_name, jarfile)){ /* we don't want to add ourselves. Believe me */ if(verbose) printf("skipping: %s\n", de->d_name); continue; --- 924,931 ---- while(!use_explicit_list_only && (de = readdir(dir)) != NULL){ if(de->d_name[0] == '.') continue; ! if(jarfile && !strcmp(de->d_name, jarfile)){ ! /* we don't want to add ourselves. Believe me */ if(verbose) printf("skipping: %s\n", de->d_name); continue; *************** int extract_jar(int fd, char **files, in *** 1449,1455 **** } if(f_fd != -1 && handle){ ! f_fd = creat((const char *)filename, 00644); if(f_fd < 0){ fprintf(stderr, "Error extracting JAR archive!\n"); --- 1455,1462 ---- } if(f_fd != -1 && handle){ ! f_fd = open((const char *)filename, ! O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0644); if(f_fd < 0){ fprintf(stderr, "Error extracting JAR archive!\n"); *************** int extract_jar(int fd, char **files, in *** 1464,1472 **** } if(method == 8 || flags & 0x0008){ - if(seekable) - lseek(fd, eflen, SEEK_CUR); - else consume(&pbf, eflen); inflate_file(&pbf, f_fd, &ze); --- 1471,1476 ---- *************** int extract_jar(int fd, char **files, in *** 1501,1509 **** #endif } - if(seekable) - lseek(fd, eflen, SEEK_CUR); - else consume(&pbf, eflen); } --- 1505,1510 ---- *************** int list_jar(int fd, char **files, int f *** 1564,1570 **** int i, j; time_t tdate; struct tm *s_tm; ! char ascii_date[30]; zipentry ze; #ifdef DEBUG --- 1565,1571 ---- int i, j; time_t tdate; struct tm *s_tm; ! char ascii_date[31]; zipentry ze; #ifdef DEBUG *************** int list_jar(int fd, char **files, int f *** 1655,1663 **** tdate = dos2unixtime(mdate); s_tm = localtime(&tdate); strftime(ascii_date, 30, "%a %b %d %H:%M:%S %Z %Y", s_tm); } ! if(filename_len < fnlen){ if(filename != NULL) free(filename); --- 1656,1665 ---- tdate = dos2unixtime(mdate); s_tm = localtime(&tdate); strftime(ascii_date, 30, "%a %b %d %H:%M:%S %Z %Y", s_tm); + ascii_date[30] = '\0'; } ! if(filename_len < fnlen + 1){ if(filename != NULL) free(filename); *************** int list_jar(int fd, char **files, int f *** 1774,1782 **** tdate = dos2unixtime(mdate); s_tm = localtime(&tdate); strftime(ascii_date, 30, "%a %b %d %H:%M:%S %Z %Y", s_tm); } ! if(filename_len < fnlen){ if(filename != NULL) free(filename); --- 1776,1785 ---- tdate = dos2unixtime(mdate); s_tm = localtime(&tdate); strftime(ascii_date, 30, "%a %b %d %H:%M:%S %Z %Y", s_tm); + ascii_date[30] = '\0'; } ! if(filename_len < fnlen + 1){ if(filename != NULL) free(filename); *************** int consume(pb_file *pbf, int amt){ *** 1847,1852 **** --- 1850,1863 ---- printf("Consuming %d bytes\n", amt); #endif + if (seekable){ + if (amt <= (int)pbf->buff_amt) + pb_read(pbf, buff, amt); + else { + lseek(pbf->fd, amt - pbf->buff_amt, SEEK_CUR); + pb_read(pbf, buff, pbf->buff_amt); /* clear pbf */ + } + } else while(tc < amt){ rdamt = pb_read(pbf, buff, ((amt - tc) < RDSZ ? (amt - tc) : RDSZ)); #ifdef DEBUG *************** int consume(pb_file *pbf, int amt){ *** 1856,1862 **** } #ifdef DEBUG ! printf("%d bytes consumed\n", tc); #endif return 0; --- 1867,1873 ---- } #ifdef DEBUG ! printf("%d bytes consumed\n", amt); #endif return 0; diff -Nrc3pad gcc-3.2.3/fastjar/Makefile.am gcc-3.3/fastjar/Makefile.am *** gcc-3.2.3/fastjar/Makefile.am 2002-01-13 18:05:25.000000000 +0000 --- gcc-3.3/fastjar/Makefile.am 2002-12-31 01:17:12.000000000 +0000 *************** grepjar_LDADD = $(ZLIBS) $(LIBIBERTY) *** 57,59 **** --- 57,98 ---- grepjar_DEPENDENCIES = $(ZDEPS) $(LIBIBERTY) AM_CFLAGS = @fastjar_warn_cflags@ + + TEXINFO_TEX = ../gcc/doc/include/texinfo.tex + info_TEXINFOS = fastjar.texi + fastjar_TEXINFOS = \ + ../gcc/doc/include/gcc-common.texi \ + ../gcc/doc/include/fdl.texi \ + ../gcc/doc/include/gpl.texi + man_MANS = jar.1 grepjar.1 + EXTRA_DIST = $(man_MANS) + + ## This is a hack. We can't set AM_MAKEINFOFLAGS, since that isn't + ## available in 1.4. Nor can we override or append to MAKEINFO or + ## MAKEINFOFLAGS, since these are overridden by the top-level + ## Makefile. So, we just duplicate the rules. FIXME: remove this + ## when we upgrade automake. Note that we don't include $(srcdir) in + ## my_makei_flags; makeinfo is run in srcdir. + my_makei_flags += -I ../gcc/doc/include + fastjar.info: fastjar.texi $(fastjar_TEXINFOS) + @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9] + cd $(srcdir) \ + && $(MAKEINFO) $(my_makei_flags) `echo $< | sed 's,.*/,,'` + + + TEXI2POD = perl $(srcdir)/../contrib/texi2pod.pl + POD2MAN = pod2man --center="GNU" --release="gcc-@gcc_version@" + + $(srcdir)/jar.1: $(srcdir)/fastjar.texi + -$(TEXI2POD) -D jar < $(srcdir)/fastjar.texi > fastjar.pod + -($(POD2MAN) --section=1 fastjar.pod > jar.1.T$$$$ && \ + mv -f jar.1.T$$$$ $(srcdir)/jar.1) || \ + (rm -f jar.1.T$$$$ && exit 1) + -rm -f fastjar.pod + + $(srcdir)/grepjar.1: $(srcdir)/fastjar.texi + -$(TEXI2POD) -D grepjar < $(srcdir)/fastjar.texi > grepjar.pod + -($(POD2MAN) --section=1 grepjar.pod > grepjar.1.T$$$$ && \ + mv -f grepjar.1.T$$$$ $(srcdir)/grepjar.1) || \ + (rm -f grepjar.1.T$$$$ && exit 1) + -rm -f grepjar.pod diff -Nrc3pad gcc-3.2.3/fastjar/Makefile.in gcc-3.3/fastjar/Makefile.in *** gcc-3.2.3/fastjar/Makefile.in 2002-01-13 18:05:25.000000000 +0000 --- gcc-3.3/fastjar/Makefile.in 2003-05-14 00:18:14.000000000 +0000 *************** ZDEPS = @ZDEPS@ *** 73,78 **** --- 73,79 ---- ZINCS = @ZINCS@ ZLIBS = @ZLIBS@ fastjar_warn_cflags = @fastjar_warn_cflags@ + gcc_version = @gcc_version@ AUTOMAKE_OPTIONS = no-dependencies *************** grepjar_LDADD = $(ZLIBS) $(LIBIBERTY) *** 133,138 **** --- 134,154 ---- grepjar_DEPENDENCIES = $(ZDEPS) $(LIBIBERTY) AM_CFLAGS = @fastjar_warn_cflags@ + + TEXINFO_TEX = ../gcc/doc/include/texinfo.tex + info_TEXINFOS = fastjar.texi + fastjar_TEXINFOS = \ + ../gcc/doc/include/gcc-common.texi \ + ../gcc/doc/include/fdl.texi \ + ../gcc/doc/include/gpl.texi + + man_MANS = jar.1 grepjar.1 + EXTRA_DIST = $(man_MANS) + + my_makei_flags = -I ../gcc/doc/include + + TEXI2POD = perl $(srcdir)/../contrib/texi2pod.pl + POD2MAN = pod2man --center="GNU" --release="gcc-@gcc_version@" ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h *************** CFLAGS = @CFLAGS@ *** 153,173 **** COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ ! DIST_COMMON = README ./stamp-h.in AUTHORS COPYING ChangeLog INSTALL \ ! Makefile.am Makefile.in NEWS aclocal.m4 config.h.in configure \ ! configure.in install-defs.sh.in install-sh missing mkinstalldirs DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) ! TAR = tar GZIP_ENV = --best SOURCES = $(jar_SOURCES) $(grepjar_SOURCES) OBJECTS = $(jar_OBJECTS) $(grepjar_OBJECTS) all: all-redirect .SUFFIXES: ! .SUFFIXES: .S .c .o .s $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile --- 169,198 ---- COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ ! TEXI2DVI = texi2dvi ! INFO_DEPS = fastjar.info ! DVIS = fastjar.dvi ! TEXINFOS = fastjar.texi ! man1dir = $(mandir)/man1 ! MANS = $(man_MANS) ! ! NROFF = nroff ! DIST_COMMON = README $(fastjar_TEXINFOS) ./stamp-h.in AUTHORS COPYING \ ! ChangeLog INSTALL Makefile.am Makefile.in NEWS acinclude.m4 aclocal.m4 \ ! config.h.in configure configure.in install-defs.sh.in install-sh \ ! missing mkinstalldirs DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) ! TAR = gtar GZIP_ENV = --best SOURCES = $(jar_SOURCES) $(grepjar_SOURCES) OBJECTS = $(jar_OBJECTS) $(grepjar_OBJECTS) all: all-redirect .SUFFIXES: ! .SUFFIXES: .S .c .dvi .info .o .ps .s .texi .texinfo .txi $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile *************** Makefile: $(srcdir)/Makefile.in $(top_b *** 175,181 **** cd $(top_builddir) \ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status ! $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in cd $(srcdir) && $(ACLOCAL) config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) --- 200,206 ---- cd $(top_builddir) \ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status ! $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4 cd $(srcdir) && $(ACLOCAL) config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) *************** grepjar$(EXEEXT): $(grepjar_OBJECTS) $(g *** 265,270 **** --- 290,451 ---- @rm -f grepjar$(EXEEXT) $(LINK) $(grepjar_LDFLAGS) $(grepjar_OBJECTS) $(grepjar_LDADD) $(LIBS) + fastjar.info: fastjar.texi $(fastjar_TEXINFOS) + fastjar.dvi: fastjar.texi $(fastjar_TEXINFOS) + + + DVIPS = dvips + + .texi.info: + @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9] + cd $(srcdir) \ + && $(MAKEINFO) `echo $< | sed 's,.*/,,'` + + .texi.dvi: + TEXINPUTS=$(srcdir)/../gcc/doc/include:$$TEXINPUTS \ + MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $< + + .texi: + @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9] + cd $(srcdir) \ + && $(MAKEINFO) `echo $< | sed 's,.*/,,'` + + .texinfo.info: + @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9] + cd $(srcdir) \ + && $(MAKEINFO) `echo $< | sed 's,.*/,,'` + + .texinfo: + @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9] + cd $(srcdir) \ + && $(MAKEINFO) `echo $< | sed 's,.*/,,'` + + .texinfo.dvi: + TEXINPUTS=$(srcdir)/../gcc/doc/include:$$TEXINPUTS \ + MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $< + + .txi.info: + @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9] + cd $(srcdir) \ + && $(MAKEINFO) `echo $< | sed 's,.*/,,'` + + .txi.dvi: + TEXINPUTS=$(srcdir)/../gcc/doc/include:$$TEXINPUTS \ + MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $< + + .txi: + @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9] + cd $(srcdir) \ + && $(MAKEINFO) `echo $< | sed 's,.*/,,'` + .dvi.ps: + $(DVIPS) $< -o $@ + + install-info-am: $(INFO_DEPS) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(infodir) + @list='$(INFO_DEPS)'; \ + for file in $$list; do \ + d=$(srcdir); \ + for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \ + if test -f $$d/$$ifile; then \ + echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \ + $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \ + else : ; fi; \ + done; \ + done + @$(POST_INSTALL) + @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \ + list='$(INFO_DEPS)'; \ + for file in $$list; do \ + echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\ + install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\ + done; \ + else : ; fi + + uninstall-info: + $(PRE_UNINSTALL) + @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \ + ii=yes; \ + else ii=; fi; \ + list='$(INFO_DEPS)'; \ + for file in $$list; do \ + test -z "$ii" \ + || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \ + done + @$(NORMAL_UNINSTALL) + list='$(INFO_DEPS)'; \ + for file in $$list; do \ + (cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \ + done + + dist-info: $(INFO_DEPS) + list='$(INFO_DEPS)'; \ + for base in $$list; do \ + d=$(srcdir); \ + for file in `cd $$d && eval echo $$base*`; do \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file; \ + done; \ + done + + mostlyclean-aminfo: + -rm -f fastjar.aux fastjar.cp fastjar.cps fastjar.dvi fastjar.fn \ + fastjar.fns fastjar.ky fastjar.kys fastjar.ps fastjar.log \ + fastjar.pg fastjar.toc fastjar.tp fastjar.tps fastjar.vr \ + fastjar.vrs fastjar.op fastjar.tr fastjar.cv fastjar.cn + + clean-aminfo: + + distclean-aminfo: + + maintainer-clean-aminfo: + cd $(srcdir) && for i in $(INFO_DEPS); do \ + rm -f $$i; \ + if test "`echo $$i-[0-9]*`" != "$$i-[0-9]*"; then \ + rm -f $$i-[0-9]*; \ + fi; \ + done + + install-man1: + $(mkinstalldirs) $(DESTDIR)$(man1dir) + @list='$(man1_MANS)'; \ + l2='$(man_MANS)'; for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ + else file=$$i; fi; \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \ + $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \ + done + + uninstall-man1: + @list='$(man1_MANS)'; \ + l2='$(man_MANS)'; for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \ + rm -f $(DESTDIR)$(man1dir)/$$inst; \ + done + install-man: $(MANS) + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-man1 + uninstall-man: + @$(NORMAL_UNINSTALL) + $(MAKE) $(AM_MAKEFLAGS) uninstall-man1 + tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) *************** distdir: $(DISTFILES) *** 335,350 **** @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ ! cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done ! info-am: info: info-am ! dvi-am: dvi: dvi-am check-am: all-am check: check-am --- 516,532 ---- @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ ! cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done ! $(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info ! info-am: $(INFO_DEPS) info: info-am ! dvi-am: $(DVIS) dvi: dvi-am check-am: all-am check: check-am *************** all-recursive-am: config.h *** 356,375 **** install-exec-am: install-binPROGRAMS install-exec: install-exec-am ! install-data-am: install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-am ! uninstall-am: uninstall-binPROGRAMS uninstall: uninstall-am ! all-am: Makefile $(PROGRAMS) config.h all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: ! $(mkinstalldirs) $(DESTDIR)$(bindir) mostlyclean-generic: --- 538,558 ---- install-exec-am: install-binPROGRAMS install-exec: install-exec-am ! install-data-am: install-info-am install-man install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-am ! uninstall-am: uninstall-binPROGRAMS uninstall-info uninstall-man uninstall: uninstall-am ! all-am: Makefile $(INFO_DEPS) $(PROGRAMS) $(MANS) config.h all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: ! $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(infodir) \ ! $(DESTDIR)$(mandir)/man1 mostlyclean-generic: *************** distclean-generic: *** 382,406 **** maintainer-clean-generic: mostlyclean-am: mostlyclean-hdr mostlyclean-binPROGRAMS \ ! mostlyclean-compile mostlyclean-tags \ mostlyclean-generic mostlyclean: mostlyclean-am ! clean-am: clean-hdr clean-binPROGRAMS clean-compile clean-tags \ ! clean-generic mostlyclean-am clean: clean-am distclean-am: distclean-hdr distclean-binPROGRAMS distclean-compile \ ! distclean-tags distclean-generic clean-am distclean: distclean-am -rm -f config.status maintainer-clean-am: maintainer-clean-hdr maintainer-clean-binPROGRAMS \ ! maintainer-clean-compile maintainer-clean-tags \ ! maintainer-clean-generic distclean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." --- 565,591 ---- maintainer-clean-generic: mostlyclean-am: mostlyclean-hdr mostlyclean-binPROGRAMS \ ! mostlyclean-compile mostlyclean-aminfo mostlyclean-tags \ mostlyclean-generic mostlyclean: mostlyclean-am ! clean-am: clean-hdr clean-binPROGRAMS clean-compile clean-aminfo \ ! clean-tags clean-generic mostlyclean-am clean: clean-am distclean-am: distclean-hdr distclean-binPROGRAMS distclean-compile \ ! distclean-aminfo distclean-tags distclean-generic \ ! clean-am distclean: distclean-am -rm -f config.status maintainer-clean-am: maintainer-clean-hdr maintainer-clean-binPROGRAMS \ ! maintainer-clean-compile maintainer-clean-aminfo \ ! maintainer-clean-tags maintainer-clean-generic \ ! distclean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." *************** maintainer-clean: maintainer-clean-am *** 411,424 **** mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \ maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \ mostlyclean-compile distclean-compile clean-compile \ ! maintainer-clean-compile tags mostlyclean-tags distclean-tags \ ! clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \ ! check-am installcheck-am installcheck all-recursive-am install-exec-am \ install-exec install-data-am install-data install-am install \ uninstall-am uninstall all-redirect all-am all installdirs \ mostlyclean-generic distclean-generic clean-generic \ maintainer-clean-generic clean mostlyclean distclean maintainer-clean # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. --- 596,630 ---- mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \ maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \ mostlyclean-compile distclean-compile clean-compile \ ! maintainer-clean-compile install-info-am uninstall-info \ ! mostlyclean-aminfo distclean-aminfo clean-aminfo \ ! maintainer-clean-aminfo install-man1 uninstall-man1 install-man \ ! uninstall-man tags mostlyclean-tags distclean-tags clean-tags \ ! maintainer-clean-tags distdir info-am info dvi-am dvi check check-am \ ! installcheck-am installcheck all-recursive-am install-exec-am \ install-exec install-data-am install-data install-am install \ uninstall-am uninstall all-redirect all-am all installdirs \ mostlyclean-generic distclean-generic clean-generic \ maintainer-clean-generic clean mostlyclean distclean maintainer-clean + fastjar.info: fastjar.texi $(fastjar_TEXINFOS) + @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9] + cd $(srcdir) \ + && $(MAKEINFO) $(my_makei_flags) `echo $< | sed 's,.*/,,'` + + $(srcdir)/jar.1: $(srcdir)/fastjar.texi + -$(TEXI2POD) -D jar < $(srcdir)/fastjar.texi > fastjar.pod + -($(POD2MAN) --section=1 fastjar.pod > jar.1.T$$$$ && \ + mv -f jar.1.T$$$$ $(srcdir)/jar.1) || \ + (rm -f jar.1.T$$$$ && exit 1) + -rm -f fastjar.pod + + $(srcdir)/grepjar.1: $(srcdir)/fastjar.texi + -$(TEXI2POD) -D grepjar < $(srcdir)/fastjar.texi > grepjar.pod + -($(POD2MAN) --section=1 grepjar.pod > grepjar.1.T$$$$ && \ + mv -f grepjar.1.T$$$$ $(srcdir)/grepjar.1) || \ + (rm -f grepjar.1.T$$$$ && exit 1) + -rm -f grepjar.pod # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nrc3pad gcc-3.2.3/gcc/java/boehm.c gcc-3.3/gcc/java/boehm.c *** gcc-3.2.3/gcc/java/boehm.c 2001-12-22 00:52:30.000000000 +0000 --- gcc-3.3/gcc/java/boehm.c 2002-03-29 21:46:26.000000000 +0000 *************** get_boehm_type_descriptor (tree type) *** 230,235 **** value = build_int_2 (2, 0); } ! TREE_TYPE (value) = type_for_mode (ptr_mode, 1); return value; } --- 230,235 ---- value = build_int_2 (2, 0); } ! TREE_TYPE (value) = java_type_for_mode (ptr_mode, 1); return value; } diff -Nrc3pad gcc-3.2.3/gcc/java/buffer.c gcc-3.3/gcc/java/buffer.c *** gcc-3.2.3/gcc/java/buffer.c 2001-04-04 00:46:27.000000000 +0000 --- gcc-3.3/gcc/java/buffer.c 2002-11-18 15:46:31.000000000 +0000 *************** buffer_grow (bufp, size) *** 37,50 **** { if (size < 120) size = 120; ! bufp->data = (unsigned char*) xmalloc (size); bufp->ptr = bufp->data; } else { int index = bufp->ptr - bufp->data; size += 2 * (bufp->limit - bufp->data); ! bufp->data = (unsigned char *) xrealloc (bufp->data, size); bufp->ptr = bufp->data + index; } bufp->limit = bufp->data + size; --- 37,50 ---- { if (size < 120) size = 120; ! bufp->data = xmalloc (size); bufp->ptr = bufp->data; } else { int index = bufp->ptr - bufp->data; size += 2 * (bufp->limit - bufp->data); ! bufp->data = xrealloc (bufp->data, size); bufp->ptr = bufp->data + index; } bufp->limit = bufp->data + size; diff -Nrc3pad gcc-3.2.3/gcc/java/builtins.c gcc-3.3/gcc/java/builtins.c *** gcc-3.2.3/gcc/java/builtins.c 2002-03-18 19:33:49.000000000 +0000 --- gcc-3.3/gcc/java/builtins.c 2003-03-04 14:37:22.000000000 +0000 *************** The Free Software Foundation is independ *** 30,36 **** #include "tree.h" #include "ggc.h" #include "flags.h" ! #include "java-tree.h" enum builtin_type --- 30,36 ---- #include "tree.h" #include "ggc.h" #include "flags.h" ! #include "langhooks.h" #include "java-tree.h" enum builtin_type *************** enum builtin_type *** 44,49 **** --- 44,50 ---- #define DEF_FUNCTION_TYPE_VAR_0(NAME, RETURN) NAME, #define DEF_FUNCTION_TYPE_VAR_1(NAME, RETURN, ARG1) NAME, #define DEF_FUNCTION_TYPE_VAR_2(NAME, RETURN, ARG1, ARG2) NAME, + #define DEF_FUNCTION_TYPE_VAR_3(NAME, RETURN, ARG1, ARG2, ARG3) NAME, #define DEF_POINTER_TYPE(NAME, TYPE) NAME, #include "builtin-types.def" #undef DEF_PRIMITIVE_TYPE *************** enum builtin_type *** 55,60 **** --- 56,62 ---- #undef DEF_FUNCTION_TYPE_VAR_0 #undef DEF_FUNCTION_TYPE_VAR_1 #undef DEF_FUNCTION_TYPE_VAR_2 + #undef DEF_FUNCTION_TYPE_VAR_3 #undef DEF_POINTER_TYPE BT_LAST }; *************** typedef tree builtin_creator_function PA *** 83,103 **** /* Hold a char*, before initialization, or a tree, after initialization. */ ! union string_or_tree { ! const char *s; ! tree t; }; /* Used to hold a single builtin record. */ ! struct builtin_record { ! union string_or_tree class_name; ! union string_or_tree method_name; ! builtin_creator_function *creator; }; ! static struct builtin_record java_builtins[] = { { { "java.lang.Math" }, { "min" }, min_builtin }, { { "java.lang.Math" }, { "max" }, max_builtin }, --- 85,105 ---- /* Hold a char*, before initialization, or a tree, after initialization. */ ! union string_or_tree GTY(()) { ! const char * GTY ((tag ("0"))) s; ! tree GTY ((tag ("1"))) t; }; /* Used to hold a single builtin record. */ ! struct builtin_record GTY(()) { ! union string_or_tree GTY ((desc ("1"))) class_name; ! union string_or_tree GTY ((desc ("1"))) method_name; ! builtin_creator_function * GTY((skip (""))) creator; }; ! static GTY(()) struct builtin_record java_builtins[] = { { { "java.lang.Math" }, { "min" }, min_builtin }, { { "java.lang.Math" }, { "max" }, max_builtin }, *************** initialize_builtins () *** 273,291 **** java_builtins[i].class_name.t = klass_id; java_builtins[i].method_name.t = m; - ggc_add_tree_root (&java_builtins[i].class_name.t, 1); - ggc_add_tree_root (&java_builtins[i].method_name.t, 1); } void_list_node = end_params_node; /* Work around C-specific junk in builtin-types.def. */ #define intmax_type_node NULL_TREE - #define traditional_ptr_type_node NULL_TREE - #define traditional_cptr_type_node NULL_TREE #define c_size_type_node NULL_TREE #define const_string_type_node NULL_TREE - #define traditional_len_type_node NULL_TREE #define va_list_ref_type_node NULL_TREE #define va_list_arg_type_node NULL_TREE #define flag_isoc99 0 --- 275,288 ---- *************** initialize_builtins () *** 307,325 **** #define DEF_FUNCTION_TYPE_4(ENUM, RETURN, ARG1, ARG2, ARG3, ARG4) \ builtin_types[(int) ENUM] \ = define_builtin_type (RETURN, ARG1, ARG2, ARG3, ARG4); ! #define DEF_FUNCTION_TYPE_VAR_0(ENUM, RETURN) \ builtin_types[(int) ENUM] = NULL_TREE; ! #define DEF_FUNCTION_TYPE_VAR_1(ENUM, RETURN, ARG1) \ builtin_types[(int) ENUM] = NULL_TREE; #define DEF_FUNCTION_TYPE_VAR_2(ENUM, RETURN, ARG1, ARG2) \ builtin_types[(int) ENUM] = NULL_TREE; #define DEF_POINTER_TYPE(ENUM, TYPE) \ builtin_types[(int) ENUM] = NULL_TREE; #include "builtin-types.def" #define DEF_BUILTIN(ENUM, NAME, CLASS, TYPE, LIBTYPE, BOTH_P, \ ! FALLBACK_P, NONANSI_P) \ define_builtin (ENUM, NAME, CLASS, builtin_types[TYPE], FALLBACK_P); #include "builtins.def" } --- 304,324 ---- #define DEF_FUNCTION_TYPE_4(ENUM, RETURN, ARG1, ARG2, ARG3, ARG4) \ builtin_types[(int) ENUM] \ = define_builtin_type (RETURN, ARG1, ARG2, ARG3, ARG4); ! #define DEF_FUNCTION_TYPE_VAR_0(ENUM, RETURN) \ builtin_types[(int) ENUM] = NULL_TREE; ! #define DEF_FUNCTION_TYPE_VAR_1(ENUM, RETURN, ARG1) \ builtin_types[(int) ENUM] = NULL_TREE; #define DEF_FUNCTION_TYPE_VAR_2(ENUM, RETURN, ARG1, ARG2) \ builtin_types[(int) ENUM] = NULL_TREE; + #define DEF_FUNCTION_TYPE_VAR_3(ENUM, RETURN, ARG1, ARG2, ARG3) \ + builtin_types[(int) ENUM] = NULL_TREE; #define DEF_POINTER_TYPE(ENUM, TYPE) \ builtin_types[(int) ENUM] = NULL_TREE; #include "builtin-types.def" #define DEF_BUILTIN(ENUM, NAME, CLASS, TYPE, LIBTYPE, BOTH_P, \ ! FALLBACK_P, NONANSI_P, ATTRS) \ define_builtin (ENUM, NAME, CLASS, builtin_types[TYPE], FALLBACK_P); #include "builtins.def" } *************** check_for_builtin (method, call) *** 351,353 **** --- 350,354 ---- } return call; } + + #include "gt-java-builtins.h" diff -Nrc3pad gcc-3.2.3/gcc/java/ChangeLog gcc-3.3/gcc/java/ChangeLog *** gcc-3.2.3/gcc/java/ChangeLog 2003-04-22 06:15:07.000000000 +0000 --- gcc-3.3/gcc/java/ChangeLog 2003-05-14 00:10:15.000000000 +0000 *************** *** 1,81 **** ! 2003-04-22 Release Manager ! * GCC 3.2.3 Released. ! 2003-03-17 Kaveh R. Ghazi ! Backport: ! 2002-12-05 Ranjit Mathew ! Andrew Haley ! * parse.y (source_end_java_method): Remove custom encoding of line ! numbers for a function decl before passing it to the back end. ! 2003-02-05 Gabriel Dos Reis ! * gcj.texi: Bump version. ! 2003-02-05 Release Manager ! * GCC 3.2.2 Released. ! 2003-01-28 Christian Cornelssen * Make-lang.in (java.install-common, java.uninstall) (java.install-info, java.install-man): Prepend $(DESTDIR) to destination paths in all (un)installation commands. ! 2002-11-19 Release Manager ! * GCC 3.2.1 Released. ! 2002-11-19 Release Manager ! * GCC 3.2.1 Released. ! 2002-11-18 Release Manager ! * GCC 3.2.1 Released. ! 2002-10-21 Matthias Klose ! * Backport, without whitespace change: ! 2002-06-10 Akim Demaille ! * parse.y (interface_type_list, class_member_declaration) ! (unary_expression_not_plus_minus): Remove duplicate %type. ! Whitespace changes. ! 2002-06-13 Akim Demaille ! * parse.y (class_declaration, interface_declaration): Make sure ! all their rules have an action, in order to avoid meaningless `$$ ! = $1' and their type clashes. ! * parse.y (catch_clause): Terminate with `;'. ! 2002-10-06 Roger Sayle PR optimization/6627 ! * java/lang.c (java_init): If storing the vbit in function pointers, ensure that force_align_functions_log is atleast one to aid compatability with g++ vtables. ! 2002-08-14 Release Manager ! * GCC 3.2 Released. 2002-08-04 Joseph S. Myers ! * gcj.texi (version-gcc): Increase to 3.2. ! 2002-07-25 Release Manager ! * GCC 3.1.1 Released. 2002-06-25 Andreas Schwab * expr.c (JSR): Avoid undefined operation on PC. 2002-06-10 Bryce McKinlay Don't use RTL inlining. Fix for PR java/6820. --- 1,737 ---- ! 2003-05-13 Release Manager ! * GCC 3.3 Released. ! 2003-05-13 Release Manager ! * GCC 3.3 Released. ! 2003-05-13 Release Manager ! * GCC 3.3 Released. ! 2003-05-02 Tom Tromey ! PR java/10459: ! * parse.y (finish_for_loop): Do nothing if update expression is a ! EXPR_WFL_NODE wrapping nothing. ! (java_complete_lhs) : Likewise. ! 2003-04-20 Mohan Embar ! * jcf-io.c (find_class): use DIR_SEPARATOR instead of ! '/' when computing java source filename ! ! 2003-04-10 Eric Blake ! ! PR java/10253: ! * parse.y (string_convert_int_cst): Always use at least one digit ! in string conversion. Remove ASCII dependence. ! (merge_string_cste): Fix merging of 3-byte UTF-8 characters. ! ! 2003-03-16 Mohan Embar ! ! * Make-lang.in: added win32-host.c ! * jcf.h: defined macro JCF_OPEN_EXACT_CASE which ! resolves to open() on non-Win32 platforms and ! Win32-specific jcf_open_exact_case() on Win32 ! * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE ! when trying .java and .class files ! * win32-host.c: added to repository. Defines ! Win32-specific jcf_open_exact_case() ! ! 2003-04-10 Andrew Haley ! ! * jcf-write.c (struct jcf_partial): num_jsrs: new field. ! (maybe_free_localvar): Renamed from localvar_free. ! Add new arg, really. ! (generate_bytecode_insns): Set new variable, jsrs. ! Only free local vars if no jsr insns have been emittted. ! Call maybe_free_localvar, not localvar_free. ! ! 2003-03-23 Zack Weinberg ! ! PR bootstrap/10216 ! * Make-lang.in: Link jcf-dump against $(LDEXP_LIB). ! ! 2003-03-30 Joseph S. Myers ! ! * gcj.texi: Remove @ at start of file. ! ! 2003-03-28 Zack Weinberg ! ! PR bootstrap/10216 ! * javaop.h (jfloat, jdouble): Make them structures mirroring ! the bit fields of IEEE float and double respectively. ! (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS, ! JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New. ! (union Word, union DWord): Delete. ! (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match. ! ! * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK, ! D_NAN_MASK): Delete. ! (jni_print_float, jni_print_double): New. Generate ! hexadecimal floating constants. ! (print_field_info): Use jni_print_float/double. ! ! * jcf-dump.c: Include math.h. Use ldexp/frexp to assemble ! finite floating point numbers for output; special case ! non-finite floats. ! ! 2003-03-12 Andrew Haley ! ! * gjavah.c (is_first_data_member): New global variable. ! (print_c_decl): If it's the first data member, align it as the ! superclass. ! (process_file): Set is_first_data_member. ! ! 2003-03-11 Tom Tromey ! ! * parse.y (resolve_field_access): Initialize class if field is ! found in another static field. ! * expr.c (build_class_init): Don't optimize out initialization of ! implemented interface. ! ! 2003-03-10 Ranjit Mathew ! ! * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR ! and DIR_SEPARATOR_2 for a target. ! Correct minor typos. ! ! * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR ! and DIR_SEPARATOR_2 for a target into account. ! ! 2003-03-05 Ranjit Mathew ! ! * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to ! compare file name components depending on the case-sensitivity ! or otherwise of the host file system. ! ! * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of ! "strcmp" to compare file name components. ! Use IS_DIR_SEPARATOR instead of comparing directly against ! DIR_SEPARATOR. ! (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of ! comparing directly against DIR_SEPARATOR. ! ! 2003-03-04 Roger Sayle ! ! * builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3. ! (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3. ! ! 2003-02-28 Tom Tromey ! ! PR java/9695: ! * class.c (maybe_layout_super_class): Always pass a WFL to ! do_resolve_class. ! * parse.y (do_resolve_class): Updated comment to explain ! parameters. ! ! 2003-02-12 Ranjit Mathew ! ! * decl.c (java_init_decl_processing): Change ! soft_lookupjnimethod_node to reflect the change in ! signature of _Jv_LookupJNIMethod in libjava/jni.cc ! * expr.c (build_jni_stub): Calculate and pass the size ! on the stack of the arguments to a JNI function. Use ! new target macro MODIFY_JNI_METHOD_CALL to allow a ! target to modify the call to a JNI method. ! ! 2003-02-04 Joseph S. Myers ! ! * gcj.texi: Update to GFDL 1.2. ! ! 2003-01-31 Andrew Haley ! ! * parse.y (java_expand_classes): Scan the whole class list looking ! for access methods that haven't yet been expanded. ! ! 2003-01-31 Adrian Bunk ! ! Fix for java/4269: ! ! * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO ! to fix bootstrap on sparc-unknown-netbsdelf1.5. ! * jcf-parse.c: Likewise. ! ! 2003-01-31 Mark Wielaard ! ! * gjavah.c (throwable_p): Allocate 1 more byte for string. ! ! 2003-01-30 Tom Tromey ! ! * jcf-parse.c (read_class): Update identifier's class value if it ! changed during parsing. ! ! 2003-01-29 Tom Tromey ! ! * parse.y (patch_assignment): Only transform the rhs of an ! assignment when compiling to native. ! ! 2003-01-28 Tom Tromey ! ! * lex.c (java_lex): Don't include UEOF as part of token. ! (java_read_unicode): Error if \u sequence prematurely terminated. ! ! 2003-01-27 Tom Tromey ! ! * parse.y (java_check_regular_methods): Check for construct after ! checking types in throws clause. ! ! 2003-01-26 Christian Cornelssen * Make-lang.in (java.install-common, java.uninstall) (java.install-info, java.install-man): Prepend $(DESTDIR) to destination paths in all (un)installation commands. + (java.install-common): Rewrite $(LN) command to support + DESTDIR with "ln" as well as with "ln -s". ! 2003-01-24 Kaveh R. Ghazi ! * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*. ! * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned ! warning. ! 2003-01-21 Tom Tromey ! * parse.y (method_header): Native method can't be strictfp. ! No method can be transient or volatile. ! 2003-01-14 Andrew Haley ! * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a ! varargs function -- correct. ! * parse.y (patch_assignment): Copy the rhs of an assignment into a ! temporary if the RHS is a reference. ! 2003-01-05 Kaveh R. Ghazi ! * lang.c (dump_compound_expr): Prototype. ! 2003-01-03 Tom Tromey ! Fix for PR java/8712: ! * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR, ! when simply checking against `null'. ! 2003-01-03 Tom Tromey ! ! * gcj.texi (Standard Properties): Document http.proxyHost and ! http.proxyPort. ! ! 2003-01-03 Tom Tromey ! ! * gcj.texi (GNU Classpath Properties): Document new properties. ! ! 2002-12-30 DJ Delorie ! ! * Make-lang.in: Protect against texi2pod/pod2man failing. ! ! 2002-12-28 Joseph S. Myers ! ! * gcj.texi: Use @copying. ! ! 2002-12-23 Joseph S. Myers ! ! * gcj.texi: Include Cover Texts in man page. ! ! 2002-12-23 Joseph S. Myers ! ! * gcj.texi: Include gcc-common.texi. ! * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on ! $(srcdir)/doc/include/gcc-common.texi. ! ! 2002-12-22 Anthony Green ! ! * gcj.texi (Limitations): Add note about org.xml.sax and ! org.w3c.dom. ! ! 2002-12-20 Tom Tromey ! ! * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case ! where minimum case value is Integer.MIN_VALUE. ! Fixes PR java/8955. ! ! 2002-12-18 Andrew Haley ! ! * parse.y (patch_invoke): Force evaluation order when `check' is ! set. For PR libgcj/8945. ! ! 2002-12-05 Ranjit Mathew ! Andrew Haley ! ! * parse.y (source_end_java_method): Remove custom encoding of line ! numbers for a function decl before passing it to the back end. ! ! 2002-12-03 Andrew Haley ! ! * class.c (make_class_data): New field, "chain". ! * decl.c (java_init_decl_processing): Likewise. ! ! 2002-12-02 Tom Tromey ! ! For PR java/8740: ! * parse.y (do_resolve_class): Handle qualified name via ! recursion. ! ! 2002-11-27 Kaveh R. Ghazi ! ! * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant. ! ! 2002-11-25 Diego Novillo ! ! * jcf-reader.c: Don't expand JCF_readu4 inside the ! expansion of JCF_SKIP. ! ! 2002-11-22 Tom Tromey ! ! * parse.y (patch_binop): Cast right hand side of shift expression ! to `int'. Fixes PR java/8676. ! ! 2002-11-22 Ranjit Mathew ! Andrew Haley ! ! * gcc/java/jcf-write.c (write_classfile): Remove target ! class file, if it exists, before renaming the temporary ! class file to it. ! ! 2002-11-19 Jason Thorpe ! ! * jvspec.c (lang_specific_spec_functions): New. ! ! 2002-11-18 Tom Tromey ! ! Fix for PR java/7912: ! * expr.c (can_widen_reference_to): Allow cast of array to ! Cloneable or Serializable. ! * java-tree.h (java_lang_cloneable_identifier_node): Declare. ! (java_io_serializable_identifier_node): Likewise. ! * parse.y (java_lang_cloneable, java_io_serializable): Removed. ! (valid_ref_assignconv_cast_p): Use new identifier nodes. ! * lex.c (java_init_lex): Don't initialize java_lang_cloneable and ! java_io_serializable. ! * decl.c (java_init_decl_processing): Initialize ! java_lang_cloneable_identifier_node and ! java_io_serializable_identifier_node. ! (java_lang_cloneable_identifier_node): New global. ! (java_io_serializable_identifier_node): Likewise. ! ! 2002-11-14 Jens-Michael Hoffmann ! ! * buffer.c: Remove unnecessary casts. ! * check-init.c: Likewise. ! * class.c: Likewise. ! * constants.c: Likewise. ! * decl.c: Likewise. ! * except.c: Likewise. ! * gjavah.c: Likewise. ! * jcf-io.c: Likewise. ! * jcf-parse.c: Likewise. ! * jcf-path.c: Likewise. ! * jvspec.c: Likewise. ! * lang.c: Likewise. ! * lex.c: Likewise. ! * verify.c: Likewise. ! ! 2002-11-06 Tom Tromey ! ! * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in ! a JNI header. ! ! 2002-11-05 Tom Tromey ! ! Fix for PR java/6388. ! * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while. ! * java-tree.h (enum java_tree_index): New values ! JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE. ! (decimal_int_max, decimal_long_max): New defines. ! * lex.c (yylex): Rewrote range checking. Sign extend literals. ! (error_if_numeric_overflow): Rewrote range checking. ! * decl.c (java_init_decl_processing): Initialize decimal_int_max, ! decimal_long_max. ! ! 2002-11-02 Tom Tromey ! ! * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE. ! ! * class.c (make_method_value): Put class name, not signature, into ! `throws' field. For PR java/8415. ! ! 2002-10-24 Tom Tromey ! ! * gcj.texi (Invoking gij): Document --showversion. ! (Standard Properties): java.library.path now set. ! ! 2002-10-23 Tom Tromey ! ! * gjavah.c (decode_signature_piece): In JNI mode, print ! `jobjectArray' when array depth is nonzero. ! Fixes PR java/8296. ! ! 2002-10-15 Andrew Haley ! ! * parse.y (patch_invoke): Call force_evaluation_order on a static ! arg list. ! (resolve_qualified_expression_name): Call force_evaluation_order ! on a arg list that is part of a Qualified Expression Name. ! ! * lang.c (dump_compound_expr): New. ! (java_dump_tree): New. ! ! 2002-10-20 Ranjit Mathew ! ! * gcj.texi: Added item describing the GCJ runtime property ! "gnu.gcj.progname". ! ! 2002-10-15 Richard Henderson ! ! * jcf-parse.c (get_constant): Fix type warning. ! ! 2002-10-15 Andrew Haley ! ! * java-tree.h (java_inlining_merge_static_initializers): Declare. ! (java_inlining_map_static_initializers): Declare. ! ! 2002-10-14 Andrew Haley ! ! * tree-inline.c (remap_block): All local class initialization ! flags go in the outermost scope. ! (expand_call_inline): Call java_inlining_map_static_initializers. ! (expand_call_inline): Call java_inlining_merge_static_initializers. ! * java/lang.c (merge_init_test_initialization): New. ! (java_inlining_merge_static_initializers): New. ! (inline_init_test_initialization): New. ! (java_inlining_map_static_initializers): New. ! ! 2002-10-11 Mark Wielaard ! ! * gcj.texi (Compatibility): Add Limitations and Extensions section. ! ! 2002-10-10 Kaveh R. Ghazi ! ! * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer. ! ! 2002-10-09 Kaveh R. Ghazi ! ! * parse.y (merge_string_cste): Add parentheses around & within |. ! ! 2002-10-08 Tom Tromey ! ! * parse.y (variable_declarator_id): Simplify error path for ! array declarator error. For PR java/8003. ! ! 2002-10-08 Zack Weinberg ! ! * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with ! bug_report_url. ! ! 2002-10-08 Andrew Haley ! ! * parse.y (attach_init_test_initialization_flags): Check for ! error_mark_node. ! ! 2002-10-07 Anthony Green ! ! * parse.y (merge_string_cste): Fix bug in string concatenation. ! ! 2002-10-03 Michael Koch ! ! * gcj.texi (Standard properties): ! Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit. ! ! 2002-10-02 Roger Sayle PR optimization/6627 ! * lang.c (java_init): If storing the vbit in function pointers, ensure that force_align_functions_log is atleast one to aid compatability with g++ vtables. ! 2002-10-01 Nathan Sidwell ! * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall ! foul of type-based aliasing. ! ! 2002-09-30 Anthony Green ! ! * gcj.texi (Invoking jv-scan): Fix texinfo. ! ! 2002-09-28 Anthony Green ! ! * gcj.texi (Invoking jv-scan): Add --no-assert documentation. ! (Code Generation): Add -fno-assert documentation. ! * jv-scan.c (flag_assert): New global. ! (options): Add assert option. ! (help): Add --no-assert documentation. ! * parse-scan.y (flag_assert): New global. ! * lang.c (lang_f_options): Add -fassert/-fno-assert support. ! (flag_assert): New global. ! * java-tree.h (flag_assert): New global. ! * lex.c (java_lex): Obey flag_assert. ! * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when ! calling cc1. ! ! 2002-09-26 Andrew Haley ! ! * expr.c (build_java_array_length_access): Check for null pointer. ! * expr.c (expand_java_arrayload): Likewise. ! ! 2002-09-21 Richard Henderson ! ! * jcf-parse.c (get_constant): Decode from IEEE no matter ! what the target format. ! ! 2002-09-20 Kazu Hirata ! ! * ChangeLog: Follow spelling conventions. ! * class.c: Likewise. ! * decl.c: Likewise. ! * expr.c: Likewise. ! * gjavah.c: Likewise. ! * java-tree.h: Likewise. ! * jcf-dump.c: Likewise. ! * jcf-parse.c: Likewise. ! * jvspec.c: Likewise. ! * lang.c: Likewise. ! * mangle.c: Likewise. ! * parse.y: Likewise. ! ! 2002-09-17 Tom Tromey ! ! * lex.c (java_read_unicode_collapsing_terminators): Handle case ! where \r appears at EOF. Fixes PR java/7950. ! ! 2002-09-16 Geoffrey Keating ! ! * java-tree.h (union lang_tree_node): Add chain_next option. ! ! 2002-09-16 Richard Henderson ! ! * jcf-parse.c (get_constant): Runtime check for IEEE format; ! use new real.h interface. ! * jcf-write.c (find_constant_index): Use new real.h interface. ! * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL. ! ! 2002-09-15 Kazu Hirata ! ! * lang.c: Follow spelling conventions. ! ! 2002-09-11 Per Bothner ! ! * parse.y (fold_constant_for_init): If a VAR_DECL, convert numerical ! constant to the type of the field. ! (java_complete_tree): Remove now-redundant code. ! ! * parse.y (fold_constant_for_init): 'null' is not a constant expr. ! ! 2002-09-03 Jesse Rosenstock ! ! For PR java/5794: ! * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the ! return label if a ret instruction for the jsr has been reached. ! ! 2002-09-09 Ranjit Mathew ! ! * parse.y (DIR_SEPARATOR): Don't define. ! (check_class_interface_creation): Use IS_DIR_SEPARATOR. ! ! 2002-08-28 Andrew Haley ! ! * verify.c (verify_jvm_instructions): Allow exception handler ! inside code that is being protected, but generate a warning. ! * except.c (link_handler): Initialize `expanded' in new eh_range. ! (binding_depth, is_class_level, current_pc): Declare extern. ! ! 2002-09-01 Mark Wielaard ! ! * gcj.texi: Add chapter about system properties. ! Fixed some typos. ! ! 2002-08-26 Tom Tromey ! ! * parse.y (try_builtin_assignconv): Allow narrowing primitive ! conversion if RHS_TYPE is byte, short, or char. ! ! 2002-08-22 Tom Tromey ! ! * gcj.texi (Invoking gij): Document -cp and -classpath. ! ! 2002-08-21 Tom Tromey ! ! * Make-lang.in (java/jcf-path.o): Use $(datadir), not ! $(prefix)/share. For PR libgcj/7633. ! ! For PR java/6005 and PR java/7611: ! * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define. ! (java_can_use_bit_fields_p): New function. ! ! 2002-08-16 Tom Tromey ! ! * gcj.texi (Class Initialization): Mention class initialization of ! arrays. ! ! 2002-07-30 Andrew Haley ! ! * Make-lang.in (java-tree-inline.o): New. ! (JAVA_OBJS): Add java-tree-inline.o. ! * parse.y (source_end_java_method): Call java_optimize_inline. ! (java_expand_method_bodies): Save method's tree in ! DECL_SAVED_TREE. ! (add_stmt_to_compound): Keep track of the number of statments. ! * lang.c (java_init): Enable flag_inline_trees. ! (java_post_options): If flag_inline_functions is on, enable ! flag_inline_trees instread. ! (decl_constant_value): New. ! (java_tree_inlining_walk_subtrees): New. ! * java-tree.h (DECL_NUM_STMTS): New macro. ! (java_optimize_inline): Declare. ! * expr.c (java_expand_expr): Allow a BLOCK to return a value. ! Handle a LABEL_EXPR. ! * decl.c (build_result_decl): If we already have a DECL_RESULT ! don't make another. ! (dump_function): New. ! (java_optimize_inline): New. ! (dump_function): New. ! ! 2002-08-13 Jesse Rosenstock ! ! For PR java/7483: ! * parse.y (build_assertion): Invert return from ! desiredAssertionStatus. ! ! 2002-08-08 Bryce McKinlay ! ! * jcf-write.c (get_access_flags): Return correct access flags for ! private and protected inner classes. ! ! 2002-08-08 Nathan Sidwell ! ! * java/Make-lang.in (java.mostlyclean): Remove coverage files. ! ! 2002-08-05 Geoffrey Keating ! ! * mangle_name.c: Don't include obstack.h twice. ! * xref.c: Don't include obstack.h. ! ! 2002-08-04 Geoffrey Keating ! ! * class.c: (permanent_obstack): Delete declaration. ! * constants.c: (permanent_obstack): Delete declaration. ! * except.c: (permanent_obstack): Delete declaration. ! * expr.c: (permanent_obstack): Delete declaration. ! * jcf-parse.c: (permanent_obstack): Delete declaration. ! (saveable_obstack): Delete declaration. ! * parse.h: (permanent_obstack): Delete declaration. ! * typeck.c: (permanent_obstack): Delete declaration. 2002-08-04 Joseph S. Myers ! * gcj.texi (version-gcc): Increase to 3.3. ! 2002-07-22 Tom Tromey ! * lex.c (java_lex): Check for `e' or `E' after 0. ! ! 2002-07-21 Richard Henderson ! ! * lang.c (java_unsafe_for_reeval): New. ! (LANG_HOOKS_UNSAFE_FOR_REEVAL): New. ! ! 2002-07-21 Neil Booth ! ! * jcf-path.c (GET_ENV_PATH_LIST): Remove. ! (jcf_path_init): Use GET_ENVIRONMENT. ! ! 2002-07-10 Roger Sayle ! Zack Weinberg ! ! * builtins.c (initialize_builtins): Remove defines that ! handled C/C++ specific junk hereby removed from builtins.def. ! ! 2002-07-07 Neil Booth ! ! * lang.c (java_post_options): Update prototype. ! ! 2002-07-05 Roger Sayle ! ! * builtins.c (initialize_builtins): Ignore the additional ! parameter to DEF_BUILTIN. Handle more C/C++ specific junk in ! the builtins.def file. ! ! 2002-07-01 Tom Tromey ! ! For PR libgcj/7073: ! * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE ! specially. ! ! 2002-07-01 Roger Sayle ! ! * java/decl.c (builtin_function): Accept additional parameter. ! (java_init_decl_processing): Pass an additional NULL_TREE ! argument to builtin_function. ! ! 2002-06-29 T.J. Mather ! ! * gcj.texi: Fixed gcj invocation example so that it compiles. ! ! 2002-06-26 Kaveh R. Ghazi ! ! * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11. ! * parse.y (mark_parser_ctxt): Likewise. ! (check_modifiers, declare_local_variables): Avoid incorrect ! hardcoded constant 10. ! ! * lex.c (java_read_char): Avoid "comparison is always true" ! warning. 2002-06-25 Andreas Schwab * expr.c (JSR): Avoid undefined operation on PC. + 2002-06-21 Kaveh R. Ghazi + + * decl.c (clear_binding_level): Const-ify. + + 2002-06-13 Akim Demaille + + * parse.y (class_declaration, interface_declaration): Make sure + all their rules have an action, in order to avoid meaningless `$$ + = $1' and their type clashes. + + 2002-06-11 Tom Tromey + + * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC. + * parse-scan.y (statement_without_trailing_substatement): Added + assert_statement. + (assert_statement): New rule. + * java-tree.h (struct lang_type) [assertions]: New field. + (TYPE_USES_ASSERTIONS): New macro. + (CLASS_USES_ASSERTIONS): Likewise. + (FIELD_SYNTHETIC): New define. + * lex.c (java_lval;): Added ASSERT_TK. + * parse.y (ASSERT_TK): Added. + (statement_without_trailing_substatement): Added assert_statement. + (assert_statement): New rule. + (build_assertion): New function. + (maybe_generate_pre_expand_clinit): Create and initialize + $assertionsDisabled. + (lookup_package_type): Removed decl. + * keyword.h: Rebuilt. + * keyword.gperf (assert): New token. + + 2002-06-10 Akim Demaille + + * parse.y (interface_type_list, class_member_declaration) + (unary_expression_not_plus_minus): Remove duplicate %type. + Whitespace changes. + + 2002-06-09 Tom Tromey + + * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H. + + * parse.y (method_header): Give error message in all cases. + Fixes PR java/6865. + 2002-06-10 Bryce McKinlay Don't use RTL inlining. Fix for PR java/6820. *************** *** 86,98 **** (java_post_options): New function. Turn off inlining unless flag_really_inline is set. 2002-06-08 H.J. Lu (hjl@gnu.org) * jcf-path.c (jcf_path_init): Allocate 1 more byte for string. ! 2002-06-03 Mark Mitchell ! 2002-05-18 Mark Mitchell * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition. * jcf-io.c (dirent.h): Include it. (fnmatch.h): Likewise. --- 742,895 ---- (java_post_options): New function. Turn off inlining unless flag_really_inline is set. + 2002-06-10 Bryce McKinlay + + * gjavah.c (throwable_p): Accept argument as either a classname or + signature fragment. Create null-terminated classname string for super + when calling itself recursively. + (decode_signature_piece): Skip first character from class name + signature when calling throwable_p. + 2002-06-08 H.J. Lu (hjl@gnu.org) * jcf-path.c (jcf_path_init): Allocate 1 more byte for string. ! 2002-06-04 Tom Tromey ! * jcf-write.c (perform_relocations): Optmize a goto to a goto. ! ! 2002-06-04 Michael Koch ! ! * gcj.texi (Input Options): Fixed typo. ! ! 2002-06-04 Zack Weinberg ! ! * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y, ! typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks, ! all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE, ! and all now-pointless local variables. Rename other local ! variables to reflect their not being handles. ! ! * java-tree.h, jcf-dump.c, jcf-io.c: Remove all ! #if JCF_USE_STDIO blocks. ! ! * parse.y: Add missing semicolon at end of rule. ! ! 2002-06-03 Geoffrey Keating ! ! * check-init.c (attach_initialized_static_class): Delete, unused. ! * parse.y: Use htab_t instead of struct hashtable, update ! all uses. ! * java-tree.h: Include hashtab.h instead of hash.h. ! (struct lang_decl_func): Use htab_t, set up for gengtype. ! (struct init_test_hash_entry): Delete. ! (struct treetreehash_entry): New. ! (java_treetreehash_find): New ! (java_treetreehash_new): New prototype. ! (java_treetreehash_create): New prototype. ! (java_mark_tree): Delete prototype. ! (java_hash_hash_tree_node): Delete prototype. ! (java_hash_compare_tree_node): Delete prototype. ! (attach_initialized_static_class): Delete prototype. ! * expr.c (build_class_init): Update to use java_treetreehash ! functions. ! (java_expand_expr): Update to use htab_t. ! (emit_init_test_initialization): Likewise. ! * decl.c (java_mark_tree): Delete. ! * class.c (init_test_hash_newfunc): Delete. ! (java_hash_hash_tree_node): Delete. ! (java_hash_compare_tree_node): Delete. ! (add_method_1): Update to use java_treetreehash functions. ! (JAVA_TREEHASHHASH_H): New macro. ! (java_treetreehash_hash): New function. ! (java_treetreehash_compare): New function. ! (java_treetreehash_find): New function. ! (java_treetreehash_new): New function. ! (java_treetreehash_create): New function. ! * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H. ! ! * Make-lang.in (java/parse.o): Depend on debug.h. ! * java-tree.h (struct lang_identifier): Use gengtype. ! (union lang_tree_node): New. ! (struct lang_decl_func): Use gengtype. ! (struct lang_decl_var): Likewise. ! (struct lang_decl): Likewise. ! * parse.y: Include debug.h. ! * lang.c (LANG_HOOKS_MARK_TREE): Delete. ! ! * lang.c (struct language_function): New dummy structure. ! ! * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set ! descriminator for DECL_LANG_SPECIFIC. ! (struct lang_decl_func): Rename from struct lang_decl. ! (enum lang_decl_desc): New. ! (struct lang_decl): Make it a union. Update all the accessor macros. ! (struct lang_type): Use gengtype. ! * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC. ! * decl.c (java_dup_lang_specific_decl): All lang_decl structures ! are now the same size. ! (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC; ! use discriminator to mark DECL_LANG_SPECIFIC. ! ! * Make-lang.in (gt-java-builtins.h): New rule. ! (java/builtins.o): Add dependency on gt-.h. ! * builtins.c: Use gengtype for roots. ! (union string_or_tree): Use gengtype. ! (struct builtin_record): Use gengtype. ! * config-lang.in (gtfiles): Add builtins.c. ! ! * Make-lang.in (gt-java-class.h, gt-java-constants.h, ! gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h, ! gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h, ! gt-java-parse.h, gtype-java.h): Add rules to generate. ! (parse.o): Add dependency on gt-java-parse.h, gt-java.h. ! (class.o): Add dependency on gt-*.h. ! (constants.o): Likewise. ! (decl.o): Likewise. ! (expr.o): Likewise. ! (jcf-parse.o): Likewise. ! (jcf-write.o): Likewise. ! (lang.o): Likewise. ! * config-lang.in (gtfiles): New. ! * class.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h. ! * constants.c: Replace uses of ggc_add_* with GTY markers. ! Include gt-*.h. ! * decl.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h. ! * expr.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h. ! * java-tree.h: Replace uses of ggc_add_* with GTY markers. ! * jcf-parse.c: Replace uses of ggc_add_* with GTY markers. ! Include gt-*.h. ! * jcf-write.c: Replace uses of ggc_add_* with GTY markers. ! Include gt-*.h. ! * lang.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h. ! * mangle.c: Replace uses of ggc_add_* with GTY markers. Include ! gt-*.h. ! * parse.y: Replace uses of ggc_add_* with GTY markers. Include gt-*.h. ! Include gtype-java.h. ! ! 2002-06-02 Tom Tromey ! ! Fix for PR java/5913: ! * parse.y (patch_binop): Call patch_string on op1. ! ! 2002-06-02 Tom Tromey ! ! Fix for PR java/1343, PR java/6336: ! * parse.y (make_nested_class_name): Remove extraneous `else'; fix ! formatting. Changed return type. ! (anonymous_class_counter): Moved to top of file. ! (maybe_make_nested_class_name): Append number to class name for ! function-local classes. ! ! 2002-05-28 Zack Weinberg ! ! * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h. ! * Make-lang.in: Update dependency lists. ! ! 2002-05-18 Mark Mitchell ! ! * gjavah.c (throwable_p): Do not free the name of the class after ! passing it to find_class. * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition. * jcf-io.c (dirent.h): Include it. (fnmatch.h): Likewise. *************** *** 109,131 **** * parse.y (java_expand_classes): Write the class files in reverse order. ! 2002-05-13 Mark Mitchell ! * jcf-write.c (write_classfile): Unlink the temporary file if it ! cannot be renamed. Use concat to build up the name of the ! temporary file. - 2002-05-13 Mark Mitchell * jcf-write.c (write_classfile): Unlink the temporary file if it cannot be renamed. Use concat to build up the name of the temporary file. ! 2002-05-14 Release Manager ! * GCC 3.1 Released. ! 2002-05-14 Release Manager ! * GCC 3.1 Released. 2002-04-24 Tom Tromey --- 906,970 ---- * parse.y (java_expand_classes): Write the class files in reverse order. ! 2002-05-16 Rainer Orth ! ! * Make-lang.in: Allow for PWDCMD to override hardcoded pwd. ! ! 2002-05-13 Mark Mitchell * jcf-write.c (write_classfile): Unlink the temporary file if it cannot be renamed. Use concat to build up the name of the temporary file. ! 2002-05-08 Mark Mitchell ! * jcf-write.c (write_classfile): Write the file to a ! temporary file and then rename it. ! 2002-05-07 Tom Tromey ! * gjavah.c (throwable_p): Use xstrdup, not strdup. ! ! Fix for PR java/1200: ! * gjavah.c (throwable_p): New function. ! (decode_signature_piece): Use it. A `WeakReference' isn't the ! same as a `jweak'. ! Include hashtab.h. ! (gcjh_streq): New function. ! ! 2002-05-07 Andreas Jaeger ! ! * parse.y (finish_for_loop): Fix if statement. ! ! 2002-05-06 Tom Tromey ! ! Fix for PR java/5941: ! * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for ! loop update expression. ! (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR. ! * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro. ! ! 2002-05-04 Mark Wielaard ! ! For PR java/6519: ! * parse.y (build_string_concatenation): Return just op1 only when op2 ! is null and op1 is a STRING_CST, otherwise always construct a ! StringBuffer. ! ! 2002-04-27 Tom Tromey ! ! For PR java/6382: ! * parse.y (string_convert_int_cst): New function. ! (merge_string_cste): Use it. ! ! 2002-04-25 Neil Booth ! ! * java-tree.h (java_parse_file): Update. ! (java_set_yydebug): Remove. ! * jcf-parse.c (yydebug): Remove. ! (java_set_yydebug): Die. ! (java_parse_file): Update. ! * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove. 2002-04-24 Tom Tromey *************** *** 139,149 **** * java-tree.h (BCODE_RETURN_TARGET): Removed - never set. (BCODE_TARGET): Remove BCODE_RETURN_TARGET. - Tue Apr 23 14:31:23 2002 Anthony Green - - * gcj.texi (Invoking rmiregistry): Fix rmiregistry command - synopsis. - 2002-04-23 Tom Tromey For PR java/6314: --- 978,983 ---- *************** Tue Apr 23 14:31:23 2002 Anthony Green *** 165,171 **** * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned HOST_WIDE_INT for num. Use JPOOL_UINT to get it. ! CONSTANT_Double: Use JPOOL_UINT to get both halves of a double. 2002-04-18 Bryce McKinlay --- 999,1009 ---- * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned HOST_WIDE_INT for num. Use JPOOL_UINT to get it. ! CONSTANT_Double: Use JPOOL_UINT to get both halve of a double. ! ! 2002-04-18 Neil Booth ! ! * typeck.c (incomplete_type_error): Remove. 2002-04-18 Bryce McKinlay *************** Tue Apr 23 14:31:23 2002 Anthony Green *** 250,260 **** * gcj.texi (Invocation): Document CNI invocation API. ! 2002-04-05 Nic Ferrier ! * gcj.texi: @code{gcj} becomes @command{gcj}. ! @code{gcc} becomes @command{gcc}. ! GcjRaw changed to gnu.gcc.RawData. 2002-03-29 Martin Kahlert --- 1088,1125 ---- * gcj.texi (Invocation): Document CNI invocation API. ! 2002-04-04 Neil Booth ! * expr.c (truthvalue_conversion): Rename. Update. ! (expand_compare): Update. ! * java-tree.h (java_truthvalue_conversion): New. ! * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. ! ! 2002-04-01 Neil Booth ! ! * java-tree.h (java_mark_addressable): New. ! * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine. ! * typeck.c (mark_addressable): Rename, update. ! ! 2002-04-01 Neil Booth ! ! * expr.c (build_java_binop): Update. ! * java-tree.h (java_signed_type, java_unsigned_type, ! java_signed_or_unsigned_type): Update. ! * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, ! LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New. ! * parse.y (patch_binop): Update. ! * typeck.c (signed_or_unsigned_type, unsigned_type, ! signed_type): Update. ! ! 2002-03-31 Neil Booth ! ! * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine. ! (java_dummy_print): Remove. ! (lang_print_error): Rename. Exit early if inhibiting output. ! (inhibit_error_printing_function): New. ! (java_init): Don't set hook. ! (lang_init_source): Use new boolean. 2002-03-29 Martin Kahlert *************** Tue Apr 23 14:31:23 2002 Anthony Green *** 265,270 **** --- 1130,1146 ---- * parse.y (check_inner_circular_reference): Ignore incomplete types. + 2002-03-29 Neil Booth + + * Make-lang.in (builtins.o): Update. + * boehm.c (get_boehm_type_descriptor): Update. + * builtins.c: Include langhooks.h. + * decl.c (java_init_decl_processing): Update. + * java-tree.h (java_type_for_mode, java_type_for_size): New. + * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE): + Redefine. + * typeck.c (type_for_mode, type_for_size): Update. + 2002-03-29 Martin Kahlert * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING. *************** Tue Apr 23 14:31:23 2002 Anthony Green *** 281,286 **** --- 1157,1166 ---- (read_class): Call it. (java_parse_file): Likewise. + Thu Mar 28 13:22:22 CET 2002 Jan Hubicka + + * java/lang.c (java_init_options): Set flag_trapping_math to 0. + 2002-03-28 Bryce McKinlay * parse.y (resolve_package): Initialize "decl". *************** Tue Apr 23 14:31:23 2002 Anthony Green *** 300,310 **** * expr.c (expand_invoke): Don't generate null pointer check if we're calling . 2002-03-27 Bryce McKinlay Fix for PR java/5850: * parse.y (lookup_field_wrapper): Call itself recursively for enclosing ! context if nothing was found in the current context. * expr.c (lookup_field): Don't look in enclosing contexts. 2002-03-26 Tom Tromey --- 1180,1198 ---- * expr.c (expand_invoke): Don't generate null pointer check if we're calling . + 2002-03-27 Neil Booth + + * expr.c (java_lang_expand_expr): Rename java_expand_expr, + fix prototype. + * java-tree.h (java_lang_expand_expr): Similarly. + * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine. + (java_init): Don't set hook. + 2002-03-27 Bryce McKinlay Fix for PR java/5850: * parse.y (lookup_field_wrapper): Call itself recursively for enclosing ! context if field was not found in the current scope. * expr.c (lookup_field): Don't look in enclosing contexts. 2002-03-26 Tom Tromey *************** Tue Apr 23 14:31:23 2002 Anthony Green *** 314,327 **** * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12 elements, not 11. 2002-03-22 Mark Wielaard Fix for PR java/5368: * parse.y (resolve_qualified_expression_name): Use decl not field_decl when printing error message. 2002-03-22 Tom Tromey ! Andrew Haley * expr.c (build_field_ref): Don't build a check if the field is a member of `this'. --- 1202,1232 ---- * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12 elements, not 11. + 2002-03-26 Neil Booth + + * decl.c (lang_mark_tree): Rename java_mark_tree. + * java-tree.h (java_mark_tree): New. + * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine. + + 2002-03-25 Zack Weinberg + + * lex.c: Change java_perform_atof to take normal parameters + instead of a pointer to a parameter block. Call it directly + from java_lex. + 2002-03-22 Mark Wielaard Fix for PR java/5368: * parse.y (resolve_qualified_expression_name): Use decl not field_decl when printing error message. + 2002-03-25 Neil Booth + + * decl.c (maybe_build_cleanup): Remove. + 2002-03-22 Tom Tromey ! ! Andrew Haley * expr.c (build_field_ref): Don't build a check if the field is a member of `this'. *************** Tue Apr 23 14:31:23 2002 Anthony Green *** 336,341 **** --- 1241,1263 ---- * parse.y (build_access_to_thisn): Stop when FROM is not an inner class. + 2002-03-21 Neil Booth + + * cp-tree.h (pushdecl, pushlevel, poplevel, set_block, + insert_block, getdecls, kept_level_p, global_bindings_p): New. + + 2002-03-20 Nic Ferrier + + * gcj.texi: @code{gcj} becomes @command{gcj}. + @code{gcc} becomes @command{gcc}. + GcjRaw changed to gnu.gcc.RawData. + + 2002-03-20 Neil Booth + + * decl.c (start_java_method): Use new hook. + * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine. + (java_init): Remove old hook. + 2002-03-18 Alexandre Petit-Bianco * builtins.c (define_builtin): Do nothing if `type' is null. *************** Tue Apr 23 14:31:23 2002 Anthony Green *** 350,355 **** --- 1272,1283 ---- * jcf-parse.c (get_constant): Delete unused variables. + 2002-03-17 Neil Booth + + * java-tree.h (java_parse_file): New. + * jcf-parse.c (yyparse): Rename java_parse_file. + * lang.c (LANG_HOOKS_PARSE_FILE): Redefine. + 2002-03-16 Bryce McKinlay * parse.y (craft_constructor): Return the constructor decl. *************** Tue Apr 23 14:31:23 2002 Anthony Green *** 362,374 **** * jcf-parse.c (yyparse): Don't emit class registration constructor when compiling resource files. 2002-03-12 Tom Tromey * jcf-parse.c (get_constant) [CONSTANT_String]: String values are UTF-8, not UCS-2. Fixes PR java/5923. - 2002-03-12 Tom Tromey - * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is a call_expr wrapped in a convert. Fixes PR java/5848. --- 1290,1308 ---- * jcf-parse.c (yyparse): Don't emit class registration constructor when compiling resource files. + 2002-03-12 Kaveh R. Ghazi + + * lang.c (java_tree_code_type, java_tree_code_length, + tree_code_name): Delete. + (tree_code_type, tree_code_length, tree_code_name): Define. + (java_init): Don't try to copy into the various tree_code + arrays. + 2002-03-12 Tom Tromey * jcf-parse.c (get_constant) [CONSTANT_String]: String values are UTF-8, not UCS-2. Fixes PR java/5923. * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is a call_expr wrapped in a convert. Fixes PR java/5848. *************** Tue Apr 23 14:31:23 2002 Anthony Green *** 412,423 **** --- 1346,1378 ---- Do the latter on if the return_pc has been verified (the jsr returns). (JSR): Now just call build_java_jsr. + 2002-03-07 Jeff Sturm + + * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define. + (java.install-common): Link native driver to + JAVA_TARGET_INSTALL_NAME. + 2002-03-05 David Billinghurst * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED * builtins.c(sin_builtin): Likewise * builtins.c(sqrt_builtin): Likewise + 2002-03-03 Zack Weinberg + + * java/expr.c, java/jcf-parse.c, java/lex.c: + Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef + REAL_ARITHMETIC blocks unconditional. Delete some further + #ifdef blocks predicated on REAL_ARITHMETIC. + + 2002-03-03 Kaveh R. Ghazi + + * class.c (init_class_processing): Use ARRAY_SIZE in lieu of + explicit sizeof/sizeof. + * decl.c (java_init_decl_processing): Likewise. + * jcf-parse.c (init_jcf_parse): Likewise. + * parse.y (init_src_parse): Likewise. + 2002-03-02 Per Bothner Make --CLASSPATH by a synonym for --classpath and -classpath. *************** Tue Apr 23 14:31:23 2002 Anthony Green *** 480,485 **** --- 1435,1452 ---- * jvspec.c: Don't pass store-check option to jvgenmain. * lang-options.h: Add help string for -fno-store-check. + 2002-02-28 Neil Booth + + * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl. + * java-tree.h (java_dup_lang_specific_decl): New. + * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine. + + 2002-02-27 Zack Weinberg + + * builtins.c, decl.c: Delete traditional-mode-related code + copied from the C front end but not used, or used only to + permit the compiler to link. + 2002-02-22 Tom Tromey Fix for PR java/2369: *************** Tue Oct 23 14:02:17 2001 Richard Kenner *** 2361,2367 **** (generate_classfile): Compute the attribute count, invoke `append_gcj_attribute'. * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source' ! turned into bit fields. New bit field `right_zip.' (JCF_ZERO): Set `right_zip' to zero. * lang-options.h (-fforce-classes-archive-check): Added flag. * lang.c (flag_force_classes_archive_check): New flag. --- 3328,3334 ---- (generate_classfile): Compute the attribute count, invoke `append_gcj_attribute'. * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source' ! turned into bit-fields. New bit-field `right_zip.' (JCF_ZERO): Set `right_zip' to zero. * lang-options.h (-fforce-classes-archive-check): Added flag. * lang.c (flag_force_classes_archive_check): New flag. *************** Fri Dec 24 00:25:29 1999 Alexandre Peti *** 6443,6450 **** * jcf.h (typedef struct JCF): Field `outofsynch' deleted. (jcf_out_of_synch): Prototype deleted. * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag', ! `deprecated' and `class_err': integer turned into bit fields. ! New bit fields `saved_data_ctx' and `saved_data'. Fixed comments. * parse.y (package_list): New global. (package_declaration:): Record newly parsed package name. (extra_ctxp_pushed_p): Static global deleted. --- 7410,7417 ---- * jcf.h (typedef struct JCF): Field `outofsynch' deleted. (jcf_out_of_synch): Prototype deleted. * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag', ! `deprecated' and `class_err': integer turned into bit-fields. ! New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments. * parse.y (package_list): New global. (package_declaration:): Record newly parsed package name. (extra_ctxp_pushed_p): Static global deleted. *************** Mon Apr 27 10:50:05 1998 Alexandre Peti *** 12419,12425 **** this_wfl. Call to parse_error_context uses this_wfl instead of relying on lookup_cl. (parser_check_super): Comment reflects function's new returned ! type (int). Function returns non zero value on error. (create_jdep_list, reverse_jdep_list, obtain_incomplete_type, register_incomplete_type, jdep_resolve_class): New functions to handle incomplete types in declarations. --- 13386,13392 ---- this_wfl. Call to parse_error_context uses this_wfl instead of relying on lookup_cl. (parser_check_super): Comment reflects function's new returned ! type (int). Function returns nonzero value on error. (create_jdep_list, reverse_jdep_list, obtain_incomplete_type, register_incomplete_type, jdep_resolve_class): New functions to handle incomplete types in declarations. diff -Nrc3pad gcc-3.2.3/gcc/java/check-init.c gcc-3.3/gcc/java/check-init.c *** gcc-3.2.3/gcc/java/check-init.c 2002-02-28 11:42:09.000000000 +0000 --- gcc-3.3/gcc/java/check-init.c 2002-11-18 15:46:31.000000000 +0000 *************** static tree get_variable_decl PARAMS ((t *** 108,114 **** static void final_assign_error PARAMS ((tree)); static void check_final_reassigned PARAMS ((tree, words)); ! #define ALLOC_WORDS(NUM) ((word*) xmalloc ((NUM) * sizeof (word))) #define FREE_WORDS(PTR) (free (PTR)) /* DECLARE_BUFFERS is used to allocate NUMBUFFER bit sets, each of --- 108,114 ---- static void final_assign_error PARAMS ((tree)); static void check_final_reassigned PARAMS ((tree, words)); ! #define ALLOC_WORDS(NUM) (xmalloc ((NUM) * sizeof (word))) #define FREE_WORDS(PTR) (free (PTR)) /* DECLARE_BUFFERS is used to allocate NUMBUFFER bit sets, each of *************** check_init (exp, before) *** 607,614 **** if (fndecl && METHOD_STATIC (fndecl) && (DECL_INITIAL (decl) == boolean_true_node || (index >= 0 && ASSIGNED_P (tmp, index)))) ! hash_lookup (&DECL_FUNCTION_INITIALIZED_CLASS_TABLE (fndecl), ! DECL_FUNCTION_INIT_TEST_CLASS(decl), TRUE, NULL); } DECL_BIT_INDEX (decl) = -1; } --- 607,616 ---- if (fndecl && METHOD_STATIC (fndecl) && (DECL_INITIAL (decl) == boolean_true_node || (index >= 0 && ASSIGNED_P (tmp, index)))) ! *(htab_find_slot ! (DECL_FUNCTION_INITIALIZED_CLASS_TABLE (fndecl), ! DECL_FUNCTION_INIT_TEST_CLASS (decl), INSERT)) = ! DECL_FUNCTION_INIT_TEST_CLASS (decl); } DECL_BIT_INDEX (decl) = -1; } *************** check_for_initialization (body, mdecl) *** 999,1025 **** start_current_locals = num_current_locals = 0; } - - /* Call for every element in DECL_FUNCTION_INITIALIZED_CLASS_TABLE of - a method to consider whether the type indirectly described by ENTRY - is definitly initialized and thus remembered as such. */ - - bool - attach_initialized_static_class (entry, ptr) - struct hash_entry *entry; - PTR ptr; - { - struct init_test_hash_entry *ite = (struct init_test_hash_entry *) entry; - tree fndecl = DECL_CONTEXT (ite->init_test_decl); - int index = DECL_BIT_INDEX (ite->init_test_decl); - - /* If the initializer flag has been definitly assigned (not taking - into account its first mandatory assignment which has been - already added but escaped analysis.) */ - if (fndecl && METHOD_STATIC (fndecl) - && (DECL_INITIAL (ite->init_test_decl) == boolean_true_node - || (index >= 0 && ASSIGNED_P (((word *) ptr), index)))) - hash_lookup (&DECL_FUNCTION_INITIALIZED_CLASS_TABLE (fndecl), - entry->key, TRUE, NULL); - return true; - } --- 1001,1003 ---- diff -Nrc3pad gcc-3.2.3/gcc/java/class.c gcc-3.3/gcc/java/class.c *** gcc-3.2.3/gcc/java/class.c 2002-04-17 23:20:43.000000000 +0000 --- gcc-3.3/gcc/java/class.c 2003-02-28 20:53:07.000000000 +0000 *************** *** 1,5 **** /* Functions related to building classes and their related objects. ! Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Functions related to building classes and their related objects. ! Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU CC. *************** static tree get_dispatch_table PARAMS (( *** 55,69 **** static void add_interface_do PARAMS ((tree, tree, int)); static tree maybe_layout_super_class PARAMS ((tree, tree)); static int assume_compiled PARAMS ((const char *)); - static struct hash_entry *init_test_hash_newfunc PARAMS ((struct hash_entry *, - struct hash_table *, - hash_table_key)); static tree build_method_symbols_entry PARAMS ((tree)); ! static rtx registerClass_libfunc; ! static rtx registerResource_libfunc; - extern struct obstack permanent_obstack; struct obstack temporary_obstack; /* The compiler generates different code depending on whether or not --- 55,65 ---- static void add_interface_do PARAMS ((tree, tree, int)); static tree maybe_layout_super_class PARAMS ((tree, tree)); static int assume_compiled PARAMS ((const char *)); static tree build_method_symbols_entry PARAMS ((tree)); ! static GTY(()) rtx registerClass_libfunc; ! static GTY(()) rtx registerResource_libfunc; struct obstack temporary_obstack; /* The compiler generates different code depending on whether or not *************** typedef struct assume_compiled_node_stru *** 79,85 **** /* The class or package name. */ const char *ident; ! /* Non-zero if this represents an exclusion. */ int excludep; /* Pointers to other nodes in the tree. */ --- 75,81 ---- /* The class or package name. */ const char *ident; ! /* Nonzero if this represents an exclusion. */ int excludep; /* Pointers to other nodes in the tree. */ *************** static assume_compiled_node *find_assume *** 95,102 **** static assume_compiled_node *assume_compiled_tree; ! static tree class_roots[5] ! = { NULL_TREE, NULL_TREE, NULL_TREE, NULL_TREE, NULL_TREE }; #define registered_class class_roots[0] #define fields_ident class_roots[1] /* get_identifier ("fields") */ #define info_ident class_roots[2] /* get_identifier ("info") */ --- 91,97 ---- static assume_compiled_node *assume_compiled_tree; ! static GTY(()) tree class_roots[5]; #define registered_class class_roots[0] #define fields_ident class_roots[1] /* get_identifier ("fields") */ #define info_ident class_roots[2] /* get_identifier ("info") */ *************** find_assume_compiled_node (node, ident) *** 146,152 **** } /* Add a new IDENT to the include/exclude tree. It's an exclusion ! if EXCLUDEP is non-zero. */ void add_assume_compiled (ident, excludep) --- 141,147 ---- } /* Add a new IDENT to the include/exclude tree. It's an exclusion ! if EXCLUDEP is nonzero. */ void add_assume_compiled (ident, excludep) *************** add_assume_compiled (ident, excludep) *** 155,161 **** { assume_compiled_node *parent; assume_compiled_node *node = ! (assume_compiled_node *) xmalloc (sizeof (assume_compiled_node)); node->ident = xstrdup (ident); node->excludep = excludep; --- 150,156 ---- { assume_compiled_node *parent; assume_compiled_node *node = ! xmalloc (sizeof (assume_compiled_node)); node->ident = xstrdup (ident); node->excludep = excludep; *************** add_assume_compiled (ident, excludep) *** 165,172 **** if (NULL == assume_compiled_tree) { ! assume_compiled_tree = ! (assume_compiled_node *) xmalloc (sizeof (assume_compiled_node)); assume_compiled_tree->ident = ""; assume_compiled_tree->excludep = 0; assume_compiled_tree->sibling = NULL; --- 160,166 ---- if (NULL == assume_compiled_tree) { ! assume_compiled_tree = xmalloc (sizeof (assume_compiled_node)); assume_compiled_tree->ident = ""; assume_compiled_tree->excludep = 0; assume_compiled_tree->sibling = NULL; *************** add_assume_compiled (ident, excludep) *** 197,203 **** parent->child = node; } ! /* Returns non-zero if IDENT is the name of a class that the compiler should assume has been compiled to FIXME */ static int --- 191,197 ---- parent->child = node; } ! /* Returns nonzero if IDENT is the name of a class that the compiler should assume has been compiled to FIXME */ static int *************** ident_subst (old_name, old_length, prefi *** 237,243 **** #ifdef __GNUC__ char buffer[i]; #else ! char *buffer = (char *)alloca (i); #endif strcpy (buffer, prefix); for (i = 0; i < old_length; i++) --- 231,237 ---- #ifdef __GNUC__ char buffer[i]; #else ! char *buffer = alloca (i); #endif strcpy (buffer, prefix); for (i = 0; i < old_length; i++) *************** make_class () *** 286,306 **** { tree type; type = make_node (RECORD_TYPE); - #ifdef JAVA_USE_HANDLES - tree field1 = build_decl (FIELD_DECL, get_identifier ("obj"), - build_pointer_type (type)); - tree field2 = build_decl (FIELD_DECL, get_identifier ("methods"), - methodtable_ptr_type); - tree handle_type = make_node (RECORD_TYPE); - TREE_CHAIN (field1) = field2; - TYPE_FIELDS (handle_type) = field1; - TYPE_BINFO (type) = make_tree_vec (7); - TYPE_BINFO (handle_type) = make_tree_vec (7); - BINFO_HANDLE (TYPE_BINFO (handle_type)) = type; - BINFO_HANDLE (TYPE_BINFO (type)) = handle_type; - #else TYPE_BINFO (type) = make_tree_vec (6); - #endif MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC (type); return type; --- 280,286 ---- *************** push_class (class_type, class_name) *** 357,371 **** DECL_ARTIFICIAL (decl) = 1; pushdecl_top_level (decl); - #ifdef JAVA_USE_HANDLES - { - tree handle_name = identifier_subst (class_name, - "Handle$", '.', '.', ""); - tree handle_decl = build_decl (TYPE_DECL, handle_name, - CLASS_TO_HANDLE_TYPE (class_type)); - pushdecl (handle_decl); - } - #endif return decl; } --- 337,342 ---- *************** build_java_method_type (fntype, this_cla *** 622,670 **** { if (access_flags & ACC_STATIC) return fntype; ! return build_method_type (CLASS_TO_HANDLE_TYPE (this_class), fntype); ! } ! ! static struct hash_entry * ! init_test_hash_newfunc (entry, table, string) ! struct hash_entry *entry; ! struct hash_table *table; ! hash_table_key string ATTRIBUTE_UNUSED; ! { ! struct init_test_hash_entry *ret = (struct init_test_hash_entry *) entry; ! if (ret == NULL) ! { ! ret = ((struct init_test_hash_entry *) ! hash_allocate (table, sizeof (struct init_test_hash_entry))); ! if (ret == NULL) ! return NULL; ! } ! ret->init_test_decl = 0; ! return (struct hash_entry *) ret; ! } ! ! /* Hash table helpers. Also reused in find_applicable_accessible_methods_list ! (parse.y). The hash of a tree node is its pointer value, comparison ! is direct. */ ! ! unsigned long ! java_hash_hash_tree_node (k) ! hash_table_key k; ! { ! return (long) k; ! } ! ! bool ! java_hash_compare_tree_node (k1, k2) ! hash_table_key k1; ! hash_table_key k2; ! { ! return ((tree) k1 == (tree) k2); } tree ! add_method_1 (handle_class, access_flags, name, function_type) ! tree handle_class; int access_flags; tree name; tree function_type; --- 593,604 ---- { if (access_flags & ACC_STATIC) return fntype; ! return build_method_type (this_class, fntype); } tree ! add_method_1 (this_class, access_flags, name, function_type) ! tree this_class; int access_flags; tree name; tree function_type; *************** add_method_1 (handle_class, access_flags *** 672,708 **** tree method_type, fndecl; method_type = build_java_method_type (function_type, ! handle_class, access_flags); fndecl = build_decl (FUNCTION_DECL, name, method_type); ! DECL_CONTEXT (fndecl) = handle_class; DECL_LANG_SPECIFIC (fndecl) ! = (struct lang_decl *) ggc_alloc_cleared (sizeof (struct lang_decl)); /* Initialize the static initializer test table. */ ! hash_table_init (&DECL_FUNCTION_INIT_TEST_TABLE (fndecl), ! init_test_hash_newfunc, java_hash_hash_tree_node, ! java_hash_compare_tree_node); /* Initialize the initialized (static) class table. */ if (access_flags & ACC_STATIC) ! hash_table_init (&DECL_FUNCTION_INITIALIZED_CLASS_TABLE (fndecl), ! init_test_hash_newfunc, java_hash_hash_tree_node, ! java_hash_compare_tree_node); /* Initialize the static method invocation compound list */ DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND (fndecl) = NULL_TREE; ! TREE_CHAIN (fndecl) = TYPE_METHODS (handle_class); ! TYPE_METHODS (handle_class) = fndecl; /* Notice that this is a finalizer and update the class type accordingly. This is used to optimize instance allocation. */ if (name == finalize_identifier_node && TREE_TYPE (function_type) == void_type_node && TREE_VALUE (TYPE_ARG_TYPES (function_type)) == void_type_node) ! HAS_FINALIZER_P (handle_class) = 1; if (access_flags & ACC_PUBLIC) METHOD_PUBLIC (fndecl) = 1; if (access_flags & ACC_PROTECTED) METHOD_PROTECTED (fndecl) = 1; --- 606,642 ---- tree method_type, fndecl; method_type = build_java_method_type (function_type, ! this_class, access_flags); fndecl = build_decl (FUNCTION_DECL, name, method_type); ! DECL_CONTEXT (fndecl) = this_class; DECL_LANG_SPECIFIC (fndecl) ! = ggc_alloc_cleared (sizeof (struct lang_decl)); ! DECL_LANG_SPECIFIC (fndecl)->desc = LANG_DECL_FUNC; /* Initialize the static initializer test table. */ ! ! DECL_FUNCTION_INIT_TEST_TABLE (fndecl) = ! java_treetreehash_create (10, 1); /* Initialize the initialized (static) class table. */ if (access_flags & ACC_STATIC) ! DECL_FUNCTION_INITIALIZED_CLASS_TABLE (fndecl) = ! htab_create_ggc (50, htab_hash_pointer, htab_eq_pointer, NULL); /* Initialize the static method invocation compound list */ DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND (fndecl) = NULL_TREE; ! TREE_CHAIN (fndecl) = TYPE_METHODS (this_class); ! TYPE_METHODS (this_class) = fndecl; /* Notice that this is a finalizer and update the class type accordingly. This is used to optimize instance allocation. */ if (name == finalize_identifier_node && TREE_TYPE (function_type) == void_type_node && TREE_VALUE (TYPE_ARG_TYPES (function_type)) == void_type_node) ! HAS_FINALIZER_P (this_class) = 1; if (access_flags & ACC_PUBLIC) METHOD_PUBLIC (fndecl) = 1; if (access_flags & ACC_PROTECTED) METHOD_PROTECTED (fndecl) = 1; *************** add_method (this_class, access_flags, na *** 735,741 **** tree name; tree method_sig; { - tree handle_class = CLASS_TO_HANDLE_TYPE (this_class); tree function_type, fndecl; const unsigned char *sig = (const unsigned char *) IDENTIFIER_POINTER (method_sig); --- 669,674 ---- *************** add_method (this_class, access_flags, na *** 744,750 **** fatal_error ("bad method signature"); function_type = get_type_from_signature (method_sig); ! fndecl = add_method_1 (handle_class, access_flags, name, function_type); set_java_signature (TREE_TYPE (fndecl), method_sig); return fndecl; } --- 677,683 ---- fatal_error ("bad method signature"); function_type = get_type_from_signature (method_sig); ! fndecl = add_method_1 (this_class, access_flags, name, function_type); set_java_signature (TREE_TYPE (fndecl), method_sig); return fndecl; } *************** make_method_value (mdecl) *** 1351,1357 **** iter != NULL_TREE; iter = TREE_CHAIN (iter)) { ! tree sig = build_java_signature (TREE_VALUE (iter)); tree utf8 = build_utf8_ref (unmangle_classname (IDENTIFIER_POINTER (sig), IDENTIFIER_LENGTH (sig))); --- 1284,1290 ---- iter != NULL_TREE; iter = TREE_CHAIN (iter)) { ! tree sig = DECL_NAME (TYPE_NAME (TREE_VALUE (iter))); tree utf8 = build_utf8_ref (unmangle_classname (IDENTIFIER_POINTER (sig), IDENTIFIER_LENGTH (sig))); *************** make_class_data (type) *** 1566,1572 **** fields_decl = NULL_TREE; /* Build Method array. */ ! for (method = TYPE_METHODS (CLASS_TO_HANDLE_TYPE (type)); method != NULL_TREE; method = TREE_CHAIN (method)) { tree init; --- 1499,1505 ---- fields_decl = NULL_TREE; /* Build Method array. */ ! for (method = TYPE_METHODS (type); method != NULL_TREE; method = TREE_CHAIN (method)) { tree init; *************** make_class_data (type) *** 1732,1737 **** --- 1665,1671 ---- PUSH_FIELD_VALUE (cons, "idt", null_pointer_node); PUSH_FIELD_VALUE (cons, "arrayclass", null_pointer_node); PUSH_FIELD_VALUE (cons, "protectionDomain", null_pointer_node); + PUSH_FIELD_VALUE (cons, "chain", null_pointer_node); FINISH_RECORD_CONSTRUCTOR (cons); *************** void *** 1748,1754 **** finish_class () { tree method; ! tree type_methods = TYPE_METHODS (CLASS_TO_HANDLE_TYPE (current_class)); int saw_native_method = 0; /* Find out if we have any native methods. We use this information --- 1682,1688 ---- finish_class () { tree method; ! tree type_methods = TYPE_METHODS (current_class); int saw_native_method = 0; /* Find out if we have any native methods. We use this information *************** maybe_layout_super_class (super_class, t *** 1932,1939 **** super_class = TREE_TYPE (super_class); else { super_class = do_resolve_class (NULL_TREE, /* FIXME? */ ! super_class, NULL_TREE, this_class); if (!super_class) return NULL_TREE; /* FIXME, NULL_TREE not checked by caller. */ super_class = TREE_TYPE (super_class); --- 1866,1884 ---- super_class = TREE_TYPE (super_class); else { + /* do_resolve_class expects an EXPR_WITH_FILE_LOCATION, so + we give it one. */ + tree this_wrap = NULL_TREE; + + if (this_class) + { + tree this_decl = TYPE_NAME (this_class); + this_wrap = build_expr_wfl (this_class, + DECL_SOURCE_FILE (this_decl), + DECL_SOURCE_LINE (this_decl), 0); + } super_class = do_resolve_class (NULL_TREE, /* FIXME? */ ! super_class, NULL_TREE, this_wrap); if (!super_class) return NULL_TREE; /* FIXME, NULL_TREE not checked by caller. */ super_class = TREE_TYPE (super_class); *************** layout_class_methods (this_class) *** 2054,2066 **** tree this_class; { tree method_decl, dtable_count; ! tree super_class, handle_type; if (TYPE_NVIRTUALS (this_class)) return; super_class = CLASSTYPE_SUPER (this_class); - handle_type = CLASS_TO_HANDLE_TYPE (this_class); if (super_class) { --- 1999,2010 ---- tree this_class; { tree method_decl, dtable_count; ! tree super_class; if (TYPE_NVIRTUALS (this_class)) return; super_class = CLASSTYPE_SUPER (this_class); if (super_class) { *************** layout_class_methods (this_class) *** 2072,2089 **** else dtable_count = integer_zero_node; ! TYPE_METHODS (handle_type) = nreverse (TYPE_METHODS (handle_type)); ! for (method_decl = TYPE_METHODS (handle_type); method_decl; method_decl = TREE_CHAIN (method_decl)) dtable_count = layout_class_method (this_class, super_class, method_decl, dtable_count); TYPE_NVIRTUALS (this_class) = dtable_count; - - #ifdef JAVA_USE_HANDLES - layout_type (handle_type); - #endif } /* Return 0 if NAME is equal to STR, -1 if STR is "less" than NAME, --- 2016,2029 ---- else dtable_count = integer_zero_node; ! TYPE_METHODS (this_class) = nreverse (TYPE_METHODS (this_class)); ! for (method_decl = TYPE_METHODS (this_class); method_decl; method_decl = TREE_CHAIN (method_decl)) dtable_count = layout_class_method (this_class, super_class, method_decl, dtable_count); TYPE_NVIRTUALS (this_class) = dtable_count; } /* Return 0 if NAME is equal to STR, -1 if STR is "less" than NAME, *************** emit_offset_symbol_table () *** 2327,2338 **** void init_class_processing () { ! registerClass_libfunc = gen_rtx (SYMBOL_REF, Pmode, "_Jv_RegisterClass"); registerResource_libfunc = ! gen_rtx (SYMBOL_REF, Pmode, "_Jv_RegisterResource"); ! ggc_add_tree_root (class_roots, sizeof (class_roots) / sizeof (tree)); fields_ident = get_identifier ("fields"); info_ident = get_identifier ("info"); - ggc_add_rtx_root (®isterClass_libfunc, 1); gcc_obstack_init (&temporary_obstack); } --- 2267,2351 ---- void init_class_processing () { ! registerClass_libfunc = gen_rtx_SYMBOL_REF (Pmode, "_Jv_RegisterClass"); registerResource_libfunc = ! gen_rtx_SYMBOL_REF (Pmode, "_Jv_RegisterResource"); fields_ident = get_identifier ("fields"); info_ident = get_identifier ("info"); gcc_obstack_init (&temporary_obstack); } + + static hashval_t java_treetreehash_hash PARAMS ((const void *)); + static int java_treetreehash_compare PARAMS ((const void *, const void *)); + + /* A hash table mapping trees to trees. Used generally. */ + + #define JAVA_TREEHASHHASH_H(t) (htab_hash_pointer (t)) + + static hashval_t + java_treetreehash_hash (k_p) + const void *k_p; + { + struct treetreehash_entry *k = (struct treetreehash_entry *) k_p; + return JAVA_TREEHASHHASH_H (k->key); + } + + static int + java_treetreehash_compare (k1_p, k2_p) + const void * k1_p; + const void * k2_p; + { + struct treetreehash_entry * k1 = (struct treetreehash_entry *) k1_p; + tree k2 = (tree) k2_p; + return (k1->key == k2); + } + + tree + java_treetreehash_find (ht, t) + htab_t ht; + tree t; + { + struct treetreehash_entry *e; + hashval_t hv = JAVA_TREEHASHHASH_H (t); + e = (struct treetreehash_entry *) htab_find_with_hash (ht, t, hv); + if (e == NULL) + return NULL; + else + return e->value; + } + + tree * + java_treetreehash_new (ht, t) + htab_t ht; + tree t; + { + PTR *e; + struct treetreehash_entry *tthe; + hashval_t hv = JAVA_TREEHASHHASH_H (t); + + e = htab_find_slot_with_hash (ht, t, hv, INSERT); + if (*e == NULL) + { + tthe = (*ht->alloc_f) (1, sizeof (*tthe)); + tthe->key = t; + *e = (PTR) tthe; + } + else + tthe = (struct treetreehash_entry *) *e; + return &tthe->value; + } + + htab_t + java_treetreehash_create (size, gc) + size_t size; + int gc; + { + if (gc) + return htab_create_ggc (size, java_treetreehash_hash, + java_treetreehash_compare, NULL); + else + return htab_create_alloc (size, java_treetreehash_hash, + java_treetreehash_compare, free, xcalloc, free); + } + + #include "gt-java-class.h" diff -Nrc3pad gcc-3.2.3/gcc/java/config-lang.in gcc-3.3/gcc/java/config-lang.in *** gcc-3.2.3/gcc/java/config-lang.in 2001-12-20 00:20:47.000000000 +0000 --- gcc-3.3/gcc/java/config-lang.in 2002-06-04 07:10:47.000000000 +0000 *************** compilers="jc1\$(exeext) jvgenmain\$(exe *** 36,41 **** --- 36,43 ---- stagestuff="jc1\$(exeext) gcj\$(exeext) jvgenmain\$(exeext) gcjh\$(exeext) jv-scan\$(exeext) jcf-dump\$(exeext)" + gtfiles="\$(srcdir)/java/java-tree.h \$(srcdir)/java/builtins.c \$(srcdir)/java/class.c \$(srcdir)/java/constants.c \$(srcdir)/java/decl.c \$(srcdir)/java/expr.c \$(srcdir)/java/jcf-parse.c \$(srcdir)/java/jcf-write.c \$(srcdir)/java/lang.c \$(srcdir)/java/mangle.c \$(srcdir)/java/parse.y" + target_libs=${libgcj_saved} lang_dirs="zlib fastjar" #build_by_default=no diff -Nrc3pad gcc-3.2.3/gcc/java/constants.c gcc-3.3/gcc/java/constants.c *** gcc-3.2.3/gcc/java/constants.c 2001-04-26 18:32:22.000000000 +0000 --- gcc-3.3/gcc/java/constants.c 2002-11-18 15:46:32.000000000 +0000 *************** The Free Software Foundation is independ *** 29,36 **** #include "toplev.h" #include "ggc.h" - extern struct obstack permanent_obstack; - static void set_constant_entry PARAMS ((CPool *, int, int, jword)); static int find_class_or_string_constant PARAMS ((CPool *, int, tree)); static int find_name_and_type_constant PARAMS ((CPool *, tree, tree)); --- 29,34 ---- *************** set_constant_entry (cpool, index, tag, v *** 49,56 **** if (cpool->data == NULL) { cpool->capacity = 100; ! cpool->tags = (uint8*) xmalloc (sizeof(uint8) * cpool->capacity); ! cpool->data = (jword*) xmalloc (sizeof(jword) * cpool->capacity); cpool->count = 1; } if (index >= cpool->capacity) --- 47,54 ---- if (cpool->data == NULL) { cpool->capacity = 100; ! cpool->tags = xmalloc (sizeof(uint8) * cpool->capacity); ! cpool->data = xmalloc (sizeof(jword) * cpool->capacity); cpool->count = 1; } if (index >= cpool->capacity) *************** set_constant_entry (cpool, index, tag, v *** 58,67 **** cpool->capacity *= 2; if (index >= cpool->capacity) cpool->capacity = index + 10; ! cpool->tags = (uint8*) xrealloc (cpool->tags, ! sizeof(uint8) * cpool->capacity); ! cpool->data = (jword*) xrealloc (cpool->data, ! sizeof(jword) * cpool->capacity); } if (index >= cpool->count) cpool->count = index + 1; --- 56,63 ---- cpool->capacity *= 2; if (index >= cpool->capacity) cpool->capacity = index + 10; ! cpool->tags = xrealloc (cpool->tags, sizeof(uint8) * cpool->capacity); ! cpool->data = xrealloc (cpool->data, sizeof(jword) * cpool->capacity); } if (index >= cpool->count) cpool->count = index + 1; *************** write_constant_pool (cpool, buffer, leng *** 326,345 **** CPool *outgoing_cpool; static tree get_tag_node (tag) int tag; { /* A Cache for build_int_2 (CONSTANT_XXX, 0). */ - static tree tag_nodes[13]; - static int initialized_p; - - /* Register the TAG_NODES with the garbage collector. */ - if (!initialized_p) - { - ggc_add_tree_root (tag_nodes, 13); - initialized_p = 1; - } if (tag_nodes[tag] == NULL_TREE) tag_nodes[tag] = build_int_2 (tag, 0); --- 322,333 ---- CPool *outgoing_cpool; + static GTY(()) tree tag_nodes[13]; static tree get_tag_node (tag) int tag; { /* A Cache for build_int_2 (CONSTANT_XXX, 0). */ if (tag_nodes[tag] == NULL_TREE) tag_nodes[tag] = build_int_2 (tag, 0); *************** build_constants_constructor () *** 492,494 **** --- 480,484 ---- FINISH_RECORD_CONSTRUCTOR (cons); return cons; } + + #include "gt-java-constants.h" diff -Nrc3pad gcc-3.2.3/gcc/java/decl.c gcc-3.3/gcc/java/decl.c *** gcc-3.2.3/gcc/java/decl.c 2002-04-17 23:20:43.000000000 +0000 --- gcc-3.3/gcc/java/decl.c 2003-02-12 23:38:02.000000000 +0000 *************** *** 1,6 **** /* Process declarations and variables for the GNU compiler for the Java(TM) language. ! Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,6 ---- /* Process declarations and variables for the GNU compiler for the Java(TM) language. ! Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** The Free Software Foundation is independ *** 30,35 **** --- 30,36 ---- #include "system.h" #include "tree.h" #include "rtl.h" + #include "real.h" #include "toplev.h" #include "flags.h" #include "java-tree.h" *************** The Free Software Foundation is independ *** 40,48 **** #include "except.h" #include "java-except.h" #include "ggc.h" #if defined (DEBUG_JAVA_BINDING_LEVELS) ! extern void indent PROTO((void)); #endif static tree push_jvm_slot PARAMS ((int, tree)); --- 41,51 ---- #include "except.h" #include "java-except.h" #include "ggc.h" + #include "timevar.h" + #include "tree-inline.h" #if defined (DEBUG_JAVA_BINDING_LEVELS) ! extern void indent PARAMS ((void)); #endif static tree push_jvm_slot PARAMS ((int, tree)); *************** static struct binding_level *make_bindin *** 52,59 **** static tree create_primitive_vtable PARAMS ((const char *)); static tree check_local_named_variable PARAMS ((tree, tree, int, int *)); static tree check_local_unnamed_variable PARAMS ((tree, tree, tree)); ! /* Set to non-zero value in order to emit class initilization code before static field references. */ extern int always_initialize_class_p; --- 55,69 ---- static tree create_primitive_vtable PARAMS ((const char *)); static tree check_local_named_variable PARAMS ((tree, tree, int, int *)); static tree check_local_unnamed_variable PARAMS ((tree, tree, tree)); + static void dump_function PARAMS ((enum tree_dump_index, tree)); ! /* Name of the Cloneable class. */ ! tree java_lang_cloneable_identifier_node; ! ! /* Name of the Serializable class. */ ! tree java_io_serializable_identifier_node; ! ! /* Set to nonzero value in order to emit class initilization code before static field references. */ extern int always_initialize_class_p; *************** extern int always_initialize_class_p; *** 65,76 **** DECL_LOCAL_SLOT_CHAIN; the index finds the TREE_VEC element, and then we search the chain for a decl with a matching TREE_TYPE. */ ! tree decl_map; /* A list of local variables VAR_DECLs for this method that we have seen debug information, but we have not reached their starting (byte) PC yet. */ ! static tree pending_local_decls = NULL_TREE; /* Push a local variable or stack slot into the decl_map, and assign it an rtl. */ --- 75,86 ---- DECL_LOCAL_SLOT_CHAIN; the index finds the TREE_VEC element, and then we search the chain for a decl with a matching TREE_TYPE. */ ! static GTY(()) tree decl_map; /* A list of local variables VAR_DECLs for this method that we have seen debug information, but we have not reached their starting (byte) PC yet. */ ! static GTY(()) tree pending_local_decls; /* Push a local variable or stack slot into the decl_map, and assign it an rtl. */ *************** static struct binding_level *global_bind *** 307,313 **** /* Binding level structures are initialized by copying this one. */ ! static struct binding_level clear_binding_level = {NULL_TREE, NULL_TREE, NULL_TREE, NULL_TREE, NULL_BINDING_LEVEL, LARGEST_PC, 0}; --- 317,323 ---- /* Binding level structures are initialized by copying this one. */ ! static const struct binding_level clear_binding_level = {NULL_TREE, NULL_TREE, NULL_TREE, NULL_TREE, NULL_BINDING_LEVEL, LARGEST_PC, 0}; *************** static tree named_labels; *** 323,330 **** static tree shadowed_labels; #endif - int flag_traditional; - tree java_global_trees[JTI_MAX]; /* Build (and pushdecl) a "promoted type" for all standard --- 333,338 ---- *************** push_promoted_type (name, actual_type) *** 359,373 **** See tree.h for its possible values. If LIBRARY_NAME is nonzero, use that for DECL_ASSEMBLER_NAME, ! the name to be called if we can't opencode the function. */ tree ! builtin_function (name, type, function_code, class, library_name) const char *name; tree type; int function_code; enum built_in_class class; const char *library_name; { tree decl = build_decl (FUNCTION_DECL, get_identifier (name), type); DECL_EXTERNAL (decl) = 1; --- 367,383 ---- See tree.h for its possible values. If LIBRARY_NAME is nonzero, use that for DECL_ASSEMBLER_NAME, ! the name to be called if we can't opencode the function. If ! ATTRS is nonzero, use that for the function's attribute list. */ tree ! builtin_function (name, type, function_code, class, library_name, attrs) const char *name; tree type; int function_code; enum built_in_class class; const char *library_name; + tree attrs ATTRIBUTE_UNUSED; { tree decl = build_decl (FUNCTION_DECL, get_identifier (name), type); DECL_EXTERNAL (decl) = 1; *************** java_init_decl_processing () *** 443,455 **** set_sizetype (make_unsigned_type (POINTER_SIZE)); /* Define these next since types below may used them. */ ! integer_type_node = type_for_size (INT_TYPE_SIZE, 0); integer_zero_node = build_int_2 (0, 0); integer_one_node = build_int_2 (1, 0); integer_two_node = build_int_2 (2, 0); integer_four_node = build_int_2 (4, 0); integer_minus_one_node = build_int_2 (-1, -1); size_zero_node = size_int (0); size_one_node = size_int (1); bitsize_zero_node = bitsize_int (0); --- 453,479 ---- set_sizetype (make_unsigned_type (POINTER_SIZE)); /* Define these next since types below may used them. */ ! integer_type_node = java_type_for_size (INT_TYPE_SIZE, 0); integer_zero_node = build_int_2 (0, 0); integer_one_node = build_int_2 (1, 0); integer_two_node = build_int_2 (2, 0); integer_four_node = build_int_2 (4, 0); integer_minus_one_node = build_int_2 (-1, -1); + /* A few values used for range checking in the lexer. */ + decimal_int_max = build_int_2 (0x80000000, 0); + TREE_TYPE (decimal_int_max) = unsigned_int_type_node; + #if HOST_BITS_PER_WIDE_INT == 64 + decimal_long_max = build_int_2 (0x8000000000000000LL, 0); + #else + #if HOST_BITS_PER_WIDE_INT == 32 + decimal_long_max = build_int_2 (0, 0x80000000); + #else + #error "unsupported size" + #endif + #endif + TREE_TYPE (decimal_long_max) = unsigned_long_type_node; + size_zero_node = size_int (0); size_one_node = size_int (1); bitsize_zero_node = bitsize_int (0); *************** java_init_decl_processing () *** 583,588 **** --- 607,616 ---- access0_identifier_node = get_identifier ("access$0"); classdollar_identifier_node = get_identifier ("class$"); + java_lang_cloneable_identifier_node = get_identifier ("java.lang.Cloneable"); + java_io_serializable_identifier_node = + get_identifier ("java.io.Serializable"); + /* for lack of a better place to put this stub call */ init_expr_processing(); *************** java_init_decl_processing () *** 607,612 **** --- 635,641 ---- one_elt_array_domain_type = build_index_type (integer_one_node); otable_type = build_array_type (integer_type_node, one_elt_array_domain_type); + TYPE_NONALIASED_COMPONENT (otable_type) = 1; otable_ptr_type = build_pointer_type (otable_type); method_symbol_type = make_node (RECORD_TYPE); *************** java_init_decl_processing () *** 679,684 **** --- 708,714 ---- PUSH_FIELD (class_type_node, field, "idt", ptr_type_node); PUSH_FIELD (class_type_node, field, "arrayclass", ptr_type_node); PUSH_FIELD (class_type_node, field, "protectionDomain", ptr_type_node); + PUSH_FIELD (class_type_node, field, "chain", ptr_type_node); for (t = TYPE_FIELDS (class_type_node); t != NULL_TREE; t = TREE_CHAIN (t)) FIELD_PRIVATE (t) = 1; push_super_field (class_type_node, object_type_node); *************** java_init_decl_processing () *** 750,788 **** tree_cons (NULL_TREE, int_type_node, endlink)); alloc_object_node = builtin_function ("_Jv_AllocObject", build_function_type (ptr_type_node, t), ! 0, NOT_BUILT_IN, NULL); DECL_IS_MALLOC (alloc_object_node) = 1; alloc_no_finalizer_node = builtin_function ("_Jv_AllocObjectNoFinalizer", build_function_type (ptr_type_node, t), ! 0, NOT_BUILT_IN, NULL); DECL_IS_MALLOC (alloc_no_finalizer_node) = 1; t = tree_cons (NULL_TREE, ptr_type_node, endlink); soft_initclass_node = builtin_function ("_Jv_InitClass", build_function_type (void_type_node, t), ! 0, NOT_BUILT_IN, NULL); throw_node = builtin_function ("_Jv_Throw", build_function_type (ptr_type_node, t), ! 0, NOT_BUILT_IN, NULL); /* Mark throw_nodes as `noreturn' functions with side effects. */ TREE_THIS_VOLATILE (throw_node) = 1; TREE_SIDE_EFFECTS (throw_node) = 1; t = build_function_type (int_type_node, endlink); soft_monitorenter_node ! = builtin_function ("_Jv_MonitorEnter", t, 0, NOT_BUILT_IN, NULL); soft_monitorexit_node ! = builtin_function ("_Jv_MonitorExit", t, 0, NOT_BUILT_IN, NULL); t = tree_cons (NULL_TREE, int_type_node, tree_cons (NULL_TREE, int_type_node, endlink)); soft_newarray_node = builtin_function ("_Jv_NewPrimArray", build_function_type(ptr_type_node, t), ! 0, NOT_BUILT_IN, NULL); DECL_IS_MALLOC (soft_newarray_node) = 1; t = tree_cons (NULL_TREE, int_type_node, --- 780,820 ---- tree_cons (NULL_TREE, int_type_node, endlink)); alloc_object_node = builtin_function ("_Jv_AllocObject", build_function_type (ptr_type_node, t), ! 0, NOT_BUILT_IN, NULL, NULL_TREE); DECL_IS_MALLOC (alloc_object_node) = 1; alloc_no_finalizer_node = builtin_function ("_Jv_AllocObjectNoFinalizer", build_function_type (ptr_type_node, t), ! 0, NOT_BUILT_IN, NULL, NULL_TREE); DECL_IS_MALLOC (alloc_no_finalizer_node) = 1; t = tree_cons (NULL_TREE, ptr_type_node, endlink); soft_initclass_node = builtin_function ("_Jv_InitClass", build_function_type (void_type_node, t), ! 0, NOT_BUILT_IN, NULL, NULL_TREE); throw_node = builtin_function ("_Jv_Throw", build_function_type (ptr_type_node, t), ! 0, NOT_BUILT_IN, NULL, NULL_TREE); /* Mark throw_nodes as `noreturn' functions with side effects. */ TREE_THIS_VOLATILE (throw_node) = 1; TREE_SIDE_EFFECTS (throw_node) = 1; t = build_function_type (int_type_node, endlink); soft_monitorenter_node ! = builtin_function ("_Jv_MonitorEnter", t, 0, NOT_BUILT_IN, ! NULL, NULL_TREE); soft_monitorexit_node ! = builtin_function ("_Jv_MonitorExit", t, 0, NOT_BUILT_IN, ! NULL, NULL_TREE); t = tree_cons (NULL_TREE, int_type_node, tree_cons (NULL_TREE, int_type_node, endlink)); soft_newarray_node = builtin_function ("_Jv_NewPrimArray", build_function_type(ptr_type_node, t), ! 0, NOT_BUILT_IN, NULL, NULL_TREE); DECL_IS_MALLOC (soft_newarray_node) = 1; t = tree_cons (NULL_TREE, int_type_node, *************** java_init_decl_processing () *** 791,812 **** soft_anewarray_node = builtin_function ("_Jv_NewObjectArray", build_function_type (ptr_type_node, t), ! 0, NOT_BUILT_IN, NULL); DECL_IS_MALLOC (soft_anewarray_node) = 1; t = tree_cons (NULL_TREE, ptr_type_node, ! tree_cons (NULL_TREE, int_type_node, endlink)); soft_multianewarray_node = builtin_function ("_Jv_NewMultiArray", build_function_type (ptr_type_node, t), ! 0, NOT_BUILT_IN, NULL); DECL_IS_MALLOC (soft_multianewarray_node) = 1; t = build_function_type (void_type_node, tree_cons (NULL_TREE, int_type_node, endlink)); soft_badarrayindex_node = builtin_function ("_Jv_ThrowBadArrayIndex", t, ! 0, NOT_BUILT_IN, NULL); /* Mark soft_badarrayindex_node as a `noreturn' function with side effects. */ TREE_THIS_VOLATILE (soft_badarrayindex_node) = 1; --- 823,846 ---- soft_anewarray_node = builtin_function ("_Jv_NewObjectArray", build_function_type (ptr_type_node, t), ! 0, NOT_BUILT_IN, NULL, NULL_TREE); DECL_IS_MALLOC (soft_anewarray_node) = 1; + /* There is no endlink here because _Jv_NewMultiArray is a varargs + function. */ t = tree_cons (NULL_TREE, ptr_type_node, ! tree_cons (NULL_TREE, int_type_node, NULL_TREE)); soft_multianewarray_node = builtin_function ("_Jv_NewMultiArray", build_function_type (ptr_type_node, t), ! 0, NOT_BUILT_IN, NULL, NULL_TREE); DECL_IS_MALLOC (soft_multianewarray_node) = 1; t = build_function_type (void_type_node, tree_cons (NULL_TREE, int_type_node, endlink)); soft_badarrayindex_node = builtin_function ("_Jv_ThrowBadArrayIndex", t, ! 0, NOT_BUILT_IN, NULL, NULL_TREE); /* Mark soft_badarrayindex_node as a `noreturn' function with side effects. */ TREE_THIS_VOLATILE (soft_badarrayindex_node) = 1; *************** java_init_decl_processing () *** 815,821 **** soft_nullpointer_node = builtin_function ("_Jv_ThrowNullPointerException", build_function_type (void_type_node, endlink), ! 0, NOT_BUILT_IN, NULL); /* Mark soft_nullpointer_node as a `noreturn' function with side effects. */ TREE_THIS_VOLATILE (soft_nullpointer_node) = 1; --- 849,855 ---- soft_nullpointer_node = builtin_function ("_Jv_ThrowNullPointerException", build_function_type (void_type_node, endlink), ! 0, NOT_BUILT_IN, NULL, NULL_TREE); /* Mark soft_nullpointer_node as a `noreturn' function with side effects. */ TREE_THIS_VOLATILE (soft_nullpointer_node) = 1; *************** java_init_decl_processing () *** 826,875 **** soft_checkcast_node = builtin_function ("_Jv_CheckCast", build_function_type (ptr_type_node, t), ! 0, NOT_BUILT_IN, NULL); t = tree_cons (NULL_TREE, object_ptr_type_node, tree_cons (NULL_TREE, class_ptr_type, endlink)); soft_instanceof_node = builtin_function ("_Jv_IsInstanceOf", build_function_type (boolean_type_node, t), ! 0, NOT_BUILT_IN, NULL); t = tree_cons (NULL_TREE, object_ptr_type_node, tree_cons (NULL_TREE, object_ptr_type_node, endlink)); soft_checkarraystore_node = builtin_function ("_Jv_CheckArrayStore", build_function_type (void_type_node, t), ! 0, NOT_BUILT_IN, NULL); t = tree_cons (NULL_TREE, ptr_type_node, tree_cons (NULL_TREE, ptr_type_node, tree_cons (NULL_TREE, int_type_node, endlink))); soft_lookupinterfacemethod_node = builtin_function ("_Jv_LookupInterfaceMethodIdx", build_function_type (ptr_type_node, t), ! 0, NOT_BUILT_IN, NULL); t = tree_cons (NULL_TREE, object_ptr_type_node, tree_cons (NULL_TREE, ptr_type_node, ! tree_cons (NULL_TREE, ptr_type_node, endlink))); soft_lookupjnimethod_node = builtin_function ("_Jv_LookupJNIMethod", build_function_type (ptr_type_node, t), ! 0, NOT_BUILT_IN, NULL); t = tree_cons (NULL_TREE, ptr_type_node, endlink); soft_getjnienvnewframe_node = builtin_function ("_Jv_GetJNIEnvNewFrame", build_function_type (ptr_type_node, t), ! 0, NOT_BUILT_IN, NULL); soft_jnipopsystemframe_node = builtin_function ("_Jv_JNI_PopSystemFrame", build_function_type (ptr_type_node, t), ! 0, NOT_BUILT_IN, NULL); t = tree_cons (NULL_TREE, double_type_node, tree_cons (NULL_TREE, double_type_node, endlink)); soft_fmod_node = builtin_function ("__builtin_fmod", build_function_type (double_type_node, t), ! BUILT_IN_FMOD, BUILT_IN_NORMAL, "fmod"); #if 0 t = tree_cons (NULL_TREE, float_type_node, --- 860,911 ---- soft_checkcast_node = builtin_function ("_Jv_CheckCast", build_function_type (ptr_type_node, t), ! 0, NOT_BUILT_IN, NULL, NULL_TREE); t = tree_cons (NULL_TREE, object_ptr_type_node, tree_cons (NULL_TREE, class_ptr_type, endlink)); soft_instanceof_node = builtin_function ("_Jv_IsInstanceOf", build_function_type (boolean_type_node, t), ! 0, NOT_BUILT_IN, NULL, NULL_TREE); t = tree_cons (NULL_TREE, object_ptr_type_node, tree_cons (NULL_TREE, object_ptr_type_node, endlink)); soft_checkarraystore_node = builtin_function ("_Jv_CheckArrayStore", build_function_type (void_type_node, t), ! 0, NOT_BUILT_IN, NULL, NULL_TREE); t = tree_cons (NULL_TREE, ptr_type_node, tree_cons (NULL_TREE, ptr_type_node, tree_cons (NULL_TREE, int_type_node, endlink))); soft_lookupinterfacemethod_node = builtin_function ("_Jv_LookupInterfaceMethodIdx", build_function_type (ptr_type_node, t), ! 0, NOT_BUILT_IN, NULL, NULL_TREE); t = tree_cons (NULL_TREE, object_ptr_type_node, tree_cons (NULL_TREE, ptr_type_node, ! tree_cons (NULL_TREE, ptr_type_node, ! tree_cons (NULL_TREE, int_type_node, ! endlink)))); soft_lookupjnimethod_node = builtin_function ("_Jv_LookupJNIMethod", build_function_type (ptr_type_node, t), ! 0, NOT_BUILT_IN, NULL, NULL_TREE); t = tree_cons (NULL_TREE, ptr_type_node, endlink); soft_getjnienvnewframe_node = builtin_function ("_Jv_GetJNIEnvNewFrame", build_function_type (ptr_type_node, t), ! 0, NOT_BUILT_IN, NULL, NULL_TREE); soft_jnipopsystemframe_node = builtin_function ("_Jv_JNI_PopSystemFrame", build_function_type (ptr_type_node, t), ! 0, NOT_BUILT_IN, NULL, NULL_TREE); t = tree_cons (NULL_TREE, double_type_node, tree_cons (NULL_TREE, double_type_node, endlink)); soft_fmod_node = builtin_function ("__builtin_fmod", build_function_type (double_type_node, t), ! BUILT_IN_FMOD, BUILT_IN_NORMAL, "fmod", NULL_TREE); #if 0 t = tree_cons (NULL_TREE, float_type_node, *************** java_init_decl_processing () *** 877,904 **** soft_fmodf_node = builtin_function ("__builtin_fmodf", build_function_type (float_type_node, t), ! BUILT_IN_FMOD, BUILT_IN_NORMAL, "fmodf"); #endif soft_idiv_node = builtin_function ("_Jv_divI", build_function_type (int_type_node, t), ! 0, NOT_BUILT_IN, NULL); soft_irem_node = builtin_function ("_Jv_remI", build_function_type (int_type_node, t), ! 0, NOT_BUILT_IN, NULL); soft_ldiv_node = builtin_function ("_Jv_divJ", build_function_type (long_type_node, t), ! 0, NOT_BUILT_IN, NULL); soft_lrem_node = builtin_function ("_Jv_remJ", build_function_type (long_type_node, t), ! 0, NOT_BUILT_IN, NULL); /* Initialize variables for except.c. */ eh_personality_libfunc = init_one_libfunc (USING_SJLJ_EXCEPTIONS --- 913,940 ---- soft_fmodf_node = builtin_function ("__builtin_fmodf", build_function_type (float_type_node, t), ! BUILT_IN_FMOD, BUILT_IN_NORMAL, "fmodf", NULL_TREE); #endif soft_idiv_node = builtin_function ("_Jv_divI", build_function_type (int_type_node, t), ! 0, NOT_BUILT_IN, NULL, NULL_TREE); soft_irem_node = builtin_function ("_Jv_remI", build_function_type (int_type_node, t), ! 0, NOT_BUILT_IN, NULL, NULL_TREE); soft_ldiv_node = builtin_function ("_Jv_divJ", build_function_type (long_type_node, t), ! 0, NOT_BUILT_IN, NULL, NULL_TREE); soft_lrem_node = builtin_function ("_Jv_remJ", build_function_type (long_type_node, t), ! 0, NOT_BUILT_IN, NULL, NULL_TREE); /* Initialize variables for except.c. */ eh_personality_libfunc = init_one_libfunc (USING_SJLJ_EXCEPTIONS *************** java_init_decl_processing () *** 908,919 **** init_jcf_parse (); - /* Register nodes with the garbage collector. */ - ggc_add_tree_root (java_global_trees, - sizeof (java_global_trees) / sizeof (tree)); - ggc_add_tree_root (&decl_map, 1); - ggc_add_tree_root (&pending_local_decls, 1); - initialize_builtins (); } --- 944,949 ---- *************** static struct binding_level * *** 1168,1174 **** make_binding_level () { /* NOSTRICT */ ! return (struct binding_level *) xmalloc (sizeof (struct binding_level)); } void --- 1198,1204 ---- make_binding_level () { /* NOSTRICT */ ! return xmalloc (sizeof (struct binding_level)); } void *************** set_block (block) *** 1545,1570 **** /* integrate_decl_tree calls this function. */ void ! copy_lang_decl (node) tree node; { ! int lang_decl_size ! = TREE_CODE (node) == VAR_DECL ? sizeof (struct lang_decl_var) ! : sizeof (struct lang_decl); ! struct lang_decl *x = (struct lang_decl *) ggc_alloc (lang_decl_size); ! memcpy (x, DECL_LANG_SPECIFIC (node), lang_decl_size); ! DECL_LANG_SPECIFIC (node) = x; ! } ! /* If DECL has a cleanup, build and return that cleanup here. ! This is a callback called by expand_expr. */ ! tree ! maybe_build_cleanup (decl) ! tree decl ATTRIBUTE_UNUSED; ! { ! /* There are no cleanups in Java (I think). */ ! return NULL_TREE; } void --- 1575,1593 ---- /* integrate_decl_tree calls this function. */ void ! java_dup_lang_specific_decl (node) tree node; { ! int lang_decl_size; ! struct lang_decl *x; ! if (!DECL_LANG_SPECIFIC (node)) ! return; ! lang_decl_size = sizeof (struct lang_decl); ! x = (struct lang_decl *) ggc_alloc (lang_decl_size); ! memcpy (x, DECL_LANG_SPECIFIC (node), lang_decl_size); ! DECL_LANG_SPECIFIC (node) = x; } void *************** build_result_decl (fndecl) *** 1671,1681 **** tree fndecl; { tree restype = TREE_TYPE (TREE_TYPE (fndecl)); ! /* To be compatible with C_PROMOTING_INTEGER_TYPE_P in cc1/cc1plus. */ ! if (INTEGRAL_TYPE_P (restype) ! && TYPE_PRECISION (restype) < TYPE_PRECISION (integer_type_node)) ! restype = integer_type_node; ! return (DECL_RESULT (fndecl) = build_decl (RESULT_DECL, NULL_TREE, restype)); } void --- 1694,1711 ---- tree fndecl; { tree restype = TREE_TYPE (TREE_TYPE (fndecl)); ! tree result = DECL_RESULT (fndecl); ! if (! result) ! { ! /* To be compatible with C_PROMOTING_INTEGER_TYPE_P in cc1/cc1plus. */ ! if (INTEGRAL_TYPE_P (restype) ! && TYPE_PRECISION (restype) < TYPE_PRECISION (integer_type_node)) ! restype = integer_type_node; ! result = build_decl (RESULT_DECL, NULL_TREE, restype); ! DECL_CONTEXT (result) = fndecl; ! DECL_RESULT (fndecl) = result; ! } ! return result; } void *************** start_java_method (fndecl) *** 1763,1772 **** i = DECL_MAX_LOCALS(fndecl) + DECL_MAX_STACK(fndecl); decl_map = make_tree_vec (i); ! type_map = (tree *) xrealloc (type_map, i * sizeof (tree)); #if defined(DEBUG_JAVA_BINDING_LEVELS) ! fprintf (stderr, "%s:\n", (*decl_printable_name) (fndecl, 2)); current_pc = 0; #endif /* defined(DEBUG_JAVA_BINDING_LEVELS) */ pushlevel (1); /* Push parameters. */ --- 1793,1802 ---- i = DECL_MAX_LOCALS(fndecl) + DECL_MAX_STACK(fndecl); decl_map = make_tree_vec (i); ! type_map = xrealloc (type_map, i * sizeof (tree)); #if defined(DEBUG_JAVA_BINDING_LEVELS) ! fprintf (stderr, "%s:\n", lang_printable_name (fndecl, 2)); current_pc = 0; #endif /* defined(DEBUG_JAVA_BINDING_LEVELS) */ pushlevel (1); /* Push parameters. */ *************** end_java_method () *** 1834,1897 **** current_function_decl = NULL_TREE; } ! /* Mark language-specific parts of T for garbage-collection. */ ! void ! lang_mark_tree (t) ! tree t; { ! if (TREE_CODE (t) == IDENTIFIER_NODE) ! { ! struct lang_identifier *li = (struct lang_identifier *) t; ! ggc_mark_tree (li->global_value); ! ggc_mark_tree (li->local_value); ! ggc_mark_tree (li->utf8_ref); ! } ! else if (TREE_CODE (t) == VAR_DECL ! || TREE_CODE (t) == PARM_DECL ! || TREE_CODE (t) == FIELD_DECL) ! { ! struct lang_decl_var *ldv = ! ((struct lang_decl_var *) DECL_LANG_SPECIFIC (t)); ! if (ldv) ! { ! ggc_mark (ldv); ! ggc_mark_tree (ldv->slot_chain); ! ggc_mark_tree (ldv->am); ! ggc_mark_tree (ldv->wfl); ! } ! } ! else if (TREE_CODE (t) == FUNCTION_DECL) { ! struct lang_decl *ld = DECL_LANG_SPECIFIC (t); ! ! if (ld) ! { ! ggc_mark (ld); ! ggc_mark_tree (ld->wfl); ! ggc_mark_tree (ld->throws_list); ! ggc_mark_tree (ld->function_decl_body); ! ggc_mark_tree (ld->called_constructor); ! ggc_mark_tree (ld->inner_access); ! ggc_mark_tree_hash_table (&ld->init_test_table); ! ggc_mark_tree_hash_table (&ld->ict); ! ggc_mark_tree (ld->smic); ! } } ! else if (TYPE_P (t)) { ! struct lang_type *lt = TYPE_LANG_SPECIFIC (t); ! ! if (lt) ! { ! ggc_mark (lt); ! ggc_mark_tree (lt->signature); ! ggc_mark_tree (lt->cpool_data_ref); ! ggc_mark_tree (lt->finit_stmt_list); ! ggc_mark_tree (lt->clinit_stmt_list); ! ggc_mark_tree (lt->ii_block); ! ggc_mark_tree (lt->dot_class); ! ggc_mark_tree (lt->package_list); ! } } } --- 1864,1897 ---- current_function_decl = NULL_TREE; } ! /* Dump FUNCTION_DECL FN as tree dump PHASE. */ ! static void ! dump_function (phase, fn) ! enum tree_dump_index phase; ! tree fn; { ! FILE *stream; ! int flags; ! ! stream = dump_begin (phase, &flags); ! if (stream) { ! dump_node (fn, TDF_SLIM | flags, stream); ! dump_end (phase, stream); } ! } ! ! void java_optimize_inline (fndecl) ! tree fndecl; ! { ! if (flag_inline_trees) { ! timevar_push (TV_INTEGRATION); ! optimize_inline_calls (fndecl); ! timevar_pop (TV_INTEGRATION); ! dump_function (TDI_inlined, fndecl); } } + + #include "gt-java-decl.h" diff -Nrc3pad gcc-3.2.3/gcc/java/except.c gcc-3.3/gcc/java/except.c *** gcc-3.2.3/gcc/java/except.c 2002-03-29 00:41:17.000000000 +0000 --- gcc-3.3/gcc/java/except.c 2002-11-18 15:46:32.000000000 +0000 *************** static void link_handler PARAMS ((struct *** 44,51 **** static void check_start_handlers PARAMS ((struct eh_range *, int)); static void free_eh_ranges PARAMS ((struct eh_range *range)); - extern struct obstack permanent_obstack; - struct eh_range *current_method_handlers; struct eh_range *current_try_block = NULL; --- 44,49 ---- *************** static struct eh_range *cache_next_child *** 63,71 **** struct eh_range whole_range; #if defined(DEBUG_JAVA_BINDING_LEVELS) ! int binding_depth; ! int is_class_level; ! int current_pc; extern void indent (); #endif --- 61,69 ---- struct eh_range whole_range; #if defined(DEBUG_JAVA_BINDING_LEVELS) ! extern int binding_depth; ! extern int is_class_level; ! extern int current_pc; extern void indent (); #endif *************** link_handler (range, outer) *** 155,162 **** /* Handle overlapping ranges by splitting the new range. */ if (range->start_pc < outer->start_pc || range->end_pc > outer->end_pc) { ! struct eh_range *h ! = (struct eh_range *) xmalloc (sizeof (struct eh_range)); if (range->start_pc < outer->start_pc) { h->start_pc = range->start_pc; --- 153,159 ---- /* Handle overlapping ranges by splitting the new range. */ if (range->start_pc < outer->start_pc || range->end_pc > outer->end_pc) { ! struct eh_range *h = xmalloc (sizeof (struct eh_range)); if (range->start_pc < outer->start_pc) { h->start_pc = range->start_pc; *************** link_handler (range, outer) *** 174,179 **** --- 171,177 ---- h->handlers = build_tree_list (TREE_PURPOSE (range->handlers), TREE_VALUE (range->handlers)); h->next_sibling = NULL; + h->expanded = 0; /* Restart both from the top to avoid having to make this function smart about reentrancy. */ link_handler (h, &whole_range); *************** add_handler (start_pc, end_pc, handler, *** 287,293 **** prev = ptr; } ! h = (struct eh_range *) xmalloc (sizeof (struct eh_range)); h->start_pc = start_pc; h->end_pc = end_pc; h->first_child = NULL; --- 285,291 ---- prev = ptr; } ! h = xmalloc (sizeof (struct eh_range)); h->start_pc = start_pc; h->end_pc = end_pc; h->first_child = NULL; diff -Nrc3pad gcc-3.2.3/gcc/java/expr.c gcc-3.3/gcc/java/expr.c *** gcc-3.2.3/gcc/java/expr.c 2002-06-25 13:26:04.000000000 +0000 --- gcc-3.3/gcc/java/expr.c 2003-03-11 20:34:40.000000000 +0000 *************** *** 1,5 **** /* Process expressions for the GNU compiler for the Java(TM) language. ! Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Process expressions for the GNU compiler for the Java(TM) language. ! Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** static tree build_java_throw_out_of_boun *** 81,98 **** static tree build_java_check_indexed_type PARAMS ((tree, tree)); static tree case_identity PARAMS ((tree, tree)); static unsigned char peek_opcode_at_pc PARAMS ((struct JCF *, int, int)); ! static bool emit_init_test_initialization PARAMS ((struct hash_entry *, ! PTR ptr)); static int get_offset_table_index PARAMS ((tree)); ! static tree operand_type[59]; ! extern struct obstack permanent_obstack; ! static tree methods_ident = NULL_TREE; ! static tree ncode_ident = NULL_TREE; tree dtable_ident = NULL_TREE; ! /* Set to non-zero value in order to emit class initilization code before static field references. */ int always_initialize_class_p; --- 81,97 ---- static tree build_java_check_indexed_type PARAMS ((tree, tree)); static tree case_identity PARAMS ((tree, tree)); static unsigned char peek_opcode_at_pc PARAMS ((struct JCF *, int, int)); ! static int emit_init_test_initialization PARAMS ((void **entry, ! void * ptr)); static int get_offset_table_index PARAMS ((tree)); ! static GTY(()) tree operand_type[59]; ! static GTY(()) tree methods_ident; ! static GTY(()) tree ncode_ident; tree dtable_ident = NULL_TREE; ! /* Set to nonzero value in order to emit class initilization code before static field references. */ int always_initialize_class_p; *************** int always_initialize_class_p; *** 123,132 **** So dup cannot just add an extra element to the quick_stack, but iadd can. */ ! static tree quick_stack = NULL_TREE; /* A free-list of unused permamnet TREE_LIST nodes. */ ! static tree tree_list_free_list = NULL_TREE; /* The stack pointer of the Java virtual machine. This does include the size of the quick_stack. */ --- 122,131 ---- So dup cannot just add an extra element to the quick_stack, but iadd can. */ ! static GTY(()) tree quick_stack; /* A free-list of unused permamnet TREE_LIST nodes. */ ! static GTY((deletable (""))) tree tree_list_free_list; /* The stack pointer of the Java virtual machine. This does include the size of the quick_stack. */ *************** init_expr_processing() *** 144,158 **** operand_type[23] = operand_type[56] = float_type_node; operand_type[24] = operand_type[57] = double_type_node; operand_type[25] = operand_type[58] = ptr_type_node; - ggc_add_tree_root (operand_type, 59); - ggc_add_tree_root (&methods_ident, 1); - ggc_add_tree_root (&ncode_ident, 1); - ggc_add_tree_root (&quick_stack, 1); - ggc_add_tree_root (&tree_list_free_list, 1); } tree ! truthvalue_conversion (expr) tree expr; { /* It is simpler and generates better code to have only TRUTH_*_EXPR --- 143,152 ---- operand_type[23] = operand_type[56] = float_type_node; operand_type[24] = operand_type[57] = double_type_node; operand_type[25] = operand_type[58] = ptr_type_node; } tree ! java_truthvalue_conversion (expr) tree expr; { /* It is simpler and generates better code to have only TRUTH_*_EXPR *************** truthvalue_conversion (expr) *** 182,201 **** case ABS_EXPR: case FLOAT_EXPR: case FFS_EXPR: ! /* These don't change whether an object is non-zero or zero. */ ! return truthvalue_conversion (TREE_OPERAND (expr, 0)); case COND_EXPR: /* Distribute the conversion into the arms of a COND_EXPR. */ return fold (build (COND_EXPR, boolean_type_node, TREE_OPERAND (expr, 0), ! truthvalue_conversion (TREE_OPERAND (expr, 1)), ! truthvalue_conversion (TREE_OPERAND (expr, 2)))); case NOP_EXPR: /* If this is widening the argument, we can ignore it. */ if (TYPE_PRECISION (TREE_TYPE (expr)) >= TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (expr, 0)))) ! return truthvalue_conversion (TREE_OPERAND (expr, 0)); /* fall through to default */ default: --- 176,195 ---- case ABS_EXPR: case FLOAT_EXPR: case FFS_EXPR: ! /* These don't change whether an object is nonzero or zero. */ ! return java_truthvalue_conversion (TREE_OPERAND (expr, 0)); case COND_EXPR: /* Distribute the conversion into the arms of a COND_EXPR. */ return fold (build (COND_EXPR, boolean_type_node, TREE_OPERAND (expr, 0), ! java_truthvalue_conversion (TREE_OPERAND (expr, 1)), ! java_truthvalue_conversion (TREE_OPERAND (expr, 2)))); case NOP_EXPR: /* If this is widening the argument, we can ignore it. */ if (TYPE_PRECISION (TREE_TYPE (expr)) >= TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (expr, 0)))) ! return java_truthvalue_conversion (TREE_OPERAND (expr, 0)); /* fall through to default */ default: *************** truthvalue_conversion (expr) *** 203,224 **** } } - #ifdef JAVA_USE_HANDLES - /* Given a pointer to a handle, get a pointer to an object. */ - - tree - unhand_expr (expr) - tree expr; - { - tree field, handle_type; - expr = build1 (INDIRECT_REF, TREE_TYPE (TREE_TYPE (expr)), expr); - handle_type = TREE_TYPE (expr); - field = TYPE_FIELDS (handle_type); - expr = build (COMPONENT_REF, TREE_TYPE (field), expr, field); - return expr; - } - #endif - /* Save any stack slots that happen to be in the quick_stack into their home virtual register slots. --- 197,202 ---- *************** can_widen_reference_to (source_type, tar *** 409,421 **** return 1; else { - source_type = HANDLE_TO_CLASS_TYPE (source_type); - target_type = HANDLE_TO_CLASS_TYPE (target_type); if (TYPE_ARRAY_P (source_type) || TYPE_ARRAY_P (target_type)) { HOST_WIDE_INT source_length, target_length; if (TYPE_ARRAY_P (source_type) != TYPE_ARRAY_P (target_type)) ! return 0; target_length = java_array_type_length (target_type); if (target_length >= 0) { --- 387,402 ---- return 1; else { if (TYPE_ARRAY_P (source_type) || TYPE_ARRAY_P (target_type)) { HOST_WIDE_INT source_length, target_length; if (TYPE_ARRAY_P (source_type) != TYPE_ARRAY_P (target_type)) ! { ! /* An array implements Cloneable and Serializable. */ ! tree name = DECL_NAME (TYPE_NAME (target_type)); ! return (name == java_lang_cloneable_identifier_node ! || name == java_io_serializable_identifier_node); ! } target_length = java_array_type_length (target_type); if (target_length >= 0) { *************** build_java_array_length_access (node) *** 699,704 **** --- 680,694 ---- tree array_type = TREE_TYPE (type); HOST_WIDE_INT length; + /* JVM spec: If the arrayref is null, the arraylength instruction + throws a NullPointerException. The only way we could get a node + of type ptr_type_node at this point is `aconst_null; arraylength' + or something equivalent. */ + if (type == ptr_type_node) + return build (CALL_EXPR, int_type_node, + build_address_of (soft_nullpointer_node), + NULL_TREE, NULL_TREE); + if (!is_array_type_p (type)) abort (); *************** expand_java_arrayload (lhs_type_node ) *** 1052,1063 **** index_node = save_expr (index_node); array_node = save_expr (array_node); ! lhs_type_node = build_java_check_indexed_type (array_node, lhs_type_node); ! ! load_node = build_java_arrayaccess (array_node, ! lhs_type_node, ! index_node); ! if (INTEGRAL_TYPE_P (lhs_type_node) && TYPE_PRECISION (lhs_type_node) <= 32) load_node = fold (build1 (NOP_EXPR, int_type_node, load_node)); push_value (load_node); --- 1042,1062 ---- index_node = save_expr (index_node); array_node = save_expr (array_node); ! ! if (TREE_TYPE (array_node) == ptr_type_node) ! /* The only way we could get a node of type ptr_type_node at this ! point is `aconst_null; arraylength' or something equivalent, so ! unconditionally throw NullPointerException. */ ! load_node = build (CALL_EXPR, lhs_type_node, ! build_address_of (soft_nullpointer_node), ! NULL_TREE, NULL_TREE); ! else ! { ! lhs_type_node = build_java_check_indexed_type (array_node, lhs_type_node); ! load_node = build_java_arrayaccess (array_node, ! lhs_type_node, ! index_node); ! } if (INTEGRAL_TYPE_P (lhs_type_node) && TYPE_PRECISION (lhs_type_node) <= 32) load_node = fold (build1 (NOP_EXPR, int_type_node, load_node)); push_value (load_node); *************** expand_java_pushc (ival, type) *** 1108,1118 **** else if (type == float_type_node || type == double_type_node) { REAL_VALUE_TYPE x; - #ifdef REAL_ARITHMETIC REAL_VALUE_FROM_INT (x, ival, 0, TYPE_MODE (type)); - #else - x = ival; - #endif value = build_real (type, x); } else --- 1107,1113 ---- *************** build_instanceof (value, type) *** 1260,1268 **** /* Anything except `null' is an instance of Object. Likewise, if the object is known to be an instance of the class, then we only need to check for `null'. */ ! expr = build (COND_EXPR, itype, ! value, ! boolean_true_node, boolean_false_node); } else if (! TYPE_ARRAY_P (type) && ! TYPE_ARRAY_P (valtype) --- 1255,1261 ---- /* Anything except `null' is an instance of Object. Likewise, if the object is known to be an instance of the class, then we only need to check for `null'. */ ! expr = build (NE_EXPR, itype, value, null_pointer_node); } else if (! TYPE_ARRAY_P (type) && ! TYPE_ARRAY_P (valtype) *************** build_java_binop (op, type, arg1, arg2) *** 1399,1405 **** { case URSHIFT_EXPR: { ! tree u_type = unsigned_type (type); arg1 = convert (u_type, arg1); arg1 = build_java_binop (RSHIFT_EXPR, u_type, arg1, arg2); return convert (type, arg1); --- 1392,1398 ---- { case URSHIFT_EXPR: { ! tree u_type = java_unsigned_type (type); arg1 = convert (u_type, arg1); arg1 = build_java_binop (RSHIFT_EXPR, u_type, arg1, arg2); return convert (type, arg1); *************** build_field_ref (self_value, self_class, *** 1580,1591 **** && ! (DECL_P (self_value) && DECL_NAME (self_value) == this_identifier_node)); ! tree base_handle_type = promote_type (base_class); ! if (base_handle_type != TREE_TYPE (self_value)) ! self_value = fold (build1 (NOP_EXPR, base_handle_type, self_value)); ! #ifdef JAVA_USE_HANDLES ! self_value = unhand_expr (self_value); ! #endif self_value = build_java_indirect_ref (TREE_TYPE (TREE_TYPE (self_value)), self_value, check); return fold (build (COMPONENT_REF, TREE_TYPE (field_decl), --- 1573,1581 ---- && ! (DECL_P (self_value) && DECL_NAME (self_value) == this_identifier_node)); ! tree base_type = promote_type (base_class); ! if (base_type != TREE_TYPE (self_value)) ! self_value = fold (build1 (NOP_EXPR, base_type, self_value)); self_value = build_java_indirect_ref (TREE_TYPE (TREE_TYPE (self_value)), self_value, check); return fold (build (COMPONENT_REF, TREE_TYPE (field_decl), *************** expand_compare (condition, value1, value *** 1660,1666 **** { tree target = lookup_label (target_pc); tree cond = fold (build (condition, boolean_type_node, value1, value2)); ! expand_start_cond (truthvalue_conversion (cond), 0); expand_goto (target); expand_end_cond (); } --- 1650,1656 ---- { tree target = lookup_label (target_pc); tree cond = fold (build (condition, boolean_type_node, value1, value2)); ! expand_start_cond (java_truthvalue_conversion (cond), 0); expand_goto (target); expand_end_cond (); } *************** build_class_init (clas, expr) *** 1760,1767 **** tree clas, expr; { tree init; ! struct init_test_hash_entry *ite; ! if (inherits_from_p (current_class, clas)) return expr; if (always_initialize_class_p) --- 1750,1763 ---- tree clas, expr; { tree init; ! ! /* An optimization: if CLAS is a superclass of the class we're ! compiling, we don't need to initialize it. However, if CLAS is ! an interface, it won't necessarily be initialized, even if we ! implement it. */ ! if ((! CLASS_INTERFACE (TYPE_NAME (clas)) ! && inherits_from_p (current_class, clas)) ! || current_class == clas) return expr; if (always_initialize_class_p) *************** build_class_init (clas, expr) *** 1774,1798 **** } else { ! ite = (struct init_test_hash_entry *) ! hash_lookup (&DECL_FUNCTION_INIT_TEST_TABLE (current_function_decl), ! (const hash_table_key) clas, ! TRUE, NULL); ! ! if (ite->init_test_decl == 0) { /* Build a declaration and mark it as a flag used to track static class initializations. */ ! ite->init_test_decl = build_decl (VAR_DECL, NULL_TREE, ! boolean_type_node); ! MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC (ite->init_test_decl); ! LOCAL_CLASS_INITIALIZATION_FLAG (ite->init_test_decl) = 1; ! DECL_CONTEXT (ite->init_test_decl) = current_function_decl; ! DECL_FUNCTION_INIT_TEST_CLASS (ite->init_test_decl) = clas; /* Tell the check-init code to ignore this decl when not optimizing class initialization. */ if (!STATIC_CLASS_INIT_OPT_P ()) ! DECL_BIT_INDEX(ite->init_test_decl) = -1; } init = build (CALL_EXPR, void_type_node, --- 1770,1793 ---- } else { ! tree *init_test_decl; ! init_test_decl = java_treetreehash_new ! (DECL_FUNCTION_INIT_TEST_TABLE (current_function_decl), clas); ! ! if (*init_test_decl == NULL) { /* Build a declaration and mark it as a flag used to track static class initializations. */ ! *init_test_decl = build_decl (VAR_DECL, NULL_TREE, ! boolean_type_node); ! MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC (*init_test_decl); ! LOCAL_CLASS_INITIALIZATION_FLAG (*init_test_decl) = 1; ! DECL_CONTEXT (*init_test_decl) = current_function_decl; ! DECL_FUNCTION_INIT_TEST_CLASS (*init_test_decl) = clas; /* Tell the check-init code to ignore this decl when not optimizing class initialization. */ if (!STATIC_CLASS_INIT_OPT_P ()) ! DECL_BIT_INDEX(*init_test_decl) = -1; } init = build (CALL_EXPR, void_type_node, *************** build_class_init (clas, expr) *** 1802,1813 **** TREE_SIDE_EFFECTS (init) = 1; init = build (COND_EXPR, void_type_node, build (EQ_EXPR, boolean_type_node, ! ite->init_test_decl, boolean_false_node), init, integer_zero_node); TREE_SIDE_EFFECTS (init) = 1; init = build (COMPOUND_EXPR, TREE_TYPE (expr), init, build (MODIFY_EXPR, boolean_type_node, ! ite->init_test_decl, boolean_true_node)); TREE_SIDE_EFFECTS (init) = 1; } --- 1797,1808 ---- TREE_SIDE_EFFECTS (init) = 1; init = build (COND_EXPR, void_type_node, build (EQ_EXPR, boolean_type_node, ! *init_test_decl, boolean_false_node), init, integer_zero_node); TREE_SIDE_EFFECTS (init) = 1; init = build (COMPOUND_EXPR, TREE_TYPE (expr), init, build (MODIFY_EXPR, boolean_type_node, ! *init_test_decl, boolean_true_node)); TREE_SIDE_EFFECTS (init) = 1; } *************** build_known_method_ref (method, method_t *** 1853,1859 **** methods_ident = get_identifier ("methods"); ref = build (COMPONENT_REF, method_ptr_type_node, ref, lookup_field (&class_type_node, methods_ident)); ! for (meth = TYPE_METHODS (CLASS_TO_HANDLE_TYPE (self_type)); ; meth = TREE_CHAIN (meth)) { if (method == meth) --- 1848,1854 ---- methods_ident = get_identifier ("methods"); ref = build (COMPONENT_REF, method_ptr_type_node, ref, lookup_field (&class_type_node, methods_ident)); ! for (meth = TYPE_METHODS (self_type); ; meth = TREE_CHAIN (meth)) { if (method == meth) *************** build_invokevirtual (dtable, method) *** 1980,1990 **** return func; } tree build_invokeinterface (dtable, method) tree dtable, method; { - static tree class_ident = NULL_TREE; tree lookup_arg; tree interface; tree idx; --- 1975,1985 ---- return func; } + static GTY(()) tree class_ident; tree build_invokeinterface (dtable, method) tree dtable, method; { tree lookup_arg; tree interface; tree idx; *************** build_invokeinterface (dtable, method) *** 1999,2005 **** if (class_ident == NULL_TREE) { class_ident = get_identifier ("class"); - ggc_add_tree_root (&class_ident, 1); } dtable = build_java_indirect_ref (dtable_type, dtable, flag_check_references); --- 1994,1999 ---- *************** expand_invoke (opcode, method_ref_index, *** 2068,2078 **** layout_class_methods (self_type); if (ID_INIT_P (method_name)) ! method = lookup_java_constructor (CLASS_TO_HANDLE_TYPE (self_type), ! method_signature); else ! method = lookup_java_method (CLASS_TO_HANDLE_TYPE (self_type), ! method_name, method_signature); if (method == NULL_TREE) { error ("class '%s' has no method named '%s' matching signature '%s'", --- 2062,2070 ---- layout_class_methods (self_type); if (ID_INIT_P (method_name)) ! method = lookup_java_constructor (self_type, method_signature); else ! method = lookup_java_method (self_type, method_name, method_signature); if (method == NULL_TREE) { error ("class '%s' has no method named '%s' matching signature '%s'", *************** build_jni_stub (method) *** 2186,2191 **** --- 2178,2185 ---- tree method_args, res_type; tree meth_var; + int args_size = 0; + tree klass = DECL_CONTEXT (method); int from_class = ! CLASS_FROM_SOURCE_P (klass); klass = build_class_ref (klass); *************** build_jni_stub (method) *** 2247,2253 **** special way, we would do that here. */ args = NULL_TREE; for (tem = method_args; tem != NULL_TREE; tem = TREE_CHAIN (tem)) ! args = tree_cons (NULL_TREE, tem, args); args = nreverse (args); arg_types = TYPE_ARG_TYPES (TREE_TYPE (method)); --- 2241,2256 ---- special way, we would do that here. */ args = NULL_TREE; for (tem = method_args; tem != NULL_TREE; tem = TREE_CHAIN (tem)) ! { ! int arg_bits = TREE_INT_CST_LOW (TYPE_SIZE_UNIT (TREE_TYPE (tem))); ! #ifdef PARM_BOUNDARY ! arg_bits = (((arg_bits + PARM_BOUNDARY - 1) / PARM_BOUNDARY) ! * PARM_BOUNDARY); ! #endif ! args_size += (arg_bits / BITS_PER_UNIT); ! ! args = tree_cons (NULL_TREE, tem, args); ! } args = nreverse (args); arg_types = TYPE_ARG_TYPES (TREE_TYPE (method)); *************** build_jni_stub (method) *** 2256,2286 **** available in the argument list. */ if (METHOD_STATIC (method)) { args = tree_cons (NULL_TREE, klass, args); arg_types = tree_cons (NULL_TREE, object_ptr_type_node, arg_types); } /* The JNIEnv structure is the first argument to the JNI function. */ args = tree_cons (NULL_TREE, env_var, args); arg_types = tree_cons (NULL_TREE, ptr_type_node, arg_types); /* We call _Jv_LookupJNIMethod to find the actual underlying function pointer. _Jv_LookupJNIMethod will throw the appropriate exception if this function is not found at runtime. */ method_sig = build_java_signature (TREE_TYPE (method)); ! lookup_arg = ! build_tree_list (NULL_TREE, ! build_utf8_ref (unmangle_classname ! (IDENTIFIER_POINTER (method_sig), ! IDENTIFIER_LENGTH (method_sig)))); tem = DECL_NAME (method); lookup_arg = tree_cons (NULL_TREE, klass, tree_cons (NULL_TREE, build_utf8_ref (tem), lookup_arg)); ! jni_func_type ! = build_pointer_type (build_function_type (TREE_TYPE (TREE_TYPE (method)), ! arg_types)); jnifunc = build (COND_EXPR, ptr_type_node, meth_var, meth_var, --- 2259,2296 ---- available in the argument list. */ if (METHOD_STATIC (method)) { + args_size += int_size_in_bytes (TREE_TYPE (klass)); args = tree_cons (NULL_TREE, klass, args); arg_types = tree_cons (NULL_TREE, object_ptr_type_node, arg_types); } /* The JNIEnv structure is the first argument to the JNI function. */ + args_size += int_size_in_bytes (TREE_TYPE (env_var)); args = tree_cons (NULL_TREE, env_var, args); arg_types = tree_cons (NULL_TREE, ptr_type_node, arg_types); /* We call _Jv_LookupJNIMethod to find the actual underlying function pointer. _Jv_LookupJNIMethod will throw the appropriate exception if this function is not found at runtime. */ + tem = build_tree_list (NULL_TREE, build_int_2 (args_size, 0)); method_sig = build_java_signature (TREE_TYPE (method)); ! lookup_arg = tree_cons (NULL_TREE, ! build_utf8_ref (unmangle_classname ! (IDENTIFIER_POINTER (method_sig), ! IDENTIFIER_LENGTH (method_sig))), ! tem); tem = DECL_NAME (method); lookup_arg = tree_cons (NULL_TREE, klass, tree_cons (NULL_TREE, build_utf8_ref (tem), lookup_arg)); + + tem = build_function_type (TREE_TYPE (TREE_TYPE (method)), arg_types); ! #ifdef MODIFY_JNI_METHOD_CALL ! tem = MODIFY_JNI_METHOD_CALL (tem); ! #endif ! ! jni_func_type = build_pointer_type (tem); jnifunc = build (COND_EXPR, ptr_type_node, meth_var, meth_var, *************** get_primitive_array_vtable (tree elt) *** 2485,2495 **** } struct rtx_def * ! java_lang_expand_expr (exp, target, tmode, modifier) register tree exp; rtx target; enum machine_mode tmode; ! enum expand_modifier modifier; { tree current; --- 2495,2505 ---- } struct rtx_def * ! java_expand_expr (exp, target, tmode, modifier) register tree exp; rtx target; enum machine_mode tmode; ! int modifier; /* Actually an enum expand_modifier. */ { tree current; *************** java_lang_expand_expr (exp, target, tmod *** 2570,2575 **** --- 2580,2586 ---- if (BLOCK_EXPR_BODY (exp)) { tree local; + rtx last; tree body = BLOCK_EXPR_BODY (exp); /* Set to 1 or more when we found a static class initialization flag. */ *************** java_lang_expand_expr (exp, target, tmod *** 2592,2599 **** if (! always_initialize_class_p && current_function_decl && found_class_initialization_flag) ! hash_traverse ! (&DECL_FUNCTION_INIT_TEST_TABLE (current_function_decl), emit_init_test_initialization, NULL); /* Avoid deep recursion for long block. */ --- 2603,2610 ---- if (! always_initialize_class_p && current_function_decl && found_class_initialization_flag) ! htab_traverse ! (DECL_FUNCTION_INIT_TEST_TABLE (current_function_decl), emit_init_test_initialization, NULL); /* Avoid deep recursion for long block. */ *************** java_lang_expand_expr (exp, target, tmod *** 2603,2613 **** emit_queue (); body = TREE_OPERAND (body, 1); } ! expand_expr (body, const0_rtx, VOIDmode, 0); emit_queue (); expand_end_bindings (getdecls (), 1, 0); poplevel (1, 1, 0); ! return const0_rtx; } return const0_rtx; --- 2614,2624 ---- emit_queue (); body = TREE_OPERAND (body, 1); } ! last = expand_expr (body, NULL_RTX, VOIDmode, 0); emit_queue (); expand_end_bindings (getdecls (), 1, 0); poplevel (1, 1, 0); ! return last; } return const0_rtx; *************** java_lang_expand_expr (exp, target, tmod *** 2664,2669 **** --- 2675,2685 ---- return expand_expr (build_exception_object_ref (TREE_TYPE (exp)), target, tmode, modifier); + case LABEL_EXPR: + /* Used only by expanded inline functions. */ + expand_label (TREE_OPERAND (exp, 0)); + return const0_rtx; + default: internal_error ("can't expand %s", tree_code_name [TREE_CODE (exp)]); } *************** force_evaluation_order (node) *** 3466,3484 **** /* Called for every element in DECL_FUNCTION_INIT_TEST_TABLE of a method in order to emit initialization code for each test flag. */ ! static bool ! emit_init_test_initialization (entry, key) ! struct hash_entry *entry; ! hash_table_key key ATTRIBUTE_UNUSED; { ! struct init_test_hash_entry *ite = (struct init_test_hash_entry *) entry; ! tree klass = build_class_ref ((tree) entry->key); tree rhs; /* If the DECL_INITIAL of the test flag is set to true, it means that the class is already initialized the time it is in use. */ ! if (DECL_INITIAL (ite->init_test_decl) == boolean_true_node) rhs = boolean_true_node; /* Otherwise, we initialize the class init check variable by looking at the `state' field of the class to see if it is already --- 3482,3500 ---- /* Called for every element in DECL_FUNCTION_INIT_TEST_TABLE of a method in order to emit initialization code for each test flag. */ ! static int ! emit_init_test_initialization (entry, x) ! void * * entry; ! void * x ATTRIBUTE_UNUSED; { ! struct treetreehash_entry *ite = (struct treetreehash_entry *) *entry; ! tree klass = build_class_ref (ite->key); tree rhs; /* If the DECL_INITIAL of the test flag is set to true, it means that the class is already initialized the time it is in use. */ ! if (DECL_INITIAL (ite->value) == boolean_true_node) rhs = boolean_true_node; /* Otherwise, we initialize the class init check variable by looking at the `state' field of the class to see if it is already *************** emit_init_test_initialization (entry, ke *** 3493,3498 **** build_int_2 (JV_STATE_DONE, 0)); expand_expr_stmt (build (MODIFY_EXPR, boolean_type_node, ! ite->init_test_decl, rhs)); return true; } --- 3509,3517 ---- build_int_2 (JV_STATE_DONE, 0)); expand_expr_stmt (build (MODIFY_EXPR, boolean_type_node, ! ite->value, rhs)); return true; } + + #include "gt-java-expr.h" + diff -Nrc3pad gcc-3.2.3/gcc/java/gcj.1 gcc-3.3/gcc/java/gcj.1 *** gcc-3.2.3/gcc/java/gcj.1 2003-04-22 07:07:36.000000000 +0000 --- gcc-3.3/gcc/java/gcj.1 2003-05-14 00:32:09.000000000 +0000 *************** *** 1,8 **** ! .\" Automatically generated by Pod::Man version 1.15 ! .\" Tue Apr 22 07:07:36 2003 .\" .\" Standard preamble: ! .\" ====================================================================== .de Sh \" Subsection heading .br .if t .Sp --- 1,7 ---- ! .\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13 .\" .\" Standard preamble: ! .\" ======================================================================== .de Sh \" Subsection heading .br .if t .Sp *************** *** 15,26 **** .if t .sp .5v .if n .sp .. - .de Ip \" List item - .br - .ie \\n(.$>=3 .ne \\$3 - .el .ne 3 - .IP "\\$1" \\$2 - .. .de Vb \" Begin verbatim text .ft CW .nf --- 14,19 ---- *************** *** 28,42 **** .. .de Ve \" End verbatim text .ft R - .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a ! .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used ! .\" to do unbreakable dashes and therefore won't be available. \*(C` and ! .\" \*(C' expand to `' in nroff, nothing in troff, for use with C<> .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ --- 21,34 ---- .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a ! .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to ! .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' ! .\" expand to `' in nroff, nothing in troff, for use with C<>. .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ *************** *** 56,65 **** . ds R" '' 'br\} .\" ! .\" If the F register is turned on, we'll generate index entries on stderr ! .\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and ! .\" index entries marked with X<> in POD. Of course, you'll have to process ! .\" the output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" --- 48,57 ---- . ds R" '' 'br\} .\" ! .\" If the F register is turned on, we'll generate index entries on stderr for ! .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index ! .\" entries marked with X<> in POD. Of course, you'll have to process the ! .\" output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" *************** *** 68,81 **** . rr F .\} .\" ! .\" For nroff, turn off justification. Always turn off hyphenation; it ! .\" makes way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. - .bd B 3 . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 --- 60,72 ---- . rr F .\} .\" ! .\" For nroff, turn off justification. Always turn off hyphenation; it makes ! .\" way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 *************** *** 135,154 **** . ds Ae AE .\} .rm #[ #] #H #V #F C ! .\" ====================================================================== .\" .IX Title "GCJ 1" ! .TH GCJ 1 "gcc-3.2.3" "2003-04-22" "GNU" ! .UC .SH "NAME" ! gcj \- Ahead-of-time compiler for the Java language .SH "SYNOPSIS" .IX Header "SYNOPSIS" gcj [\fB\-I\fR\fIdir\fR...] [\fB\-d\fR \fIdir\fR...] ! [\fB\*(--CLASSPATH\fR=\fIpath\fR] [\fB\*(--classpath\fR=\fIpath\fR] ! [\fB\-f\fR\fIoption\fR...] [\fB\*(--encoding\fR=\fIname\fR] ! [\fB\*(--main\fR=\fIclassname\fR] [\fB\-D\fR\fIname\fR[=\fIvalue\fR]...] ! [\fB\-C\fR] [\fB\*(--resource\fR \fIresource-name\fR] [\fB\-d\fR \fIdirectory\fR] [\fB\-W\fR\fIwarn\fR...] \fIsourcefile\fR... .SH "DESCRIPTION" --- 126,144 ---- . ds Ae AE .\} .rm #[ #] #H #V #F C ! .\" ======================================================================== .\" .IX Title "GCJ 1" ! .TH GCJ 1 "2003-05-14" "gcc-3.3" "GNU" .SH "NAME" ! gcj \- Ahead\-of\-time compiler for the Java language .SH "SYNOPSIS" .IX Header "SYNOPSIS" gcj [\fB\-I\fR\fIdir\fR...] [\fB\-d\fR \fIdir\fR...] ! [\fB\-\-CLASSPATH\fR=\fIpath\fR] [\fB\-\-classpath\fR=\fIpath\fR] ! [\fB\-f\fR\fIoption\fR...] [\fB\-\-encoding\fR=\fIname\fR] ! [\fB\-\-main\fR=\fIclassname\fR] [\fB\-D\fR\fIname\fR[=\fIvalue\fR]...] ! [\fB\-C\fR] [\fB\-\-resource\fR \fIresource-name\fR] [\fB\-d\fR \fIdirectory\fR] [\fB\-W\fR\fIwarn\fR...] \fIsourcefile\fR... .SH "DESCRIPTION" *************** options specific to \fBgcj\fR. *** 163,194 **** A \fBgcj\fR command is like a \fBgcc\fR command, in that it consists of a number of options and file names. The following kinds of input file names are supported: ! .Ip "\fIfile\fR\fB.java\fR" 4 .IX Item "file.java" Java source files. ! .Ip "\fIfile\fR\fB.class\fR" 4 .IX Item "file.class" Java bytecode files. ! .Ip "\fIfile\fR\fB.zip\fR" 4 .IX Item "file.zip" .PD 0 ! .Ip "\fIfile\fR\fB.jar\fR" 4 .IX Item "file.jar" .PD An archive containing one or more \f(CW\*(C`.class\*(C'\fR files, all of which are compiled. The archive may be compressed. ! .Ip "\fB@\fR\fIfile\fR" 4 .IX Item "@file" A file containing a whitespace-separated list of input file names. (Currently, these must all be \f(CW\*(C`.java\*(C'\fR source files, but that may change.) Each named file is compiled, just as if it had been on the command line. ! .Ip "\fIlibrary\fR\fB.a\fR" 4 .IX Item "library.a" .PD 0 ! .Ip "\fIlibrary\fR\fB.so\fR" 4 .IX Item "library.so" ! .Ip "\fB\-l\fR\fIlibname\fR" 4 .IX Item "-llibname" .PD Libraries to use when linking. See the \fBgcc\fR manual. --- 153,184 ---- A \fBgcj\fR command is like a \fBgcc\fR command, in that it consists of a number of options and file names. The following kinds of input file names are supported: ! .IP "\fIfile\fR\fB.java\fR" 4 .IX Item "file.java" Java source files. ! .IP "\fIfile\fR\fB.class\fR" 4 .IX Item "file.class" Java bytecode files. ! .IP "\fIfile\fR\fB.zip\fR" 4 .IX Item "file.zip" .PD 0 ! .IP "\fIfile\fR\fB.jar\fR" 4 .IX Item "file.jar" .PD An archive containing one or more \f(CW\*(C`.class\*(C'\fR files, all of which are compiled. The archive may be compressed. ! .IP "\fB@\fR\fIfile\fR" 4 .IX Item "@file" A file containing a whitespace-separated list of input file names. (Currently, these must all be \f(CW\*(C`.java\*(C'\fR source files, but that may change.) Each named file is compiled, just as if it had been on the command line. ! .IP "\fIlibrary\fR\fB.a\fR" 4 .IX Item "library.a" .PD 0 ! .IP "\fIlibrary\fR\fB.so\fR" 4 .IX Item "library.so" ! .IP "\fB\-l\fR\fIlibname\fR" 4 .IX Item "-llibname" .PD Libraries to use when linking. See the \fBgcc\fR manual. *************** standard classes. *** 219,263 **** In the below, a directory or path component can refer either to an actual directory on the filesystem, or to a \fI.zip\fR or \fI.jar\fR file, which \fBgcj\fR will search as if it is a directory. ! .Ip "\fB\-I\fR\fIdir\fR" 4 .IX Item "-Idir" All directories specified by \f(CW\*(C`\-I\*(C'\fR are kept in order and prepended to the class path constructed from all the other options. Unless ! compatibility with tools like \f(CW\*(C`javac\*(C'\fR is imported, we recommend always using \f(CW\*(C`\-I\*(C'\fR instead of the other options for manipulating the class path. ! .Ip "\fB\*(--classpath=\fR\fIpath\fR" 4 ! .IX Item "classpath=path" This sets the class path to \fIpath\fR, a colon-separated list of paths (on Windows-based systems, a semicolon-separate list of paths). This does not override the builtin (``boot'') search path. ! .Ip "\fB\*(--CLASSPATH=\fR\fIpath\fR" 4 ! .IX Item "CLASSPATH=path" Deprecated synonym for \f(CW\*(C`\-\-classpath\*(C'\fR. ! .Ip "\fB\*(--bootclasspath=\fR\fIpath\fR" 4 ! .IX Item "bootclasspath=path" Where to find the standard builtin classes, such as \f(CW\*(C`java.lang.String\*(C'\fR. ! .Ip "\fB\*(--extdirs=\fR\fIpath\fR" 4 ! .IX Item "extdirs=path" For each directory in the \fIpath\fR, place the contents of that directory at the end of the class path. ! .Ip "\fB\s-1CLASSPATH\s0\fR" 4 .IX Item "CLASSPATH" This is an environment variable which holds a list of paths. .PP The final class path is constructed like so: ! .Ip "\(bu" 4 First come all directories specified via \f(CW\*(C`\-I\*(C'\fR. ! .Ip "\(bu" 4 ! If \fB\*(--classpath\fR is specified, its value is appended. Otherwise, if the \f(CW\*(C`CLASSPATH\*(C'\fR environment variable is specified, then its value is appended. ! Otherwise, the current directory (\f(CW\*(C`"."\*(C'\fR) is appended. ! .Ip "\(bu" 4 If \f(CW\*(C`\-\-bootclasspath\*(C'\fR was specified, append its value. Otherwise, append the built-in system directory, \fIlibgcj.jar\fR. ! .Ip "\(bu" 4 ! Finaly, if \f(CW\*(C`\-\-extdirs\*(C'\fR was specified, append the contents of the specified directories at the end of the class path. Otherwise, append the contents of the built-in extdirs at \f(CW\*(C`$(prefix)/share/java/ext\*(C'\fR. .PP --- 209,253 ---- In the below, a directory or path component can refer either to an actual directory on the filesystem, or to a \fI.zip\fR or \fI.jar\fR file, which \fBgcj\fR will search as if it is a directory. ! .IP "\fB\-I\fR\fIdir\fR" 4 .IX Item "-Idir" All directories specified by \f(CW\*(C`\-I\*(C'\fR are kept in order and prepended to the class path constructed from all the other options. Unless ! compatibility with tools like \f(CW\*(C`javac\*(C'\fR is important, we recommend always using \f(CW\*(C`\-I\*(C'\fR instead of the other options for manipulating the class path. ! .IP "\fB\-\-classpath=\fR\fIpath\fR" 4 ! .IX Item "--classpath=path" This sets the class path to \fIpath\fR, a colon-separated list of paths (on Windows-based systems, a semicolon-separate list of paths). This does not override the builtin (``boot'') search path. ! .IP "\fB\-\-CLASSPATH=\fR\fIpath\fR" 4 ! .IX Item "--CLASSPATH=path" Deprecated synonym for \f(CW\*(C`\-\-classpath\*(C'\fR. ! .IP "\fB\-\-bootclasspath=\fR\fIpath\fR" 4 ! .IX Item "--bootclasspath=path" Where to find the standard builtin classes, such as \f(CW\*(C`java.lang.String\*(C'\fR. ! .IP "\fB\-\-extdirs=\fR\fIpath\fR" 4 ! .IX Item "--extdirs=path" For each directory in the \fIpath\fR, place the contents of that directory at the end of the class path. ! .IP "\fB\s-1CLASSPATH\s0\fR" 4 .IX Item "CLASSPATH" This is an environment variable which holds a list of paths. .PP The final class path is constructed like so: ! .IP "\(bu" 4 First come all directories specified via \f(CW\*(C`\-I\*(C'\fR. ! .IP "\(bu" 4 ! If \fB\-\-classpath\fR is specified, its value is appended. Otherwise, if the \f(CW\*(C`CLASSPATH\*(C'\fR environment variable is specified, then its value is appended. ! Otherwise, the current directory (\f(CW"."\fR) is appended. ! .IP "\(bu" 4 If \f(CW\*(C`\-\-bootclasspath\*(C'\fR was specified, append its value. Otherwise, append the built-in system directory, \fIlibgcj.jar\fR. ! .IP "\(bu" 4 ! Finally, if \f(CW\*(C`\-\-extdirs\*(C'\fR was specified, append the contents of the specified directories at the end of the class path. Otherwise, append the contents of the built-in extdirs at \f(CW\*(C`$(prefix)/share/java/ext\*(C'\fR. .PP *************** attribute when loading \f(CW\*(C`java.la *** 268,274 **** if it isn't found, unless it compiles to bytecode (the option \&\f(CW\*(C`\-fforce\-classes\-archive\-check\*(C'\fR can be used to override this behavior in this particular case.) ! .Ip "\fB\-fforce-classes-archive-check\fR" 4 .IX Item "-fforce-classes-archive-check" This forces the compiler to always check for the special zero length attribute \f(CW\*(C`gnu.gcj.gcj\-compiled\*(C'\fR in \f(CW\*(C`java.lang.Object\*(C'\fR and --- 258,264 ---- if it isn't found, unless it compiles to bytecode (the option \&\f(CW\*(C`\-fforce\-classes\-archive\-check\*(C'\fR can be used to override this behavior in this particular case.) ! .IP "\fB\-fforce\-classes\-archive\-check\fR" 4 .IX Item "-fforce-classes-archive-check" This forces the compiler to always check for the special zero length attribute \f(CW\*(C`gnu.gcj.gcj\-compiled\*(C'\fR in \f(CW\*(C`java.lang.Object\*(C'\fR and *************** You can use the \f(CW\*(C`\-\-encoding=\ *** 284,290 **** encoding (of a particular character set) to use for source files. If this is not specified, the default encoding comes from your current locale. If your host system has insufficient locale support, then ! \&\fBgcj\fR assumes the default encoding to be the \fB\s-1UTF-8\s0\fR encoding of Unicode. .PP To implement \f(CW\*(C`\-\-encoding\*(C'\fR, \fBgcj\fR simply uses the host --- 274,280 ---- encoding (of a particular character set) to use for source files. If this is not specified, the default encoding comes from your current locale. If your host system has insufficient locale support, then ! \&\fBgcj\fR assumes the default encoding to be the \fB\s-1UTF\-8\s0\fR encoding of Unicode. .PP To implement \f(CW\*(C`\-\-encoding\*(C'\fR, \fBgcj\fR simply uses the host *************** platform's \f(CW\*(C`iconv\*(C'\fR conve *** 293,299 **** .PP The names allowed for the argument \f(CW\*(C`\-\-encoding\*(C'\fR vary from platform to platform (since they are not standardized anywhere). However, ! \&\fBgcj\fR implements the encoding named \fB\s-1UTF-8\s0\fR internally, so if you choose to use this for your source files you can be assured that it will work on every host. .Sh "Warnings" --- 283,289 ---- .PP The names allowed for the argument \f(CW\*(C`\-\-encoding\*(C'\fR vary from platform to platform (since they are not standardized anywhere). However, ! \&\fBgcj\fR implements the encoding named \fB\s-1UTF\-8\s0\fR internally, so if you choose to use this for your source files you can be assured that it will work on every host. .Sh "Warnings" *************** will work on every host. *** 303,325 **** warning, then \f(CW\*(C`\-Wno\-foo\*(C'\fR will disable it. Here we've chosen to document the form of the warning which will have an effect \*(-- the default being the opposite of what is listed. ! .Ip "\fB\-Wredundant-modifiers\fR" 4 .IX Item "-Wredundant-modifiers" With this flag, \fBgcj\fR will warn about redundant modifiers. For instance, it will warn if an interface method is declared \f(CW\*(C`public\*(C'\fR. ! .Ip "\fB\-Wextraneous-semicolon\fR" 4 .IX Item "-Wextraneous-semicolon" This causes \fBgcj\fR to warn about empty statements. Empty statements have been deprecated. ! .Ip "\fB\-Wno-out-of-date\fR" 4 .IX Item "-Wno-out-of-date" This option will cause \fBgcj\fR not to warn when a source file is newer than its matching class file. By default \fBgcj\fR will warn about this. ! .Ip "\fB\-Wunused\fR" 4 .IX Item "-Wunused" This is the same as \fBgcc\fR's \f(CW\*(C`\-Wunused\*(C'\fR. ! .Ip "\fB\-Wall\fR" 4 .IX Item "-Wall" This is the same as \f(CW\*(C`\-Wredundant\-modifiers \-Wextraneous\-semicolon \&\-Wunused\*(C'\fR. --- 293,315 ---- warning, then \f(CW\*(C`\-Wno\-foo\*(C'\fR will disable it. Here we've chosen to document the form of the warning which will have an effect \*(-- the default being the opposite of what is listed. ! .IP "\fB\-Wredundant\-modifiers\fR" 4 .IX Item "-Wredundant-modifiers" With this flag, \fBgcj\fR will warn about redundant modifiers. For instance, it will warn if an interface method is declared \f(CW\*(C`public\*(C'\fR. ! .IP "\fB\-Wextraneous\-semicolon\fR" 4 .IX Item "-Wextraneous-semicolon" This causes \fBgcj\fR to warn about empty statements. Empty statements have been deprecated. ! .IP "\fB\-Wno\-out\-of\-date\fR" 4 .IX Item "-Wno-out-of-date" This option will cause \fBgcj\fR not to warn when a source file is newer than its matching class file. By default \fBgcj\fR will warn about this. ! .IP "\fB\-Wunused\fR" 4 .IX Item "-Wunused" This is the same as \fBgcc\fR's \f(CW\*(C`\-Wunused\*(C'\fR. ! .IP "\fB\-Wall\fR" 4 .IX Item "-Wall" This is the same as \f(CW\*(C`\-Wredundant\-modifiers \-Wextraneous\-semicolon \&\-Wunused\*(C'\fR. *************** This is the same as \f(CW\*(C`\-Wredunda *** 327,350 **** .IX Subsection "Code Generation" In addition to the many \fBgcc\fR options controlling code generation, \&\fBgcj\fR has several options specific to itself. ! .Ip "\fB\*(--main=\fR\fI\s-1CLASSNAME\s0\fR" 4 ! .IX Item "main=CLASSNAME" This option is used when linking to specify the name of the class whose \&\f(CW\*(C`main\*(C'\fR method should be invoked when the resulting executable is run. [1] ! .Ip "\fB\-D\fR\fIname\fR\fB[=\fR\fIvalue\fR\fB]\fR" 4 .IX Item "-Dname[=value]" This option can only be used with \f(CW\*(C`\-\-main\*(C'\fR. It defines a system property named \fIname\fR with value \fIvalue\fR. If \fIvalue\fR is not specified then it defaults to the empty string. These system properties are initialized at the program's startup and can be retrieved at runtime using the \f(CW\*(C`java.lang.System.getProperty\*(C'\fR method. ! .Ip "\fB\-C\fR" 4 .IX Item "-C" This option is used to tell \fBgcj\fR to generate bytecode (\fI.class\fR files) rather than object code. ! .Ip "\fB\*(--resource\fR \fIresource-name\fR" 4 ! .IX Item "resource resource-name" This option is used to tell \fBgcj\fR to compile the contents of a given file to object code so it may be accessed at runtime with the core protocol handler as \fBcore:/\fR\fIresource-name\fR. Note that --- 317,340 ---- .IX Subsection "Code Generation" In addition to the many \fBgcc\fR options controlling code generation, \&\fBgcj\fR has several options specific to itself. ! .IP "\fB\-\-main=\fR\fI\s-1CLASSNAME\s0\fR" 4 ! .IX Item "--main=CLASSNAME" This option is used when linking to specify the name of the class whose \&\f(CW\*(C`main\*(C'\fR method should be invoked when the resulting executable is run. [1] ! .IP "\fB\-D\fR\fIname\fR\fB[=\fR\fIvalue\fR\fB]\fR" 4 .IX Item "-Dname[=value]" This option can only be used with \f(CW\*(C`\-\-main\*(C'\fR. It defines a system property named \fIname\fR with value \fIvalue\fR. If \fIvalue\fR is not specified then it defaults to the empty string. These system properties are initialized at the program's startup and can be retrieved at runtime using the \f(CW\*(C`java.lang.System.getProperty\*(C'\fR method. ! .IP "\fB\-C\fR" 4 .IX Item "-C" This option is used to tell \fBgcj\fR to generate bytecode (\fI.class\fR files) rather than object code. ! .IP "\fB\-\-resource\fR \fIresource-name\fR" 4 ! .IX Item "--resource resource-name" This option is used to tell \fBgcj\fR to compile the contents of a given file to object code so it may be accessed at runtime with the core protocol handler as \fBcore:/\fR\fIresource-name\fR. Note that *************** protocol handler as \fBcore:/\fR\fIresou *** 352,364 **** instance, it could be used in a call to \f(CW\*(C`ResourceBundle.getBundle\*(C'\fR. The actual file name to be compiled this way must be specified separately. ! .Ip "\fB\-d\fR \fIdirectory\fR" 4 .IX Item "-d directory" When used with \f(CW\*(C`\-C\*(C'\fR, this causes all generated \fI.class\fR files to be put in the appropriate subdirectory of \fIdirectory\fR. By default they will be put in subdirectories of the current working directory. ! .Ip "\fB\-fno-bounds-check\fR" 4 .IX Item "-fno-bounds-check" By default, \fBgcj\fR generates code which checks the bounds of all array indexing operations. With this option, these checks are omitted, which --- 342,354 ---- instance, it could be used in a call to \f(CW\*(C`ResourceBundle.getBundle\*(C'\fR. The actual file name to be compiled this way must be specified separately. ! .IP "\fB\-d\fR \fIdirectory\fR" 4 .IX Item "-d directory" When used with \f(CW\*(C`\-C\*(C'\fR, this causes all generated \fI.class\fR files to be put in the appropriate subdirectory of \fIdirectory\fR. By default they will be put in subdirectories of the current working directory. ! .IP "\fB\-fno\-bounds\-check\fR" 4 .IX Item "-fno-bounds-check" By default, \fBgcj\fR generates code which checks the bounds of all array indexing operations. With this option, these checks are omitted, which *************** can improve performance for code that us *** 366,381 **** can result in unpredictable behavior if the code in question actually does violate array bounds constraints. It is safe to use this option if you are sure that your code will never throw an \f(CW\*(C`ArrayIndexOutOfBoundsException\*(C'\fR. ! .Ip "\fB\-fno-store-check\fR" 4 .IX Item "-fno-store-check" Don't generate array store checks. When storing objects into arrays, a runtime check is normally generated in order to ensure that the object is assignment compatible with the component type of the array (which may not be known ! at compile-time). With this option, these checks are omitted. This can improve performance for code which stores objects into arrays frequently. It is safe to use this option if you are sure your code will never throw an \&\f(CW\*(C`ArrayStoreException\*(C'\fR. ! .Ip "\fB\-fjni\fR" 4 .IX Item "-fjni" With \fBgcj\fR there are two options for writing native methods: \s-1CNI\s0 and \s-1JNI\s0. By default \fBgcj\fR assumes you are using \s-1CNI\s0. If you are --- 356,371 ---- can result in unpredictable behavior if the code in question actually does violate array bounds constraints. It is safe to use this option if you are sure that your code will never throw an \f(CW\*(C`ArrayIndexOutOfBoundsException\*(C'\fR. ! .IP "\fB\-fno\-store\-check\fR" 4 .IX Item "-fno-store-check" Don't generate array store checks. When storing objects into arrays, a runtime check is normally generated in order to ensure that the object is assignment compatible with the component type of the array (which may not be known ! at compile\-time). With this option, these checks are omitted. This can improve performance for code which stores objects into arrays frequently. It is safe to use this option if you are sure your code will never throw an \&\f(CW\*(C`ArrayStoreException\*(C'\fR. ! .IP "\fB\-fjni\fR" 4 .IX Item "-fjni" With \fBgcj\fR there are two options for writing native methods: \s-1CNI\s0 and \s-1JNI\s0. By default \fBgcj\fR assumes you are using \s-1CNI\s0. If you are *************** compiling a class with native methods, a *** 383,391 **** using \s-1JNI\s0, then you must use \f(CW\*(C`\-fjni\*(C'\fR. This option causes \&\fBgcj\fR to generate stubs which will invoke the underlying \s-1JNI\s0 methods. ! .Ip "\fB\-fno-optimize-static-class-initialization\fR" 4 .IX Item "-fno-optimize-static-class-initialization" ! When the optimization level is greather or equal to \f(CW\*(C`\-O2\*(C'\fR, \&\fBgcj\fR will try to optimize the way calls into the runtime are made to initialize static classes upon their first use (this optimization isn't carried out if \f(CW\*(C`\-C\*(C'\fR was specified.) When compiling to native --- 373,385 ---- using \s-1JNI\s0, then you must use \f(CW\*(C`\-fjni\*(C'\fR. This option causes \&\fBgcj\fR to generate stubs which will invoke the underlying \s-1JNI\s0 methods. ! .IP "\fB\-fno\-assert\fR" 4 ! .IX Item "-fno-assert" ! Don't recognize the \f(CW\*(C`assert\*(C'\fR keyword. This is for compatibility ! with older versions of the language specification. ! .IP "\fB\-fno\-optimize\-static\-class\-initialization\fR" 4 .IX Item "-fno-optimize-static-class-initialization" ! When the optimization level is greater or equal to \f(CW\*(C`\-O2\*(C'\fR, \&\fBgcj\fR will try to optimize the way calls into the runtime are made to initialize static classes upon their first use (this optimization isn't carried out if \f(CW\*(C`\-C\*(C'\fR was specified.) When compiling to native *************** package, is configured. \f(CW\*(C`libgc *** 399,421 **** this group into a \fBspec\fR file which is read by \fBgcj\fR. These options are listed here for completeness; if you are using \f(CW\*(C`libgcj\*(C'\fR then you won't want to touch these options. ! .Ip "\fB\-fuse-boehm-gc\fR" 4 .IX Item "-fuse-boehm-gc" This enables the use of the Boehm \s-1GC\s0 bitmap marking code. In particular this causes \fBgcj\fR to put an object marking descriptor into each vtable. ! .Ip "\fB\-fhash-synchronization\fR" 4 .IX Item "-fhash-synchronization" By default, synchronization data (the data used for \f(CW\*(C`synchronize\*(C'\fR, \&\f(CW\*(C`wait\*(C'\fR, and \f(CW\*(C`notify\*(C'\fR) is pointed to by a word in each object. With this option \fBgcj\fR assumes that this information is stored in a hash table and not in the object itself. ! .Ip "\fB\-fuse-divide-subroutine\fR" 4 .IX Item "-fuse-divide-subroutine" On some systems, a library routine is called to perform integer division. This is required to get exception handling correct when dividing by zero. ! .Ip "\fB\-fcheck-references\fR" 4 .IX Item "-fcheck-references" On some systems it's necessary to insert inline checks whenever accessing an object via a reference. On other systems you won't need --- 393,415 ---- this group into a \fBspec\fR file which is read by \fBgcj\fR. These options are listed here for completeness; if you are using \f(CW\*(C`libgcj\*(C'\fR then you won't want to touch these options. ! .IP "\fB\-fuse\-boehm\-gc\fR" 4 .IX Item "-fuse-boehm-gc" This enables the use of the Boehm \s-1GC\s0 bitmap marking code. In particular this causes \fBgcj\fR to put an object marking descriptor into each vtable. ! .IP "\fB\-fhash\-synchronization\fR" 4 .IX Item "-fhash-synchronization" By default, synchronization data (the data used for \f(CW\*(C`synchronize\*(C'\fR, \&\f(CW\*(C`wait\*(C'\fR, and \f(CW\*(C`notify\*(C'\fR) is pointed to by a word in each object. With this option \fBgcj\fR assumes that this information is stored in a hash table and not in the object itself. ! .IP "\fB\-fuse\-divide\-subroutine\fR" 4 .IX Item "-fuse-divide-subroutine" On some systems, a library routine is called to perform integer division. This is required to get exception handling correct when dividing by zero. ! .IP "\fB\-fcheck\-references\fR" 4 .IX Item "-fcheck-references" On some systems it's necessary to insert inline checks whenever accessing an object via a reference. On other systems you won't need *************** this because null pointer accesses are c *** 423,429 **** processor. .SH "FOOTNOTES" .IX Header "FOOTNOTES" ! .Ip "1." 4 The linker by default looks for a global function named \&\f(CW\*(C`main\*(C'\fR. Since Java does not have global functions, and a collection of Java classes may have more than one class with a --- 417,423 ---- processor. .SH "FOOTNOTES" .IX Header "FOOTNOTES" ! .IP "1." 4 The linker by default looks for a global function named \&\f(CW\*(C`main\*(C'\fR. Since Java does not have global functions, and a collection of Java classes may have more than one class with a *************** collection of Java classes may have more *** 431,446 **** \&\f(CW\*(C`main\*(C'\fR methods it should invoke when starting the application. .SH "SEE ALSO" .IX Header "SEE ALSO" ! \&\fIgcc\fR\|(1), \fIgcjh\fR\|(1), \fIgij\fR\|(1), \fIjv-scan\fR\|(1), \fIjcf-dump\fR\|(1), \fIgfdl\fR\|(7), and the Info entries for \fIgcj\fR and \fIgcc\fR. .SH "COPYRIGHT" .IX Header "COPYRIGHT" ! Copyright (C) 2001, 2002 Free Software Foundation, Inc. .PP Permission is granted to copy, distribute and/or modify this document ! under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the Invariant Sections being ``\s-1GNU\s0 General Public License'', the Front-Cover texts being (a) (see below), and with the Back-Cover Texts being (b) (see below). A copy of the license is included in the man page \fIgfdl\fR\|(7). --- 425,454 ---- \&\f(CW\*(C`main\*(C'\fR methods it should invoke when starting the application. .SH "SEE ALSO" .IX Header "SEE ALSO" ! \&\fIgcc\fR\|(1), \fIgcjh\fR\|(1), \fIgij\fR\|(1), \fIjv\-scan\fR\|(1), \fIjcf\-dump\fR\|(1), \fIgfdl\fR\|(7), and the Info entries for \fIgcj\fR and \fIgcc\fR. .SH "COPYRIGHT" .IX Header "COPYRIGHT" ! Copyright (c) 2001, 2002 Free Software Foundation, Inc. .PP Permission is granted to copy, distribute and/or modify this document ! under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with the Invariant Sections being ``\s-1GNU\s0 General Public License'', the Front-Cover texts being (a) (see below), and with the Back-Cover Texts being (b) (see below). A copy of the license is included in the man page \fIgfdl\fR\|(7). + .PP + (a) The \s-1FSF\s0's Front-Cover Text is: + .PP + .Vb 1 + \& A GNU Manual + .Ve + .PP + (b) The \s-1FSF\s0's Back-Cover Text is: + .PP + .Vb 3 + \& You have freedom to copy and modify this GNU Manual, like GNU + \& software. Copies published by the Free Software Foundation raise + \& funds for GNU development. + .Ve diff -Nrc3pad gcc-3.2.3/gcc/java/gcjh.1 gcc-3.3/gcc/java/gcjh.1 *** gcc-3.2.3/gcc/java/gcjh.1 2003-04-22 07:07:37.000000000 +0000 --- gcc-3.3/gcc/java/gcjh.1 2003-05-14 00:32:09.000000000 +0000 *************** *** 1,8 **** ! .\" Automatically generated by Pod::Man version 1.15 ! .\" Tue Apr 22 07:07:36 2003 .\" .\" Standard preamble: ! .\" ====================================================================== .de Sh \" Subsection heading .br .if t .Sp --- 1,7 ---- ! .\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13 .\" .\" Standard preamble: ! .\" ======================================================================== .de Sh \" Subsection heading .br .if t .Sp *************** *** 15,26 **** .if t .sp .5v .if n .sp .. - .de Ip \" List item - .br - .ie \\n(.$>=3 .ne \\$3 - .el .ne 3 - .IP "\\$1" \\$2 - .. .de Vb \" Begin verbatim text .ft CW .nf --- 14,19 ---- *************** *** 28,42 **** .. .de Ve \" End verbatim text .ft R - .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a ! .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used ! .\" to do unbreakable dashes and therefore won't be available. \*(C` and ! .\" \*(C' expand to `' in nroff, nothing in troff, for use with C<> .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ --- 21,34 ---- .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a ! .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to ! .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' ! .\" expand to `' in nroff, nothing in troff, for use with C<>. .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ *************** *** 56,65 **** . ds R" '' 'br\} .\" ! .\" If the F register is turned on, we'll generate index entries on stderr ! .\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and ! .\" index entries marked with X<> in POD. Of course, you'll have to process ! .\" the output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" --- 48,57 ---- . ds R" '' 'br\} .\" ! .\" If the F register is turned on, we'll generate index entries on stderr for ! .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index ! .\" entries marked with X<> in POD. Of course, you'll have to process the ! .\" output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" *************** *** 68,81 **** . rr F .\} .\" ! .\" For nroff, turn off justification. Always turn off hyphenation; it ! .\" makes way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. - .bd B 3 . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 --- 60,72 ---- . rr F .\} .\" ! .\" For nroff, turn off justification. Always turn off hyphenation; it makes ! .\" way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 *************** *** 135,145 **** . ds Ae AE .\} .rm #[ #] #H #V #F C ! .\" ====================================================================== .\" .IX Title "GCJH 1" ! .TH GCJH 1 "gcc-3.2.3" "2003-04-22" "GNU" ! .UC .SH "NAME" gcjh \- generate header files from Java class files .SH "SYNOPSIS" --- 126,135 ---- . ds Ae AE .\} .rm #[ #] #H #V #F C ! .\" ======================================================================== .\" .IX Title "GCJH 1" ! .TH GCJH 1 "2003-05-14" "gcc-3.3" "GNU" .SH "NAME" gcjh \- generate header files from Java class files .SH "SYNOPSIS" *************** gcjh \- generate header files from Java *** 147,157 **** gcjh [\fB\-stubs\fR] [\fB\-jni\fR] [\fB\-add\fR \fItext\fR] [\fB\-append\fR \fItext\fR] [\fB\-friend\fR \fItext\fR] [\fB\-preprend\fR \fItext\fR] ! [\fB\*(--classpath\fR=\fIpath\fR] [\fB\*(--CLASSPATH\fR=\fIpath\fR] [\fB\-I\fR\fIdir\fR...] [\fB\-d\fR \fIdir\fR...] [\fB\-o\fR \fIfile\fR] [\fB\-td\fR \fIdir\fR] [\fB\-M\fR] [\fB\-MM\fR] [\fB\-MD\fR] [\fB\-MMD\fR] ! [\fB\*(--version\fR] [\fB\*(--help\fR] [\fB\-v\fR] [\fB\*(--verbose\fR] \fIclassname\fR... .SH "DESCRIPTION" .IX Header "DESCRIPTION" --- 137,147 ---- gcjh [\fB\-stubs\fR] [\fB\-jni\fR] [\fB\-add\fR \fItext\fR] [\fB\-append\fR \fItext\fR] [\fB\-friend\fR \fItext\fR] [\fB\-preprend\fR \fItext\fR] ! [\fB\-\-classpath\fR=\fIpath\fR] [\fB\-\-CLASSPATH\fR=\fIpath\fR] [\fB\-I\fR\fIdir\fR...] [\fB\-d\fR \fIdir\fR...] [\fB\-o\fR \fIfile\fR] [\fB\-td\fR \fIdir\fR] [\fB\-M\fR] [\fB\-MM\fR] [\fB\-MD\fR] [\fB\-MMD\fR] ! [\fB\-\-version\fR] [\fB\-\-help\fR] [\fB\-v\fR] [\fB\-\-verbose\fR] \fIclassname\fR... .SH "DESCRIPTION" .IX Header "DESCRIPTION" *************** implementation files which can be used a *** 161,247 **** required native methods. .SH "OPTIONS" .IX Header "OPTIONS" ! .Ip "\fB\-stubs\fR" 4 .IX Item "-stubs" This causes \f(CW\*(C`gcjh\*(C'\fR to generate stub files instead of header files. By default the stub file will be named after the class, with a suffix of \&\fB.cc\fR. In \s-1JNI\s0 mode, the default output file will have the suffix \&\fB.c\fR. ! .Ip "\fB\-jni\fR" 4 .IX Item "-jni" This tells \f(CW\*(C`gcjh\*(C'\fR to generate a \s-1JNI\s0 header or stub. By default, \&\s-1CNI\s0 headers are generated. ! .Ip "\fB\-add\fR \fItext\fR" 4 .IX Item "-add text" Inserts \fItext\fR into the class body. This is ignored in \s-1JNI\s0 mode. ! .Ip "\fB\-append\fR \fItext\fR" 4 .IX Item "-append text" Inserts \fItext\fR into the header file after the class declaration. This is ignored in \s-1JNI\s0 mode. ! .Ip "\fB\-friend\fR \fItext\fR" 4 .IX Item "-friend text" Inserts \fItext\fR into the class as a \f(CW\*(C`friend\*(C'\fR declaration. This is ignored in \s-1JNI\s0 mode. ! .Ip "\fB\-prepend\fR \fItext\fR" 4 .IX Item "-prepend text" Inserts \fItext\fR into the header file before the class declaration. This is ignored in \s-1JNI\s0 mode. ! .Ip "\fB\*(--classpath=\fR\fIpath\fR" 4 ! .IX Item "classpath=path" .PD 0 ! .Ip "\fB\*(--CLASSPATH=\fR\fIpath\fR" 4 ! .IX Item "CLASSPATH=path" ! .Ip "\fB\-I\fR\fIdirectory\fR" 4 .IX Item "-Idirectory" ! .Ip "\fB\-d\fR \fIdirectory\fR" 4 .IX Item "-d directory" ! .Ip "\fB\-o\fR \fIfile\fR" 4 .IX Item "-o file" .PD These options are all identical to the corresponding \fBgcj\fR options. ! .Ip "\fB\-o\fR \fIfile\fR" 4 .IX Item "-o file" Sets the output file name. This cannot be used if there is more than one class on the command line. ! .Ip "\fB\-td\fR \fIdirectory\fR" 4 .IX Item "-td directory" Sets the name of the directory to use for temporary files. ! .Ip "\fB\-M\fR" 4 .IX Item "-M" Print all dependencies to stdout; suppress ordinary output. ! .Ip "\fB\-MM\fR" 4 .IX Item "-MM" Print non-system dependencies to stdout; suppress ordinary output. ! .Ip "\fB\-MD\fR" 4 .IX Item "-MD" Print all dependencies to stdout. ! .Ip "\fB\-MMD\fR" 4 .IX Item "-MMD" Print non-system dependencies to stdout. ! .Ip "\fB\*(--help\fR" 4 ! .IX Item "help" Print help about \f(CW\*(C`gcjh\*(C'\fR and exit. No further processing is done. ! .Ip "\fB\*(--version\fR" 4 ! .IX Item "version" Print version information for \f(CW\*(C`gcjh\*(C'\fR and exit. No further processing is done. ! .Ip "\fB\-v, \-\-verbose\fR" 4 .IX Item "-v, --verbose" Print extra information while running. .PP All remaining options are considered to be names of classes. .SH "SEE ALSO" .IX Header "SEE ALSO" ! \&\fIgcc\fR\|(1), \fIgcj\fR\|(1), \fIgij\fR\|(1), \fIjv-scan\fR\|(1), \fIjcf-dump\fR\|(1), \fIgfdl\fR\|(7), and the Info entries for \fIgcj\fR and \fIgcc\fR. .SH "COPYRIGHT" .IX Header "COPYRIGHT" ! Copyright (C) 2001, 2002 Free Software Foundation, Inc. .PP Permission is granted to copy, distribute and/or modify this document ! under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the Invariant Sections being ``\s-1GNU\s0 General Public License'', the Front-Cover texts being (a) (see below), and with the Back-Cover Texts being (b) (see below). A copy of the license is included in the man page \fIgfdl\fR\|(7). --- 151,251 ---- required native methods. .SH "OPTIONS" .IX Header "OPTIONS" ! .IP "\fB\-stubs\fR" 4 .IX Item "-stubs" This causes \f(CW\*(C`gcjh\*(C'\fR to generate stub files instead of header files. By default the stub file will be named after the class, with a suffix of \&\fB.cc\fR. In \s-1JNI\s0 mode, the default output file will have the suffix \&\fB.c\fR. ! .IP "\fB\-jni\fR" 4 .IX Item "-jni" This tells \f(CW\*(C`gcjh\*(C'\fR to generate a \s-1JNI\s0 header or stub. By default, \&\s-1CNI\s0 headers are generated. ! .IP "\fB\-add\fR \fItext\fR" 4 .IX Item "-add text" Inserts \fItext\fR into the class body. This is ignored in \s-1JNI\s0 mode. ! .IP "\fB\-append\fR \fItext\fR" 4 .IX Item "-append text" Inserts \fItext\fR into the header file after the class declaration. This is ignored in \s-1JNI\s0 mode. ! .IP "\fB\-friend\fR \fItext\fR" 4 .IX Item "-friend text" Inserts \fItext\fR into the class as a \f(CW\*(C`friend\*(C'\fR declaration. This is ignored in \s-1JNI\s0 mode. ! .IP "\fB\-prepend\fR \fItext\fR" 4 .IX Item "-prepend text" Inserts \fItext\fR into the header file before the class declaration. This is ignored in \s-1JNI\s0 mode. ! .IP "\fB\-\-classpath=\fR\fIpath\fR" 4 ! .IX Item "--classpath=path" .PD 0 ! .IP "\fB\-\-CLASSPATH=\fR\fIpath\fR" 4 ! .IX Item "--CLASSPATH=path" ! .IP "\fB\-I\fR\fIdirectory\fR" 4 .IX Item "-Idirectory" ! .IP "\fB\-d\fR \fIdirectory\fR" 4 .IX Item "-d directory" ! .IP "\fB\-o\fR \fIfile\fR" 4 .IX Item "-o file" .PD These options are all identical to the corresponding \fBgcj\fR options. ! .IP "\fB\-o\fR \fIfile\fR" 4 .IX Item "-o file" Sets the output file name. This cannot be used if there is more than one class on the command line. ! .IP "\fB\-td\fR \fIdirectory\fR" 4 .IX Item "-td directory" Sets the name of the directory to use for temporary files. ! .IP "\fB\-M\fR" 4 .IX Item "-M" Print all dependencies to stdout; suppress ordinary output. ! .IP "\fB\-MM\fR" 4 .IX Item "-MM" Print non-system dependencies to stdout; suppress ordinary output. ! .IP "\fB\-MD\fR" 4 .IX Item "-MD" Print all dependencies to stdout. ! .IP "\fB\-MMD\fR" 4 .IX Item "-MMD" Print non-system dependencies to stdout. ! .IP "\fB\-\-help\fR" 4 ! .IX Item "--help" Print help about \f(CW\*(C`gcjh\*(C'\fR and exit. No further processing is done. ! .IP "\fB\-\-version\fR" 4 ! .IX Item "--version" Print version information for \f(CW\*(C`gcjh\*(C'\fR and exit. No further processing is done. ! .IP "\fB\-v, \-\-verbose\fR" 4 .IX Item "-v, --verbose" Print extra information while running. .PP All remaining options are considered to be names of classes. .SH "SEE ALSO" .IX Header "SEE ALSO" ! \&\fIgcc\fR\|(1), \fIgcj\fR\|(1), \fIgij\fR\|(1), \fIjv\-scan\fR\|(1), \fIjcf\-dump\fR\|(1), \fIgfdl\fR\|(7), and the Info entries for \fIgcj\fR and \fIgcc\fR. .SH "COPYRIGHT" .IX Header "COPYRIGHT" ! Copyright (c) 2001, 2002 Free Software Foundation, Inc. .PP Permission is granted to copy, distribute and/or modify this document ! under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with the Invariant Sections being ``\s-1GNU\s0 General Public License'', the Front-Cover texts being (a) (see below), and with the Back-Cover Texts being (b) (see below). A copy of the license is included in the man page \fIgfdl\fR\|(7). + .PP + (a) The \s-1FSF\s0's Front-Cover Text is: + .PP + .Vb 1 + \& A GNU Manual + .Ve + .PP + (b) The \s-1FSF\s0's Back-Cover Text is: + .PP + .Vb 3 + \& You have freedom to copy and modify this GNU Manual, like GNU + \& software. Copies published by the Free Software Foundation raise + \& funds for GNU development. + .Ve diff -Nrc3pad gcc-3.2.3/gcc/java/gcj.info gcc-3.3/gcc/java/gcj.info *** gcc-3.2.3/gcc/java/gcj.info 2003-04-22 07:07:25.000000000 +0000 --- gcc-3.3/gcc/java/gcj.info 2003-05-14 00:31:48.000000000 +0000 *************** *** 1,5 **** ! This is gcj.info, produced by makeinfo version 4.5 from gcj.texi. INFO-DIR-SECTION Programming START-INFO-DIR-ENTRY * Gcj: (gcj). Ahead-of-time compiler for the Java language --- 1,24 ---- ! This is gcj.info, produced by makeinfo version 4.2 from gcj.texi. ! ! Copyright (C) 2001, 2002 Free Software Foundation, Inc. ! ! Permission is granted to copy, distribute and/or modify this document ! under the terms of the GNU Free Documentation License, Version 1.2 or ! any later version published by the Free Software Foundation; with the ! Invariant Sections being "GNU General Public License", the Front-Cover ! texts being (a) (see below), and with the Back-Cover Texts being (b) ! (see below). A copy of the license is included in the section entitled ! "GNU Free Documentation License". ! ! (a) The FSF's Front-Cover Text is: + A GNU Manual + + (b) The FSF's Back-Cover Text is: + + You have freedom to copy and modify this GNU Manual, like GNU + software. Copies published by the Free Software Foundation raise + funds for GNU development. INFO-DIR-SECTION Programming START-INFO-DIR-ENTRY * Gcj: (gcj). Ahead-of-time compiler for the Java language *************** START-INFO-DIR-ENTRY *** 22,31 **** The remote object registry. END-INFO-DIR-ENTRY ! Copyright (C) 2001, 2002 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document ! under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the Invariant Sections being "GNU General Public License", the Front-Cover texts being (a) (see below), and with the Back-Cover Texts being (b) --- 41,50 ---- The remote object registry. END-INFO-DIR-ENTRY ! Copyright (C) 2001, 2002 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document ! under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with the Invariant Sections being "GNU General Public License", the Front-Cover texts being (a) (see below), and with the Back-Cover Texts being (b) *************** texts being (a) (see below), and with th *** 40,89 **** You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise ! funds for GNU development.  ! Indirect: ! gcj.info-1: 1742 ! gcj.info-2: 49300  Tag Table: ! (Indirect) ! Node: Top1742 ! Node: Copying2826 ! Node: GNU Free Documentation License22029 ! Node: Invoking gcj41913 ! Node: Input and output files42564 ! Node: Input Options43927 ! Node: Encodings47068 ! Node: Warnings48269 ! Node: Code Generation49300 ! Ref: Code Generation-Footnote-152820 ! Node: Configure-time Options53129 ! Node: Compatibility54547 ! Node: Invoking gcjh55839 ! Node: Invoking jv-scan57895 ! Node: Invoking jcf-dump58793 ! Node: Invoking gij59564 ! Node: Invoking jv-convert61446 ! Node: Invoking rmic62516 ! Node: Invoking rmiregistry63891 ! Node: About CNI64302 ! Node: Basic concepts65585 ! Node: Packages68568 ! Node: Primitive types70880 ! Node: Interfaces72528 ! Node: Objects and Classes73437 ! Node: Class Initialization75598 ! Node: Object allocation77832 ! Node: Arrays78807 ! Node: Methods81394 ! Node: Strings84145 ! Node: Mixing with C++85613 ! Node: Exception Handling87496 ! Node: Synchronization89131 ! Node: Invocation91111 ! Node: Reflection95180 ! Node: Resources95632  End Tag Table --- 59,2815 ---- You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise ! funds for GNU development. !  ! File: gcj.info, Node: Top, Next: Copying, Up: (dir) ! ! Introduction ! ************ ! ! This manual describes how to use `gcj', the GNU compiler for the ! Java programming language. `gcj' can generate both `.class' files and ! object files, and it can read both Java source code and `.class' files. ! ! * Menu: ! ! * Copying:: The GNU General Public License ! * GNU Free Documentation License:: ! How you can share and copy this manual ! * Invoking gcj:: Compiler options supported by `gcj' ! * Compatibility:: Compatibility between gcj and other tools for Java ! * Invoking gcjh:: Generate header files from class files ! * Invoking jv-scan:: Print information about source files ! * Invoking jcf-dump:: Print information about class files ! * Invoking gij:: Interpreting Java bytecodes ! * Invoking jv-convert:: Converting from one encoding to another ! * Invoking rmic:: Generate stubs for Remote Method Invocation. ! * Invoking rmiregistry:: The remote object registry. ! * About CNI:: Description of the Cygnus Native Interface ! * System properties:: Modifying runtime behavior of the libgcj library ! * Resources:: Where to look for more information  ! File: gcj.info, Node: Copying, Next: GNU Free Documentation License, Prev: Top, Up: Top ! ! GNU GENERAL PUBLIC LICENSE ! ************************** ! ! Version 2, June 1991 ! Copyright (C) 1989, 1991 Free Software Foundation, Inc. ! 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA ! ! Everyone is permitted to copy and distribute verbatim copies ! of this license document, but changing it is not allowed. ! ! Preamble ! ======== ! ! The licenses for most software are designed to take away your ! freedom to share and change it. By contrast, the GNU General Public ! License is intended to guarantee your freedom to share and change free ! software--to make sure the software is free for all its users. This ! General Public License applies to most of the Free Software ! Foundation's software and to any other program whose authors commit to ! using it. (Some other Free Software Foundation software is covered by ! the GNU Library General Public License instead.) You can apply it to ! your programs, too. ! ! When we speak of free software, we are referring to freedom, not ! price. Our General Public Licenses are designed to make sure that you ! have the freedom to distribute copies of free software (and charge for ! this service if you wish), that you receive source code or can get it ! if you want it, that you can change the software or use pieces of it in ! new free programs; and that you know you can do these things. ! ! To protect your rights, we need to make restrictions that forbid ! anyone to deny you these rights or to ask you to surrender the rights. ! These restrictions translate to certain responsibilities for you if you ! distribute copies of the software, or if you modify it. ! ! For example, if you distribute copies of such a program, whether ! gratis or for a fee, you must give the recipients all the rights that ! you have. You must make sure that they, too, receive or can get the ! source code. And you must show them these terms so they know their ! rights. ! ! We protect your rights with two steps: (1) copyright the software, ! and (2) offer you this license which gives you legal permission to copy, ! distribute and/or modify the software. ! ! Also, for each author's protection and ours, we want to make certain ! that everyone understands that there is no warranty for this free ! software. If the software is modified by someone else and passed on, we ! want its recipients to know that what they have is not the original, so ! that any problems introduced by others will not reflect on the original ! authors' reputations. ! ! Finally, any free program is threatened constantly by software ! patents. We wish to avoid the danger that redistributors of a free ! program will individually obtain patent licenses, in effect making the ! program proprietary. To prevent this, we have made it clear that any ! patent must be licensed for everyone's free use or not licensed at all. ! ! The precise terms and conditions for copying, distribution and ! modification follow. ! ! TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION ! 0. This License applies to any program or other work which contains a ! notice placed by the copyright holder saying it may be distributed ! under the terms of this General Public License. The "Program", ! below, refers to any such program or work, and a "work based on ! the Program" means either the Program or any derivative work under ! copyright law: that is to say, a work containing the Program or a ! portion of it, either verbatim or with modifications and/or ! translated into another language. (Hereinafter, translation is ! included without limitation in the term "modification".) Each ! licensee is addressed as "you". ! ! Activities other than copying, distribution and modification are ! not covered by this License; they are outside its scope. The act ! of running the Program is not restricted, and the output from the ! Program is covered only if its contents constitute a work based on ! the Program (independent of having been made by running the ! Program). Whether that is true depends on what the Program does. ! ! 1. You may copy and distribute verbatim copies of the Program's ! source code as you receive it, in any medium, provided that you ! conspicuously and appropriately publish on each copy an appropriate ! copyright notice and disclaimer of warranty; keep intact all the ! notices that refer to this License and to the absence of any ! warranty; and give any other recipients of the Program a copy of ! this License along with the Program. ! ! You may charge a fee for the physical act of transferring a copy, ! and you may at your option offer warranty protection in exchange ! for a fee. ! ! 2. You may modify your copy or copies of the Program or any portion ! of it, thus forming a work based on the Program, and copy and ! distribute such modifications or work under the terms of Section 1 ! above, provided that you also meet all of these conditions: ! ! a. You must cause the modified files to carry prominent notices ! stating that you changed the files and the date of any change. ! ! b. You must cause any work that you distribute or publish, that ! in whole or in part contains or is derived from the Program ! or any part thereof, to be licensed as a whole at no charge ! to all third parties under the terms of this License. ! ! c. If the modified program normally reads commands interactively ! when run, you must cause it, when started running for such ! interactive use in the most ordinary way, to print or display ! an announcement including an appropriate copyright notice and ! a notice that there is no warranty (or else, saying that you ! provide a warranty) and that users may redistribute the ! program under these conditions, and telling the user how to ! view a copy of this License. (Exception: if the Program ! itself is interactive but does not normally print such an ! announcement, your work based on the Program is not required ! to print an announcement.) ! ! These requirements apply to the modified work as a whole. If ! identifiable sections of that work are not derived from the ! Program, and can be reasonably considered independent and separate ! works in themselves, then this License, and its terms, do not ! apply to those sections when you distribute them as separate ! works. But when you distribute the same sections as part of a ! whole which is a work based on the Program, the distribution of ! the whole must be on the terms of this License, whose permissions ! for other licensees extend to the entire whole, and thus to each ! and every part regardless of who wrote it. ! ! Thus, it is not the intent of this section to claim rights or ! contest your rights to work written entirely by you; rather, the ! intent is to exercise the right to control the distribution of ! derivative or collective works based on the Program. ! ! In addition, mere aggregation of another work not based on the ! Program with the Program (or with a work based on the Program) on ! a volume of a storage or distribution medium does not bring the ! other work under the scope of this License. ! ! 3. You may copy and distribute the Program (or a work based on it, ! under Section 2) in object code or executable form under the terms ! of Sections 1 and 2 above provided that you also do one of the ! following: ! ! a. Accompany it with the complete corresponding machine-readable ! source code, which must be distributed under the terms of ! Sections 1 and 2 above on a medium customarily used for ! software interchange; or, ! ! b. Accompany it with a written offer, valid for at least three ! years, to give any third party, for a charge no more than your ! cost of physically performing source distribution, a complete ! machine-readable copy of the corresponding source code, to be ! distributed under the terms of Sections 1 and 2 above on a ! medium customarily used for software interchange; or, ! ! c. Accompany it with the information you received as to the offer ! to distribute corresponding source code. (This alternative is ! allowed only for noncommercial distribution and only if you ! received the program in object code or executable form with ! such an offer, in accord with Subsection b above.) ! ! The source code for a work means the preferred form of the work for ! making modifications to it. For an executable work, complete ! source code means all the source code for all modules it contains, ! plus any associated interface definition files, plus the scripts ! used to control compilation and installation of the executable. ! However, as a special exception, the source code distributed need ! not include anything that is normally distributed (in either ! source or binary form) with the major components (compiler, ! kernel, and so on) of the operating system on which the executable ! runs, unless that component itself accompanies the executable. ! ! If distribution of executable or object code is made by offering ! access to copy from a designated place, then offering equivalent ! access to copy the source code from the same place counts as ! distribution of the source code, even though third parties are not ! compelled to copy the source along with the object code. ! ! 4. You may not copy, modify, sublicense, or distribute the Program ! except as expressly provided under this License. Any attempt ! otherwise to copy, modify, sublicense or distribute the Program is ! void, and will automatically terminate your rights under this ! License. However, parties who have received copies, or rights, ! from you under this License will not have their licenses ! terminated so long as such parties remain in full compliance. ! ! 5. You are not required to accept this License, since you have not ! signed it. However, nothing else grants you permission to modify ! or distribute the Program or its derivative works. These actions ! are prohibited by law if you do not accept this License. ! Therefore, by modifying or distributing the Program (or any work ! based on the Program), you indicate your acceptance of this ! License to do so, and all its terms and conditions for copying, ! distributing or modifying the Program or works based on it. ! ! 6. Each time you redistribute the Program (or any work based on the ! Program), the recipient automatically receives a license from the ! original licensor to copy, distribute or modify the Program ! subject to these terms and conditions. You may not impose any ! further restrictions on the recipients' exercise of the rights ! granted herein. You are not responsible for enforcing compliance ! by third parties to this License. ! ! 7. If, as a consequence of a court judgment or allegation of patent ! infringement or for any other reason (not limited to patent ! issues), conditions are imposed on you (whether by court order, ! agreement or otherwise) that contradict the conditions of this ! License, they do not excuse you from the conditions of this ! License. If you cannot distribute so as to satisfy simultaneously ! your obligations under this License and any other pertinent ! obligations, then as a consequence you may not distribute the ! Program at all. For example, if a patent license would not permit ! royalty-free redistribution of the Program by all those who ! receive copies directly or indirectly through you, then the only ! way you could satisfy both it and this License would be to refrain ! entirely from distribution of the Program. ! ! If any portion of this section is held invalid or unenforceable ! under any particular circumstance, the balance of the section is ! intended to apply and the section as a whole is intended to apply ! in other circumstances. ! ! It is not the purpose of this section to induce you to infringe any ! patents or other property right claims or to contest validity of ! any such claims; this section has the sole purpose of protecting ! the integrity of the free software distribution system, which is ! implemented by public license practices. Many people have made ! generous contributions to the wide range of software distributed ! through that system in reliance on consistent application of that ! system; it is up to the author/donor to decide if he or she is ! willing to distribute software through any other system and a ! licensee cannot impose that choice. ! ! This section is intended to make thoroughly clear what is believed ! to be a consequence of the rest of this License. ! ! 8. If the distribution and/or use of the Program is restricted in ! certain countries either by patents or by copyrighted interfaces, ! the original copyright holder who places the Program under this ! License may add an explicit geographical distribution limitation ! excluding those countries, so that distribution is permitted only ! in or among countries not thus excluded. In such case, this ! License incorporates the limitation as if written in the body of ! this License. ! ! 9. The Free Software Foundation may publish revised and/or new ! versions of the General Public License from time to time. Such ! new versions will be similar in spirit to the present version, but ! may differ in detail to address new problems or concerns. ! ! Each version is given a distinguishing version number. If the ! Program specifies a version number of this License which applies ! to it and "any later version", you have the option of following ! the terms and conditions either of that version or of any later ! version published by the Free Software Foundation. If the Program ! does not specify a version number of this License, you may choose ! any version ever published by the Free Software Foundation. ! ! 10. If you wish to incorporate parts of the Program into other free ! programs whose distribution conditions are different, write to the ! author to ask for permission. For software which is copyrighted ! by the Free Software Foundation, write to the Free Software ! Foundation; we sometimes make exceptions for this. Our decision ! will be guided by the two goals of preserving the free status of ! all derivatives of our free software and of promoting the sharing ! and reuse of software generally. ! ! NO WARRANTY ! ! 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO ! WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE ! LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT ! HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT ! WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT ! NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND ! FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE ! QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE ! PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY ! SERVICING, REPAIR OR CORRECTION. ! ! 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN ! WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY ! MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE ! LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, ! INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR ! INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF ! DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU ! OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY ! OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ! ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. ! ! END OF TERMS AND CONDITIONS ! ! How to Apply These Terms to Your New Programs ! ============================================= ! ! If you develop a new program, and you want it to be of the greatest ! possible use to the public, the best way to achieve this is to make it ! free software which everyone can redistribute and change under these ! terms. ! ! To do so, attach the following notices to the program. It is safest ! to attach them to the start of each source file to most effectively ! convey the exclusion of warranty; and each file should have at least ! the "copyright" line and a pointer to where the full notice is found. ! ! ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES. ! Copyright (C) YEAR NAME OF AUTHOR ! ! This program is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2 of the License, or ! (at your option) any later version. ! ! This program is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! GNU General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with this program; if not, write to the Free Software Foundation, ! Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! ! Also add information on how to contact you by electronic and paper ! mail. ! ! If the program is interactive, make it output a short notice like ! this when it starts in an interactive mode: ! ! Gnomovision version 69, Copyright (C) YEAR NAME OF AUTHOR ! Gnomovision comes with ABSOLUTELY NO WARRANTY; for details ! type `show w'. ! This is free software, and you are welcome to redistribute it ! under certain conditions; type `show c' for details. ! ! The hypothetical commands `show w' and `show c' should show the ! appropriate parts of the General Public License. Of course, the ! commands you use may be called something other than `show w' and `show ! c'; they could even be mouse-clicks or menu items--whatever suits your ! program. ! ! You should also get your employer (if you work as a programmer) or ! your school, if any, to sign a "copyright disclaimer" for the program, ! if necessary. Here is a sample; alter the names: ! ! Yoyodyne, Inc., hereby disclaims all copyright interest in the program ! `Gnomovision' (which makes passes at compilers) written by James Hacker. ! ! SIGNATURE OF TY COON, 1 April 1989 ! Ty Coon, President of Vice ! ! This General Public License does not permit incorporating your ! program into proprietary programs. If your program is a subroutine ! library, you may consider it more useful to permit linking proprietary ! applications with the library. If this is what you want to do, use the ! GNU Library General Public License instead of this License. ! !  ! File: gcj.info, Node: GNU Free Documentation License, Next: Invoking gcj, Prev: Copying, Up: Top ! ! GNU Free Documentation License ! ****************************** ! ! Version 1.2, November 2002 ! Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. ! 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA ! ! Everyone is permitted to copy and distribute verbatim copies ! of this license document, but changing it is not allowed. ! ! 0. PREAMBLE ! ! The purpose of this License is to make a manual, textbook, or other ! functional and useful document "free" in the sense of freedom: to ! assure everyone the effective freedom to copy and redistribute it, ! with or without modifying it, either commercially or ! noncommercially. Secondarily, this License preserves for the ! author and publisher a way to get credit for their work, while not ! being considered responsible for modifications made by others. ! ! This License is a kind of "copyleft", which means that derivative ! works of the document must themselves be free in the same sense. ! It complements the GNU General Public License, which is a copyleft ! license designed for free software. ! ! We have designed this License in order to use it for manuals for ! free software, because free software needs free documentation: a ! free program should come with manuals providing the same freedoms ! that the software does. But this License is not limited to ! software manuals; it can be used for any textual work, regardless ! of subject matter or whether it is published as a printed book. ! We recommend this License principally for works whose purpose is ! instruction or reference. ! ! 1. APPLICABILITY AND DEFINITIONS ! ! This License applies to any manual or other work, in any medium, ! that contains a notice placed by the copyright holder saying it ! can be distributed under the terms of this License. Such a notice ! grants a world-wide, royalty-free license, unlimited in duration, ! to use that work under the conditions stated herein. The ! "Document", below, refers to any such manual or work. Any member ! of the public is a licensee, and is addressed as "you". You ! accept the license if you copy, modify or distribute the work in a ! way requiring permission under copyright law. ! ! A "Modified Version" of the Document means any work containing the ! Document or a portion of it, either copied verbatim, or with ! modifications and/or translated into another language. ! ! A "Secondary Section" is a named appendix or a front-matter section ! of the Document that deals exclusively with the relationship of the ! publishers or authors of the Document to the Document's overall ! subject (or to related matters) and contains nothing that could ! fall directly within that overall subject. (Thus, if the Document ! is in part a textbook of mathematics, a Secondary Section may not ! explain any mathematics.) The relationship could be a matter of ! historical connection with the subject or with related matters, or ! of legal, commercial, philosophical, ethical or political position ! regarding them. ! ! The "Invariant Sections" are certain Secondary Sections whose ! titles are designated, as being those of Invariant Sections, in ! the notice that says that the Document is released under this ! License. If a section does not fit the above definition of ! Secondary then it is not allowed to be designated as Invariant. ! The Document may contain zero Invariant Sections. If the Document ! does not identify any Invariant Sections then there are none. ! ! The "Cover Texts" are certain short passages of text that are ! listed, as Front-Cover Texts or Back-Cover Texts, in the notice ! that says that the Document is released under this License. A ! Front-Cover Text may be at most 5 words, and a Back-Cover Text may ! be at most 25 words. ! ! A "Transparent" copy of the Document means a machine-readable copy, ! represented in a format whose specification is available to the ! general public, that is suitable for revising the document ! straightforwardly with generic text editors or (for images ! composed of pixels) generic paint programs or (for drawings) some ! widely available drawing editor, and that is suitable for input to ! text formatters or for automatic translation to a variety of ! formats suitable for input to text formatters. A copy made in an ! otherwise Transparent file format whose markup, or absence of ! markup, has been arranged to thwart or discourage subsequent ! modification by readers is not Transparent. An image format is ! not Transparent if used for any substantial amount of text. A ! copy that is not "Transparent" is called "Opaque". ! ! Examples of suitable formats for Transparent copies include plain ! ASCII without markup, Texinfo input format, LaTeX input format, ! SGML or XML using a publicly available DTD, and ! standard-conforming simple HTML, PostScript or PDF designed for ! human modification. Examples of transparent image formats include ! PNG, XCF and JPG. Opaque formats include proprietary formats that ! can be read and edited only by proprietary word processors, SGML or ! XML for which the DTD and/or processing tools are not generally ! available, and the machine-generated HTML, PostScript or PDF ! produced by some word processors for output purposes only. ! ! The "Title Page" means, for a printed book, the title page itself, ! plus such following pages as are needed to hold, legibly, the ! material this License requires to appear in the title page. For ! works in formats which do not have any title page as such, "Title ! Page" means the text near the most prominent appearance of the ! work's title, preceding the beginning of the body of the text. ! ! A section "Entitled XYZ" means a named subunit of the Document ! whose title either is precisely XYZ or contains XYZ in parentheses ! following text that translates XYZ in another language. (Here XYZ ! stands for a specific section name mentioned below, such as ! "Acknowledgements", "Dedications", "Endorsements", or "History".) ! To "Preserve the Title" of such a section when you modify the ! Document means that it remains a section "Entitled XYZ" according ! to this definition. ! ! The Document may include Warranty Disclaimers next to the notice ! which states that this License applies to the Document. These ! Warranty Disclaimers are considered to be included by reference in ! this License, but only as regards disclaiming warranties: any other ! implication that these Warranty Disclaimers may have is void and ! has no effect on the meaning of this License. ! ! 2. VERBATIM COPYING ! ! You may copy and distribute the Document in any medium, either ! commercially or noncommercially, provided that this License, the ! copyright notices, and the license notice saying this License ! applies to the Document are reproduced in all copies, and that you ! add no other conditions whatsoever to those of this License. You ! may not use technical measures to obstruct or control the reading ! or further copying of the copies you make or distribute. However, ! you may accept compensation in exchange for copies. If you ! distribute a large enough number of copies you must also follow ! the conditions in section 3. ! ! You may also lend copies, under the same conditions stated above, ! and you may publicly display copies. ! ! 3. COPYING IN QUANTITY ! ! If you publish printed copies (or copies in media that commonly ! have printed covers) of the Document, numbering more than 100, and ! the Document's license notice requires Cover Texts, you must ! enclose the copies in covers that carry, clearly and legibly, all ! these Cover Texts: Front-Cover Texts on the front cover, and ! Back-Cover Texts on the back cover. Both covers must also clearly ! and legibly identify you as the publisher of these copies. The ! front cover must present the full title with all words of the ! title equally prominent and visible. You may add other material ! on the covers in addition. Copying with changes limited to the ! covers, as long as they preserve the title of the Document and ! satisfy these conditions, can be treated as verbatim copying in ! other respects. ! ! If the required texts for either cover are too voluminous to fit ! legibly, you should put the first ones listed (as many as fit ! reasonably) on the actual cover, and continue the rest onto ! adjacent pages. ! ! If you publish or distribute Opaque copies of the Document ! numbering more than 100, you must either include a ! machine-readable Transparent copy along with each Opaque copy, or ! state in or with each Opaque copy a computer-network location from ! which the general network-using public has access to download ! using public-standard network protocols a complete Transparent ! copy of the Document, free of added material. If you use the ! latter option, you must take reasonably prudent steps, when you ! begin distribution of Opaque copies in quantity, to ensure that ! this Transparent copy will remain thus accessible at the stated ! location until at least one year after the last time you ! distribute an Opaque copy (directly or through your agents or ! retailers) of that edition to the public. ! ! It is requested, but not required, that you contact the authors of ! the Document well before redistributing any large number of ! copies, to give them a chance to provide you with an updated ! version of the Document. ! ! 4. MODIFICATIONS ! ! You may copy and distribute a Modified Version of the Document ! under the conditions of sections 2 and 3 above, provided that you ! release the Modified Version under precisely this License, with ! the Modified Version filling the role of the Document, thus ! licensing distribution and modification of the Modified Version to ! whoever possesses a copy of it. In addition, you must do these ! things in the Modified Version: ! ! A. Use in the Title Page (and on the covers, if any) a title ! distinct from that of the Document, and from those of ! previous versions (which should, if there were any, be listed ! in the History section of the Document). You may use the ! same title as a previous version if the original publisher of ! that version gives permission. ! ! B. List on the Title Page, as authors, one or more persons or ! entities responsible for authorship of the modifications in ! the Modified Version, together with at least five of the ! principal authors of the Document (all of its principal ! authors, if it has fewer than five), unless they release you ! from this requirement. ! ! C. State on the Title page the name of the publisher of the ! Modified Version, as the publisher. ! ! D. Preserve all the copyright notices of the Document. ! ! E. Add an appropriate copyright notice for your modifications ! adjacent to the other copyright notices. ! ! F. Include, immediately after the copyright notices, a license ! notice giving the public permission to use the Modified ! Version under the terms of this License, in the form shown in ! the Addendum below. ! ! G. Preserve in that license notice the full lists of Invariant ! Sections and required Cover Texts given in the Document's ! license notice. ! ! H. Include an unaltered copy of this License. ! ! I. Preserve the section Entitled "History", Preserve its Title, ! and add to it an item stating at least the title, year, new ! authors, and publisher of the Modified Version as given on ! the Title Page. If there is no section Entitled "History" in ! the Document, create one stating the title, year, authors, ! and publisher of the Document as given on its Title Page, ! then add an item describing the Modified Version as stated in ! the previous sentence. ! ! J. Preserve the network location, if any, given in the Document ! for public access to a Transparent copy of the Document, and ! likewise the network locations given in the Document for ! previous versions it was based on. These may be placed in ! the "History" section. You may omit a network location for a ! work that was published at least four years before the ! Document itself, or if the original publisher of the version ! it refers to gives permission. ! ! K. For any section Entitled "Acknowledgements" or "Dedications", ! Preserve the Title of the section, and preserve in the ! section all the substance and tone of each of the contributor ! acknowledgements and/or dedications given therein. ! ! L. Preserve all the Invariant Sections of the Document, ! unaltered in their text and in their titles. Section numbers ! or the equivalent are not considered part of the section ! titles. ! ! M. Delete any section Entitled "Endorsements". Such a section ! may not be included in the Modified Version. ! ! N. Do not retitle any existing section to be Entitled ! "Endorsements" or to conflict in title with any Invariant ! Section. ! ! O. Preserve any Warranty Disclaimers. ! ! If the Modified Version includes new front-matter sections or ! appendices that qualify as Secondary Sections and contain no ! material copied from the Document, you may at your option ! designate some or all of these sections as invariant. To do this, ! add their titles to the list of Invariant Sections in the Modified ! Version's license notice. These titles must be distinct from any ! other section titles. ! ! You may add a section Entitled "Endorsements", provided it contains ! nothing but endorsements of your Modified Version by various ! parties--for example, statements of peer review or that the text ! has been approved by an organization as the authoritative ! definition of a standard. ! ! You may add a passage of up to five words as a Front-Cover Text, ! and a passage of up to 25 words as a Back-Cover Text, to the end ! of the list of Cover Texts in the Modified Version. Only one ! passage of Front-Cover Text and one of Back-Cover Text may be ! added by (or through arrangements made by) any one entity. If the ! Document already includes a cover text for the same cover, ! previously added by you or by arrangement made by the same entity ! you are acting on behalf of, you may not add another; but you may ! replace the old one, on explicit permission from the previous ! publisher that added the old one. ! ! The author(s) and publisher(s) of the Document do not by this ! License give permission to use their names for publicity for or to ! assert or imply endorsement of any Modified Version. ! ! 5. COMBINING DOCUMENTS ! ! You may combine the Document with other documents released under ! this License, under the terms defined in section 4 above for ! modified versions, provided that you include in the combination ! all of the Invariant Sections of all of the original documents, ! unmodified, and list them all as Invariant Sections of your ! combined work in its license notice, and that you preserve all ! their Warranty Disclaimers. ! ! The combined work need only contain one copy of this License, and ! multiple identical Invariant Sections may be replaced with a single ! copy. If there are multiple Invariant Sections with the same name ! but different contents, make the title of each such section unique ! by adding at the end of it, in parentheses, the name of the ! original author or publisher of that section if known, or else a ! unique number. Make the same adjustment to the section titles in ! the list of Invariant Sections in the license notice of the ! combined work. ! ! In the combination, you must combine any sections Entitled ! "History" in the various original documents, forming one section ! Entitled "History"; likewise combine any sections Entitled ! "Acknowledgements", and any sections Entitled "Dedications". You ! must delete all sections Entitled "Endorsements." ! ! 6. COLLECTIONS OF DOCUMENTS ! ! You may make a collection consisting of the Document and other ! documents released under this License, and replace the individual ! copies of this License in the various documents with a single copy ! that is included in the collection, provided that you follow the ! rules of this License for verbatim copying of each of the ! documents in all other respects. ! ! You may extract a single document from such a collection, and ! distribute it individually under this License, provided you insert ! a copy of this License into the extracted document, and follow ! this License in all other respects regarding verbatim copying of ! that document. ! ! 7. AGGREGATION WITH INDEPENDENT WORKS ! ! A compilation of the Document or its derivatives with other ! separate and independent documents or works, in or on a volume of ! a storage or distribution medium, is called an "aggregate" if the ! copyright resulting from the compilation is not used to limit the ! legal rights of the compilation's users beyond what the individual ! works permit. When the Document is included an aggregate, this ! License does not apply to the other works in the aggregate which ! are not themselves derivative works of the Document. ! ! If the Cover Text requirement of section 3 is applicable to these ! copies of the Document, then if the Document is less than one half ! of the entire aggregate, the Document's Cover Texts may be placed ! on covers that bracket the Document within the aggregate, or the ! electronic equivalent of covers if the Document is in electronic ! form. Otherwise they must appear on printed covers that bracket ! the whole aggregate. ! ! 8. TRANSLATION ! ! Translation is considered a kind of modification, so you may ! distribute translations of the Document under the terms of section ! 4. Replacing Invariant Sections with translations requires special ! permission from their copyright holders, but you may include ! translations of some or all Invariant Sections in addition to the ! original versions of these Invariant Sections. You may include a ! translation of this License, and all the license notices in the ! Document, and any Warrany Disclaimers, provided that you also ! include the original English version of this License and the ! original versions of those notices and disclaimers. In case of a ! disagreement between the translation and the original version of ! this License or a notice or disclaimer, the original version will ! prevail. ! ! If a section in the Document is Entitled "Acknowledgements", ! "Dedications", or "History", the requirement (section 4) to ! Preserve its Title (section 1) will typically require changing the ! actual title. ! ! 9. TERMINATION ! ! You may not copy, modify, sublicense, or distribute the Document ! except as expressly provided for under this License. Any other ! attempt to copy, modify, sublicense or distribute the Document is ! void, and will automatically terminate your rights under this ! License. However, parties who have received copies, or rights, ! from you under this License will not have their licenses ! terminated so long as such parties remain in full compliance. ! ! 10. FUTURE REVISIONS OF THIS LICENSE ! ! The Free Software Foundation may publish new, revised versions of ! the GNU Free Documentation License from time to time. Such new ! versions will be similar in spirit to the present version, but may ! differ in detail to address new problems or concerns. See ! `http://www.gnu.org/copyleft/'. ! ! Each version of the License is given a distinguishing version ! number. If the Document specifies that a particular numbered ! version of this License "or any later version" applies to it, you ! have the option of following the terms and conditions either of ! that specified version or of any later version that has been ! published (not as a draft) by the Free Software Foundation. If ! the Document does not specify a version number of this License, ! you may choose any version ever published (not as a draft) by the ! Free Software Foundation. ! ! ADDENDUM: How to use this License for your documents ! ==================================================== ! ! To use this License in a document you have written, include a copy of ! the License in the document and put the following copyright and license ! notices just after the title page: ! ! Copyright (C) YEAR YOUR NAME. ! Permission is granted to copy, distribute and/or modify this document ! under the terms of the GNU Free Documentation License, Version 1.2 ! or any later version published by the Free Software Foundation; ! with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. ! A copy of the license is included in the section entitled ``GNU ! Free Documentation License''. ! ! If you have Invariant Sections, Front-Cover Texts and Back-Cover ! Texts, replace the "with...Texts." line with this: ! ! with the Invariant Sections being LIST THEIR TITLES, with ! the Front-Cover Texts being LIST, and with the Back-Cover Texts ! being LIST. ! ! If you have Invariant Sections without Cover Texts, or some other ! combination of the three, merge those two alternatives to suit the ! situation. ! ! If your document contains nontrivial examples of program code, we ! recommend releasing these examples in parallel under your choice of ! free software license, such as the GNU General Public License, to ! permit their use in free software. ! !  ! File: gcj.info, Node: Invoking gcj, Next: Compatibility, Prev: GNU Free Documentation License, Up: Top ! ! Invoking gcj ! ************ ! ! As `gcj' is just another front end to `gcc', it supports many of the ! same options as gcc. *Note Option Summary: (gcc)Option Summary. This ! manual only documents the options specific to `gcj'. ! ! * Menu: ! ! * Input and output files:: ! * Input Options:: How gcj finds files ! * Encodings:: Options controlling source file encoding ! * Warnings:: Options controlling warnings specific to gcj ! * Code Generation:: Options controlling the output of gcj ! * Configure-time Options:: Options you won't use ! !  ! File: gcj.info, Node: Input and output files, Next: Input Options, Up: Invoking gcj ! ! Input and output files ! ====================== ! ! A `gcj' command is like a `gcc' command, in that it consists of a ! number of options and file names. The following kinds of input file ! names are supported: ! ! `FILE.java' ! Java source files. ! ! `FILE.class' ! Java bytecode files. ! ! `FILE.zip' ! `FILE.jar' ! An archive containing one or more `.class' files, all of which are ! compiled. The archive may be compressed. ! ! `@FILE' ! A file containing a whitespace-separated list of input file names. ! (Currently, these must all be `.java' source files, but that may ! change.) Each named file is compiled, just as if it had been on ! the command line. ! ! `LIBRARY.a' ! `LIBRARY.so' ! `-lLIBNAME' ! Libraries to use when linking. See the `gcc' manual. ! ! You can specify more than one input file on the `gcj' command line, ! in which case they will all be compiled. If you specify a `-o FILENAME' ! option, all the input files will be compiled together, producing a ! single output file, named FILENAME. This is allowed even when using ! `-S' or `-c', but not when using `-C' or `--resource'. (This is an ! extension beyond the what plain `gcc' allows.) (If more than one input ! file is specified, all must currently be `.java' files, though we hope ! to fix this.) ! !  ! File: gcj.info, Node: Input Options, Next: Encodings, Prev: Input and output files, Up: Invoking gcj ! ! Input Options ! ============= ! ! `gcj' has options to control where it looks to find files it needs. ! For instance, `gcj' might need to load a class that is referenced by ! the file it has been asked to compile. Like other compilers for the ! Java language, `gcj' has a notion of a "class path". There are several ! options and environment variables which can be used to manipulate the ! class path. When `gcj' looks for a given class, it searches the class ! path looking for matching `.class' or `.java' file. `gcj' comes with a ! built-in class path which points at the installed `libgcj.jar', a file ! which contains all the standard classes. ! ! In the below, a directory or path component can refer either to an ! actual directory on the filesystem, or to a `.zip' or `.jar' file, ! which `gcj' will search as if it is a directory. ! ! `-IDIR' ! All directories specified by `-I' are kept in order and prepended ! to the class path constructed from all the other options. Unless ! compatibility with tools like `javac' is important, we recommend ! always using `-I' instead of the other options for manipulating the ! class path. ! ! `--classpath=PATH' ! This sets the class path to PATH, a colon-separated list of paths ! (on Windows-based systems, a semicolon-separate list of paths). ! This does not override the builtin ("boot") search path. ! ! `--CLASSPATH=PATH' ! Deprecated synonym for `--classpath'. ! ! `--bootclasspath=PATH' ! Where to find the standard builtin classes, such as ! `java.lang.String'. ! ! `--extdirs=PATH' ! For each directory in the PATH, place the contents of that ! directory at the end of the class path. ! ! `CLASSPATH' ! This is an environment variable which holds a list of paths. ! ! The final class path is constructed like so: ! ! * First come all directories specified via `-I'. ! ! * If `--classpath' is specified, its value is appended. Otherwise, ! if the `CLASSPATH' environment variable is specified, then its ! value is appended. Otherwise, the current directory (`"."') is ! appended. ! ! * If `--bootclasspath' was specified, append its value. Otherwise, ! append the built-in system directory, `libgcj.jar'. ! ! * Finally, if `--extdirs' was specified, append the contents of the ! specified directories at the end of the class path. Otherwise, ! append the contents of the built-in extdirs at ! `$(prefix)/share/java/ext'. ! ! The classfile built by `gcj' for the class `java.lang.Object' (and ! placed in `libgcj.jar') contains a special zero length attribute ! `gnu.gcj.gcj-compiled'. The compiler looks for this attribute when ! loading `java.lang.Object' and will report an error if it isn't found, ! unless it compiles to bytecode (the option ! `-fforce-classes-archive-check' can be used to override this behavior ! in this particular case.) ! ! `-fforce-classes-archive-check' ! This forces the compiler to always check for the special zero ! length attribute `gnu.gcj.gcj-compiled' in `java.lang.Object' and ! issue an error if it isn't found. ! !  ! File: gcj.info, Node: Encodings, Next: Warnings, Prev: Input Options, Up: Invoking gcj ! ! Encodings ! ========= ! ! The Java programming language uses Unicode throughout. In an effort ! to integrate well with other locales, `gcj' allows `.java' files to be ! written using almost any encoding. `gcj' knows how to convert these ! encodings into its internal encoding at compile time. ! ! You can use the `--encoding=NAME' option to specify an encoding (of ! a particular character set) to use for source files. If this is not ! specified, the default encoding comes from your current locale. If ! your host system has insufficient locale support, then `gcj' assumes ! the default encoding to be the `UTF-8' encoding of Unicode. ! ! To implement `--encoding', `gcj' simply uses the host platform's ! `iconv' conversion routine. This means that in practice `gcj' is ! limited by the capabilities of the host platform. ! ! The names allowed for the argument `--encoding' vary from platform ! to platform (since they are not standardized anywhere). However, `gcj' ! implements the encoding named `UTF-8' internally, so if you choose to ! use this for your source files you can be assured that it will work on ! every host. ! !  ! File: gcj.info, Node: Warnings, Next: Code Generation, Prev: Encodings, Up: Invoking gcj ! ! Warnings ! ======== ! ! `gcj' implements several warnings. As with other generic `gcc' ! warnings, if an option of the form `-Wfoo' enables a warning, then ! `-Wno-foo' will disable it. Here we've chosen to document the form of ! the warning which will have an effect - the default being the opposite ! of what is listed. ! ! `-Wredundant-modifiers' ! With this flag, `gcj' will warn about redundant modifiers. For ! instance, it will warn if an interface method is declared `public'. ! ! `-Wextraneous-semicolon' ! This causes `gcj' to warn about empty statements. Empty statements ! have been deprecated. ! ! `-Wno-out-of-date' ! This option will cause `gcj' not to warn when a source file is ! newer than its matching class file. By default `gcj' will warn ! about this. ! ! `-Wunused' ! This is the same as `gcc''s `-Wunused'. ! ! `-Wall' ! This is the same as `-Wredundant-modifiers -Wextraneous-semicolon ! -Wunused'. ! !  ! File: gcj.info, Node: Code Generation, Next: Configure-time Options, Prev: Warnings, Up: Invoking gcj ! ! Code Generation ! =============== ! ! In addition to the many `gcc' options controlling code generation, ! `gcj' has several options specific to itself. ! ! `--main=CLASSNAME' ! This option is used when linking to specify the name of the class ! whose `main' method should be invoked when the resulting ! executable is run. (1) ! ! `-DNAME[=VALUE]' ! This option can only be used with `--main'. It defines a system ! property named NAME with value VALUE. If VALUE is not specified ! then it defaults to the empty string. These system properties are ! initialized at the program's startup and can be retrieved at ! runtime using the `java.lang.System.getProperty' method. ! ! `-C' ! This option is used to tell `gcj' to generate bytecode (`.class' ! files) rather than object code. ! ! `--resource RESOURCE-NAME' ! This option is used to tell `gcj' to compile the contents of a ! given file to object code so it may be accessed at runtime with ! the core protocol handler as `core:/RESOURCE-NAME'. Note that ! RESOURCE-NAME is the name of the resource as found at runtime; for ! instance, it could be used in a call to `ResourceBundle.getBundle'. ! The actual file name to be compiled this way must be specified ! separately. ! ! `-d DIRECTORY' ! When used with `-C', this causes all generated `.class' files to ! be put in the appropriate subdirectory of DIRECTORY. By default ! they will be put in subdirectories of the current working ! directory. ! ! `-fno-bounds-check' ! By default, `gcj' generates code which checks the bounds of all ! array indexing operations. With this option, these checks are ! omitted, which can improve performance for code that uses arrays ! extensively. Note that this can result in unpredictable behavior ! if the code in question actually does violate array bounds ! constraints. It is safe to use this option if you are sure that ! your code will never throw an `ArrayIndexOutOfBoundsException'. ! ! `-fno-store-check' ! Don't generate array store checks. When storing objects into ! arrays, a runtime check is normally generated in order to ensure ! that the object is assignment compatible with the component type ! of the array (which may not be known at compile-time). With this ! option, these checks are omitted. This can improve performance ! for code which stores objects into arrays frequently. It is safe ! to use this option if you are sure your code will never throw an ! `ArrayStoreException'. ! ! `-fjni' ! With `gcj' there are two options for writing native methods: CNI ! and JNI. By default `gcj' assumes you are using CNI. If you are ! compiling a class with native methods, and these methods are ! implemented using JNI, then you must use `-fjni'. This option ! causes `gcj' to generate stubs which will invoke the underlying JNI ! methods. ! ! `-fno-assert' ! Don't recognize the `assert' keyword. This is for compatibility ! with older versions of the language specification. ! ! `-fno-optimize-static-class-initialization' ! When the optimization level is greater or equal to `-O2', `gcj' ! will try to optimize the way calls into the runtime are made to ! initialize static classes upon their first use (this optimization ! isn't carried out if `-C' was specified.) When compiling to native ! code, `-fno-optimize-static-class-initialization' will turn this ! optimization off, regardless of the optimization level in use. ! ! ---------- Footnotes ---------- ! ! (1) The linker by default looks for a global function named `main'. ! Since Java does not have global functions, and a collection of Java ! classes may have more than one class with a `main' method, you need to ! let the linker know which of those `main' methods it should invoke when ! starting the application. ! !  ! File: gcj.info, Node: Configure-time Options, Prev: Code Generation, Up: Invoking gcj ! ! Configure-time Options ! ====================== ! ! Some `gcj' code generations options affect the resulting ABI, and so ! can only be meaningfully given when `libgcj', the runtime package, is ! configured. `libgcj' puts the appropriate options from this group into ! a `spec' file which is read by `gcj'. These options are listed here ! for completeness; if you are using `libgcj' then you won't want to ! touch these options. ! ! `-fuse-boehm-gc' ! This enables the use of the Boehm GC bitmap marking code. In ! particular this causes `gcj' to put an object marking descriptor ! into each vtable. ! ! `-fhash-synchronization' ! By default, synchronization data (the data used for `synchronize', ! `wait', and `notify') is pointed to by a word in each object. ! With this option `gcj' assumes that this information is stored in a ! hash table and not in the object itself. ! ! `-fuse-divide-subroutine' ! On some systems, a library routine is called to perform integer ! division. This is required to get exception handling correct when ! dividing by zero. ! ! `-fcheck-references' ! On some systems it's necessary to insert inline checks whenever ! accessing an object via a reference. On other systems you won't ! need this because null pointer accesses are caught automatically ! by the processor. ! !  ! File: gcj.info, Node: Compatibility, Next: Invoking gcjh, Prev: Invoking gcj, Up: Top ! ! Compatibility with the Java Platform ! ************************************ ! ! As we believe it is important that the Java platform not be ! fragmented, `gcj' and `libgcj' try to conform to the relevant Java ! specifications. However, limited manpower and incomplete and unclear ! documentation work against us. So, there are caveats to using `gcj'. ! ! * Menu: ! ! * Limitations:: ! * Extensions:: ! !  ! File: gcj.info, Node: Limitations, Next: Extensions, Up: Compatibility ! ! Standard features not yet supported ! =================================== ! ! This list of compatibility issues is by no means complete. ! ! * `gcj' implements the JDK 1.2 language. It supports inner classes ! and the new 1.4 `assert' keyword. It does not yet support the ! Java 2 `strictfp' keyword (it recognizes the keyword but ignores ! it). ! ! * `libgcj' is largely compatible with the JDK 1.2 libraries. ! However, `libgcj' is missing many packages, most notably ! `java.awt'. There are also individual missing classes and methods. ! We currently do not have a list showing differences between ! `libgcj' and the Java 2 platform. ! ! * Sometimes the `libgcj' implementation of a method or class differs ! from the JDK implementation. This is not always a bug. Still, if ! it affects you, it probably makes sense to report it so that we ! can discuss the appropriate response. ! ! * `gcj' does not currently allow for piecemeal replacement of ! components within `libgcj'. Unfortunately, programmers often want ! to use newer versions of certain packages, such as those provided ! by the Apache Software Foundation's Jakarta project. This has ! forced us to place the `org.w3c.dom' and `org.xml.sax' packages ! into their own libraries, separate from `libgcj'. If you intend to ! use these classes, you must link them explicitly with ! `-l-org-w3c-dom' and `-l-org-xml-sax'. Future versions of `gcj' ! may not have this restriction. ! !  ! File: gcj.info, Node: Extensions, Prev: Limitations, Up: Compatibility ! ! Extra features unique to gcj ! ============================ ! ! The main feature of `gcj' is that it can compile programs written in ! the Java programming language to native code. Most extensions that ! have been added are to facilitate this functionality. ! ! * `gcj' makes it easy and efficient to mix code written in Java and ! C++. *Note About CNI::, for more info on how to use this in your ! programs. ! ! * When you compile your classes into a shared library they can be ! automatically loaded by the `libgcj' system classloader. When ! trying to load a class `gnu.pkg.SomeClass' the system classloader ! will first try to load the shared library ! `lib-gnu-pkg-SomeClass.so', if that fails to load the class then ! it will try to load `lib-gnu-pkg.so' and finally when the class is ! still not loaded it will try to load `lib-gnu.so'. Note that all ! `.'s will be transformed into `-'s and that searching for inner ! classes starts with their outermost outer class. If the class ! cannot be found this way the system classloader tries to use the ! `libgcj' bytecode interpreter to load the class from the standard ! classpath. ! !  ! File: gcj.info, Node: Invoking gcjh, Next: Invoking jv-scan, Prev: Compatibility, Up: Top ! ! Invoking gcjh ! ************* ! ! The `gcjh' program is used to generate header files from class ! files. It can generate both CNI and JNI header files, as well as stub ! implementation files which can be used as a basis for implementing the ! required native methods. ! ! `-stubs' ! This causes `gcjh' to generate stub files instead of header files. ! By default the stub file will be named after the class, with a ! suffix of `.cc'. In JNI mode, the default output file will have ! the suffix `.c'. ! ! `-jni' ! This tells `gcjh' to generate a JNI header or stub. By default, ! CNI headers are generated. ! ! `-add TEXT' ! Inserts TEXT into the class body. This is ignored in JNI mode. ! ! `-append TEXT' ! Inserts TEXT into the header file after the class declaration. ! This is ignored in JNI mode. ! ! `-friend TEXT' ! Inserts TEXT into the class as a `friend' declaration. This is ! ignored in JNI mode. ! ! `-prepend TEXT' ! Inserts TEXT into the header file before the class declaration. ! This is ignored in JNI mode. ! ! `--classpath=PATH' ! `--CLASSPATH=PATH' ! `-IDIRECTORY' ! `-d DIRECTORY' ! `-o FILE' ! These options are all identical to the corresponding `gcj' options. ! ! `-o FILE' ! Sets the output file name. This cannot be used if there is more ! than one class on the command line. ! ! `-td DIRECTORY' ! Sets the name of the directory to use for temporary files. ! ! `-M' ! Print all dependencies to stdout; suppress ordinary output. ! ! `-MM' ! Print non-system dependencies to stdout; suppress ordinary output. ! ! `-MD' ! Print all dependencies to stdout. ! ! `-MMD' ! Print non-system dependencies to stdout. ! ! `--help' ! Print help about `gcjh' and exit. No further processing is done. ! ! `--version' ! Print version information for `gcjh' and exit. No further ! processing is done. ! ! `-v, --verbose' ! Print extra information while running. ! ! All remaining options are considered to be names of classes. ! !  ! File: gcj.info, Node: Invoking jv-scan, Next: Invoking jcf-dump, Prev: Invoking gcjh, Up: Top ! ! Invoking jv-scan ! **************** ! ! The `jv-scan' program can be used to print information about a Java ! source file (`.java' file). ! ! `--no-assert' ! Don't recognize the `assert' keyword, for backwards compatibility ! with older versions of the language specification. ! ! `--complexity' ! This prints a complexity measure, related to cyclomatic ! complexity, for each input file. ! ! `--encoding=NAME' ! This works like the corresponding `gcj' option. ! ! `--print-main' ! This prints the name of the class in this file containing a `main' ! method. ! ! `--list-class' ! This lists the names of all classes defined in the input files. ! ! `--list-filename' ! If `--list-class' is given, this option causes `jv-scan' to also ! print the name of the file in which each class was found. ! ! `-o FILE' ! Print output to the named file. ! ! `--help' ! Print help, then exit. ! ! `--version' ! Print version number, then exit. ! !  ! File: gcj.info, Node: Invoking jcf-dump, Next: Invoking gij, Prev: Invoking jv-scan, Up: Top ! ! Invoking jcf-dump ! ***************** ! ! This is a class file examiner, similar to `javap'. It will print ! information about a number of classes, which are specified by class name ! or file name. ! ! `-c' ! Disassemble method bodies. By default method bodies are not ! printed. ! ! `--javap' ! Generate output in `javap' format. The implementation of this ! feature is very incomplete. ! ! `--classpath=PATH' ! `--CLASSPATH=PATH' ! `-IDIRECTORY' ! `-o FILE' ! These options as the same as the corresponding `gcj' options. ! ! `--help' ! Print help, then exit. ! ! `--version' ! Print version number, then exit. ! ! `-v, --verbose' ! Print extra information while running. ! !  ! File: gcj.info, Node: Invoking gij, Next: Invoking jv-convert, Prev: Invoking jcf-dump, Up: Top ! ! Invoking gij ! ************ ! ! `gij' is a Java bytecode interpreter included with `libgcj'. `gij' ! is not available on every platform; porting it requires a small amount ! of assembly programming which has not been done for all the targets ! supported by `gcj'. ! ! The primary argument to `gij' is the name of a class or, with ! `-jar', a jar file. Options before this argument are interpreted by ! `gij'; remaining options are passed to the interpreted program. ! ! If a class name is specified and this class does not have a `main' ! method with the appropriate signature (a `static void' method with a ! `String[]' as its sole argument), then `gij' will print an error and ! exit. ! ! If a jar file is specified then `gij' will use information in it to ! determine which class' `main' method will be invoked. ! ! `gij' will invoke the `main' method with all the remaining ! command-line options. ! ! Note that `gij' is not limited to interpreting code. Because ! `libgcj' includes a class loader which can dynamically load shared ! objects, it is possible to give `gij' the name of a class which has ! been compiled and put into a shared library on the class path. ! ! `-cp PATH' ! `-classpath PATH' ! Set the initial class path. The class path is used for finding ! class and resource files. If specified, this option overrides the ! `CLASSPATH' environment variable. Note that this option is ! ignored if `-jar' is used. ! ! `-DNAME[=VALUE]' ! This defines a system property named NAME with value VALUE. If ! VALUE is not specified then it defaults to the empty string. ! These system properties are initialized at the program's startup ! and can be retrieved at runtime using the ! `java.lang.System.getProperty' method. ! ! `-ms=NUMBER' ! This sets the initial heap size. ! ! `-mx=NUMBER' ! This sets the maximum heap size. ! ! `-jar' ! This indicates that the name passed to `gij' should be interpreted ! as the name of a jar file, not a class. ! ! `--help' ! Print help, then exit. ! ! `--showversion' ! Print version number and continue. ! ! `--version' ! Print version number, then exit. ! !  ! File: gcj.info, Node: Invoking jv-convert, Next: Invoking rmic, Prev: Invoking gij, Up: Top ! ! Invoking jv-convert ! ******************* ! ! `jv-convert' [`OPTION'] ... [INPUTFILE [OUTPUTFILE]] ! ! `jv-convert' is a utility included with `libgcj' which converts a ! file from one encoding to another. It is similar to the Unix `iconv' ! utility. ! ! The encodings supported by `jv-convert' are platform-dependent. ! Currently there is no way to get a list of all supported encodings. ! ! `--encoding NAME' ! `--from NAME' ! Use NAME as the input encoding. The default is the current ! locale's encoding. ! ! `--to NAME' ! Use NAME as the output encoding. The default is the `JavaSrc' ! encoding; this is ASCII with `\u' escapes for non-ASCII characters. ! ! `-i FILE' ! Read from FILE. The default is to read from standard input. ! ! `-o FILE' ! Write to FILE. The default is to write to standard output. ! ! `--reverse' ! Swap the input and output encodings. ! ! `--help' ! Print a help message, then exit. ! ! `--version' ! Print version information, then exit. ! !  ! File: gcj.info, Node: Invoking rmic, Next: Invoking rmiregistry, Prev: Invoking jv-convert, Up: Top ! ! Invoking rmic ! ************* ! ! `rmic' [`OPTION'] ... CLASS ... ! ! `rmic' is a utility included with `libgcj' which generates stubs for ! remote objects. ! ! Note that this program isn't yet fully compatible with the JDK ! `rmic'. Some options, such as `-classpath', are recognized but ! currently ignored. We have left these options undocumented for now. ! ! Long options can also be given with a GNU-style leading `--'. For ! instance, `--help' is accepted. ! ! `-keep' ! `-keepgenerated' ! By default, `rmic' deletes intermediate files. Either of these ! options causes it not to delete such files. ! ! `-v1.1' ! Cause `rmic' to create stubs and skeletons for the 1.1 protocol ! version. ! ! `-vcompat' ! Cause `rmic' to create stubs and skeletons compatible with both ! the 1.1 and 1.2 protocol versions. This is the default. ! ! `-v1.2' ! Cause `rmic' to create stubs and skeletons for the 1.2 protocol ! version. ! ! `-nocompile' ! Don't compile the generated files. ! ! `-verbose' ! Print information about what `rmic' is doing. ! ! `-d DIRECTORY' ! Put output files in DIRECTORY. By default the files are put in ! the current working directory. ! ! `-help' ! Print a help message, then exit. ! ! `-version' ! Print version information, then exit. ! !  ! File: gcj.info, Node: Invoking rmiregistry, Next: About CNI, Prev: Invoking rmic, Up: Top ! ! Invoking rmiregistry ! ******************** ! ! `rmic' [`OPTION'] ... [PORT] ! ! `rmiregistry' starts a remote object registry on the current host. ! If no port number is specified, then port 1099 is used. ! ! `--help' ! Print a help message, then exit. ! ! `--version' ! Print version information, then exit. ! !  ! File: gcj.info, Node: About CNI, Next: System properties, Prev: Invoking rmiregistry, Up: Top ! ! About CNI ! ********* ! ! This documents CNI, the Cygnus Native Interface, which is is a ! convenient way to write Java native methods using C++. This is a more ! efficient, more convenient, but less portable alternative to the ! standard JNI (Java Native Interface). ! ! * Menu: ! ! * Basic concepts:: Introduction to using CNI. ! * Packages:: How packages are mapped to C++. ! * Primitive types:: Handling Java types in C++. ! * Interfaces:: How Java interfaces map to C++. ! * Objects and Classes:: C++ and Java classes. ! * Class Initialization:: How objects are initialized. ! * Object allocation:: How to create Java objects in C++. ! * Arrays:: Dealing with Java arrays in C++. ! * Methods:: Java methods in C++. ! * Strings:: Information about Java Strings. ! * Mixing with C++:: How CNI can interoperate with C++. ! * Exception Handling:: How exceptions are handled. ! * Synchronization:: Synchronizing between Java and C++. ! * Invocation:: Starting the Java runtime from C++. ! * Reflection:: Using reflection from C++. ! !  ! File: gcj.info, Node: Basic concepts, Next: Packages, Up: About CNI ! ! Basic concepts ! ============== ! ! In terms of languages features, Java is mostly a subset of C++. ! Java has a few important extensions, plus a powerful standard class ! library, but on the whole that does not change the basic similarity. ! Java is a hybrid object-oriented language, with a few native types, in ! addition to class types. It is class-based, where a class may have ! static as well as per-object fields, and static as well as instance ! methods. Non-static methods may be virtual, and may be overloaded. ! Overloading is resolved at compile time by matching the actual argument ! types against the parameter types. Virtual methods are implemented ! using indirect calls through a dispatch table (virtual function table). ! Objects are allocated on the heap, and initialized using a constructor ! method. Classes are organized in a package hierarchy. ! ! All of the listed attributes are also true of C++, though C++ has ! extra features (for example in C++ objects may be allocated not just on ! the heap, but also statically or in a local stack frame). Because ! `gcj' uses the same compiler technology as G++ (the GNU C++ compiler), ! it is possible to make the intersection of the two languages use the ! same ABI (object representation and calling conventions). The key idea ! in CNI is that Java objects are C++ objects, and all Java classes are ! C++ classes (but not the other way around). So the most important task ! in integrating Java and C++ is to remove gratuitous incompatibilities. ! ! You write CNI code as a regular C++ source file. (You do have to use ! a Java/CNI-aware C++ compiler, specifically a recent version of G++.) ! ! A CNI C++ source file must have: ! ! #include ! ! and then must include one header file for each Java class it uses, e.g.: ! ! #include ! #include ! #include ! ! These header files are automatically generated by `gcjh'. ! ! CNI provides some functions and macros to make using Java objects and ! primitive types from C++ easier. In general, these CNI functions and ! macros start with the `Jv' prefix, for example the function ! `JvNewObjectArray'. This convention is used to avoid conflicts with ! other libraries. Internal functions in CNI start with the prefix ! `_Jv_'. You should not call these; if you find a need to, let us know ! and we will try to come up with an alternate solution. (This manual ! lists `_Jv_AllocBytes' as an example; CNI should instead provide a ! `JvAllocBytes' function.) ! ! Limitations ! ----------- ! ! Whilst a Java class is just a C++ class that doesn't mean that you ! are freed from the shackles of Java, a CNI C++ class must adhere to the ! rules of the Java programming language. ! ! For example: it is not possible to declare a method in a CNI class ! that will take a C string (`char*') as an argument, or to declare a ! member variable of some non-Java datatype. ! !  ! File: gcj.info, Node: Packages, Next: Primitive types, Prev: Basic concepts, Up: About CNI ! ! Packages ! ======== ! ! The only global names in Java are class names, and packages. A ! "package" can contain zero or more classes, and also zero or more ! sub-packages. Every class belongs to either an unnamed package or a ! package that has a hierarchical and globally unique name. ! ! A Java package is mapped to a C++ "namespace". The Java class ! `java.lang.String' is in the package `java.lang', which is a ! sub-package of `java'. The C++ equivalent is the class ! `java::lang::String', which is in the namespace `java::lang' which is ! in the namespace `java'. ! ! Here is how you could express this: ! ! (// Declare the class(es), possibly in a header file: ! namespace java { ! namespace lang { ! class Object; ! class String; ! ... ! } ! } ! ! class java::lang::String : public java::lang::Object ! { ! ... ! }; ! ! The `gcjh' tool automatically generates the necessary namespace ! declarations. ! ! Leaving out package names ! ------------------------- ! ! Always using the fully-qualified name of a java class can be ! tiresomely verbose. Using the full qualified name also ties the code ! to a single package making code changes necessary should the class move ! from one package to another. The Java `package' declaration specifies ! that the following class declarations are in the named package, without ! having to explicitly name the full package qualifiers. The `package' ! declaration can be followed by zero or more `import' declarations, which ! allows either a single class or all the classes in a package to be ! named by a simple identifier. C++ provides something similar with the ! `using' declaration and directive. ! ! In Java: ! ! import PACKAGE-NAME.CLASS-NAME; ! ! allows the program text to refer to CLASS-NAME as a shorthand for the ! fully qualified name: `PACKAGE-NAME.CLASS-NAME'. ! ! To achieve the same effect C++, you have to do this: ! ! using PACKAGE-NAME::CLASS-NAME; ! ! Java can also cause imports on demand, like this: ! ! import PACKAGE-NAME.*; ! ! Doing this allows any class from the package PACKAGE-NAME to be ! referred to only by its class-name within the program text. ! ! The same effect can be achieved in C++ like this: ! ! using namespace PACKAGE-NAME; ! !  ! File: gcj.info, Node: Primitive types, Next: Interfaces, Prev: Packages, Up: About CNI ! ! Primitive types ! =============== ! ! Java provides 8 "primitives" types which represent integers, floats, ! characters and booleans (and also the void type). C++ has its own very ! similar concrete types. Such types in C++ however are not always ! implemented in the same way (an int might be 16, 32 or 64 bits for ! example) so CNI provides a special C++ type for each primitive Java ! type: ! ! *Java type* *C/C++ typename* *Description* ! `char' `jchar' 16 bit Unicode character ! `boolean' `jboolean' logical (true or false) values ! `byte' `jbyte' 8-bit signed integer ! `short' `jshort' 16 bit signed integer ! `int' `jint' 32 bit signed integer ! `long' `jlong' 64 bit signed integer ! `float' `jfloat' 32 bit IEEE floating point number ! `double' `jdouble' 64 bit IEEE floating point number ! `void' `void' no value ! ! When referring to a Java type You should always use these C++ ! typenames (e.g.: `jint') to avoid disappointment. ! ! Reference types associated with primitive types ! ----------------------------------------------- ! ! In Java each primitive type has an associated reference type, e.g.: ! `boolean' has an associated `java.lang.Boolean' class. In order to ! make working with such classes easier GCJ provides the macro ! `JvPrimClass': ! ! - macro: JvPrimClass type ! Return a pointer to the `Class' object corresponding to the type ! supplied. ! ! JvPrimClass(void) => java.lang.Void.TYPE ! ! !  ! File: gcj.info, Node: Interfaces, Next: Objects and Classes, Prev: Primitive types, Up: About CNI ! ! Interfaces ! ========== ! ! A Java class can "implement" zero or more "interfaces", in addition ! to inheriting from a single base class. ! ! CNI allows CNI code to implement methods of interfaces. You can ! also call methods through interface references, with some limitations. ! ! CNI doesn't understand interface inheritance at all yet. So, you ! can only call an interface method when the declared type of the field ! being called matches the interface which declares that method. The ! workaround is to cast the interface reference to the right ! superinterface. ! ! For example if you have: ! ! interface A ! { ! void a(); ! } ! ! interface B extends A ! { ! void b(); ! } ! ! and declare a variable of type `B' in C++, you can't call `a()' ! unless you cast it to an `A' first. ! !  ! File: gcj.info, Node: Objects and Classes, Next: Class Initialization, Prev: Interfaces, Up: About CNI ! ! Objects and Classes ! =================== ! ! Classes ! ------- ! ! All Java classes are derived from `java.lang.Object'. C++ does not ! have a unique root class, but we use the C++ class `java::lang::Object' ! as the C++ version of the `java.lang.Object' Java class. All other ! Java classes are mapped into corresponding C++ classes derived from ! `java::lang::Object'. ! ! Interface inheritance (the `implements' keyword) is currently not ! reflected in the C++ mapping. ! ! Object fields ! ------------- ! ! Each object contains an object header, followed by the instance ! fields of the class, in order. The object header consists of a single ! pointer to a dispatch or virtual function table. (There may be extra ! fields _in front of_ the object, for example for memory management, but ! this is invisible to the application, and the reference to the object ! points to the dispatch table pointer.) ! ! The fields are laid out in the same order, alignment, and size as in ! C++. Specifically, 8-bite and 16-bit native types (`byte', `short', ! `char', and `boolean') are _not_ widened to 32 bits. Note that the ! Java VM does extend 8-bit and 16-bit types to 32 bits when on the VM ! stack or temporary registers. ! ! If you include the `gcjh'-generated header for a class, you can ! access fields of Java classes in the _natural_ way. For example, given ! the following Java class: ! ! public class Int ! { ! public int i; ! public Integer (int i) { this.i = i; } ! public static zero = new Integer(0); ! } ! ! you can write: ! ! #include ; ! #include ; ! ! Int* ! mult (Int *p, jint k) ! { ! if (k == 0) ! return Int::zero; // Static member access. ! return new Int(p->i * k); ! } ! ! Access specifiers ! ----------------- ! ! CNI does not strictly enforce the Java access specifiers, because ! Java permissions cannot be directly mapped into C++ permission. ! Private Java fields and methods are mapped to private C++ fields and ! methods, but other fields and methods are mapped to public fields and ! methods. ! !  ! File: gcj.info, Node: Class Initialization, Next: Object allocation, Prev: Objects and Classes, Up: About CNI ! ! Class Initialization ! ==================== ! ! Java requires that each class be automatically initialized at the ! time of the first active use. Initializing a class involves ! initializing the static fields, running code in class initializer ! methods, and initializing base classes. There may also be some ! implementation specific actions, such as allocating `String' objects ! corresponding to string literals in the code. ! ! The GCJ compiler inserts calls to `JvInitClass' at appropriate ! places to ensure that a class is initialized when required. The C++ ! compiler does not insert these calls automatically--it is the ! programmer's responsibility to make sure classes are initialized. ! However, this is fairly painless because of the conventions assumed by ! the Java system. ! ! First, `libgcj' will make sure a class is initialized before an ! instance of that object is created. This is one of the ! responsibilities of the `new' operation. This is taken care of both in ! Java code, and in C++ code. When G++ sees a `new' of a Java class, it ! will call a routine in `libgcj' to allocate the object, and that ! routine will take care of initializing the class. Note however that ! this does not happen for Java arrays; you must allocate those using the ! appropriate CNI function. It follows that you can access an instance ! field, or call an instance (non-static) method and be safe in the ! knowledge that the class and all of its base classes have been ! initialized. ! ! Invoking a static method is also safe. This is because the Java ! compiler adds code to the start of a static method to make sure the ! class is initialized. However, the C++ compiler does not add this ! extra code. Hence, if you write a native static method using CNI, you ! are responsible for calling `JvInitClass' before doing anything else in ! the method (unless you are sure it is safe to leave it out). ! ! Accessing a static field also requires the class of the field to be ! initialized. The Java compiler will generate code to call ! `Jv_InitClass' before getting or setting the field. However, the C++ ! compiler will not generate this extra code, so it is your ! responsibility to make sure the class is initialized before you access ! a static field from C++. ! !  ! File: gcj.info, Node: Object allocation, Next: Arrays, Prev: Class Initialization, Up: About CNI ! ! Object allocation ! ================= ! ! New Java objects are allocated using a "class instance creation ! expression", e.g.: ! ! new TYPE ( ... ) ! ! The same syntax is used in C++. The main difference is that C++ ! objects have to be explicitly deleted; in Java they are automatically ! deleted by the garbage collector. Using CNI, you can allocate a new ! Java object using standard C++ syntax and the C++ compiler will allocate ! memory from the garbage collector. If you have overloaded ! constructors, the compiler will choose the correct one using standard ! C++ overload resolution rules. ! ! For example: ! ! java::util::Hashtable *ht = new java::util::Hashtable(120); ! ! - Function: void* _Jv_AllocBytes (jsize SIZE) ! Allocates SIZE bytes from the heap. The memory is not scanned by ! the garbage collector but it freed if no references to it are ! discovered. ! !  ! File: gcj.info, Node: Arrays, Next: Methods, Prev: Object allocation, Up: About CNI ! ! Arrays ! ====== ! ! While in many ways Java is similar to C and C++, it is quite ! different in its treatment of arrays. C arrays are based on the idea ! of pointer arithmetic, which would be incompatible with Java's security ! requirements. Java arrays are true objects (array types inherit from ! `java.lang.Object'). An array-valued variable is one that contains a ! reference (pointer) to an array object. ! ! Referencing a Java array in C++ code is done using the `JArray' ! template, which as defined as follows: ! ! class __JArray : public java::lang::Object ! { ! public: ! int length; ! }; ! ! template ! class JArray : public __JArray ! { ! T data[0]; ! public: ! T& operator[](jint i) { return data[i]; } ! }; ! ! There are a number of `typedef's which correspond to `typedef's from ! the JNI. Each is the type of an array holding objects of the relevant ! type: ! ! typedef __JArray *jarray; ! typedef JArray *jobjectArray; ! typedef JArray *jbooleanArray; ! typedef JArray *jbyteArray; ! typedef JArray *jcharArray; ! typedef JArray *jshortArray; ! typedef JArray *jintArray; ! typedef JArray *jlongArray; ! typedef JArray *jfloatArray; ! typedef JArray *jdoubleArray; ! ! - Method on template: T* elements (JArray ARRAY) ! This template function can be used to get a pointer to the ! elements of the `array'. For instance, you can fetch a pointer to ! the integers that make up an `int[]' like so: ! ! extern jintArray foo; ! jint *intp = elements (foo); ! ! The name of this function may change in the future. ! ! - Function: jobjectArray JvNewObjectArray (jsize LENGTH, jclass KLASS, ! jobject INIT) ! Here `klass' is the type of elements of the array and `init' is ! the initial value put into every slot in the array. ! ! Creating arrays ! --------------- ! ! For each primitive type there is a function which can be used to ! create a new array of that type. The name of the function is of the ! form: ! ! JvNewTYPEArray ! ! For example: ! ! JvNewBooleanArray ! ! can be used to create an array of Java primitive boolean types. ! ! The following function definition is the template for all such ! functions: ! ! - Function: jbooleanArray JvNewBooleanArray (jint LENGTH) ! Create's an array LENGTH indices long. ! ! - Function: jsize JvGetArrayLength (jarray ARRAY) ! Returns the length of the ARRAY. ! !  ! File: gcj.info, Node: Methods, Next: Strings, Prev: Arrays, Up: About CNI ! ! Methods ! ======= ! ! Java methods are mapped directly into C++ methods. The header files ! generated by `gcjh' include the appropriate method definitions. ! Basically, the generated methods have the same names and ! _corresponding_ types as the Java methods, and are called in the ! natural manner. ! ! Overloading ! ----------- ! ! Both Java and C++ provide method overloading, where multiple methods ! in a class have the same name, and the correct one is chosen (at ! compile time) depending on the argument types. The rules for choosing ! the correct method are (as expected) more complicated in C++ than in ! Java, but given a set of overloaded methods generated by `gcjh' the C++ ! compiler will choose the expected one. ! ! Common assemblers and linkers are not aware of C++ overloading, so ! the standard implementation strategy is to encode the parameter types ! of a method into its assembly-level name. This encoding is called ! "mangling", and the encoded name is the "mangled name". The same ! mechanism is used to implement Java overloading. For C++/Java ! interoperability, it is important that both the Java and C++ compilers ! use the _same_ encoding scheme. ! ! Static methods ! -------------- ! ! Static Java methods are invoked in CNI using the standard C++ ! syntax, using the `::' operator rather than the `.' operator. ! ! For example: ! ! jint i = java::lang::Math::round((jfloat) 2.3); ! ! C++ method definition syntax is used to define a static native method. ! For example: ! ! #include ! java::lang::Integer* ! java::lang::Integer::getInteger(jstring str) ! { ! ... ! } ! ! Object Constructors ! ------------------- ! ! Constructors are called implicitly as part of object allocation ! using the `new' operator. ! ! For example: ! ! java::lang::Integer *x = new java::lang::Integer(234); ! ! Java does not allow a constructor to be a native method. This ! limitation can be coded round however because a constructor can _call_ ! a native method. ! ! Instance methods ! ---------------- ! ! Calling a Java instance method from a C++ CNI method is done using ! the standard C++ syntax, e.g.: ! ! // First create the Java object. ! java::lang::Integer *x = new java::lang::Integer(234); ! // Now call a method. ! jint prim_value = x->intValue(); ! if (x->longValue == 0) ! ... ! ! Defining a Java native instance method is also done the natural way: ! ! #include ! ! jdouble ! java::lang:Integer::doubleValue() ! { ! return (jdouble) value; ! } ! ! Interface methods ! ----------------- ! ! In Java you can call a method using an interface reference. This is ! supported, but not completely. *Note Interfaces::. ! !  ! File: gcj.info, Node: Strings, Next: Mixing with C++, Prev: Methods, Up: About CNI ! ! Strings ! ======= ! ! CNI provides a number of utility functions for working with Java ! Java `String' objects. The names and interfaces are analogous to those ! of JNI. ! ! - Function: jstring JvNewString (const char* CHARS, jsize LEN) ! Returns a Java `String' object with characters from the C string ! CHARS up to the index LEN in that array. ! ! - Function: jstring JvNewStringLatin1 (const char* BYTES, jsize LEN) ! Returns a Java `String' made up of LEN bytes from BYTES. ! ! - Function: jstring JvNewStringLatin1 (const char* BYTES) ! As above but the length of the `String' is `strlen(BYTES)'. ! ! - Function: jstring JvNewStringUTF (const char* BYTES) ! Returns a `String' which is made up of the UTF encoded characters ! present in the C string BYTES. ! ! - Function: jchar* JvGetStringChars (jstring STR) ! Returns a pointer to an array of characters making up the `String' ! STR. ! ! - Function: int JvGetStringUTFLength (jstring STR) ! Returns the number of bytes required to encode the contents of the ! `String' STR in UTF-8. ! ! - Function: jsize JvGetStringUTFRegion (jstring STR, jsize START, ! jsize LEN, char* BUF) ! Puts the UTF-8 encoding of a region of the `String' STR into the ! buffer `buf'. The region to fetch is marked by START and LEN. ! ! Note that BUF is a buffer, not a C string. It is _not_ null ! terminated. ! !  ! File: gcj.info, Node: Mixing with C++, Next: Exception Handling, Prev: Strings, Up: About CNI ! ! Interoperating with C/C++ ! ========================= ! ! Because CNI is designed to represent Java classes and methods it ! cannot be mixed readily with C/C++ types. ! ! One important restriction is that Java classes cannot have non-Java ! type instance or static variables and cannot have methods which take ! non-Java types as arguments or return non-Java types. ! ! None of the following is possible with CNI: ! ! ! class ::MyClass : public java::lang::Object ! { ! char* variable; // char* is not a valid Java type. ! } ! ! ! uint ! ::SomeClass::someMethod (char *arg) ! { ! . ! . ! . ! } // `uint' is not a valid Java type, neither is `char*' ! ! Of course, it is ok to use C/C++ types within the scope of a method: ! ! jint ! ::SomeClass::otherMethod (jstring str) ! { ! char *arg = ... ! . ! . ! . ! } ! ! But this restriction can cause a problem so CNI includes the ! `gnu.gcj.RawData' class. The `RawData' class is a "non-scanned ! reference" type. In other words variables declared of type `RawData' ! can contain any data and are not checked by the compiler in any way. ! ! This means that you can put C/C++ data structures (including classes) ! in your CNI classes, as long as you use the appropriate cast. ! ! Here are some examples: ! ! ! class ::MyClass : public java::lang::Object ! { ! gnu.gcj.RawData string; ! ! MyClass (); ! gnu.gcj.RawData getText (); ! void printText (); ! } ! ! ::MyClass::MyClass () ! { ! char* text = ... ! string = text; ! } ! ! gnu.gcj.RawData ! ::MyClass::getText () ! { ! return string; ! } ! ! void ! ::MyClass::printText () ! { ! printf("%s\n", (char*) string); ! } ! !  ! File: gcj.info, Node: Exception Handling, Next: Synchronization, Prev: Mixing with C++, Up: About CNI ! ! Exception Handling ! ================== ! ! While C++ and Java share a common exception handling framework, ! things are not yet perfectly integrated. The main issue is that the ! run-time type information facilities of the two languages are not ! integrated. ! ! Still, things work fairly well. You can throw a Java exception from ! C++ using the ordinary `throw' construct, and this exception can be ! caught by Java code. Similarly, you can catch an exception thrown from ! Java using the C++ `catch' construct. ! ! Here is an example: ! ! if (i >= count) ! throw new java::lang::IndexOutOfBoundsException(); ! ! Normally, G++ will automatically detect when you are writing C++ ! code that uses Java exceptions, and handle them appropriately. ! However, if C++ code only needs to execute destructors when Java ! exceptions are thrown through it, GCC will guess incorrectly. Sample ! problematic code: ! ! struct S { ~S(); }; ! ! extern void bar(); // Is implemented in Java and may throw exceptions. ! ! void foo() ! { ! S s; ! bar(); ! } ! ! The usual effect of an incorrect guess is a link failure, ! complaining of a missing routine called `__gxx_personality_v0'. ! ! You can inform the compiler that Java exceptions are to be used in a ! translation unit, irrespective of what it might think, by writing ! `#pragma GCC java_exceptions' at the head of the file. This `#pragma' ! must appear before any functions that throw or catch exceptions, or run ! destructors when exceptions are thrown through them. ! !  ! File: gcj.info, Node: Synchronization, Next: Invocation, Prev: Exception Handling, Up: About CNI ! ! Synchronization ! =============== ! ! Each Java object has an implicit monitor. The Java VM uses the ! instruction `monitorenter' to acquire and lock a monitor, and ! `monitorexit' to release it. ! ! The corresponding CNI macros are `JvMonitorEnter' and ! `JvMonitorExit' (JNI has similar methods `MonitorEnter' and ! `MonitorExit'). ! ! The Java source language does not provide direct access to these ! primitives. Instead, there is a `synchronized' statement that does an ! implicit `monitorenter' before entry to the block, and does a ! `monitorexit' on exit from the block. Note that the lock has to be ! released even when the block is abnormally terminated by an exception, ! which means there is an implicit `try finally' surrounding ! synchronization locks. ! ! From C++, it makes sense to use a destructor to release a lock. CNI ! defines the following utility class: ! ! class JvSynchronize() { ! jobject obj; ! JvSynchronize(jobject o) { obj = o; JvMonitorEnter(o); } ! ~JvSynchronize() { JvMonitorExit(obj); } ! }; ! ! So this Java code: ! ! synchronized (OBJ) ! { ! CODE ! } ! ! might become this C++ code: ! ! { ! JvSynchronize dummy (OBJ); ! CODE; ! } ! ! Java also has methods with the `synchronized' attribute. This is ! equivalent to wrapping the entire method body in a `synchronized' ! statement. (Alternatively, an implementation could require the caller ! to do the synchronization. This is not practical for a compiler, ! because each virtual method call would have to test at run-time if ! synchronization is needed.) Since in `gcj' the `synchronized' ! attribute is handled by the method implementation, it is up to the ! programmer of a synchronized native method to handle the synchronization ! (in the C++ implementation of the method). In other words, you need to ! manually add `JvSynchronize' in a `native synchronized' method. ! !  ! File: gcj.info, Node: Invocation, Next: Reflection, Prev: Synchronization, Up: About CNI ! ! Invocation ! ========== ! ! CNI permits C++ applications to make calls into Java classes, in ! addition to allowing Java code to call into C++. Several functions, ! known as the "invocation API", are provided to support this. ! ! - Function: jint JvCreateJavaVM (void* VM_ARGS) ! Initializes the Java runtime. This function performs essential ! initialization of the threads interface, garbage collector, ! exception handling and other key aspects of the runtime. It must ! be called once by an application with a non-Java `main()' ! function, before any other Java or CNI calls are made. It is ! safe, but not recommended, to call `JvCreateJavaVM()' more than ! once provided it is only called from a single thread. The VMARGS ! parameter can be used to specify initialization parameters for the ! Java runtime. It may be `NULL'. This function returns `0' upon ! success, or `-1' if the runtime is already initialized. ! ! _Note:_ In GCJ 3.1, the `vm_args' parameter is ignored. It may be ! used in a future release. ! ! - Function: java::lang::Thread* JvAttachCurrentThread (jstring NAME, ! java::lang::ThreadGroup* GROUP) ! Registers an existing thread with the Java runtime. This must be ! called once from each thread, before that thread makes any other ! Java or CNI calls. It must be called after `JvCreateJavaVM'. NAME ! specifies a name for the thread. It may be `NULL', in which case a ! name will be generated. GROUP is the ThreadGroup in which this ! thread will be a member. If it is `NULL', the thread will be a ! member of the main thread group. The return value is the Java ! `Thread' object that represents the thread. It is safe to call ! `JvAttachCurrentThread()' more than once from the same thread. If ! the thread is already attached, the call is ignored and the current ! thread object is returned. ! ! - Function: jint JvDetachCurrentThread () ! Unregisters a thread from the Java runtime. This should be called ! by threads that were attached using `JvAttachCurrentThread()', ! after they have finished making calls to Java code. This ensures ! that any resources associated with the thread become eligible for ! garbage collection. This function returns `0' upon success, or ! `-1' if the current thread is not attached. ! ! Handling uncaught exceptions ! ---------------------------- ! ! If an exception is thrown from Java code called using the invocation ! API, and no handler for the exception can be found, the runtime will ! abort the application. In order to make the application more robust, it ! is recommended that code which uses the invocation API be wrapped by a ! top-level try/catch block that catches all Java exceptions. ! ! Example ! ------- ! ! The following code demonstrates the use of the invocation API. In ! this example, the C++ application initializes the Java runtime and ! attaches itself. The `java.lang.System' class is initialized in order to ! access its `out' field, and a Java string is printed. Finally, the ! thread is detached from the runtime once it has finished making Java ! calls. Everything is wrapped with a try/catch block to provide a ! default handler for any uncaught exceptions. ! ! The example can be compiled with `c++ test.cc -lgcj'. ! ! // test.cc ! #include ! #include ! #include ! #include ! ! int main(int argc, char *argv) ! { ! using namespace java::lang; ! ! try ! { ! JvCreateJavaVM(NULL); ! JvAttachCurrentThread(NULL, NULL); ! ! String *message = JvNewStringLatin1("Hello from C++"); ! JvInitClass(&System::class$); ! System::out->println(message); ! ! JvDetachCurrentThread(); ! } ! catch (Throwable *t) ! { ! System::err->println(JvNewStringLatin1("Unhandled Java exception:")); ! t->printStackTrace(); ! } ! } ! !  ! File: gcj.info, Node: Reflection, Prev: Invocation, Up: About CNI ! ! Reflection ! ========== ! ! Reflection is possible with CNI code, it functions similarly to how ! it functions with JNI. ! ! The types `jfieldID' and `jmethodID' are as in JNI. ! ! The functions: ! ! * `JvFromReflectedField', ! ! * `JvFromReflectedMethod', ! ! * `JvToReflectedField' ! ! * `JvToFromReflectedMethod' ! ! will be added shortly, as will other functions corresponding to JNI. ! !  ! File: gcj.info, Node: System properties, Next: Resources, Prev: About CNI, Up: Top ! ! System properties ! ***************** ! ! The runtime behavior of the `libgcj' library can be modified by ! setting certain system properties. These properties can be compiled ! into the program using the `-DNAME[=VALUE]' option to `gcj' or by ! setting them explicitly in the program by calling the ! `java.lang.System.setProperty()' method. Some system properties are ! only used for informational purposes (like giving a version number or a ! user name). A program can inspect the current value of a property by ! calling the `java.lang.System.getProperty()' method. ! ! * Menu: ! ! * Standard Properties:: Standard properties supported by `libgcj' ! * GNU Classpath Properties:: Properties found in Classpath based libraries ! * libgcj Runtime Properties:: Properties specific to `libgcj' ! !  ! File: gcj.info, Node: Standard Properties, Next: GNU Classpath Properties, Up: System properties ! ! Standard Properties ! =================== ! ! The following properties are normally found in all implementations ! of the core libraries for the Java language. ! ! `java.version' ! The `libgcj' version number. ! ! `java.vendor' ! Set to `The Free Software Foundation, Inc.' ! ! `java.vendor.url' ! Set to `http://gcc.gnu.org/java/'. ! ! `java.home' ! The directory where `gcj' was installed. Taken from the `--prefix' ! option given to `configure'. ! ! `java.class.version' ! The class format version number supported by the libgcj byte code ! interpreter. (Currently `46.0') ! ! `java.vm.specification.version' ! The Virtual Machine Specification version implemented by `libgcj'. ! (Currently `1.0') ! ! `java.vm.specification.vendor' ! The name of the Virtual Machine specification designer. ! ! `java.vm.specification.name' ! The name of the Virtual Machine specification (Set to `Java ! Virtual Machine Specification'). ! ! `java.vm.version' ! The `gcj' version number. ! ! `java.vm.vendor' ! Set to `The Free Software Foundation, Inc.' ! ! `java.vm.name' ! Set to `GNU libgcj'. ! ! `java.specification.version' ! The Runtime Environment specification version implemented by ! `libgcj'. (Currently set to `1.3') ! ! `java.specification.vendor' ! The Runtime Environment specification designer. ! ! `java.specification.name' ! The name of the Runtime Environment specification (Set to `Java ! Platform API Specification'). ! ! `java.class.path' ! The paths (jar files, zip files and directories) used for finding ! class files. ! ! `java.library.path' ! Directory path used for finding native libraries. ! ! `java.io.tmpdir' ! The directory used to put temporary files in. ! ! `java.compiler' ! Name of the Just In Time compiler to use by the byte code ! interpreter. Currently not used in `libgcj'. ! ! `java.ext.dirs' ! Directories containing jar files with extra libraries. Will be ! used when resolving classes. Currently not used in `libgcj'. ! ! `java.protocol.handler.pkgs' ! A `|' separated list of package names that is used to find classes ! that implement handlers for `java.net.URL'. ! ! `java.rmi.server.codebase' ! A list of URLs that is used by the `java.rmi.server.RMIClassLoader' ! to load classes from. ! ! `jdbc.drivers' ! A list of class names that will be loaded by the ! `java.sql.DriverManager' when it starts up. ! ! `file.separator' ! The separator used in when directories are included in a filename ! (normally `/' or `\' ). ! ! `file.encoding' ! The default character encoding used when converting platform ! native files to Unicode (usually set to `8859_1'). ! ! `path.separator' ! The standard separator used when a string contains multiple paths ! (normally `:' or `;'), the string is usually not a valid character ! to use in normal directory names.) ! ! `line.separator' ! The default line separator used on the platform (normally `\n', ! `\r' or a combination of those two characters). ! ! `policy.provider' ! The class name used for the default policy provider returned by ! `java.security.Policy.getPolicy'. ! ! `user.name' ! The name of the user running the program. Can be the full name, ! the login name or empty if unknown. ! ! `user.home' ! The default directory to put user specific files in. ! ! `user.dir' ! The current working directory from which the program was started. ! ! `user.language' ! The default language as used by the `java.util.Locale' class. ! ! `user.region' ! The default region as used by the `java.util.Local' class. ! ! `user.variant' ! The default variant of the language and region local used. ! ! `user.timezone' ! The default timezone as used by the `java.util.TimeZone' class. ! ! `os.name' ! The operating system/kernel name that the program runs on. ! ! `os.arch' ! The hardware that we are running on. ! ! `os.version' ! The version number of the operating system/kernel. ! ! `awt.appletWarning' ! The string to display when an untrusted applet is displayed. ! Returned by `java.awt.Window.getWarningString()' when the window is ! "insecure". ! ! `awt.toolkit' ! The class name used for initializing the default ! `java.awt.Toolkit'. Defaults to `gnu.awt.gtk.GtkToolkit'. ! ! `http.proxyHost' ! Name of proxy host for http connections. ! ! `http.proxyPort' ! Port number to use when a proxy host is in use. ! !  ! File: gcj.info, Node: GNU Classpath Properties, Next: libgcj Runtime Properties, Prev: Standard Properties, Up: System properties ! ! GNU Classpath Properties ! ======================== ! ! `libgcj' is based on the GNU Classpath (Essential Libraries for ! Java) a GNU project to create free core class libraries for use with ! virtual machines and compilers for the Java language. The following ! properties are common to libraries based on GNU Classpath. ! ! `gcj.dumpobject' ! Enables printing serialization debugging by the ! `java.io.ObjectInput' and `java.io.ObjectOutput' classes when set ! to something else then the empty string. Only used when running a ! debug build of the library. ! ! `gnu.classpath.vm.shortname' ! This is a succint name of the virtual machine. For `libgcj', this ! will always be `libgcj'. ! ! `gnu.classpath.home.url' ! A base URL used for finding system property files (e.g., ! `classpath.security'). By default this is a `file:' URL pointing ! to the `lib' directory under `java.home'. ! !  ! File: gcj.info, Node: libgcj Runtime Properties, Prev: GNU Classpath Properties, Up: System properties ! ! libgcj Runtime Properties ! ========================= ! ! The following properties are specific to the `libgcj' runtime and ! will normally not be found in other core libraries for the java ! language. ! ! `java.fullversion' ! The combination of `java.vm.name' and `java.vm.version'. ! ! `java.vm.info' ! Same as `java.fullversion'. ! ! `impl.prefix' ! Used by the `java.net.DatagramSocket' class when set to something ! else then the empty string. When set all newly created ! `DatagramSocket's will try to load a class ! `java.net.[impl.prefix]DatagramSocketImpl' instead of the normal ! `java.net.PlainDatagramSocketImpl'. ! ! `gnu.gcj.progname' ! The name that was used to invoked the program. ! ! `gnu.gcj.runtime.NameFinder.demangle' ! Whether names in a stack trace should be demangled. Defaults to ! `true'. ! ! `gnu.gcj.runtime.NameFinder.sanitize' ! Whether calls to initialize exceptions and starting the runtime ! system should be removed from the stack trace. Only done when ! names are demangled. Defaults to `true'. ! ! `gnu.gcj.runtime.NameFinder.remove_unknown' ! Whether calls to unknown functions (class and method names are ! unknown) should be removed from the stack trace. Only done when ! the stack is sanitized. Ignored if this means no stack trace ! information would be available anymore. Defaults to `true'. ! ! `gnu.gcj.runtime.NameFinder.remove_interpreter' ! Whether runtime interpreter calls (methods in the ! `_Jv_InterpMethod' class and functions starting with `ffi_') ! should be removed from the stack trace. Only done when the stack ! is sanitized. Defaults to `true'. ! ! `gnu.gcj.runtime.NameFinder.use_addr2line' ! Whether an external process (`addr2line' or `addr2name.awk') ! should be used as fallback to convert the addresses to function ! names when the runtime is unable to do it through `dladdr'. ! !  ! File: gcj.info, Node: Resources, Prev: System properties, Up: Top ! ! Resources ! ********* ! ! While writing `gcj' and `libgcj' we have, of course, relied heavily ! on documentation from Sun Microsystems. In particular we have used The ! Java Language Specification (both first and second editions), the Java ! Class Libraries (volumes one and two), and the Java Virtual Machine ! Specification. In addition we've used the online documentation at ! `http://java.sun.com/'. ! ! The current `gcj' home page is `http://gcc.gnu.org/java/'. ! ! For more information on gcc, see `http://gcc.gnu.org/'. ! ! Some `libgcj' testing is done using the Mauve test suite. This is a ! free software Java class library test suite which is being written ! because the JCK is not free. See `http://sources.redhat.com/mauve/' ! for more information. ! !  Tag Table: ! Node: Top1740 ! Node: Copying3668 ! Node: GNU Free Documentation License22868 ! Node: Invoking gcj45277 ! Node: Input and output files45928 ! Node: Input Options47291 ! Node: Encodings50434 ! Node: Warnings51635 ! Node: Code Generation52666 ! Ref: Code Generation-Footnote-156326 ! Node: Configure-time Options56635 ! Node: Compatibility58053 ! Node: Limitations58533 ! Node: Extensions60110 ! Node: Invoking gcjh61362 ! Node: Invoking jv-scan63418 ! Node: Invoking jcf-dump64458 ! Node: Invoking gij65230 ! Node: Invoking jv-convert67437 ! Node: Invoking rmic68507 ! Node: Invoking rmiregistry69882 ! Node: About CNI70286 ! Node: Basic concepts71577 ! Node: Packages74560 ! Node: Primitive types76875 ! Node: Interfaces78524 ! Node: Objects and Classes79433 ! Node: Class Initialization81594 ! Node: Object allocation83930 ! Node: Arrays84905 ! Node: Methods87492 ! Node: Strings90244 ! Node: Mixing with C++91712 ! Node: Exception Handling93595 ! Node: Synchronization95230 ! Node: Invocation97211 ! Node: Reflection101281 ! Node: System properties101733 ! Node: Standard Properties102607 ! Node: GNU Classpath Properties107064 ! Node: libgcj Runtime Properties108102 ! Node: Resources110103  End Tag Table diff -Nrc3pad gcc-3.2.3/gcc/java/gcj.info-1 gcc-3.3/gcc/java/gcj.info-1 *** gcc-3.2.3/gcc/java/gcj.info-1 2003-04-22 07:07:25.000000000 +0000 --- gcc-3.3/gcc/java/gcj.info-1 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,1012 **** - This is gcj.info, produced by makeinfo version 4.5 from gcj.texi. - - INFO-DIR-SECTION Programming - START-INFO-DIR-ENTRY - * Gcj: (gcj). Ahead-of-time compiler for the Java language - END-INFO-DIR-ENTRY - - INFO-DIR-SECTION Individual utilities - START-INFO-DIR-ENTRY - * gcjh: (gcj)Invoking gcjh. - Generate header files from Java class files - * jv-scan: (gcj)Invoking jv-scan. - Print information about Java source files - * jcf-dump: (gcj)Invoking jcf-dump. - Print information about Java class files - * gij: (gcj)Invoking gij. GNU interpreter for Java bytecode - * jv-convert: (gcj)Invoking jv-convert. - Convert file from one encoding to another - * rmic: (gcj)Invoking rmic. - Generate stubs for Remote Method Invocation. - * rmiregistry: (gcj)Invoking rmiregistry. - The remote object registry. - END-INFO-DIR-ENTRY - - Copyright (C) 2001, 2002 Free Software Foundation, Inc. - - Permission is granted to copy, distribute and/or modify this document - under the terms of the GNU Free Documentation License, Version 1.1 or - any later version published by the Free Software Foundation; with the - Invariant Sections being "GNU General Public License", the Front-Cover - texts being (a) (see below), and with the Back-Cover Texts being (b) - (see below). A copy of the license is included in the section entitled - "GNU Free Documentation License". - - (a) The FSF's Front-Cover Text is: - - A GNU Manual - - (b) The FSF's Back-Cover Text is: - - You have freedom to copy and modify this GNU Manual, like GNU - software. Copies published by the Free Software Foundation raise - funds for GNU development. - -  - File: gcj.info, Node: Top, Next: Copying, Up: (dir) - - Introduction - ************ - - This manual describes how to use `gcj', the GNU compiler for the - Java programming language. `gcj' can generate both `.class' files and - object files, and it can read both Java source code and `.class' files. - - * Menu: - - * Copying:: The GNU General Public License - * GNU Free Documentation License:: - How you can share and copy this manual - * Invoking gcj:: Compiler options supported by `gcj' - * Compatibility:: Compatibility between gcj and other tools for Java - * Invoking gcjh:: Generate header files from class files - * Invoking jv-scan:: Print information about source files - * Invoking jcf-dump:: Print information about class files - * Invoking gij:: Interpreting Java bytecodes - * Invoking jv-convert:: Converting from one encoding to another - * Invoking rmic:: Generate stubs for Remote Method Invocation. - * Invoking rmiregistry:: The remote object registry. - * About CNI:: Description of the Cygnus Native Interface - * Resources:: Where to look for more information - -  - File: gcj.info, Node: Copying, Next: GNU Free Documentation License, Prev: Top, Up: Top - - GNU GENERAL PUBLIC LICENSE - ************************** - - Version 2, June 1991 - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - ======== - - The licenses for most software are designed to take away your - freedom to share and change it. By contrast, the GNU General Public - License is intended to guarantee your freedom to share and change free - software--to make sure the software is free for all its users. This - General Public License applies to most of the Free Software - Foundation's software and to any other program whose authors commit to - using it. (Some other Free Software Foundation software is covered by - the GNU Library General Public License instead.) You can apply it to - your programs, too. - - When we speak of free software, we are referring to freedom, not - price. Our General Public Licenses are designed to make sure that you - have the freedom to distribute copies of free software (and charge for - this service if you wish), that you receive source code or can get it - if you want it, that you can change the software or use pieces of it in - new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid - anyone to deny you these rights or to ask you to surrender the rights. - These restrictions translate to certain responsibilities for you if you - distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether - gratis or for a fee, you must give the recipients all the rights that - you have. You must make sure that they, too, receive or can get the - source code. And you must show them these terms so they know their - rights. - - We protect your rights with two steps: (1) copyright the software, - and (2) offer you this license which gives you legal permission to copy, - distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain - that everyone understands that there is no warranty for this free - software. If the software is modified by someone else and passed on, we - want its recipients to know that what they have is not the original, so - that any problems introduced by others will not reflect on the original - authors' reputations. - - Finally, any free program is threatened constantly by software - patents. We wish to avoid the danger that redistributors of a free - program will individually obtain patent licenses, in effect making the - program proprietary. To prevent this, we have made it clear that any - patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and - modification follow. - - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - 0. This License applies to any program or other work which contains a - notice placed by the copyright holder saying it may be distributed - under the terms of this General Public License. The "Program", - below, refers to any such program or work, and a "work based on - the Program" means either the Program or any derivative work under - copyright law: that is to say, a work containing the Program or a - portion of it, either verbatim or with modifications and/or - translated into another language. (Hereinafter, translation is - included without limitation in the term "modification".) Each - licensee is addressed as "you". - - Activities other than copying, distribution and modification are - not covered by this License; they are outside its scope. The act - of running the Program is not restricted, and the output from the - Program is covered only if its contents constitute a work based on - the Program (independent of having been made by running the - Program). Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's - source code as you receive it, in any medium, provided that you - conspicuously and appropriately publish on each copy an appropriate - copyright notice and disclaimer of warranty; keep intact all the - notices that refer to this License and to the absence of any - warranty; and give any other recipients of the Program a copy of - this License along with the Program. - - You may charge a fee for the physical act of transferring a copy, - and you may at your option offer warranty protection in exchange - for a fee. - - 2. You may modify your copy or copies of the Program or any portion - of it, thus forming a work based on the Program, and copy and - distribute such modifications or work under the terms of Section 1 - above, provided that you also meet all of these conditions: - - a. You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b. You must cause any work that you distribute or publish, that - in whole or in part contains or is derived from the Program - or any part thereof, to be licensed as a whole at no charge - to all third parties under the terms of this License. - - c. If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display - an announcement including an appropriate copyright notice and - a notice that there is no warranty (or else, saying that you - provide a warranty) and that users may redistribute the - program under these conditions, and telling the user how to - view a copy of this License. (Exception: if the Program - itself is interactive but does not normally print such an - announcement, your work based on the Program is not required - to print an announcement.) - - These requirements apply to the modified work as a whole. If - identifiable sections of that work are not derived from the - Program, and can be reasonably considered independent and separate - works in themselves, then this License, and its terms, do not - apply to those sections when you distribute them as separate - works. But when you distribute the same sections as part of a - whole which is a work based on the Program, the distribution of - the whole must be on the terms of this License, whose permissions - for other licensees extend to the entire whole, and thus to each - and every part regardless of who wrote it. - - Thus, it is not the intent of this section to claim rights or - contest your rights to work written entirely by you; rather, the - intent is to exercise the right to control the distribution of - derivative or collective works based on the Program. - - In addition, mere aggregation of another work not based on the - Program with the Program (or with a work based on the Program) on - a volume of a storage or distribution medium does not bring the - other work under the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, - under Section 2) in object code or executable form under the terms - of Sections 1 and 2 above provided that you also do one of the - following: - - a. Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of - Sections 1 and 2 above on a medium customarily used for - software interchange; or, - - b. Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a - medium customarily used for software interchange; or, - - c. Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with - such an offer, in accord with Subsection b above.) - - The source code for a work means the preferred form of the work for - making modifications to it. For an executable work, complete - source code means all the source code for all modules it contains, - plus any associated interface definition files, plus the scripts - used to control compilation and installation of the executable. - However, as a special exception, the source code distributed need - not include anything that is normally distributed (in either - source or binary form) with the major components (compiler, - kernel, and so on) of the operating system on which the executable - runs, unless that component itself accompanies the executable. - - If distribution of executable or object code is made by offering - access to copy from a designated place, then offering equivalent - access to copy the source code from the same place counts as - distribution of the source code, even though third parties are not - compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program - except as expressly provided under this License. Any attempt - otherwise to copy, modify, sublicense or distribute the Program is - void, and will automatically terminate your rights under this - License. However, parties who have received copies, or rights, - from you under this License will not have their licenses - terminated so long as such parties remain in full compliance. - - 5. You are not required to accept this License, since you have not - signed it. However, nothing else grants you permission to modify - or distribute the Program or its derivative works. These actions - are prohibited by law if you do not accept this License. - Therefore, by modifying or distributing the Program (or any work - based on the Program), you indicate your acceptance of this - License to do so, and all its terms and conditions for copying, - distributing or modifying the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the - Program), the recipient automatically receives a license from the - original licensor to copy, distribute or modify the Program - subject to these terms and conditions. You may not impose any - further restrictions on the recipients' exercise of the rights - granted herein. You are not responsible for enforcing compliance - by third parties to this License. - - 7. If, as a consequence of a court judgment or allegation of patent - infringement or for any other reason (not limited to patent - issues), conditions are imposed on you (whether by court order, - agreement or otherwise) that contradict the conditions of this - License, they do not excuse you from the conditions of this - License. If you cannot distribute so as to satisfy simultaneously - your obligations under this License and any other pertinent - obligations, then as a consequence you may not distribute the - Program at all. For example, if a patent license would not permit - royalty-free redistribution of the Program by all those who - receive copies directly or indirectly through you, then the only - way you could satisfy both it and this License would be to refrain - entirely from distribution of the Program. - - If any portion of this section is held invalid or unenforceable - under any particular circumstance, the balance of the section is - intended to apply and the section as a whole is intended to apply - in other circumstances. - - It is not the purpose of this section to induce you to infringe any - patents or other property right claims or to contest validity of - any such claims; this section has the sole purpose of protecting - the integrity of the free software distribution system, which is - implemented by public license practices. Many people have made - generous contributions to the wide range of software distributed - through that system in reliance on consistent application of that - system; it is up to the author/donor to decide if he or she is - willing to distribute software through any other system and a - licensee cannot impose that choice. - - This section is intended to make thoroughly clear what is believed - to be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in - certain countries either by patents or by copyrighted interfaces, - the original copyright holder who places the Program under this - License may add an explicit geographical distribution limitation - excluding those countries, so that distribution is permitted only - in or among countries not thus excluded. In such case, this - License incorporates the limitation as if written in the body of - this License. - - 9. The Free Software Foundation may publish revised and/or new - versions of the General Public License from time to time. Such - new versions will be similar in spirit to the present version, but - may differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the - Program specifies a version number of this License which applies - to it and "any later version", you have the option of following - the terms and conditions either of that version or of any later - version published by the Free Software Foundation. If the Program - does not specify a version number of this License, you may choose - any version ever published by the Free Software Foundation. - - 10. If you wish to incorporate parts of the Program into other free - programs whose distribution conditions are different, write to the - author to ask for permission. For software which is copyrighted - by the Free Software Foundation, write to the Free Software - Foundation; we sometimes make exceptions for this. Our decision - will be guided by the two goals of preserving the free status of - all derivatives of our free software and of promoting the sharing - and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO - WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE - LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT - HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT - WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT - NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE - QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE - PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY - SERVICING, REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN - WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY - MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE - LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, - INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR - INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF - DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU - OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY - OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - ============================================= - - If you develop a new program, and you want it to be of the greatest - possible use to the public, the best way to achieve this is to make it - free software which everyone can redistribute and change under these - terms. - - To do so, attach the following notices to the program. It is safest - to attach them to the start of each source file to most effectively - convey the exclusion of warranty; and each file should have at least - the "copyright" line and a pointer to where the full notice is found. - - ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES. - Copyright (C) YEAR NAME OF AUTHOR - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. - - Also add information on how to contact you by electronic and paper - mail. - - If the program is interactive, make it output a short notice like - this when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) YEAR NAME OF AUTHOR - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details - type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - - The hypothetical commands `show w' and `show c' should show the - appropriate parts of the General Public License. Of course, the - commands you use may be called something other than `show w' and `show - c'; they could even be mouse-clicks or menu items--whatever suits your - program. - - You should also get your employer (if you work as a programmer) or - your school, if any, to sign a "copyright disclaimer" for the program, - if necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - SIGNATURE OF TY COON, 1 April 1989 - Ty Coon, President of Vice - - This General Public License does not permit incorporating your - program into proprietary programs. If your program is a subroutine - library, you may consider it more useful to permit linking proprietary - applications with the library. If this is what you want to do, use the - GNU Library General Public License instead of this License. - -  - File: gcj.info, Node: GNU Free Documentation License, Next: Invoking gcj, Prev: Copying, Up: Top - - GNU Free Documentation License - ****************************** - - Version 1.1, March 2000 - Copyright (C) 2000 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA - - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - 0. PREAMBLE - - The purpose of this License is to make a manual, textbook, or other - written document "free" in the sense of freedom: to assure everyone - the effective freedom to copy and redistribute it, with or without - modifying it, either commercially or noncommercially. Secondarily, - this License preserves for the author and publisher a way to get - credit for their work, while not being considered responsible for - modifications made by others. - - This License is a kind of "copyleft", which means that derivative - works of the document must themselves be free in the same sense. - It complements the GNU General Public License, which is a copyleft - license designed for free software. - - We have designed this License in order to use it for manuals for - free software, because free software needs free documentation: a - free program should come with manuals providing the same freedoms - that the software does. But this License is not limited to - software manuals; it can be used for any textual work, regardless - of subject matter or whether it is published as a printed book. - We recommend this License principally for works whose purpose is - instruction or reference. - - 1. APPLICABILITY AND DEFINITIONS - - This License applies to any manual or other work that contains a - notice placed by the copyright holder saying it can be distributed - under the terms of this License. The "Document", below, refers to - any such manual or work. Any member of the public is a licensee, - and is addressed as "you". - - A "Modified Version" of the Document means any work containing the - Document or a portion of it, either copied verbatim, or with - modifications and/or translated into another language. - - A "Secondary Section" is a named appendix or a front-matter - section of the Document that deals exclusively with the - relationship of the publishers or authors of the Document to the - Document's overall subject (or to related matters) and contains - nothing that could fall directly within that overall subject. - (For example, if the Document is in part a textbook of - mathematics, a Secondary Section may not explain any mathematics.) - The relationship could be a matter of historical connection with - the subject or with related matters, or of legal, commercial, - philosophical, ethical or political position regarding them. - - The "Invariant Sections" are certain Secondary Sections whose - titles are designated, as being those of Invariant Sections, in - the notice that says that the Document is released under this - License. - - The "Cover Texts" are certain short passages of text that are - listed, as Front-Cover Texts or Back-Cover Texts, in the notice - that says that the Document is released under this License. - - A "Transparent" copy of the Document means a machine-readable copy, - represented in a format whose specification is available to the - general public, whose contents can be viewed and edited directly - and straightforwardly with generic text editors or (for images - composed of pixels) generic paint programs or (for drawings) some - widely available drawing editor, and that is suitable for input to - text formatters or for automatic translation to a variety of - formats suitable for input to text formatters. A copy made in an - otherwise Transparent file format whose markup has been designed - to thwart or discourage subsequent modification by readers is not - Transparent. A copy that is not "Transparent" is called "Opaque". - - Examples of suitable formats for Transparent copies include plain - ASCII without markup, Texinfo input format, LaTeX input format, - SGML or XML using a publicly available DTD, and - standard-conforming simple HTML designed for human modification. - Opaque formats include PostScript, PDF, proprietary formats that - can be read and edited only by proprietary word processors, SGML - or XML for which the DTD and/or processing tools are not generally - available, and the machine-generated HTML produced by some word - processors for output purposes only. - - The "Title Page" means, for a printed book, the title page itself, - plus such following pages as are needed to hold, legibly, the - material this License requires to appear in the title page. For - works in formats which do not have any title page as such, "Title - Page" means the text near the most prominent appearance of the - work's title, preceding the beginning of the body of the text. - - 2. VERBATIM COPYING - - You may copy and distribute the Document in any medium, either - commercially or noncommercially, provided that this License, the - copyright notices, and the license notice saying this License - applies to the Document are reproduced in all copies, and that you - add no other conditions whatsoever to those of this License. You - may not use technical measures to obstruct or control the reading - or further copying of the copies you make or distribute. However, - you may accept compensation in exchange for copies. If you - distribute a large enough number of copies you must also follow - the conditions in section 3. - - You may also lend copies, under the same conditions stated above, - and you may publicly display copies. - - 3. COPYING IN QUANTITY - - If you publish printed copies of the Document numbering more than - 100, and the Document's license notice requires Cover Texts, you - must enclose the copies in covers that carry, clearly and legibly, - all these Cover Texts: Front-Cover Texts on the front cover, and - Back-Cover Texts on the back cover. Both covers must also clearly - and legibly identify you as the publisher of these copies. The - front cover must present the full title with all words of the - title equally prominent and visible. You may add other material - on the covers in addition. Copying with changes limited to the - covers, as long as they preserve the title of the Document and - satisfy these conditions, can be treated as verbatim copying in - other respects. - - If the required texts for either cover are too voluminous to fit - legibly, you should put the first ones listed (as many as fit - reasonably) on the actual cover, and continue the rest onto - adjacent pages. - - If you publish or distribute Opaque copies of the Document - numbering more than 100, you must either include a - machine-readable Transparent copy along with each Opaque copy, or - state in or with each Opaque copy a publicly-accessible - computer-network location containing a complete Transparent copy - of the Document, free of added material, which the general - network-using public has access to download anonymously at no - charge using public-standard network protocols. If you use the - latter option, you must take reasonably prudent steps, when you - begin distribution of Opaque copies in quantity, to ensure that - this Transparent copy will remain thus accessible at the stated - location until at least one year after the last time you - distribute an Opaque copy (directly or through your agents or - retailers) of that edition to the public. - - It is requested, but not required, that you contact the authors of - the Document well before redistributing any large number of - copies, to give them a chance to provide you with an updated - version of the Document. - - 4. MODIFICATIONS - - You may copy and distribute a Modified Version of the Document - under the conditions of sections 2 and 3 above, provided that you - release the Modified Version under precisely this License, with - the Modified Version filling the role of the Document, thus - licensing distribution and modification of the Modified Version to - whoever possesses a copy of it. In addition, you must do these - things in the Modified Version: - - A. Use in the Title Page (and on the covers, if any) a title - distinct from that of the Document, and from those of - previous versions (which should, if there were any, be listed - in the History section of the Document). You may use the - same title as a previous version if the original publisher of - that version gives permission. - - B. List on the Title Page, as authors, one or more persons or - entities responsible for authorship of the modifications in - the Modified Version, together with at least five of the - principal authors of the Document (all of its principal - authors, if it has less than five). - - C. State on the Title page the name of the publisher of the - Modified Version, as the publisher. - - D. Preserve all the copyright notices of the Document. - - E. Add an appropriate copyright notice for your modifications - adjacent to the other copyright notices. - - F. Include, immediately after the copyright notices, a license - notice giving the public permission to use the Modified - Version under the terms of this License, in the form shown in - the Addendum below. - - G. Preserve in that license notice the full lists of Invariant - Sections and required Cover Texts given in the Document's - license notice. - - H. Include an unaltered copy of this License. - - I. Preserve the section entitled "History", and its title, and - add to it an item stating at least the title, year, new - authors, and publisher of the Modified Version as given on - the Title Page. If there is no section entitled "History" in - the Document, create one stating the title, year, authors, - and publisher of the Document as given on its Title Page, - then add an item describing the Modified Version as stated in - the previous sentence. - - J. Preserve the network location, if any, given in the Document - for public access to a Transparent copy of the Document, and - likewise the network locations given in the Document for - previous versions it was based on. These may be placed in - the "History" section. You may omit a network location for a - work that was published at least four years before the - Document itself, or if the original publisher of the version - it refers to gives permission. - - K. In any section entitled "Acknowledgments" or "Dedications", - preserve the section's title, and preserve in the section all - the substance and tone of each of the contributor - acknowledgments and/or dedications given therein. - - L. Preserve all the Invariant Sections of the Document, - unaltered in their text and in their titles. Section numbers - or the equivalent are not considered part of the section - titles. - - M. Delete any section entitled "Endorsements". Such a section - may not be included in the Modified Version. - - N. Do not retitle any existing section as "Endorsements" or to - conflict in title with any Invariant Section. - - If the Modified Version includes new front-matter sections or - appendices that qualify as Secondary Sections and contain no - material copied from the Document, you may at your option - designate some or all of these sections as invariant. To do this, - add their titles to the list of Invariant Sections in the Modified - Version's license notice. These titles must be distinct from any - other section titles. - - You may add a section entitled "Endorsements", provided it contains - nothing but endorsements of your Modified Version by various - parties--for example, statements of peer review or that the text - has been approved by an organization as the authoritative - definition of a standard. - - You may add a passage of up to five words as a Front-Cover Text, - and a passage of up to 25 words as a Back-Cover Text, to the end - of the list of Cover Texts in the Modified Version. Only one - passage of Front-Cover Text and one of Back-Cover Text may be - added by (or through arrangements made by) any one entity. If the - Document already includes a cover text for the same cover, - previously added by you or by arrangement made by the same entity - you are acting on behalf of, you may not add another; but you may - replace the old one, on explicit permission from the previous - publisher that added the old one. - - The author(s) and publisher(s) of the Document do not by this - License give permission to use their names for publicity for or to - assert or imply endorsement of any Modified Version. - - 5. COMBINING DOCUMENTS - - You may combine the Document with other documents released under - this License, under the terms defined in section 4 above for - modified versions, provided that you include in the combination - all of the Invariant Sections of all of the original documents, - unmodified, and list them all as Invariant Sections of your - combined work in its license notice. - - The combined work need only contain one copy of this License, and - multiple identical Invariant Sections may be replaced with a single - copy. If there are multiple Invariant Sections with the same name - but different contents, make the title of each such section unique - by adding at the end of it, in parentheses, the name of the - original author or publisher of that section if known, or else a - unique number. Make the same adjustment to the section titles in - the list of Invariant Sections in the license notice of the - combined work. - - In the combination, you must combine any sections entitled - "History" in the various original documents, forming one section - entitled "History"; likewise combine any sections entitled - "Acknowledgments", and any sections entitled "Dedications". You - must delete all sections entitled "Endorsements." - - 6. COLLECTIONS OF DOCUMENTS - - You may make a collection consisting of the Document and other - documents released under this License, and replace the individual - copies of this License in the various documents with a single copy - that is included in the collection, provided that you follow the - rules of this License for verbatim copying of each of the - documents in all other respects. - - You may extract a single document from such a collection, and - distribute it individually under this License, provided you insert - a copy of this License into the extracted document, and follow - this License in all other respects regarding verbatim copying of - that document. - - 7. AGGREGATION WITH INDEPENDENT WORKS - - A compilation of the Document or its derivatives with other - separate and independent documents or works, in or on a volume of - a storage or distribution medium, does not as a whole count as a - Modified Version of the Document, provided no compilation - copyright is claimed for the compilation. Such a compilation is - called an "aggregate", and this License does not apply to the - other self-contained works thus compiled with the Document, on - account of their being thus compiled, if they are not themselves - derivative works of the Document. - - If the Cover Text requirement of section 3 is applicable to these - copies of the Document, then if the Document is less than one - quarter of the entire aggregate, the Document's Cover Texts may be - placed on covers that surround only the Document within the - aggregate. Otherwise they must appear on covers around the whole - aggregate. - - 8. TRANSLATION - - Translation is considered a kind of modification, so you may - distribute translations of the Document under the terms of section - 4. Replacing Invariant Sections with translations requires special - permission from their copyright holders, but you may include - translations of some or all Invariant Sections in addition to the - original versions of these Invariant Sections. You may include a - translation of this License provided that you also include the - original English version of this License. In case of a - disagreement between the translation and the original English - version of this License, the original English version will prevail. - - 9. TERMINATION - - You may not copy, modify, sublicense, or distribute the Document - except as expressly provided for under this License. Any other - attempt to copy, modify, sublicense or distribute the Document is - void, and will automatically terminate your rights under this - License. However, parties who have received copies, or rights, - from you under this License will not have their licenses - terminated so long as such parties remain in full compliance. - - 10. FUTURE REVISIONS OF THIS LICENSE - - The Free Software Foundation may publish new, revised versions of - the GNU Free Documentation License from time to time. Such new - versions will be similar in spirit to the present version, but may - differ in detail to address new problems or concerns. See - `http://www.gnu.org/copyleft/'. - - Each version of the License is given a distinguishing version - number. If the Document specifies that a particular numbered - version of this License "or any later version" applies to it, you - have the option of following the terms and conditions either of - that specified version or of any later version that has been - published (not as a draft) by the Free Software Foundation. If - the Document does not specify a version number of this License, - you may choose any version ever published (not as a draft) by the - Free Software Foundation. - - ADDENDUM: How to use this License for your documents - ==================================================== - - To use this License in a document you have written, include a copy of - the License in the document and put the following copyright and license - notices just after the title page: - - Copyright (C) YEAR YOUR NAME. - Permission is granted to copy, distribute and/or modify this document - under the terms of the GNU Free Documentation License, Version 1.1 - or any later version published by the Free Software Foundation; - with the Invariant Sections being LIST THEIR TITLES, with the - Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. - A copy of the license is included in the section entitled ``GNU - Free Documentation License''. - - If you have no Invariant Sections, write "with no Invariant Sections" - instead of saying which ones are invariant. If you have no Front-Cover - Texts, write "no Front-Cover Texts" instead of "Front-Cover Texts being - LIST"; likewise for Back-Cover Texts. - - If your document contains nontrivial examples of program code, we - recommend releasing these examples in parallel under your choice of - free software license, such as the GNU General Public License, to - permit their use in free software. - -  - File: gcj.info, Node: Invoking gcj, Next: Compatibility, Prev: GNU Free Documentation License, Up: Top - - Invoking gcj - ************ - - As `gcj' is just another front end to `gcc', it supports many of the - same options as gcc. *Note Option Summary: (gcc)Option Summary. This - manual only documents the options specific to `gcj'. - - * Menu: - - * Input and output files:: - * Input Options:: How gcj finds files - * Encodings:: Options controlling source file encoding - * Warnings:: Options controlling warnings specific to gcj - * Code Generation:: Options controlling the output of gcj - * Configure-time Options:: Options you won't use - -  - File: gcj.info, Node: Input and output files, Next: Input Options, Up: Invoking gcj - - Input and output files - ====================== - - A `gcj' command is like a `gcc' command, in that it consists of a - number of options and file names. The following kinds of input file - names are supported: - - `FILE.java' - Java source files. - - `FILE.class' - Java bytecode files. - - `FILE.zip' - `FILE.jar' - An archive containing one or more `.class' files, all of which are - compiled. The archive may be compressed. - - `@FILE' - A file containing a whitespace-separated list of input file names. - (Currently, these must all be `.java' source files, but that may - change.) Each named file is compiled, just as if it had been on - the command line. - - `LIBRARY.a' - `LIBRARY.so' - `-lLIBNAME' - Libraries to use when linking. See the `gcc' manual. - - You can specify more than one input file on the `gcj' command line, - in which case they will all be compiled. If you specify a `-o FILENAME' - option, all the input files will be compiled together, producing a - single output file, named FILENAME. This is allowed even when using - `-S' or `-c', but not when using `-C' or `--resource'. (This is an - extension beyond the what plain `gcc' allows.) (If more than one input - file is specified, all must currently be `.java' files, though we hope - to fix this.) - -  - File: gcj.info, Node: Input Options, Next: Encodings, Prev: Input and output files, Up: Invoking gcj - - Input Options - ============= - - `gcj' has options to control where it looks to find files it needs. - For instance, `gcj' might need to load a class that is referenced by - the file it has been asked to compile. Like other compilers for the - Java language, `gcj' has a notion of a "class path". There are several - options and environment variables which can be used to manipulate the - class path. When `gcj' looks for a given class, it searches the class - path looking for matching `.class' or `.java' file. `gcj' comes with a - built-in class path which points at the installed `libgcj.jar', a file - which contains all the standard classes. - - In the below, a directory or path component can refer either to an - actual directory on the filesystem, or to a `.zip' or `.jar' file, - which `gcj' will search as if it is a directory. - - `-IDIR' - All directories specified by `-I' are kept in order and prepended - to the class path constructed from all the other options. Unless - compatibility with tools like `javac' is imported, we recommend - always using `-I' instead of the other options for manipulating the - class path. - - `--classpath=PATH' - This sets the class path to PATH, a colon-separated list of paths - (on Windows-based systems, a semicolon-separate list of paths). - This does not override the builtin ("boot") search path. - - `--CLASSPATH=PATH' - Deprecated synonym for `--classpath'. - - `--bootclasspath=PATH' - Where to find the standard builtin classes, such as - `java.lang.String'. - - `--extdirs=PATH' - For each directory in the PATH, place the contents of that - directory at the end of the class path. - - `CLASSPATH' - This is an environment variable which holds a list of paths. - - The final class path is constructed like so: - - * First come all directories specified via `-I'. - - * If `--classpath' is specified, its value is appended. Otherwise, - if the `CLASSPATH' environment variable is specified, then its - value is appended. Otherwise, the current directory (`"."') is - appended. - - * If `--bootclasspath' was specified, append its value. Otherwise, - append the built-in system directory, `libgcj.jar'. - - * Finaly, if `--extdirs' was specified, append the contents of the - specified directories at the end of the class path. Otherwise, - append the contents of the built-in extdirs at - `$(prefix)/share/java/ext'. - - The classfile built by `gcj' for the class `java.lang.Object' (and - placed in `libgcj.jar') contains a special zero length attribute - `gnu.gcj.gcj-compiled'. The compiler looks for this attribute when - loading `java.lang.Object' and will report an error if it isn't found, - unless it compiles to bytecode (the option - `-fforce-classes-archive-check' can be used to override this behavior - in this particular case.) - - `-fforce-classes-archive-check' - This forces the compiler to always check for the special zero - length attribute `gnu.gcj.gcj-compiled' in `java.lang.Object' and - issue an error if it isn't found. - -  - File: gcj.info, Node: Encodings, Next: Warnings, Prev: Input Options, Up: Invoking gcj - - Encodings - ========= - - The Java programming language uses Unicode throughout. In an effort - to integrate well with other locales, `gcj' allows `.java' files to be - written using almost any encoding. `gcj' knows how to convert these - encodings into its internal encoding at compile time. - - You can use the `--encoding=NAME' option to specify an encoding (of - a particular character set) to use for source files. If this is not - specified, the default encoding comes from your current locale. If - your host system has insufficient locale support, then `gcj' assumes - the default encoding to be the `UTF-8' encoding of Unicode. - - To implement `--encoding', `gcj' simply uses the host platform's - `iconv' conversion routine. This means that in practice `gcj' is - limited by the capabilities of the host platform. - - The names allowed for the argument `--encoding' vary from platform - to platform (since they are not standardized anywhere). However, `gcj' - implements the encoding named `UTF-8' internally, so if you choose to - use this for your source files you can be assured that it will work on - every host. - -  - File: gcj.info, Node: Warnings, Next: Code Generation, Prev: Encodings, Up: Invoking gcj - - Warnings - ======== - - `gcj' implements several warnings. As with other generic `gcc' - warnings, if an option of the form `-Wfoo' enables a warning, then - `-Wno-foo' will disable it. Here we've chosen to document the form of - the warning which will have an effect - the default being the opposite - of what is listed. - - `-Wredundant-modifiers' - With this flag, `gcj' will warn about redundant modifiers. For - instance, it will warn if an interface method is declared `public'. - - `-Wextraneous-semicolon' - This causes `gcj' to warn about empty statements. Empty statements - have been deprecated. - - `-Wno-out-of-date' - This option will cause `gcj' not to warn when a source file is - newer than its matching class file. By default `gcj' will warn - about this. - - `-Wunused' - This is the same as `gcc''s `-Wunused'. - - `-Wall' - This is the same as `-Wredundant-modifiers -Wextraneous-semicolon - -Wunused'. - --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/java/gcj.info-2 gcc-3.3/gcc/java/gcj.info-2 *** gcc-3.2.3/gcc/java/gcj.info-2 2003-04-22 07:07:25.000000000 +0000 --- gcc-3.3/gcc/java/gcj.info-2 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,1416 **** - This is gcj.info, produced by makeinfo version 4.5 from gcj.texi. - - INFO-DIR-SECTION Programming - START-INFO-DIR-ENTRY - * Gcj: (gcj). Ahead-of-time compiler for the Java language - END-INFO-DIR-ENTRY - - INFO-DIR-SECTION Individual utilities - START-INFO-DIR-ENTRY - * gcjh: (gcj)Invoking gcjh. - Generate header files from Java class files - * jv-scan: (gcj)Invoking jv-scan. - Print information about Java source files - * jcf-dump: (gcj)Invoking jcf-dump. - Print information about Java class files - * gij: (gcj)Invoking gij. GNU interpreter for Java bytecode - * jv-convert: (gcj)Invoking jv-convert. - Convert file from one encoding to another - * rmic: (gcj)Invoking rmic. - Generate stubs for Remote Method Invocation. - * rmiregistry: (gcj)Invoking rmiregistry. - The remote object registry. - END-INFO-DIR-ENTRY - - Copyright (C) 2001, 2002 Free Software Foundation, Inc. - - Permission is granted to copy, distribute and/or modify this document - under the terms of the GNU Free Documentation License, Version 1.1 or - any later version published by the Free Software Foundation; with the - Invariant Sections being "GNU General Public License", the Front-Cover - texts being (a) (see below), and with the Back-Cover Texts being (b) - (see below). A copy of the license is included in the section entitled - "GNU Free Documentation License". - - (a) The FSF's Front-Cover Text is: - - A GNU Manual - - (b) The FSF's Back-Cover Text is: - - You have freedom to copy and modify this GNU Manual, like GNU - software. Copies published by the Free Software Foundation raise - funds for GNU development. - -  - File: gcj.info, Node: Code Generation, Next: Configure-time Options, Prev: Warnings, Up: Invoking gcj - - Code Generation - =============== - - In addition to the many `gcc' options controlling code generation, - `gcj' has several options specific to itself. - - `--main=CLASSNAME' - This option is used when linking to specify the name of the class - whose `main' method should be invoked when the resulting - executable is run. (1) - - `-DNAME[=VALUE]' - This option can only be used with `--main'. It defines a system - property named NAME with value VALUE. If VALUE is not specified - then it defaults to the empty string. These system properties are - initialized at the program's startup and can be retrieved at - runtime using the `java.lang.System.getProperty' method. - - `-C' - This option is used to tell `gcj' to generate bytecode (`.class' - files) rather than object code. - - `--resource RESOURCE-NAME' - This option is used to tell `gcj' to compile the contents of a - given file to object code so it may be accessed at runtime with - the core protocol handler as `core:/RESOURCE-NAME'. Note that - RESOURCE-NAME is the name of the resource as found at runtime; for - instance, it could be used in a call to `ResourceBundle.getBundle'. - The actual file name to be compiled this way must be specified - separately. - - `-d DIRECTORY' - When used with `-C', this causes all generated `.class' files to - be put in the appropriate subdirectory of DIRECTORY. By default - they will be put in subdirectories of the current working - directory. - - `-fno-bounds-check' - By default, `gcj' generates code which checks the bounds of all - array indexing operations. With this option, these checks are - omitted, which can improve performance for code that uses arrays - extensively. Note that this can result in unpredictable behavior - if the code in question actually does violate array bounds - constraints. It is safe to use this option if you are sure that - your code will never throw an `ArrayIndexOutOfBoundsException'. - - `-fno-store-check' - Don't generate array store checks. When storing objects into - arrays, a runtime check is normally generated in order to ensure - that the object is assignment compatible with the component type - of the array (which may not be known at compile-time). With this - option, these checks are omitted. This can improve performance - for code which stores objects into arrays frequently. It is safe - to use this option if you are sure your code will never throw an - `ArrayStoreException'. - - `-fjni' - With `gcj' there are two options for writing native methods: CNI - and JNI. By default `gcj' assumes you are using CNI. If you are - compiling a class with native methods, and these methods are - implemented using JNI, then you must use `-fjni'. This option - causes `gcj' to generate stubs which will invoke the underlying JNI - methods. - - `-fno-optimize-static-class-initialization' - When the optimization level is greather or equal to `-O2', `gcj' - will try to optimize the way calls into the runtime are made to - initialize static classes upon their first use (this optimization - isn't carried out if `-C' was specified.) When compiling to native - code, `-fno-optimize-static-class-initialization' will turn this - optimization off, regardless of the optimization level in use. - - ---------- Footnotes ---------- - - (1) The linker by default looks for a global function named `main'. - Since Java does not have global functions, and a collection of Java - classes may have more than one class with a `main' method, you need to - let the linker know which of those `main' methods it should invoke when - starting the application. - -  - File: gcj.info, Node: Configure-time Options, Prev: Code Generation, Up: Invoking gcj - - Configure-time Options - ====================== - - Some `gcj' code generations options affect the resulting ABI, and so - can only be meaningfully given when `libgcj', the runtime package, is - configured. `libgcj' puts the appropriate options from this group into - a `spec' file which is read by `gcj'. These options are listed here - for completeness; if you are using `libgcj' then you won't want to - touch these options. - - `-fuse-boehm-gc' - This enables the use of the Boehm GC bitmap marking code. In - particular this causes `gcj' to put an object marking descriptor - into each vtable. - - `-fhash-synchronization' - By default, synchronization data (the data used for `synchronize', - `wait', and `notify') is pointed to by a word in each object. - With this option `gcj' assumes that this information is stored in a - hash table and not in the object itself. - - `-fuse-divide-subroutine' - On some systems, a library routine is called to perform integer - division. This is required to get exception handling correct when - dividing by zero. - - `-fcheck-references' - On some systems it's necessary to insert inline checks whenever - accessing an object via a reference. On other systems you won't - need this because null pointer accesses are caught automatically - by the processor. - -  - File: gcj.info, Node: Compatibility, Next: Invoking gcjh, Prev: Invoking gcj, Up: Top - - Compatibility with the Java Platform - ************************************ - - As we believe it is important that the Java platform not be - fragmented, `gcj' and `libgcj' try to conform to the relevant Java - specifications. However, limited manpower and incomplete and unclear - documentation work against us. So, there are caveats to using `gcj'. - - This list of compatibility issues is by no means complete. - - * `gcj' implements the JDK 1.1 language. It supports inner classes, - though these are known to still be buggy. It does not yet support - the Java 2 `strictfp' keyword (it recognizes the keyword but - ignores it). - - * `libgcj' is largely compatible with the JDK 1.2 libraries. - However, `libgcj' is missing many packages, most notably - `java.awt'. There are also individual missing classes and methods. - We currently do not have a list showing differences between - `libgcj' and the Java 2 platform. - - * Sometimes the `libgcj' implementation of a method or class differs - from the JDK implementation. This is not always a bug. Still, if - it affects you, it probably makes sense to report it so that we - can discuss the appropriate response. - -  - File: gcj.info, Node: Invoking gcjh, Next: Invoking jv-scan, Prev: Compatibility, Up: Top - - Invoking gcjh - ************* - - The `gcjh' program is used to generate header files from class - files. It can generate both CNI and JNI header files, as well as stub - implementation files which can be used as a basis for implementing the - required native methods. - - `-stubs' - This causes `gcjh' to generate stub files instead of header files. - By default the stub file will be named after the class, with a - suffix of `.cc'. In JNI mode, the default output file will have - the suffix `.c'. - - `-jni' - This tells `gcjh' to generate a JNI header or stub. By default, - CNI headers are generated. - - `-add TEXT' - Inserts TEXT into the class body. This is ignored in JNI mode. - - `-append TEXT' - Inserts TEXT into the header file after the class declaration. - This is ignored in JNI mode. - - `-friend TEXT' - Inserts TEXT into the class as a `friend' declaration. This is - ignored in JNI mode. - - `-prepend TEXT' - Inserts TEXT into the header file before the class declaration. - This is ignored in JNI mode. - - `--classpath=PATH' - `--CLASSPATH=PATH' - `-IDIRECTORY' - `-d DIRECTORY' - `-o FILE' - These options are all identical to the corresponding `gcj' options. - - `-o FILE' - Sets the output file name. This cannot be used if there is more - than one class on the command line. - - `-td DIRECTORY' - Sets the name of the directory to use for temporary files. - - `-M' - Print all dependencies to stdout; suppress ordinary output. - - `-MM' - Print non-system dependencies to stdout; suppress ordinary output. - - `-MD' - Print all dependencies to stdout. - - `-MMD' - Print non-system dependencies to stdout. - - `--help' - Print help about `gcjh' and exit. No further processing is done. - - `--version' - Print version information for `gcjh' and exit. No further - processing is done. - - `-v, --verbose' - Print extra information while running. - - All remaining options are considered to be names of classes. - -  - File: gcj.info, Node: Invoking jv-scan, Next: Invoking jcf-dump, Prev: Invoking gcjh, Up: Top - - Invoking jv-scan - **************** - - The `jv-scan' program can be used to print information about a Java - source file (`.java' file). - - `--complexity' - This prints a complexity measure, related to cyclomatic - complexity, for each input file. - - `--encoding=NAME' - This works like the corresponding `gcj' option. - - `--print-main' - This prints the name of the class in this file containing a `main' - method. - - `--list-class' - This lists the names of all classes defined in the input files. - - `--list-filename' - If `--list-class' is given, this option causes `jv-scan' to also - print the name of the file in which each class was found. - - `-o FILE' - Print output to the named file. - - `--help' - Print help, then exit. - - `--version' - Print version number, then exit. - -  - File: gcj.info, Node: Invoking jcf-dump, Next: Invoking gij, Prev: Invoking jv-scan, Up: Top - - Invoking jcf-dump - ***************** - - This is a class file examiner, similar to `javap'. It will print - information about a number of classes, which are specifed by class name - or file name. - - `-c' - Disassemble method bodies. By default method bodies are not - printed. - - `--javap' - Generate output in `javap' format. The implementation of this - feature is very incomplete. - - `--classpath=PATH' - `--CLASSPATH=PATH' - `-IDIRECTORY' - `-o FILE' - These options as the same as the corresponding `gcj' options. - - `--help' - Print help, then exit. - - `--version' - Print version number, then exit. - - `-v, --verbose' - Print extra information while running. - -  - File: gcj.info, Node: Invoking gij, Next: Invoking jv-convert, Prev: Invoking jcf-dump, Up: Top - - Invoking gij - ************ - - `gij' is a Java bytecode interpreter included with `libgcj'. `gij' - is not available on every platform; porting it requires a small amount - of assembly programming which has not been done for all the targets - supported by `gcj'. - - The primary argument to `gij' is the name of a class or, with - `-jar', a jar file. Options before this argument are interpreted by - `gij'; remaining options are passed to the interpreted program. - - If a class name is specified and this class does not have a `main' - method with the appropriate signature (a `static void' method with a - `String[]' as its sole argument), then `gij' will print an error and - exit. - - If a jar file is specified then `gij' will use information in it to - determine which class' `main' method will be invoked. - - `gij' will invoke the `main' method with all the remaining - command-line options. - - Note that `gij' is not limited to interpreting code. Because - `libgcj' includes a class loader which can dynamically load shared - objects, it is possible to give `gij' the name of a class which has - been compiled and put into a shared library on the class path. - - `-DNAME[=VALUE]' - This defines a system property named NAME with value VALUE. If - VALUE is not specified then it defaults to the empty string. - These system properties are initialized at the program's startup - and can be retrieved at runtime using the - `java.lang.System.getProperty' method. - - `-ms=NUMBER' - This sets the initial heap size. - - `-mx=NUMBER' - This sets the maximum heap size. - - `-jar' - This indicates that the name passed to `gij' should be interpreted - as the name of a jar file, not a class. - - `--help' - Print help, then exit. - - `--version' - Print version number, then exit. - -  - File: gcj.info, Node: Invoking jv-convert, Next: Invoking rmic, Prev: Invoking gij, Up: Top - - Invoking jv-convert - ******************* - - `jv-convert' [`OPTION'] ... [INPUTFILE [OUTPUTFILE]] - - `jv-convert' is a utility included with `libgcj' which converts a - file from one encoding to another. It is similar to the Unix `iconv' - utility. - - The encodings supported by `jv-convert' are platform-dependent. - Currently there is no way to get a list of all supported encodings. - - `--encoding NAME' - `--from NAME' - Use NAME as the input encoding. The default is the current - locale's encoding. - - `--to NAME' - Use NAME as the output encoding. The default is the `JavaSrc' - encoding; this is ASCII with `\u' escapes for non-ASCII characters. - - `-i FILE' - Read from FILE. The default is to read from standard input. - - `-o FILE' - Write to FILE. The default is to write to standard output. - - `--reverse' - Swap the input and output encodings. - - `--help' - Print a help message, then exit. - - `--version' - Print version information, then exit. - -  - File: gcj.info, Node: Invoking rmic, Next: Invoking rmiregistry, Prev: Invoking jv-convert, Up: Top - - Invoking rmic - ************* - - `rmic' [`OPTION'] ... CLASS ... - - `rmic' is a utility included with `libgcj' which generates stubs for - remote objects. - - Note that this program isn't yet fully compatible with the JDK - `rmic'. Some options, such as `-classpath', are recognized but - currently ignored. We have left these options undocumented for now. - - Long options can also be given with a GNU-style leading `--'. For - instance, `--help' is accepted. - - `-keep' - `-keepgenerated' - By default, `rmic' deletes intermediate files. Either of these - options causes it not to delete such files. - - `-v1.1' - Cause `rmic' to create stubs and skeletons for the 1.1 protocol - version. - - `-vcompat' - Cause `rmic' to create stubs and skeletons compatible with both - the 1.1 and 1.2 protocol versions. This is the default. - - `-v1.2' - Cause `rmic' to create stubs and skeletons for the 1.2 protocol - version. - - `-nocompile' - Don't compile the generated files. - - `-verbose' - Print information about what `rmic' is doing. - - `-d DIRECTORY' - Put output files in DIRECTORY. By default the files are put in - the current working directory. - - `-help' - Print a help message, then exit. - - `-version' - Print version information, then exit. - -  - File: gcj.info, Node: Invoking rmiregistry, Next: About CNI, Prev: Invoking rmic, Up: Top - - Invoking rmiregistry - ******************** - - `rmiregistry' [`OPTION'] ... [PORT] - - `rmiregistry' starts a remote object registry on the current host. - If no port number is specified, then port 1099 is used. - - `--help' - Print a help message, then exit. - - `--version' - Print version information, then exit. - -  - File: gcj.info, Node: About CNI, Next: Resources, Prev: Invoking rmiregistry, Up: Top - - About CNI - ********* - - This documents CNI, the Cygnus Native Interface, which is is a - convenient way to write Java native methods using C++. This is a more - efficient, more convenient, but less portable alternative to the - standard JNI (Java Native Interface). - - * Menu: - - * Basic concepts:: Introduction to using CNI. - * Packages:: How packages are mapped to C++. - * Primitive types:: Handling Java types in C++. - * Interfaces:: How Java interfaces map to C++. - * Objects and Classes:: C++ and Java classes. - * Class Initialization:: How objects are initialized. - * Object allocation:: How to create Java objects in C++. - * Arrays:: Dealing with Java arrays in C++. - * Methods:: Java methods in C++. - * Strings:: Information about Java Strings. - * Mixing with C++:: How CNI can interoperate with C++. - * Exception Handling:: How exceptions are handled. - * Synchronization:: Synchronizing between Java and C++. - * Invocation:: Starting the Java runtime from C++. - * Reflection:: Using reflection from C++. - -  - File: gcj.info, Node: Basic concepts, Next: Packages, Up: About CNI - - Basic concepts - ============== - - In terms of languages features, Java is mostly a subset of C++. - Java has a few important extensions, plus a powerful standard class - library, but on the whole that does not change the basic similarity. - Java is a hybrid object-oriented language, with a few native types, in - addition to class types. It is class-based, where a class may have - static as well as per-object fields, and static as well as instance - methods. Non-static methods may be virtual, and may be overloaded. - Overloading is resolved at compile time by matching the actual argument - types against the parameter types. Virtual methods are implemented - using indirect calls through a dispatch table (virtual function table). - Objects are allocated on the heap, and initialized using a constructor - method. Classes are organized in a package hierarchy. - - All of the listed attributes are also true of C++, though C++ has - extra features (for example in C++ objects may be allocated not just on - the heap, but also statically or in a local stack frame). Because - `gcj' uses the same compiler technology as G++ (the GNU C++ compiler), - it is possible to make the intersection of the two languages use the - same ABI (object representation and calling conventions). The key idea - in CNI is that Java objects are C++ objects, and all Java classes are - C++ classes (but not the other way around). So the most important task - in integrating Java and C++ is to remove gratuitous incompatibilities. - - You write CNI code as a regular C++ source file. (You do have to use - a Java/CNI-aware C++ compiler, specifically a recent version of G++.) - - A CNI C++ source file must have: - - #include - - and then must include one header file for each Java class it uses, e.g.: - - #include - #include - #include - - These header files are automatically generated by `gcjh'. - - CNI provides some functions and macros to make using Java objects and - primitive types from C++ easier. In general, these CNI functions and - macros start with the `Jv' prefix, for example the function - `JvNewObjectArray'. This convention is used to avoid conflicts with - other libraries. Internal functions in CNI start with the prefix - `_Jv_'. You should not call these; if you find a need to, let us know - and we will try to come up with an alternate solution. (This manual - lists `_Jv_AllocBytes' as an example; CNI should instead provide a - `JvAllocBytes' function.) - - Limitations - ----------- - - Whilst a Java class is just a C++ class that doesn't mean that you - are freed from the shackles of Java, a CNI C++ class must adhere to the - rules of the Java programming language. - - For example: it is not possible to declare a method in a CNI class - that will take a C string (`char*') as an argument, or to declare a - member variable of some non-Java datatype. - -  - File: gcj.info, Node: Packages, Next: Primitive types, Prev: Basic concepts, Up: About CNI - - Packages - ======== - - The only global names in Java are class names, and packages. A - "package" can contain zero or more classes, and also zero or more - sub-packages. Every class belongs to either an unnamed package or a - package that has a hierarchical and globally unique name. - - A Java package is mapped to a C++ "namespace". The Java class - `java.lang.String' is in the package `java.lang', which is a - sub-package of `java'. The C++ equivalent is the class - `java::lang::String', which is in the namespace `java::lang' which is - in the namespace `java'. - - Here is how you could express this: - - (// Declare the class(es), possibly in a header file: - namespace java { - namespace lang { - class Object; - class String; - ... - } - } - - class java::lang::String : public java::lang::Object - { - ... - }; - - The `gcjh' tool automatically generates the nessary namespace - declarations. - - Leaving out package names - ------------------------- - - Always using the fully-qualified name of a java class can be - tiresomely verbose. Using the full qualified name also ties the code - to a single package making code changes necessary should the class move - from one package to another. The Java `package' declaration specifies - that the following class declarations are in the named package, without - having to explicitly name the full package qualifiers. The `package' - declaration can be followed by zero or more `import' declarations, which - allows either a single class or all the classes in a package to be - named by a simple identifier. C++ provides something similar with the - `using' declaration and directive. - - In Java: - - import PACKAGE-NAME.CLASS-NAME; - - allows the program text to refer to CLASS-NAME as a shorthand for the - fully qualified name: `PACKAGE-NAME.CLASS-NAME'. - - To achieve the same effect C++, you have to do this: - - using PACKAGE-NAME::CLASS-NAME; - - Java can also cause imports on demand, like this: - - import PACKAGE-NAME.*; - - Doing this allows any class from the package PACKAGE-NAME to be refered - to only by its class-name within the program text. - - The same effect can be achieved in C++ like this: - - using namespace PACKAGE-NAME; - -  - File: gcj.info, Node: Primitive types, Next: Interfaces, Prev: Packages, Up: About CNI - - Primitive types - =============== - - Java provides 8 "primitives" types which represent integers, floats, - characters and booleans (and also the void type). C++ has its own very - similar concrete types. Such types in C++ however are not always - implemented in the same way (an int might be 16, 32 or 64 bits for - example) so CNI provides a special C++ type for each primitive Java - type: - - *Java type* *C/C++ typename* *Description* - `char' `jchar' 16 bit Unicode character - `boolean' `jboolean' logical (true or false) values - `byte' `jbyte' 8-bit signed integer - `short' `jshort' 16 bit signed integer - `int' `jint' 32 bit signed integer - `long' `jlong' 64 bit signed integer - `float' `jfloat' 32 bit IEEE floating point number - `double' `jdouble' 64 bit IEEE floating point number - `void' `void' no value - - When refering to a Java type You should always use these C++ - typenames (e.g.: `jint') to avoid disappointment. - - Reference types associated with primitive types - ----------------------------------------------- - - In Java each primitive type has an associated reference type, e.g.: - `boolean' has an associated `java.lang.Boolean' class. In order to - make working with such classes easier GCJ provides the macro - `JvPrimClass': - - - macro: JvPrimClass type - Return a pointer to the `Class' object corresponding to the type - supplied. - - JvPrimClass(void) => java.lang.Void.TYPE - - -  - File: gcj.info, Node: Interfaces, Next: Objects and Classes, Prev: Primitive types, Up: About CNI - - Interfaces - ========== - - A Java class can "implement" zero or more "interfaces", in addition - to inheriting from a single base class. - - CNI allows CNI code to implement methods of interfaces. You can - also call methods through interface references, with some limitations. - - CNI doesn't understand interface inheritance at all yet. So, you - can only call an interface method when the declared type of the field - being called matches the interface which declares that method. The - workaround is to cast the interface reference to the right - superinterface. - - For example if you have: - - interface A - { - void a(); - } - - interface B extends A - { - void b(); - } - - and declare a variable of type `B' in C++, you can't call `a()' - unless you cast it to an `A' first. - -  - File: gcj.info, Node: Objects and Classes, Next: Class Initialization, Prev: Interfaces, Up: About CNI - - Objects and Classes - =================== - - Classes - ------- - - All Java classes are derived from `java.lang.Object'. C++ does not - have a unique root class, but we use the C++ class `java::lang::Object' - as the C++ version of the `java.lang.Object' Java class. All other - Java classes are mapped into corresponding C++ classes derived from - `java::lang::Object'. - - Interface inheritance (the `implements' keyword) is currently not - reflected in the C++ mapping. - - Object fields - ------------- - - Each object contains an object header, followed by the instance - fields of the class, in order. The object header consists of a single - pointer to a dispatch or virtual function table. (There may be extra - fields _in front of_ the object, for example for memory management, but - this is invisible to the application, and the reference to the object - points to the dispatch table pointer.) - - The fields are laid out in the same order, alignment, and size as in - C++. Specifically, 8-bite and 16-bit native types (`byte', `short', - `char', and `boolean') are _not_ widened to 32 bits. Note that the - Java VM does extend 8-bit and 16-bit types to 32 bits when on the VM - stack or temporary registers. - - If you include the `gcjh'-generated header for a class, you can - access fields of Java classes in the _natural_ way. For example, given - the following Java class: - - public class Int - { - public int i; - public Integer (int i) { this.i = i; } - public static zero = new Integer(0); - } - - you can write: - - #include ; - #include ; - - Int* - mult (Int *p, jint k) - { - if (k == 0) - return Int::zero; // Static member access. - return new Int(p->i * k); - } - - Access specifiers - ----------------- - - CNI does not strictly enforce the Java access specifiers, because - Java permissions cannot be directly mapped into C++ permission. - Private Java fields and methods are mapped to private C++ fields and - methods, but other fields and methods are mapped to public fields and - methods. - -  - File: gcj.info, Node: Class Initialization, Next: Object allocation, Prev: Objects and Classes, Up: About CNI - - Class Initialization - ==================== - - Java requires that each class be automatically initialized at the - time of the first active use. Initializing a class involves - initializing the static fields, running code in class initializer - methods, and initializing base classes. There may also be some - implementation specific actions, such as allocating `String' objects - corresponding to string literals in the code. - - The GCJ compiler inserts calls to `JvInitClass' at appropriate - places to ensure that a class is initialized when required. The C++ - compiler does not insert these calls automatically--it is the - programmer's responsibility to make sure classes are initialized. - However, this is fairly painless because of the conventions assumed by - the Java system. - - First, `libgcj' will make sure a class is initialized before an - instance of that object is created. This is one of the - responsibilities of the `new' operation. This is taken care of both in - Java code, and in C++ code. (When the G++ compiler sees a `new' of a - Java class, it will call a routine in `libgcj' to allocate the object, - and that routine will take care of initializing the class.) It follows - that you can access an instance field, or call an instance (non-static) - method and be safe in the knowledge that the class and all of its base - classes have been initialized. - - Invoking a static method is also safe. This is because the Java - compiler adds code to the start of a static method to make sure the - class is initialized. However, the C++ compiler does not add this - extra code. Hence, if you write a native static method using CNI, you - are responsible for calling `JvInitClass' before doing anything else in - the method (unless you are sure it is safe to leave it out). - - Accessing a static field also requires the class of the field to be - initialized. The Java compiler will generate code to call - `Jv_InitClass' before getting or setting the field. However, the C++ - compiler will not generate this extra code, so it is your - responsibility to make sure the class is initialized before you access - a static field from C++. - -  - File: gcj.info, Node: Object allocation, Next: Arrays, Prev: Class Initialization, Up: About CNI - - Object allocation - ================= - - New Java objects are allocated using a "class instance creation - expression", e.g.: - - new TYPE ( ... ) - - The same syntax is used in C++. The main difference is that C++ - objects have to be explicitly deleted; in Java they are automatically - deleted by the garbage collector. Using CNI, you can allocate a new - Java object using standard C++ syntax and the C++ compiler will allocate - memory from the garbage collector. If you have overloaded - constructors, the compiler will choose the correct one using standard - C++ overload resolution rules. - - For example: - - java::util::Hashtable *ht = new java::util::Hashtable(120); - - - Function: void* _Jv_AllocBytes (jsize SIZE) - Allocates SIZE bytes from the heap. The memory is not scanned by - the garbage collector but it freed if no references to it are - discovered. - -  - File: gcj.info, Node: Arrays, Next: Methods, Prev: Object allocation, Up: About CNI - - Arrays - ====== - - While in many ways Java is similar to C and C++, it is quite - different in its treatment of arrays. C arrays are based on the idea - of pointer arithmetic, which would be incompatible with Java's security - requirements. Java arrays are true objects (array types inherit from - `java.lang.Object'). An array-valued variable is one that contains a - reference (pointer) to an array object. - - Referencing a Java array in C++ code is done using the `JArray' - template, which as defined as follows: - - class __JArray : public java::lang::Object - { - public: - int length; - }; - - template - class JArray : public __JArray - { - T data[0]; - public: - T& operator[](jint i) { return data[i]; } - }; - - There are a number of `typedef's which correspond to `typedef's from - the JNI. Each is the type of an array holding objects of the relevant - type: - - typedef __JArray *jarray; - typedef JArray *jobjectArray; - typedef JArray *jbooleanArray; - typedef JArray *jbyteArray; - typedef JArray *jcharArray; - typedef JArray *jshortArray; - typedef JArray *jintArray; - typedef JArray *jlongArray; - typedef JArray *jfloatArray; - typedef JArray *jdoubleArray; - - - Method on template: T* elements (JArray ARRAY) - This template function can be used to get a pointer to the - elements of the `array'. For instance, you can fetch a pointer to - the integers that make up an `int[]' like so: - - extern jintArray foo; - jint *intp = elements (foo); - - The name of this function may change in the future. - - - Function: jobjectArray JvNewObjectArray (jsize LENGTH, jclass KLASS, - jobject INIT) - Here `klass' is the type of elements of the array and `init' is - the initial value put into every slot in the array. - - Creating arrays - --------------- - - For each primitive type there is a function which can be used to - create a new array of that type. The name of the function is of the - form: - - JvNewTYPEArray - - For example: - - JvNewBooleanArray - - can be used to create an array of Java primitive boolean types. - - The following function definition is the template for all such - functions: - - - Function: jbooleanArray JvNewBooleanArray (jint LENGTH) - Create's an array LENGTH indices long. - - - Function: jsize JvGetArrayLength (jarray ARRAY) - Returns the length of the ARRAY. - -  - File: gcj.info, Node: Methods, Next: Strings, Prev: Arrays, Up: About CNI - - Methods - ======= - - Java methods are mapped directly into C++ methods. The header files - generated by `gcjh' include the appropriate method definitions. - Basically, the generated methods have the same names and - _corresponding_ types as the Java methods, and are called in the - natural manner. - - Overloading - ----------- - - Both Java and C++ provide method overloading, where multiple methods - in a class have the same name, and the correct one is chosen (at - compile time) depending on the argument types. The rules for choosing - the correct method are (as expected) more complicated in C++ than in - Java, but given a set of overloaded methods generated by `gcjh' the C++ - compiler will choose the expected one. - - Common assemblers and linkers are not aware of C++ overloading, so - the standard implementation strategy is to encode the parameter types - of a method into its assembly-level name. This encoding is called - "mangling", and the encoded name is the "mangled name". The same - mechanism is used to implement Java overloading. For C++/Java - interoperability, it is important that both the Java and C++ compilers - use the _same_ encoding scheme. - - Static methods - -------------- - - Static Java methods are invoked in CNI using the standard C++ - syntax, using the `::' operator rather than the `.' operator. - - For example: - - jint i = java::lang::Math::round((jfloat) 2.3); - - C++ method definition syntax is used to define a static native method. - For example: - - #include - java::lang::Integer* - java::lang::Integer::getInteger(jstring str) - { - ... - } - - Object Constructors - ------------------- - - Constructors are called implicitly as part of object allocation - using the `new' operator. - - For example: - - java::lang::Integer *x = new java::lang::Integer(234); - - Java does not allow a constructor to be a native method. This - limitation can be coded round however because a constructor can _call_ - a native method. - - Instance methods - ---------------- - - Calling a Java instance method from a C++ CNI method is done using - the standard C++ syntax, e.g.: - - // First create the Java object. - java::lang::Integer *x = new java::lang::Integer(234); - // Now call a method. - jint prim_value = x->intValue(); - if (x->longValue == 0) - ... - - Defining a Java native instance method is also done the natural way: - - #include - - jdouble - java::lang:Integer::doubleValue() - { - return (jdouble) value; - } - - Interface methods - ----------------- - - In Java you can call a method using an interface reference. This is - supported, but not completly. *Note Interfaces::. - -  - File: gcj.info, Node: Strings, Next: Mixing with C++, Prev: Methods, Up: About CNI - - Strings - ======= - - CNI provides a number of utility functions for working with Java - Java `String' objects. The names and interfaces are analogous to those - of JNI. - - - Function: jstring JvNewString (const char* CHARS, jsize LEN) - Returns a Java `String' object with characters from the C string - CHARS up to the index LEN in that array. - - - Function: jstring JvNewStringLatin1 (const char* BYTES, jsize LEN) - Returns a Java `String' made up of LEN bytes from BYTES. - - - Function: jstring JvNewStringLatin1 (const char* BYTES) - As above but the length of the `String' is `strlen(BYTES)'. - - - Function: jstring JvNewStringUTF (const char* BYTES) - Returns a `String' which is made up of the UTF encoded characters - present in the C string BYTES. - - - Function: jchar* JvGetStringChars (jstring STR) - Returns a pointer to an array of characters making up the `String' - STR. - - - Function: int JvGetStringUTFLength (jstring STR) - Returns the number of bytes required to encode the contents of the - `String' STR in UTF-8. - - - Function: jsize JvGetStringUTFRegion (jstring STR, jsize START, - jsize LEN, char* BUF) - Puts the UTF-8 encoding of a region of the `String' STR into the - buffer `buf'. The region to fetch is marked by START and LEN. - - Note that BUF is a buffer, not a C string. It is _not_ null - terminated. - -  - File: gcj.info, Node: Mixing with C++, Next: Exception Handling, Prev: Strings, Up: About CNI - - Interoperating with C/C++ - ========================= - - Because CNI is designed to represent Java classes and methods it - cannot be mixed readily with C/C++ types. - - One important restriction is that Java classes cannot have non-Java - type instance or static variables and cannot have methods which take - non-Java types as arguments or return non-Java types. - - None of the following is possible with CNI: - - - class ::MyClass : public java::lang::Object - { - char* variable; // char* is not a valid Java type. - } - - - uint - ::SomeClass::someMethod (char *arg) - { - . - . - . - } // `uint' is not a valid Java type, neither is `char*' - - Of course, it is ok to use C/C++ types within the scope of a method: - - jint - ::SomeClass::otherMethod (jstring str) - { - char *arg = ... - . - . - . - } - - But this restriction can cause a problem so CNI includes the - `gnu.gcj.RawData' class. The `RawData' class is a "non-scanned - reference" type. In other words variables declared of type `RawData' - can contain any data and are not checked by the compiler in any way. - - This means that you can put C/C++ data structures (including classes) - in your CNI classes, as long as you use the appropriate cast. - - Here are some examples: - - - class ::MyClass : public java::lang::Object - { - gnu.gcj.RawData string; - - MyClass (); - gnu.gcj.RawData getText (); - void printText (); - } - - ::MyClass::MyClass () - { - char* text = ... - string = text; - } - - gnu.gcj.RawData - ::MyClass::getText () - { - return string; - } - - void - ::MyClass::printText () - { - printf("%s\n", (char*) string); - } - -  - File: gcj.info, Node: Exception Handling, Next: Synchronization, Prev: Mixing with C++, Up: About CNI - - Exception Handling - ================== - - While C++ and Java share a common exception handling framework, - things are not yet perfectly integrated. The main issue is that the - run-time type information facilities of the two languages are not - integrated. - - Still, things work fairly well. You can throw a Java exception from - C++ using the ordinary `throw' construct, and this exception can be - caught by Java code. Similarly, you can catch an exception thrown from - Java using the C++ `catch' construct. - - Here is an example: - - if (i >= count) - throw new java::lang::IndexOutOfBoundsException(); - - Normally, G++ will automatically detect when you are writing C++ - code that uses Java exceptions, and handle them appropriately. - However, if C++ code only needs to execute destructors when Java - exceptions are thrown through it, GCC will guess incorrectly. Sample - problematic code: - - struct S { ~S(); }; - - extern void bar(); // Is implemented in Java and may throw exceptions. - - void foo() - { - S s; - bar(); - } - - The usual effect of an incorrect guess is a link failure, - complaining of a missing routine called `__gxx_personality_v0'. - - You can inform the compiler that Java exceptions are to be used in a - translation unit, irrespective of what it might think, by writing - `#pragma GCC java_exceptions' at the head of the file. This `#pragma' - must appear before any functions that throw or catch exceptions, or run - destructors when exceptions are thrown through them. - -  - File: gcj.info, Node: Synchronization, Next: Invocation, Prev: Exception Handling, Up: About CNI - - Synchronization - =============== - - Each Java object has an implicit monitor. The Java VM uses the - instruction `monitorenter' to acquire and lock a monitor, and - `monitorexit' to release it. - - The corresponding CNI macros are `JvMonitorEnter' and - `JvMonitorExit' (JNI has similar methods `MonitorEnter' and - `MonitorExit'). - - The Java source language does not provide direct access to these - primitives. Instead, there is a `synchronized' statement that does an - implicit `monitorenter' before entry to the block, and does a - `monitorexit' on exit from the block. Note that the lock has to be - released even when the block is abnormally terminated by an exception, - which means there is an implicit `try finally' surrounding - synchronization locks. - - From C++, it makes sense to use a destructor to release a lock. CNI - defines the following utility class: - - class JvSynchronize() { - jobject obj; - JvSynchronize(jobject o) { obj = o; JvMonitorEnter(o); } - ~JvSynchronize() { JvMonitorExit(obj); } - }; - - So this Java code: - - synchronized (OBJ) - { - CODE - } - - might become this C++ code: - - { - JvSynchronize dummy (OBJ); - CODE; - } - - Java also has methods with the `synchronized' attribute. This is - equivalent to wrapping the entire method body in a `synchronized' - statement. (Alternatively, an implementation could require the caller - to do the synchronization. This is not practical for a compiler, - because each virtual method call would have to test at run-time if - synchronization is needed.) Since in `gcj' the `synchronized' - attribute is handled by the method implementation, it is up to the - programmer of a synchronized native method to handle the synchronization - (in the C++ implementation of the method). In otherwords, you need to - manually add `JvSynchronize' in a `native synchornized' method. - -  - File: gcj.info, Node: Invocation, Next: Reflection, Prev: Synchronization, Up: About CNI - - Invocation - ========== - - CNI permits C++ applications to make calls into Java classes, in - addition to allowing Java code to call into C++. Several functions, - known as the "invocation API", are provided to support this. - - - Function: jint JvCreateJavaVM (void* VM_ARGS) - Initializes the Java runtime. This function performs essential - initialization of the threads interface, garbage collector, - exception handling and other key aspects of the runtime. It must - be called once by an application with a non-Java `main()' - function, before any other Java or CNI calls are made. It is - safe, but not recommended, to call `JvCreateJavaVM()' more than - once provided it is only called from a single thread. The VMARGS - parameter can be used to specify initialization parameters for the - Java runtime. It may be `NULL'. This function returns `0' upon - success, or `-1' if the runtime is already initialized. - - _Note:_ In GCJ 3.1, the `vm_args' parameter is ignored. It may be - used in a future release. - - - Function: java::lang::Thread* JvAttachCurrentThread (jstring NAME, - java::lang::ThreadGroup* GROUP) - Registers an existing thread with the Java runtime. This must be - called once from each thread, before that thread makes any other - Java or CNI calls. It must be called after `JvCreateJavaVM'. NAME - specifies a name for the thread. It may be `NULL', in which case a - name will be generated. GROUP is the ThreadGroup in which this - thread will be a member. If it is `NULL', the thread will be a - member of the main thread group. The return value is the Java - `Thread' object that represents the thread. It is safe to call - `JvAttachCurrentThread()' more than once from the same thread. If - the thread is already attached, the call is ignored and the current - thread object is returned. - - - Function: jint JvDetachCurrentThread () - Unregisters a thread from the Java runtime. This should be called - by threads that were attached using `JvAttachCurrentThread()', - after they have finished making calls to Java code. This ensures - that any resources associated with the thread become eligible for - garbage collection. This function returns `0' upon success, or - `-1' if the current thread is not attached. - - Handling uncaught exceptions - ---------------------------- - - If an exception is thrown from Java code called using the invocation - API, and no handler for the exception can be found, the runtime will - abort the application. In order to make the application more robust, it - is recommended that code which uses the invocation API be wrapped by a - top-level try/catch block that catches all Java exceptions. - - Example - ------- - - The following code demonstrates the use of the invocation API. In - this example, the C++ application initializes the Java runtime and - attaches itself. The `java.lang.System' class is initialized in order to - access its `out' field, and a Java string is printed. Finally, the - thread is detached from the runtime once it has finished making Java - calls. Everything is wrapped with a try/catch block to provide a - default handler for any uncaught exceptions. - - The example can be compiled with `c++ test.cc -lgcj'. - - // test.cc - #include - #include - #include - #include - - int main(int argc, char *argv) - { - using namespace java::lang; - - try - { - JvCreateJavaVM(NULL); - JvAttachCurrentThread(NULL, NULL); - - String *message = JvNewStringLatin1("Hello from C++"); - JvInitClass(&System.class$); - System::out->println(message); - - JvDetachCurrentThread(); - } - catch (Throwable *t) - { - System::err->println(JvNewStringLatin1("Unhandled Java exception:")); - t->printStackTrace(); - } - } - -  - File: gcj.info, Node: Reflection, Prev: Invocation, Up: About CNI - - Reflection - ========== - - Reflection is possible with CNI code, it functions similarly to how - it functions with JNI. - - The types `jfieldID' and `jmethodID' are as in JNI. - - The functions: - - * `JvFromReflectedField', - - * `JvFromReflectedMethod', - - * `JvToReflectedField' - - * `JvToFromReflectedMethod' - - will be added shortly, as will other functions corresponding to JNI. - -  - File: gcj.info, Node: Resources, Prev: About CNI, Up: Top - - Resources - ********* - - While writing `gcj' and `libgcj' we have, of course, relied heavily - on documentation from Sun Microsystems. In particular we have used The - Java Language Specification (both first and second editions), the Java - Class Libraries (volumes one and two), and the Java Virtual Machine - Specification. In addition we've used the online documentation at - `http://java.sun.com/'. - - The current `gcj' home page is `http://gcc.gnu.org/java/'. - - For more information on gcc, see `http://gcc.gnu.org/'. - - Some `libgcj' testing is done using the Mauve test suite. This is a - free software Java class library test suite which is being written - because the JCK is not free. See `http://sources.redhat.com/mauve/' - for more information. - - --- 0 ---- diff -Nrc3pad gcc-3.2.3/gcc/java/gcj.texi gcc-3.3/gcc/java/gcj.texi *** gcc-3.2.3/gcc/java/gcj.texi 2003-02-05 05:09:15.000000000 +0000 --- gcc-3.3/gcc/java/gcj.texi 2003-03-30 17:01:58.000000000 +0000 *************** *** 1,7 **** ! @\input texinfo @c -*-texinfo-*- @setfilename gcj.info @settitle Guide to GNU gcj @c Note: When reading this manual you'll find lots of strange @c circumlocutions like ``compiler for the Java language''. @c This is necessary due to Sun's restrictions on the use of --- 1,9 ---- ! \input texinfo @c -*-texinfo-*- @setfilename gcj.info @settitle Guide to GNU gcj + @include gcc-common.texi + @c Note: When reading this manual you'll find lots of strange @c circumlocutions like ``compiler for the Java language''. @c This is necessary due to Sun's restrictions on the use of *************** *** 11,22 **** @set copyrights-gcj 2001, 2002 @c Versions ! @set version-gcc 3.2.3 ! @set which-gcj GCC-@value{version-gcc} ! @macro gcctabopt{body} ! @code{\body\} ! @end macro @ifinfo @format --- 13,52 ---- @set copyrights-gcj 2001, 2002 @c Versions ! @set which-gcj GCC-@value{version-GCC} ! @copying ! @c man begin COPYRIGHT ! Copyright @copyright{} @value{copyrights-gcj} Free Software Foundation, Inc. ! ! Permission is granted to copy, distribute and/or modify this document ! under the terms of the GNU Free Documentation License, Version 1.2 or ! any later version published by the Free Software Foundation; with the ! Invariant Sections being ``GNU General Public License'', the Front-Cover ! texts being (a) (see below), and with the Back-Cover Texts being (b) ! (see below). A copy of the license is included in the ! @c man end ! section entitled ! ``GNU Free Documentation License''. ! @ignore ! @c man begin COPYRIGHT ! man page gfdl(7). ! @c man end ! @end ignore ! ! @c man begin COPYRIGHT ! ! (a) The FSF's Front-Cover Text is: ! ! A GNU Manual ! ! (b) The FSF's Back-Cover Text is: ! ! You have freedom to copy and modify this GNU Manual, like GNU ! software. Copies published by the Free Software Foundation raise ! funds for GNU development. ! @c man end ! @end copying @ifinfo @format *************** *** 43,75 **** @end direntry @end format ! @c man begin COPYRIGHT ! Copyright (C) @value{copyrights-gcj} Free Software Foundation, Inc. ! ! Permission is granted to copy, distribute and/or modify this document ! under the terms of the GNU Free Documentation License, Version 1.1 or ! any later version published by the Free Software Foundation; with the ! Invariant Sections being ``GNU General Public License'', the Front-Cover ! texts being (a) (see below), and with the Back-Cover Texts being (b) ! (see below). A copy of the license is included in the ! @c man end ! section entitled ! ``GNU Free Documentation License''. ! @ignore ! @c man begin COPYRIGHT ! man page gfdl(7). ! @c man end ! @end ignore ! ! (a) The FSF's Front-Cover Text is: ! ! A GNU Manual ! ! (b) The FSF's Back-Cover Text is: ! ! You have freedom to copy and modify this GNU Manual, like GNU ! software. Copies published by the Free Software Foundation raise ! funds for GNU development. @end ifinfo @titlepage --- 73,79 ---- @end direntry @end format ! @insertcopying @end ifinfo @titlepage *************** man page gfdl(7). *** 78,108 **** @page @vskip 0pt plus 1filll - Copyright @copyright{} @value{copyrights-gcj} Free Software Foundation, Inc. - @sp 2 For the @value{which-gcj} Version* @sp 1 Published by the Free Software Foundation @* 59 Temple Place - Suite 330@* Boston, MA 02111-1307, USA@* @sp 1 ! Permission is granted to copy, distribute and/or modify this document ! under the terms of the GNU Free Documentation License, Version 1.1 or ! any later version published by the Free Software Foundation; with the ! Invariant Sections being ``GNU General Public License'', the Front-Cover ! texts being (a) (see below), and with the Back-Cover Texts being (b) ! (see below). A copy of the license is included in the section entitled ! ``GNU Free Documentation License''. ! ! (a) The FSF's Front-Cover Text is: ! ! A GNU Manual ! ! (b) The FSF's Back-Cover Text is: ! ! You have freedom to copy and modify this GNU Manual, like GNU ! software. Copies published by the Free Software Foundation raise ! funds for GNU development. @end titlepage @contents @page --- 82,94 ---- @page @vskip 0pt plus 1filll For the @value{which-gcj} Version* @sp 1 Published by the Free Software Foundation @* 59 Temple Place - Suite 330@* Boston, MA 02111-1307, USA@* @sp 1 ! @insertcopying @end titlepage @contents @page *************** files and object files, and it can read *** 130,135 **** --- 116,122 ---- * Invoking rmic:: Generate stubs for Remote Method Invocation. * Invoking rmiregistry:: The remote object registry. * About CNI:: Description of the Cygnus Native Interface + * System properties:: Modifying runtime behavior of the libgcj library * Resources:: Where to look for more information @end menu *************** file, which @command{gcj} will search as *** 242,248 **** @item -I@var{dir} All directories specified by @code{-I} are kept in order and prepended to the class path constructed from all the other options. Unless ! compatibility with tools like @code{javac} is imported, we recommend always using @code{-I} instead of the other options for manipulating the class path. --- 229,235 ---- @item -I@var{dir} All directories specified by @code{-I} are kept in order and prepended to the class path constructed from all the other options. Unless ! compatibility with tools like @code{javac} is important, we recommend always using @code{-I} instead of the other options for manipulating the class path. *************** If @code{--bootclasspath} was specified, *** 282,288 **** Otherwise, append the built-in system directory, @file{libgcj.jar}. @item ! Finaly, if @code{--extdirs} was specified, append the contents of the specified directories at the end of the class path. Otherwise, append the contents of the built-in extdirs at @code{$(prefix)/share/java/ext}. @end itemize --- 269,275 ---- Otherwise, append the built-in system directory, @file{libgcj.jar}. @item ! Finally, if @code{--extdirs} was specified, append the contents of the specified directories at the end of the class path. Otherwise, append the contents of the built-in extdirs at @code{$(prefix)/share/java/ext}. @end itemize *************** using JNI, then you must use @code{-fjni *** 427,434 **** @command{gcj} to generate stubs which will invoke the underlying JNI methods. @item -fno-optimize-static-class-initialization ! When the optimization level is greather or equal to @code{-O2}, @command{gcj} will try to optimize the way calls into the runtime are made to initialize static classes upon their first use (this optimization isn't carried out if @code{-C} was specified.) When compiling to native --- 414,425 ---- @command{gcj} to generate stubs which will invoke the underlying JNI methods. + @item -fno-assert + Don't recognize the @code{assert} keyword. This is for compatibility + with older versions of the language specification. + @item -fno-optimize-static-class-initialization ! When the optimization level is greater or equal to @code{-O2}, @command{gcj} will try to optimize the way calls into the runtime are made to initialize static classes upon their first use (this optimization isn't carried out if @code{-C} was specified.) When compiling to native *************** specifications. However, limited manpow *** 482,495 **** documentation work against us. So, there are caveats to using @command{gcj}. This list of compatibility issues is by no means complete. @itemize @bullet @item ! @command{gcj} implements the JDK 1.1 language. It supports inner classes, ! though these are known to still be buggy. It does not yet support the ! Java 2 @code{strictfp} keyword (it recognizes the keyword but ignores ! it). @item @code{libgcj} is largely compatible with the JDK 1.2 libraries. --- 473,493 ---- documentation work against us. So, there are caveats to using @command{gcj}. + @menu + * Limitations:: + * Extensions:: + @end menu + + @node Limitations + @section Standard features not yet supported + This list of compatibility issues is by no means complete. @itemize @bullet @item ! @command{gcj} implements the JDK 1.2 language. It supports inner classes ! and the new 1.4 @code{assert} keyword. It does not yet support the Java 2 ! @code{strictfp} keyword (it recognizes the keyword but ignores it). @item @code{libgcj} is largely compatible with the JDK 1.2 libraries. *************** Sometimes the @code{libgcj} implementati *** 503,510 **** --- 501,544 ---- from the JDK implementation. This is not always a bug. Still, if it affects you, it probably makes sense to report it so that we can discuss the appropriate response. + + @item + @command{gcj} does not currently allow for piecemeal replacement of + components within @code{libgcj}. Unfortunately, programmers often want + to use newer versions of certain packages, such as those provided by + the Apache Software Foundation's Jakarta project. This has forced us + to place the @code{org.w3c.dom} and @code{org.xml.sax} packages into + their own libraries, separate from @code{libgcj}. If you intend to + use these classes, you must link them explicitly with + @code{-l-org-w3c-dom} and @code{-l-org-xml-sax}. Future versions of + @command{gcj} may not have this restriction. @end itemize + @node Extensions + @section Extra features unique to gcj + + The main feature of @command{gcj} is that it can compile programs + written in the Java programming language to native code. Most + extensions that have been added are to facilitate this functionality. + + @itemize @bullet + @item + @command{gcj} makes it easy and efficient to mix code written in Java and C++. + @xref{About CNI}, for more info on how to use this in your programs. + + @item + When you compile your classes into a shared library they can be automatically + loaded by the @code{libgcj} system classloader. When trying to load a class + @code{gnu.pkg.SomeClass} the system classloader will first try to load the + shared library @file{lib-gnu-pkg-SomeClass.so}, if that fails to load the + class then it will try to load @file{lib-gnu-pkg.so} and finally when the + class is still not loaded it will try to load @file{lib-gnu.so}. Note that + all @samp{.}s will be transformed into @samp{-}s and that searching + for inner classes starts with their outermost outer class. If the class + cannot be found this way the system classloader tries to use + the @code{libgcj} bytecode interpreter to load the class from the standard + classpath. + @end itemize @node Invoking gcjh @chapter Invoking gcjh *************** source file (@file{.java} file). *** 621,628 **** @ignore @c man begin SYNOPSIS jv-scan ! jv-scan [@option{--complexity}] [@option{--encoding}=@var{name}] ! [@option{--print-main}] [@option{--list-class}] [@option{--list-filename}] [@option{--version}] [@option{--help}] [@option{-o} @var{file}] @var{inputfile}@dots{} @c man end --- 655,663 ---- @ignore @c man begin SYNOPSIS jv-scan ! jv-scan [@option{--no-assert}] [@option{--complexity}] ! [@option{--encoding}=@var{name}] [@option{--print-main}] ! [@option{--list-class}] [@option{--list-filename}] [@option{--version}] [@option{--help}] [@option{-o} @var{file}] @var{inputfile}@dots{} @c man end *************** and the Info entries for @file{gcj} and *** 635,640 **** --- 670,679 ---- @c man begin OPTIONS jv-scan @table @gcctabopt + @item --no-assert + Don't recognize the @code{assert} keyword, for backwards compatibility + with older versions of the language specification. + @item --complexity This prints a complexity measure, related to cyclomatic complexity, for each input file. *************** and the Info entries for @file{gcj} and *** 687,693 **** @c man begin DESCRIPTION jcf-dump This is a class file examiner, similar to @code{javap}. It will print ! information about a number of classes, which are specifed by class name or file name. @c man end --- 726,732 ---- @c man begin DESCRIPTION jcf-dump This is a class file examiner, similar to @code{javap}. It will print ! information about a number of classes, which are specified by class name or file name. @c man end *************** Print extra information while running. *** 730,738 **** gij [@option{OPTION}] @dots{} @var{JARFILE} [@var{ARGS}@dots{}] gij [@option{-jar}] [@option{OPTION}] @dots{} @var{CLASS} [@var{ARGS}@dots{}] [@option{-D}@var{name}[=@var{value}]@dots{}] [@option{-ms=}@var{number}] [@option{-mx=}@var{number}] ! [@option{--version}] [@option{--help}] @c man end @c man begin SEEALSO gij gcc(1), gcj(1), gcjh(1), jv-scan(1), jcf-dump(1), gfdl(7), --- 769,778 ---- gij [@option{OPTION}] @dots{} @var{JARFILE} [@var{ARGS}@dots{}] gij [@option{-jar}] [@option{OPTION}] @dots{} @var{CLASS} [@var{ARGS}@dots{}] + [@option{-cp} @var{path}] [@option{-classpath} @var{path}] [@option{-D}@var{name}[=@var{value}]@dots{}] [@option{-ms=}@var{number}] [@option{-mx=}@var{number}] ! [@option{--showversion}] [@option{--version}] [@option{--help}] @c man end @c man begin SEEALSO gij gcc(1), gcj(1), gcjh(1), jv-scan(1), jcf-dump(1), gfdl(7), *************** been compiled and put into a shared libr *** 772,777 **** --- 812,824 ---- @c man begin OPTIONS gij @table @gcctabopt + @item -cp @var{path} + @itemx -classpath @var{path} + Set the initial class path. The class path is used for finding + class and resource files. If specified, this option overrides the + @code{CLASSPATH} environment variable. Note that this option is + ignored if @code{-jar} is used. + @item -D@var{name}[=@var{value}] This defines a system property named @var{name} with value @var{value}. If @var{value} is not specified then it defaults to the empty string. *************** as the name of a jar file, not a class. *** 792,797 **** --- 839,847 ---- @item --help Print help, then exit. + @item --showversion + Print version number and continue. + @item --version Print version number, then exit. @end table *************** Print version information, then exit. *** 942,948 **** @c man title rmiregistry Remote object registry @c man begin SYNOPSIS rmiregistry ! @command{rmiregistry} [@option{OPTION}] @dots{} [@var{port}] @ignore [@option{--help}] [@option{--version}] --- 992,998 ---- @c man title rmiregistry Remote object registry @c man begin SYNOPSIS rmiregistry ! @command{rmic} [@option{OPTION}] @dots{} [@var{port}] @ignore [@option{--help}] [@option{--version}] *************** class java::lang::String : public java:: *** 1100,1106 **** @}; @end example ! @noindent The @code{gcjh} tool automatically generates the nessary namespace declarations. --- 1150,1156 ---- @}; @end example ! @noindent The @code{gcjh} tool automatically generates the necessary namespace declarations. *************** import @var{package-name}.*; *** 1142,1148 **** @end example @noindent Doing this allows any class from the package @var{package-name} to be ! refered to only by its class-name within the program text. @noindent The same effect can be achieved in C++ like this: --- 1192,1198 ---- @end example @noindent Doing this allows any class from the package @var{package-name} to be ! referred to only by its class-name within the program text. @noindent The same effect can be achieved in C++ like this: *************** so CNI provides a special C++ type for e *** 1174,1180 **** @item @code{void} @tab @code{void} @tab no value @end multitable ! When refering to a Java type You should always use these C++ typenames (e.g.: @code{jint}) to avoid disappointment. --- 1224,1230 ---- @item @code{void} @tab @code{void} @tab no value @end multitable ! When referring to a Java type You should always use these C++ typenames (e.g.: @code{jint}) to avoid disappointment. *************** programmer's responsibility to make sure *** 1316,1331 **** However, this is fairly painless because of the conventions assumed by the Java system. ! First, @code{libgcj} will make sure a class is initialized ! before an instance of that object is created. This is one ! of the responsibilities of the @code{new} operation. This is ! taken care of both in Java code, and in C++ code. (When the G++ ! compiler sees a @code{new} of a Java class, it will call ! a routine in @code{libgcj} to allocate the object, and that ! routine will take care of initializing the class.) It follows that you can ! access an instance field, or call an instance (non-static) ! method and be safe in the knowledge that the class and all ! of its base classes have been initialized. Invoking a static method is also safe. This is because the Java compiler adds code to the start of a static method to make sure --- 1366,1382 ---- However, this is fairly painless because of the conventions assumed by the Java system. ! First, @code{libgcj} will make sure a class is initialized before an ! instance of that object is created. This is one of the ! responsibilities of the @code{new} operation. This is taken care of ! both in Java code, and in C++ code. When G++ sees a @code{new} of a ! Java class, it will call a routine in @code{libgcj} to allocate the ! object, and that routine will take care of initializing the class. ! Note however that this does not happen for Java arrays; you must ! allocate those using the appropriate CNI function. It follows that ! you can access an instance field, or call an instance (non-static) ! method and be safe in the knowledge that the class and all of its base ! classes have been initialized. Invoking a static method is also safe. This is because the Java compiler adds code to the start of a static method to make sure *************** java::lang:Integer::doubleValue() *** 1571,1577 **** @subsection Interface methods In Java you can call a method using an interface reference. This is ! supported, but not completly. @xref{Interfaces}. --- 1622,1628 ---- @subsection Interface methods In Java you can call a method using an interface reference. This is ! supported, but not completely. @xref{Interfaces}. *************** the @code{synchronized} attribute is han *** 1815,1822 **** method implementation, it is up to the programmer of a synchronized native method to handle the synchronization (in the C++ implementation of the method). ! In otherwords, you need to manually add @code{JvSynchronize} ! in a @code{native synchornized} method. @node Invocation @section Invocation --- 1866,1873 ---- method implementation, it is up to the programmer of a synchronized native method to handle the synchronization (in the C++ implementation of the method). ! In other words, you need to manually add @code{JvSynchronize} ! in a @code{native synchronized} method. @node Invocation @section Invocation *************** int main(int argc, char *argv) *** 1901,1907 **** JvAttachCurrentThread(NULL, NULL); String *message = JvNewStringLatin1("Hello from C++"); ! JvInitClass(&System.class$); System::out->println(message); JvDetachCurrentThread(); --- 1952,1958 ---- JvAttachCurrentThread(NULL, NULL); String *message = JvNewStringLatin1("Hello from C++"); ! JvInitClass(&System::class$); System::out->println(message); JvDetachCurrentThread(); *************** are as in JNI@. *** 1936,1941 **** --- 1987,2240 ---- @noindent will be added shortly, as will other functions corresponding to JNI@. + @node System properties + @chapter System properties + + The runtime behavior of the @code{libgcj} library can be modified by setting + certain system properties. These properties can be compiled into the program + using the @code{-D@var{name}[=@var{value}]} option to @command{gcj} or by + setting them explicitly in the program by calling the + @code{java.lang.System.setProperty()} method. Some system properties are only + used for informational purposes (like giving a version number or a user name). + A program can inspect the current value of a property by calling the + @code{java.lang.System.getProperty()} method. + + @menu + * Standard Properties:: Standard properties supported by @code{libgcj} + * GNU Classpath Properties:: Properties found in Classpath based libraries + * libgcj Runtime Properties:: Properties specific to @code{libgcj} + @end menu + + @node Standard Properties + @section Standard Properties + + The following properties are normally found in all implementations of the core + libraries for the Java language. + + @table @gcctabopt + + @item java.version + The @code{libgcj} version number. + + @item java.vendor + Set to @samp{The Free Software Foundation, Inc.} + + @item java.vendor.url + Set to @uref{http://gcc.gnu.org/java/}. + + @item java.home + The directory where @code{gcj} was installed. Taken from the @code{--prefix} + option given to @command{configure}. + + @item java.class.version + The class format version number supported by the libgcj byte code interpreter. + (Currently @samp{46.0}) + + @item java.vm.specification.version + The Virtual Machine Specification version implemented by @code{libgcj}. + (Currently @samp{1.0}) + + @item java.vm.specification.vendor + The name of the Virtual Machine specification designer. + + @item java.vm.specification.name + The name of the Virtual Machine specification + (Set to @samp{Java Virtual Machine Specification}). + + @item java.vm.version + The @command{gcj} version number. + + @item java.vm.vendor + Set to @samp{The Free Software Foundation, Inc.} + + @item java.vm.name + Set to @samp{GNU libgcj}. + + @item java.specification.version + The Runtime Environment specification version implemented by @code{libgcj}. + (Currently set to @samp{1.3}) + + @item java.specification.vendor + The Runtime Environment specification designer. + + @item java.specification.name + The name of the Runtime Environment specification + (Set to @samp{Java Platform API Specification}). + + @item java.class.path + The paths (jar files, zip files and directories) used for finding class files. + + @item java.library.path + Directory path used for finding native libraries. + + @item java.io.tmpdir + The directory used to put temporary files in. + + @item java.compiler + Name of the Just In Time compiler to use by the byte code interpreter. + Currently not used in @code{libgcj}. + + @item java.ext.dirs + Directories containing jar files with extra libraries. Will be used when + resolving classes. Currently not used in @code{libgcj}. + + @item java.protocol.handler.pkgs + A @samp{|} separated list of package names that is used to find classes that + implement handlers for @code{java.net.URL}. + + @item java.rmi.server.codebase + A list of URLs that is used by the @code{java.rmi.server.RMIClassLoader} + to load classes from. + + @item jdbc.drivers + A list of class names that will be loaded by the @code{java.sql.DriverManager} + when it starts up. + + @item file.separator + The separator used in when directories are included in a filename + (normally @samp{/} or @samp{\} ). + + @item file.encoding + The default character encoding used when converting platform native files to + Unicode (usually set to @samp{8859_1}). + + @item path.separator + The standard separator used when a string contains multiple paths + (normally @samp{:} or @samp{;}), the string is usually not a valid character + to use in normal directory names.) + + @item line.separator + The default line separator used on the platform (normally @samp{\n}, @samp{\r} + or a combination of those two characters). + + @item policy.provider + The class name used for the default policy provider returned by + @code{java.security.Policy.getPolicy}. + + @item user.name + The name of the user running the program. Can be the full name, the login name + or empty if unknown. + + @item user.home + The default directory to put user specific files in. + + @item user.dir + The current working directory from which the program was started. + + @item user.language + The default language as used by the @code{java.util.Locale} class. + + @item user.region + The default region as used by the @code{java.util.Local} class. + + @item user.variant + The default variant of the language and region local used. + + @item user.timezone + The default timezone as used by the @code{java.util.TimeZone} class. + + @item os.name + The operating system/kernel name that the program runs on. + + @item os.arch + The hardware that we are running on. + + @item os.version + The version number of the operating system/kernel. + + @item awt.appletWarning + The string to display when an untrusted applet is displayed. + Returned by @code{java.awt.Window.getWarningString()} when the window is + ``insecure''. + + @item awt.toolkit + The class name used for initializing the default @code{java.awt.Toolkit}. + Defaults to @code{gnu.awt.gtk.GtkToolkit}. + + @item http.proxyHost + Name of proxy host for http connections. + + @item http.proxyPort + Port number to use when a proxy host is in use. + + @end table + + @node GNU Classpath Properties + @section GNU Classpath Properties + + @code{libgcj} is based on the GNU Classpath (Essential Libraries for Java) a + GNU project to create free core class libraries for use with virtual machines + and compilers for the Java language. The following properties are common to + libraries based on GNU Classpath. + + @table @gcctabopt + + @item gcj.dumpobject + Enables printing serialization debugging by the @code{java.io.ObjectInput} and + @code{java.io.ObjectOutput} classes when set to something else then the empty + string. Only used when running a debug build of the library. + + @item gnu.classpath.vm.shortname + This is a succint name of the virtual machine. For @code{libgcj}, + this will always be @samp{libgcj}. + + @item gnu.classpath.home.url + A base URL used for finding system property files (e.g., + @file{classpath.security}). By default this is a @samp{file:} URL + pointing to the @file{lib} directory under @samp{java.home}. + + @end table + + @node libgcj Runtime Properties + @section libgcj Runtime Properties + + The following properties are specific to the @code{libgcj} runtime and will + normally not be found in other core libraries for the java language. + + @table @gcctabopt + + @item java.fullversion + The combination of @code{java.vm.name} and @code{java.vm.version}. + + @item java.vm.info + Same as @code{java.fullversion}. + + @item impl.prefix + Used by the @code{java.net.DatagramSocket} class when set to something else + then the empty string. When set all newly created @code{DatagramSocket}s will + try to load a class @code{java.net.[impl.prefix]DatagramSocketImpl} instead of + the normal @code{java.net.PlainDatagramSocketImpl}. + + @item gnu.gcj.progname + The name that was used to invoked the program. + + @item gnu.gcj.runtime.NameFinder.demangle + Whether names in a stack trace should be demangled. Defaults to @code{true}. + + @item gnu.gcj.runtime.NameFinder.sanitize + Whether calls to initialize exceptions and starting the runtime system + should be removed from the stack trace. Only done when names are + demangled. Defaults to @code{true}. + + @item gnu.gcj.runtime.NameFinder.remove_unknown + Whether calls to unknown functions (class and method names are unknown) + should be removed from the stack trace. Only done when the stack is + sanitized. Ignored if this means no stack trace information would be + available anymore. Defaults to @code{true}. + + @item gnu.gcj.runtime.NameFinder.remove_interpreter + Whether runtime interpreter calls (methods in the @code{_Jv_InterpMethod} class + and functions starting with @samp{ffi_}) should be removed from the stack + trace. Only done when the stack is sanitized. Defaults to @code{true}. + + + @item gnu.gcj.runtime.NameFinder.use_addr2line + Whether an external process (@command{addr2line} or @command{addr2name.awk}) + should be used as fallback to convert the addresses to function names when + the runtime is unable to do it through @code{dladdr}. + + @end table + @node Resources @chapter Resources diff -Nrc3pad gcc-3.2.3/gcc/java/gij.1 gcc-3.3/gcc/java/gij.1 *** gcc-3.2.3/gcc/java/gij.1 2003-04-22 07:07:38.000000000 +0000 --- gcc-3.3/gcc/java/gij.1 2003-05-14 00:32:11.000000000 +0000 *************** *** 1,8 **** ! .\" Automatically generated by Pod::Man version 1.15 ! .\" Tue Apr 22 07:07:38 2003 .\" .\" Standard preamble: ! .\" ====================================================================== .de Sh \" Subsection heading .br .if t .Sp --- 1,7 ---- ! .\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13 .\" .\" Standard preamble: ! .\" ======================================================================== .de Sh \" Subsection heading .br .if t .Sp *************** *** 15,26 **** .if t .sp .5v .if n .sp .. - .de Ip \" List item - .br - .ie \\n(.$>=3 .ne \\$3 - .el .ne 3 - .IP "\\$1" \\$2 - .. .de Vb \" Begin verbatim text .ft CW .nf --- 14,19 ---- *************** *** 28,42 **** .. .de Ve \" End verbatim text .ft R - .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a ! .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used ! .\" to do unbreakable dashes and therefore won't be available. \*(C` and ! .\" \*(C' expand to `' in nroff, nothing in troff, for use with C<> .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ --- 21,34 ---- .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a ! .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to ! .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' ! .\" expand to `' in nroff, nothing in troff, for use with C<>. .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ *************** *** 56,65 **** . ds R" '' 'br\} .\" ! .\" If the F register is turned on, we'll generate index entries on stderr ! .\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and ! .\" index entries marked with X<> in POD. Of course, you'll have to process ! .\" the output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" --- 48,57 ---- . ds R" '' 'br\} .\" ! .\" If the F register is turned on, we'll generate index entries on stderr for ! .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index ! .\" entries marked with X<> in POD. Of course, you'll have to process the ! .\" output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" *************** *** 68,81 **** . rr F .\} .\" ! .\" For nroff, turn off justification. Always turn off hyphenation; it ! .\" makes way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. - .bd B 3 . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 --- 60,72 ---- . rr F .\} .\" ! .\" For nroff, turn off justification. Always turn off hyphenation; it makes ! .\" way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 *************** *** 135,155 **** . ds Ae AE .\} .rm #[ #] #H #V #F C ! .\" ====================================================================== .\" .IX Title "GIJ 1" ! .TH GIJ 1 "gcc-3.2.3" "2003-04-22" "GNU" ! .UC .SH "NAME" ! gij \- \s-1GNU\s0 interpreter for Java bytecode .SH "SYNOPSIS" .IX Header "SYNOPSIS" gij [\fB\s-1OPTION\s0\fR] ... \fI\s-1JARFILE\s0\fR [\fI\s-1ARGS\s0\fR...] .PP gij [\fB\-jar\fR] [\fB\s-1OPTION\s0\fR] ... \fI\s-1CLASS\s0\fR [\fI\s-1ARGS\s0\fR...] [\fB\-D\fR\fIname\fR[=\fIvalue\fR]...] [\fB\-ms=\fR\fInumber\fR] [\fB\-mx=\fR\fInumber\fR] ! [\fB\*(--version\fR] [\fB\*(--help\fR] .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\f(CW\*(C`gij\*(C'\fR is a Java bytecode interpreter included with \f(CW\*(C`libgcj\*(C'\fR. --- 126,146 ---- . ds Ae AE .\} .rm #[ #] #H #V #F C ! .\" ======================================================================== .\" .IX Title "GIJ 1" ! .TH GIJ 1 "2003-05-14" "gcc-3.3" "GNU" .SH "NAME" ! gij \- GNU interpreter for Java bytecode .SH "SYNOPSIS" .IX Header "SYNOPSIS" gij [\fB\s-1OPTION\s0\fR] ... \fI\s-1JARFILE\s0\fR [\fI\s-1ARGS\s0\fR...] .PP gij [\fB\-jar\fR] [\fB\s-1OPTION\s0\fR] ... \fI\s-1CLASS\s0\fR [\fI\s-1ARGS\s0\fR...] + [\fB\-cp\fR \fIpath\fR] [\fB\-classpath\fR \fIpath\fR] [\fB\-D\fR\fIname\fR[=\fIvalue\fR]...] [\fB\-ms=\fR\fInumber\fR] [\fB\-mx=\fR\fInumber\fR] ! [\fB\-\-showversion\fR] [\fB\-\-version\fR] [\fB\-\-help\fR] .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\f(CW\*(C`gij\*(C'\fR is a Java bytecode interpreter included with \f(CW\*(C`libgcj\*(C'\fR. *************** objects, it is possible to give \f(CW\*( *** 178,218 **** been compiled and put into a shared library on the class path. .SH "OPTIONS" .IX Header "OPTIONS" ! .Ip "\fB\-D\fR\fIname\fR\fB[=\fR\fIvalue\fR\fB]\fR" 4 .IX Item "-Dname[=value]" This defines a system property named \fIname\fR with value \fIvalue\fR. If \fIvalue\fR is not specified then it defaults to the empty string. These system properties are initialized at the program's startup and can be retrieved at runtime using the \f(CW\*(C`java.lang.System.getProperty\*(C'\fR method. ! .Ip "\fB\-ms=\fR\fInumber\fR" 4 .IX Item "-ms=number" This sets the initial heap size. ! .Ip "\fB\-mx=\fR\fInumber\fR" 4 .IX Item "-mx=number" This sets the maximum heap size. ! .Ip "\fB\-jar\fR" 4 .IX Item "-jar" This indicates that the name passed to \f(CW\*(C`gij\*(C'\fR should be interpreted as the name of a jar file, not a class. ! .Ip "\fB\*(--help\fR" 4 ! .IX Item "help" Print help, then exit. ! .Ip "\fB\*(--version\fR" 4 ! .IX Item "version" Print version number, then exit. .SH "SEE ALSO" .IX Header "SEE ALSO" ! \&\fIgcc\fR\|(1), \fIgcj\fR\|(1), \fIgcjh\fR\|(1), \fIjv-scan\fR\|(1), \fIjcf-dump\fR\|(1), \fIgfdl\fR\|(7), and the Info entries for \fIgcj\fR and \fIgcc\fR. .SH "COPYRIGHT" .IX Header "COPYRIGHT" ! Copyright (C) 2001, 2002 Free Software Foundation, Inc. .PP Permission is granted to copy, distribute and/or modify this document ! under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the Invariant Sections being ``\s-1GNU\s0 General Public License'', the Front-Cover texts being (a) (see below), and with the Back-Cover Texts being (b) (see below). A copy of the license is included in the man page \fIgfdl\fR\|(7). --- 169,236 ---- been compiled and put into a shared library on the class path. .SH "OPTIONS" .IX Header "OPTIONS" ! .IP "\fB\-cp\fR \fIpath\fR" 4 ! .IX Item "-cp path" ! .PD 0 ! .IP "\fB\-classpath\fR \fIpath\fR" 4 ! .IX Item "-classpath path" ! .PD ! Set the initial class path. The class path is used for finding ! class and resource files. If specified, this option overrides the ! \&\f(CW\*(C`CLASSPATH\*(C'\fR environment variable. Note that this option is ! ignored if \f(CW\*(C`\-jar\*(C'\fR is used. ! .IP "\fB\-D\fR\fIname\fR\fB[=\fR\fIvalue\fR\fB]\fR" 4 .IX Item "-Dname[=value]" This defines a system property named \fIname\fR with value \fIvalue\fR. If \fIvalue\fR is not specified then it defaults to the empty string. These system properties are initialized at the program's startup and can be retrieved at runtime using the \f(CW\*(C`java.lang.System.getProperty\*(C'\fR method. ! .IP "\fB\-ms=\fR\fInumber\fR" 4 .IX Item "-ms=number" This sets the initial heap size. ! .IP "\fB\-mx=\fR\fInumber\fR" 4 .IX Item "-mx=number" This sets the maximum heap size. ! .IP "\fB\-jar\fR" 4 .IX Item "-jar" This indicates that the name passed to \f(CW\*(C`gij\*(C'\fR should be interpreted as the name of a jar file, not a class. ! .IP "\fB\-\-help\fR" 4 ! .IX Item "--help" Print help, then exit. ! .IP "\fB\-\-showversion\fR" 4 ! .IX Item "--showversion" ! Print version number and continue. ! .IP "\fB\-\-version\fR" 4 ! .IX Item "--version" Print version number, then exit. .SH "SEE ALSO" .IX Header "SEE ALSO" ! \&\fIgcc\fR\|(1), \fIgcj\fR\|(1), \fIgcjh\fR\|(1), \fIjv\-scan\fR\|(1), \fIjcf\-dump\fR\|(1), \fIgfdl\fR\|(7), and the Info entries for \fIgcj\fR and \fIgcc\fR. .SH "COPYRIGHT" .IX Header "COPYRIGHT" ! Copyright (c) 2001, 2002 Free Software Foundation, Inc. .PP Permission is granted to copy, distribute and/or modify this document ! under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with the Invariant Sections being ``\s-1GNU\s0 General Public License'', the Front-Cover texts being (a) (see below), and with the Back-Cover Texts being (b) (see below). A copy of the license is included in the man page \fIgfdl\fR\|(7). + .PP + (a) The \s-1FSF\s0's Front-Cover Text is: + .PP + .Vb 1 + \& A GNU Manual + .Ve + .PP + (b) The \s-1FSF\s0's Back-Cover Text is: + .PP + .Vb 3 + \& You have freedom to copy and modify this GNU Manual, like GNU + \& software. Copies published by the Free Software Foundation raise + \& funds for GNU development. + .Ve diff -Nrc3pad gcc-3.2.3/gcc/java/gjavah.c gcc-3.3/gcc/java/gjavah.c *** gcc-3.2.3/gcc/java/gjavah.c 2002-04-10 13:08:59.000000000 +0000 --- gcc-3.3/gcc/java/gjavah.c 2003-03-28 22:18:48.000000000 +0000 *************** *** 1,7 **** /* Program to write C++-suitable header files from a Java(TM) .class file. This is similar to SUN's javah. ! Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by --- 1,7 ---- /* Program to write C++-suitable header files from a Java(TM) .class file. This is similar to SUN's javah. ! Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by *************** The Free Software Foundation is independ *** 33,38 **** --- 33,39 ---- #include "javaop.h" #include "java-tree.h" #include "java-opcodes.h" + #include "hashtab.h" #include *************** static int found_error = 0; *** 47,53 **** /* Nonzero if we're generating JNI output. */ static int flag_jni = 0; ! /* When non zero, warn when source file is newer than matching class file. */ int flag_newer = 1; --- 48,54 ---- /* Nonzero if we're generating JNI output. */ static int flag_jni = 0; ! /* When nonzero, warn when source file is newer than matching class file. */ int flag_newer = 1; *************** static void print_full_cxx_name PARAMS ( *** 130,137 **** static void decompile_method PARAMS ((FILE*, JCF*, int)); static void add_class_decl PARAMS ((FILE*, JCF*, JCF_u2)); ! static int java_float_finite PARAMS ((jfloat)); ! static int java_double_finite PARAMS ((jdouble)); static void print_name PARAMS ((FILE *, JCF *, int)); static void print_base_classname PARAMS ((FILE *, JCF *, int)); static int utf8_cmp PARAMS ((const unsigned char *, int, const char *)); --- 131,139 ---- static void decompile_method PARAMS ((FILE*, JCF*, int)); static void add_class_decl PARAMS ((FILE*, JCF*, JCF_u2)); ! static void jni_print_float PARAMS ((FILE *, jfloat)); ! static void jni_print_double PARAMS ((FILE *, jdouble)); ! static void print_name PARAMS ((FILE *, JCF *, int)); static void print_base_classname PARAMS ((FILE *, JCF *, int)); static int utf8_cmp PARAMS ((const unsigned char *, int, const char *)); *************** static char *get_field_name PARAMS ((JCF *** 142,147 **** --- 144,151 ---- static void print_field_name PARAMS ((FILE *, JCF *, int, JCF_u2)); static const unsigned char *super_class_name PARAMS ((JCF *, int *)); static void print_include PARAMS ((FILE *, const unsigned char *, int)); + static int gcjh_streq PARAMS ((const void *p1, const void *p2)); + static int throwable_p PARAMS ((const unsigned char *signature)); static const unsigned char *decode_signature_piece PARAMS ((FILE *, const unsigned char *, const unsigned char *, int *)); static void print_class_decls PARAMS ((FILE *, JCF *, int)); *************** static int method_printed = 0; *** 190,195 **** --- 194,202 ---- static int method_synthetic = 0; static int method_signature = 0; + /* Set to 1 while the very first data member of a class is being handled. */ + static int is_first_data_member = 0; + #define HANDLE_METHOD(ACCESS_FLAGS, NAME, SIGNATURE, ATTRIBUTE_COUNT) \ { \ method_synthetic = 0; \ *************** static int decompiled = 0; *** 237,274 **** #include "jcf-reader.c" ! /* Some useful constants. */ ! #define F_NAN_MASK 0x7f800000 ! #if (1 == HOST_FLOAT_WORDS_BIG_ENDIAN) && ! defined (HOST_WORDS_BIG_ENDIAN) ! #define D_NAN_MASK 0x000000007ff00000LL ! #else ! #define D_NAN_MASK 0x7ff0000000000000LL ! #endif ! ! /* Return 1 if F is not Inf or NaN. */ ! static int ! java_float_finite (f) ! jfloat f; { ! union Word u; ! u.f = f; ! ! /* We happen to know that F_NAN_MASK will match all NaN values, and ! also positive and negative infinity. That's why we only need one ! test here. See The Java Language Specification, section 20.9. */ ! return (u.i & F_NAN_MASK) != F_NAN_MASK; } ! /* Return 1 if D is not Inf or NaN. */ ! static int ! java_double_finite (d) ! jdouble d; { ! union DWord u; ! u.d = d; ! ! /* Now check for all NaNs. */ ! return (u.l & D_NAN_MASK) != D_NAN_MASK; } /* Print a character, appropriately mangled for JNI. */ --- 244,297 ---- #include "jcf-reader.c" ! /* Print a single-precision float, suitable for parsing by g++. */ ! static void ! jni_print_float (FILE *stream, jfloat f) { ! /* It'd be nice to use __builtin_nan/__builtin_inf here but they don't ! work in data initializers. FIXME. */ ! if (JFLOAT_FINITE (f)) ! { ! fputs (" = ", stream); ! if (f.negative) ! putc ('-', stream); ! if (f.exponent) ! fprintf (stream, "0x1.%.6xp%+df", ! ((unsigned int)f.mantissa) << 1, ! f.exponent - JFLOAT_EXP_BIAS); ! else ! /* Exponent of 0x01 is -125; exponent of 0x00 is *also* -125, ! because the implicit leading 1 bit is no longer present. */ ! fprintf (stream, "0x0.%.6xp%+df", ! ((unsigned int)f.mantissa) << 1, ! f.exponent + 1 - JFLOAT_EXP_BIAS); ! } ! fputs (";\n", stream); } ! /* Print a double-precision float, suitable for parsing by g++. */ ! static void ! jni_print_double (FILE *stream, jdouble f) { ! /* It'd be nice to use __builtin_nan/__builtin_inf here but they don't ! work in data initializers. FIXME. */ ! if (JDOUBLE_FINITE (f)) ! { ! fputs (" = ", stream); ! if (f.negative) ! putc ('-', stream); ! if (f.exponent) ! fprintf (stream, "0x1.%.5x%.8xp%+d", ! f.mantissa0, f.mantissa1, ! f.exponent - JDOUBLE_EXP_BIAS); ! else ! /* Exponent of 0x001 is -1022; exponent of 0x000 is *also* -1022, ! because the implicit leading 1 bit is no longer present. */ ! fprintf (stream, "0x0.%.5x%.8xp%+d", ! f.mantissa0, f.mantissa1, ! f.exponent + 1 - JDOUBLE_EXP_BIAS); ! } ! fputs (";\n", stream); } /* Print a character, appropriately mangled for JNI. */ *************** DEFUN(print_field_info, (stream, jcf, na *** 750,759 **** jfloat fnum = JPOOL_FLOAT (jcf, current_field_value); fputs ("const jfloat ", out); print_field_name (out, jcf, name_index, 0); ! if (! java_float_finite (fnum)) ! fputs (";\n", out); ! else ! fprintf (out, " = %.10g;\n", fnum); } break; case CONSTANT_Double: --- 773,779 ---- jfloat fnum = JPOOL_FLOAT (jcf, current_field_value); fputs ("const jfloat ", out); print_field_name (out, jcf, name_index, 0); ! jni_print_float (out, fnum); } break; case CONSTANT_Double: *************** DEFUN(print_field_info, (stream, jcf, na *** 761,770 **** jdouble dnum = JPOOL_DOUBLE (jcf, current_field_value); fputs ("const jdouble ", out); print_field_name (out, jcf, name_index, 0); ! if (! java_double_finite (dnum)) ! fputs (";\n", out); ! else ! fprintf (out, " = %.17g;\n", dnum); } break; default: --- 781,787 ---- jdouble dnum = JPOOL_DOUBLE (jcf, current_field_value); fputs ("const jdouble ", out); print_field_name (out, jcf, name_index, 0); ! jni_print_double (out, dnum); } break; default: *************** DEFUN(print_method_info, (stream, jcf, n *** 831,843 **** { struct method_name *nn; ! nn = (struct method_name *) xmalloc (sizeof (struct method_name)); ! nn->name = (char *) xmalloc (length); memcpy (nn->name, str, length); nn->length = length; nn->next = method_name_list; nn->sig_length = JPOOL_UTF_LENGTH (jcf, sig_index); ! nn->signature = (char *) xmalloc (nn->sig_length); memcpy (nn->signature, JPOOL_UTF_DATA (jcf, sig_index), nn->sig_length); method_name_list = nn; --- 848,860 ---- { struct method_name *nn; ! nn = xmalloc (sizeof (struct method_name)); ! nn->name = xmalloc (length); memcpy (nn->name, str, length); nn->length = length; nn->next = method_name_list; nn->sig_length = JPOOL_UTF_LENGTH (jcf, sig_index); ! nn->signature = xmalloc (nn->sig_length); memcpy (nn->signature, JPOOL_UTF_DATA (jcf, sig_index), nn->sig_length); method_name_list = nn; *************** decompile_method (out, jcf, code_len) *** 1091,1096 **** --- 1108,1224 ---- } } + /* Like strcmp, but invert the return result for the hash table. This + should probably be in hashtab.c to complement the existing string + hash function. */ + static int + gcjh_streq (p1, p2) + const void *p1, *p2; + { + return ! strcmp ((char *) p1, (char *) p2); + } + + /* Return 1 if the initial part of CLNAME names a subclass of throwable, + or 0 if not. CLNAME may be extracted from a signature, and can be + terminated with either `;' or NULL. */ + static int + throwable_p (clname) + const unsigned char *clname; + { + int length; + unsigned char *current; + int i; + int result = 0; + + /* We keep two hash tables of class names. In one we list all the + classes which are subclasses of Throwable. In the other we will + all other classes. We keep two tables to make the code a bit + simpler; we don't have to have a structure mapping class name to + a `throwable?' bit. */ + static htab_t throw_hash; + static htab_t non_throw_hash; + static int init_done = 0; + + if (! init_done) + { + PTR *slot; + const unsigned char *str; + + /* Self-initializing. The cost of this really doesn't matter. + We also don't care about freeing these, either. */ + throw_hash = htab_create (10, htab_hash_string, gcjh_streq, + (htab_del) free); + non_throw_hash = htab_create (10, htab_hash_string, gcjh_streq, + (htab_del) free); + + /* Make sure the root classes show up in the tables. */ + str = xstrdup ("java.lang.Throwable"); + slot = htab_find_slot (throw_hash, str, INSERT); + *slot = (PTR) str; + + str = xstrdup ("java.lang.Object"); + slot = htab_find_slot (non_throw_hash, str, INSERT); + *slot = (PTR) str; + + init_done = 1; + } + + for (length = 0; clname[length] != ';' && clname[length] != '\0'; ++length) + ; + current = ALLOC (length + 1); + for (i = 0; i < length; ++i) + current[i] = clname[i] == '/' ? '.' : clname[i]; + current[length] = '\0'; + + /* We don't compute the hash slot here because the table might be + modified by the recursion. In that case the slot could be + invalidated. */ + if (htab_find (throw_hash, current)) + result = 1; + else if (htab_find (non_throw_hash, current)) + result = 0; + else + { + JCF jcf; + PTR *slot; + unsigned char *super, *tmp; + int super_length = -1; + const char *classfile_name = find_class (current, strlen (current), + &jcf, 0); + + if (! classfile_name) + { + fprintf (stderr, "couldn't find class %s\n", current); + found_error = 1; + return 0; + } + if (jcf_parse_preamble (&jcf) != 0 + || jcf_parse_constant_pool (&jcf) != 0 + || verify_constant_pool (&jcf) > 0) + { + fprintf (stderr, "parse error while reading %s\n", classfile_name); + found_error = 1; + return 0; + } + jcf_parse_class (&jcf); + + tmp = (unsigned char *) super_class_name (&jcf, &super_length); + super = ALLOC (super_length + 1); + memcpy (super, tmp, super_length); + super[super_length] = '\0'; + + result = throwable_p (super); + slot = htab_find_slot (result ? throw_hash : non_throw_hash, + current, INSERT); + *slot = current; + current = NULL; + + JCF_FINISH (&jcf); + } + + return result; + } + /* Print one piece of a signature. Returns pointer to next parseable character on success, NULL on error. */ static const unsigned char * *************** decode_signature_piece (stream, signatur *** 1175,1181 **** /* If the previous iterations left us with something to print, print it. For JNI, we always print `jobjectArray' in the nested cases. */ ! if (flag_jni && ctype == NULL) { ctype = "jobjectArray"; *need_space = 1; --- 1303,1309 ---- /* If the previous iterations left us with something to print, print it. For JNI, we always print `jobjectArray' in the nested cases. */ ! if (flag_jni && (ctype == NULL || array_depth > 0)) { ctype = "jobjectArray"; *need_space = 1; *************** decode_signature_piece (stream, signatur *** 1204,1227 **** case 'L': if (flag_jni) { ! /* We know about certain types and special-case their ! names. ! FIXME: something like java.lang.Exception should be ! printed as `jthrowable', because it is a subclass. This ! means that gcjh must read the entire hierarchy and ! comprehend it. */ if (! strncmp (signature, "Ljava/lang/String;", sizeof ("Ljava/lang/String;") -1)) ctype = "jstring"; else if (! strncmp (signature, "Ljava/lang/Class;", sizeof ("Ljava/lang/Class;") - 1)) ctype = "jclass"; ! else if (! strncmp (signature, "Ljava/lang/Throwable;", ! sizeof ("Ljava/lang/Throwable;") - 1)) ctype = "jthrowable"; - else if (! strncmp (signature, "Ljava/lang/ref/WeakReference;", - sizeof ("Ljava/lang/ref/WeakReference;") - 1)) - ctype = "jweak"; else ctype = "jobject"; --- 1332,1347 ---- case 'L': if (flag_jni) { ! /* We know about certain types and special-case their names. */ if (! strncmp (signature, "Ljava/lang/String;", sizeof ("Ljava/lang/String;") -1)) ctype = "jstring"; else if (! strncmp (signature, "Ljava/lang/Class;", sizeof ("Ljava/lang/Class;") - 1)) ctype = "jclass"; ! /* Skip leading 'L' for throwable_p call. */ ! else if (throwable_p (signature + 1)) ctype = "jthrowable"; else ctype = "jobject"; *************** DEFUN(print_c_decl, (stream, jcf, name_i *** 1314,1319 **** --- 1434,1450 ---- } } + /* Force the alignment of the first data member. This is + because the "new" C++ ABI changed the alignemnt of non-POD + classes. gcj, however, still uses the "old" alignment. */ + if (is_first_data_member && ! (flags & ACC_STATIC) && ! is_method) + { + is_first_data_member = 0; + print_cxx_classname (out, " __attribute__((aligned(__alignof__( ", + jcf, jcf->super_class); + fputs (" )))) ", stream); + } + /* Now print the name of the thing. */ if (need_space) fputs (" ", stream); *************** DEFUN(print_stub_or_jni, (stream, jcf, n *** 1459,1465 **** return; if (flag_jni && ! stubs) ! fputs ("extern ", stream); /* If printing a method, skip to the return signature and print that first. However, there is no return value if this is a --- 1590,1596 ---- return; if (flag_jni && ! stubs) ! fputs ("extern JNIEXPORT ", stream); /* If printing a method, skip to the return signature and print that first. However, there is no return value if this is a *************** DEFUN(print_stub_or_jni, (stream, jcf, n *** 1491,1496 **** --- 1622,1630 ---- /* When printing a JNI header we need to respect the space. In other cases we're just going to insert a newline anyway. */ fputs (need_space && ! stubs ? " " : "\n", stream); + + if (flag_jni && ! stubs) + fputs ("JNICALL ", stream); /* Now print the name of the thing. */ print_name_for_stub_or_jni (stream, jcf, name_index, *************** print_include (out, utf8, len) *** 1624,1630 **** return; } ! incl = (struct include *) xmalloc (sizeof (struct include)); incl->name = xmalloc (len + 1); strncpy (incl->name, utf8, len); incl->name[len] = '\0'; --- 1758,1764 ---- return; } ! incl = xmalloc (sizeof (struct include)); incl->name = xmalloc (len + 1); strncpy (incl->name, utf8, len); incl->name[len] = '\0'; *************** add_namelet (name, name_limit, parent) *** 1711,1717 **** if (n == NULL) { ! n = (struct namelet *) xmalloc (sizeof (struct namelet)); n->name = xmalloc (p - name + 1); strncpy (n->name, name, p - name); n->name[p - name] = '\0'; --- 1845,1851 ---- if (n == NULL) { ! n = xmalloc (sizeof (struct namelet)); n->name = xmalloc (p - name + 1); strncpy (n->name, name, p - name); n->name[p - name] = '\0'; *************** DEFUN(process_file, (jcf, out), *** 2041,2046 **** --- 2175,2182 ---- } /* Now go back for second pass over methods and fields. */ + is_first_data_member = 1; + JCF_SEEK (jcf, method_start); method_pass = 1; jcf_parse_methods (jcf); *************** help () *** 2183,2189 **** /* We omit -MG until it is implemented. */ printf ("\n"); printf ("For bug reporting instructions, please see:\n"); ! printf ("%s.\n", GCCBUGURL); exit (0); } --- 2319,2325 ---- /* We omit -MG until it is implemented. */ printf ("\n"); printf ("For bug reporting instructions, please see:\n"); ! printf ("%s.\n", bug_report_url); exit (0); } *************** DEFUN(main, (argc, argv), *** 2267,2291 **** case OPT_PREPEND: if (prepend_count == 0) ! prepend_specs = (char**) ALLOC (argc * sizeof (char*)); prepend_specs[prepend_count++] = optarg; break; case OPT_FRIEND: if (friend_count == 0) ! friend_specs = (char**) ALLOC (argc * sizeof (char*)); friend_specs[friend_count++] = optarg; break; case OPT_ADD: if (add_count == 0) ! add_specs = (char**) ALLOC (argc * sizeof (char*)); add_specs[add_count++] = optarg; break; case OPT_APPEND: if (append_count == 0) ! append_specs = (char**) ALLOC (argc * sizeof (char*)); append_specs[append_count++] = optarg; break; --- 2403,2427 ---- case OPT_PREPEND: if (prepend_count == 0) ! prepend_specs = ALLOC (argc * sizeof (char*)); prepend_specs[prepend_count++] = optarg; break; case OPT_FRIEND: if (friend_count == 0) ! friend_specs = ALLOC (argc * sizeof (char*)); friend_specs[friend_count++] = optarg; break; case OPT_ADD: if (add_count == 0) ! add_specs = ALLOC (argc * sizeof (char*)); add_specs[add_count++] = optarg; break; case OPT_APPEND: if (append_count == 0) ! append_specs = ALLOC (argc * sizeof (char*)); append_specs[append_count++] = optarg; break; *************** DEFUN(main, (argc, argv), *** 2372,2378 **** { int dir_len = strlen (output_directory); int i, classname_length = strlen (classname); ! current_output_file = (char*) ALLOC (dir_len + classname_length + 5); strcpy (current_output_file, output_directory); if (dir_len > 0 && output_directory[dir_len-1] != '/') current_output_file[dir_len++] = '/'; --- 2508,2514 ---- { int dir_len = strlen (output_directory); int i, classname_length = strlen (classname); ! current_output_file = ALLOC (dir_len + classname_length + 5); strcpy (current_output_file, output_directory); if (dir_len > 0 && output_directory[dir_len-1] != '/') current_output_file[dir_len++] = '/'; diff -Nrc3pad gcc-3.2.3/gcc/java/javaop.h gcc-3.3/gcc/java/javaop.h *** gcc-3.2.3/gcc/java/javaop.h 2001-05-26 01:31:47.000000000 +0000 --- gcc-3.3/gcc/java/javaop.h 2003-03-28 22:18:48.000000000 +0000 *************** typedef int32 jint; *** 57,77 **** typedef int64 jlong; typedef void* jref; ! /* A 32-bit IEEE single-precision float. */ ! #ifndef jfloat ! #define jfloat float ! #endif ! ! /* A 32-bit IEEE double-precision float. */ ! #ifndef jdouble ! #define jdouble double ! #endif ! union Word { ! jint i; ! jfloat f; ! void *p; ! }; /* A jword is an unsigned integral type big enough for a 32-bit jint or jfloat *or* a pointer. It is the type appropriate for stack --- 57,82 ---- typedef int64 jlong; typedef void* jref; ! /* A 32-bit big-endian IEEE single-precision float. */ ! typedef struct _jfloat { ! unsigned int negative : 1; ! unsigned int exponent : 8; ! unsigned int mantissa : 23; ! } jfloat; ! #define JFLOAT_FINITE(f) ((f).exponent != 0xFF) ! #define JFLOAT_QNAN_MASK 0x400000 ! #define JFLOAT_EXP_BIAS 0x7f ! /* A 32-bit big-endian IEEE double-precision float. */ ! typedef struct _jdouble { ! unsigned int negative : 1; ! unsigned int exponent : 11; ! unsigned int mantissa0: 20; ! unsigned int mantissa1: 32; ! } jdouble; ! #define JDOUBLE_FINITE(f) ((f).exponent != 0x7FF) ! #define JDOUBLE_QNAN_MASK 0x80000 /* apply to mantissa0 */ ! #define JDOUBLE_EXP_BIAS 0x3ff /* A jword is an unsigned integral type big enough for a 32-bit jint or jfloat *or* a pointer. It is the type appropriate for stack *************** union Word { *** 104,112 **** static inline jfloat WORD_TO_FLOAT(jword w) ! { union Word wu; ! wu.i = w; ! return wu.f; } /* Sign extend w. If the host on which this cross-compiler runs uses --- 109,122 ---- static inline jfloat WORD_TO_FLOAT(jword w) ! { ! jfloat f; ! ! f.negative = (w & 0x80000000) >> 31; ! f.exponent = (w & 0x7f800000) >> 23; ! f.mantissa = (w & 0x007fffff); ! ! return f; } /* Sign extend w. If the host on which this cross-compiler runs uses *************** WORDS_TO_LONG(jword hi, jword lo) *** 128,148 **** return ((jlong) hi << 32) | ((jlong)lo & (((jlong)1 << 32) -1)); } - union DWord { - jdouble d; - jlong l; - jword w[2]; - }; - static inline jdouble WORDS_TO_DOUBLE(jword hi, jword lo) ! { union DWord wu; ! #if (1 == HOST_FLOAT_WORDS_BIG_ENDIAN) ! wu.l = WORDS_TO_LONG(lo, hi); ! #else ! wu.l = WORDS_TO_LONG(hi, lo); ! #endif ! return wu.d; } /* If PREFIX_CHAR is the first character of the Utf8 encoding of a character, --- 138,154 ---- return ((jlong) hi << 32) | ((jlong)lo & (((jlong)1 << 32) -1)); } static inline jdouble WORDS_TO_DOUBLE(jword hi, jword lo) ! { ! jdouble d; ! ! d.negative = (hi & 0x80000000) >> 31; ! d.exponent = (hi & 0x7ff00000) >> 20; ! d.mantissa0 = (hi & 0x000fffff); ! d.mantissa1 = lo; ! ! return d; } /* If PREFIX_CHAR is the first character of the Utf8 encoding of a character, diff -Nrc3pad gcc-3.2.3/gcc/java/java-tree.h gcc-3.3/gcc/java/java-tree.h *** gcc-3.2.3/gcc/java/java-tree.h 2002-06-04 16:45:52.000000000 +0000 --- gcc-3.3/gcc/java/java-tree.h 2002-11-18 18:13:35.000000000 +0000 *************** The Free Software Foundation is independ *** 26,32 **** /* Hacked by Per Bothner February 1996. */ ! #include "hash.h" /* Java language-specific tree codes. */ #define DEFTREECODE(SYM, NAME, TYPE, LENGTH) SYM, --- 26,32 ---- /* Hacked by Per Bothner February 1996. */ ! #include "hashtab.h" /* Java language-specific tree codes. */ #define DEFTREECODE(SYM, NAME, TYPE, LENGTH) SYM, *************** struct JCF; *** 43,48 **** --- 43,49 ---- 0: IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P (in IDENTIFIER_NODE) RESOLVE_EXPRESSION_NAME_P (in EXPR_WITH_FILE_LOCATION) FOR_LOOP_P (in LOOP_EXPR) + SUPPRESS_UNREACHABLE_ERROR (for other _EXPR nodes) ANONYMOUS_CLASS_P (in RECORD_TYPE) ARG_FINAL_P (in TREE_LIST) 1: CLASS_HAS_SUPER_FLAG (in TREE_VEC). *************** struct JCF; *** 91,96 **** --- 92,98 ---- CLASS_PUBLIC (in TYPE_DECL). 2: METHOD_STATIC (in FUNCTION_DECL). (But note that FIELD_STATIC uses TREE_STATIC!) + FIELD_SYNTHETIC (in FIELD_DECL) CLASS_COMPLETE_P (in TYPE_DECL) 3: METHOD_FINAL (in FUNCTION_DECL) FIELD_FINAL (in FIELD_DECL) *************** extern int flag_emit_class_files; *** 158,177 **** extern int flag_filelist_file; ! /* When non zero, assume all native functions are implemented with JNI, not CNI. */ extern int flag_jni; ! /* When non zero, report the now deprecated empty statements. */ extern int flag_extraneous_semicolon; ! /* When non zero, always check for a non gcj generated classes archive. */ extern int flag_force_classes_archive_check; ! /* When non zero, we emit xref strings. Values of the flag for xref backends are defined in xref.h. */ extern int flag_emit_xref; --- 160,183 ---- extern int flag_filelist_file; ! /* When nonzero, permit the use of the assert keyword. */ ! ! extern int flag_assert; ! ! /* When nonzero, assume all native functions are implemented with JNI, not CNI. */ extern int flag_jni; ! /* When nonzero, report the now deprecated empty statements. */ extern int flag_extraneous_semicolon; ! /* When nonzero, always check for a non gcj generated classes archive. */ extern int flag_force_classes_archive_check; ! /* When nonzero, we emit xref strings. Values of the flag for xref backends are defined in xref.h. */ extern int flag_emit_xref; *************** extern int flag_redundant; *** 188,215 **** extern int flag_not_overriding; extern int flag_static_local_jdk1_1; ! /* When non zero, warn when source file is newer than matching class file. */ extern int flag_newer; ! /* When non zero, call a library routine to do integer divisions. */ extern int flag_use_divide_subroutine; ! /* When non zero, generate code for the Boehm GC. */ extern int flag_use_boehm_gc; ! /* When non zero, assume the runtime uses a hash table to map an object to its synchronization structure. */ extern int flag_hash_synchronization; ! /* When non zero, generate checks for references to NULL. */ extern int flag_check_references; /* Used through STATIC_CLASS_INIT_OPT_P to check whether static initialization optimization should be performed. */ extern int flag_optimize_sci; ! /* When non zero, use offset tables for virtual method calls in order to improve binary compatibility. */ extern int flag_indirect_dispatch; --- 194,221 ---- extern int flag_not_overriding; extern int flag_static_local_jdk1_1; ! /* When nonzero, warn when source file is newer than matching class file. */ extern int flag_newer; ! /* When nonzero, call a library routine to do integer divisions. */ extern int flag_use_divide_subroutine; ! /* When nonzero, generate code for the Boehm GC. */ extern int flag_use_boehm_gc; ! /* When nonzero, assume the runtime uses a hash table to map an object to its synchronization structure. */ extern int flag_hash_synchronization; ! /* When nonzero, generate checks for references to NULL. */ extern int flag_check_references; /* Used through STATIC_CLASS_INIT_OPT_P to check whether static initialization optimization should be performed. */ extern int flag_optimize_sci; ! /* When nonzero, use offset tables for virtual method calls in order to improve binary compatibility. */ extern int flag_indirect_dispatch; *************** typedef struct CPool constant_pool; *** 252,257 **** --- 258,266 ---- #define COMPONENT_REF_SIGNATURE(CPOOL, IDX) \ NAME_AND_TYPE_SIGNATURE (CPOOL, COMPONENT_REF_NAME_AND_TYPE(CPOOL, IDX)) + extern GTY(()) tree java_lang_cloneable_identifier_node; + extern GTY(()) tree java_io_serializable_identifier_node; + enum java_tree_index { JTI_PROMOTED_BYTE_TYPE_NODE, *************** enum java_tree_index *** 269,274 **** --- 278,286 ---- JTI_UNSIGNED_INT_TYPE_NODE, JTI_UNSIGNED_LONG_TYPE_NODE, + JTI_DECIMAL_INT_MAX_NODE, + JTI_DECIMAL_LONG_MAX_NODE, + JTI_BOOLEAN_TYPE_NODE, JTI_OBJECT_TYPE_NODE, *************** enum java_tree_index *** 403,409 **** JTI_MAX }; ! extern tree java_global_trees[JTI_MAX]; /* "Promoted types" that are used for primitive types smaller than int. We could use int_type_node, but then we would lose --- 415,421 ---- JTI_MAX }; ! extern GTY(()) tree java_global_trees[JTI_MAX]; /* "Promoted types" that are used for primitive types smaller than int. We could use int_type_node, but then we would lose *************** extern tree java_global_trees[JTI_MAX]; *** 435,440 **** --- 447,457 ---- #define unsigned_long_type_node \ java_global_trees[JTI_UNSIGNED_LONG_TYPE_NODE] + #define decimal_int_max \ + java_global_trees[JTI_DECIMAL_INT_MAX_NODE] + #define decimal_long_max \ + java_global_trees[JTI_DECIMAL_LONG_MAX_NODE] + #define boolean_type_node \ java_global_trees[JTI_BOOLEAN_TYPE_NODE] *************** extern struct CPool *outgoing_cpool; *** 678,693 **** extern const char *cyclic_inheritance_report; ! struct lang_identifier { struct tree_identifier ignore; ! tree global_value, local_value; /* If non-NULL: An ADDR_REF to a VAR_DECL that contains * the Utf8Const representation of the identifier. */ tree utf8_ref; }; /* Macros for access to language-specific slots in an identifier. */ /* Unless specified, each of these slots contains a DECL node or null. */ --- 695,722 ---- extern const char *cyclic_inheritance_report; ! struct lang_identifier GTY(()) { struct tree_identifier ignore; ! tree global_value; ! tree local_value; /* If non-NULL: An ADDR_REF to a VAR_DECL that contains * the Utf8Const representation of the identifier. */ tree utf8_ref; }; + /* The resulting tree type. */ + union lang_tree_node + GTY((desc ("TREE_CODE (&%h.generic) == IDENTIFIER_NODE"), + chain_next ("(union lang_tree_node *)TREE_CHAIN (&%h.generic)"))) + { + union tree_node GTY ((tag ("0"), + desc ("tree_node_structure (&%h)"))) + generic; + struct lang_identifier GTY ((tag ("1"))) identifier; + }; + /* Macros for access to language-specific slots in an identifier. */ /* Unless specified, each of these slots contains a DECL node or null. */ *************** struct lang_identifier *** 727,767 **** /* For a FUNCTION_DECL, if we are compiling a .class file, then this is the position in the .class file of the method code. Specifically, this is the code itself, not the code attribute. */ ! #define DECL_CODE_OFFSET(DECL) (DECL_LANG_SPECIFIC(DECL)->code_offset) /* Similarly, the length of the bytecode. */ ! #define DECL_CODE_LENGTH(DECL) (DECL_LANG_SPECIFIC(DECL)->code_length) /* Similarly, the position of the LineNumberTable attribute. */ #define DECL_LINENUMBERS_OFFSET(DECL) \ ! (DECL_LANG_SPECIFIC(DECL)->linenumbers_offset) /* Similarly, the position of the LocalVariableTable attribute (following the standard attribute header). */ #define DECL_LOCALVARIABLES_OFFSET(DECL) \ ! (DECL_LANG_SPECIFIC(DECL)->localvariables_offset) ! #define DECL_MAX_LOCALS(DECL) (DECL_LANG_SPECIFIC(DECL)->max_locals) ! #define DECL_MAX_STACK(DECL) (DECL_LANG_SPECIFIC(DECL)->max_stack) /* Number of local variable slots needed for the arguments of this function. */ ! #define DECL_ARG_SLOT_COUNT(DECL) (DECL_LANG_SPECIFIC(DECL)->arg_slot_count) /* Information on declaration location */ ! #define DECL_FUNCTION_WFL(DECL) (DECL_LANG_SPECIFIC(DECL)->wfl) /* List of checked thrown exceptions, as specified with the `throws' keyword */ ! #define DECL_FUNCTION_THROWS(DECL) (DECL_LANG_SPECIFIC(DECL)->throws_list) /* List of other constructors of the same class that this constructor calls */ #define DECL_CONSTRUCTOR_CALLS(DECL) \ ! (DECL_LANG_SPECIFIC(DECL)->called_constructor) /* When the function is an access function, the DECL it was trying to access */ #define DECL_FUNCTION_ACCESS_DECL(DECL) \ ! (DECL_LANG_SPECIFIC(DECL)->called_constructor) /* The identifier of the access method used to invoke this method from an inner class. */ #define DECL_FUNCTION_INNER_ACCESS(DECL) \ ! (DECL_LANG_SPECIFIC(DECL)->inner_access) /* Pointer to the function's current's COMPOUND_EXPR tree (while completing its body) or the function's block */ ! #define DECL_FUNCTION_BODY(DECL) (DECL_LANG_SPECIFIC(DECL)->function_decl_body) /* How specific the function is (for method selection - Java source code front-end */ #define DECL_SPECIFIC_COUNT(DECL) DECL_ARG_SLOT_COUNT(DECL) --- 756,798 ---- /* For a FUNCTION_DECL, if we are compiling a .class file, then this is the position in the .class file of the method code. Specifically, this is the code itself, not the code attribute. */ ! #define DECL_CODE_OFFSET(DECL) (DECL_LANG_SPECIFIC(DECL)->u.f.code_offset) /* Similarly, the length of the bytecode. */ ! #define DECL_CODE_LENGTH(DECL) (DECL_LANG_SPECIFIC(DECL)->u.f.code_length) /* Similarly, the position of the LineNumberTable attribute. */ #define DECL_LINENUMBERS_OFFSET(DECL) \ ! (DECL_LANG_SPECIFIC(DECL)->u.f.linenumbers_offset) /* Similarly, the position of the LocalVariableTable attribute (following the standard attribute header). */ #define DECL_LOCALVARIABLES_OFFSET(DECL) \ ! (DECL_LANG_SPECIFIC(DECL)->u.f.localvariables_offset) ! #define DECL_MAX_LOCALS(DECL) (DECL_LANG_SPECIFIC(DECL)->u.f.max_locals) ! #define DECL_MAX_STACK(DECL) (DECL_LANG_SPECIFIC(DECL)->u.f.max_stack) /* Number of local variable slots needed for the arguments of this function. */ ! #define DECL_ARG_SLOT_COUNT(DECL) \ ! (DECL_LANG_SPECIFIC(DECL)->u.f.arg_slot_count) /* Information on declaration location */ ! #define DECL_FUNCTION_WFL(DECL) (DECL_LANG_SPECIFIC(DECL)->u.f.wfl) /* List of checked thrown exceptions, as specified with the `throws' keyword */ ! #define DECL_FUNCTION_THROWS(DECL) (DECL_LANG_SPECIFIC(DECL)->u.f.throws_list) /* List of other constructors of the same class that this constructor calls */ #define DECL_CONSTRUCTOR_CALLS(DECL) \ ! (DECL_LANG_SPECIFIC(DECL)->u.f.called_constructor) /* When the function is an access function, the DECL it was trying to access */ #define DECL_FUNCTION_ACCESS_DECL(DECL) \ ! (DECL_LANG_SPECIFIC(DECL)->u.f.called_constructor) /* The identifier of the access method used to invoke this method from an inner class. */ #define DECL_FUNCTION_INNER_ACCESS(DECL) \ ! (DECL_LANG_SPECIFIC(DECL)->u.f.inner_access) /* Pointer to the function's current's COMPOUND_EXPR tree (while completing its body) or the function's block */ ! #define DECL_FUNCTION_BODY(DECL) \ ! (DECL_LANG_SPECIFIC(DECL)->u.f.function_decl_body) /* How specific the function is (for method selection - Java source code front-end */ #define DECL_SPECIFIC_COUNT(DECL) DECL_ARG_SLOT_COUNT(DECL) *************** struct lang_identifier *** 770,800 **** boolean decls. The variables are intended to be TRUE when the class has been initialized in this function, and FALSE otherwise. */ #define DECL_FUNCTION_INIT_TEST_TABLE(DECL) \ ! (DECL_LANG_SPECIFIC(DECL)->init_test_table) /* If LOCAL_CLASS_INITIALIZATION_FLAG_P(decl), give class it initializes. */ #define DECL_FUNCTION_INIT_TEST_CLASS(DECL) \ ! (((struct lang_decl_var*)DECL_LANG_SPECIFIC(DECL))->slot_chain) /* For each static function decl, itc contains a hash table whose entries are keyed on class named that are definitively initialized in DECL. */ #define DECL_FUNCTION_INITIALIZED_CLASS_TABLE(DECL) \ ! (DECL_LANG_SPECIFIC(DECL)->ict) /* A list of all the static method calls in the method DECL (if optimizing). Actually each TREE_VALUE points to a COMPONT_EXPR that wraps the invoation so we can later patch it. */ #define DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND(DECL) \ ! (DECL_LANG_SPECIFIC(DECL)->smic) /* The Number of Artificial Parameters (NAP) DECL contains. this$ is excluded, because sometimes created as a parameter before the function decl exists. */ ! #define DECL_FUNCTION_NAP(DECL) (DECL_LANG_SPECIFIC(DECL)->nap) /* True if DECL is a synthetic ctor. */ #define DECL_FUNCTION_SYNTHETIC_CTOR(DECL) \ ! (DECL_LANG_SPECIFIC(DECL)->synthetic_ctor) ! #define DECL_FIXED_CONSTRUCTOR_P(DECL) (DECL_LANG_SPECIFIC(DECL)->fixed_ctor) /* A constructor that calls this. */ ! #define DECL_INIT_CALLS_THIS(DECL) (DECL_LANG_SPECIFIC(DECL)->init_calls_this) /* True when DECL aliases an outer context local variable. */ #define FIELD_LOCAL_ALIAS(DECL) DECL_LANG_FLAG_6 (DECL) --- 801,836 ---- boolean decls. The variables are intended to be TRUE when the class has been initialized in this function, and FALSE otherwise. */ #define DECL_FUNCTION_INIT_TEST_TABLE(DECL) \ ! (DECL_LANG_SPECIFIC(DECL)->u.f.init_test_table) /* If LOCAL_CLASS_INITIALIZATION_FLAG_P(decl), give class it initializes. */ #define DECL_FUNCTION_INIT_TEST_CLASS(DECL) \ ! (DECL_LANG_SPECIFIC(DECL)->u.v.slot_chain) /* For each static function decl, itc contains a hash table whose entries are keyed on class named that are definitively initialized in DECL. */ #define DECL_FUNCTION_INITIALIZED_CLASS_TABLE(DECL) \ ! (DECL_LANG_SPECIFIC(DECL)->u.f.ict) /* A list of all the static method calls in the method DECL (if optimizing). Actually each TREE_VALUE points to a COMPONT_EXPR that wraps the invoation so we can later patch it. */ #define DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND(DECL) \ ! (DECL_LANG_SPECIFIC(DECL)->u.f.smic) /* The Number of Artificial Parameters (NAP) DECL contains. this$ is excluded, because sometimes created as a parameter before the function decl exists. */ ! #define DECL_FUNCTION_NAP(DECL) (DECL_LANG_SPECIFIC(DECL)->u.f.nap) /* True if DECL is a synthetic ctor. */ #define DECL_FUNCTION_SYNTHETIC_CTOR(DECL) \ ! (DECL_LANG_SPECIFIC(DECL)->u.f.synthetic_ctor) ! #define DECL_FIXED_CONSTRUCTOR_P(DECL) \ ! (DECL_LANG_SPECIFIC(DECL)->u.f.fixed_ctor) /* A constructor that calls this. */ ! #define DECL_INIT_CALLS_THIS(DECL) \ ! (DECL_LANG_SPECIFIC(DECL)->u.f.init_calls_this) ! ! /* True when DECL (a field) is Synthetic. */ ! #define FIELD_SYNTHETIC(DECL) DECL_LANG_FLAG_2 (DECL) /* True when DECL aliases an outer context local variable. */ #define FIELD_LOCAL_ALIAS(DECL) DECL_LANG_FLAG_6 (DECL) *************** struct lang_identifier *** 857,887 **** /* The slot number for this local variable. */ #define DECL_LOCAL_SLOT_NUMBER(NODE) \ ! (((struct lang_decl_var*)DECL_LANG_SPECIFIC(NODE))->slot_number) /* The start (bytecode) pc for the valid range of this local variable. */ #define DECL_LOCAL_START_PC(NODE) \ ! (((struct lang_decl_var*)DECL_LANG_SPECIFIC(NODE))->start_pc) /* The end (bytecode) pc for the valid range of this local variable. */ #define DECL_LOCAL_END_PC(NODE) \ ! (((struct lang_decl_var*)DECL_LANG_SPECIFIC(NODE))->end_pc) /* For a VAR_DECLor PARM_DECL, used to chain decls with the same slot_number in decl_map. */ #define DECL_LOCAL_SLOT_CHAIN(NODE) \ ! (((struct lang_decl_var*)DECL_LANG_SPECIFIC(NODE))->slot_chain) /* For a FIELD_DECL, holds the name of the access method. Used to read/write the content of the field from an inner class. */ #define FIELD_INNER_ACCESS(DECL) \ ! (((struct lang_decl_var*)DECL_LANG_SPECIFIC(DECL))->am) /* Safely tests whether FIELD_INNER_ACCESS exists or not. */ #define FIELD_INNER_ACCESS_P(DECL) \ DECL_LANG_SPECIFIC (DECL) && FIELD_INNER_ACCESS (DECL) /* True if a final variable was initialized upon its declaration, or (if a field) in an initializer. Set after definite assignment. */ #define DECL_FIELD_FINAL_IUD(NODE) \ ! (((struct lang_decl_var*)DECL_LANG_SPECIFIC(NODE))->final_iud) /* The original WFL of a final variable. */ #define DECL_FIELD_FINAL_WFL(NODE) \ ! (((struct lang_decl_var*)DECL_LANG_SPECIFIC(NODE))->wfl) /* True if NODE is a local variable final. */ #define LOCAL_FINAL_P(NODE) (DECL_LANG_SPECIFIC (NODE) && DECL_FINAL (NODE)) /* True if NODE is a final field. */ --- 893,929 ---- /* The slot number for this local variable. */ #define DECL_LOCAL_SLOT_NUMBER(NODE) \ ! (DECL_LANG_SPECIFIC(NODE)->u.v.slot_number) /* The start (bytecode) pc for the valid range of this local variable. */ #define DECL_LOCAL_START_PC(NODE) \ ! (DECL_LANG_SPECIFIC(NODE)->u.v.start_pc) /* The end (bytecode) pc for the valid range of this local variable. */ #define DECL_LOCAL_END_PC(NODE) \ ! (DECL_LANG_SPECIFIC(NODE)->u.v.end_pc) /* For a VAR_DECLor PARM_DECL, used to chain decls with the same slot_number in decl_map. */ #define DECL_LOCAL_SLOT_CHAIN(NODE) \ ! (DECL_LANG_SPECIFIC(NODE)->u.v.slot_chain) /* For a FIELD_DECL, holds the name of the access method. Used to read/write the content of the field from an inner class. */ #define FIELD_INNER_ACCESS(DECL) \ ! (DECL_LANG_SPECIFIC(DECL)->u.v.am) /* Safely tests whether FIELD_INNER_ACCESS exists or not. */ #define FIELD_INNER_ACCESS_P(DECL) \ DECL_LANG_SPECIFIC (DECL) && FIELD_INNER_ACCESS (DECL) /* True if a final variable was initialized upon its declaration, or (if a field) in an initializer. Set after definite assignment. */ #define DECL_FIELD_FINAL_IUD(NODE) \ ! (DECL_LANG_SPECIFIC(NODE)->u.v.final_iud) /* The original WFL of a final variable. */ #define DECL_FIELD_FINAL_WFL(NODE) \ ! (DECL_LANG_SPECIFIC(NODE)->u.v.wfl) ! /* In a FUNCTION_DECL for which DECL_BUILT_IN does not hold, this is ! the approximate number of statements in this function. There is ! no need for this number to be exact; it is only used in various ! heuristics regarding optimization. */ ! #define DECL_NUM_STMTS(NODE) \ ! (FUNCTION_DECL_CHECK (NODE)->decl.u1.i) /* True if NODE is a local variable final. */ #define LOCAL_FINAL_P(NODE) (DECL_LANG_SPECIFIC (NODE) && DECL_FINAL (NODE)) /* True if NODE is a final field. */ *************** struct lang_identifier *** 892,898 **** /* True if NODE is a class initialization flag. This macro accesses the flag to read or set it. */ #define LOCAL_CLASS_INITIALIZATION_FLAG(NODE) \ ! (((struct lang_decl_var*)DECL_LANG_SPECIFIC(NODE))->cif) /* True if NODE is a class initialization flag. */ #define LOCAL_CLASS_INITIALIZATION_FLAG_P(NODE) \ (DECL_LANG_SPECIFIC (NODE) && LOCAL_CLASS_INITIALIZATION_FLAG(NODE)) --- 934,940 ---- /* True if NODE is a class initialization flag. This macro accesses the flag to read or set it. */ #define LOCAL_CLASS_INITIALIZATION_FLAG(NODE) \ ! (DECL_LANG_SPECIFIC(NODE)->u.v.cif) /* True if NODE is a class initialization flag. */ #define LOCAL_CLASS_INITIALIZATION_FLAG_P(NODE) \ (DECL_LANG_SPECIFIC (NODE) && LOCAL_CLASS_INITIALIZATION_FLAG(NODE)) *************** struct lang_identifier *** 902,908 **** { \ DECL_LANG_SPECIFIC ((T)) \ = ((struct lang_decl *) \ ! ggc_alloc_cleared (sizeof (struct lang_decl_var))); \ } /* A ConstantExpression, after folding and name resolution. */ --- 944,951 ---- { \ DECL_LANG_SPECIFIC ((T)) \ = ((struct lang_decl *) \ ! ggc_alloc_cleared (sizeof (struct lang_decl))); \ ! DECL_LANG_SPECIFIC (T)->desc = LANG_DECL_VAR; \ } /* A ConstantExpression, after folding and name resolution. */ *************** struct lang_identifier *** 919,925 **** #define DECL_BIT_INDEX(DECL) (DECL_CHECK (DECL)->decl.pointer_alias_set) /* DECL_LANG_SPECIFIC for FUNCTION_DECLs. */ ! struct lang_decl { /* tree chain; not yet used. */ long code_offset; --- 962,968 ---- #define DECL_BIT_INDEX(DECL) (DECL_CHECK (DECL)->decl.pointer_alias_set) /* DECL_LANG_SPECIFIC for FUNCTION_DECLs. */ ! struct lang_decl_func GTY(()) { /* tree chain; not yet used. */ long code_offset; *************** struct lang_decl *** 927,941 **** long linenumbers_offset; long localvariables_offset; int arg_slots; ! int max_locals, max_stack, arg_slot_count; tree wfl; /* Information on the original location */ tree throws_list; /* Exception specified by `throws' */ tree function_decl_body; /* Hold all function's statements */ tree called_constructor; /* When decl is a constructor, the list of other constructor it calls */ ! struct hash_table init_test_table; ! /* Class initialization test variables */ ! struct hash_table ict; /* Initialized (static) Class Table */ tree smic; /* Static method invocation compound */ tree inner_access; /* The identifier of the access method used for invocation from inner classes */ --- 970,990 ---- long linenumbers_offset; long localvariables_offset; int arg_slots; ! int max_locals; ! int max_stack; ! int arg_slot_count; tree wfl; /* Information on the original location */ tree throws_list; /* Exception specified by `throws' */ tree function_decl_body; /* Hold all function's statements */ tree called_constructor; /* When decl is a constructor, the list of other constructor it calls */ ! ! /* Class initialization test variables */ ! htab_t GTY ((param_is (struct treetreehash_entry))) init_test_table; ! ! /* Initialized (static) Class Table */ ! htab_t GTY ((param_is (union tree_node))) ict; ! tree smic; /* Static method invocation compound */ tree inner_access; /* The identifier of the access method used for invocation from inner classes */ *************** struct lang_decl *** 948,963 **** unsigned int strictfp : 1; }; ! /* init_test_table hash table entry structure. */ ! struct init_test_hash_entry { ! struct hash_entry root; ! tree init_test_decl; }; /* DECL_LANG_SPECIFIC for VAR_DECL, PARM_DECL and sometimes FIELD_DECL (access methods on outer class fields) and final fields. */ ! struct lang_decl_var { int slot_number; int start_pc; --- 997,1015 ---- unsigned int strictfp : 1; }; ! struct treetreehash_entry GTY(()) { ! tree key; ! tree value; }; + extern tree java_treetreehash_find PARAMS ((htab_t, tree)); + extern tree * java_treetreehash_new PARAMS ((htab_t, tree)); + extern htab_t java_treetreehash_create PARAMS ((size_t size, int ggc)); + /* DECL_LANG_SPECIFIC for VAR_DECL, PARM_DECL and sometimes FIELD_DECL (access methods on outer class fields) and final fields. */ ! struct lang_decl_var GTY(()) { int slot_number; int start_pc; *************** struct lang_decl_var *** 969,974 **** --- 1021,1042 ---- unsigned int cif : 1; /* True: decl is a class initialization flag */ }; + /* This is what 'lang_decl' really points to. */ + + enum lang_decl_desc { + LANG_DECL_FUNC, + LANG_DECL_VAR + }; + + struct lang_decl GTY(()) + { + enum lang_decl_desc desc; + union lang_decl_u { + struct lang_decl_func GTY ((tag ("LANG_DECL_FUNC"))) f; + struct lang_decl_var GTY ((tag ("LANG_DECL_VAR"))) v; + } GTY ((desc ("%0.desc"))) u; + }; + /* Macro to access fields in `struct lang_type'. */ #define TYPE_SIGNATURE(T) (TYPE_LANG_SPECIFIC(T)->signature) *************** struct lang_decl_var *** 995,1006 **** #define TYPE_PRIVATE_INNER_CLASS(T) (TYPE_LANG_SPECIFIC(T)->pic) #define TYPE_PROTECTED_INNER_CLASS(T) (TYPE_LANG_SPECIFIC(T)->poic) #define TYPE_STRICTFP(T) (TYPE_LANG_SPECIFIC(T)->strictfp) ! struct lang_type { tree signature; ! struct JCF *jcf; ! struct CPool *cpool; tree cpool_data_ref; /* Cached */ tree finit_stmt_list; /* List of statements finit$ will use */ tree clinit_stmt_list; /* List of statements will use */ --- 1063,1075 ---- #define TYPE_PRIVATE_INNER_CLASS(T) (TYPE_LANG_SPECIFIC(T)->pic) #define TYPE_PROTECTED_INNER_CLASS(T) (TYPE_LANG_SPECIFIC(T)->poic) #define TYPE_STRICTFP(T) (TYPE_LANG_SPECIFIC(T)->strictfp) + #define TYPE_USES_ASSERTIONS(T) (TYPE_LANG_SPECIFIC(T)->assertions) ! struct lang_type GTY(()) { tree signature; ! struct JCF * GTY ((skip (""))) jcf; ! struct CPool * GTY ((skip (""))) cpool; tree cpool_data_ref; /* Cached */ tree finit_stmt_list; /* List of statements finit$ will use */ tree clinit_stmt_list; /* List of statements will use */ *************** struct lang_type *** 1015,1042 **** unsigned pic:1; /* Private Inner Class. */ unsigned poic:1; /* Protected Inner Class. */ unsigned strictfp:1; /* `strictfp' class. */ }; - #ifdef JAVA_USE_HANDLES - /* TYPE_BINFO_HANDLE points from a handle-class to its corresponding - non-handle-class, and vice verse. */ - - #define BINFO_HANDLE(NODE) TREE_VEC_ELT ((NODE), 6) - - /* Given a RECORD_TYPE for a handle type, return the corresponding class. */ - #define HANDLE_TO_CLASS_TYPE(HTYPE) BINFO_HANDLE (TYPE_BINFO (HTYPE)) - - /* Given a RECORD_TYPE for a class, return the corresponding handle type. */ - #define CLASS_TO_HANDLE_TYPE(TYPE) BINFO_HANDLE (TYPE_BINFO (TYPE)) - #else - #define HANDLE_TO_CLASS_TYPE(HTYPE) (HTYPE) - #define CLASS_TO_HANDLE_TYPE(TYPE) (TYPE) - #endif - #define JCF_u4 unsigned long #define JCF_u2 unsigned short ! extern void java_set_yydebug PARAMS ((int)); extern void add_assume_compiled PARAMS ((const char *, int)); extern tree lookup_class PARAMS ((tree)); extern tree lookup_java_constructor PARAMS ((tree, tree)); --- 1084,1103 ---- unsigned pic:1; /* Private Inner Class. */ unsigned poic:1; /* Protected Inner Class. */ unsigned strictfp:1; /* `strictfp' class. */ + unsigned assertions:1; /* Any method uses `assert'. */ }; #define JCF_u4 unsigned long #define JCF_u2 unsigned short ! extern void java_parse_file PARAMS ((int)); ! extern bool java_mark_addressable PARAMS ((tree)); ! extern tree java_type_for_mode PARAMS ((enum machine_mode, int)); ! extern tree java_type_for_size PARAMS ((unsigned int, int)); ! extern tree java_unsigned_type PARAMS ((tree)); ! extern tree java_signed_type PARAMS ((tree)); ! extern tree java_signed_or_unsigned_type PARAMS ((int, tree)); ! extern tree java_truthvalue_conversion PARAMS ((tree)); extern void add_assume_compiled PARAMS ((const char *, int)); extern tree lookup_class PARAMS ((tree)); extern tree lookup_java_constructor PARAMS ((tree, tree)); *************** extern tree ident_subst PARAMS ((const c *** 1071,1077 **** --- 1132,1147 ---- const char*, int, int, const char*)); extern tree identifier_subst PARAMS ((const tree, const char *, int, int, const char *)); + extern int global_bindings_p PARAMS ((void)); + extern int kept_level_p PARAMS ((void)); + extern tree getdecls PARAMS ((void)); + extern void pushlevel PARAMS ((int)); + extern tree poplevel PARAMS ((int,int, int)); + extern void insert_block PARAMS ((tree)); + extern void set_block PARAMS ((tree)); + extern tree pushdecl PARAMS ((tree)); extern void java_init_decl_processing PARAMS ((void)); + extern void java_dup_lang_specific_decl PARAMS ((tree)); extern tree build_java_signature PARAMS ((tree)); extern tree build_java_argument_signature PARAMS ((tree)); extern void set_java_signature PARAMS ((tree, tree)); *************** extern void jcf_print_utf8 PARAMS ((FILE *** 1203,1226 **** extern void jcf_print_char PARAMS ((FILE *, int)); extern void jcf_print_utf8_replace PARAMS ((FILE *, const unsigned char *, int, int, int)); - # if JCF_USE_STDIO - extern const char* open_class PARAMS ((const char *, struct JCF *, - FILE *, const char *)); - # else extern const char* open_class PARAMS ((const char *, struct JCF *, int, const char *)); - # endif /* JCF_USE_STDIO */ #endif extern void java_debug_context PARAMS ((void)); extern void safe_layout_class PARAMS ((tree)); extern tree get_boehm_type_descriptor PARAMS ((tree)); extern bool class_has_finalize_method PARAMS ((tree)); - extern unsigned long java_hash_hash_tree_node PARAMS ((hash_table_key)); - extern bool java_hash_compare_tree_node PARAMS ((hash_table_key, - hash_table_key)); - extern bool attach_initialized_static_class PARAMS ((struct hash_entry *, - PTR)); extern void java_check_methods PARAMS ((tree)); extern void init_jcf_parse PARAMS((void)); extern void init_src_parse PARAMS((void)); --- 1273,1286 ---- *************** extern void append_gpp_mangled_name PARA *** 1236,1247 **** extern void add_predefined_file PARAMS ((tree)); extern int predefined_filename_p PARAMS ((tree)); ! /* We use ARGS_SIZE_RTX to indicate that gcc/expr.h has been included ! to declare `enum expand_modifier'. */ ! #if defined (TREE_CODE) && defined(RTX_CODE) && defined (HAVE_MACHINE_MODES) && defined (ARGS_SIZE_RTX) ! struct rtx_def * java_lang_expand_expr PARAMS ((tree, rtx, enum machine_mode, ! enum expand_modifier)); ! #endif /* TREE_CODE && RTX_CODE && HAVE_MACHINE_MODES && ARGS_SIZE_RTX */ #define DECL_FINAL(DECL) DECL_LANG_FLAG_3 (DECL) --- 1296,1310 ---- extern void add_predefined_file PARAMS ((tree)); extern int predefined_filename_p PARAMS ((tree)); ! extern void java_optimize_inline PARAMS ((tree)); ! extern tree decl_constant_value PARAMS ((tree)); ! ! #if defined(RTX_CODE) && defined (HAVE_MACHINE_MODES) ! struct rtx_def * java_expand_expr PARAMS ((tree, rtx, enum machine_mode, ! int)); ! #endif ! extern void java_inlining_merge_static_initializers PARAMS ((tree, void *)); ! extern void java_inlining_map_static_initializers PARAMS ((tree, void *)); #define DECL_FINAL(DECL) DECL_LANG_FLAG_3 (DECL) *************** struct rtx_def * java_lang_expand_expr P *** 1253,1262 **** #define METHOD_STATIC(DECL) DECL_LANG_FLAG_2 (DECL) #define METHOD_FINAL(DECL) DECL_FINAL (DECL) #define METHOD_SYNCHRONIZED(DECL) DECL_LANG_FLAG_4 (DECL) ! #define METHOD_NATIVE(DECL) (DECL_LANG_SPECIFIC(DECL)->native) #define METHOD_ABSTRACT(DECL) DECL_LANG_FLAG_5 (DECL) #define METHOD_TRANSIENT(DECL) DECL_LANG_FLAG_6 (DECL) ! #define METHOD_STRICTFP(DECL) (DECL_LANG_SPECIFIC (DECL)->strictfp) #define JAVA_FILE_P(NODE) TREE_LANG_FLAG_2 (NODE) #define CLASS_FILE_P(NODE) TREE_LANG_FLAG_3 (NODE) --- 1316,1325 ---- #define METHOD_STATIC(DECL) DECL_LANG_FLAG_2 (DECL) #define METHOD_FINAL(DECL) DECL_FINAL (DECL) #define METHOD_SYNCHRONIZED(DECL) DECL_LANG_FLAG_4 (DECL) ! #define METHOD_NATIVE(DECL) (DECL_LANG_SPECIFIC(DECL)->u.f.native) #define METHOD_ABSTRACT(DECL) DECL_LANG_FLAG_5 (DECL) #define METHOD_TRANSIENT(DECL) DECL_LANG_FLAG_6 (DECL) ! #define METHOD_STRICTFP(DECL) (DECL_LANG_SPECIFIC (DECL)->u.f.strictfp) #define JAVA_FILE_P(NODE) TREE_LANG_FLAG_2 (NODE) #define CLASS_FILE_P(NODE) TREE_LANG_FLAG_3 (NODE) *************** struct rtx_def * java_lang_expand_expr P *** 1300,1305 **** --- 1363,1369 ---- #define CLASS_PRIVATE(DECL) (TYPE_PRIVATE_INNER_CLASS (TREE_TYPE (DECL))) #define CLASS_PROTECTED(DECL) (TYPE_PROTECTED_INNER_CLASS (TREE_TYPE (DECL))) #define CLASS_STRICTFP(DECL) (TYPE_STRICTFP (TREE_TYPE (DECL))) + #define CLASS_USES_ASSERTIONS(DECL) (TYPE_USES_ASSERTIONS (TREE_TYPE (DECL))) /* @deprecated marker flag on methods, fields and classes */ *************** extern tree *type_map; *** 1483,1488 **** --- 1547,1558 ---- declared with the final modifier */ #define ARG_FINAL_P(NODE) TREE_LANG_FLAG_0 (NODE) + /* True if NODE (some kind of EXPR, but not a WFL) should not give an + error if it is found to be unreachable. This can only be applied + to those EXPRs which can be used as the update expression of a + `for' loop. In particular it can't be set on a LOOP_EXPR. */ + #define SUPPRESS_UNREACHABLE_ERROR(NODE) TREE_LANG_FLAG_0 (NODE) + /* True if EXPR (a WFL in that case) resolves into a package name */ #define RESOLVE_PACKAGE_NAME_P(WFL) TREE_LANG_FLAG_3 (WFL) *************** extern tree *type_map; *** 1646,1652 **** TREE_SIDE_EFFECTS (WHERE) = 1; \ } ! /* Non zero if TYPE is an unchecked exception */ #define IS_UNCHECKED_EXCEPTION_P(TYPE) \ (inherits_from_p ((TYPE), runtime_exception_type_node) \ || inherits_from_p ((TYPE), error_exception_type_node)) --- 1716,1722 ---- TREE_SIDE_EFFECTS (WHERE) = 1; \ } ! /* Nonzero if TYPE is an unchecked exception */ #define IS_UNCHECKED_EXCEPTION_P(TYPE) \ (inherits_from_p ((TYPE), runtime_exception_type_node) \ || inherits_from_p ((TYPE), error_exception_type_node)) *************** enum *** 1681,1689 **** JV_STATE_LINKED = 9, /* Strings interned. */ JV_STATE_IN_PROGRESS = 10, /* running. */ ! JV_STATE_DONE = 12, - JV_STATE_ERROR = 14 /* must be last. */ }; #undef DEBUG_JAVA_BINDING_LEVELS --- 1751,1760 ---- JV_STATE_LINKED = 9, /* Strings interned. */ JV_STATE_IN_PROGRESS = 10, /* running. */ ! JV_STATE_ERROR = 12, ! ! JV_STATE_DONE = 14 /* Must be last. */ }; #undef DEBUG_JAVA_BINDING_LEVELS diff -Nrc3pad gcc-3.2.3/gcc/java/jcf-dump.1 gcc-3.3/gcc/java/jcf-dump.1 *** gcc-3.2.3/gcc/java/jcf-dump.1 2003-04-22 07:07:37.000000000 +0000 --- gcc-3.3/gcc/java/jcf-dump.1 2003-05-14 00:32:10.000000000 +0000 *************** *** 1,8 **** ! .\" Automatically generated by Pod::Man version 1.15 ! .\" Tue Apr 22 07:07:37 2003 .\" .\" Standard preamble: ! .\" ====================================================================== .de Sh \" Subsection heading .br .if t .Sp --- 1,7 ---- ! .\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13 .\" .\" Standard preamble: ! .\" ======================================================================== .de Sh \" Subsection heading .br .if t .Sp *************** *** 15,26 **** .if t .sp .5v .if n .sp .. - .de Ip \" List item - .br - .ie \\n(.$>=3 .ne \\$3 - .el .ne 3 - .IP "\\$1" \\$2 - .. .de Vb \" Begin verbatim text .ft CW .nf --- 14,19 ---- *************** *** 28,42 **** .. .de Ve \" End verbatim text .ft R - .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a ! .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used ! .\" to do unbreakable dashes and therefore won't be available. \*(C` and ! .\" \*(C' expand to `' in nroff, nothing in troff, for use with C<> .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ --- 21,34 ---- .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a ! .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to ! .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' ! .\" expand to `' in nroff, nothing in troff, for use with C<>. .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ *************** *** 56,65 **** . ds R" '' 'br\} .\" ! .\" If the F register is turned on, we'll generate index entries on stderr ! .\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and ! .\" index entries marked with X<> in POD. Of course, you'll have to process ! .\" the output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" --- 48,57 ---- . ds R" '' 'br\} .\" ! .\" If the F register is turned on, we'll generate index entries on stderr for ! .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index ! .\" entries marked with X<> in POD. Of course, you'll have to process the ! .\" output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" *************** *** 68,81 **** . rr F .\} .\" ! .\" For nroff, turn off justification. Always turn off hyphenation; it ! .\" makes way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. - .bd B 3 . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 --- 60,72 ---- . rr F .\} .\" ! .\" For nroff, turn off justification. Always turn off hyphenation; it makes ! .\" way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 *************** *** 135,200 **** . ds Ae AE .\} .rm #[ #] #H #V #F C ! .\" ====================================================================== .\" .IX Title "JCF-DUMP 1" ! .TH JCF-DUMP 1 "gcc-3.2.3" "2003-04-22" "GNU" ! .UC .SH "NAME" ! jcf-dump \- print information about Java class files .SH "SYNOPSIS" .IX Header "SYNOPSIS" ! jcf-dump [\fB\-c\fR] [\fB\*(--javap\fR] ! [\fB\*(--classpath\fR=\fIpath\fR] [\fB\*(--CLASSPATH\fR=\fIpath\fR] [\fB\-I\fR\fIdir\fR...] [\fB\-o\fR \fIfile\fR] ! [\fB\*(--version\fR] [\fB\*(--help\fR] [\fB\-v\fR] [\fB\*(--verbose\fR] \fIclassname\fR... .SH "DESCRIPTION" .IX Header "DESCRIPTION" This is a class file examiner, similar to \f(CW\*(C`javap\*(C'\fR. It will print ! information about a number of classes, which are specifed by class name or file name. .SH "OPTIONS" .IX Header "OPTIONS" ! .Ip "\fB\-c\fR" 4 .IX Item "-c" Disassemble method bodies. By default method bodies are not printed. ! .Ip "\fB\*(--javap\fR" 4 ! .IX Item "javap" Generate output in \f(CW\*(C`javap\*(C'\fR format. The implementation of this feature is very incomplete. ! .Ip "\fB\*(--classpath=\fR\fIpath\fR" 4 ! .IX Item "classpath=path" .PD 0 ! .Ip "\fB\*(--CLASSPATH=\fR\fIpath\fR" 4 ! .IX Item "CLASSPATH=path" ! .Ip "\fB\-I\fR\fIdirectory\fR" 4 .IX Item "-Idirectory" ! .Ip "\fB\-o\fR \fIfile\fR" 4 .IX Item "-o file" .PD These options as the same as the corresponding \fBgcj\fR options. ! .Ip "\fB\*(--help\fR" 4 ! .IX Item "help" Print help, then exit. ! .Ip "\fB\*(--version\fR" 4 ! .IX Item "version" Print version number, then exit. ! .Ip "\fB\-v, \-\-verbose\fR" 4 .IX Item "-v, --verbose" Print extra information while running. .SH "SEE ALSO" .IX Header "SEE ALSO" ! \&\fIgcc\fR\|(1), \fIgcj\fR\|(1), \fIgcjh\fR\|(1), \fIgij\fR\|(1), \fIjcf-dump\fR\|(1), \fIgfdl\fR\|(7), and the Info entries for \fIgcj\fR and \fIgcc\fR. .SH "COPYRIGHT" .IX Header "COPYRIGHT" ! Copyright (C) 2001, 2002 Free Software Foundation, Inc. .PP Permission is granted to copy, distribute and/or modify this document ! under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the Invariant Sections being ``\s-1GNU\s0 General Public License'', the Front-Cover texts being (a) (see below), and with the Back-Cover Texts being (b) (see below). A copy of the license is included in the man page \fIgfdl\fR\|(7). --- 126,204 ---- . ds Ae AE .\} .rm #[ #] #H #V #F C ! .\" ======================================================================== .\" .IX Title "JCF-DUMP 1" ! .TH JCF-DUMP 1 "2003-05-14" "gcc-3.3" "GNU" .SH "NAME" ! jcf\-dump \- print information about Java class files .SH "SYNOPSIS" .IX Header "SYNOPSIS" ! jcf-dump [\fB\-c\fR] [\fB\-\-javap\fR] ! [\fB\-\-classpath\fR=\fIpath\fR] [\fB\-\-CLASSPATH\fR=\fIpath\fR] [\fB\-I\fR\fIdir\fR...] [\fB\-o\fR \fIfile\fR] ! [\fB\-\-version\fR] [\fB\-\-help\fR] [\fB\-v\fR] [\fB\-\-verbose\fR] \fIclassname\fR... .SH "DESCRIPTION" .IX Header "DESCRIPTION" This is a class file examiner, similar to \f(CW\*(C`javap\*(C'\fR. It will print ! information about a number of classes, which are specified by class name or file name. .SH "OPTIONS" .IX Header "OPTIONS" ! .IP "\fB\-c\fR" 4 .IX Item "-c" Disassemble method bodies. By default method bodies are not printed. ! .IP "\fB\-\-javap\fR" 4 ! .IX Item "--javap" Generate output in \f(CW\*(C`javap\*(C'\fR format. The implementation of this feature is very incomplete. ! .IP "\fB\-\-classpath=\fR\fIpath\fR" 4 ! .IX Item "--classpath=path" .PD 0 ! .IP "\fB\-\-CLASSPATH=\fR\fIpath\fR" 4 ! .IX Item "--CLASSPATH=path" ! .IP "\fB\-I\fR\fIdirectory\fR" 4 .IX Item "-Idirectory" ! .IP "\fB\-o\fR \fIfile\fR" 4 .IX Item "-o file" .PD These options as the same as the corresponding \fBgcj\fR options. ! .IP "\fB\-\-help\fR" 4 ! .IX Item "--help" Print help, then exit. ! .IP "\fB\-\-version\fR" 4 ! .IX Item "--version" Print version number, then exit. ! .IP "\fB\-v, \-\-verbose\fR" 4 .IX Item "-v, --verbose" Print extra information while running. .SH "SEE ALSO" .IX Header "SEE ALSO" ! \&\fIgcc\fR\|(1), \fIgcj\fR\|(1), \fIgcjh\fR\|(1), \fIgij\fR\|(1), \fIjcf\-dump\fR\|(1), \fIgfdl\fR\|(7), and the Info entries for \fIgcj\fR and \fIgcc\fR. .SH "COPYRIGHT" .IX Header "COPYRIGHT" ! Copyright (c) 2001, 2002 Free Software Foundation, Inc. .PP Permission is granted to copy, distribute and/or modify this document ! under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with the Invariant Sections being ``\s-1GNU\s0 General Public License'', the Front-Cover texts being (a) (see below), and with the Back-Cover Texts being (b) (see below). A copy of the license is included in the man page \fIgfdl\fR\|(7). + .PP + (a) The \s-1FSF\s0's Front-Cover Text is: + .PP + .Vb 1 + \& A GNU Manual + .Ve + .PP + (b) The \s-1FSF\s0's Back-Cover Text is: + .PP + .Vb 3 + \& You have freedom to copy and modify this GNU Manual, like GNU + \& software. Copies published by the Free Software Foundation raise + \& funds for GNU development. + .Ve diff -Nrc3pad gcc-3.2.3/gcc/java/jcf-dump.c gcc-3.3/gcc/java/jcf-dump.c *** gcc-3.2.3/gcc/java/jcf-dump.c 2002-04-10 13:09:00.000000000 +0000 --- gcc-3.3/gcc/java/jcf-dump.c 2003-03-28 22:18:48.000000000 +0000 *************** The Free Software Foundation is independ *** 56,61 **** --- 56,62 ---- #include "version.h" #include + #include /* Outout file. */ FILE *out; *************** int flag_print_fields = 1; *** 71,77 **** int flag_print_methods = 1; int flag_print_attributes = 1; ! /* When non zero, warn when source file is newer than matching class file. */ int flag_newer = 1; --- 72,78 ---- int flag_print_methods = 1; int flag_print_attributes = 1; ! /* When nonzero, warn when source file is newer than matching class file. */ int flag_newer = 1; *************** DEFUN(print_constant, (out, jcf, index, *** 505,519 **** case CONSTANT_Float: { jfloat fnum = JPOOL_FLOAT (jcf, index); ! fprintf (out, "%s%.10g", verbosity > 0 ? "Float " : "", (double) fnum); if (verbosity > 1) ! fprintf (out, ", bits = 0x%08lx", (long) (* (int32 *) &fnum)); break; } case CONSTANT_Double: { jdouble dnum = JPOOL_DOUBLE (jcf, index); ! fprintf (out, "%s%.20g", verbosity > 0 ? "Double " : "", dnum); if (verbosity > 1) { int32 hi, lo; --- 506,590 ---- case CONSTANT_Float: { jfloat fnum = JPOOL_FLOAT (jcf, index); ! ! if (verbosity > 0) ! fputs ("Float ", out); ! ! if (fnum.negative) ! putc ('-', out); ! ! if (JFLOAT_FINITE (fnum)) ! { ! int dummy; ! int exponent = fnum.exponent - JFLOAT_EXP_BIAS; ! double f; ! uint32 mantissa = fnum.mantissa; ! if (fnum.exponent == 0) ! /* Denormal. */ ! exponent++; ! else ! /* Normal; add the implicit bit. */ ! mantissa |= ((uint32)1 << 23); ! ! f = frexp (mantissa, &dummy); ! f = ldexp (f, exponent + 1); ! fprintf (out, "%.10g", f); ! } ! else ! { ! if (fnum.mantissa == 0) ! fputs ("Inf", out); ! else if (fnum.mantissa & JFLOAT_QNAN_MASK) ! fprintf (out, "QNaN(%u)", (fnum.mantissa & ~JFLOAT_QNAN_MASK)); ! else ! fprintf (out, "SNaN(%u)", (fnum.mantissa & ~JFLOAT_QNAN_MASK)); ! } ! if (verbosity > 1) ! fprintf (out, ", bits = 0x%08lx", JPOOL_UINT (jcf, index)); ! break; } case CONSTANT_Double: { jdouble dnum = JPOOL_DOUBLE (jcf, index); ! ! if (verbosity > 0) ! fputs ("Double ", out); ! ! if (dnum.negative) ! putc ('-', out); ! ! if (JDOUBLE_FINITE (dnum)) ! { ! int dummy; ! int exponent = dnum.exponent - JDOUBLE_EXP_BIAS; ! double d; ! uint64 mantissa = ((((uint64) dnum.mantissa0) << 32) ! + dnum.mantissa1); ! if (dnum.exponent == 0) ! /* Denormal. */ ! exponent++; ! else ! /* Normal; add the implicit bit. */ ! mantissa |= ((uint64)1 << 52); ! ! d = frexp (mantissa, &dummy); ! d = ldexp (d, exponent + 1); ! fprintf (out, "%.20g", d); ! } ! else ! { ! uint64 mantissa = dnum.mantissa0 & ~JDOUBLE_QNAN_MASK; ! mantissa = (mantissa << 32) + dnum.mantissa1; ! ! if (dnum.mantissa0 == 0 && dnum.mantissa1 == 0) ! fputs ("Inf", out); ! else if (dnum.mantissa0 & JDOUBLE_QNAN_MASK) ! fprintf (out, "QNaN(%llu)", (unsigned long long)mantissa); ! else ! fprintf (out, "SNaN(%llu)", (unsigned long long)mantissa); ! } if (verbosity > 1) { int32 hi, lo; *************** help () *** 821,827 **** printf (" -v, --verbose Print extra information while running\n"); printf ("\n"); printf ("For bug reporting instructions, please see:\n"); ! printf ("%s.\n", GCCBUGURL); exit (0); } --- 892,898 ---- printf (" -v, --verbose Print extra information while running\n"); printf ("\n"); printf ("For bug reporting instructions, please see:\n"); ! printf ("%s.\n", bug_report_url); exit (0); } *************** DEFUN(main, (argc, argv), *** 939,949 **** if (optind >= argc) { fprintf (out, "Reading .class from .\n"); - #if JCF_USE_STDIO - open_class ("", jcf, stdin, NULL); - #else open_class ("", jcf, 0, NULL); - #endif process_class (jcf); } else --- 1010,1016 ---- diff -Nrc3pad gcc-3.2.3/gcc/java/jcf.h gcc-3.3/gcc/java/jcf.h *** gcc-3.2.3/gcc/java/jcf.h 2002-06-04 16:45:55.000000000 +0000 --- gcc-3.3/gcc/java/jcf.h 2003-04-10 14:54:08.000000000 +0000 *************** *** 1,6 **** /* Utility macros to read Java(TM) .class files and byte codes. ! Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by --- 1,7 ---- /* Utility macros to read Java(TM) .class files and byte codes. ! Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 ! Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by *************** The Free Software Foundation is independ *** 71,76 **** --- 72,104 ---- #define JCF_USE_SCANDIR 0 #endif + /* On case-insensitive file systems, file name components must be + compared using "strcasecmp", if available, instead of "strcmp". + Assumes "config.h" has already been included. */ + #if defined (HAVE_DOS_BASED_FILE_SYSTEM) && defined (HAVE_STRCASECMP) + #define COMPARE_FILENAMES(X, Y) strcasecmp ((X), (Y)) + #else + #define COMPARE_FILENAMES(X, Y) strcmp ((X), (Y)) + #endif + + /* On case-insensitive file systems, we need to ensure that a request + to open a .java or .class file is honored only if the file to be + opened is of the exact case we are asking for. In other words, we + want to override the inherent case insensitivity of the underlying + file system. On other platforms, this macro becomes the vanilla + open() call. + + If you want to add another host, add your define to the list below + (i.e. defined(WIN32) || defined(YOUR_HOST)) and add an host-specific + .c file to Make-lang.in similar to win32-host.c */ + #if defined(WIN32) + extern int + jcf_open_exact_case (const char* filename, int oflag); + #define JCF_OPEN_EXACT_CASE(X, Y) jcf_open_exact_case (X, Y) + #else + #define JCF_OPEN_EXACT_CASE open + #endif /* WIN32 */ + struct JCF; typedef int (*jcf_filbuf_t) PARAMS ((struct JCF*, int needed)); diff -Nrc3pad gcc-3.2.3/gcc/java/jcf-io.c gcc-3.3/gcc/java/jcf-io.c *** gcc-3.2.3/gcc/java/jcf-io.c 2002-06-04 16:45:54.000000000 +0000 --- gcc-3.3/gcc/java/jcf-io.c 2003-04-20 22:44:04.000000000 +0000 *************** DEFUN(read_zip_member, (jcf, zipd, zipf) *** 231,260 **** return 0; } - #if JCF_USE_STDIO - const char * - DEFUN(open_class, (filename, jcf, stream, dep_name), - const char *filename AND JCF *jcf AND FILE* stream - AND const char *dep_name) - { - if (jcf) - { - if (dep_name != NULL) - jcf_dependency_add_file (dep_name, 0); - JCF_ZERO (jcf); - jcf->buffer = NULL; - jcf->buffer_end = NULL; - jcf->read_ptr = NULL; - jcf->read_end = NULL; - jcf->read_state = stream; - jcf->filename = filename; - jcf->filbuf = jcf_filbuf_from_stdio; - } - else - fclose (stream); - return filename; - } - #else const char * DEFUN(open_class, (filename, jcf, fd, dep_name), const char *filename AND JCF *jcf AND int fd AND const char *dep_name) --- 231,236 ---- *************** DEFUN(open_class, (filename, jcf, fd, de *** 289,312 **** close (fd); return filename; } - #endif const char * DEFUN(find_classfile, (filename, jcf, dep_name), char *filename AND JCF *jcf AND const char *dep_name) { - #if JCF_USE_STDIO - FILE *stream = fopen (filename, "rb"); - if (stream == NULL) - return NULL; - return open_class (arg, jcf, stream, dep_name); - #else int fd = open (filename, O_RDONLY | O_BINARY); if (fd < 0) return NULL; return open_class (filename, jcf, fd, dep_name); - #endif } #if JCF_USE_SCANDIR --- 265,280 ---- *************** DEFUN(caching_stat, (filename, buf), *** 375,380 **** --- 343,349 ---- { #if JCF_USE_SCANDIR char *sep; + char origsep = 0; char *base; memoized_dirlist_entry *dent; void **slot; *************** DEFUN(caching_stat, (filename, buf), *** 388,402 **** /* Get the name of the directory. */ sep = strrchr (filename, DIR_SEPARATOR); if (sep) { *sep = '\0'; base = sep + 1; } else base = filename; ! /* Obtain the entry for this directory form the hash table. */ slot = htab_find_slot (memoized_dirlists, filename, INSERT); if (!*slot) { --- 357,376 ---- /* Get the name of the directory. */ sep = strrchr (filename, DIR_SEPARATOR); + #ifdef DIR_SEPARATOR_2 + if (! sep) + sep = strrchr (filename, DIR_SEPARATOR_2); + #endif if (sep) { + origsep = *sep; *sep = '\0'; base = sep + 1; } else base = filename; ! /* Obtain the entry for this directory from the hash table. */ slot = htab_find_slot (memoized_dirlists, filename, INSERT); if (!*slot) { *************** DEFUN(caching_stat, (filename, buf), *** 407,426 **** /* Unfortunately, scandir is not fully standardized. In particular, the type of the function pointer passed as the third argument sometimes takes a "const struct dirent *" ! parameter, and sometimes just a "struct dirent *". We rely ! on the ability to interchange these two types of function ! pointers. */ dent->num_files = scandir (filename, &dent->files, ! java_or_class_file, alphasort); *slot = dent; } else dent = *((memoized_dirlist_entry **) slot); ! /* Put the spearator back. */ if (sep) ! *sep = DIR_SEPARATOR; /* If the file is not in the list, there is no need to stat it; it does not exist. */ --- 381,399 ---- /* Unfortunately, scandir is not fully standardized. In particular, the type of the function pointer passed as the third argument sometimes takes a "const struct dirent *" ! parameter, and sometimes just a "struct dirent *". We cast ! to (void *) so that either way it is quietly accepted. */ dent->num_files = scandir (filename, &dent->files, ! (void *) java_or_class_file, alphasort); *slot = dent; } else dent = *((memoized_dirlist_entry **) slot); ! /* Put the separator back. */ if (sep) ! *sep = origsep; /* If the file is not in the list, there is no need to stat it; it does not exist. */ *************** DEFUN(find_class, (classname, classname_ *** 461,471 **** const char *classname AND int classname_length AND JCF *jcf AND int source_ok) { - #if JCF_USE_STDIO - FILE *stream; - #else int fd; - #endif int i, k, java = -1, class = -1; struct stat java_buf, class_buf; char *dep_file; --- 434,440 ---- *************** DEFUN(find_class, (classname, classname_ *** 491,500 **** /* Allocate and zero out the buffer, since we don't explicitly put a null pointer when we're copying it below. */ buflen = jcf_path_max_len () + classname_length + 10; ! buffer = (char *) ALLOC (buflen); memset (buffer, 0, buflen); ! java_buffer = (char *) alloca (buflen); jcf->java_source = 0; --- 460,469 ---- /* Allocate and zero out the buffer, since we don't explicitly put a null pointer when we're copying it below. */ buflen = jcf_path_max_len () + classname_length + 10; ! buffer = ALLOC (buflen); memset (buffer, 0, buflen); ! java_buffer = alloca (buflen); jcf->java_source = 0; *************** DEFUN(find_class, (classname, classname_ *** 554,560 **** strcpy (java_buffer, path_name); l = strlen (java_buffer); for (m = 0; m < classname_length; ++m) ! java_buffer[m + l] = (classname[m] == '.' ? '/' : classname[m]); strcpy (java_buffer + m + l, ".java"); java = caching_stat (java_buffer, &java_buf); if (java == 0) --- 523,530 ---- strcpy (java_buffer, path_name); l = strlen (java_buffer); for (m = 0; m < classname_length; ++m) ! java_buffer[m + l] = (classname[m] == '.' ! ? DIR_SEPARATOR : classname[m]); strcpy (java_buffer + m + l, ".java"); java = caching_stat (java_buffer, &java_buf); if (java == 0) *************** DEFUN(find_class, (classname, classname_ *** 578,611 **** dep_file = java_buffer; else dep_file = buffer; - #if JCF_USE_STDIO - if (!class) - { - SOURCE_FRONTEND_DEBUG (("Trying %s", buffer)); - stream = fopen (buffer, "rb"); - if (stream) - goto found; - } - /* Give .java a try, if necessary */ - if (!java) - { - strcpy (buffer, java_buffer); - SOURCE_FRONTEND_DEBUG (("Trying %s", buffer)); - stream = fopen (buffer, "r"); - if (stream) - { - jcf->java_source = 1; - goto found; - } - } - #else if (!class) { SOURCE_FRONTEND_DEBUG ((stderr, "[Class selected: %s]\n", classname+classname_length- (classname_length <= 30 ? classname_length : 30))); ! fd = open (buffer, O_RDONLY | O_BINARY); if (fd >= 0) goto found; } --- 548,560 ---- dep_file = java_buffer; else dep_file = buffer; if (!class) { SOURCE_FRONTEND_DEBUG ((stderr, "[Class selected: %s]\n", classname+classname_length- (classname_length <= 30 ? classname_length : 30))); ! fd = JCF_OPEN_EXACT_CASE (buffer, O_RDONLY | O_BINARY); if (fd >= 0) goto found; } *************** DEFUN(find_class, (classname, classname_ *** 617,630 **** classname+classname_length- (classname_length <= 30 ? classname_length : 30))); ! fd = open (buffer, O_RDONLY); if (fd >= 0) { jcf->java_source = 1; goto found; } } - #endif free (buffer); --- 566,578 ---- classname+classname_length- (classname_length <= 30 ? classname_length : 30))); ! fd = JCF_OPEN_EXACT_CASE (buffer, O_RDONLY); if (fd >= 0) { jcf->java_source = 1; goto found; } } free (buffer); *************** DEFUN(find_class, (classname, classname_ *** 635,646 **** return NULL; found: - #if JCF_USE_STDIO - if (jcf->java_source) - return NULL; /* FIXME */ - else - return open_class (buffer, jcf, stream, dep_file); - #else if (jcf->java_source) { JCF_ZERO (jcf); /* JCF_FINISH relies on this */ --- 583,588 ---- *************** DEFUN(find_class, (classname, classname_ *** 652,658 **** buffer = (char *) open_class (buffer, jcf, fd, dep_file); jcf->classname = xstrdup (classname); return buffer; - #endif } void --- 594,599 ---- diff -Nrc3pad gcc-3.2.3/gcc/java/jcf-parse.c gcc-3.3/gcc/java/jcf-parse.c *** gcc-3.2.3/gcc/java/jcf-parse.c 2002-04-22 20:36:47.000000000 +0000 --- gcc-3.3/gcc/java/jcf-parse.c 2003-02-03 14:06:32.000000000 +0000 *************** *** 1,5 **** /* Parser for Java(TM) .class files. ! Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Parser for Java(TM) .class files. ! Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU CC. *************** The Free Software Foundation is independ *** 28,33 **** --- 28,34 ---- #include "config.h" #include "system.h" #include "tree.h" + #include "real.h" #include "obstack.h" #include "flags.h" #include "java-except.h" *************** The Free Software Foundation is independ *** 43,49 **** #include #endif ! #ifdef HAVE_NL_LANGINFO #include #endif --- 44,50 ---- #include #endif ! #ifdef HAVE_LANGINFO_CODESET #include #endif *************** The Free Software Foundation is independ *** 65,79 **** #include "jcf.h" - extern struct obstack *saveable_obstack; extern struct obstack temporary_obstack; - extern struct obstack permanent_obstack; ! /* Set to non-zero value in order to emit class initilization code before static field references. */ extern int always_initialize_class_p; ! static tree parse_roots[3] = { NULL_TREE, NULL_TREE, NULL_TREE }; /* The FIELD_DECL for the current field. */ #define current_field parse_roots[0] --- 66,78 ---- #include "jcf.h" extern struct obstack temporary_obstack; ! /* Set to nonzero value in order to emit class initilization code before static field references. */ extern int always_initialize_class_p; ! static GTY(()) tree parse_roots[3]; /* The FIELD_DECL for the current field. */ #define current_field parse_roots[0] *************** set_source_filename (jcf, index) *** 192,200 **** DECL_LINENUMBERS_OFFSET (current_method) = 0) #define HANDLE_END_METHODS() \ ! { tree handle_type = CLASS_TO_HANDLE_TYPE (current_class); \ ! if (handle_type != current_class) layout_type (handle_type); \ ! current_method = NULL_TREE; } #define HANDLE_CODE_ATTRIBUTE(MAX_STACK, MAX_LOCALS, CODE_LENGTH) \ { DECL_MAX_STACK (current_method) = (MAX_STACK); \ --- 191,197 ---- DECL_LINENUMBERS_OFFSET (current_method) = 0) #define HANDLE_END_METHODS() \ ! { current_method = NULL_TREE; } #define HANDLE_CODE_ATTRIBUTE(MAX_STACK, MAX_LOCALS, CODE_LENGTH) \ { DECL_MAX_STACK (current_method) = (MAX_STACK); \ *************** set_source_filename (jcf, index) *** 247,254 **** #include "jcf-reader.c" - static int yydebug; - tree parse_signature (jcf, sig_index) JCF *jcf; --- 244,249 ---- *************** parse_signature (jcf, sig_index) *** 262,274 **** JPOOL_UTF_LENGTH (jcf, sig_index)); } - void - java_set_yydebug (value) - int value; - { - yydebug = value; - } - tree get_constant (jcf, index) JCF *jcf; --- 257,262 ---- *************** get_constant (jcf, index) *** 302,363 **** force_fit_type (value, 0); break; } ! #if TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT case CONSTANT_Float: { jint num = JPOOL_INT(jcf, index); REAL_VALUE_TYPE d; ! #ifdef REAL_ARITHMETIC ! d = REAL_VALUE_FROM_TARGET_SINGLE (num); ! #else ! union { float f; jint i; } u; ! u.i = num; ! d = u.f; ! #endif value = build_real (float_type_node, d); break; } case CONSTANT_Double: { ! HOST_WIDE_INT num[2]; REAL_VALUE_TYPE d; - HOST_WIDE_INT lo, hi; - num[0] = JPOOL_UINT (jcf, index); - lshift_double (num[0], 0, 32, 64, &lo, &hi, 0); - num[0] = JPOOL_UINT (jcf, index+1); - add_double (lo, hi, num[0], 0, &lo, &hi); ! /* Since ereal_from_double expects an array of HOST_WIDE_INT ! in the target's format, we swap the elements for big endian ! targets, unless HOST_WIDE_INT is sufficiently large to ! contain a target double, in which case the 2nd element ! is ignored. ! FIXME: Is this always right for cross targets? */ ! if (FLOAT_WORDS_BIG_ENDIAN && sizeof(num[0]) < 8) ! { ! num[0] = hi; ! num[1] = lo; ! } else ! { ! num[0] = lo; ! num[1] = hi; ! } ! #ifdef REAL_ARITHMETIC ! d = REAL_VALUE_FROM_TARGET_DOUBLE (num); ! #else ! { ! union { double d; jint i[2]; } u; ! u.i[0] = (jint) num[0]; ! u.i[1] = (jint) num[1]; ! d = u.d; ! } ! #endif value = build_real (double_type_node, d); break; } ! #endif /* TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT */ case CONSTANT_String: { tree name = get_name_constant (jcf, JPOOL_USHORT1 (jcf, index)); --- 290,325 ---- force_fit_type (value, 0); break; } ! case CONSTANT_Float: { jint num = JPOOL_INT(jcf, index); + long buf = num; REAL_VALUE_TYPE d; ! ! real_from_target_fmt (&d, &buf, &ieee_single_format); value = build_real (float_type_node, d); break; } + case CONSTANT_Double: { ! long buf[2], lo, hi; REAL_VALUE_TYPE d; ! hi = JPOOL_UINT (jcf, index); ! lo = JPOOL_UINT (jcf, index+1); ! if (FLOAT_WORDS_BIG_ENDIAN) ! buf[0] = hi, buf[1] = lo; else ! buf[0] = lo, buf[1] = hi; ! ! real_from_target_fmt (&d, buf, &ieee_double_format); value = build_real (double_type_node, d); break; } ! case CONSTANT_String: { tree name = get_name_constant (jcf, JPOOL_USHORT1 (jcf, index)); *************** get_name_constant (jcf, index) *** 408,414 **** return name; } ! /* Handle reading innerclass attributes. If a non zero entry (denoting a non anonymous entry) is found, We augment the inner class list of the outer context with the newly resolved innerclass. */ --- 370,376 ---- return name; } ! /* Handle reading innerclass attributes. If a nonzero entry (denoting a non anonymous entry) is found, We augment the inner class list of the outer context with the newly resolved innerclass. */ *************** read_class (name) *** 586,591 **** --- 548,557 ---- read_zip_member(current_jcf, current_jcf->zipd, current_jcf->zipd->zipf); jcf_parse (current_jcf); + /* Parsing might change the class, in which case we have to + put it back where we found it. */ + if (current_class != class && icv != NULL_TREE) + TREE_TYPE (icv) = current_class; class = current_class; java_pop_parser_context (0); java_parser_context_restore_global (); *************** load_class (class_or_name, verbose) *** 635,643 **** break; /* We failed loading name. Now consider that we might be looking ! for a inner class. */ if ((separator = strrchr (IDENTIFIER_POINTER (name), '$')) ! || (separator = strrchr (IDENTIFIER_POINTER (name), '.'))) { int c = *separator; *separator = '\0'; --- 601,609 ---- break; /* We failed loading name. Now consider that we might be looking ! for a inner class. */ if ((separator = strrchr (IDENTIFIER_POINTER (name), '$')) ! || (separator = strrchr (IDENTIFIER_POINTER (name), '.'))) { int c = *separator; *separator = '\0'; *************** void *** 746,752 **** init_outgoing_cpool () { current_constant_pool_data_ref = NULL_TREE; ! outgoing_cpool = (struct CPool *)xmalloc (sizeof (struct CPool)); memset (outgoing_cpool, 0, sizeof (struct CPool)); } --- 712,718 ---- init_outgoing_cpool () { current_constant_pool_data_ref = NULL_TREE; ! outgoing_cpool = xmalloc (sizeof (struct CPool)); memset (outgoing_cpool, 0, sizeof (struct CPool)); } *************** parse_class_file () *** 768,779 **** compiling from class files. */ always_initialize_class_p = 1; ! for (field = TYPE_FIELDS (CLASS_TO_HANDLE_TYPE (current_class)); field != NULL_TREE; field = TREE_CHAIN (field)) if (FIELD_STATIC (field)) DECL_EXTERNAL (field) = 0; ! for (method = TYPE_METHODS (CLASS_TO_HANDLE_TYPE (current_class)); method != NULL_TREE; method = TREE_CHAIN (method)) { JCF *jcf = current_jcf; --- 734,745 ---- compiling from class files. */ always_initialize_class_p = 1; ! for (field = TYPE_FIELDS (current_class); field != NULL_TREE; field = TREE_CHAIN (field)) if (FIELD_STATIC (field)) DECL_EXTERNAL (field) = 0; ! for (method = TYPE_METHODS (current_class); method != NULL_TREE; method = TREE_CHAIN (method)) { JCF *jcf = current_jcf; *************** parse_source_file_1 (file, finput) *** 876,882 **** /* There's no point in trying to find the current encoding unless we are going to do something intelligent with it -- hence the test for iconv. */ ! #if defined (HAVE_LOCALE_H) && defined (HAVE_ICONV) && defined (HAVE_NL_LANGINFO) setlocale (LC_CTYPE, ""); if (current_encoding == NULL) current_encoding = nl_langinfo (CODESET); --- 842,848 ---- /* There's no point in trying to find the current encoding unless we are going to do something intelligent with it -- hence the test for iconv. */ ! #if defined (HAVE_LOCALE_H) && defined (HAVE_ICONV) && defined (HAVE_LANGINFO_CODESET) setlocale (LC_CTYPE, ""); if (current_encoding == NULL) current_encoding = nl_langinfo (CODESET); *************** predefined_filename_p (node) *** 934,941 **** return 0; } ! int ! yyparse () { int filename_count = 0; char *list, *next; --- 900,908 ---- return 0; } ! void ! java_parse_file (set_yydebug) ! int set_yydebug ATTRIBUTE_UNUSED; { int filename_count = 0; char *list, *next; *************** yyparse () *** 1072,1078 **** resource_filename = IDENTIFIER_POINTER (TREE_VALUE (current_file_list)); compile_resource_file (resource_name, resource_filename); ! return 0; } current_jcf = main_jcf; --- 1039,1045 ---- resource_filename = IDENTIFIER_POINTER (TREE_VALUE (current_file_list)); compile_resource_file (resource_name, resource_filename); ! return; } current_jcf = main_jcf; *************** yyparse () *** 1096,1102 **** fatal_io_error ("can't open %s", IDENTIFIER_POINTER (name)); #ifdef IO_BUFFER_SIZE ! setvbuf (finput, (char *) xmalloc (IO_BUFFER_SIZE), _IOFBF, IO_BUFFER_SIZE); #endif input_filename = IDENTIFIER_POINTER (name); --- 1063,1069 ---- fatal_io_error ("can't open %s", IDENTIFIER_POINTER (name)); #ifdef IO_BUFFER_SIZE ! setvbuf (finput, xmalloc (IO_BUFFER_SIZE), _IOFBF, IO_BUFFER_SIZE); #endif input_filename = IDENTIFIER_POINTER (name); *************** yyparse () *** 1153,1159 **** parse_source_file_2 (); } ! for (ctxp = ctxp_for_generation; ctxp; ctxp = ctxp->next) { input_filename = ctxp->filename; parse_source_file_3 (); --- 1120,1126 ---- parse_source_file_2 (); } ! for (ctxp = ctxp_for_generation; ctxp; ctxp = ctxp->next) { input_filename = ctxp->filename; parse_source_file_3 (); *************** yyparse () *** 1181,1187 **** if (flag_indirect_dispatch) emit_offset_symbol_table (); } - return 0; } /* Process all class entries found in the zip file. */ --- 1148,1153 ---- *************** void *** 1293,1301 **** init_jcf_parse () { /* Register roots with the garbage collector. */ - ggc_add_tree_root (parse_roots, sizeof (parse_roots) / sizeof(tree)); - ggc_add_root (¤t_jcf, 1, sizeof (JCF), (void (*)(void *))ggc_mark_jcf); init_src_parse (); } --- 1259,1267 ---- init_jcf_parse () { /* Register roots with the garbage collector. */ ggc_add_root (¤t_jcf, 1, sizeof (JCF), (void (*)(void *))ggc_mark_jcf); init_src_parse (); } + + #include "gt-java-jcf-parse.h" diff -Nrc3pad gcc-3.2.3/gcc/java/jcf-path.c gcc-3.3/gcc/java/jcf-path.c *** gcc-3.2.3/gcc/java/jcf-path.c 2002-06-08 16:33:46.000000000 +0000 --- gcc-3.3/gcc/java/jcf-path.c 2003-03-07 04:39:46.000000000 +0000 *************** *** 1,6 **** /* Handle CLASSPATH, -classpath, and path searching. ! Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by --- 1,7 ---- /* Handle CLASSPATH, -classpath, and path searching. ! Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software ! Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by *************** The Free Software Foundation is independ *** 30,41 **** #include "jcf.h" - /* Some boilerplate that really belongs in a header. */ - - #ifndef GET_ENV_PATH_LIST - #define GET_ENV_PATH_LIST(VAR,NAME) do { (VAR) = getenv (NAME); } while (0) - #endif - /* By default, colon separates directories in a path. */ #ifndef PATH_SEPARATOR #define PATH_SEPARATOR ':' --- 31,36 ---- *************** add_entry (entp, filename, is_system) *** 149,177 **** int len; struct entry *n; ! n = (struct entry *) ALLOC (sizeof (struct entry)); n->flags = is_system ? FLAG_SYSTEM : 0; n->next = NULL; len = strlen (filename); ! if (len > 4 && (strcmp (filename + len - 4, ".zip") == 0 ! || strcmp (filename + len - 4, ".jar") == 0)) { n->flags |= FLAG_ZIP; /* If the user uses -classpath then he'll have to include libgcj.jar in the value. We check for this in a simplistic way. Symlinks will fool this test. This is only used for -MM and -MMD, so it probably isn't terribly important. */ ! if (! strcmp (filename, LIBGCJ_ZIP_FILE)) n->flags |= FLAG_SYSTEM; } /* Note that we add a trailing separator to `.zip' names as well. This is a little hack that lets the searching code in jcf-io.c work more easily. Eww. */ ! if (filename[len - 1] != '/' && filename[len - 1] != DIR_SEPARATOR) { ! char *f2 = (char *) alloca (len + 2); strcpy (f2, filename); f2[len] = DIR_SEPARATOR; f2[len + 1] = '\0'; --- 144,173 ---- int len; struct entry *n; ! n = ALLOC (sizeof (struct entry)); n->flags = is_system ? FLAG_SYSTEM : 0; n->next = NULL; len = strlen (filename); ! ! if (len > 4 && (COMPARE_FILENAMES (filename + len - 4, ".zip") == 0 ! || COMPARE_FILENAMES (filename + len - 4, ".jar") == 0)) { n->flags |= FLAG_ZIP; /* If the user uses -classpath then he'll have to include libgcj.jar in the value. We check for this in a simplistic way. Symlinks will fool this test. This is only used for -MM and -MMD, so it probably isn't terribly important. */ ! if (! COMPARE_FILENAMES (filename, LIBGCJ_ZIP_FILE)) n->flags |= FLAG_SYSTEM; } /* Note that we add a trailing separator to `.zip' names as well. This is a little hack that lets the searching code in jcf-io.c work more easily. Eww. */ ! if (! IS_DIR_SEPARATOR (filename[len - 1])) { ! char *f2 = alloca (len + 2); strcpy (f2, filename); f2[len] = DIR_SEPARATOR; f2[len + 1] = '\0'; *************** add_path (entp, cp, is_system) *** 197,203 **** if (cp) { ! char *buf = (char *) alloca (strlen (cp) + 3); startp = endp = cp; while (1) { --- 193,199 ---- if (cp) { ! char *buf = alloca (strlen (cp) + 3); startp = endp = cp; while (1) { *************** jcf_path_init () *** 244,250 **** sep[0] = DIR_SEPARATOR; sep[1] = '\0'; ! GET_ENV_PATH_LIST (cp, "GCC_EXEC_PREFIX"); if (cp) { try = alloca (strlen (cp) + 50); --- 240,246 ---- sep[0] = DIR_SEPARATOR; sep[1] = '\0'; ! GET_ENVIRONMENT (cp, "GCC_EXEC_PREFIX"); if (cp) { try = alloca (strlen (cp) + 50); *************** jcf_path_init () *** 305,311 **** /* Desperation: use the installed one. */ char *extdirs; add_entry (&sys_dirs, LIBGCJ_ZIP_FILE, 1); ! extdirs = (char *) alloca (strlen (LIBGCJ_ZIP_FILE) + 1); strcpy (extdirs, LIBGCJ_ZIP_FILE); strcpy (&extdirs[strlen (LIBGCJ_ZIP_FILE) - strlen ("libgcj-" DEFAULT_TARGET_VERSION ".jar")], --- 301,307 ---- /* Desperation: use the installed one. */ char *extdirs; add_entry (&sys_dirs, LIBGCJ_ZIP_FILE, 1); ! extdirs = alloca (strlen (LIBGCJ_ZIP_FILE) + 1); strcpy (extdirs, LIBGCJ_ZIP_FILE); strcpy (&extdirs[strlen (LIBGCJ_ZIP_FILE) - strlen ("libgcj-" DEFAULT_TARGET_VERSION ".jar")], *************** jcf_path_init () *** 315,321 **** jcf_path_extdirs_arg (extdirs); } ! GET_ENV_PATH_LIST (cp, "CLASSPATH"); add_path (&classpath_env, cp, 0); } --- 311,317 ---- jcf_path_extdirs_arg (extdirs); } ! GET_ENVIRONMENT (cp, "CLASSPATH"); add_path (&classpath_env, cp, 0); } *************** jcf_path_extdirs_arg (cp) *** 352,358 **** if (cp) { ! char *buf = (char *) alloca (strlen (cp) + 3); startp = endp = cp; while (1) { --- 348,354 ---- if (cp) { ! char *buf = alloca (strlen (cp) + 3); startp = endp = cp; while (1) { *************** jcf_path_extdirs_arg (cp) *** 381,391 **** if (direntp->d_name[0] != '.') { ! char *name = ! (char *) alloca (dirname_length ! + strlen (direntp->d_name) + 2); strcpy (name, buf); ! if (name[dirname_length-1] != DIR_SEPARATOR) { name[dirname_length] = DIR_SEPARATOR; name[dirname_length+1] = 0; --- 377,386 ---- if (direntp->d_name[0] != '.') { ! char *name = alloca (dirname_length ! + strlen (direntp->d_name) + 2); strcpy (name, buf); ! if (! IS_DIR_SEPARATOR (name[dirname_length-1])) { name[dirname_length] = DIR_SEPARATOR; name[dirname_length+1] = 0; diff -Nrc3pad gcc-3.2.3/gcc/java/jcf-reader.c gcc-3.3/gcc/java/jcf-reader.c *** gcc-3.2.3/gcc/java/jcf-reader.c 2001-03-23 19:42:25.000000000 +0000 --- gcc-3.3/gcc/java/jcf-reader.c 2002-11-25 14:22:06.000000000 +0000 *************** skip_attribute (jcf, number_of_attribute *** 96,104 **** { while (number_of_attribute--) { JCF_FILL (jcf, 6); (void) JCF_readu2 (jcf); ! JCF_SKIP (jcf, JCF_readu4 (jcf)); } } #endif --- 96,106 ---- { while (number_of_attribute--) { + JCF_u4 N; JCF_FILL (jcf, 6); (void) JCF_readu2 (jcf); ! N = JCF_readu4 (jcf); ! JCF_SKIP (jcf, N); } } #endif diff -Nrc3pad gcc-3.2.3/gcc/java/jcf-write.c gcc-3.3/gcc/java/jcf-write.c *** gcc-3.2.3/gcc/java/jcf-write.c 2002-06-04 16:45:54.000000000 +0000 --- gcc-3.3/gcc/java/jcf-write.c 2003-04-10 14:54:08.000000000 +0000 *************** struct jcf_partial *** 276,281 **** --- 276,284 ---- /* Information about the current switch statement. */ struct jcf_switch_state *sw_state; + + /* The count of jsr instructions that have been emmitted. */ + long num_jsrs; }; static void generate_bytecode_insns PARAMS ((tree, int, struct jcf_partial *)); *************** static void define_jcf_label PARAMS ((st *** 292,298 **** static struct jcf_block * get_jcf_label_here PARAMS ((struct jcf_partial *)); static void put_linenumber PARAMS ((int, struct jcf_partial *)); static void localvar_alloc PARAMS ((tree, struct jcf_partial *)); ! static void localvar_free PARAMS ((tree, struct jcf_partial *)); static int get_access_flags PARAMS ((tree)); static void write_chunks PARAMS ((FILE *, struct chunk *)); static int adjust_typed_op PARAMS ((tree, int)); --- 295,301 ---- static struct jcf_block * get_jcf_label_here PARAMS ((struct jcf_partial *)); static void put_linenumber PARAMS ((int, struct jcf_partial *)); static void localvar_alloc PARAMS ((tree, struct jcf_partial *)); ! static void maybe_free_localvar PARAMS ((tree, struct jcf_partial *, int)); static int get_access_flags PARAMS ((tree)); static void write_chunks PARAMS ((FILE *, struct chunk *)); static int adjust_typed_op PARAMS ((tree, int)); *************** localvar_alloc (decl, state) *** 626,634 **** } static void ! localvar_free (decl, state) tree decl; struct jcf_partial *state; { struct jcf_block *end_label = get_jcf_label_here (state); int index = DECL_LOCAL_INDEX (decl); --- 629,638 ---- } static void ! maybe_free_localvar (decl, state, really) tree decl; struct jcf_partial *state; + int really; { struct jcf_block *end_label = get_jcf_label_here (state); int index = DECL_LOCAL_INDEX (decl); *************** localvar_free (decl, state) *** 640,645 **** --- 644,651 ---- if (info->decl != decl) abort (); + if (! really) + return; ptr[0] = NULL; if (wide) { *************** get_access_flags (decl) *** 683,688 **** --- 689,698 ---- flags |= ACC_INTERFACE; if (CLASS_STATIC (decl)) flags |= ACC_STATIC; + if (CLASS_PRIVATE (decl)) + flags |= ACC_PRIVATE; + if (CLASS_PROTECTED (decl)) + flags |= ACC_PROTECTED; if (ANONYMOUS_CLASS_P (TREE_TYPE (decl)) || LOCAL_CLASS_P (TREE_TYPE (decl))) flags |= ACC_PRIVATE; *************** find_constant_index (value, state) *** 822,842 **** else if (TREE_CODE (value) == REAL_CST) { long words[2]; if (TYPE_PRECISION (TREE_TYPE (value)) == 32) ! { ! words[0] = etarsingle (TREE_REAL_CST (value)) & 0xFFFFFFFF; ! return find_constant1 (&state->cpool, CONSTANT_Float, ! (jword)words[0]); ! } else ! { ! etardouble (TREE_REAL_CST (value), words); ! return find_constant2 (&state->cpool, CONSTANT_Double, ! (jword)(words[1-FLOAT_WORDS_BIG_ENDIAN] & ! 0xFFFFFFFF), ! (jword)(words[FLOAT_WORDS_BIG_ENDIAN] & ! 0xFFFFFFFF)); ! } } else if (TREE_CODE (value) == STRING_CST) return find_string_constant (&state->cpool, value); --- 832,849 ---- else if (TREE_CODE (value) == REAL_CST) { long words[2]; + + real_to_target (words, &TREE_REAL_CST (value), + TYPE_MODE (TREE_TYPE (value))); + words[0] &= 0xffffffff; + words[1] &= 0xffffffff; + if (TYPE_PRECISION (TREE_TYPE (value)) == 32) ! return find_constant1 (&state->cpool, CONSTANT_Float, (jword)words[0]); else ! return find_constant2 (&state->cpool, CONSTANT_Double, ! (jword)words[1-FLOAT_WORDS_BIG_ENDIAN], ! (jword)words[FLOAT_WORDS_BIG_ENDIAN]); } else if (TREE_CODE (value) == STRING_CST) return find_string_constant (&state->cpool, value); *************** emit_jsr (target, state) *** 1143,1148 **** --- 1150,1156 ---- OP1 (OPCODE_jsr); /* Value is 1 byte from reloc back to start of instruction. */ emit_reloc (RELOCATION_VALUE_1, OPCODE_jsr_w, target, state); + state->num_jsrs++; } /* Generate code to evaluate EXP. If the result is true, *************** generate_bytecode_return (exp, state) *** 1430,1436 **** emit_store (state->return_value_decl, state); call_cleanups (NULL, state); emit_load (state->return_value_decl, state); ! /* If we call localvar_free (state->return_value_decl, state), then we risk the save decl erroneously re-used in the finalizer. Instead, we keep the state->return_value_decl allocated through the rest of the method. This is not --- 1438,1444 ---- emit_store (state->return_value_decl, state); call_cleanups (NULL, state); emit_load (state->return_value_decl, state); ! /* If we call maybe_free_localvar (state->return_value_decl, state, 1), then we risk the save decl erroneously re-used in the finalizer. Instead, we keep the state->return_value_decl allocated through the rest of the method. This is not *************** generate_bytecode_insns (exp, target, st *** 1470,1475 **** --- 1478,1484 ---- { tree local; tree body = BLOCK_EXPR_BODY (exp); + long jsrs = state->num_jsrs; for (local = BLOCK_EXPR_DECLS (exp); local; ) { tree next = TREE_CHAIN (local); *************** generate_bytecode_insns (exp, target, st *** 1483,1492 **** body = TREE_OPERAND (body, 1); } generate_bytecode_insns (body, target, state); for (local = BLOCK_EXPR_DECLS (exp); local; ) { tree next = TREE_CHAIN (local); ! localvar_free (local, state); local = next; } } --- 1492,1502 ---- body = TREE_OPERAND (body, 1); } generate_bytecode_insns (body, target, state); + for (local = BLOCK_EXPR_DECLS (exp); local; ) { tree next = TREE_CHAIN (local); ! maybe_free_localvar (local, state, state->num_jsrs <= jsrs); local = next; } } *************** generate_bytecode_insns (exp, target, st *** 1743,1748 **** --- 1753,1759 ---- else { HOST_WIDE_INT i; + unsigned HOST_WIDE_INT delta; /* Copy the chain of relocs into a sorted array. */ struct jcf_relocation **relocs = (struct jcf_relocation **) xmalloc (sw_state.num_cases * sizeof (struct jcf_relocation *)); *************** generate_bytecode_insns (exp, target, st *** 1775,1782 **** handled by the parser. */ } ! if (2 * sw_state.num_cases ! >= sw_state.max_case - sw_state.min_case) { /* Use tableswitch. */ int index = 0; RESERVE (13 + 4 * (sw_state.max_case - sw_state.min_case + 1)); --- 1786,1796 ---- handled by the parser. */ } ! /* We could have DELTA < 0 if sw_state.min_case is ! something like Integer.MIN_VALUE. That is why delta is ! unsigned. */ ! delta = sw_state.max_case - sw_state.min_case; ! if (2 * (unsigned) sw_state.num_cases >= delta) { /* Use tableswitch. */ int index = 0; RESERVE (13 + 4 * (sw_state.max_case - sw_state.min_case + 1)); *************** generate_bytecode_insns (exp, target, st *** 2436,2443 **** if (CAN_COMPLETE_NORMALLY (finally)) { maybe_wide (OPCODE_ret, DECL_LOCAL_INDEX (return_link), state); ! localvar_free (exception_decl, state); ! localvar_free (return_link, state); define_jcf_label (finished_label, state); } } --- 2450,2457 ---- if (CAN_COMPLETE_NORMALLY (finally)) { maybe_wide (OPCODE_ret, DECL_LOCAL_INDEX (return_link), state); ! maybe_free_localvar (exception_decl, state, 1); ! maybe_free_localvar (return_link, state, 1); define_jcf_label (finished_label, state); } } *************** perform_relocations (state) *** 2677,2682 **** --- 2691,2727 ---- shrink += 3; } + /* Optimize GOTO L; ... L: GOTO X by changing the first goto to + jump directly to X. We're careful here to avoid an infinite + loop if the `goto's themselves form one. We do this + optimization because we can generate a goto-to-goto for some + try/finally blocks. */ + while (reloc != NULL + && reloc->kind == OPCODE_goto_w + && reloc->label != block + && reloc->label->v.chunk->data != NULL + && reloc->label->v.chunk->data[0] == OPCODE_goto) + { + /* Find the reloc for the first instruction of the + destination block. */ + struct jcf_relocation *first_reloc; + for (first_reloc = reloc->label->u.relocations; + first_reloc; + first_reloc = first_reloc->next) + { + if (first_reloc->offset == 1 + && first_reloc->kind == OPCODE_goto_w) + { + reloc->label = first_reloc->label; + break; + } + } + + /* If we didn't do anything, exit the loop. */ + if (first_reloc == NULL) + break; + } + for (reloc = block->u.relocations; reloc != NULL; reloc = reloc->next) { if (reloc->kind == SWITCH_ALIGN_RELOC) *************** release_jcf_state (state) *** 2853,2858 **** --- 2898,2904 ---- in the .class file representation. The list can be written to a .class file using write_chunks. Allocate chunks from obstack WORK. */ + static GTY(()) tree SourceFile_node; static struct chunk * generate_classfile (clas, state) tree clas; *************** generate_classfile (clas, state) *** 2866,2872 **** int fields_count = 0; char *methods_count_ptr; int methods_count = 0; - static tree SourceFile_node = NULL_TREE; tree part; int total_supers = clas == object_type_node ? 0 --- 2912,2917 ---- *************** generate_classfile (clas, state) *** 2931,2937 **** if (have_value) attr_count++; ! if (FIELD_THISN (part) || FIELD_LOCAL_ALIAS (part)) attr_count++; PUT2 (attr_count); /* attributes_count */ --- 2976,2982 ---- if (have_value) attr_count++; ! if (FIELD_THISN (part) || FIELD_LOCAL_ALIAS (part) || FIELD_SYNTHETIC (part)) attr_count++; PUT2 (attr_count); /* attributes_count */ *************** generate_classfile (clas, state) *** 2949,2956 **** PUT4 (2); /* attribute_length */ i = find_constant_index (init, state); PUT2 (i); } ! /* Emit the "Synthetic" attribute for val$ and this$ fields. */ ! if (FIELD_THISN (part) || FIELD_LOCAL_ALIAS (part)) ptr = append_synthetic_attribute (state); fields_count++; } --- 2994,3003 ---- PUT4 (2); /* attribute_length */ i = find_constant_index (init, state); PUT2 (i); } ! /* Emit the "Synthetic" attribute for val$ and this$ ! fields and other fields which need it. */ ! if (FIELD_THISN (part) || FIELD_LOCAL_ALIAS (part) ! || FIELD_SYNTHETIC (part)) ptr = append_synthetic_attribute (state); fields_count++; } *************** generate_classfile (clas, state) *** 3009,3014 **** --- 3056,3062 ---- get_jcf_label_here (state); /* Force a first block. */ for (t = DECL_ARGUMENTS (part); t != NULL_TREE; t = TREE_CHAIN (t)) localvar_alloc (t, state); + state->num_jsrs = 0; generate_bytecode_insns (body, IGNORE_TARGET, state); if (CAN_COMPLETE_NORMALLY (body)) { *************** generate_classfile (clas, state) *** 3018,3026 **** OP1 (OPCODE_return); } for (t = DECL_ARGUMENTS (part); t != NULL_TREE; t = TREE_CHAIN (t)) ! localvar_free (t, state); if (state->return_value_decl != NULL_TREE) ! localvar_free (state->return_value_decl, state); finish_jcf_block (state); perform_relocations (state); --- 3066,3074 ---- OP1 (OPCODE_return); } for (t = DECL_ARGUMENTS (part); t != NULL_TREE; t = TREE_CHAIN (t)) ! maybe_free_localvar (t, state, 1); if (state->return_value_decl != NULL_TREE) ! maybe_free_localvar (state->return_value_decl, state, 1); finish_jcf_block (state); perform_relocations (state); *************** generate_classfile (clas, state) *** 3154,3160 **** if (SourceFile_node == NULL_TREE) { SourceFile_node = get_identifier ("SourceFile"); - ggc_add_tree_root (&SourceFile_node, 1); } i = find_utf8_constant (&state->cpool, SourceFile_node); --- 3202,3207 ---- *************** generate_classfile (clas, state) *** 3174,3191 **** return state->first; } static unsigned char * append_synthetic_attribute (state) struct jcf_partial *state; { - static tree Synthetic_node = NULL_TREE; unsigned char *ptr = append_chunk (NULL, 6, state); int i; if (Synthetic_node == NULL_TREE) { Synthetic_node = get_identifier ("Synthetic"); - ggc_add_tree_root (&Synthetic_node, 1); } i = find_utf8_constant (&state->cpool, Synthetic_node); PUT2 (i); /* Attribute string index */ --- 3221,3237 ---- return state->first; } + static GTY(()) tree Synthetic_node; static unsigned char * append_synthetic_attribute (state) struct jcf_partial *state; { unsigned char *ptr = append_chunk (NULL, 6, state); int i; if (Synthetic_node == NULL_TREE) { Synthetic_node = get_identifier ("Synthetic"); } i = find_utf8_constant (&state->cpool, Synthetic_node); PUT2 (i); /* Attribute string index */ *************** append_gcj_attribute (state, class) *** 3212,3223 **** PUT4 (0); /* Attribute length */ } static void append_innerclasses_attribute (state, class) struct jcf_partial *state; tree class; { - static tree InnerClasses_node = NULL_TREE; tree orig_decl = TYPE_NAME (class); tree current, decl; int length = 0, i; --- 3258,3269 ---- PUT4 (0); /* Attribute length */ } + static tree InnerClasses_node; static void append_innerclasses_attribute (state, class) struct jcf_partial *state; tree class; { tree orig_decl = TYPE_NAME (class); tree current, decl; int length = 0, i; *************** append_innerclasses_attribute (state, cl *** 3231,3237 **** if (InnerClasses_node == NULL_TREE) { InnerClasses_node = get_identifier ("InnerClasses"); - ggc_add_tree_root (&InnerClasses_node, 1); } i = find_utf8_constant (&state->cpool, InnerClasses_node); PUT2 (i); --- 3277,3282 ---- *************** make_class_file_name (clas) *** 3302,3307 **** --- 3347,3353 ---- const char *dname, *cname, *slash; char *r; struct stat sb; + char sep; cname = IDENTIFIER_POINTER (identifier_subst (DECL_NAME (TYPE_NAME (clas)), "", '.', DIR_SEPARATOR, *************** make_class_file_name (clas) *** 3313,3336 **** char *t; dname = DECL_SOURCE_FILE (TYPE_NAME (clas)); slash = strrchr (dname, DIR_SEPARATOR); if (! slash) ! { ! dname = "."; ! slash = dname + 1; ! } t = strrchr (cname, DIR_SEPARATOR); if (t) cname = t + 1; } else { dname = jcf_write_base_directory; slash = dname + strlen (dname); } r = xmalloc (slash - dname + strlen (cname) + 2); strncpy (r, dname, slash - dname); ! r[slash - dname] = DIR_SEPARATOR; strcpy (&r[slash - dname + 1], cname); /* We try to make new directories when we need them. We only do --- 3359,3403 ---- char *t; dname = DECL_SOURCE_FILE (TYPE_NAME (clas)); slash = strrchr (dname, DIR_SEPARATOR); + #ifdef DIR_SEPARATOR_2 if (! slash) ! slash = strrchr (dname, DIR_SEPARATOR_2); ! #endif ! if (! slash) ! { ! dname = "."; ! slash = dname + 1; ! sep = DIR_SEPARATOR; ! } ! else ! sep = *slash; ! t = strrchr (cname, DIR_SEPARATOR); if (t) cname = t + 1; } else { + char *s; + dname = jcf_write_base_directory; + + s = strrchr (dname, DIR_SEPARATOR); + #ifdef DIR_SEPARATOR_2 + if (! s) + s = strrchr (dname, DIR_SEPARATOR_2); + #endif + if (s) + sep = *s; + else + sep = DIR_SEPARATOR; + slash = dname + strlen (dname); } r = xmalloc (slash - dname + strlen (cname) + 2); strncpy (r, dname, slash - dname); ! r[slash - dname] = sep; strcpy (&r[slash - dname + 1], cname); /* We try to make new directories when we need them. We only do *************** make_class_file_name (clas) *** 3342,3348 **** dname = r + (slash - dname) + 1; while (1) { ! char *s = strchr (dname, DIR_SEPARATOR); if (s == NULL) break; *s = '\0'; --- 3409,3415 ---- dname = r + (slash - dname) + 1; while (1) { ! char *s = strchr (dname, sep); if (s == NULL) break; *s = '\0'; *************** make_class_file_name (clas) *** 3351,3359 **** && mkdir (r, 0755) == -1) fatal_io_error ("can't create directory %s", r); ! *s = DIR_SEPARATOR; /* Skip consecutive separators. */ ! for (dname = s + 1; *dname && *dname == DIR_SEPARATOR; ++dname) ; } --- 3418,3426 ---- && mkdir (r, 0755) == -1) fatal_io_error ("can't create directory %s", r); ! *s = sep; /* Skip consecutive separators. */ ! for (dname = s + 1; *dname && *dname == sep; ++dname) ; } *************** write_classfile (clas) *** 3391,3396 **** --- 3458,3472 ---- write_chunks (stream, chunks); if (fclose (stream)) fatal_io_error ("error closing %s", temporary_file_name); + + /* If a file named by the string pointed to by `new' exists + prior to the call to the `rename' function, the bahaviour + is implementation-defined. ISO 9899-1990 7.9.4.2. + + For example, on Win32 with MSVCRT, it is an error. */ + + unlink (class_file_name); + if (rename (temporary_file_name, class_file_name) == -1) { remove (temporary_file_name); *************** write_classfile (clas) *** 3406,3408 **** --- 3482,3486 ---- string concatenation synchronized statement */ + + #include "gt-java-jcf-write.h" diff -Nrc3pad gcc-3.2.3/gcc/java/jv-convert.1 gcc-3.3/gcc/java/jv-convert.1 *** gcc-3.2.3/gcc/java/jv-convert.1 2003-04-22 07:07:38.000000000 +0000 --- gcc-3.3/gcc/java/jv-convert.1 2003-05-14 00:32:12.000000000 +0000 *************** *** 1,8 **** ! .\" Automatically generated by Pod::Man version 1.15 ! .\" Tue Apr 22 07:07:38 2003 .\" .\" Standard preamble: ! .\" ====================================================================== .de Sh \" Subsection heading .br .if t .Sp --- 1,7 ---- ! .\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13 .\" .\" Standard preamble: ! .\" ======================================================================== .de Sh \" Subsection heading .br .if t .Sp *************** *** 15,26 **** .if t .sp .5v .if n .sp .. - .de Ip \" List item - .br - .ie \\n(.$>=3 .ne \\$3 - .el .ne 3 - .IP "\\$1" \\$2 - .. .de Vb \" Begin verbatim text .ft CW .nf --- 14,19 ---- *************** *** 28,42 **** .. .de Ve \" End verbatim text .ft R - .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a ! .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used ! .\" to do unbreakable dashes and therefore won't be available. \*(C` and ! .\" \*(C' expand to `' in nroff, nothing in troff, for use with C<> .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ --- 21,34 ---- .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a ! .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to ! .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' ! .\" expand to `' in nroff, nothing in troff, for use with C<>. .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ *************** *** 56,65 **** . ds R" '' 'br\} .\" ! .\" If the F register is turned on, we'll generate index entries on stderr ! .\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and ! .\" index entries marked with X<> in POD. Of course, you'll have to process ! .\" the output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" --- 48,57 ---- . ds R" '' 'br\} .\" ! .\" If the F register is turned on, we'll generate index entries on stderr for ! .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index ! .\" entries marked with X<> in POD. Of course, you'll have to process the ! .\" output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" *************** *** 68,81 **** . rr F .\} .\" ! .\" For nroff, turn off justification. Always turn off hyphenation; it ! .\" makes way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. - .bd B 3 . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 --- 60,72 ---- . rr F .\} .\" ! .\" For nroff, turn off justification. Always turn off hyphenation; it makes ! .\" way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 *************** *** 135,147 **** . ds Ae AE .\} .rm #[ #] #H #V #F C ! .\" ====================================================================== .\" .IX Title "JV-CONVERT 1" ! .TH JV-CONVERT 1 "gcc-3.2.3" "2003-04-22" "GNU" ! .UC .SH "NAME" ! jv-convert \- Convert file from one encoding to another .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBjv-convert\fR [\fB\s-1OPTION\s0\fR] ... [\fI\s-1INPUTFILE\s0\fR [\fI\s-1OUTPUTFILE\s0\fR]] --- 126,137 ---- . ds Ae AE .\} .rm #[ #] #H #V #F C ! .\" ======================================================================== .\" .IX Title "JV-CONVERT 1" ! .TH JV-CONVERT 1 "2003-05-14" "gcc-3.3" "GNU" .SH "NAME" ! jv\-convert \- Convert file from one encoding to another .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBjv-convert\fR [\fB\s-1OPTION\s0\fR] ... [\fI\s-1INPUTFILE\s0\fR [\fI\s-1OUTPUTFILE\s0\fR]] *************** jv-convert \- Convert file from one enco *** 151,198 **** converts a file from one encoding to another. It is similar to the Unix \&\fBiconv\fR utility. .PP ! The encodings supported by \fBjv-convert\fR are platform-dependent. Currently there is no way to get a list of all supported encodings. .SH "OPTIONS" .IX Header "OPTIONS" ! .Ip "\fB\*(--encoding\fR \fIname\fR" 4 ! .IX Item "encoding name" .PD 0 ! .Ip "\fB\*(--from\fR \fIname\fR" 4 ! .IX Item "from name" .PD Use \fIname\fR as the input encoding. The default is the current locale's encoding. ! .Ip "\fB\*(--to\fR \fIname\fR" 4 ! .IX Item "to name" Use \fIname\fR as the output encoding. The default is the \&\f(CW\*(C`JavaSrc\*(C'\fR encoding; this is \s-1ASCII\s0 with \fB\eu\fR escapes for non-ASCII characters. ! .Ip "\fB\-i\fR \fIfile\fR" 4 .IX Item "-i file" Read from \fIfile\fR. The default is to read from standard input. ! .Ip "\fB\-o\fR \fIfile\fR" 4 .IX Item "-o file" Write to \fIfile\fR. The default is to write to standard output. ! .Ip "\fB\*(--reverse\fR" 4 ! .IX Item "reverse" Swap the input and output encodings. ! .Ip "\fB\*(--help\fR" 4 ! .IX Item "help" Print a help message, then exit. ! .Ip "\fB\*(--version\fR" 4 ! .IX Item "version" Print version information, then exit. .SH "SEE ALSO" .IX Header "SEE ALSO" .SH "COPYRIGHT" .IX Header "COPYRIGHT" ! Copyright (C) 2001, 2002 Free Software Foundation, Inc. .PP Permission is granted to copy, distribute and/or modify this document ! under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the Invariant Sections being ``\s-1GNU\s0 General Public License'', the Front-Cover texts being (a) (see below), and with the Back-Cover Texts being (b) (see below). A copy of the license is included in the man page \fIgfdl\fR\|(7). --- 141,202 ---- converts a file from one encoding to another. It is similar to the Unix \&\fBiconv\fR utility. .PP ! The encodings supported by \fBjv-convert\fR are platform\-dependent. Currently there is no way to get a list of all supported encodings. .SH "OPTIONS" .IX Header "OPTIONS" ! .IP "\fB\-\-encoding\fR \fIname\fR" 4 ! .IX Item "--encoding name" .PD 0 ! .IP "\fB\-\-from\fR \fIname\fR" 4 ! .IX Item "--from name" .PD Use \fIname\fR as the input encoding. The default is the current locale's encoding. ! .IP "\fB\-\-to\fR \fIname\fR" 4 ! .IX Item "--to name" Use \fIname\fR as the output encoding. The default is the \&\f(CW\*(C`JavaSrc\*(C'\fR encoding; this is \s-1ASCII\s0 with \fB\eu\fR escapes for non-ASCII characters. ! .IP "\fB\-i\fR \fIfile\fR" 4 .IX Item "-i file" Read from \fIfile\fR. The default is to read from standard input. ! .IP "\fB\-o\fR \fIfile\fR" 4 .IX Item "-o file" Write to \fIfile\fR. The default is to write to standard output. ! .IP "\fB\-\-reverse\fR" 4 ! .IX Item "--reverse" Swap the input and output encodings. ! .IP "\fB\-\-help\fR" 4 ! .IX Item "--help" Print a help message, then exit. ! .IP "\fB\-\-version\fR" 4 ! .IX Item "--version" Print version information, then exit. .SH "SEE ALSO" .IX Header "SEE ALSO" .SH "COPYRIGHT" .IX Header "COPYRIGHT" ! Copyright (c) 2001, 2002 Free Software Foundation, Inc. .PP Permission is granted to copy, distribute and/or modify this document ! under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with the Invariant Sections being ``\s-1GNU\s0 General Public License'', the Front-Cover texts being (a) (see below), and with the Back-Cover Texts being (b) (see below). A copy of the license is included in the man page \fIgfdl\fR\|(7). + .PP + (a) The \s-1FSF\s0's Front-Cover Text is: + .PP + .Vb 1 + \& A GNU Manual + .Ve + .PP + (b) The \s-1FSF\s0's Back-Cover Text is: + .PP + .Vb 3 + \& You have freedom to copy and modify this GNU Manual, like GNU + \& software. Copies published by the Free Software Foundation raise + \& funds for GNU development. + .Ve diff -Nrc3pad gcc-3.2.3/gcc/java/jv-scan.1 gcc-3.3/gcc/java/jv-scan.1 *** gcc-3.2.3/gcc/java/jv-scan.1 2003-04-22 07:07:37.000000000 +0000 --- gcc-3.3/gcc/java/jv-scan.1 2003-05-14 00:32:10.000000000 +0000 *************** *** 1,8 **** ! .\" Automatically generated by Pod::Man version 1.15 ! .\" Tue Apr 22 07:07:37 2003 .\" .\" Standard preamble: ! .\" ====================================================================== .de Sh \" Subsection heading .br .if t .Sp --- 1,7 ---- ! .\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13 .\" .\" Standard preamble: ! .\" ======================================================================== .de Sh \" Subsection heading .br .if t .Sp *************** *** 15,26 **** .if t .sp .5v .if n .sp .. - .de Ip \" List item - .br - .ie \\n(.$>=3 .ne \\$3 - .el .ne 3 - .IP "\\$1" \\$2 - .. .de Vb \" Begin verbatim text .ft CW .nf --- 14,19 ---- *************** *** 28,42 **** .. .de Ve \" End verbatim text .ft R - .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a ! .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used ! .\" to do unbreakable dashes and therefore won't be available. \*(C` and ! .\" \*(C' expand to `' in nroff, nothing in troff, for use with C<> .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ --- 21,34 ---- .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a ! .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to ! .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' ! .\" expand to `' in nroff, nothing in troff, for use with C<>. .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ *************** *** 56,65 **** . ds R" '' 'br\} .\" ! .\" If the F register is turned on, we'll generate index entries on stderr ! .\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and ! .\" index entries marked with X<> in POD. Of course, you'll have to process ! .\" the output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" --- 48,57 ---- . ds R" '' 'br\} .\" ! .\" If the F register is turned on, we'll generate index entries on stderr for ! .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index ! .\" entries marked with X<> in POD. Of course, you'll have to process the ! .\" output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" *************** *** 68,81 **** . rr F .\} .\" ! .\" For nroff, turn off justification. Always turn off hyphenation; it ! .\" makes way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. - .bd B 3 . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 --- 60,72 ---- . rr F .\} .\" ! .\" For nroff, turn off justification. Always turn off hyphenation; it makes ! .\" way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 *************** *** 135,152 **** . ds Ae AE .\} .rm #[ #] #H #V #F C ! .\" ====================================================================== .\" .IX Title "JV-SCAN 1" ! .TH JV-SCAN 1 "gcc-3.2.3" "2003-04-22" "GNU" ! .UC .SH "NAME" ! jv-scan \- print information about Java source file .SH "SYNOPSIS" .IX Header "SYNOPSIS" ! jv-scan [\fB\*(--complexity\fR] [\fB\*(--encoding\fR=\fIname\fR] ! [\fB\*(--print-main\fR] [\fB\*(--list-class\fR] [\fB\*(--list-filename\fR] ! [\fB\*(--version\fR] [\fB\*(--help\fR] [\fB\-o\fR \fIfile\fR] \fIinputfile\fR... .SH "DESCRIPTION" .IX Header "DESCRIPTION" --- 126,143 ---- . ds Ae AE .\} .rm #[ #] #H #V #F C ! .\" ======================================================================== .\" .IX Title "JV-SCAN 1" ! .TH JV-SCAN 1 "2003-05-14" "gcc-3.3" "GNU" .SH "NAME" ! jv\-scan \- print information about Java source file .SH "SYNOPSIS" .IX Header "SYNOPSIS" ! jv-scan [\fB\-\-no\-assert\fR] [\fB\-\-complexity\fR] ! [\fB\-\-encoding\fR=\fIname\fR] [\fB\-\-print\-main\fR] ! [\fB\-\-list\-class\fR] [\fB\-\-list\-filename\fR] ! [\fB\-\-version\fR] [\fB\-\-help\fR] [\fB\-o\fR \fIfile\fR] \fIinputfile\fR... .SH "DESCRIPTION" .IX Header "DESCRIPTION" *************** The \f(CW\*(C`jv\-scan\*(C'\fR program c *** 154,198 **** source file (\fI.java\fR file). .SH "OPTIONS" .IX Header "OPTIONS" ! .Ip "\fB\*(--complexity\fR" 4 ! .IX Item "complexity" This prints a complexity measure, related to cyclomatic complexity, for each input file. ! .Ip "\fB\*(--encoding=\fR\fIname\fR" 4 ! .IX Item "encoding=name" This works like the corresponding \fBgcj\fR option. ! .Ip "\fB\*(--print-main\fR" 4 ! .IX Item "print-main" This prints the name of the class in this file containing a \f(CW\*(C`main\*(C'\fR method. ! .Ip "\fB\*(--list-class\fR" 4 ! .IX Item "list-class" This lists the names of all classes defined in the input files. ! .Ip "\fB\*(--list-filename\fR" 4 ! .IX Item "list-filename" If \f(CW\*(C`\-\-list\-class\*(C'\fR is given, this option causes \f(CW\*(C`jv\-scan\*(C'\fR to also print the name of the file in which each class was found. ! .Ip "\fB\-o\fR \fIfile\fR" 4 .IX Item "-o file" Print output to the named file. ! .Ip "\fB\*(--help\fR" 4 ! .IX Item "help" Print help, then exit. ! .Ip "\fB\*(--version\fR" 4 ! .IX Item "version" Print version number, then exit. .SH "SEE ALSO" .IX Header "SEE ALSO" ! \&\fIgcc\fR\|(1), \fIgcj\fR\|(1), \fIgcjh\fR\|(1), \fIgij\fR\|(1), \fIjcf-dump\fR\|(1), \fIgfdl\fR\|(7), and the Info entries for \fIgcj\fR and \fIgcc\fR. .SH "COPYRIGHT" .IX Header "COPYRIGHT" ! Copyright (C) 2001, 2002 Free Software Foundation, Inc. .PP Permission is granted to copy, distribute and/or modify this document ! under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the Invariant Sections being ``\s-1GNU\s0 General Public License'', the Front-Cover texts being (a) (see below), and with the Back-Cover Texts being (b) (see below). A copy of the license is included in the man page \fIgfdl\fR\|(7). --- 145,207 ---- source file (\fI.java\fR file). .SH "OPTIONS" .IX Header "OPTIONS" ! .IP "\fB\-\-no\-assert\fR" 4 ! .IX Item "--no-assert" ! Don't recognize the \f(CW\*(C`assert\*(C'\fR keyword, for backwards compatibility ! with older versions of the language specification. ! .IP "\fB\-\-complexity\fR" 4 ! .IX Item "--complexity" This prints a complexity measure, related to cyclomatic complexity, for each input file. ! .IP "\fB\-\-encoding=\fR\fIname\fR" 4 ! .IX Item "--encoding=name" This works like the corresponding \fBgcj\fR option. ! .IP "\fB\-\-print\-main\fR" 4 ! .IX Item "--print-main" This prints the name of the class in this file containing a \f(CW\*(C`main\*(C'\fR method. ! .IP "\fB\-\-list\-class\fR" 4 ! .IX Item "--list-class" This lists the names of all classes defined in the input files. ! .IP "\fB\-\-list\-filename\fR" 4 ! .IX Item "--list-filename" If \f(CW\*(C`\-\-list\-class\*(C'\fR is given, this option causes \f(CW\*(C`jv\-scan\*(C'\fR to also print the name of the file in which each class was found. ! .IP "\fB\-o\fR \fIfile\fR" 4 .IX Item "-o file" Print output to the named file. ! .IP "\fB\-\-help\fR" 4 ! .IX Item "--help" Print help, then exit. ! .IP "\fB\-\-version\fR" 4 ! .IX Item "--version" Print version number, then exit. .SH "SEE ALSO" .IX Header "SEE ALSO" ! \&\fIgcc\fR\|(1), \fIgcj\fR\|(1), \fIgcjh\fR\|(1), \fIgij\fR\|(1), \fIjcf\-dump\fR\|(1), \fIgfdl\fR\|(7), and the Info entries for \fIgcj\fR and \fIgcc\fR. .SH "COPYRIGHT" .IX Header "COPYRIGHT" ! Copyright (c) 2001, 2002 Free Software Foundation, Inc. .PP Permission is granted to copy, distribute and/or modify this document ! under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with the Invariant Sections being ``\s-1GNU\s0 General Public License'', the Front-Cover texts being (a) (see below), and with the Back-Cover Texts being (b) (see below). A copy of the license is included in the man page \fIgfdl\fR\|(7). + .PP + (a) The \s-1FSF\s0's Front-Cover Text is: + .PP + .Vb 1 + \& A GNU Manual + .Ve + .PP + (b) The \s-1FSF\s0's Back-Cover Text is: + .PP + .Vb 3 + \& You have freedom to copy and modify this GNU Manual, like GNU + \& software. Copies published by the Free Software Foundation raise + \& funds for GNU development. + .Ve diff -Nrc3pad gcc-3.2.3/gcc/java/jv-scan.c gcc-3.3/gcc/java/jv-scan.c *** gcc-3.2.3/gcc/java/jv-scan.c 2002-02-01 21:07:31.000000000 +0000 --- gcc-3.3/gcc/java/jv-scan.c 2003-02-03 14:06:32.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 30,36 **** #include #endif ! #ifdef HAVE_NL_LANGINFO #include #endif --- 30,36 ---- #include #endif ! #ifdef HAVE_LANGINFO_CODESET #include #endif *************** int flag_find_main = 0; *** 64,69 **** --- 64,70 ---- int flag_dump_class = 0; int flag_list_filename = 0; int flag_complexity = 0; + int flag_assert = 1; int pedantic = 0; *************** static const struct option options[] = *** 85,90 **** --- 86,93 ---- { "list-class", no_argument, &flag_dump_class, 1 }, { "encoding", required_argument, NULL, OPT_ENCODING }, { "complexity", no_argument, &flag_complexity, 1 }, + { "no-assert", no_argument, &flag_assert, 0 }, + { "assert", no_argument, &flag_assert, 1 }, { NULL, no_argument, NULL, 0 } }; *************** help () *** 100,105 **** --- 103,109 ---- { printf ("Usage: jv-scan [OPTION]... FILE...\n\n"); printf ("Print useful information read from Java source files.\n\n"); + printf (" --no-assert Don't recognize the assert keyword\n"); printf (" --complexity Print cyclomatic complexity of input file\n"); printf (" --encoding NAME Specify encoding of input file\n"); printf (" --print-main Print name of class containing `main'\n"); *************** help () *** 111,117 **** printf (" --version Print version number, then exit\n"); printf ("\n"); printf ("For bug reporting instructions, please see:\n"); ! printf ("%s.\n", GCCBUGURL); exit (0); } --- 115,121 ---- printf (" --version Print version number, then exit\n"); printf ("\n"); printf ("For bug reporting instructions, please see:\n"); ! printf ("%s.\n", bug_report_url); exit (0); } *************** DEFUN (main, (argc, argv), *** 199,205 **** /* There's no point in trying to find the current encoding unless we are going to do something intelligent with it -- hence the test for iconv. */ ! #if defined (HAVE_LOCALE_H) && defined (HAVE_ICONV) && defined (HAVE_NL_LANGINFO) setlocale (LC_CTYPE, ""); if (encoding == NULL) encoding = nl_langinfo (CODESET); --- 203,209 ---- /* There's no point in trying to find the current encoding unless we are going to do something intelligent with it -- hence the test for iconv. */ ! #if defined (HAVE_LOCALE_H) && defined (HAVE_ICONV) && defined (HAVE_LANGINFO_CODESET) setlocale (LC_CTYPE, ""); if (encoding == NULL) encoding = nl_langinfo (CODESET); diff -Nrc3pad gcc-3.2.3/gcc/java/jvspec.c gcc-3.3/gcc/java/jvspec.c *** gcc-3.2.3/gcc/java/jvspec.c 2002-04-23 22:55:00.000000000 +0000 --- gcc-3.3/gcc/java/jvspec.c 2002-11-19 04:37:50.000000000 +0000 *************** static const char jvgenmain_spec[] = *** 62,68 **** %{v:-version} %{pg:-p} %{p}\ %{= MIN_WORD_LENGTH) --- 105,173 ---- { static const struct java_keyword wordlist[] = { ! {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"else", ELSE_TK}, {"true", TRUE_TK}, {"case", CASE_TK}, + {"assert", ASSERT_TK}, + {"default", DEFAULT_TK}, {"", 0}, ! {"abstract", ABSTRACT_TK}, {"continue", CONTINUE_TK}, {"extends", EXTENDS_TK}, {"const", CONST_TK}, {"static", STATIC_TK}, {"this", THIS_TK}, ! {"long", LONG_TK}, {"class", CLASS_TK}, ! {"", 0}, {"synchronized", SYNCHRONIZED_TK}, ! {"do", DO_TK}, ! {"null", NULL_TK}, ! {"final", FINAL_TK}, ! {"float", FLOAT_TK}, {"super", SUPER_TK}, {"short", SHORT_TK}, {"", 0}, + {"false", FALSE_TK}, + {"transient", TRANSIENT_TK}, + {"catch", CATCH_TK}, {"int", INT_TK}, ! {"throws", THROWS_TK}, ! {"switch", SWITCH_TK}, {"for", FOR_TK}, + {"char", CHAR_TK}, {"", 0}, {"interface", INTERFACE_TK}, ! {"byte", BYTE_TK}, ! {"try", TRY_TK}, ! {"double", DOUBLE_TK}, ! {"while", WHILE_TK}, ! {"return", RETURN_TK}, {"implements", IMPLEMENTS_TK}, {"void", VOID_TK}, ! {"public", PUBLIC_TK}, {"if", IF_TK}, + {"protected", PROTECTED_TK}, + {"volatile", VOLATILE_TK}, + {"goto", GOTO_TK}, + {"", 0}, + {"native", NATIVE_TK}, {"break", BREAK_TK}, {"", 0}, + {"import", IMPORT_TK}, {"new", NEW_TK}, {"instanceof", INSTANCEOF_TK}, + {"package", PACKAGE_TK}, + {"boolean", BOOLEAN_TK}, {"", 0}, + {"finally", FINALLY_TK}, {"throw", THROW_TK}, + {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, ! {"strictfp", STRICT_TK}, ! {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, ! {"private", PRIVATE_TK} }; if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) diff -Nrc3pad gcc-3.2.3/gcc/java/lang.c gcc-3.3/gcc/java/lang.c *** gcc-3.2.3/gcc/java/lang.c 2002-10-06 23:02:12.000000000 +0000 --- gcc-3.3/gcc/java/lang.c 2003-01-05 15:03:25.000000000 +0000 *************** *** 1,5 **** /* Java(TM) language-specific utility routines. ! Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Java(TM) language-specific utility routines. ! Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** The Free Software Foundation is independ *** 40,45 **** --- 40,48 ---- #include "xref.h" #include "ggc.h" #include "diagnostic.h" + #include "tree-inline.h" + #include "splay-tree.h" + #include "tree-dump.h" struct string_option { *************** struct string_option *** 51,66 **** static const char *java_init PARAMS ((const char *)); static void java_finish PARAMS ((void)); static void java_init_options PARAMS ((void)); ! static void java_post_options PARAMS ((void)); static int java_decode_option PARAMS ((int, char **)); static void put_decl_string PARAMS ((const char *, int)); static void put_decl_node PARAMS ((tree)); ! static void java_dummy_print PARAMS ((diagnostic_context *, const char *)); ! static void lang_print_error PARAMS ((diagnostic_context *, const char *)); static int process_option_with_no PARAMS ((const char *, const struct string_option *, int)); #ifndef TARGET_OBJECT_SUFFIX # define TARGET_OBJECT_SUFFIX ".o" --- 54,82 ---- static const char *java_init PARAMS ((const char *)); static void java_finish PARAMS ((void)); static void java_init_options PARAMS ((void)); ! static bool java_post_options PARAMS ((void)); static int java_decode_option PARAMS ((int, char **)); static void put_decl_string PARAMS ((const char *, int)); static void put_decl_node PARAMS ((tree)); ! static void java_print_error_function PARAMS ((diagnostic_context *, ! const char *)); static int process_option_with_no PARAMS ((const char *, const struct string_option *, int)); + static tree java_tree_inlining_walk_subtrees PARAMS ((tree *, + int *, + walk_tree_fn, + void *, + void *)); + static int java_unsafe_for_reeval PARAMS ((tree)); + static int merge_init_test_initialization PARAMS ((void * *, + void *)); + static int inline_init_test_initialization PARAMS ((void * *, + void *)); + static bool java_can_use_bit_fields_p PARAMS ((void)); + static int java_dump_tree PARAMS ((void *, tree)); + static void dump_compound_expr PARAMS ((dump_info_p, tree)); #ifndef TARGET_OBJECT_SUFFIX # define TARGET_OBJECT_SUFFIX ".o" *************** static int process_option_with_no PARAMS *** 72,78 **** #define DEFTREECODE(SYM, NAME, TYPE, LENGTH) TYPE, ! static const char java_tree_code_type[] = { 'x', #include "java-tree.def" }; --- 88,95 ---- #define DEFTREECODE(SYM, NAME, TYPE, LENGTH) TYPE, ! const char tree_code_type[] = { ! #include "tree.def" 'x', #include "java-tree.def" }; *************** static const char java_tree_code_type[] *** 84,90 **** #define DEFTREECODE(SYM, NAME, TYPE, LENGTH) LENGTH, ! static const int java_tree_code_length[] = { 0, #include "java-tree.def" }; --- 101,108 ---- #define DEFTREECODE(SYM, NAME, TYPE, LENGTH) LENGTH, ! const unsigned char tree_code_length[] = { ! #include "tree.def" 0, #include "java-tree.def" }; *************** static const int java_tree_code_length[] *** 94,105 **** Used for printing out the tree and error messages. */ #define DEFTREECODE(SYM, NAME, TYPE, LEN) NAME, ! static const char *const java_tree_code_name[] = { "@@dummy", #include "java-tree.def" }; #undef DEFTREECODE int compiling_from_source; char * resource_name; --- 112,128 ---- Used for printing out the tree and error messages. */ #define DEFTREECODE(SYM, NAME, TYPE, LEN) NAME, ! const char *const tree_code_name[] = { ! #include "tree.def" "@@dummy", #include "java-tree.def" }; #undef DEFTREECODE + /* Used to avoid printing error messages with bogus function + prototypes. Starts out false. */ + static bool inhibit_error_function_printing; + int compiling_from_source; char * resource_name; *************** int flag_emit_class_files = 0; *** 110,171 **** int flag_filelist_file = 0; ! /* When non zero, we emit xref strings. Values of the flag for xref backends are defined in xref_flag_table, xref.c. */ int flag_emit_xref = 0; ! /* When non zero, -Wall was turned on. */ int flag_wall = 0; ! /* When non zero, check for redundant modifier uses. */ int flag_redundant = 0; ! /* When non zero, call a library routine to do integer divisions. */ int flag_use_divide_subroutine = 1; ! /* When non zero, generate code for the Boehm GC. */ int flag_use_boehm_gc = 0; ! /* When non zero, assume the runtime uses a hash table to map an object to its synchronization structure. */ int flag_hash_synchronization; ! /* When non zero, assume all native functions are implemented with JNI, not CNI. */ int flag_jni = 0; ! /* When non zero, warn when source file is newer than matching class file. */ int flag_newer = 1; ! /* When non zero, generate checks for references to NULL. */ int flag_check_references = 0; /* The encoding of the source file. */ const char *current_encoding = NULL; ! /* When non zero, report the now deprecated empty statements. */ int flag_extraneous_semicolon; ! /* When non zero, always check for a non gcj generated classes archive. */ int flag_force_classes_archive_check; /* When zero, don't optimize static class initialization. This flag shouldn't be tested alone, use STATIC_CLASS_INITIALIZATION_OPTIMIZATION_P instead. */ int flag_optimize_sci = 1; ! /* When non zero, use offset tables for virtual method calls in order to improve binary compatibility. */ int flag_indirect_dispatch = 0; /* When zero, don't generate runtime array store checks. */ int flag_store_check = 1; ! /* When non zero, print extra version information. */ static int version_flag = 0; ! /* Set non-zero if the user specified -finline-functions on the command line. */ int flag_really_inline = 0; --- 133,197 ---- int flag_filelist_file = 0; ! /* When nonzero, we emit xref strings. Values of the flag for xref backends are defined in xref_flag_table, xref.c. */ int flag_emit_xref = 0; ! /* When nonzero, -Wall was turned on. */ int flag_wall = 0; ! /* When nonzero, check for redundant modifier uses. */ int flag_redundant = 0; ! /* When nonzero, call a library routine to do integer divisions. */ int flag_use_divide_subroutine = 1; ! /* When nonzero, generate code for the Boehm GC. */ int flag_use_boehm_gc = 0; ! /* When nonzero, assume the runtime uses a hash table to map an object to its synchronization structure. */ int flag_hash_synchronization; ! /* When nonzero, permit the use of the assert keyword. */ ! int flag_assert = 1; ! ! /* When nonzero, assume all native functions are implemented with JNI, not CNI. */ int flag_jni = 0; ! /* When nonzero, warn when source file is newer than matching class file. */ int flag_newer = 1; ! /* When nonzero, generate checks for references to NULL. */ int flag_check_references = 0; /* The encoding of the source file. */ const char *current_encoding = NULL; ! /* When nonzero, report the now deprecated empty statements. */ int flag_extraneous_semicolon; ! /* When nonzero, always check for a non gcj generated classes archive. */ int flag_force_classes_archive_check; /* When zero, don't optimize static class initialization. This flag shouldn't be tested alone, use STATIC_CLASS_INITIALIZATION_OPTIMIZATION_P instead. */ int flag_optimize_sci = 1; ! /* When nonzero, use offset tables for virtual method calls in order to improve binary compatibility. */ int flag_indirect_dispatch = 0; /* When zero, don't generate runtime array store checks. */ int flag_store_check = 1; ! /* When nonzero, print extra version information. */ static int version_flag = 0; ! /* Set nonzero if the user specified -finline-functions on the command line. */ int flag_really_inline = 0; *************** lang_f_options[] = *** 189,195 **** {"force-classes-archive-check", &flag_force_classes_archive_check, 1}, {"optimize-static-class-initialization", &flag_optimize_sci, 1 }, {"indirect-dispatch", &flag_indirect_dispatch, 1}, ! {"store-check", &flag_store_check, 1} }; static const struct string_option --- 215,222 ---- {"force-classes-archive-check", &flag_force_classes_archive_check, 1}, {"optimize-static-class-initialization", &flag_optimize_sci, 1 }, {"indirect-dispatch", &flag_indirect_dispatch, 1}, ! {"store-check", &flag_store_check, 1}, ! {"assert", &flag_assert, 1} }; static const struct string_option *************** static int dependency_tracking = 0; *** 212,217 **** --- 239,249 ---- #define DEPEND_TARGET_SET 4 #define DEPEND_FILE_ALREADY_SET 8 + struct language_function GTY(()) + { + int unused; + }; + #undef LANG_HOOKS_NAME #define LANG_HOOKS_NAME "GNU Java" #undef LANG_HOOKS_INIT *************** static int dependency_tracking = 0; *** 224,231 **** #define LANG_HOOKS_DECODE_OPTION java_decode_option #undef LANG_HOOKS_POST_OPTIONS #define LANG_HOOKS_POST_OPTIONS java_post_options ! #undef LANG_HOOKS_SET_YYDEBUG ! #define LANG_HOOKS_SET_YYDEBUG java_set_yydebug /* Each front end provides its own. */ const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER; --- 256,296 ---- #define LANG_HOOKS_DECODE_OPTION java_decode_option #undef LANG_HOOKS_POST_OPTIONS #define LANG_HOOKS_POST_OPTIONS java_post_options ! #undef LANG_HOOKS_PARSE_FILE ! #define LANG_HOOKS_PARSE_FILE java_parse_file ! #undef LANG_HOOKS_UNSAFE_FOR_REEVAL ! #define LANG_HOOKS_UNSAFE_FOR_REEVAL java_unsafe_for_reeval ! #undef LANG_HOOKS_MARK_ADDRESSABLE ! #define LANG_HOOKS_MARK_ADDRESSABLE java_mark_addressable ! #undef LANG_HOOKS_EXPAND_EXPR ! #define LANG_HOOKS_EXPAND_EXPR java_expand_expr ! #undef LANG_HOOKS_TRUTHVALUE_CONVERSION ! #define LANG_HOOKS_TRUTHVALUE_CONVERSION java_truthvalue_conversion ! #undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL ! #define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL java_dup_lang_specific_decl ! #undef LANG_HOOKS_DECL_PRINTABLE_NAME ! #define LANG_HOOKS_DECL_PRINTABLE_NAME lang_printable_name ! #undef LANG_HOOKS_PRINT_ERROR_FUNCTION ! #define LANG_HOOKS_PRINT_ERROR_FUNCTION java_print_error_function ! #undef LANG_HOOKS_CAN_USE_BIT_FIELDS_P ! #define LANG_HOOKS_CAN_USE_BIT_FIELDS_P java_can_use_bit_fields_p ! ! #undef LANG_HOOKS_TYPE_FOR_MODE ! #define LANG_HOOKS_TYPE_FOR_MODE java_type_for_mode ! #undef LANG_HOOKS_TYPE_FOR_SIZE ! #define LANG_HOOKS_TYPE_FOR_SIZE java_type_for_size ! #undef LANG_HOOKS_SIGNED_TYPE ! #define LANG_HOOKS_SIGNED_TYPE java_signed_type ! #undef LANG_HOOKS_UNSIGNED_TYPE ! #define LANG_HOOKS_UNSIGNED_TYPE java_unsigned_type ! #undef LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE ! #define LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE java_signed_or_unsigned_type ! ! #undef LANG_HOOKS_TREE_INLINING_WALK_SUBTREES ! #define LANG_HOOKS_TREE_INLINING_WALK_SUBTREES java_tree_inlining_walk_subtrees ! ! #undef LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN ! #define LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN java_dump_tree /* Each front end provides its own. */ const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER; *************** process_option_with_no (p, table, table_ *** 260,266 **** /* * process java-specific compiler command-line options ! * return 0, but do not complain if the option is not recognised. */ static int java_decode_option (argc, argv) --- 325,331 ---- /* * process java-specific compiler command-line options ! * return 0, but do not complain if the option is not recognized. */ static int java_decode_option (argc, argv) *************** java_init (filename) *** 458,463 **** --- 523,531 ---- flag_minimal_debug = 0; #endif + if (flag_inline_functions) + flag_inline_trees = 1; + /* Force minimum function alignment if g++ uses the least significant bit of function pointers to store the virtual bit. This is required to keep vtables compatible. */ *************** java_init (filename) *** 492,499 **** error ("couldn't determine target name for dependency tracking"); else { ! char *buf = (char *) xmalloc (dot - filename + ! 3 + sizeof (TARGET_OBJECT_SUFFIX)); strncpy (buf, filename, dot - filename); /* If emitting class files, we might have multiple --- 560,567 ---- error ("couldn't determine target name for dependency tracking"); else { ! char *buf = xmalloc (dot - filename + ! 3 + sizeof (TARGET_OBJECT_SUFFIX)); strncpy (buf, filename, dot - filename); /* If emitting class files, we might have multiple *************** java_init (filename) *** 529,551 **** jcf_path_init (); jcf_path_seal (version_flag); - decl_printable_name = lang_printable_name; - print_error_function = lang_print_error; - lang_expand_expr = java_lang_expand_expr; - - /* Append to Gcc tree node definition arrays */ - - memcpy (tree_code_type + (int) LAST_AND_UNUSED_TREE_CODE, - java_tree_code_type, - (int)LAST_JAVA_TREE_CODE - (int)LAST_AND_UNUSED_TREE_CODE); - memcpy (tree_code_length + (int) LAST_AND_UNUSED_TREE_CODE, - java_tree_code_length, - (LAST_JAVA_TREE_CODE - - (int)LAST_AND_UNUSED_TREE_CODE) * sizeof (int)); - memcpy (tree_code_name + (int) LAST_AND_UNUSED_TREE_CODE, - java_tree_code_name, - (LAST_JAVA_TREE_CODE - - (int)LAST_AND_UNUSED_TREE_CODE) * sizeof (char *)); java_init_decl_processing (); using_eh_for_cleanups (); --- 597,602 ---- *************** put_decl_string (str, len) *** 583,594 **** if (decl_buf == NULL) { decl_buflen = len + 100; ! decl_buf = (char *) xmalloc (decl_buflen); } else { decl_buflen *= 2; ! decl_buf = (char *) xrealloc (decl_buf, decl_buflen); } } strcpy (decl_buf + decl_bufpos, str); --- 634,645 ---- if (decl_buf == NULL) { decl_buflen = len + 100; ! decl_buf = xmalloc (decl_buflen); } else { decl_buflen *= 2; ! decl_buf = xrealloc (decl_buf, decl_buflen); } } strcpy (decl_buf + decl_bufpos, str); *************** put_decl_node (node) *** 671,677 **** /* Return a user-friendly name for DECL. The resulting string is only valid until the next call. The value of the hook decl_printable_name is this function, ! which is also called directly by lang_print_error. */ const char * lang_printable_name (decl, v) --- 722,728 ---- /* Return a user-friendly name for DECL. The resulting string is only valid until the next call. The value of the hook decl_printable_name is this function, ! which is also called directly by java_print_error_function. */ const char * lang_printable_name (decl, v) *************** lang_printable_name_wls (decl, v) *** 700,724 **** } /* Print on stderr the current class and method context. This function ! is the value of the hook print_error_function, called from toplev.c. */ static void ! lang_print_error (context, file) diagnostic_context *context __attribute__((__unused__)); const char *file; { ! static tree last_error_function_context = NULL_TREE; ! static tree last_error_function = NULL; ! static int initialized_p; ! ! /* Register LAST_ERROR_FUNCTION_CONTEXT and LAST_ERROR_FUNCTION with ! the garbage collector. */ ! if (!initialized_p) ! { ! ggc_add_tree_root (&last_error_function_context, 1); ! ggc_add_tree_root (&last_error_function, 1); ! initialized_p = 1; ! } if (current_function_decl != NULL && DECL_CONTEXT (current_function_decl) != last_error_function_context) --- 751,768 ---- } /* Print on stderr the current class and method context. This function ! is the value of the hook print_error_function. */ + static GTY(()) tree last_error_function_context; + static GTY(()) tree last_error_function; static void ! java_print_error_function (context, file) diagnostic_context *context __attribute__((__unused__)); const char *file; { ! /* Don't print error messages with bogus function prototypes. */ ! if (inhibit_error_function_printing) ! return; if (current_function_decl != NULL && DECL_CONTEXT (current_function_decl) != last_error_function_context) *************** lang_print_error (context, file) *** 751,781 **** } - /* This doesn't do anything on purpose. It's used to satisfy the - print_error_function hook we don't print error messages with bogus - function prototypes. */ - - static void - java_dummy_print (c, s) - diagnostic_context *c __attribute__ ((__unused__)); - const char *s __attribute__ ((__unused__)); - { - } - /* Called to install the PRINT_ERROR_FUNCTION hook differently according to LEVEL. LEVEL is 1 during early parsing, when function ! prototypes aren't fully resolved. print_error_function is set so it ! doesn't print incomplete function prototypes. When LEVEL is 2, ! function prototypes are fully resolved and can be printed when reporting errors. */ void lang_init_source (level) int level; { ! if (level == 1) ! print_error_function = java_dummy_print; ! else ! print_error_function = lang_print_error; } static void --- 795,811 ---- } /* Called to install the PRINT_ERROR_FUNCTION hook differently according to LEVEL. LEVEL is 1 during early parsing, when function ! prototypes aren't fully resolved. java_print_error_function is set ! so it doesn't print incomplete function prototypes. When LEVEL is ! 2, function prototypes are fully resolved and can be printed when reporting errors. */ void lang_init_source (level) int level; { ! inhibit_error_function_printing = (level == 1); } static void *************** java_init_options () *** 784,799 **** flag_bounds_check = 1; flag_exceptions = 1; flag_non_call_exceptions = 1; } /* Post-switch processing. */ ! static void java_post_options () { ! /* Turn off RTL inliner unless -finline-functions was really specified. */ ! if (flag_really_inline == 0) { ! flag_no_inline = 1; ! flag_inline_functions = 0; } } --- 814,1159 ---- flag_bounds_check = 1; flag_exceptions = 1; flag_non_call_exceptions = 1; + + /* In Java floating point operations never trap. */ + flag_trapping_math = 0; + } + + static bool + java_can_use_bit_fields_p () + { + /* The bit-field optimizations cause problems when generating class + files. */ + return flag_emit_class_files ? false : true; } /* Post-switch processing. */ ! static bool java_post_options () { ! /* Use tree inlining if possible. Function instrumentation is only ! done in the RTL level, so we disable tree inlining. */ ! if (! flag_instrument_function_entry_exit) { ! if (!flag_no_inline) ! flag_no_inline = 1; ! if (flag_inline_functions) ! { ! flag_inline_trees = 2; ! flag_inline_functions = 0; ! } ! } ! ! /* Initialize the compiler back end. */ ! return false; ! } ! ! /* Return either DECL or its known constant value (if it has one). */ ! ! tree ! decl_constant_value (decl) ! tree decl; ! { ! if (/* Don't change a variable array bound or initial value to a constant ! in a place where a variable is invalid. */ ! current_function_decl != 0 ! && ! TREE_THIS_VOLATILE (decl) ! && TREE_READONLY (decl) ! && DECL_INITIAL (decl) != 0 ! && TREE_CODE (DECL_INITIAL (decl)) != ERROR_MARK ! /* This is invalid if initial value is not constant. ! If it has either a function call, a memory reference, ! or a variable, then re-evaluating it could give different results. */ ! && TREE_CONSTANT (DECL_INITIAL (decl)) ! /* Check for cases where this is sub-optimal, even though valid. */ ! && TREE_CODE (DECL_INITIAL (decl)) != CONSTRUCTOR) ! return DECL_INITIAL (decl); ! return decl; ! } ! ! /* Walk the language specific tree nodes during inlining. */ ! ! static tree ! java_tree_inlining_walk_subtrees (tp,subtrees,func,data,htab) ! tree *tp ATTRIBUTE_UNUSED; ! int *subtrees ATTRIBUTE_UNUSED; ! walk_tree_fn func ATTRIBUTE_UNUSED; ! void *data ATTRIBUTE_UNUSED; ! void *htab ATTRIBUTE_UNUSED; ! { ! enum tree_code code; ! tree result; ! ! #define WALK_SUBTREE(NODE) \ ! do \ ! { \ ! result = walk_tree (&(NODE), func, data, htab); \ ! if (result) \ ! return result; \ ! } \ ! while (0) ! ! tree t = *tp; ! if (!t) ! return NULL_TREE; ! ! code = TREE_CODE (t); ! switch (code) ! { ! case BLOCK: ! if (BLOCK_EXPR_BODY (t)) ! { ! tree *prev = &BLOCK_EXPR_BODY (*tp); ! while (*prev) ! { ! WALK_SUBTREE (*prev); ! prev = &TREE_CHAIN (*prev); ! } ! } ! return NULL_TREE; ! break; ! ! default: ! return NULL_TREE; ! } ! } ! ! /* Called from unsafe_for_reeval. */ ! static int ! java_unsafe_for_reeval (t) ! tree t; ! { ! switch (TREE_CODE (t)) ! { ! case BLOCK: ! /* Our expander tries to expand the variables twice. Boom. */ ! if (BLOCK_EXPR_DECLS (t) != NULL) ! return 2; ! return unsafe_for_reeval (BLOCK_EXPR_BODY (t)); ! ! default: ! break; ! } ! ! return -1; ! } ! ! /* Every call to a static constructor has an associated boolean ! variable which is in the outermost scope of the calling method. ! This variable is used to avoid multiple calls to the static ! constructor for each class. ! ! It looks somthing like this: ! ! foo () ! { ! boolean dummy = OtherClass.is_initialized; ! ! ... ! ! if (! dummy) ! OtherClass.initialize(); ! ! ... use OtherClass.data ... ! } ! ! Each of these boolean variables has an entry in the ! DECL_FUNCTION_INIT_TEST_TABLE of a method. When inlining a method ! we must merge the DECL_FUNCTION_INIT_TEST_TABLE from the function ! being linlined and create the boolean variables in the outermost ! scope of the method being inlined into. */ ! ! /* Create a mapping from a boolean variable in a method being inlined ! to one in the scope of the method being inlined into. */ ! ! static int ! merge_init_test_initialization (entry, x) ! void * * entry; ! void * x; ! { ! struct treetreehash_entry *ite = (struct treetreehash_entry *) *entry; ! splay_tree decl_map = (splay_tree)x; ! splay_tree_node n; ! tree *init_test_decl; ! ! /* See if we have remapped this declaration. If we haven't there's ! a bug in the inliner. */ ! n = splay_tree_lookup (decl_map, (splay_tree_key) ite->value); ! if (! n) ! abort (); ! ! /* Create a new entry for the class and its remapped boolean ! variable. If we already have a mapping for this class we've ! already initialized it, so don't overwrite the value. */ ! init_test_decl = java_treetreehash_new ! (DECL_FUNCTION_INIT_TEST_TABLE (current_function_decl), ite->key); ! if (!*init_test_decl) ! *init_test_decl = (tree)n->value; ! ! return true; ! } ! ! /* Merge the DECL_FUNCTION_INIT_TEST_TABLE from the function we're ! inlining. */ ! ! void ! java_inlining_merge_static_initializers (fn, decl_map) ! tree fn; ! void *decl_map; ! { ! htab_traverse ! (DECL_FUNCTION_INIT_TEST_TABLE (fn), ! merge_init_test_initialization, decl_map); ! } ! ! /* Lookup a DECL_FUNCTION_INIT_TEST_TABLE entry in the method we're ! inlining into. If we already have a corresponding entry in that ! class we don't need to create another one, so we create a mapping ! from the variable in the inlined class to the corresponding ! pre-existing one. */ ! ! static int ! inline_init_test_initialization (entry, x) ! void * * entry; ! void * x; ! { ! struct treetreehash_entry *ite = (struct treetreehash_entry *) *entry; ! splay_tree decl_map = (splay_tree)x; ! ! tree h = java_treetreehash_find ! (DECL_FUNCTION_INIT_TEST_TABLE (current_function_decl), ite->key); ! if (! h) ! return true; ! ! splay_tree_insert (decl_map, ! (splay_tree_key) ite->value, ! (splay_tree_value) h); ! ! return true; ! } ! ! /* Look up the boolean variables in the DECL_FUNCTION_INIT_TEST_TABLE ! of a method being inlined. For each hone, if we already have a ! variable associated with the same class in the method being inlined ! into, create a new mapping for it. */ ! ! void ! java_inlining_map_static_initializers (fn, decl_map) ! tree fn; ! void *decl_map; ! { ! htab_traverse ! (DECL_FUNCTION_INIT_TEST_TABLE (fn), ! inline_init_test_initialization, decl_map); ! } ! ! /* Avoid voluminous output for deep recursion of compound exprs. */ ! ! static void ! dump_compound_expr (di, t) ! dump_info_p di; ! tree t; ! { ! int i; ! ! for (i=0; i<2; i++) ! { ! switch (TREE_CODE (TREE_OPERAND (t, i))) ! { ! case COMPOUND_EXPR: ! dump_compound_expr (di, TREE_OPERAND (t, i)); ! break; ! ! case EXPR_WITH_FILE_LOCATION: ! { ! tree wfl_node = EXPR_WFL_NODE (TREE_OPERAND (t, i)); ! dump_child ("expr", wfl_node); ! break; ! } ! ! default: ! dump_child ("expr", TREE_OPERAND (t, i)); ! } ! } ! } ! ! static int ! java_dump_tree (dump_info, t) ! void *dump_info; ! tree t; ! { ! enum tree_code code; ! dump_info_p di = (dump_info_p) dump_info; ! ! /* Figure out what kind of node this is. */ ! code = TREE_CODE (t); ! ! switch (code) ! { ! case FUNCTION_DECL: ! dump_child ("args", DECL_ARGUMENTS (t)); ! if (DECL_EXTERNAL (t)) ! dump_string (di, "undefined"); ! if (TREE_PUBLIC (t)) ! dump_string (di, "extern"); ! else ! dump_string (di, "static"); ! if (DECL_LANG_SPECIFIC (t)) ! dump_child ("body", DECL_FUNCTION_BODY (t)); ! if (DECL_LANG_SPECIFIC (t) && !dump_flag (di, TDF_SLIM, t)) ! dump_child ("inline body", DECL_SAVED_TREE (t)); ! return 1; ! ! case RETURN_EXPR: ! dump_child ("expr", TREE_OPERAND (t, 0)); ! return 1; ! ! case GOTO_EXPR: ! dump_child ("goto", TREE_OPERAND (t, 0)); ! return 1; ! ! case LABEL_EXPR: ! dump_child ("label", TREE_OPERAND (t, 0)); ! return 1; ! ! case LABELED_BLOCK_EXPR: ! dump_child ("label", TREE_OPERAND (t, 0)); ! dump_child ("block", TREE_OPERAND (t, 1)); ! return 1; ! ! case EXIT_BLOCK_EXPR: ! dump_child ("block", TREE_OPERAND (t, 0)); ! dump_child ("val", TREE_OPERAND (t, 1)); ! return 1; ! ! case BLOCK: ! if (BLOCK_EXPR_BODY (t)) ! { ! tree local = BLOCK_VARS (t); ! while (local) ! { ! tree next = TREE_CHAIN (local); ! dump_child ("var", local); ! local = next; ! } ! ! { ! tree block = BLOCK_EXPR_BODY (t); ! dump_child ("body", block); ! block = TREE_CHAIN (block); ! } ! } ! return 1; ! ! case COMPOUND_EXPR: ! if (!dump_flag (di, TDF_SLIM, t)) ! return 0; ! dump_compound_expr (di, t); ! return 1; ! ! default: ! break; } + return 0; } + #include "gt-java-lang.h" diff -Nrc3pad gcc-3.2.3/gcc/java/lex.c gcc-3.3/gcc/java/lex.c *** gcc-3.2.3/gcc/java/lex.c 2002-03-29 19:31:09.000000000 +0000 --- gcc-3.3/gcc/java/lex.c 2003-01-28 18:48:16.000000000 +0000 *************** java_init_lex (finput, encoding) *** 91,100 **** if (!java_lang_id) java_lang_id = get_identifier ("java.lang"); - if (!java_lang_cloneable) - java_lang_cloneable = get_identifier ("java.lang.Cloneable"); - if (!java_io_serializable) - java_io_serializable = get_identifier ("java.io.Serializable"); if (!inst_id) inst_id = get_identifier ("inst$"); if (!wpv_id) --- 91,96 ---- *************** java_init_lex (finput, encoding) *** 128,135 **** CPC_INITIALIZER_LIST (ctxp) = CPC_STATIC_INITIALIZER_LIST (ctxp) = CPC_INSTANCE_INITIALIZER_LIST (ctxp) = NULL_TREE; ! memset ((PTR) ctxp->modifier_ctx, 0, 11*sizeof (ctxp->modifier_ctx[0])); ! memset ((PTR) current_jcf, 0, sizeof (JCF)); ctxp->current_parsed_class = NULL; ctxp->package = NULL_TREE; #endif --- 124,131 ---- CPC_INITIALIZER_LIST (ctxp) = CPC_STATIC_INITIALIZER_LIST (ctxp) = CPC_INSTANCE_INITIALIZER_LIST (ctxp) = NULL_TREE; ! memset (ctxp->modifier_ctx, 0, sizeof (ctxp->modifier_ctx)); ! memset (current_jcf, 0, sizeof (JCF)); ctxp->current_parsed_class = NULL; ctxp->package = NULL_TREE; #endif *************** java_allocate_new_line () *** 196,207 **** if (!ctxp->c_line) { ! ctxp->c_line = (struct java_line *)xmalloc (sizeof (struct java_line)); ctxp->c_line->max = JAVA_LINE_MAX; ! ctxp->c_line->line = (unicode_t *)xmalloc ! (sizeof (unicode_t)*ctxp->c_line->max); ctxp->c_line->unicode_escape_p = ! (char *)xmalloc (sizeof (char)*ctxp->c_line->max); ctxp->c_line->white_space_only = 0; } --- 192,202 ---- if (!ctxp->c_line) { ! ctxp->c_line = xmalloc (sizeof (struct java_line)); ctxp->c_line->max = JAVA_LINE_MAX; ! ctxp->c_line->line = xmalloc (sizeof (unicode_t)*ctxp->c_line->max); ctxp->c_line->unicode_escape_p = ! xmalloc (sizeof (char)*ctxp->c_line->max); ctxp->c_line->white_space_only = 0; } *************** java_new_lexer (finput, encoding) *** 226,232 **** FILE *finput; const char *encoding; { ! java_lexer *lex = (java_lexer *) xmalloc (sizeof (java_lexer)); int enc_error = 0; lex->finput = finput; --- 221,227 ---- FILE *finput; const char *encoding; { ! java_lexer *lex = xmalloc (sizeof (java_lexer)); int enc_error = 0; lex->finput = finput; *************** java_read_char (lex) *** 494,501 **** + (c2 & 0x3f)); /* Check for valid 3-byte characters. Don't allow surrogate, \ufffe or \uffff. */ ! if (r >= 0x800 && r <= 0xffff ! && ! (r >= 0xd800 && r <= 0xdfff) && r != 0xfffe && r != 0xffff) return r; } --- 489,496 ---- + (c2 & 0x3f)); /* Check for valid 3-byte characters. Don't allow surrogate, \ufffe or \uffff. */ ! if (IN_RANGE (r, 0x800, 0xffff) ! && ! IN_RANGE (r, 0xd800, 0xdfff) && r != 0xfffe && r != 0xffff) return r; } *************** java_store_unicode (l, c, unicode_escape *** 522,530 **** if (l->size == l->max) { l->max += JAVA_LINE_MAX; ! l->line = (unicode_t *) xrealloc (l->line, sizeof (unicode_t)*l->max); ! l->unicode_escape_p = (char *) xrealloc (l->unicode_escape_p, ! sizeof (char)*l->max); } l->line [l->size] = c; l->unicode_escape_p [l->size++] = unicode_escape_p; --- 517,525 ---- if (l->size == l->max) { l->max += JAVA_LINE_MAX; ! l->line = xrealloc (l->line, sizeof (unicode_t)*l->max); ! l->unicode_escape_p = xrealloc (l->unicode_escape_p, ! sizeof (char)*l->max); } l->line [l->size] = c; l->unicode_escape_p [l->size++] = unicode_escape_p; *************** java_read_unicode (lex, unicode_escape_p *** 560,582 **** while ((c = java_read_char (lex)) == 'u') ; ! /* Unget the most recent character as it is not a `u'. */ ! if (c == UEOF) ! return UEOF; ! lex->unget_value = c; ! ! /* Next should be 4 hex digits, otherwise it's an error. ! The hex value is converted into the unicode, pushed into ! the Unicode stream. */ ! for (shift = 12; shift >= 0; shift -= 4) { ! if ((c = java_read_char (lex)) == UEOF) ! return UEOF; if (hex_p (c)) unicode |= (unicode_t)(hex_value (c) << shift); else ! java_lex_error ("Non hex digit in Unicode escape sequence", 0); } lex->bs_count = 0; *unicode_escape_p = 1; return unicode; --- 555,585 ---- while ((c = java_read_char (lex)) == 'u') ; ! shift = 12; ! do { ! if (c == UEOF) ! { ! java_lex_error ("prematurely terminated \\u sequence", 0); ! return UEOF; ! } ! if (hex_p (c)) unicode |= (unicode_t)(hex_value (c) << shift); else ! { ! java_lex_error ("non-hex digit in \\u sequence", 0); ! break; ! } ! ! c = java_read_char (lex); ! shift -= 4; } + while (shift >= 0); + + if (c != UEOF) + lex->unget_value = c; + lex->bs_count = 0; *unicode_escape_p = 1; return unicode; *************** java_read_unicode_collapsing_terminators *** 599,605 **** return a single line terminator. */ int dummy; c = java_read_unicode (lex, &dummy); ! if (c != '\n') lex->unget_value = c; /* In either case we must return a newline. */ c = '\n'; --- 602,608 ---- return a single line terminator. */ int dummy; c = java_read_unicode (lex, &dummy); ! if (c != '\n' && c != UEOF) lex->unget_value = c; /* In either case we must return a newline. */ c = '\n'; *************** java_parse_escape_sequence () *** 833,874 **** } } - /* Isolate the code which may raise an arithmetic exception in its - own function. */ - #ifndef JC1_LITE ! struct jpa_args ! { ! YYSTYPE *java_lval; ! char *literal_token; ! int fflag; ! int number_beginning; ! }; ! #ifdef REAL_ARITHMETIC ! #define IS_ZERO(X) (ereal_cmp (X, dconst0) == 0) ! #else ! #define IS_ZERO(X) ((X) == 0) ! #endif ! static void java_perform_atof PARAMS ((PTR)); static void ! java_perform_atof (av) ! PTR av; { - struct jpa_args *a = (struct jpa_args *)av; - YYSTYPE *java_lval = a->java_lval; - int number_beginning = a->number_beginning; REAL_VALUE_TYPE value; ! tree type = (a->fflag ? FLOAT_TYPE_NODE : DOUBLE_TYPE_NODE); SET_REAL_VALUE_ATOF (value, ! REAL_VALUE_ATOF (a->literal_token, TYPE_MODE (type))); if (REAL_VALUE_ISINF (value) || REAL_VALUE_ISNAN (value)) { ! JAVA_FLOAT_RANGE_ERROR ((a->fflag ? "float" : "double")); value = DCONST0; } else if (IS_ZERO (value)) --- 836,868 ---- } } #ifndef JC1_LITE ! #define IS_ZERO(X) REAL_VALUES_EQUAL (X, dconst0) ! /* Subroutine of java_lex: converts floating-point literals to tree ! nodes. LITERAL_TOKEN is the input literal, JAVA_LVAL is where to ! store the result. FFLAG indicates whether the literal was tagged ! with an 'f', indicating it is of type 'float'; NUMBER_BEGINNING ! is the line number on which to report any error. */ ! static void java_perform_atof PARAMS ((YYSTYPE *, char *, int, int)); static void ! java_perform_atof (java_lval, literal_token, fflag, number_beginning) ! YYSTYPE *java_lval; ! char *literal_token; ! int fflag; ! int number_beginning; { REAL_VALUE_TYPE value; ! tree type = (fflag ? FLOAT_TYPE_NODE : DOUBLE_TYPE_NODE); SET_REAL_VALUE_ATOF (value, ! REAL_VALUE_ATOF (literal_token, TYPE_MODE (type))); if (REAL_VALUE_ISINF (value) || REAL_VALUE_ISNAN (value)) { ! JAVA_FLOAT_RANGE_ERROR (fflag ? "float" : "double"); value = DCONST0; } else if (IS_ZERO (value)) *************** java_perform_atof (av) *** 876,882 **** /* We check to see if the value is really 0 or if we've found an underflow. We do this in the most primitive imaginable way. */ int really_zero = 1; ! char *p = a->literal_token; if (*p == '-') ++p; while (*p && *p != 'e' && *p != 'E') --- 870,876 ---- /* We check to see if the value is really 0 or if we've found an underflow. We do this in the most primitive imaginable way. */ int really_zero = 1; ! char *p = literal_token; if (*p == '-') ++p; while (*p && *p != 'e' && *p != 'E') *************** java_lex (java_lval) *** 1032,1040 **** } else if (JAVA_ASCII_DIGIT (c)) radix = 8; ! else if (c == '.') { ! /* Push the '.' back and prepare for a FP parsing... */ java_unget_unicode (); c = '0'; } --- 1026,1035 ---- } else if (JAVA_ASCII_DIGIT (c)) radix = 8; ! else if (c == '.' || c == 'e' || c =='E') { ! /* Push the '.', 'e', or 'E' back and prepare for a FP ! parsing... */ java_unget_unicode (); c = '0'; } *************** java_lex (java_lval) *** 1170,1178 **** } else { - #ifndef JC1_LITE - struct jpa_args a; - #endif if (stage != 4) /* Don't push back fF/dD. */ java_unget_unicode (); --- 1165,1170 ---- *************** java_lex (java_lval) *** 1185,1201 **** JAVA_LEX_LIT (literal_token, radix); #ifndef JC1_LITE ! a.literal_token = literal_token; ! a.fflag = fflag; ! a.java_lval = java_lval; ! a.number_beginning = number_beginning; ! if (do_float_handler (java_perform_atof, (PTR) &a)) ! return FP_LIT_TK; ! ! JAVA_FLOAT_RANGE_ERROR ((fflag ? "float" : "double")); ! #else ! return FP_LIT_TK; #endif } } } /* JAVA_ASCII_FPCHAR (c) */ --- 1177,1186 ---- JAVA_LEX_LIT (literal_token, radix); #ifndef JC1_LITE ! java_perform_atof (java_lval, literal_token, ! fflag, number_beginning); #endif + return FP_LIT_TK; } } } /* JAVA_ASCII_FPCHAR (c) */ *************** java_lex (java_lval) *** 1236,1269 **** } /* End borrowed section. */ /* Range checking. */ ! if (long_suffix) { ! /* 9223372036854775808L is valid if operand of a '-'. Otherwise ! 9223372036854775807L is the biggest `long' literal that can be ! expressed using a 10 radix. For other radices, everything that ! fits withing 64 bits is OK. */ ! int hb = (high >> 31); ! if (overflow || (hb && low && radix == 10) ! || (hb && high & 0x7fffffff && radix == 10)) JAVA_INTEGRAL_RANGE_ERROR ("Numeric overflow for `long' literal"); ! } ! else ! { ! /* 2147483648 is valid if operand of a '-'. Otherwise, ! 2147483647 is the biggest `int' literal that can be ! expressed using a 10 radix. For other radices, everything ! that fits within 32 bits is OK. As all literals are ! signed, we sign extend here. */ ! int hb = (low >> 31) & 0x1; ! if (overflow || high || (hb && low & 0x7fffffff && radix == 10)) JAVA_INTEGRAL_RANGE_ERROR ("Numeric overflow for `int' literal"); - high = -hb; } ! #ifndef JC1_LITE ! value = build_int_2 (low, high); JAVA_RADIX10_FLAG (value) = radix == 10; - SET_LVAL_NODE_TYPE (value, long_suffix ? long_type_node : int_type_node); #else SET_LVAL_NODE_TYPE (build_int_2 (low, high), long_suffix ? long_type_node : int_type_node); --- 1221,1255 ---- } /* End borrowed section. */ + #ifndef JC1_LITE /* Range checking. */ ! value = build_int_2 (low, high); ! /* Temporarily set type to unsigned. */ ! SET_LVAL_NODE_TYPE (value, (long_suffix ! ? unsigned_long_type_node ! : unsigned_int_type_node)); ! ! /* For base 10 numbers, only values up to the highest value ! (plus one) can be written. For instance, only ints up to ! 2147483648 can be written. The special case of the largest ! negative value is handled elsewhere. For other bases, any ! number can be represented. */ ! if (overflow || (radix == 10 ! && tree_int_cst_lt (long_suffix ! ? decimal_long_max ! : decimal_int_max, ! value))) { ! if (long_suffix) JAVA_INTEGRAL_RANGE_ERROR ("Numeric overflow for `long' literal"); ! else JAVA_INTEGRAL_RANGE_ERROR ("Numeric overflow for `int' literal"); } ! ! /* Sign extend the value. */ ! SET_LVAL_NODE_TYPE (value, (long_suffix ? long_type_node : int_type_node)); ! force_fit_type (value, 0); JAVA_RADIX10_FLAG (value) = radix == 10; #else SET_LVAL_NODE_TYPE (build_int_2 (low, high), long_suffix ? long_type_node : int_type_node); *************** java_lex (java_lval) *** 1558,1564 **** /* Keyword, boolean literal or null literal. */ for (first_unicode = c, all_ascii = 1, ascii_index = 0; ! JAVA_PART_CHAR_P (c); c = java_get_unicode ()) { java_unicode_2_utf8 (c); if (all_ascii && c >= 128) --- 1544,1550 ---- /* Keyword, boolean literal or null literal. */ for (first_unicode = c, all_ascii = 1, ascii_index = 0; ! c != UEOF && JAVA_PART_CHAR_P (c); c = java_get_unicode ()) { java_unicode_2_utf8 (c); if (all_ascii && c >= 128) *************** java_lex (java_lval) *** 1568,1574 **** obstack_1grow (&temporary_obstack, '\0'); string = obstack_finish (&temporary_obstack); ! java_unget_unicode (); /* If we have something all ascii, we consider a keyword, a boolean literal, a null literal or an all ASCII identifier. Otherwise, --- 1554,1561 ---- obstack_1grow (&temporary_obstack, '\0'); string = obstack_finish (&temporary_obstack); ! if (c != UEOF) ! java_unget_unicode (); /* If we have something all ascii, we consider a keyword, a boolean literal, a null literal or an all ASCII identifier. Otherwise, *************** java_lex (java_lval) *** 1622,1627 **** --- 1609,1623 ---- SET_LVAL_NODE (null_pointer_node); return NULL_TK; + case ASSERT_TK: + if (flag_assert) + { + BUILD_OPERATOR (kw->token); + return kw->token; + } + else + break; + /* Some keyword we want to retain information on the location they where found. */ case CASE_TK: *************** static void *** 1670,1693 **** error_if_numeric_overflow (value) tree value; { ! if (TREE_CODE (value) == INTEGER_CST && JAVA_RADIX10_FLAG (value)) { - unsigned HOST_WIDE_INT lo, hi; - - lo = TREE_INT_CST_LOW (value); - hi = TREE_INT_CST_HIGH (value); if (TREE_TYPE (value) == long_type_node) ! { ! int hb = (hi >> 31); ! if (hb && !(hi & 0x7fffffff)) ! java_lex_error ("Numeric overflow for `long' literal", 0); ! } else ! { ! int hb = (lo >> 31) & 0x1; ! if (hb && !(lo & 0x7fffffff)) ! java_lex_error ("Numeric overflow for `int' literal", 0); ! } } } #endif /* JC1_LITE */ --- 1666,1679 ---- error_if_numeric_overflow (value) tree value; { ! if (TREE_CODE (value) == INTEGER_CST ! && JAVA_RADIX10_FLAG (value) ! && tree_int_cst_sgn (value) < 0) { if (TREE_TYPE (value) == long_type_node) ! java_lex_error ("Numeric overflow for `long' literal", 0); else ! java_lex_error ("Numeric overflow for `int' literal", 0); } } #endif /* JC1_LITE */ diff -Nrc3pad gcc-3.2.3/gcc/java/lex.h gcc-3.3/gcc/java/lex.h *** gcc-3.2.3/gcc/java/lex.h 2001-10-21 21:32:11.000000000 +0000 --- gcc-3.3/gcc/java/lex.h 2002-11-06 00:01:01.000000000 +0000 *************** *** 1,5 **** /* Language lexer definitions for the GNU compiler for the Java(TM) language. ! Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com) This file is part of GNU CC. --- 1,5 ---- /* Language lexer definitions for the GNU compiler for the Java(TM) language. ! Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com) This file is part of GNU CC. *************** extern void java_destroy_lexer PARAMS (( *** 185,191 **** #define SET_LVAL_NODE_TYPE(NODE, TYPE) #define BUILD_ID_WFL(EXP) (EXP) #define JAVA_FLOAT_RANGE_ERROR(S) {} ! #define JAVA_INTEGRAL_RANGE_ERROR(S) {} #else --- 185,191 ---- #define SET_LVAL_NODE_TYPE(NODE, TYPE) #define BUILD_ID_WFL(EXP) (EXP) #define JAVA_FLOAT_RANGE_ERROR(S) {} ! #define JAVA_INTEGRAL_RANGE_ERROR(S) do { } while (0) #else *************** extern void java_destroy_lexer PARAMS (( *** 237,248 **** ctxp->c_line->current = i; \ } #define JAVA_INTEGRAL_RANGE_ERROR(m) \ ! { \ int i = ctxp->c_line->current; \ ctxp->c_line->current = number_beginning; \ java_lex_error (m, 0); \ ctxp->c_line->current = i; \ ! } #endif /* Definitions for jc1 compilation only */ --- 237,248 ---- ctxp->c_line->current = i; \ } #define JAVA_INTEGRAL_RANGE_ERROR(m) \ ! do { \ int i = ctxp->c_line->current; \ ctxp->c_line->current = number_beginning; \ java_lex_error (m, 0); \ ctxp->c_line->current = i; \ ! } while (0) #endif /* Definitions for jc1 compilation only */ diff -Nrc3pad gcc-3.2.3/gcc/java/Make-lang.in gcc-3.3/gcc/java/Make-lang.in *** gcc-3.2.3/gcc/java/Make-lang.in 2003-01-28 21:52:53.000000000 +0000 --- gcc-3.3/gcc/java/Make-lang.in 2003-04-10 14:54:08.000000000 +0000 *************** *** 43,48 **** --- 43,49 ---- # Actual names to use when installing a native compiler. JAVA_INSTALL_NAME = `echo gcj|sed '$(program_transform_name)'` + JAVA_TARGET_INSTALL_NAME = $(target_alias)-`echo gcj|sed '$(program_transform_name)'` # Actual names to use when installing a cross-compiler. JAVA_CROSS_NAME = `echo gcj|sed '$(program_transform_cross_name)'` *************** $(srcdir)/java/keyword.h: $(srcdir)/java *** 97,117 **** exit 1; } ; \ mv -f k$$$$.h keyword.h) # Executables built by this Makefile: JAVA_OBJS = java/parse.o java/class.o java/decl.o java/expr.o \ java/constants.o java/lang.o java/typeck.o java/except.o java/verify.o \ ! java/zextract.o java/jcf-io.o java/jcf-parse.o java/mangle.o \ ! java/mangle_name.o java/builtins.o \ java/jcf-write.o java/buffer.o java/check-init.o java/jcf-depend.o \ ! java/jcf-path.o java/xref.o java/boehm.o mkdeps.o ! GCJH_OBJS = java/gjavah.o java/jcf-io.o java/jcf-depend.o java/jcf-path.o \ ! java/zextract.o version.o mkdeps.o errors.o JVSCAN_OBJS = java/parse-scan.o java/jv-scan.o version.o ! JCFDUMP_OBJS = java/jcf-dump.o java/jcf-io.o java/jcf-depend.o java/jcf-path.o \ ! java/zextract.o errors.o version.o mkdeps.o JVGENMAIN_OBJS = java/jvgenmain.o java/mangle_name.o errors.o --- 98,123 ---- exit 1; } ; \ mv -f k$$$$.h keyword.h) + gt-java-class.h gt-java-constants.h gt-java-decl.h : s-gtype ; @true + gt-java-expr.h gt-java-jcf-parse.h gt-java-jcf-write.h : s-gtype ; @true + gt-java-lang.h gt-java-mangle.h gt-java-parse.h : s-gtype ; @true + gt-java-builtins.h gtype-java.h : s-gtype ; @true + # Executables built by this Makefile: JAVA_OBJS = java/parse.o java/class.o java/decl.o java/expr.o \ java/constants.o java/lang.o java/typeck.o java/except.o java/verify.o \ ! java/zextract.o java/jcf-io.o java/win32-host.o java/jcf-parse.o \ ! java/mangle.o java/mangle_name.o java/builtins.o \ java/jcf-write.o java/buffer.o java/check-init.o java/jcf-depend.o \ ! java/jcf-path.o java/xref.o java/boehm.o java/java-tree-inline.o mkdeps.o ! GCJH_OBJS = java/gjavah.o java/jcf-io.o java/win32-host.o java/jcf-depend.o \ ! java/jcf-path.o java/zextract.o version.o mkdeps.o errors.o JVSCAN_OBJS = java/parse-scan.o java/jv-scan.o version.o ! JCFDUMP_OBJS = java/jcf-dump.o java/jcf-io.o java/win32-host.o java/jcf-depend.o \ ! java/jcf-path.o java/zextract.o errors.o version.o mkdeps.o JVGENMAIN_OBJS = java/jvgenmain.o java/mangle_name.o errors.o *************** jv-scan$(exeext): $(JVSCAN_OBJS) $(LIBDE *** 133,139 **** jcf-dump$(exeext): $(JCFDUMP_OBJS) $(LIBDEPS) rm -f $@ ! $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JCFDUMP_OBJS) $(ZLIB) $(LIBS) jvgenmain$(exeext): $(JVGENMAIN_OBJS) $(LIBDEPS) rm -f $@ --- 139,146 ---- jcf-dump$(exeext): $(JCFDUMP_OBJS) $(LIBDEPS) rm -f $@ ! $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JCFDUMP_OBJS) \ ! $(ZLIB) $(LDEXP_LIB) $(LIBS) jvgenmain$(exeext): $(JVGENMAIN_OBJS) $(LIBDEPS) rm -f $@ *************** java.install-common: installdirs *** 171,176 **** --- 178,186 ---- rm -f $(DESTDIR)$(bindir)/$(JAVA_INSTALL_NAME)$(exeext); \ $(INSTALL_PROGRAM) $(GCJ)$(exeext) $(DESTDIR)$(bindir)/$(JAVA_INSTALL_NAME)$(exeext); \ chmod a+x $(DESTDIR)$(bindir)/$(JAVA_INSTALL_NAME)$(exeext); \ + rm -f $(DESTDIR)$(bindir)/$(JAVA_TARGET_INSTALL_NAME)$(exeext); \ + ( cd $(DESTDIR)$(bindir) && \ + $(LN) $(JAVA_INSTALL_NAME)$(exeext) $(JAVA_TARGET_INSTALL_NAME)$(exeext) ); \ fi ; \ fi ; \ for tool in $(JAVA_TARGET_INDEPENDENT_BIN_TOOLS); do \ *************** java.install-info: installdirs *** 219,224 **** --- 229,235 ---- java.mostlyclean: -rm -f java/*$(objext) $(DEMANGLER_PROG) + -rm -f java/*$(coverageexts) -rm -f jc1$(exeext) $(GCJ)$(exeext) jvgenmain$(exeext) gcjh$(exeext) jv-scan$(exeext) jcf-dump$(exeext) s-java java.clean: java.distclean: *************** java.stage4: stage4-start *** 248,258 **** # # .o:.h dependencies. ! JAVA_TREE_H = $(TREE_H) java/java-tree.h java/java-tree.def JAVA_LEX_C = java/lex.c java/keyword.h java/chartables.h java/parse.o: java/parse.c java/jcf-reader.c $(CONFIG_H) $(SYSTEM_H) \ ! function.h $(JAVA_TREE_H) $(JAVA_LEX_C) java/parse.h java/lex.h $(GGC_H) java/jcf-dump.o: $(CONFIG_H) $(SYSTEM_H) $(JAVA_TREE_H) java/jcf-dump.c \ java/jcf-reader.c java/jcf.h java/javaop.h java/javaop.def version.h java/gjavah.o: $(CONFIG_H) $(SYSTEM_H) $(JAVA_TREE_H) java/gjavah.c \ --- 259,270 ---- # # .o:.h dependencies. ! JAVA_TREE_H = $(TREE_H) $(HASHTAB_H) java/java-tree.h java/java-tree.def JAVA_LEX_C = java/lex.c java/keyword.h java/chartables.h java/parse.o: java/parse.c java/jcf-reader.c $(CONFIG_H) $(SYSTEM_H) \ ! function.h $(JAVA_TREE_H) $(JAVA_LEX_C) java/parse.h java/lex.h $(GGC_H) \ ! debug.h gt-java-parse.h gtype-java.h java/jcf-dump.o: $(CONFIG_H) $(SYSTEM_H) $(JAVA_TREE_H) java/jcf-dump.c \ java/jcf-reader.c java/jcf.h java/javaop.h java/javaop.def version.h java/gjavah.o: $(CONFIG_H) $(SYSTEM_H) $(JAVA_TREE_H) java/gjavah.c \ *************** java/boehm.o: java/boehm.c $(CONFIG_H) $ *** 261,303 **** java/parse.h toplev.h java/buffer.o: java/buffer.c $(CONFIG_H) java/buffer.h $(SYSTEM_H) toplev.h java/builtins.o: java/builtins.c $(CONFIG_H) $(SYSTEM_H) $(JAVA_TREE_H) \ ! $(GGC_H) flags.h java/check-init.o: java/check-init.c $(CONFIG_H) \ $(JAVA_TREE_H) $(SYSTEM_H) toplev.h java/class.o: java/class.c $(CONFIG_H) $(JAVA_TREE_H) $(RTL_H) java/jcf.h \ ! java/parse.h toplev.h $(SYSTEM_H) output.h $(GGC_H) $(TARGET_H) function.h java/constants.o: java/constants.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h \ ! toplev.h $(SYSTEM_H) $(GGC_H) java/decl.o: java/decl.c $(CONFIG_H) $(JAVA_TREE_H) $(RTL_H) java/jcf.h \ toplev.h flags.h $(SYSTEM_H) function.h expr.h libfuncs.h except.h \ ! java/java-except.h $(GGC_H) java/except.o: java/except.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h real.h \ $(RTL_H) java/javaop.h java/java-opcodes.h except.h java/java-except.h \ toplev.h $(SYSTEM_H) function.h java/expr.o: java/expr.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h real.h \ $(RTL_H) $(EXPR_H) java/javaop.h java/java-opcodes.h except.h \ java/java-except.h java/java-except.h java/parse.h toplev.h \ ! $(SYSTEM_H) $(GGC_H) java/jcf-depend.o: java/jcf-depend.c $(CONFIG_H) $(SYSTEM_H) java/jcf.h java/jcf-parse.o: java/jcf-parse.c $(CONFIG_H) $(JAVA_TREE_H) flags.h \ input.h java/java-except.h $(SYSTEM_H) toplev.h java/parse.h $(GGC_H) \ ! debug.h java/jcf-write.o: java/jcf-write.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h \ $(RTL_H) java/java-opcodes.h java/parse.h java/buffer.h $(SYSTEM_H) \ ! toplev.h $(GGC_H) java/jv-scan.o: java/jv-scan.c $(CONFIG_H) $(SYSTEM_H) version.h java/jvgenmain.o: java/jvgenmain.c $(CONFIG_H) $(JAVA_TREE_H) $(SYSTEM_H) java/lang.o: java/lang.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h input.h \ toplev.h $(SYSTEM_H) $(RTL_H) $(EXPR_H) diagnostic.h langhooks.h \ ! langhooks-def.h java/mangle.o: java/mangle.c $(CONFIG_H) java/jcf.h $(JAVA_TREE_H) $(SYSTEM_H) \ ! toplev.h $(GGC_H) java/mangle_name.o: java/mangle_name.c $(CONFIG_H) java/jcf.h $(JAVA_TREE_H) \ $(SYSTEM_H) toplev.h $(GGC_H) java/parse-scan.o: $(CONFIG_H) $(SYSTEM_H) toplev.h $(JAVA_LEX_C) java/parse.h \ java/lex.h java/typeck.o: java/typeck.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h \ ! java/convert.h toplev.h $(SYSTEM_H) $(GGC_H) java/verify.o: java/verify.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h \ java/javaop.h java/java-opcodes.h java/java-except.h toplev.h $(SYSTEM_H) java/xref.o: java/xref.c java/xref.h $(CONFIG_H) $(JAVA_TREE_H) toplev.h \ --- 273,324 ---- java/parse.h toplev.h java/buffer.o: java/buffer.c $(CONFIG_H) java/buffer.h $(SYSTEM_H) toplev.h java/builtins.o: java/builtins.c $(CONFIG_H) $(SYSTEM_H) $(JAVA_TREE_H) \ ! $(GGC_H) flags.h builtin-types.def langhooks.h gt-java-builtins.h java/check-init.o: java/check-init.c $(CONFIG_H) \ $(JAVA_TREE_H) $(SYSTEM_H) toplev.h java/class.o: java/class.c $(CONFIG_H) $(JAVA_TREE_H) $(RTL_H) java/jcf.h \ ! java/parse.h toplev.h $(SYSTEM_H) output.h $(GGC_H) $(TARGET_H) function.h \ ! gt-java-class.h java/constants.o: java/constants.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h \ ! toplev.h $(SYSTEM_H) $(GGC_H) gt-java-constants.h java/decl.o: java/decl.c $(CONFIG_H) $(JAVA_TREE_H) $(RTL_H) java/jcf.h \ toplev.h flags.h $(SYSTEM_H) function.h expr.h libfuncs.h except.h \ ! java/java-except.h $(GGC_H) real.h gt-java-decl.h java/except.o: java/except.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h real.h \ $(RTL_H) java/javaop.h java/java-opcodes.h except.h java/java-except.h \ toplev.h $(SYSTEM_H) function.h java/expr.o: java/expr.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h real.h \ $(RTL_H) $(EXPR_H) java/javaop.h java/java-opcodes.h except.h \ java/java-except.h java/java-except.h java/parse.h toplev.h \ ! $(SYSTEM_H) $(GGC_H) gt-java-expr.h ! java/java-tree-inline.o: tree-inline.c $(CONFIG_H) $(SYSTEM_H) \ ! $(TREE_H) $(RTL_H) expr.h flags.h params.h input.h insn-config.h \ ! $(INTEGRATE_H) $(VARRAY_H) $(HASHTAB_H) $(SPLAY_TREE_H) toplev.h \ ! langhooks.h $(C_COMMON_H) $(srcdir)/tree-inline.h ! $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ ! -DINLINER_FOR_JAVA=1 \ ! $(srcdir)/tree-inline.c -o $@ java/jcf-depend.o: java/jcf-depend.c $(CONFIG_H) $(SYSTEM_H) java/jcf.h java/jcf-parse.o: java/jcf-parse.c $(CONFIG_H) $(JAVA_TREE_H) flags.h \ input.h java/java-except.h $(SYSTEM_H) toplev.h java/parse.h $(GGC_H) \ ! debug.h real.h gt-java-jcf-parse.h ! java/win32-host.o: java/win32-host.c $(CONFIG_H) $(SYSTEM_H) java/jcf.h java/jcf-write.o: java/jcf-write.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h \ $(RTL_H) java/java-opcodes.h java/parse.h java/buffer.h $(SYSTEM_H) \ ! toplev.h $(GGC_H) gt-java-jcf-write.h java/jv-scan.o: java/jv-scan.c $(CONFIG_H) $(SYSTEM_H) version.h java/jvgenmain.o: java/jvgenmain.c $(CONFIG_H) $(JAVA_TREE_H) $(SYSTEM_H) java/lang.o: java/lang.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h input.h \ toplev.h $(SYSTEM_H) $(RTL_H) $(EXPR_H) diagnostic.h langhooks.h \ ! $(LANGHOOKS_DEF_H) gt-java-lang.h java/mangle.o: java/mangle.c $(CONFIG_H) java/jcf.h $(JAVA_TREE_H) $(SYSTEM_H) \ ! toplev.h $(GGC_H) gt-java-mangle.h java/mangle_name.o: java/mangle_name.c $(CONFIG_H) java/jcf.h $(JAVA_TREE_H) \ $(SYSTEM_H) toplev.h $(GGC_H) java/parse-scan.o: $(CONFIG_H) $(SYSTEM_H) toplev.h $(JAVA_LEX_C) java/parse.h \ java/lex.h java/typeck.o: java/typeck.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h \ ! java/convert.h toplev.h $(SYSTEM_H) $(GGC_H) real.h java/verify.o: java/verify.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h \ java/javaop.h java/java-opcodes.h java/java-except.h toplev.h $(SYSTEM_H) java/xref.o: java/xref.c java/xref.h $(CONFIG_H) $(JAVA_TREE_H) toplev.h \ *************** java/jcf-io.o: java/jcf-io.c $(CONFIG_H) *** 312,389 **** # jcf-path.o needs a -D. java/jcf-path.o: java/jcf-path.c $(CONFIG_H) $(SYSTEM_H) java/jcf.h $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ ! -DLIBGCJ_ZIP_FILE='"$(prefix)/share/java/libgcj-$(version).jar"' \ -DDEFAULT_TARGET_VERSION=\"$(version)\" \ $(srcdir)/java/jcf-path.c $(OUTPUT_OPTION) # Documentation $(srcdir)/java/gcj.info: $(srcdir)/java/gcj.texi \ ! $(srcdir)/doc/include/fdl.texi $(srcdir)/doc/include/gpl.texi if test "x$(BUILD_INFO)" = xinfo; then \ rm -f $(srcdir)/java/gcc.info*; \ cd $(srcdir)/java && $(MAKEINFO) -I../doc/include -o gcj.info gcj.texi; \ else true; fi java/gcj.dvi: $(srcdir)/java/gcj.texi $(srcdir)/doc/include/fdl.texi \ ! $(srcdir)/doc/include/gpl.texi ! s=`cd $(srcdir); pwd`; export s; \ cd java && $(TEXI2DVI) -I $$s/doc/include $$s/java/gcj.texi $(srcdir)/java/gcj.1: $(srcdir)/java/gcj.texi -$(TEXI2POD) -D gcj < $(srcdir)/java/gcj.texi > java/gcj.pod ! ($(POD2MAN) --section=1 java/gcj.pod > java/gcj.1.T$$$$ && \ mv -f java/gcj.1.T$$$$ $(srcdir)/java/gcj.1) || \ (rm -f java/gcj.1.T$$$$ && exit 1) ! rm -f java/gcj.pod $(srcdir)/java/gcjh.1: $(srcdir)/java/gcj.texi -$(TEXI2POD) -D gcjh < $(srcdir)/java/gcj.texi > java/gcjh.pod ! ($(POD2MAN) --section=1 java/gcjh.pod > java/gcjh.1.T$$$$ && \ mv -f java/gcjh.1.T$$$$ $(srcdir)/java/gcjh.1) || \ (rm -f java/gcjh.1.T$$$$ && exit 1) ! rm -f java/gcjh.pod $(srcdir)/java/jv-scan.1: $(srcdir)/java/gcj.texi -$(TEXI2POD) -D jv-scan < $(srcdir)/java/gcj.texi > java/jv-scan.pod ! ($(POD2MAN) --section=1 java/jv-scan.pod > java/jv-scan.1.T$$$$ && \ mv -f java/jv-scan.1.T$$$$ $(srcdir)/java/jv-scan.1) || \ (rm -f java/jv-scan.1.T$$$$ && exit 1) ! rm -f java/jv-scan.pod $(srcdir)/java/jcf-dump.1: $(srcdir)/java/gcj.texi -$(TEXI2POD) -D jcf-dump < $(srcdir)/java/gcj.texi > java/jcf-dump.pod ! ($(POD2MAN) --section=1 java/jcf-dump.pod > java/jcf-dump.1.T$$$$ && \ mv -f java/jcf-dump.1.T$$$$ $(srcdir)/java/jcf-dump.1) || \ (rm -f java/jcf-dump.1.T$$$$ && exit 1) ! rm -f java/jcf-dump.pod $(srcdir)/java/gij.1: $(srcdir)/java/gcj.texi -$(TEXI2POD) -D gij < $(srcdir)/java/gcj.texi > java/gij.pod ! ($(POD2MAN) --section=1 java/gij.pod > java/gij.1.T$$$$ && \ mv -f java/gij.1.T$$$$ $(srcdir)/java/gij.1) || \ (rm -f java/gij.1.T$$$$ && exit 1) ! rm -f java/gij.pod $(srcdir)/java/jv-convert.1: $(srcdir)/java/gcj.texi -$(TEXI2POD) -D jv-convert < $(srcdir)/java/gcj.texi > java/jv-convert.pod ! ($(POD2MAN) --section=1 java/jv-convert.pod > java/jv-convert.1.T$$$$ && \ mv -f java/jv-convert.1.T$$$$ $(srcdir)/java/jv-convert.1) || \ (rm -f java/jv-convert.1.T$$$$ && exit 1) ! rm -f java/jv-convert.pod $(srcdir)/java/rmic.1: $(srcdir)/java/gcj.texi -$(TEXI2POD) -D rmic < $(srcdir)/java/gcj.texi > java/rmic.pod ! ($(POD2MAN) --section=1 java/rmic.pod > java/rmic.1.T$$$$ && \ mv -f java/rmic.1.T$$$$ $(srcdir)/java/rmic.1) || \ (rm -f java/rmic.1.T$$$$ && exit 1) ! rm -f java/rmic.pod $(srcdir)/java/rmiregistry.1: $(srcdir)/java/gcj.texi -$(TEXI2POD) -D rmiregistry < $(srcdir)/java/gcj.texi > java/rmiregistry.pod ! ($(POD2MAN) --section=1 java/rmiregistry.pod > java/rmiregistry.1.T$$$$ && \ mv -f java/rmiregistry.1.T$$$$ $(srcdir)/java/rmiregistry.1) || \ (rm -f java/rmiregistry.1.T$$$$ && exit 1) ! rm -f java/rmiregistry.pod # Install the man pages. java.install-man: installdirs $(GENERATED_JAVA_MANPAGES) --- 333,411 ---- # jcf-path.o needs a -D. java/jcf-path.o: java/jcf-path.c $(CONFIG_H) $(SYSTEM_H) java/jcf.h $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ ! -DLIBGCJ_ZIP_FILE='"$(datadir)/java/libgcj-$(version).jar"' \ -DDEFAULT_TARGET_VERSION=\"$(version)\" \ $(srcdir)/java/jcf-path.c $(OUTPUT_OPTION) # Documentation $(srcdir)/java/gcj.info: $(srcdir)/java/gcj.texi \ ! $(srcdir)/doc/include/fdl.texi $(srcdir)/doc/include/gpl.texi \ ! $(srcdir)/doc/include/gcc-common.texi if test "x$(BUILD_INFO)" = xinfo; then \ rm -f $(srcdir)/java/gcc.info*; \ cd $(srcdir)/java && $(MAKEINFO) -I../doc/include -o gcj.info gcj.texi; \ else true; fi java/gcj.dvi: $(srcdir)/java/gcj.texi $(srcdir)/doc/include/fdl.texi \ ! $(srcdir)/doc/include/gpl.texi $(srcdir)/doc/include/gcc-common.texi ! s=`cd $(srcdir); ${PWD}`; export s; \ cd java && $(TEXI2DVI) -I $$s/doc/include $$s/java/gcj.texi $(srcdir)/java/gcj.1: $(srcdir)/java/gcj.texi -$(TEXI2POD) -D gcj < $(srcdir)/java/gcj.texi > java/gcj.pod ! -($(POD2MAN) --section=1 java/gcj.pod > java/gcj.1.T$$$$ && \ mv -f java/gcj.1.T$$$$ $(srcdir)/java/gcj.1) || \ (rm -f java/gcj.1.T$$$$ && exit 1) ! -rm -f java/gcj.pod $(srcdir)/java/gcjh.1: $(srcdir)/java/gcj.texi -$(TEXI2POD) -D gcjh < $(srcdir)/java/gcj.texi > java/gcjh.pod ! -($(POD2MAN) --section=1 java/gcjh.pod > java/gcjh.1.T$$$$ && \ mv -f java/gcjh.1.T$$$$ $(srcdir)/java/gcjh.1) || \ (rm -f java/gcjh.1.T$$$$ && exit 1) ! -rm -f java/gcjh.pod $(srcdir)/java/jv-scan.1: $(srcdir)/java/gcj.texi -$(TEXI2POD) -D jv-scan < $(srcdir)/java/gcj.texi > java/jv-scan.pod ! -($(POD2MAN) --section=1 java/jv-scan.pod > java/jv-scan.1.T$$$$ && \ mv -f java/jv-scan.1.T$$$$ $(srcdir)/java/jv-scan.1) || \ (rm -f java/jv-scan.1.T$$$$ && exit 1) ! -rm -f java/jv-scan.pod $(srcdir)/java/jcf-dump.1: $(srcdir)/java/gcj.texi -$(TEXI2POD) -D jcf-dump < $(srcdir)/java/gcj.texi > java/jcf-dump.pod ! -($(POD2MAN) --section=1 java/jcf-dump.pod > java/jcf-dump.1.T$$$$ && \ mv -f java/jcf-dump.1.T$$$$ $(srcdir)/java/jcf-dump.1) || \ (rm -f java/jcf-dump.1.T$$$$ && exit 1) ! -rm -f java/jcf-dump.pod $(srcdir)/java/gij.1: $(srcdir)/java/gcj.texi -$(TEXI2POD) -D gij < $(srcdir)/java/gcj.texi > java/gij.pod ! -($(POD2MAN) --section=1 java/gij.pod > java/gij.1.T$$$$ && \ mv -f java/gij.1.T$$$$ $(srcdir)/java/gij.1) || \ (rm -f java/gij.1.T$$$$ && exit 1) ! -rm -f java/gij.pod $(srcdir)/java/jv-convert.1: $(srcdir)/java/gcj.texi -$(TEXI2POD) -D jv-convert < $(srcdir)/java/gcj.texi > java/jv-convert.pod ! -($(POD2MAN) --section=1 java/jv-convert.pod > java/jv-convert.1.T$$$$ && \ mv -f java/jv-convert.1.T$$$$ $(srcdir)/java/jv-convert.1) || \ (rm -f java/jv-convert.1.T$$$$ && exit 1) ! -rm -f java/jv-convert.pod $(srcdir)/java/rmic.1: $(srcdir)/java/gcj.texi -$(TEXI2POD) -D rmic < $(srcdir)/java/gcj.texi > java/rmic.pod ! -($(POD2MAN) --section=1 java/rmic.pod > java/rmic.1.T$$$$ && \ mv -f java/rmic.1.T$$$$ $(srcdir)/java/rmic.1) || \ (rm -f java/rmic.1.T$$$$ && exit 1) ! -rm -f java/rmic.pod $(srcdir)/java/rmiregistry.1: $(srcdir)/java/gcj.texi -$(TEXI2POD) -D rmiregistry < $(srcdir)/java/gcj.texi > java/rmiregistry.pod ! -($(POD2MAN) --section=1 java/rmiregistry.pod > java/rmiregistry.1.T$$$$ && \ mv -f java/rmiregistry.1.T$$$$ $(srcdir)/java/rmiregistry.1) || \ (rm -f java/rmiregistry.1.T$$$$ && exit 1) ! -rm -f java/rmiregistry.pod # Install the man pages. java.install-man: installdirs $(GENERATED_JAVA_MANPAGES) diff -Nrc3pad gcc-3.2.3/gcc/java/mangle.c gcc-3.3/gcc/java/mangle.c *** gcc-3.2.3/gcc/java/mangle.c 2001-12-20 22:48:51.000000000 +0000 --- gcc-3.3/gcc/java/mangle.c 2002-09-21 02:19:44.000000000 +0000 *************** mangle_method_decl (mdecl) *** 170,176 **** } /* This mangles a member name, like a function name or a field ! name. Handle cases were `name' is a C++ keyword. Return a non zero value if unicode encoding was required. */ static void --- 170,176 ---- } /* This mangles a member name, like a function name or a field ! name. Handle cases were `name' is a C++ keyword. Return a nonzero value if unicode encoding was required. */ static void *************** mangle_type (type) *** 245,251 **** COMPRESSION_NEXT is the index to the location of the next insertion of an element. */ ! static tree compression_table; static int compression_next; /* Find a POINTER_TYPE in the compression table. Use a special --- 245,251 ---- COMPRESSION_NEXT is the index to the location of the next insertion of an element. */ ! static GTY(()) tree compression_table; static int compression_next; /* Find a POINTER_TYPE in the compression table. Use a special *************** find_compression_record_match (type, nex *** 340,346 **** return match; } ! /* Mangle a record type. If a non zero value is returned, it means that a 'N' was emitted (so that a matching 'E' can be emitted if necessary.) FOR_POINTER indicates that this element is for a pointer symbol, meaning it was preceded by a 'P'. */ --- 340,346 ---- return match; } ! /* Mangle a record type. If a nonzero value is returned, it means that a 'N' was emitted (so that a matching 'E' can be emitted if necessary.) FOR_POINTER indicates that this element is for a pointer symbol, meaning it was preceded by a 'P'. */ *************** mangle_pointer_type (type) *** 431,442 **** the template indicator where already used an compress appropriately. It handles pointers. */ static void mangle_array_type (p_type) tree p_type; { - /* atms: array template mangled string. */ - static tree atms = NULL_TREE; tree type, elt_type; int match; --- 431,442 ---- the template indicator where already used an compress appropriately. It handles pointers. */ + /* atms: array template mangled string. */ + static GTY(()) tree atms; static void mangle_array_type (p_type) tree p_type; { tree type, elt_type; int match; *************** mangle_array_type (p_type) *** 450,456 **** if (!atms) { atms = get_identifier ("6JArray"); - ggc_add_tree_root (&atms, 1); } /* Maybe we have what we're looking in the compression table. */ --- 450,455 ---- *************** compression_table_add (type) *** 602,610 **** for (i = 0; i < compression_next; i++) TREE_VEC_ELT (new, i) = TREE_VEC_ELT (compression_table, i); - ggc_del_root (&compression_table); compression_table = new; - ggc_add_tree_root (&compression_table, 1); } TREE_VEC_ELT (compression_table, compression_next++) = type; } --- 601,607 ---- *************** init_mangling (obstack) *** 624,632 **** /* Mangled name are to be suffixed */ obstack_grow (mangle_obstack, "_Z", 2); - - /* Register the compression table with the GC */ - ggc_add_tree_root (&compression_table, 1); } /* Mangling finalization routine. The mangled name is returned as a --- 621,626 ---- *************** finish_mangling () *** 641,647 **** /* Mangling already finished. */ abort (); - ggc_del_root (&compression_table); compression_table = NULL_TREE; compression_next = 0; obstack_1grow (mangle_obstack, '\0'); --- 635,640 ---- *************** finish_mangling () *** 652,654 **** --- 645,649 ---- #endif return result; } + + #include "gt-java-mangle.h" diff -Nrc3pad gcc-3.2.3/gcc/java/mangle_name.c gcc-3.3/gcc/java/mangle_name.c *** gcc-3.2.3/gcc/java/mangle_name.c 2001-12-20 22:48:51.000000000 +0000 --- gcc-3.3/gcc/java/mangle_name.c 2002-08-05 18:46:37.000000000 +0000 *************** The Free Software Foundation is independ *** 32,38 **** #include "java-tree.h" #include "obstack.h" #include "toplev.h" - #include "obstack.h" static void append_unicode_mangled_name PARAMS ((const char *, int)); #ifndef HAVE_AS_UTF8 --- 32,37 ---- diff -Nrc3pad gcc-3.2.3/gcc/java/parse.c gcc-3.3/gcc/java/parse.c *** gcc-3.2.3/gcc/java/parse.c 2003-04-22 08:16:52.000000000 +0000 --- gcc-3.3/gcc/java/parse.c 2003-05-14 00:59:30.000000000 +0000 *************** *** 1,297 **** ! /* A Bison parser, made by GNU Bison 1.875. */ ! ! /* Skeleton parser for Yacc-like parsing with Bison, ! Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc. ! ! This program is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. ! ! This program is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! GNU General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with this program; if not, write to the Free Software ! Foundation, Inc., 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ ! ! /* As a special exception, when this file is copied by Bison into a ! Bison output file, you may use that output file without restriction. ! This special exception was added by the Free Software Foundation ! in version 1.24 of Bison. */ ! ! /* Written by Richard Stallman by simplifying the original so called ! ``semantic'' parser. */ ! ! /* All symbols defined below should begin with yy or YY, to avoid ! infringing on user name space. This should be done even for local ! variables, as they might otherwise be expanded by user macros. ! There are some unavoidable exceptions within include files to ! define necessary library symbols; they are noted "INFRINGES ON ! USER NAME SPACE" below. */ ! ! /* Identify Bison output. */ ! #define YYBISON 1 ! ! /* Skeleton name. */ ! #define YYSKELETON_NAME "yacc.c" ! ! /* Pure parsers. */ ! #define YYPURE 1 ! /* Using locations. */ ! #define YYLSP_NEEDED 0 - /* If NAME_PREFIX is specified substitute the variables and functions - names. */ #define yyparse java_parse ! #define yylex java_lex #define yyerror java_error ! #define yylval java_lval ! #define yychar java_char #define yydebug java_debug #define yynerrs java_nerrs ! ! /* Tokens. */ ! #ifndef YYTOKENTYPE ! # define YYTOKENTYPE ! /* Put the tokens into the symbol table, so that GDB and other debuggers ! know about them. */ ! enum yytokentype { ! PLUS_TK = 258, ! MINUS_TK = 259, ! MULT_TK = 260, ! DIV_TK = 261, ! REM_TK = 262, ! LS_TK = 263, ! SRS_TK = 264, ! ZRS_TK = 265, ! AND_TK = 266, ! XOR_TK = 267, ! OR_TK = 268, ! BOOL_AND_TK = 269, ! BOOL_OR_TK = 270, ! EQ_TK = 271, ! NEQ_TK = 272, ! GT_TK = 273, ! GTE_TK = 274, ! LT_TK = 275, ! LTE_TK = 276, ! PLUS_ASSIGN_TK = 277, ! MINUS_ASSIGN_TK = 278, ! MULT_ASSIGN_TK = 279, ! DIV_ASSIGN_TK = 280, ! REM_ASSIGN_TK = 281, ! LS_ASSIGN_TK = 282, ! SRS_ASSIGN_TK = 283, ! ZRS_ASSIGN_TK = 284, ! AND_ASSIGN_TK = 285, ! XOR_ASSIGN_TK = 286, ! OR_ASSIGN_TK = 287, ! PUBLIC_TK = 288, ! PRIVATE_TK = 289, ! PROTECTED_TK = 290, ! STATIC_TK = 291, ! FINAL_TK = 292, ! SYNCHRONIZED_TK = 293, ! VOLATILE_TK = 294, ! TRANSIENT_TK = 295, ! NATIVE_TK = 296, ! PAD_TK = 297, ! ABSTRACT_TK = 298, ! STRICT_TK = 299, ! MODIFIER_TK = 300, ! DECR_TK = 301, ! INCR_TK = 302, ! DEFAULT_TK = 303, ! IF_TK = 304, ! THROW_TK = 305, ! BOOLEAN_TK = 306, ! DO_TK = 307, ! IMPLEMENTS_TK = 308, ! THROWS_TK = 309, ! BREAK_TK = 310, ! IMPORT_TK = 311, ! ELSE_TK = 312, ! INSTANCEOF_TK = 313, ! RETURN_TK = 314, ! VOID_TK = 315, ! CATCH_TK = 316, ! INTERFACE_TK = 317, ! CASE_TK = 318, ! EXTENDS_TK = 319, ! FINALLY_TK = 320, ! SUPER_TK = 321, ! WHILE_TK = 322, ! CLASS_TK = 323, ! SWITCH_TK = 324, ! CONST_TK = 325, ! TRY_TK = 326, ! FOR_TK = 327, ! NEW_TK = 328, ! CONTINUE_TK = 329, ! GOTO_TK = 330, ! PACKAGE_TK = 331, ! THIS_TK = 332, ! BYTE_TK = 333, ! SHORT_TK = 334, ! INT_TK = 335, ! LONG_TK = 336, ! CHAR_TK = 337, ! INTEGRAL_TK = 338, ! FLOAT_TK = 339, ! DOUBLE_TK = 340, ! FP_TK = 341, ! ID_TK = 342, ! REL_QM_TK = 343, ! REL_CL_TK = 344, ! NOT_TK = 345, ! NEG_TK = 346, ! ASSIGN_ANY_TK = 347, ! ASSIGN_TK = 348, ! OP_TK = 349, ! CP_TK = 350, ! OCB_TK = 351, ! CCB_TK = 352, ! OSB_TK = 353, ! CSB_TK = 354, ! SC_TK = 355, ! C_TK = 356, ! DOT_TK = 357, ! STRING_LIT_TK = 358, ! CHAR_LIT_TK = 359, ! INT_LIT_TK = 360, ! FP_LIT_TK = 361, ! TRUE_TK = 362, ! FALSE_TK = 363, ! BOOL_LIT_TK = 364, ! NULL_TK = 365 ! }; ! #endif ! #define PLUS_TK 258 ! #define MINUS_TK 259 ! #define MULT_TK 260 ! #define DIV_TK 261 ! #define REM_TK 262 ! #define LS_TK 263 ! #define SRS_TK 264 ! #define ZRS_TK 265 ! #define AND_TK 266 ! #define XOR_TK 267 ! #define OR_TK 268 ! #define BOOL_AND_TK 269 ! #define BOOL_OR_TK 270 ! #define EQ_TK 271 ! #define NEQ_TK 272 ! #define GT_TK 273 ! #define GTE_TK 274 ! #define LT_TK 275 ! #define LTE_TK 276 ! #define PLUS_ASSIGN_TK 277 ! #define MINUS_ASSIGN_TK 278 ! #define MULT_ASSIGN_TK 279 ! #define DIV_ASSIGN_TK 280 ! #define REM_ASSIGN_TK 281 ! #define LS_ASSIGN_TK 282 ! #define SRS_ASSIGN_TK 283 ! #define ZRS_ASSIGN_TK 284 ! #define AND_ASSIGN_TK 285 ! #define XOR_ASSIGN_TK 286 ! #define OR_ASSIGN_TK 287 ! #define PUBLIC_TK 288 ! #define PRIVATE_TK 289 ! #define PROTECTED_TK 290 ! #define STATIC_TK 291 ! #define FINAL_TK 292 ! #define SYNCHRONIZED_TK 293 ! #define VOLATILE_TK 294 ! #define TRANSIENT_TK 295 ! #define NATIVE_TK 296 ! #define PAD_TK 297 ! #define ABSTRACT_TK 298 ! #define STRICT_TK 299 ! #define MODIFIER_TK 300 ! #define DECR_TK 301 ! #define INCR_TK 302 ! #define DEFAULT_TK 303 ! #define IF_TK 304 ! #define THROW_TK 305 ! #define BOOLEAN_TK 306 ! #define DO_TK 307 ! #define IMPLEMENTS_TK 308 ! #define THROWS_TK 309 ! #define BREAK_TK 310 ! #define IMPORT_TK 311 ! #define ELSE_TK 312 ! #define INSTANCEOF_TK 313 ! #define RETURN_TK 314 ! #define VOID_TK 315 ! #define CATCH_TK 316 ! #define INTERFACE_TK 317 ! #define CASE_TK 318 ! #define EXTENDS_TK 319 ! #define FINALLY_TK 320 ! #define SUPER_TK 321 ! #define WHILE_TK 322 ! #define CLASS_TK 323 ! #define SWITCH_TK 324 ! #define CONST_TK 325 ! #define TRY_TK 326 ! #define FOR_TK 327 ! #define NEW_TK 328 ! #define CONTINUE_TK 329 ! #define GOTO_TK 330 ! #define PACKAGE_TK 331 ! #define THIS_TK 332 ! #define BYTE_TK 333 ! #define SHORT_TK 334 ! #define INT_TK 335 ! #define LONG_TK 336 ! #define CHAR_TK 337 ! #define INTEGRAL_TK 338 ! #define FLOAT_TK 339 ! #define DOUBLE_TK 340 ! #define FP_TK 341 ! #define ID_TK 342 ! #define REL_QM_TK 343 ! #define REL_CL_TK 344 ! #define NOT_TK 345 ! #define NEG_TK 346 ! #define ASSIGN_ANY_TK 347 ! #define ASSIGN_TK 348 ! #define OP_TK 349 ! #define CP_TK 350 ! #define OCB_TK 351 ! #define CCB_TK 352 ! #define OSB_TK 353 ! #define CSB_TK 354 ! #define SC_TK 355 ! #define C_TK 356 ! #define DOT_TK 357 ! #define STRING_LIT_TK 358 ! #define CHAR_LIT_TK 359 ! #define INT_LIT_TK 360 ! #define FP_LIT_TK 361 ! #define TRUE_TK 362 ! #define FALSE_TK 363 ! #define BOOL_LIT_TK 364 ! #define NULL_TK 365 ! ! ! ! ! /* Copy the first part of user declarations. */ ! #line 48 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" #include "config.h" #include "system.h" #include #include "tree.h" #include "rtl.h" #include "obstack.h" #include "toplev.h" #include "flags.h" --- 1,133 ---- ! /* A Bison parser, made from /home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y ! by GNU bison 1.35. */ ! #define YYBISON 1 /* Identify Bison output. */ #define yyparse java_parse ! #define yylex java_lex #define yyerror java_error ! #define yylval java_lval ! #define yychar java_char #define yydebug java_debug #define yynerrs java_nerrs + # define PLUS_TK 257 + # define MINUS_TK 258 + # define MULT_TK 259 + # define DIV_TK 260 + # define REM_TK 261 + # define LS_TK 262 + # define SRS_TK 263 + # define ZRS_TK 264 + # define AND_TK 265 + # define XOR_TK 266 + # define OR_TK 267 + # define BOOL_AND_TK 268 + # define BOOL_OR_TK 269 + # define EQ_TK 270 + # define NEQ_TK 271 + # define GT_TK 272 + # define GTE_TK 273 + # define LT_TK 274 + # define LTE_TK 275 + # define PLUS_ASSIGN_TK 276 + # define MINUS_ASSIGN_TK 277 + # define MULT_ASSIGN_TK 278 + # define DIV_ASSIGN_TK 279 + # define REM_ASSIGN_TK 280 + # define LS_ASSIGN_TK 281 + # define SRS_ASSIGN_TK 282 + # define ZRS_ASSIGN_TK 283 + # define AND_ASSIGN_TK 284 + # define XOR_ASSIGN_TK 285 + # define OR_ASSIGN_TK 286 + # define PUBLIC_TK 287 + # define PRIVATE_TK 288 + # define PROTECTED_TK 289 + # define STATIC_TK 290 + # define FINAL_TK 291 + # define SYNCHRONIZED_TK 292 + # define VOLATILE_TK 293 + # define TRANSIENT_TK 294 + # define NATIVE_TK 295 + # define PAD_TK 296 + # define ABSTRACT_TK 297 + # define STRICT_TK 298 + # define MODIFIER_TK 299 + # define DECR_TK 300 + # define INCR_TK 301 + # define DEFAULT_TK 302 + # define IF_TK 303 + # define THROW_TK 304 + # define BOOLEAN_TK 305 + # define DO_TK 306 + # define IMPLEMENTS_TK 307 + # define THROWS_TK 308 + # define BREAK_TK 309 + # define IMPORT_TK 310 + # define ELSE_TK 311 + # define INSTANCEOF_TK 312 + # define RETURN_TK 313 + # define VOID_TK 314 + # define CATCH_TK 315 + # define INTERFACE_TK 316 + # define CASE_TK 317 + # define EXTENDS_TK 318 + # define FINALLY_TK 319 + # define SUPER_TK 320 + # define WHILE_TK 321 + # define CLASS_TK 322 + # define SWITCH_TK 323 + # define CONST_TK 324 + # define TRY_TK 325 + # define FOR_TK 326 + # define NEW_TK 327 + # define CONTINUE_TK 328 + # define GOTO_TK 329 + # define PACKAGE_TK 330 + # define THIS_TK 331 + # define ASSERT_TK 332 + # define BYTE_TK 333 + # define SHORT_TK 334 + # define INT_TK 335 + # define LONG_TK 336 + # define CHAR_TK 337 + # define INTEGRAL_TK 338 + # define FLOAT_TK 339 + # define DOUBLE_TK 340 + # define FP_TK 341 + # define ID_TK 342 + # define REL_QM_TK 343 + # define REL_CL_TK 344 + # define NOT_TK 345 + # define NEG_TK 346 + # define ASSIGN_ANY_TK 347 + # define ASSIGN_TK 348 + # define OP_TK 349 + # define CP_TK 350 + # define OCB_TK 351 + # define CCB_TK 352 + # define OSB_TK 353 + # define CSB_TK 354 + # define SC_TK 355 + # define C_TK 356 + # define DOT_TK 357 + # define STRING_LIT_TK 358 + # define CHAR_LIT_TK 359 + # define INT_LIT_TK 360 + # define FP_LIT_TK 361 + # define TRUE_TK 362 + # define FALSE_TK 363 + # define BOOL_LIT_TK 364 + # define NULL_TK 365 ! #line 48 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" #include "config.h" #include "system.h" #include #include "tree.h" #include "rtl.h" + #include "real.h" #include "obstack.h" #include "toplev.h" #include "flags.h" *************** *** 306,315 **** #include "function.h" #include "except.h" #include "ggc.h" ! ! #ifndef DIR_SEPARATOR ! #define DIR_SEPARATOR '/' ! #endif /* Local function prototypes */ static char *java_accstring_lookup PARAMS ((int)); --- 142,149 ---- #include "function.h" #include "except.h" #include "ggc.h" ! #include "debug.h" ! #include "tree-inline.h" /* Local function prototypes */ static char *java_accstring_lookup PARAMS ((int)); *************** static void check_abstract_method_header *** 356,362 **** static tree lookup_java_interface_method2 PARAMS ((tree, tree)); static tree resolve_expression_name PARAMS ((tree, tree *)); static tree maybe_create_class_interface_decl PARAMS ((tree, tree, tree, tree)); ! static int check_class_interface_creation PARAMS ((int, int, tree, tree, tree, tree)); static tree patch_method_invocation PARAMS ((tree, tree, tree, int, int *, tree *)); --- 190,196 ---- static tree lookup_java_interface_method2 PARAMS ((tree, tree)); static tree resolve_expression_name PARAMS ((tree, tree *)); static tree maybe_create_class_interface_decl PARAMS ((tree, tree, tree, tree)); ! static int check_class_interface_creation PARAMS ((int, int, tree, tree, tree, tree)); static tree patch_method_invocation PARAMS ((tree, tree, tree, int, int *, tree *)); *************** static tree resolve_and_layout PARAMS (( *** 366,374 **** static tree qualify_and_find PARAMS ((tree, tree, tree)); static tree resolve_no_layout PARAMS ((tree, tree)); static int invocation_mode PARAMS ((tree, int)); ! static tree find_applicable_accessible_methods_list PARAMS ((int, tree, tree, tree)); ! static void search_applicable_methods_list PARAMS ((int, tree, tree, tree, tree *, tree *)); static tree find_most_specific_methods_list PARAMS ((tree)); static int argument_types_convertible PARAMS ((tree, tree)); --- 200,208 ---- static tree qualify_and_find PARAMS ((tree, tree, tree)); static tree resolve_no_layout PARAMS ((tree, tree)); static int invocation_mode PARAMS ((tree, int)); ! static tree find_applicable_accessible_methods_list PARAMS ((int, tree, tree, tree)); ! static void search_applicable_methods_list PARAMS ((int, tree, tree, tree, tree *, tree *)); static tree find_most_specific_methods_list PARAMS ((tree)); static int argument_types_convertible PARAMS ((tree, tree)); *************** static tree patch_array_ref PARAMS ((tre *** 420,426 **** static tree make_qualified_name PARAMS ((tree, tree, int)); static tree merge_qualified_name PARAMS ((tree, tree)); static tree make_qualified_primary PARAMS ((tree, tree, int)); ! static int resolve_qualified_expression_name PARAMS ((tree, tree *, tree *, tree *)); static void qualify_ambiguous_name PARAMS ((tree)); static tree resolve_field_access PARAMS ((tree, tree *, tree *)); --- 254,260 ---- static tree make_qualified_name PARAMS ((tree, tree, int)); static tree merge_qualified_name PARAMS ((tree, tree)); static tree make_qualified_primary PARAMS ((tree, tree, int)); ! static int resolve_qualified_expression_name PARAMS ((tree, tree *, tree *, tree *)); static void qualify_ambiguous_name PARAMS ((tree)); static tree resolve_field_access PARAMS ((tree, tree *, tree *)); *************** static tree build_return PARAMS ((int, t *** 433,439 **** static tree patch_return PARAMS ((tree)); static tree maybe_access_field PARAMS ((tree, tree, tree)); static int complete_function_arguments PARAMS ((tree)); ! static int check_for_static_method_reference PARAMS ((tree, tree, tree, tree, tree)); static int not_accessible_p PARAMS ((tree, tree, tree, int)); static void check_deprecation PARAMS ((tree, tree)); --- 267,273 ---- static tree patch_return PARAMS ((tree)); static tree maybe_access_field PARAMS ((tree, tree, tree)); static int complete_function_arguments PARAMS ((tree)); ! static int check_for_static_method_reference PARAMS ((tree, tree, tree, tree, tree)); static int not_accessible_p PARAMS ((tree, tree, tree, int)); static void check_deprecation PARAMS ((tree, tree)); *************** static tree build_string_concatenation P *** 459,464 **** --- 293,299 ---- static tree patch_string_cst PARAMS ((tree)); static tree patch_string PARAMS ((tree)); static tree encapsulate_with_try_catch PARAMS ((int, tree, tree, tree)); + static tree build_assertion PARAMS ((int, tree, tree)); static tree build_try_statement PARAMS ((int, tree, tree)); static tree build_try_finally_statement PARAMS ((int, tree, tree)); static tree patch_try_statement PARAMS ((tree)); *************** static int pop_current_osb PARAMS ((stru *** 535,545 **** /* JDK 1.1 work. FIXME */ static tree maybe_make_nested_class_name PARAMS ((tree)); ! static void make_nested_class_name PARAMS ((tree)); static void set_nested_class_simple_name_value PARAMS ((tree, int)); static void link_nested_class_to_enclosing PARAMS ((void)); ! static tree resolve_inner_class PARAMS ((struct hash_table *, tree, tree *, ! tree *, tree)); static tree find_as_inner_class PARAMS ((tree, tree, tree)); static tree find_as_inner_class_do PARAMS ((tree, tree)); static int check_inner_class_redefinition PARAMS ((tree, tree)); --- 370,379 ---- /* JDK 1.1 work. FIXME */ static tree maybe_make_nested_class_name PARAMS ((tree)); ! static int make_nested_class_name PARAMS ((tree)); static void set_nested_class_simple_name_value PARAMS ((tree, int)); static void link_nested_class_to_enclosing PARAMS ((void)); ! static tree resolve_inner_class PARAMS ((htab_t, tree, tree *, tree *, tree)); static tree find_as_inner_class PARAMS ((tree, tree, tree)); static tree find_as_inner_class_do PARAMS ((tree, tree)); static int check_inner_class_redefinition PARAMS ((tree, tree)); *************** static tree maybe_build_thisn_access_met *** 551,557 **** static tree build_outer_field_access PARAMS ((tree, tree)); static tree build_outer_field_access_methods PARAMS ((tree)); ! static tree build_outer_field_access_expr PARAMS ((int, tree, tree, tree, tree)); static tree build_outer_method_access_method PARAMS ((tree)); static tree build_new_access_id PARAMS ((void)); --- 385,391 ---- static tree build_outer_field_access PARAMS ((tree, tree)); static tree build_outer_field_access_methods PARAMS ((tree)); ! static tree build_outer_field_access_expr PARAMS ((int, tree, tree, tree, tree)); static tree build_outer_method_access_method PARAMS ((tree)); static tree build_new_access_id PARAMS ((void)); *************** static tree build_outer_field_access_met *** 559,565 **** tree, tree)); static int outer_field_access_p PARAMS ((tree, tree)); ! static int outer_field_expanded_access_p PARAMS ((tree, tree *, tree *, tree *)); static tree outer_field_access_fix PARAMS ((tree, tree, tree)); static tree build_incomplete_class_ref PARAMS ((int, tree)); --- 393,399 ---- tree, tree)); static int outer_field_access_p PARAMS ((tree, tree)); ! static int outer_field_expanded_access_p PARAMS ((tree, tree *, tree *, tree *)); static tree outer_field_access_fix PARAMS ((tree, tree, tree)); static tree build_incomplete_class_ref PARAMS ((int, tree)); *************** static void create_new_parser_context PA *** 574,592 **** static void mark_parser_ctxt PARAMS ((void *)); static tree maybe_build_class_init_for_field PARAMS ((tree, tree)); ! static bool attach_init_test_initialization_flags PARAMS ((struct hash_entry *, ! PTR)); ! static bool emit_test_initialization PARAMS ((struct hash_entry *, PTR)); /* Number of error found so far. */ ! int java_error_count; /* Number of warning found so far. */ int java_warning_count; /* Tell when not to fold, when doing xrefs */ int do_not_fold; /* Cyclic inheritance report, as it can be set by layout_class */ const char *cyclic_inheritance_report; ! /* The current parser context */ struct parser_ctxt *ctxp; --- 408,427 ---- static void mark_parser_ctxt PARAMS ((void *)); static tree maybe_build_class_init_for_field PARAMS ((tree, tree)); ! static int attach_init_test_initialization_flags PARAMS ((PTR *, PTR)); ! static int emit_test_initialization PARAMS ((PTR *, PTR)); ! ! static char *string_convert_int_cst PARAMS ((tree)); /* Number of error found so far. */ ! int java_error_count; /* Number of warning found so far. */ int java_warning_count; /* Tell when not to fold, when doing xrefs */ int do_not_fold; /* Cyclic inheritance report, as it can be set by layout_class */ const char *cyclic_inheritance_report; ! /* The current parser context */ struct parser_ctxt *ctxp; *************** struct parser_ctxt *ctxp_for_generation *** 598,607 **** covers both integral/floating point division. The code is changed once the type of both operator is worked out. */ ! static const enum tree_code binop_lookup[19] = ! { PLUS_EXPR, MINUS_EXPR, MULT_EXPR, RDIV_EXPR, TRUNC_MOD_EXPR, ! LSHIFT_EXPR, RSHIFT_EXPR, URSHIFT_EXPR, BIT_AND_EXPR, BIT_XOR_EXPR, BIT_IOR_EXPR, TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR, EQ_EXPR, NE_EXPR, GT_EXPR, GE_EXPR, LT_EXPR, LE_EXPR, --- 433,442 ---- covers both integral/floating point division. The code is changed once the type of both operator is worked out. */ ! static const enum tree_code binop_lookup[19] = ! { PLUS_EXPR, MINUS_EXPR, MULT_EXPR, RDIV_EXPR, TRUNC_MOD_EXPR, ! LSHIFT_EXPR, RSHIFT_EXPR, URSHIFT_EXPR, BIT_AND_EXPR, BIT_XOR_EXPR, BIT_IOR_EXPR, TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR, EQ_EXPR, NE_EXPR, GT_EXPR, GE_EXPR, LT_EXPR, LE_EXPR, *************** static const enum tree_code binop_lookup *** 614,667 **** #define BINOP_COMPOUND_CANDIDATES 11 /* The "$L" identifier we use to create labels. */ ! static tree label_id = NULL_TREE; /* The "StringBuffer" identifier used for the String `+' operator. */ ! static tree wfl_string_buffer = NULL_TREE; /* The "append" identifier used for String `+' operator. */ ! static tree wfl_append = NULL_TREE; /* The "toString" identifier used for String `+' operator. */ ! static tree wfl_to_string = NULL_TREE; /* The "java.lang" import qualified name. */ ! static tree java_lang_id = NULL_TREE; /* The generated `inst$' identifier used for generated enclosing instance/field access functions. */ ! static tree inst_id = NULL_TREE; ! ! /* The "java.lang.Cloneable" qualified name. */ ! static tree java_lang_cloneable = NULL_TREE; ! ! /* The "java.io.Serializable" qualified name. */ ! static tree java_io_serializable = NULL_TREE; /* Context and flag for static blocks */ ! static tree current_static_block = NULL_TREE; /* The generated `write_parm_value$' identifier. */ ! static tree wpv_id; /* The list of all packages we've seen so far */ ! static tree package_list = NULL_TREE; ! /* Hold THIS for the scope of the current method decl. */ ! static tree current_this; /* Hold a list of catch clauses list. The first element of this list is the list of the catch clauses of the currently analysed try block. */ ! static tree currently_caught_type_list; /* This holds a linked list of all the case labels for the current switch statement. It is only used when checking to see if there are duplicate labels. FIXME: probably this should just be attached to the switch itself; then it could be referenced via `ctxp->current_loop'. */ ! static tree case_label_list; ! static tree src_parse_roots[1]; /* All classes seen from source code */ #define gclass_list src_parse_roots[0] --- 449,500 ---- #define BINOP_COMPOUND_CANDIDATES 11 /* The "$L" identifier we use to create labels. */ ! static GTY(()) tree label_id; /* The "StringBuffer" identifier used for the String `+' operator. */ ! static GTY(()) tree wfl_string_buffer; /* The "append" identifier used for String `+' operator. */ ! static GTY(()) tree wfl_append; /* The "toString" identifier used for String `+' operator. */ ! static GTY(()) tree wfl_to_string; /* The "java.lang" import qualified name. */ ! static GTY(()) tree java_lang_id; /* The generated `inst$' identifier used for generated enclosing instance/field access functions. */ ! static GTY(()) tree inst_id; /* Context and flag for static blocks */ ! static GTY(()) tree current_static_block; /* The generated `write_parm_value$' identifier. */ ! static GTY(()) tree wpv_id; /* The list of all packages we've seen so far */ ! static GTY(()) tree package_list; ! /* Hold THIS for the scope of the current method decl. */ ! static GTY(()) tree current_this; /* Hold a list of catch clauses list. The first element of this list is the list of the catch clauses of the currently analysed try block. */ ! static GTY(()) tree currently_caught_type_list; /* This holds a linked list of all the case labels for the current switch statement. It is only used when checking to see if there are duplicate labels. FIXME: probably this should just be attached to the switch itself; then it could be referenced via `ctxp->current_loop'. */ ! static GTY(()) tree case_label_list; ! /* Anonymous class counter. Will be reset to 1 every time a non ! anonymous class gets created. */ ! static int anonymous_class_counter = 1; ! ! static GTY(()) tree src_parse_roots[1]; /* All classes seen from source code */ #define gclass_list src_parse_roots[0] *************** static tree src_parse_roots[1]; *** 674,681 **** #define check_modifiers(__message, __value, __mask) do { \ if ((__value) & ~(__mask)) \ { \ ! int i, remainder = (__value) & ~(__mask); \ ! for (i = 0; i <= 10; i++) \ if ((1 << i) & remainder) \ parse_error_context (ctxp->modifier_ctx [i], (__message), \ java_accstring_lookup (1 << i)); \ --- 507,514 ---- #define check_modifiers(__message, __value, __mask) do { \ if ((__value) & ~(__mask)) \ { \ ! size_t i, remainder = (__value) & ~(__mask); \ ! for (i = 0; i < ARRAY_SIZE (ctxp->modifier_ctx); i++) \ if ((1 << i) & remainder) \ parse_error_context (ctxp->modifier_ctx [i], (__message), \ java_accstring_lookup (1 << i)); \ *************** static tree src_parse_roots[1]; *** 683,705 **** } while (0) ! ! /* Enabling traces. */ ! #ifndef YYDEBUG ! # define YYDEBUG 1 ! #endif ! ! /* Enabling verbose error messages. */ ! #ifdef YYERROR_VERBOSE ! # undef YYERROR_VERBOSE ! # define YYERROR_VERBOSE 1 ! #else ! # define YYERROR_VERBOSE 0 ! #endif ! ! #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) ! #line 446 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! typedef union YYSTYPE { tree node; int sub_token; struct { --- 516,524 ---- } while (0) ! #line 444 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! #ifndef YYSTYPE ! typedef union { tree node; int sub_token; struct { *************** typedef union YYSTYPE { *** 707,848 **** int location; } operator; int value; ! } YYSTYPE; ! /* Line 191 of yacc.c. */ ! #line 712 "p2378.c" ! # define yystype YYSTYPE /* obsolescent; will be withdrawn */ ! # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 #endif ! ! ! ! /* Copy the second part of user declarations. */ ! #line 456 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" #include "lex.c" ! ! ! /* Line 214 of yacc.c. */ ! #line 727 "p2378.c" ! ! #if ! defined (yyoverflow) || YYERROR_VERBOSE ! ! /* The parser invokes alloca or malloc; define the necessary symbols. */ ! ! # if YYSTACK_USE_ALLOCA ! # define YYSTACK_ALLOC alloca ! # else ! # ifndef YYSTACK_USE_ALLOCA ! # if defined (alloca) || defined (_ALLOCA_H) ! # define YYSTACK_ALLOC alloca ! # else ! # ifdef __GNUC__ ! # define YYSTACK_ALLOC __builtin_alloca ! # endif ! # endif ! # endif ! # endif ! ! # ifdef YYSTACK_ALLOC ! /* Pacify GCC's `empty if-body' warning. */ ! # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) ! # else ! # if defined (__STDC__) || defined (__cplusplus) ! # include /* INFRINGES ON USER NAME SPACE */ ! # define YYSIZE_T size_t ! # endif ! # define YYSTACK_ALLOC malloc ! # define YYSTACK_FREE free ! # endif ! #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ ! ! ! #if (! defined (yyoverflow) \ ! && (! defined (__cplusplus) \ ! || (YYSTYPE_IS_TRIVIAL))) ! ! /* A type that is properly aligned for any stack member. */ ! union yyalloc ! { ! short yyss; ! YYSTYPE yyvs; ! }; ! ! /* The size of the maximum gap between one aligned stack and the next. */ ! # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) ! ! /* The size of an array large to enough to hold all stacks, each with ! N elements. */ ! # define YYSTACK_BYTES(N) \ ! ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ ! + YYSTACK_GAP_MAXIMUM) ! ! /* Copy COUNT objects from FROM to TO. The source and destination do ! not overlap. */ ! # ifndef YYCOPY ! # if 1 < __GNUC__ ! # define YYCOPY(To, From, Count) \ ! __builtin_memcpy (To, From, (Count) * sizeof (*(From))) ! # else ! # define YYCOPY(To, From, Count) \ ! do \ ! { \ ! register YYSIZE_T yyi; \ ! for (yyi = 0; yyi < (Count); yyi++) \ ! (To)[yyi] = (From)[yyi]; \ ! } \ ! while (0) ! # endif ! # endif ! ! /* Relocate STACK from its old location to the new one. The ! local variables YYSIZE and YYSTACKSIZE give the old and new number of ! elements in the stack, and YYPTR gives the new location of the ! stack. Advance YYPTR to a properly aligned location for the next ! stack. */ ! # define YYSTACK_RELOCATE(Stack) \ ! do \ ! { \ ! YYSIZE_T yynewbytes; \ ! YYCOPY (&yyptr->Stack, Stack, yysize); \ ! Stack = &yyptr->Stack; \ ! yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ ! yyptr += yynewbytes / sizeof (*yyptr); \ ! } \ ! while (0) ! ! #endif ! ! #if defined (__STDC__) || defined (__cplusplus) ! typedef signed char yysigned_char; ! #else ! typedef short yysigned_char; #endif - /* YYFINAL -- State number of the termination state. */ - #define YYFINAL 3 - /* YYLAST -- Last index in YYTABLE. */ - #define YYLAST 5469 - /* YYNTOKENS -- Number of terminals. */ - #define YYNTOKENS 111 - /* YYNNTS -- Number of nonterminals. */ - #define YYNNTS 164 - /* YYNRULES -- Number of rules. */ - #define YYNRULES 506 - /* YYNRULES -- Number of states. */ - #define YYNSTATES 778 ! /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ ! #define YYUNDEFTOK 2 ! #define YYMAXUTOK 365 ! #define YYTRANSLATE(YYX) \ ! ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) ! /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ ! static const unsigned char yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, --- 526,553 ---- int location; } operator; int value; ! } yystype; ! # define YYSTYPE yystype # define YYSTYPE_IS_TRIVIAL 1 #endif ! #line 454 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" #include "lex.c" ! #ifndef YYDEBUG ! # define YYDEBUG 1 #endif ! #define YYFINAL 787 ! #define YYFLAG -32768 ! #define YYNTBASE 112 ! /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */ ! #define YYTRANSLATE(x) ((unsigned)(x) <= 365 ? yytranslate[x] : 276) ! /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */ ! static const char yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, *************** static const unsigned char yytranslate[] *** 869,1187 **** 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, ! 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, ! 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, ! 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, ! 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, ! 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, ! 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, ! 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ! 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, ! 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, ! 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, ! 105, 106, 107, 108, 109, 110 }; #if YYDEBUG ! /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in ! YYRHS. */ ! static const unsigned short yyprhs[] = { ! 0, 0, 3, 4, 7, 9, 11, 13, 15, 17, ! 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, ! 39, 42, 45, 47, 49, 51, 55, 57, 58, 60, ! 62, 64, 67, 70, 73, 77, 79, 82, 84, 87, ! 91, 94, 98, 100, 102, 106, 109, 113, 119, 124, ! 130, 132, 134, 136, 138, 140, 143, 144, 152, 153, ! 160, 164, 167, 171, 176, 177, 180, 184, 187, 188, ! 191, 194, 196, 200, 204, 207, 211, 213, 216, 218, ! 220, 222, 224, 226, 228, 230, 232, 234, 238, 243, ! 245, 249, 253, 255, 259, 263, 268, 270, 274, 277, ! 281, 285, 287, 289, 290, 294, 297, 301, 305, 310, ! 315, 318, 322, 325, 329, 332, 336, 341, 345, 349, ! 353, 355, 359, 363, 366, 370, 373, 377, 379, 380, ! 383, 386, 388, 392, 396, 398, 400, 403, 405, 406, ! 410, 413, 417, 421, 426, 429, 433, 437, 442, 444, ! 449, 455, 463, 470, 472, 474, 475, 480, 481, 487, ! 488, 494, 495, 502, 506, 511, 514, 518, 521, 525, ! 528, 532, 534, 537, 539, 541, 543, 545, 547, 550, ! 553, 556, 560, 564, 569, 571, 575, 579, 582, 586, ! 588, 590, 592, 595, 597, 599, 601, 604, 607, 611, ! 613, 615, 617, 619, 621, 623, 625, 627, 629, 631, ! 633, 635, 637, 639, 641, 643, 645, 647, 649, 651, ! 653, 655, 657, 660, 663, 666, 669, 672, 675, 678, ! 681, 685, 690, 695, 701, 706, 712, 719, 727, 734, ! 736, 738, 740, 742, 744, 746, 748, 754, 757, 761, ! 766, 774, 782, 783, 787, 792, 795, 799, 805, 808, ! 812, 816, 821, 823, 826, 829, 831, 834, 838, 841, ! 844, 848, 851, 856, 859, 862, 866, 871, 874, 876, ! 884, 892, 899, 903, 909, 914, 922, 929, 932, 935, ! 939, 942, 943, 945, 947, 950, 951, 953, 955, 959, ! 963, 966, 970, 973, 977, 980, 984, 987, 991, 994, ! 998, 1001, 1005, 1009, 1012, 1016, 1022, 1028, 1031, 1036, ! 1040, 1042, 1046, 1050, 1055, 1058, 1060, 1063, 1066, 1071, ! 1074, 1078, 1083, 1086, 1089, 1091, 1093, 1095, 1097, 1101, ! 1103, 1105, 1107, 1109, 1111, 1115, 1119, 1123, 1127, 1131, ! 1135, 1139, 1143, 1147, 1153, 1158, 1160, 1165, 1171, 1177, ! 1184, 1188, 1192, 1197, 1203, 1206, 1210, 1211, 1219, 1220, ! 1227, 1231, 1235, 1237, 1241, 1245, 1249, 1253, 1258, 1263, ! 1268, 1273, 1277, 1281, 1283, 1286, 1290, 1294, 1297, 1300, ! 1304, 1308, 1312, 1316, 1319, 1323, 1328, 1334, 1341, 1347, ! 1354, 1359, 1364, 1369, 1374, 1378, 1383, 1387, 1392, 1394, ! 1396, 1398, 1400, 1403, 1406, 1408, 1410, 1413, 1415, 1418, ! 1420, 1423, 1426, 1429, 1432, 1435, 1438, 1440, 1443, 1446, ! 1448, 1451, 1454, 1460, 1465, 1470, 1476, 1481, 1484, 1490, ! 1495, 1501, 1503, 1507, 1511, 1515, 1519, 1523, 1527, 1529, ! 1533, 1537, 1541, 1545, 1547, 1551, 1555, 1559, 1563, 1567, ! 1571, 1573, 1577, 1581, 1585, 1589, 1593, 1597, 1601, 1605, ! 1609, 1613, 1615, 1619, 1623, 1627, 1631, 1633, 1637, 1641, ! 1643, 1647, 1651, 1653, 1657, 1661, 1663, 1667, 1671, 1673, ! 1677, 1681, 1683, 1689, 1694, 1698, 1704, 1706, 1708, 1712, ! 1716, 1718, 1720, 1722, 1724, 1726, 1728 }; - - /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const short yyrhs[] = { ! 112, 0, -1, -1, 113, 126, -1, 105, -1, 106, ! -1, 109, -1, 104, -1, 103, -1, 110, -1, 116, ! -1, 117, -1, 83, -1, 86, -1, 51, -1, 118, ! -1, 121, -1, 122, -1, 118, -1, 118, -1, 116, ! 245, -1, 122, 245, -1, 123, -1, 124, -1, 125, ! -1, 122, 102, 125, -1, 87, -1, -1, 129, -1, ! 127, -1, 128, -1, 129, 127, -1, 129, 128, -1, ! 127, 128, -1, 129, 127, 128, -1, 130, -1, 127, ! 130, -1, 133, -1, 128, 133, -1, 76, 122, 100, ! -1, 76, 1, -1, 76, 122, 1, -1, 131, -1, ! 132, -1, 56, 122, 100, -1, 56, 1, -1, 56, ! 122, 1, -1, 56, 122, 102, 5, 100, -1, 56, ! 122, 102, 1, -1, 56, 122, 102, 5, 1, -1, ! 135, -1, 170, -1, 193, -1, 1, -1, 45, -1, ! 134, 45, -1, -1, 134, 68, 125, 138, 139, 136, ! 141, -1, -1, 68, 125, 138, 139, 137, 141, -1, ! 134, 68, 1, -1, 68, 1, -1, 68, 125, 1, ! -1, 134, 68, 125, 1, -1, -1, 64, 119, -1, ! 64, 119, 1, -1, 64, 1, -1, -1, 53, 140, ! -1, 53, 1, -1, 120, -1, 140, 101, 120, -1, ! 140, 101, 1, -1, 96, 97, -1, 96, 142, 97, ! -1, 143, -1, 142, 143, -1, 144, -1, 160, -1, ! 162, -1, 183, -1, 145, -1, 150, -1, 135, -1, ! 170, -1, 193, -1, 115, 146, 100, -1, 134, 115, ! 146, 100, -1, 147, -1, 146, 101, 147, -1, 146, ! 101, 1, -1, 148, -1, 148, 93, 149, -1, 148, ! 93, 1, -1, 148, 93, 149, 1, -1, 125, -1, ! 148, 98, 99, -1, 125, 1, -1, 148, 98, 1, ! -1, 148, 99, 1, -1, 273, -1, 181, -1, -1, ! 152, 151, 159, -1, 152, 1, -1, 115, 153, 157, ! -1, 60, 153, 157, -1, 134, 115, 153, 157, -1, ! 134, 60, 153, 157, -1, 115, 1, -1, 134, 115, ! 1, -1, 60, 1, -1, 134, 60, 1, -1, 134, ! 1, -1, 125, 94, 95, -1, 125, 94, 154, 95, ! -1, 153, 98, 99, -1, 125, 94, 1, -1, 153, ! 98, 1, -1, 155, -1, 154, 101, 155, -1, 154, ! 101, 1, -1, 115, 148, -1, 156, 115, 148, -1, ! 115, 1, -1, 156, 115, 1, -1, 134, -1, -1, ! 54, 158, -1, 54, 1, -1, 119, -1, 158, 101, ! 119, -1, 158, 101, 1, -1, 183, -1, 100, -1, ! 161, 183, -1, 134, -1, -1, 164, 163, 166, -1, ! 165, 157, -1, 134, 165, 157, -1, 123, 94, 95, ! -1, 123, 94, 154, 95, -1, 184, 167, -1, 184, ! 168, 167, -1, 184, 186, 167, -1, 184, 168, 186, ! 167, -1, 185, -1, 169, 94, 95, 100, -1, 169, ! 94, 241, 95, 100, -1, 122, 102, 66, 94, 241, ! 95, 100, -1, 122, 102, 66, 94, 95, 100, -1, ! 77, -1, 66, -1, -1, 62, 125, 171, 176, -1, ! -1, 134, 62, 125, 172, 176, -1, -1, 62, 125, ! 175, 173, 176, -1, -1, 134, 62, 125, 175, 174, ! 176, -1, 62, 125, 1, -1, 134, 62, 125, 1, ! -1, 64, 120, -1, 175, 101, 120, -1, 64, 1, ! -1, 175, 101, 1, -1, 96, 97, -1, 96, 177, ! 97, -1, 178, -1, 177, 178, -1, 179, -1, 180, ! -1, 135, -1, 170, -1, 145, -1, 152, 100, -1, ! 152, 1, -1, 96, 97, -1, 96, 101, 97, -1, ! 96, 182, 97, -1, 96, 182, 101, 97, -1, 149, ! -1, 182, 101, 149, -1, 182, 101, 1, -1, 96, ! 97, -1, 184, 186, 185, -1, 96, -1, 97, -1, ! 187, -1, 186, 187, -1, 188, -1, 190, -1, 135, ! -1, 189, 100, -1, 115, 146, -1, 156, 115, 146, ! -1, 192, -1, 195, -1, 199, -1, 200, -1, 211, ! -1, 215, -1, 192, -1, 196, -1, 201, -1, 212, ! -1, 216, -1, 183, -1, 193, -1, 197, -1, 202, ! -1, 214, -1, 222, -1, 223, -1, 224, -1, 226, ! -1, 225, -1, 228, -1, 100, -1, 125, 89, -1, ! 194, 190, -1, 125, 1, -1, 194, 191, -1, 198, ! 100, -1, 1, 100, -1, 1, 96, -1, 1, 97, ! -1, 169, 94, 1, -1, 169, 94, 95, 1, -1, ! 169, 94, 241, 1, -1, 169, 94, 241, 95, 1, ! -1, 122, 102, 66, 1, -1, 122, 102, 66, 94, ! 1, -1, 122, 102, 66, 94, 241, 1, -1, 122, ! 102, 66, 94, 241, 95, 1, -1, 122, 102, 66, ! 94, 95, 1, -1, 270, -1, 254, -1, 255, -1, ! 250, -1, 251, -1, 247, -1, 236, -1, 49, 94, ! 273, 95, 190, -1, 49, 1, -1, 49, 94, 1, ! -1, 49, 94, 273, 1, -1, 49, 94, 273, 95, ! 191, 57, 190, -1, 49, 94, 273, 95, 191, 57, ! 191, -1, -1, 204, 203, 205, -1, 69, 94, 273, ! 95, -1, 69, 1, -1, 69, 94, 1, -1, 69, ! 94, 273, 95, 1, -1, 96, 97, -1, 96, 208, ! 97, -1, 96, 206, 97, -1, 96, 206, 208, 97, ! -1, 207, -1, 206, 207, -1, 208, 186, -1, 209, ! -1, 208, 209, -1, 63, 274, 89, -1, 48, 89, ! -1, 63, 1, -1, 63, 274, 1, -1, 48, 1, ! -1, 67, 94, 273, 95, -1, 210, 190, -1, 67, ! 1, -1, 67, 94, 1, -1, 67, 94, 273, 1, ! -1, 210, 191, -1, 52, -1, 213, 190, 67, 94, ! 273, 95, 100, -1, 218, 100, 273, 100, 220, 95, ! 190, -1, 218, 100, 100, 220, 95, 190, -1, 218, ! 100, 1, -1, 218, 100, 273, 100, 1, -1, 218, ! 100, 100, 1, -1, 218, 100, 273, 100, 220, 95, ! 191, -1, 218, 100, 100, 220, 95, 191, -1, 72, ! 94, -1, 72, 1, -1, 72, 94, 1, -1, 217, ! 219, -1, -1, 221, -1, 189, -1, 221, 1, -1, ! -1, 221, -1, 198, -1, 221, 101, 198, -1, 221, ! 101, 1, -1, 55, 100, -1, 55, 125, 100, -1, ! 55, 1, -1, 55, 125, 1, -1, 74, 100, -1, ! 74, 125, 100, -1, 74, 1, -1, 74, 125, 1, ! -1, 59, 100, -1, 59, 273, 100, -1, 59, 1, ! -1, 59, 273, 1, -1, 50, 273, 100, -1, 50, ! 1, -1, 50, 273, 1, -1, 227, 94, 273, 95, ! 183, -1, 227, 94, 273, 95, 1, -1, 227, 1, ! -1, 227, 94, 1, 95, -1, 227, 94, 1, -1, ! 134, -1, 71, 183, 229, -1, 71, 183, 232, -1, ! 71, 183, 229, 232, -1, 71, 1, -1, 230, -1, ! 229, 230, -1, 231, 183, -1, 61, 94, 155, 95, ! -1, 61, 1, -1, 61, 94, 1, -1, 61, 94, ! 1, 95, -1, 65, 183, -1, 65, 1, -1, 234, ! -1, 242, -1, 114, -1, 77, -1, 94, 273, 95, ! -1, 236, -1, 246, -1, 247, -1, 248, -1, 235, ! -1, 122, 102, 77, -1, 94, 273, 1, -1, 122, ! 102, 1, -1, 116, 102, 1, -1, 60, 102, 1, ! -1, 122, 102, 68, -1, 121, 102, 68, -1, 116, ! 102, 68, -1, 60, 102, 68, -1, 73, 119, 94, ! 241, 95, -1, 73, 119, 94, 95, -1, 237, -1, ! 240, 125, 94, 95, -1, 240, 125, 94, 95, 141, ! -1, 240, 125, 94, 241, 95, -1, 240, 125, 94, ! 241, 95, 141, -1, 73, 1, 100, -1, 73, 119, ! 1, -1, 73, 119, 94, 1, -1, 73, 119, 94, ! 241, 1, -1, 240, 1, -1, 240, 125, 1, -1, ! -1, 73, 119, 94, 241, 95, 238, 141, -1, -1, ! 73, 119, 94, 95, 239, 141, -1, 122, 102, 73, ! -1, 233, 102, 73, -1, 273, -1, 241, 101, 273, ! -1, 241, 101, 1, -1, 73, 116, 243, -1, 73, ! 118, 243, -1, 73, 116, 243, 245, -1, 73, 118, ! 243, 245, -1, 73, 118, 245, 181, -1, 73, 116, ! 245, 181, -1, 73, 1, 99, -1, 73, 1, 98, ! -1, 244, -1, 243, 244, -1, 98, 273, 99, -1, ! 98, 273, 1, -1, 98, 1, -1, 98, 99, -1, ! 245, 98, 99, -1, 245, 98, 1, -1, 233, 102, ! 125, -1, 66, 102, 125, -1, 66, 1, -1, 122, ! 94, 95, -1, 122, 94, 241, 95, -1, 233, 102, ! 125, 94, 95, -1, 233, 102, 125, 94, 241, 95, ! -1, 66, 102, 125, 94, 95, -1, 66, 102, 125, ! 94, 241, 95, -1, 66, 102, 1, 95, -1, 66, ! 102, 1, 102, -1, 122, 98, 273, 99, -1, 234, ! 98, 273, 99, -1, 122, 98, 1, -1, 122, 98, ! 273, 1, -1, 234, 98, 1, -1, 234, 98, 273, ! 1, -1, 233, -1, 122, -1, 250, -1, 251, -1, ! 249, 47, -1, 249, 46, -1, 254, -1, 255, -1, ! 3, 253, -1, 256, -1, 3, 1, -1, 252, -1, ! 4, 252, -1, 4, 1, -1, 47, 253, -1, 47, ! 1, -1, 46, 253, -1, 46, 1, -1, 249, -1, ! 90, 253, -1, 91, 253, -1, 257, -1, 90, 1, ! -1, 91, 1, -1, 94, 116, 245, 95, 253, -1, ! 94, 116, 95, 253, -1, 94, 273, 95, 256, -1, ! 94, 122, 245, 95, 256, -1, 94, 116, 98, 1, ! -1, 94, 1, -1, 94, 116, 245, 95, 1, -1, ! 94, 116, 95, 1, -1, 94, 122, 245, 95, 1, ! -1, 253, -1, 258, 5, 253, -1, 258, 6, 253, ! -1, 258, 7, 253, -1, 258, 5, 1, -1, 258, ! 6, 1, -1, 258, 7, 1, -1, 258, -1, 259, ! 3, 258, -1, 259, 4, 258, -1, 259, 3, 1, ! -1, 259, 4, 1, -1, 259, -1, 260, 8, 259, ! -1, 260, 9, 259, -1, 260, 10, 259, -1, 260, ! 8, 1, -1, 260, 9, 1, -1, 260, 10, 1, ! -1, 260, -1, 261, 20, 260, -1, 261, 18, 260, ! -1, 261, 21, 260, -1, 261, 19, 260, -1, 261, ! 58, 117, -1, 261, 20, 1, -1, 261, 18, 1, ! -1, 261, 21, 1, -1, 261, 19, 1, -1, 261, ! 58, 1, -1, 261, -1, 262, 16, 261, -1, 262, ! 17, 261, -1, 262, 16, 1, -1, 262, 17, 1, ! -1, 262, -1, 263, 11, 262, -1, 263, 11, 1, ! -1, 263, -1, 264, 12, 263, -1, 264, 12, 1, ! -1, 264, -1, 265, 13, 264, -1, 265, 13, 1, ! -1, 265, -1, 266, 14, 265, -1, 266, 14, 1, ! -1, 266, -1, 267, 15, 266, -1, 267, 15, 1, ! -1, 267, -1, 267, 88, 273, 89, 268, -1, 267, ! 88, 89, 1, -1, 267, 88, 1, -1, 267, 88, ! 273, 89, 1, -1, 268, -1, 270, -1, 271, 272, ! 269, -1, 271, 272, 1, -1, 122, -1, 246, -1, ! 248, -1, 92, -1, 93, -1, 269, -1, 273, -1 }; ! /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ ! static const unsigned short yyrline[] = { ! 0, 606, 606, 606, 636, 637, 638, 639, 640, 641, ! 646, 647, 651, 652, 653, 657, 658, 662, 666, 670, ! 674, 682, 694, 695, 699, 703, 708, 713, 714, 715, ! 716, 717, 718, 719, 720, 724, 728, 735, 736, 740, ! 745, 747, 752, 753, 757, 783, 785, 790, 808, 810, ! 815, 817, 819, 820, 831, 835, 852, 851, 856, 855, ! 859, 861, 863, 868, 873, 874, 876, 878, 883, 884, ! 886, 894, 899, 904, 909, 917, 928, 929, 933, 934, ! 935, 936, 947, 948, 949, 951, 953, 958, 960, 972, ! 973, 975, 980, 982, 989, 995, 1004, 1005, 1007, 1009, ! 1019, 1024, 1025, 1031, 1030, 1041, 1046, 1048, 1050, 1052, ! 1054, 1059, 1061, 1063, 1065, 1073, 1078, 1080, 1089, 1091, ! 1096, 1100, 1105, 1110, 1114, 1119, 1124, 1132, 1142, 1143, ! 1145, 1150, 1152, 1154, 1159, 1160, 1165, 1174, 1191, 1190, ! 1200, 1202, 1207, 1212, 1220, 1225, 1227, 1229, 1234, 1239, ! 1245, 1253, 1255, 1260, 1266, 1278, 1277, 1282, 1281, 1286, ! 1285, 1290, 1289, 1293, 1295, 1300, 1305, 1310, 1312, 1317, ! 1319, 1324, 1325, 1329, 1330, 1331, 1333, 1338, 1342, 1347, ! 1353, 1355, 1357, 1359, 1364, 1369, 1373, 1379, 1387, 1392, ! 1397, 1411, 1412, 1416, 1417, 1419, 1427, 1431, 1433, 1438, ! 1439, 1440, 1441, 1442, 1443, 1448, 1449, 1450, 1451, 1452, ! 1457, 1458, 1459, 1460, 1461, 1462, 1463, 1464, 1465, 1466, ! 1467, 1471, 1489, 1500, 1502, 1507, 1514, 1523, 1528, 1533, ! 1538, 1540, 1545, 1547, 1552, 1554, 1556, 1558, 1560, 1565, ! 1566, 1567, 1568, 1569, 1570, 1571, 1575, 1580, 1582, 1584, ! 1589, 1594, 1600, 1599, 1615, 1620, 1622, 1624, 1632, 1634, ! 1636, 1638, 1643, 1644, 1648, 1652, 1653, 1657, 1663, 1669, ! 1671, 1673, 1678, 1686, 1688, 1690, 1692, 1697, 1702, 1711, ! 1716, 1722, 1729, 1731, 1733, 1738, 1740, 1750, 1756, 1758, ! 1763, 1776, 1777, 1783, 1789, 1794, 1795, 1800, 1802, 1804, ! 1809, 1811, 1813, 1815, 1820, 1822, 1824, 1826, 1831, 1833, ! 1835, 1837, 1842, 1847, 1849, 1854, 1860, 1862, 1864, 1866, ! 1871, 1883, 1885, 1887, 1892, 1897, 1898, 1906, 1915, 1931, ! 1933, 1938, 1943, 1945, 1951, 1952, 1956, 1957, 1959, 1961, ! 1962, 1963, 1964, 1965, 1969, 1974, 1976, 1978, 1980, 1985, ! 1987, 1989, 1991, 1999, 2001, 2003, 2007, 2013, 2014, 2020, ! 2021, 2023, 2025, 2027, 2029, 2031, 2042, 2041, 2075, 2074, ! 2092, 2094, 2099, 2104, 2109, 2114, 2116, 2118, 2120, 2124, ! 2135, 2144, 2146, 2151, 2153, 2158, 2168, 2170, 2179, 2205, ! 2207, 2212, 2216, 2222, 2227, 2229, 2231, 2242, 2253, 2258, ! 2267, 2269, 2274, 2276, 2278, 2283, 2288, 2293, 2301, 2302, ! 2303, 2304, 2308, 2313, 2318, 2319, 2320, 2322, 2323, 2328, ! 2333, 2335, 2340, 2342, 2347, 2349, 2354, 2355, 2357, 2359, ! 2360, 2362, 2367, 2375, 2377, 2379, 2393, 2395, 2400, 2402, ! 2404, 2409, 2410, 2415, 2420, 2425, 2427, 2429, 2434, 2435, ! 2440, 2445, 2447, 2452, 2453, 2458, 2463, 2468, 2470, 2472, ! 2477, 2478, 2483, 2488, 2493, 2498, 2500, 2502, 2504, 2506, ! 2508, 2513, 2514, 2519, 2524, 2526, 2531, 2532, 2537, 2542, ! 2543, 2548, 2553, 2554, 2559, 2564, 2565, 2570, 2575, 2576, ! 2581, 2586, 2587, 2592, 2598, 2600, 2605, 2606, 2610, 2612, ! 2620, 2621, 2622, 2626, 2627, 2631, 2635 }; #endif ! #if YYDEBUG || YYERROR_VERBOSE ! /* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. ! First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { ! "$end", "error", "$undefined", "PLUS_TK", "MINUS_TK", "MULT_TK", "DIV_TK", "REM_TK", "LS_TK", "SRS_TK", "ZRS_TK", "AND_TK", "XOR_TK", "OR_TK", "BOOL_AND_TK", "BOOL_OR_TK", "EQ_TK", "NEQ_TK", "GT_TK", "GTE_TK", "LT_TK", "LTE_TK", "PLUS_ASSIGN_TK", "MINUS_ASSIGN_TK", --- 574,896 ---- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 1, 3, 4, 5, ! 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ! 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, ! 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, ! 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, ! 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, ! 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, ! 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, ! 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, ! 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, ! 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, ! 106, 107, 108, 109, 110, 111 }; #if YYDEBUG ! static const short yyprhs[] = { ! 0, 0, 1, 4, 6, 8, 10, 12, 14, 16, ! 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, ! 39, 42, 44, 46, 48, 52, 54, 55, 57, 59, ! 61, 64, 67, 70, 74, 76, 79, 81, 84, 88, ! 91, 95, 97, 99, 103, 106, 110, 116, 121, 127, ! 129, 131, 133, 135, 137, 140, 141, 149, 150, 157, ! 161, 164, 168, 173, 174, 177, 181, 184, 185, 188, ! 191, 193, 197, 201, 204, 208, 210, 213, 215, 217, ! 219, 221, 223, 225, 227, 229, 231, 235, 240, 242, ! 246, 250, 252, 256, 260, 265, 267, 271, 274, 278, ! 282, 284, 286, 287, 291, 294, 298, 302, 307, 312, ! 315, 319, 322, 326, 329, 333, 338, 342, 346, 350, ! 352, 356, 360, 363, 367, 370, 374, 376, 377, 380, ! 383, 385, 389, 393, 395, 397, 400, 402, 403, 407, ! 410, 414, 418, 423, 426, 430, 434, 439, 441, 446, ! 452, 460, 467, 469, 471, 472, 477, 478, 484, 485, ! 491, 492, 499, 503, 508, 511, 515, 518, 522, 525, ! 529, 531, 534, 536, 538, 540, 542, 544, 547, 550, ! 553, 557, 561, 566, 568, 572, 576, 579, 583, 585, ! 587, 589, 592, 594, 596, 598, 601, 604, 608, 610, ! 612, 614, 616, 618, 620, 622, 624, 626, 628, 630, ! 632, 634, 636, 638, 640, 642, 644, 646, 648, 650, ! 652, 654, 656, 659, 662, 665, 668, 671, 674, 677, ! 680, 684, 689, 694, 700, 705, 711, 718, 726, 733, ! 735, 737, 739, 741, 743, 745, 747, 753, 756, 760, ! 765, 773, 781, 782, 786, 791, 794, 798, 804, 807, ! 811, 815, 820, 822, 825, 828, 830, 833, 837, 840, ! 843, 847, 850, 855, 858, 861, 865, 870, 873, 875, ! 883, 891, 898, 902, 908, 913, 921, 928, 931, 934, ! 938, 941, 942, 944, 946, 949, 950, 952, 954, 958, ! 962, 965, 969, 972, 976, 979, 983, 986, 990, 993, ! 997, 1000, 1004, 1008, 1011, 1015, 1021, 1025, 1028, 1032, ! 1038, 1044, 1047, 1052, 1056, 1058, 1062, 1066, 1071, 1074, ! 1076, 1079, 1082, 1087, 1090, 1094, 1099, 1102, 1105, 1107, ! 1109, 1111, 1113, 1117, 1119, 1121, 1123, 1125, 1127, 1131, ! 1135, 1139, 1143, 1147, 1151, 1155, 1159, 1163, 1169, 1174, ! 1176, 1181, 1187, 1193, 1200, 1204, 1208, 1213, 1219, 1222, ! 1226, 1227, 1235, 1236, 1243, 1247, 1251, 1253, 1257, 1261, ! 1265, 1269, 1274, 1279, 1284, 1289, 1293, 1297, 1299, 1302, ! 1306, 1310, 1313, 1316, 1320, 1324, 1328, 1332, 1335, 1339, ! 1344, 1350, 1357, 1363, 1370, 1375, 1380, 1385, 1390, 1394, ! 1399, 1403, 1408, 1410, 1412, 1414, 1416, 1419, 1422, 1424, ! 1426, 1429, 1431, 1434, 1436, 1439, 1442, 1445, 1448, 1451, ! 1454, 1456, 1459, 1462, 1464, 1467, 1470, 1476, 1481, 1486, ! 1492, 1497, 1500, 1506, 1511, 1517, 1519, 1523, 1527, 1531, ! 1535, 1539, 1543, 1545, 1549, 1553, 1557, 1561, 1563, 1567, ! 1571, 1575, 1579, 1583, 1587, 1589, 1593, 1597, 1601, 1605, ! 1609, 1613, 1617, 1621, 1625, 1629, 1631, 1635, 1639, 1643, ! 1647, 1649, 1653, 1657, 1659, 1663, 1667, 1669, 1673, 1677, ! 1679, 1683, 1687, 1689, 1693, 1697, 1699, 1705, 1710, 1714, ! 1720, 1722, 1724, 1728, 1732, 1734, 1736, 1738, 1740, 1742, ! 1744 }; static const short yyrhs[] = { ! -1, 113, 126, 0, 106, 0, 107, 0, 110, 0, ! 105, 0, 104, 0, 111, 0, 116, 0, 117, 0, ! 84, 0, 87, 0, 51, 0, 118, 0, 121, 0, ! 122, 0, 118, 0, 118, 0, 116, 246, 0, 122, ! 246, 0, 123, 0, 124, 0, 125, 0, 122, 103, ! 125, 0, 88, 0, 0, 129, 0, 127, 0, 128, ! 0, 129, 127, 0, 129, 128, 0, 127, 128, 0, ! 129, 127, 128, 0, 130, 0, 127, 130, 0, 133, ! 0, 128, 133, 0, 76, 122, 101, 0, 76, 1, ! 0, 76, 122, 1, 0, 131, 0, 132, 0, 56, ! 122, 101, 0, 56, 1, 0, 56, 122, 1, 0, ! 56, 122, 103, 5, 101, 0, 56, 122, 103, 1, ! 0, 56, 122, 103, 5, 1, 0, 135, 0, 170, ! 0, 193, 0, 1, 0, 45, 0, 134, 45, 0, ! 0, 134, 68, 125, 138, 139, 136, 141, 0, 0, ! 68, 125, 138, 139, 137, 141, 0, 134, 68, 1, ! 0, 68, 1, 0, 68, 125, 1, 0, 134, 68, ! 125, 1, 0, 0, 64, 119, 0, 64, 119, 1, ! 0, 64, 1, 0, 0, 53, 140, 0, 53, 1, ! 0, 120, 0, 140, 102, 120, 0, 140, 102, 1, ! 0, 97, 98, 0, 97, 142, 98, 0, 143, 0, ! 142, 143, 0, 144, 0, 160, 0, 162, 0, 183, ! 0, 145, 0, 150, 0, 135, 0, 170, 0, 193, ! 0, 115, 146, 101, 0, 134, 115, 146, 101, 0, ! 147, 0, 146, 102, 147, 0, 146, 102, 1, 0, ! 148, 0, 148, 94, 149, 0, 148, 94, 1, 0, ! 148, 94, 149, 1, 0, 125, 0, 148, 99, 100, ! 0, 125, 1, 0, 148, 99, 1, 0, 148, 100, ! 1, 0, 274, 0, 181, 0, 0, 152, 151, 159, ! 0, 152, 1, 0, 115, 153, 157, 0, 60, 153, ! 157, 0, 134, 115, 153, 157, 0, 134, 60, 153, ! 157, 0, 115, 1, 0, 134, 115, 1, 0, 60, ! 1, 0, 134, 60, 1, 0, 134, 1, 0, 125, ! 95, 96, 0, 125, 95, 154, 96, 0, 153, 99, ! 100, 0, 125, 95, 1, 0, 153, 99, 1, 0, ! 155, 0, 154, 102, 155, 0, 154, 102, 1, 0, ! 115, 148, 0, 156, 115, 148, 0, 115, 1, 0, ! 156, 115, 1, 0, 134, 0, 0, 54, 158, 0, ! 54, 1, 0, 119, 0, 158, 102, 119, 0, 158, ! 102, 1, 0, 183, 0, 101, 0, 161, 183, 0, ! 134, 0, 0, 164, 163, 166, 0, 165, 157, 0, ! 134, 165, 157, 0, 123, 95, 96, 0, 123, 95, ! 154, 96, 0, 184, 167, 0, 184, 168, 167, 0, ! 184, 186, 167, 0, 184, 168, 186, 167, 0, 185, ! 0, 169, 95, 96, 101, 0, 169, 95, 242, 96, ! 101, 0, 122, 103, 66, 95, 242, 96, 101, 0, ! 122, 103, 66, 95, 96, 101, 0, 77, 0, 66, ! 0, 0, 62, 125, 171, 176, 0, 0, 134, 62, ! 125, 172, 176, 0, 0, 62, 125, 175, 173, 176, ! 0, 0, 134, 62, 125, 175, 174, 176, 0, 62, ! 125, 1, 0, 134, 62, 125, 1, 0, 64, 120, ! 0, 175, 102, 120, 0, 64, 1, 0, 175, 102, ! 1, 0, 97, 98, 0, 97, 177, 98, 0, 178, ! 0, 177, 178, 0, 179, 0, 180, 0, 135, 0, ! 170, 0, 145, 0, 152, 101, 0, 152, 1, 0, ! 97, 98, 0, 97, 102, 98, 0, 97, 182, 98, ! 0, 97, 182, 102, 98, 0, 149, 0, 182, 102, ! 149, 0, 182, 102, 1, 0, 97, 98, 0, 184, ! 186, 185, 0, 97, 0, 98, 0, 187, 0, 186, ! 187, 0, 188, 0, 190, 0, 135, 0, 189, 101, ! 0, 115, 146, 0, 156, 115, 146, 0, 192, 0, ! 195, 0, 199, 0, 200, 0, 211, 0, 215, 0, ! 192, 0, 196, 0, 201, 0, 212, 0, 216, 0, ! 183, 0, 193, 0, 197, 0, 202, 0, 214, 0, ! 222, 0, 223, 0, 224, 0, 227, 0, 225, 0, ! 229, 0, 226, 0, 101, 0, 125, 90, 0, 194, ! 190, 0, 125, 1, 0, 194, 191, 0, 198, 101, ! 0, 1, 101, 0, 1, 97, 0, 1, 98, 0, ! 169, 95, 1, 0, 169, 95, 96, 1, 0, 169, ! 95, 242, 1, 0, 169, 95, 242, 96, 1, 0, ! 122, 103, 66, 1, 0, 122, 103, 66, 95, 1, ! 0, 122, 103, 66, 95, 242, 1, 0, 122, 103, ! 66, 95, 242, 96, 1, 0, 122, 103, 66, 95, ! 96, 1, 0, 271, 0, 255, 0, 256, 0, 251, ! 0, 252, 0, 248, 0, 237, 0, 49, 95, 274, ! 96, 190, 0, 49, 1, 0, 49, 95, 1, 0, ! 49, 95, 274, 1, 0, 49, 95, 274, 96, 191, ! 57, 190, 0, 49, 95, 274, 96, 191, 57, 191, ! 0, 0, 204, 203, 205, 0, 69, 95, 274, 96, ! 0, 69, 1, 0, 69, 95, 1, 0, 69, 95, ! 274, 96, 1, 0, 97, 98, 0, 97, 208, 98, ! 0, 97, 206, 98, 0, 97, 206, 208, 98, 0, ! 207, 0, 206, 207, 0, 208, 186, 0, 209, 0, ! 208, 209, 0, 63, 275, 90, 0, 48, 90, 0, ! 63, 1, 0, 63, 275, 1, 0, 48, 1, 0, ! 67, 95, 274, 96, 0, 210, 190, 0, 67, 1, ! 0, 67, 95, 1, 0, 67, 95, 274, 1, 0, ! 210, 191, 0, 52, 0, 213, 190, 67, 95, 274, ! 96, 101, 0, 218, 101, 274, 101, 220, 96, 190, ! 0, 218, 101, 101, 220, 96, 190, 0, 218, 101, ! 1, 0, 218, 101, 274, 101, 1, 0, 218, 101, ! 101, 1, 0, 218, 101, 274, 101, 220, 96, 191, ! 0, 218, 101, 101, 220, 96, 191, 0, 72, 95, ! 0, 72, 1, 0, 72, 95, 1, 0, 217, 219, ! 0, 0, 221, 0, 189, 0, 221, 1, 0, 0, ! 221, 0, 198, 0, 221, 102, 198, 0, 221, 102, ! 1, 0, 55, 101, 0, 55, 125, 101, 0, 55, ! 1, 0, 55, 125, 1, 0, 74, 101, 0, 74, ! 125, 101, 0, 74, 1, 0, 74, 125, 1, 0, ! 59, 101, 0, 59, 274, 101, 0, 59, 1, 0, ! 59, 274, 1, 0, 50, 274, 101, 0, 50, 1, ! 0, 50, 274, 1, 0, 78, 274, 90, 274, 101, ! 0, 78, 274, 101, 0, 78, 1, 0, 78, 274, ! 1, 0, 228, 95, 274, 96, 183, 0, 228, 95, ! 274, 96, 1, 0, 228, 1, 0, 228, 95, 1, ! 96, 0, 228, 95, 1, 0, 134, 0, 71, 183, ! 230, 0, 71, 183, 233, 0, 71, 183, 230, 233, ! 0, 71, 1, 0, 231, 0, 230, 231, 0, 232, ! 183, 0, 61, 95, 155, 96, 0, 61, 1, 0, ! 61, 95, 1, 0, 61, 95, 1, 96, 0, 65, ! 183, 0, 65, 1, 0, 235, 0, 243, 0, 114, ! 0, 77, 0, 95, 274, 96, 0, 237, 0, 247, ! 0, 248, 0, 249, 0, 236, 0, 122, 103, 77, ! 0, 95, 274, 1, 0, 122, 103, 1, 0, 116, ! 103, 1, 0, 60, 103, 1, 0, 122, 103, 68, ! 0, 121, 103, 68, 0, 116, 103, 68, 0, 60, ! 103, 68, 0, 73, 119, 95, 242, 96, 0, 73, ! 119, 95, 96, 0, 238, 0, 241, 125, 95, 96, ! 0, 241, 125, 95, 96, 141, 0, 241, 125, 95, ! 242, 96, 0, 241, 125, 95, 242, 96, 141, 0, ! 73, 1, 101, 0, 73, 119, 1, 0, 73, 119, ! 95, 1, 0, 73, 119, 95, 242, 1, 0, 241, ! 1, 0, 241, 125, 1, 0, 0, 73, 119, 95, ! 242, 96, 239, 141, 0, 0, 73, 119, 95, 96, ! 240, 141, 0, 122, 103, 73, 0, 234, 103, 73, ! 0, 274, 0, 242, 102, 274, 0, 242, 102, 1, ! 0, 73, 116, 244, 0, 73, 118, 244, 0, 73, ! 116, 244, 246, 0, 73, 118, 244, 246, 0, 73, ! 118, 246, 181, 0, 73, 116, 246, 181, 0, 73, ! 1, 100, 0, 73, 1, 99, 0, 245, 0, 244, ! 245, 0, 99, 274, 100, 0, 99, 274, 1, 0, ! 99, 1, 0, 99, 100, 0, 246, 99, 100, 0, ! 246, 99, 1, 0, 234, 103, 125, 0, 66, 103, ! 125, 0, 66, 1, 0, 122, 95, 96, 0, 122, ! 95, 242, 96, 0, 234, 103, 125, 95, 96, 0, ! 234, 103, 125, 95, 242, 96, 0, 66, 103, 125, ! 95, 96, 0, 66, 103, 125, 95, 242, 96, 0, ! 66, 103, 1, 96, 0, 66, 103, 1, 103, 0, ! 122, 99, 274, 100, 0, 235, 99, 274, 100, 0, ! 122, 99, 1, 0, 122, 99, 274, 1, 0, 235, ! 99, 1, 0, 235, 99, 274, 1, 0, 234, 0, ! 122, 0, 251, 0, 252, 0, 250, 47, 0, 250, ! 46, 0, 255, 0, 256, 0, 3, 254, 0, 257, ! 0, 3, 1, 0, 253, 0, 4, 253, 0, 4, ! 1, 0, 47, 254, 0, 47, 1, 0, 46, 254, ! 0, 46, 1, 0, 250, 0, 91, 254, 0, 92, ! 254, 0, 258, 0, 91, 1, 0, 92, 1, 0, ! 95, 116, 246, 96, 254, 0, 95, 116, 96, 254, ! 0, 95, 274, 96, 257, 0, 95, 122, 246, 96, ! 257, 0, 95, 116, 99, 1, 0, 95, 1, 0, ! 95, 116, 246, 96, 1, 0, 95, 116, 96, 1, ! 0, 95, 122, 246, 96, 1, 0, 254, 0, 259, ! 5, 254, 0, 259, 6, 254, 0, 259, 7, 254, ! 0, 259, 5, 1, 0, 259, 6, 1, 0, 259, ! 7, 1, 0, 259, 0, 260, 3, 259, 0, 260, ! 4, 259, 0, 260, 3, 1, 0, 260, 4, 1, ! 0, 260, 0, 261, 8, 260, 0, 261, 9, 260, ! 0, 261, 10, 260, 0, 261, 8, 1, 0, 261, ! 9, 1, 0, 261, 10, 1, 0, 261, 0, 262, ! 20, 261, 0, 262, 18, 261, 0, 262, 21, 261, ! 0, 262, 19, 261, 0, 262, 58, 117, 0, 262, ! 20, 1, 0, 262, 18, 1, 0, 262, 21, 1, ! 0, 262, 19, 1, 0, 262, 58, 1, 0, 262, ! 0, 263, 16, 262, 0, 263, 17, 262, 0, 263, ! 16, 1, 0, 263, 17, 1, 0, 263, 0, 264, ! 11, 263, 0, 264, 11, 1, 0, 264, 0, 265, ! 12, 264, 0, 265, 12, 1, 0, 265, 0, 266, ! 13, 265, 0, 266, 13, 1, 0, 266, 0, 267, ! 14, 266, 0, 267, 14, 1, 0, 267, 0, 268, ! 15, 267, 0, 268, 15, 1, 0, 268, 0, 268, ! 89, 274, 90, 269, 0, 268, 89, 90, 1, 0, ! 268, 89, 1, 0, 268, 89, 274, 90, 1, 0, ! 269, 0, 271, 0, 272, 273, 270, 0, 272, 273, ! 1, 0, 122, 0, 247, 0, 249, 0, 93, 0, ! 94, 0, 270, 0, 274, 0 }; ! #endif ! ! #if YYDEBUG ! /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ ! static const short yyrline[] = { ! 0, 605, 605, 621, 623, 624, 625, 626, 627, 631, ! 633, 636, 638, 639, 642, 644, 647, 651, 655, 659, ! 668, 679, 681, 684, 688, 693, 698, 700, 701, 702, ! 703, 704, 705, 706, 709, 714, 720, 722, 725, 731, ! 733, 737, 739, 742, 769, 771, 775, 794, 796, 800, ! 803, 805, 806, 816, 821, 836, 836, 841, 841, 845, ! 847, 849, 854, 858, 860, 862, 864, 868, 870, 872, ! 879, 885, 890, 894, 903, 913, 915, 918, 920, 921, ! 922, 932, 934, 935, 937, 939, 943, 946, 956, 959, ! 961, 965, 968, 975, 981, 989, 991, 993, 995, 1000, ! 1004, 1006, 1010, 1010, 1022, 1026, 1029, 1031, 1033, 1035, ! 1040, 1045, 1050, 1055, 1062, 1068, 1070, 1079, 1081, 1085, ! 1090, 1095, 1099, 1104, 1109, 1114, 1121, 1131, 1133, 1135, ! 1139, 1142, 1144, 1148, 1150, 1154, 1163, 1179, 1179, 1189, ! 1192, 1196, 1202, 1206, 1215, 1217, 1219, 1223, 1228, 1235, ! 1243, 1245, 1249, 1256, 1266, 1266, 1271, 1271, 1275, 1275, ! 1279, 1279, 1283, 1285, 1289, 1295, 1300, 1302, 1306, 1309, ! 1313, 1315, 1318, 1320, 1321, 1323, 1327, 1331, 1337, 1342, ! 1345, 1347, 1349, 1353, 1359, 1363, 1368, 1377, 1381, 1386, ! 1400, 1402, 1405, 1407, 1409, 1416, 1420, 1423, 1427, 1429, ! 1430, 1431, 1432, 1433, 1437, 1439, 1440, 1441, 1442, 1446, ! 1448, 1449, 1450, 1451, 1452, 1453, 1454, 1455, 1456, 1457, ! 1458, 1461, 1479, 1490, 1493, 1497, 1504, 1514, 1519, 1524, ! 1529, 1531, 1536, 1538, 1543, 1545, 1547, 1549, 1551, 1555, ! 1557, 1558, 1559, 1560, 1561, 1562, 1565, 1571, 1573, 1575, ! 1579, 1584, 1589, 1589, 1605, 1611, 1613, 1615, 1622, 1625, ! 1627, 1629, 1633, 1635, 1638, 1642, 1644, 1647, 1654, 1660, ! 1662, 1664, 1668, 1676, 1679, 1681, 1683, 1687, 1692, 1701, ! 1706, 1713, 1720, 1722, 1724, 1728, 1731, 1740, 1747, 1749, ! 1753, 1766, 1768, 1774, 1780, 1784, 1786, 1790, 1793, 1795, ! 1799, 1802, 1804, 1806, 1810, 1813, 1815, 1817, 1821, 1824, ! 1826, 1828, 1832, 1838, 1840, 1844, 1849, 1853, 1855, 1859, ! 1866, 1868, 1870, 1872, 1876, 1888, 1891, 1893, 1898, 1902, ! 1904, 1911, 1920, 1937, 1939, 1944, 1948, 1951, 1956, 1958, ! 1961, 1963, 1965, 1967, 1968, 1969, 1970, 1971, 1975, 1980, ! 1982, 1984, 1986, 1990, 1993, 1995, 1997, 2004, 2007, 2009, ! 2013, 2019, 2020, 2026, 2027, 2029, 2031, 2033, 2035, 2037, ! 2046, 2046, 2080, 2080, 2097, 2100, 2104, 2110, 2115, 2119, ! 2122, 2124, 2126, 2130, 2141, 2150, 2152, 2156, 2159, 2163, ! 2174, 2176, 2184, 2211, 2213, 2217, 2222, 2228, 2232, 2235, ! 2237, 2248, 2259, 2264, 2273, 2275, 2279, 2282, 2284, 2289, ! 2294, 2299, 2306, 2308, 2309, 2310, 2313, 2318, 2323, 2325, ! 2326, 2328, 2329, 2333, 2339, 2341, 2345, 2348, 2352, 2355, ! 2359, 2361, 2363, 2365, 2366, 2368, 2372, 2381, 2383, 2385, ! 2399, 2401, 2406, 2408, 2410, 2414, 2416, 2421, 2426, 2431, ! 2433, 2435, 2439, 2441, 2446, 2451, 2453, 2457, 2459, 2464, ! 2469, 2474, 2476, 2478, 2482, 2484, 2489, 2494, 2499, 2504, ! 2506, 2508, 2510, 2512, 2514, 2518, 2520, 2525, 2530, 2532, ! 2536, 2538, 2543, 2547, 2549, 2554, 2558, 2560, 2565, 2569, ! 2571, 2576, 2580, 2582, 2587, 2591, 2593, 2598, 2604, 2606, ! 2610, 2612, 2615, 2618, 2625, 2627, 2628, 2631, 2633, 2636, ! 2640 }; #endif ! ! #if (YYDEBUG) || defined YYERROR_VERBOSE ! ! /* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */ static const char *const yytname[] = { ! "$", "error", "$undefined.", "PLUS_TK", "MINUS_TK", "MULT_TK", "DIV_TK", "REM_TK", "LS_TK", "SRS_TK", "ZRS_TK", "AND_TK", "XOR_TK", "OR_TK", "BOOL_AND_TK", "BOOL_OR_TK", "EQ_TK", "NEQ_TK", "GT_TK", "GTE_TK", "LT_TK", "LTE_TK", "PLUS_ASSIGN_TK", "MINUS_ASSIGN_TK", *************** static const char *const yytname[] = *** 1195,1207 **** "ELSE_TK", "INSTANCEOF_TK", "RETURN_TK", "VOID_TK", "CATCH_TK", "INTERFACE_TK", "CASE_TK", "EXTENDS_TK", "FINALLY_TK", "SUPER_TK", "WHILE_TK", "CLASS_TK", "SWITCH_TK", "CONST_TK", "TRY_TK", "FOR_TK", ! "NEW_TK", "CONTINUE_TK", "GOTO_TK", "PACKAGE_TK", "THIS_TK", "BYTE_TK", ! "SHORT_TK", "INT_TK", "LONG_TK", "CHAR_TK", "INTEGRAL_TK", "FLOAT_TK", ! "DOUBLE_TK", "FP_TK", "ID_TK", "REL_QM_TK", "REL_CL_TK", "NOT_TK", ! "NEG_TK", "ASSIGN_ANY_TK", "ASSIGN_TK", "OP_TK", "CP_TK", "OCB_TK", ! "CCB_TK", "OSB_TK", "CSB_TK", "SC_TK", "C_TK", "DOT_TK", ! "STRING_LIT_TK", "CHAR_LIT_TK", "INT_LIT_TK", "FP_LIT_TK", "TRUE_TK", ! "FALSE_TK", "BOOL_LIT_TK", "NULL_TK", "$accept", "goal", "@1", "literal", "type", "primitive_type", "reference_type", "class_or_interface_type", "class_type", "interface_type", "array_type", "name", "simple_name", "qualified_name", "identifier", --- 904,916 ---- "ELSE_TK", "INSTANCEOF_TK", "RETURN_TK", "VOID_TK", "CATCH_TK", "INTERFACE_TK", "CASE_TK", "EXTENDS_TK", "FINALLY_TK", "SUPER_TK", "WHILE_TK", "CLASS_TK", "SWITCH_TK", "CONST_TK", "TRY_TK", "FOR_TK", ! "NEW_TK", "CONTINUE_TK", "GOTO_TK", "PACKAGE_TK", "THIS_TK", ! "ASSERT_TK", "BYTE_TK", "SHORT_TK", "INT_TK", "LONG_TK", "CHAR_TK", ! "INTEGRAL_TK", "FLOAT_TK", "DOUBLE_TK", "FP_TK", "ID_TK", "REL_QM_TK", ! "REL_CL_TK", "NOT_TK", "NEG_TK", "ASSIGN_ANY_TK", "ASSIGN_TK", "OP_TK", ! "CP_TK", "OCB_TK", "CCB_TK", "OSB_TK", "CSB_TK", "SC_TK", "C_TK", ! "DOT_TK", "STRING_LIT_TK", "CHAR_LIT_TK", "INT_LIT_TK", "FP_LIT_TK", ! "TRUE_TK", "FALSE_TK", "BOOL_LIT_TK", "NULL_TK", "goal", "@1", "literal", "type", "primitive_type", "reference_type", "class_or_interface_type", "class_type", "interface_type", "array_type", "name", "simple_name", "qualified_name", "identifier", *************** static const char *const yytname[] = *** 1238,1246 **** "for_statement_nsi", "for_header", "for_begin", "for_init", "for_update", "statement_expression_list", "break_statement", "continue_statement", "return_statement", "throw_statement", ! "synchronized_statement", "synchronized", "try_statement", "catches", ! "catch_clause", "catch_clause_parameter", "finally", "primary", ! "primary_no_new_array", "type_literals", "class_instance_creation_expression", "anonymous_class_creation", "@11", "@12", "something_dot_new", "argument_list", "array_creation_expression", "dim_exprs", "dim_expr", "dims", --- 947,955 ---- "for_statement_nsi", "for_header", "for_begin", "for_init", "for_update", "statement_expression_list", "break_statement", "continue_statement", "return_statement", "throw_statement", ! "assert_statement", "synchronized_statement", "synchronized", ! "try_statement", "catches", "catch_clause", "catch_clause_parameter", ! "finally", "primary", "primary_no_new_array", "type_literals", "class_instance_creation_expression", "anonymous_class_creation", "@11", "@12", "something_dot_new", "argument_list", "array_creation_expression", "dim_exprs", "dim_expr", "dims", *************** static const char *const yytname[] = *** 1259,1308 **** }; #endif ! # ifdef YYPRINT ! /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to ! token YYLEX-NUM. */ ! static const unsigned short yytoknum[] = ! { ! 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, ! 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, ! 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, ! 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, ! 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, ! 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, ! 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, ! 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, ! 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, ! 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, ! 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, ! 365 ! }; ! # endif ! ! /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ ! static const unsigned short yyr1[] = { ! 0, 111, 113, 112, 114, 114, 114, 114, 114, 114, ! 115, 115, 116, 116, 116, 117, 117, 118, 119, 120, ! 121, 121, 122, 122, 123, 124, 125, 126, 126, 126, ! 126, 126, 126, 126, 126, 127, 127, 128, 128, 129, ! 129, 129, 130, 130, 131, 131, 131, 132, 132, 132, ! 133, 133, 133, 133, 134, 134, 136, 135, 137, 135, ! 135, 135, 135, 135, 138, 138, 138, 138, 139, 139, ! 139, 140, 140, 140, 141, 141, 142, 142, 143, 143, ! 143, 143, 144, 144, 144, 144, 144, 145, 145, 146, ! 146, 146, 147, 147, 147, 147, 148, 148, 148, 148, ! 148, 149, 149, 151, 150, 150, 152, 152, 152, 152, ! 152, 152, 152, 152, 152, 153, 153, 153, 153, 153, ! 154, 154, 154, 155, 155, 155, 155, 156, 157, 157, ! 157, 158, 158, 158, 159, 159, 160, 161, 163, 162, ! 164, 164, 165, 165, 166, 166, 166, 166, 167, 168, ! 168, 168, 168, 169, 169, 171, 170, 172, 170, 173, ! 170, 174, 170, 170, 170, 175, 175, 175, 175, 176, ! 176, 177, 177, 178, 178, 178, 178, 179, 180, 180, ! 181, 181, 181, 181, 182, 182, 182, 183, 183, 184, ! 185, 186, 186, 187, 187, 187, 188, 189, 189, 190, ! 190, 190, 190, 190, 190, 191, 191, 191, 191, 191, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 193, 194, 195, 195, 196, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 198, --- 968,997 ---- }; #endif ! /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ ! static const short yyr1[] = { ! 0, 113, 112, 114, 114, 114, 114, 114, 114, 115, ! 115, 116, 116, 116, 117, 117, 118, 119, 120, 121, ! 121, 122, 122, 123, 124, 125, 126, 126, 126, 126, ! 126, 126, 126, 126, 127, 127, 128, 128, 129, 129, ! 129, 130, 130, 131, 131, 131, 132, 132, 132, 133, ! 133, 133, 133, 134, 134, 136, 135, 137, 135, 135, ! 135, 135, 135, 138, 138, 138, 138, 139, 139, 139, ! 140, 140, 140, 141, 141, 142, 142, 143, 143, 143, ! 143, 144, 144, 144, 144, 144, 145, 145, 146, 146, ! 146, 147, 147, 147, 147, 148, 148, 148, 148, 148, ! 149, 149, 151, 150, 150, 152, 152, 152, 152, 152, ! 152, 152, 152, 152, 153, 153, 153, 153, 153, 154, ! 154, 154, 155, 155, 155, 155, 156, 157, 157, 157, ! 158, 158, 158, 159, 159, 160, 161, 163, 162, 164, ! 164, 165, 165, 166, 166, 166, 166, 167, 168, 168, ! 168, 168, 169, 169, 171, 170, 172, 170, 173, 170, ! 174, 170, 170, 170, 175, 175, 175, 175, 176, 176, ! 177, 177, 178, 178, 178, 178, 179, 180, 180, 181, ! 181, 181, 181, 182, 182, 182, 183, 183, 184, 185, ! 186, 186, 187, 187, 187, 188, 189, 189, 190, 190, ! 190, 190, 190, 190, 191, 191, 191, 191, 191, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 193, 194, 195, 195, 196, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 198, *************** static const unsigned short yyr1[] = *** 1313,1363 **** 215, 215, 215, 215, 215, 216, 216, 217, 217, 217, 218, 219, 219, 219, 219, 220, 220, 221, 221, 221, 222, 222, 222, 222, 223, 223, 223, 223, 224, 224, ! 224, 224, 225, 225, 225, 226, 226, 226, 226, 226, ! 227, 228, 228, 228, 228, 229, 229, 230, 231, 231, ! 231, 231, 232, 232, 233, 233, 234, 234, 234, 234, ! 234, 234, 234, 234, 234, 234, 234, 234, 234, 235, ! 235, 235, 235, 236, 236, 236, 236, 236, 236, 236, ! 236, 236, 236, 236, 236, 236, 238, 237, 239, 237, ! 240, 240, 241, 241, 241, 242, 242, 242, 242, 242, ! 242, 242, 242, 243, 243, 244, 244, 244, 245, 245, ! 245, 246, 246, 246, 247, 247, 247, 247, 247, 247, ! 247, 247, 248, 248, 248, 248, 248, 248, 249, 249, ! 249, 249, 250, 251, 252, 252, 252, 252, 252, 253, ! 253, 253, 254, 254, 255, 255, 256, 256, 256, 256, ! 256, 256, 257, 257, 257, 257, 257, 257, 257, 257, ! 257, 258, 258, 258, 258, 258, 258, 258, 259, 259, ! 259, 259, 259, 260, 260, 260, 260, 260, 260, 260, ! 261, 261, 261, 261, 261, 261, 261, 261, 261, 261, ! 261, 262, 262, 262, 262, 262, 263, 263, 263, 264, ! 264, 264, 265, 265, 265, 266, 266, 266, 267, 267, ! 267, 268, 268, 268, 268, 268, 269, 269, 270, 270, ! 271, 271, 271, 272, 272, 273, 274 }; ! /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ ! static const unsigned char yyr2[] = { ! 0, 2, 0, 2, 1, 1, 1, 1, 1, 1, ! 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ! 2, 2, 1, 1, 1, 3, 1, 0, 1, 1, ! 1, 2, 2, 2, 3, 1, 2, 1, 2, 3, ! 2, 3, 1, 1, 3, 2, 3, 5, 4, 5, ! 1, 1, 1, 1, 1, 2, 0, 7, 0, 6, ! 3, 2, 3, 4, 0, 2, 3, 2, 0, 2, ! 2, 1, 3, 3, 2, 3, 1, 2, 1, 1, ! 1, 1, 1, 1, 1, 1, 1, 3, 4, 1, ! 3, 3, 1, 3, 3, 4, 1, 3, 2, 3, ! 3, 1, 1, 0, 3, 2, 3, 3, 4, 4, ! 2, 3, 2, 3, 2, 3, 4, 3, 3, 3, ! 1, 3, 3, 2, 3, 2, 3, 1, 0, 2, ! 2, 1, 3, 3, 1, 1, 2, 1, 0, 3, ! 2, 3, 3, 4, 2, 3, 3, 4, 1, 4, ! 5, 7, 6, 1, 1, 0, 4, 0, 5, 0, ! 5, 0, 6, 3, 4, 2, 3, 2, 3, 2, ! 3, 1, 2, 1, 1, 1, 1, 1, 2, 2, ! 2, 3, 3, 4, 1, 3, 3, 2, 3, 1, ! 1, 1, 2, 1, 1, 1, 2, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, --- 1002,1053 ---- 215, 215, 215, 215, 215, 216, 216, 217, 217, 217, 218, 219, 219, 219, 219, 220, 220, 221, 221, 221, 222, 222, 222, 222, 223, 223, 223, 223, 224, 224, ! 224, 224, 225, 225, 225, 226, 226, 226, 226, 227, ! 227, 227, 227, 227, 228, 229, 229, 229, 229, 230, ! 230, 231, 232, 232, 232, 232, 233, 233, 234, 234, ! 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, ! 235, 235, 235, 236, 236, 236, 236, 237, 237, 237, ! 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, ! 239, 238, 240, 238, 241, 241, 242, 242, 242, 243, ! 243, 243, 243, 243, 243, 243, 243, 244, 244, 245, ! 245, 245, 246, 246, 246, 247, 247, 247, 248, 248, ! 248, 248, 248, 248, 248, 248, 249, 249, 249, 249, ! 249, 249, 250, 250, 250, 250, 251, 252, 253, 253, ! 253, 253, 253, 254, 254, 254, 255, 255, 256, 256, ! 257, 257, 257, 257, 257, 257, 258, 258, 258, 258, ! 258, 258, 258, 258, 258, 259, 259, 259, 259, 259, ! 259, 259, 260, 260, 260, 260, 260, 261, 261, 261, ! 261, 261, 261, 261, 262, 262, 262, 262, 262, 262, ! 262, 262, 262, 262, 262, 263, 263, 263, 263, 263, ! 264, 264, 264, 265, 265, 265, 266, 266, 266, 267, ! 267, 267, 268, 268, 268, 269, 269, 269, 269, 269, ! 270, 270, 271, 271, 272, 272, 272, 273, 273, 274, ! 275 }; ! /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ ! static const short yyr2[] = { ! 0, 0, 2, 1, 1, 1, 1, 1, 1, 1, ! 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, ! 2, 1, 1, 1, 3, 1, 0, 1, 1, 1, ! 2, 2, 2, 3, 1, 2, 1, 2, 3, 2, ! 3, 1, 1, 3, 2, 3, 5, 4, 5, 1, ! 1, 1, 1, 1, 2, 0, 7, 0, 6, 3, ! 2, 3, 4, 0, 2, 3, 2, 0, 2, 2, ! 1, 3, 3, 2, 3, 1, 2, 1, 1, 1, ! 1, 1, 1, 1, 1, 1, 3, 4, 1, 3, ! 3, 1, 3, 3, 4, 1, 3, 2, 3, 3, ! 1, 1, 0, 3, 2, 3, 3, 4, 4, 2, ! 3, 2, 3, 2, 3, 4, 3, 3, 3, 1, ! 3, 3, 2, 3, 2, 3, 1, 0, 2, 2, ! 1, 3, 3, 1, 1, 2, 1, 0, 3, 2, ! 3, 3, 4, 2, 3, 3, 4, 1, 4, 5, ! 7, 6, 1, 1, 0, 4, 0, 5, 0, 5, ! 0, 6, 3, 4, 2, 3, 2, 3, 2, 3, ! 1, 2, 1, 1, 1, 1, 1, 2, 2, 2, ! 3, 3, 4, 1, 3, 3, 2, 3, 1, 1, ! 1, 2, 1, 1, 1, 2, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, *************** static const unsigned char yyr2[] = *** 1369,2801 **** 7, 6, 3, 5, 4, 7, 6, 2, 2, 3, 2, 0, 1, 1, 2, 0, 1, 1, 3, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, ! 2, 3, 3, 2, 3, 5, 5, 2, 4, 3, ! 1, 3, 3, 4, 2, 1, 2, 2, 4, 2, ! 3, 4, 2, 2, 1, 1, 1, 1, 3, 1, ! 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, ! 3, 3, 3, 5, 4, 1, 4, 5, 5, 6, ! 3, 3, 4, 5, 2, 3, 0, 7, 0, 6, ! 3, 3, 1, 3, 3, 3, 3, 4, 4, 4, ! 4, 3, 3, 1, 2, 3, 3, 2, 2, 3, ! 3, 3, 3, 2, 3, 4, 5, 6, 5, 6, ! 4, 4, 4, 4, 3, 4, 3, 4, 1, 1, ! 1, 1, 2, 2, 1, 1, 2, 1, 2, 1, ! 2, 2, 2, 2, 2, 2, 1, 2, 2, 1, ! 2, 2, 5, 4, 4, 5, 4, 2, 5, 4, ! 5, 1, 3, 3, 3, 3, 3, 3, 1, 3, ! 3, 3, 3, 1, 3, 3, 3, 3, 3, 3, ! 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, ! 3, 1, 3, 3, 3, 3, 1, 3, 3, 1, ! 3, 3, 1, 3, 3, 1, 3, 3, 1, 3, ! 3, 1, 5, 4, 3, 5, 1, 1, 3, 3, ! 1, 1, 1, 1, 1, 1, 1 }; ! /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state ! STATE-NUM when YYTABLE doesn't specify something else to do. Zero ! means the default is an error. */ ! static const unsigned short yydefact[] = { ! 2, 0, 0, 1, 53, 54, 0, 0, 0, 0, ! 221, 3, 0, 0, 0, 35, 42, 43, 37, 0, ! 50, 51, 52, 45, 26, 0, 22, 23, 24, 0, ! 61, 0, 40, 0, 0, 36, 38, 0, 0, 55, ! 0, 0, 46, 44, 0, 163, 0, 0, 159, 62, ! 0, 68, 41, 39, 0, 0, 0, 60, 0, 48, ! 0, 25, 167, 19, 165, 17, 0, 156, 0, 0, ! 67, 18, 0, 0, 58, 164, 0, 161, 63, 68, ! 49, 47, 14, 0, 12, 13, 169, 0, 10, 11, ! 15, 16, 17, 0, 175, 177, 0, 176, 0, 171, ! 173, 174, 168, 166, 160, 66, 70, 71, 69, 0, ! 158, 0, 56, 112, 0, 128, 110, 0, 0, 89, ! 92, 128, 0, 20, 21, 114, 0, 0, 179, 178, ! 170, 172, 0, 0, 59, 162, 0, 0, 0, 0, ! 107, 98, 87, 0, 0, 0, 0, 106, 388, 0, ! 113, 128, 111, 0, 128, 73, 72, 189, 74, 22, ! 0, 84, 0, 76, 78, 82, 83, 0, 79, 0, ! 80, 138, 128, 85, 81, 0, 86, 57, 118, 115, ! 0, 127, 0, 120, 0, 130, 131, 129, 119, 117, ! 91, 0, 90, 94, 0, 0, 0, 0, 0, 0, ! 0, 337, 0, 0, 0, 0, 8, 7, 4, 5, ! 6, 9, 336, 0, 0, 409, 0, 102, 408, 334, ! 343, 339, 355, 0, 335, 340, 341, 342, 426, 410, ! 411, 419, 441, 414, 415, 417, 429, 448, 453, 460, ! 471, 476, 479, 482, 485, 488, 491, 496, 505, 497, ! 0, 101, 99, 97, 100, 390, 389, 109, 88, 108, ! 187, 0, 128, 75, 77, 105, 0, 136, 0, 140, ! 0, 0, 0, 278, 0, 0, 0, 0, 0, 0, ! 0, 0, 337, 0, 0, 10, 16, 409, 0, 127, ! 195, 0, 0, 210, 0, 191, 193, 0, 194, 199, ! 211, 0, 200, 212, 0, 201, 202, 213, 252, 0, ! 203, 0, 214, 204, 291, 0, 215, 216, 217, 219, ! 218, 0, 220, 245, 244, 0, 242, 243, 240, 241, ! 239, 125, 123, 116, 0, 0, 0, 418, 409, 340, ! 342, 416, 421, 420, 425, 424, 423, 422, 0, 393, ! 0, 0, 0, 18, 0, 430, 427, 431, 428, 437, ! 0, 409, 0, 180, 0, 184, 0, 0, 0, 0, ! 0, 0, 95, 0, 0, 364, 0, 413, 412, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 503, 504, 0, 142, 0, 141, 135, 104, 134, 189, ! 139, 0, 228, 229, 227, 247, 0, 313, 0, 302, ! 300, 0, 310, 308, 0, 274, 0, 255, 0, 324, ! 0, 288, 0, 306, 304, 0, 0, 197, 0, 224, ! 222, 0, 0, 190, 188, 192, 196, 409, 320, 223, ! 226, 0, 273, 0, 409, 293, 297, 290, 0, 0, ! 317, 0, 122, 121, 126, 124, 133, 132, 348, 352, ! 0, 392, 382, 381, 360, 0, 375, 383, 0, 376, ! 0, 361, 0, 0, 0, 20, 21, 345, 338, 181, ! 182, 0, 347, 351, 350, 394, 0, 372, 404, 0, ! 346, 349, 370, 344, 371, 391, 406, 0, 365, 0, ! 445, 442, 446, 443, 447, 444, 451, 449, 452, 450, ! 457, 454, 458, 455, 459, 456, 467, 462, 469, 464, ! 466, 461, 468, 463, 470, 0, 465, 474, 472, 475, ! 473, 478, 477, 481, 480, 484, 483, 487, 486, 490, ! 489, 494, 0, 0, 499, 498, 143, 409, 144, 0, ! 0, 148, 0, 248, 0, 314, 312, 303, 301, 311, ! 309, 275, 0, 256, 0, 0, 0, 321, 325, 0, ! 322, 289, 307, 305, 338, 0, 198, 230, 0, 0, ! 0, 253, 0, 294, 0, 282, 0, 0, 319, 0, ! 400, 401, 0, 387, 0, 384, 377, 380, 378, 379, ! 362, 354, 0, 439, 433, 436, 0, 0, 434, 186, ! 183, 185, 395, 0, 405, 402, 0, 407, 403, 356, ! 0, 493, 0, 0, 145, 0, 0, 146, 249, 0, ! 276, 272, 0, 329, 0, 333, 332, 326, 323, 327, ! 234, 0, 231, 232, 0, 0, 0, 258, 0, 262, ! 0, 265, 0, 299, 298, 284, 0, 296, 0, 318, ! 0, 398, 0, 386, 385, 0, 363, 353, 438, 432, ! 440, 435, 374, 373, 396, 0, 357, 358, 495, 492, ! 0, 147, 0, 0, 0, 246, 0, 199, 0, 206, ! 207, 0, 208, 209, 0, 257, 330, 0, 235, 0, ! 0, 233, 271, 268, 269, 506, 0, 260, 263, 0, ! 259, 0, 266, 0, 0, 283, 0, 316, 315, 399, ! 369, 0, 397, 359, 0, 149, 0, 0, 0, 225, ! 277, 0, 331, 328, 238, 236, 0, 270, 267, 261, ! 0, 281, 0, 367, 0, 0, 150, 0, 250, 0, ! 0, 237, 279, 280, 152, 0, 0, 0, 0, 151, ! 0, 0, 0, 0, 286, 0, 251, 285 }; - /* YYDEFGOTO[NTERM-NUM]. */ static const short yydefgoto[] = { ! -1, 1, 2, 212, 284, 213, 89, 90, 72, 64, ! 214, 215, 26, 27, 28, 11, 12, 13, 14, 15, ! 16, 17, 18, 448, 290, 136, 109, 51, 74, 108, ! 134, 162, 163, 164, 95, 118, 119, 120, 216, 166, ! 266, 96, 115, 182, 183, 291, 140, 187, 407, 168, ! 169, 170, 268, 171, 172, 410, 558, 559, 292, 21, ! 47, 76, 69, 111, 48, 67, 98, 99, 100, 101, ! 217, 366, 293, 175, 561, 721, 295, 296, 297, 298, ! 696, 299, 300, 301, 302, 699, 303, 304, 305, 306, ! 700, 307, 451, 308, 591, 658, 659, 660, 661, 309, ! 310, 702, 311, 312, 313, 703, 314, 315, 457, 666, ! 667, 316, 317, 318, 319, 320, 321, 322, 577, 578, ! 579, 580, 218, 219, 220, 221, 222, 731, 675, 223, ! 496, 224, 476, 477, 124, 225, 226, 227, 228, 229, ! 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, ! 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, ! 250, 402, 497, 716 }; - /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ - #define YYPACT_NINF -650 static const short yypact[] = { ! -650, 33, 200, -650, -650, -650, 353, -42, 478, 491, ! -650, -650, 224, 349, 407, -650, -650, -650, -650, 601, ! -650, -650, -650, -650, -650, 15, -650, -650, -650, 358, ! -650, 214, -650, 21, 459, -650, -650, 444, 513, -650, ! -42, 502, -650, -650, 460, -650, 531, -27, 170, -650, ! 540, 283, -650, -650, -42, 590, 424, -650, 420, -650, ! 36, -650, -650, -650, -650, 300, 901, -650, 541, -27, ! -650, -650, 414, 549, -650, -650, -27, 170, -650, 283, ! -650, -650, -650, 585, -650, -650, -650, 586, 322, -650, ! -650, -650, 400, 1120, -650, -650, 71, -650, 1586, -650, ! -650, -650, -650, -650, -650, -650, -650, -650, 370, 330, ! -650, -27, -650, -650, 382, -28, -650, 137, -11, -650, ! 425, -28, 426, 438, 438, -650, 620, 633, -650, -650, ! -650, -650, 655, 1277, -650, -650, 330, 616, 684, 60, ! -650, -650, -650, 687, 1530, 87, 575, -650, -650, 93, ! -650, -28, -650, 243, -28, -650, -650, 495, -650, 510, ! 821, -650, 1355, -650, -650, -650, -650, 50, -650, 545, ! -650, -650, 632, -650, -650, 1976, -650, -650, -650, -650, ! 693, 612, 473, -650, 776, -650, -650, 609, -650, -650, ! -650, 84, -650, -650, 2784, 1188, 2845, 2896, 651, 35, ! 556, -650, 2957, 3008, 3069, 4998, -650, -650, -650, -650, ! -650, -650, -650, 573, 668, 921, 67, -650, 717, 624, ! -650, -650, -650, 697, -650, 756, -650, 867, 755, -650, ! -650, -650, -650, -650, -650, -650, -650, 942, 964, 970, ! 797, 966, 767, 801, 811, 812, 10, -650, -650, -650, ! 919, -650, -650, -650, -650, -650, -650, -650, -650, -650, ! -650, 959, 632, -650, -650, -650, 654, -650, 740, -650, ! 819, 180, 3120, -650, 121, 2173, 26, 226, 303, 316, ! 341, 141, 762, 5283, -42, 573, 668, 883, 636, 537, ! -650, 776, 783, -650, 1907, -650, -650, 761, -650, -650, ! -650, 2045, -650, -650, 780, -650, -650, -650, -650, 2045, ! -650, 2045, -650, -650, 5334, 791, -650, -650, -650, -650, ! -650, 445, -650, 372, 832, 755, 985, 991, -650, -650, ! -650, -650, 960, -650, 676, 700, 711, -650, 646, -650, ! -650, -650, -650, -650, -650, -650, -650, -650, 13, -650, ! 718, 949, 798, 798, 452, -650, -650, -650, -650, -650, ! 709, 921, 53, -650, 816, -650, 823, 23, 830, 5059, ! 2224, 587, -650, -8, 3181, -650, 485, -650, -650, 3232, ! 3293, 3344, 3405, 3456, 3517, 3568, 3629, 3680, 3741, 3792, ! 3853, 690, 3904, 3965, 4016, 4077, 4128, 4189, 4240, 2285, ! -650, -650, 4301, -650, 592, -650, -650, -650, -650, -650, ! -650, 1907, -650, -650, -650, -650, 4352, -650, 172, -650, ! -650, 211, -650, -650, 219, -650, 4413, -650, 4464, -650, ! 860, -650, 1469, -650, -650, 225, 212, 822, 658, -650, ! -650, -42, 2336, -650, -650, -650, -650, 958, 612, -650, ! -650, 831, -650, 866, 990, -650, -650, -650, 117, 2397, ! -650, 4525, -650, -650, -650, 960, -650, -650, -650, -650, ! 204, 842, -650, -650, -650, 2448, 798, -650, 660, 798, ! 660, -650, 2509, 4576, 107, 203, 439, -650, 5359, -650, ! -650, 748, -650, -650, -650, -650, 775, -650, -650, 222, ! -650, -650, -650, -650, -650, 844, -650, 249, -650, 5110, ! -650, -650, -650, -650, -650, -650, -650, 942, -650, 942, ! -650, 964, -650, 964, -650, 964, -650, 970, -650, 970, ! -650, 970, -650, 970, -650, 322, -650, -650, 797, -650, ! 797, -650, 966, -650, 767, -650, 801, -650, 811, -650, ! 812, -650, 944, 854, -650, -650, -650, 1008, -650, 1907, ! 857, -650, 1907, -650, 276, -650, -650, -650, -650, -650, ! -650, -650, 333, -650, 861, 500, 328, 860, -650, 545, ! -650, -650, -650, -650, -650, 504, 822, -650, 961, 138, ! -20, -650, 870, -650, 4973, -650, 4861, 871, 879, 895, ! -650, -650, 5171, -650, 265, -650, 438, -650, 438, -650, ! -650, 896, 151, -650, -650, -650, 4637, 1021, -650, -650, ! -650, -650, -650, 4688, -650, -650, 5222, -650, -650, 330, ! 789, -650, 4749, 713, -650, 1907, 2560, -650, -650, 2112, ! -650, -650, 346, -650, 746, -650, -650, -650, -650, -650, ! -650, 2621, -650, -650, 998, 58, 4800, -650, 603, -650, ! 1684, -650, 5283, -650, -650, -650, 922, 934, 4912, -650, ! 352, -650, 805, -650, -650, 330, -650, 924, -650, -650, ! -650, -650, -650, -650, -650, 808, -650, 330, -650, -650, ! 508, -650, 241, 156, 514, -650, 987, 996, 2112, -650, ! -650, 2112, -650, -650, 965, -650, 972, 974, -650, 1073, ! 159, -650, -650, -650, -650, -650, 433, -650, -650, 1759, ! -650, 1833, -650, 980, 2045, -650, 984, -650, -650, -650, ! -650, 330, -650, -650, 2672, -650, 258, 4352, 2045, -650, ! -650, 2733, -650, -650, -650, -650, 1084, -650, -650, -650, ! 986, -650, 2045, -650, 263, 186, -650, 356, -650, 4861, ! 997, -650, -650, -650, -650, 269, 2112, 1004, 4912, -650, ! 1046, 2112, 1010, 2112, -650, 2112, -650, -650 }; - /* YYPGOTO[NTERM-NUM]. */ static const short yypgoto[] = { ! -650, -650, -650, -650, -59, -51, 726, 3, -120, 493, ! 306, -6, 470, -650, 122, -650, 1106, 752, -650, 325, ! -650, -650, 837, 18, 517, -650, -650, 1064, 1044, -650, ! -135, -650, 967, -650, -104, -123, 989, -171, -197, -650, ! -650, -67, 760, 874, -328, -127, -58, -650, -650, -650, ! -650, -650, -650, -650, 968, -650, 174, -650, 725, 329, ! -650, -650, -650, -650, 1081, -12, -650, 1040, -650, -650, ! 332, -650, -121, 872, 845, -158, -289, -650, 827, -288, ! 139, -601, 610, -440, -650, -650, -650, -312, -650, -650, ! -650, -650, -650, -650, -650, -650, 486, 487, -614, -405, ! -650, -650, -650, -650, -650, -650, -650, -202, -650, -649, ! 829, -650, -650, -650, -650, -650, -650, -650, -650, 569, ! -650, 571, -650, -650, -650, 234, -650, -650, -650, -650, ! -407, -650, 796, 229, -38, 1110, 305, 1315, 395, 474, ! 617, 955, -90, 628, 707, -477, -650, 679, 705, 607, ! 648, 757, 758, 759, 763, 754, -650, 524, 765, 891, ! -650, -650, -61, -650 }; ! /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If ! positive, shift that token. If negative, reduce the rule which ! number is the opposite. If zero, do what YYDEFACT says. ! If YYTABLE_NINF, syntax error. */ ! #define YYTABLE_NINF -503 static const short yytable[] = { ! 25, 177, 456, 33, 153, 445, 463, 87, 365, 332, ! 184, 618, 174, 449, 468, 88, 42, 294, 186, 726, ! 19, 452, 52, 453, 492, 398, 138, 349, 655, 165, ! 19, 19, 19, 3, 127, 589, 349, 80, 697, 87, ! 65, 174, 88, 656, 65, 24, 722, 88, 267, 63, ! 123, 265, 19, 71, 487, 19, 19, 104, 165, 712, ! 92, 188, 65, 147, 110, 504, 167, 65, 372, 66, ! 139, 63, 128, 19, 87, 612, 63, 657, 180, 24, ! 354, 469, 88, 251, 93, 141, 88, 92, 252, 142, ! 143, 493, 92, 257, 255, 167, 259, 697, 399, 135, ! 697, 127, 630, 87, 341, 722, 345, 347, 615, 88, ! 767, 88, 356, 358, 269, 43, 93, 44, 593, 772, ! -154, 53, 419, 54, 285, 335, 65, 92, 350, 29, ! 31, 92, 65, 88, 184, 63, 81, 350, 141, 653, ! 681, 71, 433, 362, 251, 408, -103, 713, 488, 352, ! -103, 160, 676, 360, 92, 181, 92, 653, 430, 189, ! 745, 437, 56, 58, 465, 697, 61, -93, -93, 287, ! 697, 129, 697, 565, 697, 123, 61, -96, 92, -96, ! 160, 415, -96, -96, -96, -96, 253, 745, 338, 338, ! 338, 338, 256, 289, 65, 672, 338, 338, 361, 698, ! -27, 4, 180, 353, 405, 114, 148, 184, 24, 117, ! 88, 418, 567, 487, 424, 49, 467, -292, 594, 685, ! 569, 420, 436, 624, -29, 4, 582, 425, 24, 693, ! -96, 137, 441, 654, 701, -96, -96, -96, -96, 623, ! 88, 434, 652, 285, 710, 5, 677, 123, 114, 117, ! 627, 736, 623, 562, 746, 92, 6, 623, 698, 711, ! 623, 698, 7, 285, 744, 191, 673, -64, 8, 5, ! 761, 68, 566, 445, 416, 180, 9, 638, 50, 181, ! 6, 765, 664, 88, 456, 92, 7, 623, 287, 511, ! 513, 515, 8, 701, 621, 447, 701, 288, 616, 600, ! 10, 149, 191, 447, 427, 447, 601, 584, 454, 499, ! -64, 568, 289, 507, 478, 480, 707, 429, 586, 570, ! 426, 625, 485, 486, 10, 583, 698, 755, 92, 645, ! 65, 698, 181, 698, 640, 698, 73, 35, 553, 71, ! 535, 735, 431, 258, 143, 376, 445, 705, 628, -30, ! 4, 695, 181, 727, 23, 564, 456, 638, 756, 45, ! 285, 701, 35, 764, 674, 572, 701, 574, 701, 769, ! 701, 639, 91, 338, 338, 338, 338, 338, 338, 338, ! 338, 338, 338, 338, 338, 92, 338, 338, 338, 338, ! 338, 338, 338, 614, 5, 97, 421, 428, 597, 91, ! 599, 635, 54, 435, 91, 557, 191, -28, 4, 323, ! 449, 7, 157, 452, 604, 105, 288, 8, -339, -339, ! 122, 78, 46, 288, 157, 75, 133, 97, 641, 289, ! 251, 288, 445, 288, 747, 432, 751, 704, 606, 91, ! 24, 608, -254, 91, -31, 4, 460, 456, 157, 10, ! 758, 766, 5, 481, -155, 646, 456, 191, 649, -33, ! 4, 59, 173, 6, 763, 60, 91, -65, 91, 7, ! -339, 132, 471, -64, -339, 8, 137, 338, 695, 30, ! 324, 286, 338, 751, 50, 758, 508, 763, 46, 5, ! 91, 173, 32, 61, 686, 505, 704, 123, 122, 704, ! 6, 643, 54, 57, 5, 650, 7, 10, 285, 650, ! -65, 285, 8, -32, 4, 415, -64, 184, 144, 20, ! -157, 7, 748, 145, 146, 148, 679, 8, 323, 20, ! 20, 20, 62, 288, 617, 323, 149, 149, -320, 461, ! 730, 70, 102, 323, 10, 323, 482, 24, 323, 728, ! 106, 20, 733, 287, 20, 20, 287, 351, 5, 10, ! 61, 103, 683, 191, 704, 24, 107, 91, 333, 704, ! 325, 704, 20, 704, 334, 7, 254, 289, 24, 509, ! 289, 8, 39, 94, 285, 180, 113, 116, 500, 24, ! -34, 4, 260, 88, 644, 715, 753, 91, 651, 324, ! 286, 723, 734, 159, 261, 41, 324, 82, 737, 285, ! 338, 338, 22, 10, 324, 94, 324, 178, 24, 324, ! 286, 150, 22, 22, 22, 156, 338, 24, 24, 287, ! 159, -320, 159, 447, 152, 5, 24, 439, 92, 84, ! 91, 157, 85, 24, 22, 323, 39, 22, 22, 326, ! 161, 655, 7, 289, 287, 501, 155, 39, 8, 500, ! 502, 5, 181, 40, 503, 22, 656, 82, 285, 41, ! 285, 122, 24, 24, 24, 367, 757, 462, 289, 161, ! 760, 288, -24, -24, 288, 185, 138, 556, 190, 325, ! 10, 534, 447, 334, 331, 447, 325, 91, 375, 84, ! 717, 464, 85, 24, 325, 605, 325, 24, 605, 325, ! 336, 179, 466, 287, 500, 287, 324, 286, 447, 470, ! 24, 5, 374, -24, 585, 440, 501, 82, -24, -24, ! -24, 502, 447, 634, -24, 503, 637, 289, -24, 289, ! 369, 82, 24, 176, 370, 24, 447, 706, 371, 619, ! 157, 194, 195, 348, 406, 61, 205, 288, 149, 84, ! 447, 288, 85, 24, 34, 447, 38, 447, 326, 447, ! 368, 24, 176, 84, 24, 326, 85, 24, 394, 690, ! 24, 501, 288, 326, 24, 326, 502, 24, 326, 55, ! 503, 5, 327, 323, 196, 197, 323, 82, 24, 82, ! 24, 377, 378, 328, 483, 24, 325, 484, 198, 691, ! 607, 367, 609, 395, 199, 387, 388, 389, 390, 373, ! 288, 200, 125, 288, 396, 201, 397, 82, 323, 84, ! 323, 84, 85, 24, 85, 24, 409, 739, 202, 203, ! 740, 288, 204, 288, 205, 620, 288, 121, -501, -501, ! 36, 206, 207, 208, 209, 391, -153, 210, 211, 84, ! 288, 446, 85, 24, 324, 286, 39, 324, 286, 323, ! 622, 36, 82, 323, 288, 36, 623, 442, -341, -341, ! 450, 126, 329, 40, 687, 326, 151, 154, 288, 41, ! 623, 459, 36, 288, 323, 288, 475, 288, 494, 324, ! 729, 324, 323, 732, 84, 770, 623, 85, 24, 623, ! 774, 327, 776, 489, 777, 412, 413, -137, 327, 414, ! 490, 575, 328, 143, 491, 576, 327, 590, 327, 328, ! -341, 327, 323, 592, -341, 323, 602, 328, 626, 328, ! 324, 286, 328, 632, 324, 631, 5, 379, 380, 381, ! 91, 636, 82, 323, 325, 323, 642, 325, 323, -502, ! -502, 83, 652, 7, 662, 324, 286, 382, 383, 8, ! -17, 668, 323, 324, 669, -500, -500, 369, 384, 385, ! 386, 370, 392, 393, 84, 438, 323, 85, 24, 325, ! 670, 325, -368, 323, 527, 529, 531, 533, 86, 711, ! 323, 329, 323, 324, 5, 323, 324, 323, 329, 323, ! 82, 400, 401, -500, -500, 369, 329, 724, 329, 370, ! -366, 329, 680, 371, 324, 286, 324, 286, 327, 324, ! 325, -410, -410, 326, 325, 594, 326, -411, -411, 328, ! 538, 540, 84, 324, 738, 85, 24, 472, 473, 474, ! -500, -500, 369, -205, 403, 325, 370, 324, 145, 146, ! 438, 517, 519, 325, 324, 741, 330, 742, 326, 743, ! 326, 324, 82, 324, 744, 750, 324, -17, 324, 752, ! 324, 198, -500, -500, 369, 761, 762, 199, 370, 521, ! 523, 525, 371, 325, 200, -17, 325, 768, 201, 771, ! -500, -500, 369, 773, 84, 775, 370, 85, 24, 326, ! 633, 202, 203, 326, 325, 204, 325, 536, 329, 325, ! 37, 125, 79, 112, 206, 207, 208, 209, 262, 264, ! 210, 211, 192, 325, 326, 404, 560, 77, 131, 444, ! 411, 455, 326, 458, 718, 719, 647, 325, 648, 479, ! 343, 542, 550, 544, 325, 546, 689, 0, 0, 0, ! 548, 325, 0, 325, 0, 39, 325, 555, 325, 0, ! 325, 82, 326, 0, 0, 326, 327, 0, 0, 327, ! 126, 0, 40, 0, 0, 330, 0, 328, 41, 342, ! 328, 194, 330, 326, 0, 326, 0, 0, 326, 0, ! 330, 0, 330, 84, 0, 330, 85, 24, 0, 0, ! 0, 327, 326, 327, 0, 0, 0, 0, 0, 0, ! 0, 0, 328, 0, 328, 0, 326, 0, 0, 0, ! 0, 0, 0, 326, 196, 197, 0, 0, 0, 82, ! 326, 0, 326, 0, 0, 326, 0, 326, 198, 326, ! 0, 0, 327, 0, 199, 0, 327, 0, 0, 0, ! 0, 200, 0, 328, 0, 201, 329, 328, 0, 329, ! 0, 84, 0, 0, 85, 24, 0, 327, 202, 203, ! 0, 0, 204, 0, 0, 327, 0, 0, 328, 0, ! 0, 206, 207, 208, 209, 0, 328, 210, 211, 0, ! 0, 329, 330, 329, 339, 339, 339, 339, 0, 0, ! 0, 0, 339, 339, 0, 327, 0, 0, 327, 0, ! 0, 0, 5, 0, 0, 0, 328, 0, 82, 328, ! 0, 0, 0, 0, 0, 0, 327, 83, 327, 7, ! 0, 327, 329, 0, 0, 8, 329, 328, 0, 328, ! 0, 0, 328, 0, 0, 327, 0, 0, 0, 0, ! 84, 0, 0, 85, 24, 0, 328, 329, 0, 327, ! 0, 0, 0, 157, 158, 329, 327, 10, 0, 0, ! 328, 0, 0, 327, 0, 327, 0, 328, 327, 0, ! 327, 0, 327, 0, 328, 0, 328, 0, 0, 328, ! 5, 328, 0, 328, 0, 329, 82, 0, 329, 0, ! 0, 0, 0, 0, 0, 83, 0, 7, 0, 0, ! 0, 0, 0, 8, 0, 0, 329, 0, 329, 0, ! 0, 329, 0, 0, 0, 0, 0, 0, 84, 0, ! 0, 85, 24, 0, 0, 329, 0, 0, 0, 0, ! 330, 157, 263, 330, 0, 10, 0, 0, 0, 329, ! 0, 0, 0, 0, 0, 0, 329, 0, 0, 0, ! 581, 0, 0, 329, 0, 329, 0, 0, 329, 0, ! 329, 0, 329, 0, 0, 330, 0, 330, 0, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, ! 339, 0, 339, 339, 339, 339, 339, 339, 339, 340, ! 340, 340, 340, 0, -287, -287, -287, 340, 340, 0, ! -287, 0, 0, 0, 0, 0, 330, 0, 0, -287, ! 330, 193, 0, 194, 195, -287, 0, 0, 0, 0, ! 0, 0, -287, 0, 0, 0, -287, 0, 0, 0, ! 0, 330, -287, 0, 0, -287, -287, 0, 0, 330, ! 0, 0, 0, -287, 0, 0, 0, 0, 0, -287, ! 0, 0, -287, -287, -287, -287, 196, 197, -287, -287, ! 0, 82, 0, 0, 0, 0, 0, 0, 0, 330, ! 198, 0, 330, 339, 0, 0, 199, 0, 339, 0, ! 0, 0, 0, 200, 0, 0, 0, 201, 0, 0, ! 330, 0, 330, 84, 0, 330, 85, 24, 0, 0, ! 202, 203, 0, 0, 204, 0, 205, 0, 0, 330, ! 0, 5, 0, 206, 207, 208, 209, 82, 0, 210, ! 211, 0, 0, 330, 0, 0, 83, 0, 7, 0, ! 330, 0, 0, 0, 8, 0, 0, 330, 0, 330, ! 0, 0, 330, 0, 330, 0, 330, 0, 0, 84, ! 0, 0, 85, 24, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 130, 0, 270, 0, 0, 0, 0, ! 0, 0, 0, 0, 340, 340, 340, 340, 340, 340, ! 340, 340, 340, 340, 340, 340, 0, 340, 340, 340, ! 340, 340, 340, 340, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 339, 339, 0, 5, ! 196, 197, 655, 271, 272, 82, 273, 0, 0, 274, ! 0, 0, 339, 275, 198, 0, 0, 656, 0, 0, ! 276, 277, 8, 278, 0, 279, 280, 200, 281, 0, ! 270, 282, 0, 0, 0, 0, 0, 84, 0, 0, ! 85, 24, 0, 0, 0, 0, 0, 0, 283, 0, ! 157, 720, 0, 0, 10, 0, 0, 206, 207, 208, ! 209, 0, 0, 210, 211, 0, 0, 0, 340, 0, ! 0, 0, 0, 340, 5, 196, 197, 655, 271, 272, ! 82, 273, 0, 0, 274, 0, 0, 0, 275, 198, ! 0, 0, 656, 0, 0, 276, 277, 8, 278, 0, ! 279, 280, 200, 281, 270, 0, 282, 0, 0, 0, ! 0, 0, 84, 0, 0, 85, 24, 0, 0, 0, ! 0, 0, 0, 283, 0, 157, 749, 0, 0, 10, ! 0, 0, 206, 207, 208, 209, 0, 0, 210, 211, ! 0, 0, 0, 0, 0, 0, 0, 0, 5, 196, ! 197, -264, 271, 272, 82, 273, 0, 0, 274, 0, ! 0, 0, 275, 198, 0, 0, -264, 0, 0, 276, ! 277, 8, 278, 0, 279, 280, 200, 281, 270, 0, ! 282, 0, 0, 0, 0, 0, 84, 0, 0, 85, ! 24, 0, 0, 0, 0, 0, 0, 283, 0, 157, ! -264, 340, 340, 10, 0, 0, 206, 207, 208, 209, ! 0, 0, 210, 211, 0, 0, 0, 340, 0, 0, ! 0, 0, 5, 196, 197, 0, 271, 272, 82, 273, ! 0, 0, 274, 0, 0, 0, 275, 198, 0, 0, ! 0, 0, 0, 276, 277, 8, 278, 270, 279, 280, ! 200, 281, 0, 0, 282, 0, 0, 0, 0, 0, ! 84, 0, 0, 85, 24, 0, 0, 0, 0, 0, ! 0, 283, 0, 157, 443, 0, 0, 10, 0, 0, ! 206, 207, 208, 209, 0, 0, 210, 211, 0, 0, ! 0, 5, 196, 197, 0, 271, 272, 82, 273, 0, ! 0, 274, 0, 0, 0, 275, 198, 0, 0, 0, ! 0, 0, 276, 277, 8, 278, 270, 279, 280, 200, ! 281, 0, 0, 282, 0, 0, 0, 0, 0, 84, ! 0, 0, 85, 24, 0, 0, 0, 0, 0, 0, ! 283, 0, 157, 0, 0, 0, 10, 0, 0, 206, ! 207, 208, 209, 0, 0, 210, 211, 0, 0, 0, ! 5, 196, 197, 0, 271, 272, 82, 273, 0, 0, ! 274, 0, 0, 0, 275, 198, 0, 0, 0, 0, ! 0, 276, 277, 270, 278, 0, 279, 280, 200, 281, ! 0, 0, 282, 0, 0, 0, 0, 0, 84, 0, ! 0, 85, 24, 0, 0, 0, 0, 0, 0, 283, ! 0, 157, 0, 0, 0, 10, 0, 0, 206, 207, ! 208, 209, 0, 0, 210, 211, 0, 5, 196, 197, ! 0, 694, 272, 82, 273, 0, 0, 274, 0, 0, ! 0, 275, 198, 0, 422, 0, 194, 195, 276, 277, ! 0, 278, 0, 279, 280, 200, 281, 0, 0, 282, ! 0, 0, 0, 0, 0, 84, 0, 0, 85, 24, ! 0, 0, 0, 0, 0, 0, 283, 0, 157, 0, ! 0, 0, 10, 0, 0, 206, 207, 208, 209, 196, ! 197, 210, 211, 0, 82, 498, 0, 194, 195, 0, ! 0, 0, 0, 198, 0, 0, 0, 0, 0, 199, ! 0, 0, 0, 0, 0, 0, 200, 0, 0, 0, ! 201, 0, 0, 0, 0, 0, 84, 0, 0, 85, ! 24, 0, 0, 202, 203, 0, 0, 204, 0, 0, ! 196, 197, 0, 423, 0, 82, 206, 207, 208, 209, ! 0, 0, 210, 211, 198, 0, 551, 0, 194, 195, ! 199, 0, 0, 0, 0, 0, 0, 200, 0, 0, ! 0, 201, 0, 0, 0, 0, 0, 84, 0, 0, ! 85, 24, 0, 0, 202, 203, 0, 0, 204, 0, ! 0, 0, 0, 148, 0, 0, 0, 206, 207, 208, ! 209, 196, 197, 210, 211, 0, 82, 587, 0, 194, ! 195, 0, 0, 0, 0, 198, 0, 0, 0, 0, ! 0, 199, 0, 0, 0, 0, 0, 0, 200, 0, ! 0, 0, 201, 0, 0, 0, 0, 0, 84, 0, ! 0, 85, 24, 0, 552, 202, 203, 0, 0, 204, ! 0, 0, 196, 197, 0, 0, 0, 82, 206, 207, ! 208, 209, 0, 0, 210, 211, 198, 0, 595, 0, ! 194, 195, 199, 0, 0, 0, 0, 0, 0, 200, ! 0, 0, 0, 201, 0, 0, 0, 0, 0, 84, ! 0, 0, 85, 24, 0, 0, 202, 203, 0, 0, ! 204, 588, 0, 0, 0, 0, 0, 0, 0, 206, ! 207, 208, 209, 196, 197, 210, 211, 0, 82, 603, ! 0, 194, 195, 0, 0, 0, 0, 198, 0, 0, 0, 0, 0, 199, 0, 0, 0, 0, 0, 0, ! 200, 0, 0, 0, 201, 0, 0, 0, 0, 0, ! 84, 0, 0, 85, 24, 0, 0, 202, 203, 0, ! 0, 204, 0, 0, 196, 197, 0, 596, 0, 82, ! 206, 207, 208, 209, 0, 0, 210, 211, 198, 0, ! 610, 0, 194, 195, 199, 0, 0, 0, 0, 0, ! 0, 200, 0, 0, 0, 201, 0, 0, 0, 0, ! 0, 84, 0, 0, 85, 24, 0, 0, 202, 203, ! 0, 0, 204, 0, 0, 0, 0, 148, 0, 0, ! 0, 206, 207, 208, 209, 196, 197, 210, 211, 0, ! 82, 587, 0, 194, 195, 0, 0, 0, 0, 198, ! 0, 0, 0, 0, 0, 199, 0, 0, 0, 0, ! 0, 0, 200, 0, 0, 0, 201, 0, 0, 0, ! 0, 0, 84, 0, 0, 85, 24, 0, 0, 202, ! 203, 0, 0, 204, 611, 0, 196, 197, 0, 0, ! 0, 82, 206, 207, 208, 209, 0, 0, 210, 211, ! 198, 0, 708, 0, 194, 195, 199, 0, 0, 0, ! 0, 0, 0, 200, 0, 0, 0, 201, 0, 0, ! 0, 0, 0, 84, 0, 0, 85, 24, 0, 0, ! 202, 203, 0, 0, 204, 692, 0, 0, 0, 0, ! 0, 0, 0, 206, 207, 208, 209, 196, 197, 210, ! 211, 0, 82, 708, 0, 194, 195, 0, 0, 0, ! 0, 198, 0, 0, 0, 0, 0, 199, 0, 0, ! 0, 0, 0, 0, 200, 0, 0, 0, 201, 0, ! 0, 0, 0, 0, 84, 0, 0, 85, 24, 0, ! 0, 202, 203, 0, 0, 204, 709, 0, 196, 197, ! 0, 0, 0, 82, 206, 207, 208, 209, 0, 0, ! 210, 211, 198, 0, 595, 0, 194, 195, 199, 0, ! 0, 0, 0, 0, 0, 200, 0, 0, 0, 201, ! 0, 0, 0, 0, 0, 84, 0, 0, 85, 24, ! 0, 0, 202, 203, 0, 0, 204, 754, 0, 0, ! 0, 0, 0, 0, 0, 206, 207, 208, 209, 196, ! 197, 210, 211, 0, 82, 337, 0, 194, 195, 0, ! 0, 0, 0, 198, 0, 0, 0, 0, 0, 199, ! 0, 0, 0, 0, 0, 0, 200, 0, 0, 0, ! 201, 0, 0, 0, 0, 0, 84, 0, 0, 85, ! 24, 0, 0, 202, 203, 0, 0, 204, 0, 0, ! 196, 197, 0, 759, 0, 82, 206, 207, 208, 209, ! 0, 0, 210, 211, 198, 0, 344, 0, 194, 195, ! 199, 0, 0, 0, 0, 0, 0, 200, 0, 0, ! 0, 201, 0, 0, 0, 0, 0, 84, 0, 0, ! 85, 24, 0, 0, 202, 203, 0, 0, 204, 0, ! 0, 0, 0, 0, 0, 0, 0, 206, 207, 208, ! 209, 196, 197, 210, 211, 0, 82, 346, 0, 194, ! 195, 0, 0, 0, 0, 198, 0, 0, 0, 0, ! 0, 199, 0, 0, 0, 0, 0, 0, 200, 0, ! 0, 0, 201, 0, 0, 0, 0, 0, 84, 0, ! 0, 85, 24, 0, 0, 202, 203, 0, 0, 204, ! 0, 0, 196, 197, 0, 0, 0, 82, 206, 207, ! 208, 209, 0, 0, 210, 211, 198, 0, 355, 0, ! 194, 195, 199, 0, 0, 0, 0, 0, 0, 200, ! 0, 0, 0, 201, 0, 0, 0, 0, 0, 84, ! 0, 0, 85, 24, 0, 0, 202, 203, 0, 0, ! 204, 0, 0, 0, 0, 0, 0, 0, 0, 206, ! 207, 208, 209, 196, 197, 210, 211, 0, 82, 357, ! 0, 194, 195, 0, 0, 0, 0, 198, 0, 0, 0, 0, 0, 199, 0, 0, 0, 0, 0, 0, ! 200, 0, 0, 0, 201, 0, 0, 0, 0, 0, ! 84, 0, 0, 85, 24, 0, 0, 202, 203, 0, ! 0, 204, 0, 0, 196, 197, 0, 0, 0, 82, ! 206, 207, 208, 209, 0, 0, 210, 211, 198, 0, ! 359, 0, 194, 195, 199, 0, 0, 0, 0, 0, ! 0, 200, 0, 0, 0, 201, 0, 0, 0, 0, ! 0, 84, 0, 0, 85, 24, 0, 0, 202, 203, ! 0, 0, 204, 0, 0, 0, 0, 0, 0, 0, ! 0, 206, 207, 208, 209, 196, 197, 210, 211, 0, ! 82, 417, 0, 194, 195, 0, 0, 0, 0, 198, ! 0, 0, 0, 0, 0, 199, 0, 0, 0, 0, ! 0, 0, 200, 0, 0, 0, 201, 0, 0, 0, ! 0, 0, 84, 0, 0, 85, 24, 0, 0, 202, ! 203, 0, 0, 204, 0, 0, 196, 197, 0, 0, ! 0, 82, 206, 207, 208, 209, 0, 0, 210, 211, ! 198, 0, 506, 0, 194, 195, 199, 0, 0, 0, ! 0, 0, 0, 200, 0, 0, 0, 201, 0, 0, ! 0, 0, 0, 84, 0, 0, 85, 24, 0, 0, ! 202, 203, 0, 0, 204, 0, 0, 0, 0, 0, ! 0, 0, 0, 206, 207, 208, 209, 196, 197, 210, ! 211, 0, 82, 510, 0, 194, 195, 0, 0, 0, ! 0, 198, 0, 0, 0, 0, 0, 199, 0, 0, ! 0, 0, 0, 0, 200, 0, 0, 0, 201, 0, ! 0, 0, 0, 0, 84, 0, 0, 85, 24, 0, ! 0, 202, 203, 0, 0, 204, 0, 0, 196, 197, ! 0, 0, 0, 82, 206, 207, 208, 209, 0, 0, ! 210, 211, 198, 0, 512, 0, 194, 195, 199, 0, ! 0, 0, 0, 0, 0, 200, 0, 0, 0, 201, ! 0, 0, 0, 0, 0, 84, 0, 0, 85, 24, ! 0, 0, 202, 203, 0, 0, 204, 0, 0, 0, ! 0, 0, 0, 0, 0, 206, 207, 208, 209, 196, ! 197, 210, 211, 0, 82, 514, 0, 194, 195, 0, ! 0, 0, 0, 198, 0, 0, 0, 0, 0, 199, ! 0, 0, 0, 0, 0, 0, 200, 0, 0, 0, ! 201, 0, 0, 0, 0, 0, 84, 0, 0, 85, ! 24, 0, 0, 202, 203, 0, 0, 204, 0, 0, ! 196, 197, 0, 0, 0, 82, 206, 207, 208, 209, ! 0, 0, 210, 211, 198, 0, 516, 0, 194, 195, ! 199, 0, 0, 0, 0, 0, 0, 200, 0, 0, ! 0, 201, 0, 0, 0, 0, 0, 84, 0, 0, ! 85, 24, 0, 0, 202, 203, 0, 0, 204, 0, ! 0, 0, 0, 0, 0, 0, 0, 206, 207, 208, ! 209, 196, 197, 210, 211, 0, 82, 518, 0, 194, ! 195, 0, 0, 0, 0, 198, 0, 0, 0, 0, ! 0, 199, 0, 0, 0, 0, 0, 0, 200, 0, ! 0, 0, 201, 0, 0, 0, 0, 0, 84, 0, ! 0, 85, 24, 0, 0, 202, 203, 0, 0, 204, ! 0, 0, 196, 197, 0, 0, 0, 82, 206, 207, ! 208, 209, 0, 0, 210, 211, 198, 0, 520, 0, ! 194, 195, 199, 0, 0, 0, 0, 0, 0, 200, ! 0, 0, 0, 201, 0, 0, 0, 0, 0, 84, ! 0, 0, 85, 24, 0, 0, 202, 203, 0, 0, ! 204, 0, 0, 0, 0, 0, 0, 0, 0, 206, ! 207, 208, 209, 196, 197, 210, 211, 0, 82, 522, ! 0, 194, 195, 0, 0, 0, 0, 198, 0, 0, 0, 0, 0, 199, 0, 0, 0, 0, 0, 0, ! 200, 0, 0, 0, 201, 0, 0, 0, 0, 0, ! 84, 0, 0, 85, 24, 0, 0, 202, 203, 0, ! 0, 204, 0, 0, 196, 197, 0, 0, 0, 82, ! 206, 207, 208, 209, 0, 0, 210, 211, 198, 0, ! 524, 0, 194, 195, 199, 0, 0, 0, 0, 0, ! 0, 200, 0, 0, 0, 201, 0, 0, 0, 0, ! 0, 84, 0, 0, 85, 24, 0, 0, 202, 203, ! 0, 0, 204, 0, 0, 0, 0, 0, 0, 0, ! 0, 206, 207, 208, 209, 196, 197, 210, 211, 0, ! 82, 526, 0, 194, 195, 0, 0, 0, 0, 198, ! 0, 0, 0, 0, 0, 199, 0, 0, 0, 0, ! 0, 0, 200, 0, 0, 0, 201, 0, 0, 0, ! 0, 0, 84, 0, 0, 85, 24, 0, 0, 202, ! 203, 0, 0, 204, 0, 0, 196, 197, 0, 0, ! 0, 82, 206, 207, 208, 209, 0, 0, 210, 211, ! 198, 0, 528, 0, 194, 195, 199, 0, 0, 0, ! 0, 0, 0, 200, 0, 0, 0, 201, 0, 0, ! 0, 0, 0, 84, 0, 0, 85, 24, 0, 0, ! 202, 203, 0, 0, 204, 0, 0, 0, 0, 0, ! 0, 0, 0, 206, 207, 208, 209, 196, 197, 210, ! 211, 0, 82, 530, 0, 194, 195, 0, 0, 0, ! 0, 198, 0, 0, 0, 0, 0, 199, 0, 0, ! 0, 0, 0, 0, 200, 0, 0, 0, 201, 0, ! 0, 0, 0, 0, 84, 0, 0, 85, 24, 0, ! 0, 202, 203, 0, 0, 204, 0, 0, 196, 197, ! 0, 0, 0, 82, 206, 207, 208, 209, 0, 0, ! 210, 211, 198, 0, 532, 0, 194, 195, 199, 0, ! 0, 0, 0, 0, 0, 200, 0, 0, 0, 201, ! 0, 0, 0, 0, 0, 84, 0, 0, 85, 24, ! 0, 0, 202, 203, 0, 0, 204, 0, 0, 0, ! 0, 0, 0, 0, 0, 206, 207, 208, 209, 196, ! 197, 210, 211, 0, 82, 537, 0, 194, 195, 0, ! 0, 0, 0, 198, 0, 0, 0, 0, 0, 199, ! 0, 0, 0, 0, 0, 0, 200, 0, 0, 0, ! 201, 0, 0, 0, 0, 0, 84, 0, 0, 85, ! 24, 0, 0, 202, 203, 0, 0, 204, 0, 0, ! 196, 197, 0, 0, 0, 82, 206, 207, 208, 209, ! 0, 0, 210, 211, 198, 0, 539, 0, 194, 195, ! 199, 0, 0, 0, 0, 0, 0, 200, 0, 0, ! 0, 201, 0, 0, 0, 0, 0, 84, 0, 0, ! 85, 24, 0, 0, 202, 203, 0, 0, 204, 0, ! 0, 0, 0, 0, 0, 0, 0, 206, 207, 208, ! 209, 196, 197, 210, 211, 0, 82, 541, 0, 194, ! 195, 0, 0, 0, 0, 198, 0, 0, 0, 0, ! 0, 199, 0, 0, 0, 0, 0, 0, 200, 0, ! 0, 0, 201, 0, 0, 0, 0, 0, 84, 0, ! 0, 85, 24, 0, 0, 202, 203, 0, 0, 204, ! 0, 0, 196, 197, 0, 0, 0, 82, 206, 207, ! 208, 209, 0, 0, 210, 211, 198, 0, 543, 0, ! 194, 195, 199, 0, 0, 0, 0, 0, 0, 200, ! 0, 0, 0, 201, 0, 0, 0, 0, 0, 84, ! 0, 0, 85, 24, 0, 0, 202, 203, 0, 0, ! 204, 0, 0, 0, 0, 0, 0, 0, 0, 206, ! 207, 208, 209, 196, 197, 210, 211, 0, 82, 545, ! 0, 194, 195, 0, 0, 0, 0, 198, 0, 0, 0, 0, 0, 199, 0, 0, 0, 0, 0, 0, ! 200, 0, 0, 0, 201, 0, 0, 0, 0, 0, ! 84, 0, 0, 85, 24, 0, 0, 202, 203, 0, ! 0, 204, 0, 0, 196, 197, 0, 0, 0, 82, ! 206, 207, 208, 209, 0, 0, 210, 211, 198, 0, ! 547, 0, 194, 195, 199, 0, 0, 0, 0, 0, ! 0, 200, 0, 0, 0, 201, 0, 0, 0, 0, ! 0, 84, 0, 0, 85, 24, 0, 0, 202, 203, ! 0, 0, 204, 0, 0, 0, 0, 0, 0, 0, ! 0, 206, 207, 208, 209, 196, 197, 210, 211, 0, ! 82, 549, 0, 194, 195, 0, 0, 0, 0, 198, ! 0, 0, 0, 0, 0, 199, 0, 0, 0, 0, ! 0, 0, 200, 0, 0, 0, 201, 0, 0, 0, ! 0, 0, 84, 0, 0, 85, 24, 0, 0, 202, ! 203, 0, 0, 204, 0, 0, 196, 197, 0, 0, ! 0, 82, 206, 207, 208, 209, 0, 0, 210, 211, ! 198, 0, 554, 0, 194, 195, 199, 0, 0, 0, ! 0, 0, 0, 200, 0, 0, 0, 201, 0, 0, ! 0, 0, 0, 84, 0, 0, 85, 24, 0, 0, ! 202, 203, 0, 0, 204, 0, 0, 0, 0, 0, ! 0, 0, 0, 206, 207, 208, 209, 196, 197, 210, ! 211, 0, 82, 563, 0, 194, 195, 0, 0, 0, ! 0, 198, 0, 0, 0, 0, 0, 199, 0, 0, ! 0, 0, 0, 0, 200, 0, 0, 0, 201, 0, ! 0, 0, 0, 0, 84, 0, 0, 85, 24, 0, ! 0, 202, 203, 0, 0, 204, 0, 0, 196, 197, ! 0, 0, 0, 82, 206, 207, 208, 209, 0, 0, ! 210, 211, 198, 0, 571, 0, 194, 195, 199, 0, ! 0, 0, 0, 0, 0, 200, 0, 0, 0, 201, ! 0, 0, 0, 0, 0, 84, 0, 0, 85, 24, ! 0, 0, 202, 203, 0, 0, 204, 0, 0, 0, ! 0, 0, 0, 0, 0, 206, 207, 208, 209, 196, ! 197, 210, 211, 0, 82, 573, 0, 194, 195, 0, ! 0, 0, 0, 198, 0, 0, 0, 0, 0, 199, ! 0, 0, 0, 0, 0, 0, 200, 0, 0, 0, ! 201, 0, 0, 0, 0, 0, 84, 0, 0, 85, ! 24, 0, 0, 202, 203, 0, 0, 204, 0, 0, ! 196, 197, 0, 0, 0, 82, 206, 207, 208, 209, ! 0, 0, 210, 211, 198, 0, 598, 0, 194, 195, ! 199, 0, 0, 0, 0, 0, 0, 200, 0, 0, ! 0, 201, 0, 0, 0, 0, 0, 84, 0, 0, ! 85, 24, 0, 0, 202, 203, 0, 0, 204, 0, ! 0, 0, 0, 0, 0, 0, 0, 206, 207, 208, ! 209, 196, 197, 210, 211, 0, 82, 613, 0, 194, ! 195, 0, 0, 0, 0, 198, 0, 0, 0, 0, ! 0, 199, 0, 0, 0, 0, 0, 0, 200, 0, ! 0, 0, 201, 0, 0, 0, 0, 0, 84, 0, ! 0, 85, 24, 0, 0, 202, 203, 0, 0, 204, ! 0, 0, 196, 197, 0, 0, 0, 82, 206, 207, ! 208, 209, 0, 0, 210, 211, 198, 0, 678, 0, ! 194, 195, 199, 0, 0, 0, 0, 0, 0, 200, ! 0, 0, 0, 201, 0, 0, 0, 0, 0, 84, ! 0, 0, 85, 24, 0, 0, 202, 203, 0, 0, ! 204, 0, 0, 0, 0, 0, 0, 0, 0, 206, ! 207, 208, 209, 196, 197, 210, 211, 0, 82, 682, ! 0, 194, 195, 0, 0, 0, 0, 198, 0, 0, 0, 0, 0, 199, 0, 0, 0, 0, 0, 0, ! 200, 0, 0, 0, 201, 0, 0, 0, 0, 0, ! 84, 0, 0, 85, 24, 0, 0, 202, 203, 0, ! 0, 204, 0, 0, 196, 197, 0, 0, 0, 82, ! 206, 207, 208, 209, 0, 0, 210, 211, 198, 0, ! 688, 0, 194, 195, 199, 0, 0, 0, 0, 0, ! 0, 200, 0, 0, 0, 201, 0, 0, 0, 0, ! 0, 84, 0, 0, 85, 24, 0, 0, 202, 203, ! 0, 0, 204, 0, 0, 0, 0, 0, 0, 0, ! 0, 206, 207, 208, 209, 196, 197, 210, 211, 0, ! 82, 714, 0, 194, 195, 0, 0, 0, 0, 198, ! 0, 0, 0, 0, 0, 199, 0, 0, 0, 0, ! 0, 0, 200, 0, 0, 0, 201, 0, 0, 0, ! 0, 0, 84, 0, 0, 85, 24, 0, 0, 202, ! 203, 0, 0, 204, 0, 0, 196, 197, 0, 0, ! 0, 82, 206, 207, 208, 209, 0, 0, 210, 211, ! 198, 0, 665, 0, 0, 0, 199, 0, 0, 0, ! 0, 0, 0, 200, 0, 0, 0, 201, 0, 0, ! 0, 0, 0, 84, 0, 0, 85, 24, 0, 0, ! 202, 203, 0, 0, 204, 0, 0, 0, 0, 0, ! 0, 0, 0, 206, 207, 208, 209, 196, 197, 210, ! 211, 0, 82, 725, 0, 0, 0, 0, 0, 0, ! 0, 198, 0, 0, 0, 0, 0, 199, 0, 0, ! 0, 0, 0, 0, 200, 0, 0, 0, 201, 0, ! 0, 0, 0, 0, 84, 0, 0, 85, 24, 0, ! 0, 0, 0, 0, 0, 283, -295, 0, 196, 197, ! 0, 0, 0, 82, 206, 207, 208, 209, 0, 0, ! 210, 211, 198, 0, 663, 0, 0, 0, 199, 0, ! 0, 0, 0, 0, 0, 200, 0, 0, 0, 201, ! 0, 0, 0, 0, 0, 84, 0, 0, 85, 24, ! 0, 194, 195, 0, 0, 0, 283, -295, 0, 0, ! 0, 0, 0, 0, 0, 206, 207, 208, 209, 196, ! 197, 210, 211, 0, 82, 0, 0, 0, 0, 0, ! 0, 0, 0, 198, 0, 0, 0, 0, 0, 199, ! 0, 0, 0, 0, 196, 197, 200, 0, 0, 82, ! 201, 0, 0, 0, 0, 0, 84, 0, 198, 85, ! 24, 0, 194, 195, 199, 0, 0, 283, 0, 0, ! 0, 200, 0, 0, 0, 201, 206, 207, 208, 209, ! 0, 84, 210, 211, 85, 24, 0, 0, 202, 203, ! 0, 0, 204, 0, 205, 363, 0, 0, 0, 364, ! 0, 206, 207, 208, 209, 196, 197, 210, 211, 0, ! 82, 0, 0, 194, 195, 0, 0, 0, 0, 198, ! 0, 0, 0, 0, 0, 199, 0, 0, 0, 0, ! 0, 0, 200, 0, 0, 0, 201, 0, 0, 0, ! 0, 0, 84, 0, 0, 85, 24, 0, 0, 202, ! 203, 0, 0, 204, 495, 0, 196, 197, 0, 0, ! 0, 82, 206, 207, 208, 209, 0, 0, 210, 211, ! 198, 0, 0, 0, 194, 195, 199, 0, 0, 0, ! 0, 0, 0, 200, 0, 0, 0, 201, 0, 0, ! 0, 0, 0, 84, 0, 0, 85, 24, 0, 0, ! 202, 203, 0, 0, 204, 629, 0, 0, 0, 0, ! 0, 0, 0, 206, 207, 208, 209, 196, 197, 210, ! 211, 0, 82, 0, 0, 194, 195, 0, 0, 0, ! 0, 198, 0, 0, 0, 0, 0, 199, 0, 0, ! 0, 0, 0, 0, 200, 0, 0, 0, 201, 0, ! 0, 0, 0, 0, 84, 0, 0, 85, 24, 0, ! 0, 202, 203, 0, 0, 204, 671, 0, 196, 197, ! 0, 0, 0, 82, 206, 207, 208, 209, 0, 0, ! 210, 211, 198, 0, 0, 0, 194, 195, 199, 0, ! 0, 0, 0, 0, 0, 200, 0, 0, 0, 201, ! 0, 0, 0, 0, 0, 84, 0, 0, 85, 24, ! 0, 0, 202, 203, 0, 0, 204, 684, 0, 0, ! 0, 0, 0, 0, 0, 206, 207, 208, 209, 196, ! 197, 210, 211, 0, 82, 0, 0, 0, 0, 0, ! 0, 0, 0, 198, 0, 0, 0, 0, 0, 199, ! 0, 0, 0, 0, 0, 0, 200, 0, 0, 0, ! 201, 0, 0, 0, 0, 0, 84, 0, 0, 85, ! 24, 0, 0, 202, 203, 0, 0, 204, 0, 5, ! 196, 197, 0, 0, 0, 82, 206, 207, 208, 209, ! 0, 0, 210, 211, 198, 0, 0, 0, 0, 0, ! 199, 0, 0, 0, 0, 0, 0, 200, 0, 0, ! 82, 201, 0, 0, 0, 0, 0, 84, 0, 198, ! 85, 24, 0, 0, 0, 199, 0, 0, 283, 0, ! 0, 0, 200, 0, 0, 0, 201, 206, 207, 208, ! 209, 0, 84, 210, 211, 85, 24, 0, 0, 202, ! 203, 0, 0, 204, 0, 0, 0, 0, 0, 0, ! 0, 0, 206, 207, 208, 209, 0, 0, 210, 211 }; static const short yycheck[] = { ! 6, 136, 314, 9, 127, 294, 334, 66, 205, 180, ! 137, 488, 133, 301, 1, 66, 1, 175, 138, 668, ! 2, 309, 1, 311, 1, 15, 54, 1, 48, 133, ! 12, 13, 14, 0, 93, 442, 1, 1, 639, 98, ! 46, 162, 93, 63, 50, 87, 660, 98, 169, 46, ! 88, 1, 34, 50, 1, 37, 38, 69, 162, 1, ! 66, 1, 68, 121, 76, 73, 133, 73, 1, 96, ! 98, 68, 1, 55, 133, 482, 73, 97, 137, 87, ! 200, 68, 133, 144, 66, 1, 137, 93, 1, 100, ! 101, 68, 98, 151, 1, 162, 154, 698, 88, 111, ! 701, 160, 509, 162, 194, 719, 196, 197, 1, 160, ! 759, 162, 202, 203, 172, 100, 98, 102, 1, 768, ! 94, 100, 1, 102, 175, 184, 132, 133, 102, 7, ! 8, 137, 138, 184, 261, 132, 100, 102, 1, 1, ! 617, 138, 1, 204, 205, 266, 96, 89, 95, 200, ! 100, 133, 1, 204, 160, 137, 162, 1, 279, 99, ! 1, 284, 40, 41, 335, 766, 44, 100, 101, 175, ! 771, 100, 773, 1, 775, 213, 54, 93, 184, 95, ! 162, 1, 98, 99, 100, 101, 99, 1, 194, 195, ! 196, 197, 99, 175, 200, 602, 202, 203, 204, 639, ! 0, 1, 261, 200, 262, 83, 99, 334, 87, 87, ! 261, 272, 1, 1, 275, 1, 336, 100, 101, 626, ! 1, 100, 283, 1, 0, 1, 1, 1, 87, 636, ! 93, 94, 291, 95, 639, 98, 99, 100, 101, 101, ! 291, 100, 1, 294, 651, 45, 95, 285, 126, 127, ! 1, 95, 101, 411, 95, 261, 56, 101, 698, 1, ! 101, 701, 62, 314, 1, 143, 1, 53, 68, 45, ! 1, 101, 100, 562, 94, 334, 76, 1, 64, 261, ! 56, 95, 594, 334, 596, 291, 62, 101, 294, 379, ! 380, 381, 68, 698, 491, 301, 701, 175, 95, 95, ! 100, 98, 180, 309, 1, 311, 102, 95, 314, 370, ! 96, 100, 294, 374, 352, 353, 644, 1, 441, 100, ! 94, 99, 360, 361, 100, 100, 766, 734, 334, 1, ! 336, 771, 314, 773, 1, 775, 53, 12, 399, 336, ! 391, 100, 1, 100, 101, 223, 635, 1, 99, 0, ! 1, 639, 334, 1, 1, 416, 668, 1, 100, 1, ! 411, 766, 37, 100, 99, 426, 771, 428, 773, 100, ! 775, 95, 66, 379, 380, 381, 382, 383, 384, 385, ! 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, ! 396, 397, 398, 483, 45, 66, 274, 94, 459, 93, ! 461, 559, 102, 281, 98, 411, 284, 0, 1, 175, ! 698, 62, 96, 701, 475, 1, 294, 68, 46, 47, ! 98, 1, 64, 301, 96, 1, 96, 98, 95, 411, ! 491, 309, 721, 311, 1, 94, 724, 639, 476, 133, ! 87, 479, 96, 137, 0, 1, 1, 759, 96, 100, ! 738, 95, 45, 1, 96, 576, 768, 335, 579, 0, ! 1, 1, 133, 56, 752, 5, 160, 53, 162, 62, ! 98, 101, 350, 53, 102, 68, 94, 483, 766, 1, ! 175, 175, 488, 771, 64, 773, 1, 775, 64, 45, ! 184, 162, 1, 371, 629, 373, 698, 535, 98, 701, ! 56, 1, 102, 1, 45, 1, 62, 100, 559, 1, ! 96, 562, 68, 0, 1, 1, 96, 644, 93, 2, ! 96, 62, 89, 98, 99, 99, 616, 68, 294, 12, ! 13, 14, 1, 411, 95, 301, 98, 98, 1, 94, ! 675, 1, 1, 309, 100, 311, 94, 87, 314, 670, ! 1, 34, 687, 559, 37, 38, 562, 1, 45, 100, ! 438, 68, 623, 441, 766, 87, 73, 261, 95, 771, ! 175, 773, 55, 775, 101, 62, 1, 559, 87, 94, ! 562, 68, 45, 66, 635, 644, 1, 1, 1, 87, ! 0, 1, 97, 644, 94, 656, 731, 291, 94, 294, ! 294, 662, 94, 133, 94, 68, 301, 51, 94, 660, ! 616, 617, 2, 100, 309, 98, 311, 1, 87, 314, ! 314, 1, 12, 13, 14, 132, 632, 87, 87, 635, ! 160, 94, 162, 639, 1, 45, 87, 1, 644, 83, ! 334, 96, 86, 87, 34, 411, 45, 37, 38, 175, ! 133, 48, 62, 635, 660, 68, 1, 45, 68, 1, ! 73, 45, 644, 62, 77, 55, 63, 51, 719, 68, ! 721, 98, 87, 87, 87, 102, 737, 1, 660, 162, ! 741, 559, 46, 47, 562, 1, 54, 95, 1, 294, ! 100, 1, 698, 101, 1, 701, 301, 391, 1, 83, ! 97, 1, 86, 87, 309, 476, 311, 87, 479, 314, ! 101, 95, 1, 719, 1, 721, 411, 411, 724, 1, ! 87, 45, 98, 87, 66, 89, 68, 51, 92, 93, ! 94, 73, 738, 559, 98, 77, 562, 719, 102, 721, ! 94, 51, 87, 133, 98, 87, 752, 1, 102, 1, ! 96, 3, 4, 102, 100, 633, 96, 635, 98, 83, ! 766, 639, 86, 87, 12, 771, 14, 773, 294, 775, ! 102, 87, 162, 83, 87, 301, 86, 87, 11, 66, ! 87, 68, 660, 309, 87, 311, 73, 87, 314, 37, ! 77, 45, 175, 559, 46, 47, 562, 51, 87, 51, ! 87, 46, 47, 175, 95, 87, 411, 98, 60, 635, ! 478, 102, 480, 12, 66, 18, 19, 20, 21, 102, ! 698, 73, 1, 701, 13, 77, 14, 51, 594, 83, ! 596, 83, 86, 87, 86, 87, 96, 698, 90, 91, ! 701, 719, 94, 721, 96, 97, 724, 87, 92, 93, ! 13, 103, 104, 105, 106, 58, 94, 109, 110, 83, ! 738, 100, 86, 87, 559, 559, 45, 562, 562, 635, ! 95, 34, 51, 639, 752, 38, 101, 94, 46, 47, ! 100, 60, 175, 62, 95, 411, 126, 127, 766, 68, ! 101, 100, 55, 771, 660, 773, 98, 775, 68, 594, ! 95, 596, 668, 95, 83, 766, 101, 86, 87, 101, ! 771, 294, 773, 97, 775, 96, 97, 96, 301, 100, ! 97, 61, 294, 101, 101, 65, 309, 96, 311, 301, ! 98, 314, 698, 67, 102, 701, 94, 309, 94, 311, ! 635, 635, 314, 89, 639, 1, 45, 5, 6, 7, ! 644, 94, 51, 719, 559, 721, 95, 562, 724, 92, ! 93, 60, 1, 62, 94, 660, 660, 3, 4, 68, ! 87, 100, 738, 668, 95, 92, 93, 94, 8, 9, ! 10, 98, 16, 17, 83, 102, 752, 86, 87, 594, ! 95, 596, 96, 759, 387, 388, 389, 390, 97, 1, ! 766, 294, 768, 698, 45, 771, 701, 773, 301, 775, ! 51, 92, 93, 92, 93, 94, 309, 95, 311, 98, ! 96, 314, 1, 102, 719, 719, 721, 721, 411, 724, ! 635, 46, 47, 559, 639, 101, 562, 46, 47, 411, ! 392, 393, 83, 738, 57, 86, 87, 98, 99, 100, ! 92, 93, 94, 57, 95, 660, 98, 752, 98, 99, ! 102, 382, 383, 668, 759, 100, 175, 95, 594, 95, ! 596, 766, 51, 768, 1, 95, 771, 87, 773, 95, ! 775, 60, 92, 93, 94, 1, 100, 66, 98, 384, ! 385, 386, 102, 698, 73, 87, 701, 100, 77, 95, ! 92, 93, 94, 57, 83, 95, 98, 86, 87, 635, ! 102, 90, 91, 639, 719, 94, 721, 391, 411, 724, ! 14, 1, 58, 79, 103, 104, 105, 106, 160, 162, ! 109, 110, 143, 738, 660, 261, 411, 56, 98, 294, ! 268, 314, 668, 314, 658, 658, 577, 752, 577, 353, ! 195, 394, 398, 395, 759, 396, 632, -1, -1, -1, ! 397, 766, -1, 768, -1, 45, 771, 402, 773, -1, ! 775, 51, 698, -1, -1, 701, 559, -1, -1, 562, ! 60, -1, 62, -1, -1, 294, -1, 559, 68, 1, ! 562, 3, 301, 719, -1, 721, -1, -1, 724, -1, ! 309, -1, 311, 83, -1, 314, 86, 87, -1, -1, ! -1, 594, 738, 596, -1, -1, -1, -1, -1, -1, ! -1, -1, 594, -1, 596, -1, 752, -1, -1, -1, ! -1, -1, -1, 759, 46, 47, -1, -1, -1, 51, ! 766, -1, 768, -1, -1, 771, -1, 773, 60, 775, ! -1, -1, 635, -1, 66, -1, 639, -1, -1, -1, ! -1, 73, -1, 635, -1, 77, 559, 639, -1, 562, ! -1, 83, -1, -1, 86, 87, -1, 660, 90, 91, ! -1, -1, 94, -1, -1, 668, -1, -1, 660, -1, ! -1, 103, 104, 105, 106, -1, 668, 109, 110, -1, ! -1, 594, 411, 596, 194, 195, 196, 197, -1, -1, ! -1, -1, 202, 203, -1, 698, -1, -1, 701, -1, ! -1, -1, 45, -1, -1, -1, 698, -1, 51, 701, ! -1, -1, -1, -1, -1, -1, 719, 60, 721, 62, ! -1, 724, 635, -1, -1, 68, 639, 719, -1, 721, ! -1, -1, 724, -1, -1, 738, -1, -1, -1, -1, ! 83, -1, -1, 86, 87, -1, 738, 660, -1, 752, ! -1, -1, -1, 96, 97, 668, 759, 100, -1, -1, ! 752, -1, -1, 766, -1, 768, -1, 759, 771, -1, ! 773, -1, 775, -1, 766, -1, 768, -1, -1, 771, ! 45, 773, -1, 775, -1, 698, 51, -1, 701, -1, ! -1, -1, -1, -1, -1, 60, -1, 62, -1, -1, ! -1, -1, -1, 68, -1, -1, 719, -1, 721, -1, ! -1, 724, -1, -1, -1, -1, -1, -1, 83, -1, ! -1, 86, 87, -1, -1, 738, -1, -1, -1, -1, ! 559, 96, 97, 562, -1, 100, -1, -1, -1, 752, -1, -1, -1, -1, -1, -1, 759, -1, -1, -1, ! 1, -1, -1, 766, -1, 768, -1, -1, 771, -1, ! 773, -1, 775, -1, -1, 594, -1, 596, -1, 379, ! 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, ! 390, -1, 392, 393, 394, 395, 396, 397, 398, 194, ! 195, 196, 197, -1, 45, 46, 47, 202, 203, -1, ! 51, -1, -1, -1, -1, -1, 635, -1, -1, 60, ! 639, 1, -1, 3, 4, 66, -1, -1, -1, -1, ! -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, ! -1, 660, 83, -1, -1, 86, 87, -1, -1, 668, ! -1, -1, -1, 94, -1, -1, -1, -1, -1, 100, ! -1, -1, 103, 104, 105, 106, 46, 47, 109, 110, ! -1, 51, -1, -1, -1, -1, -1, -1, -1, 698, ! 60, -1, 701, 483, -1, -1, 66, -1, 488, -1, ! -1, -1, -1, 73, -1, -1, -1, 77, -1, -1, ! 719, -1, 721, 83, -1, 724, 86, 87, -1, -1, ! 90, 91, -1, -1, 94, -1, 96, -1, -1, 738, ! -1, 45, -1, 103, 104, 105, 106, 51, -1, 109, ! 110, -1, -1, 752, -1, -1, 60, -1, 62, -1, ! 759, -1, -1, -1, 68, -1, -1, 766, -1, 768, ! -1, -1, 771, -1, 773, -1, 775, -1, -1, 83, ! -1, -1, 86, 87, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, 97, -1, 1, -1, -1, -1, -1, ! -1, -1, -1, -1, 379, 380, 381, 382, 383, 384, ! 385, 386, 387, 388, 389, 390, -1, 392, 393, 394, ! 395, 396, 397, 398, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, 616, 617, -1, 45, ! 46, 47, 48, 49, 50, 51, 52, -1, -1, 55, ! -1, -1, 632, 59, 60, -1, -1, 63, -1, -1, ! 66, 67, 68, 69, -1, 71, 72, 73, 74, -1, ! 1, 77, -1, -1, -1, -1, -1, 83, -1, -1, ! 86, 87, -1, -1, -1, -1, -1, -1, 94, -1, ! 96, 97, -1, -1, 100, -1, -1, 103, 104, 105, ! 106, -1, -1, 109, 110, -1, -1, -1, 483, -1, ! -1, -1, -1, 488, 45, 46, 47, 48, 49, 50, ! 51, 52, -1, -1, 55, -1, -1, -1, 59, 60, ! -1, -1, 63, -1, -1, 66, 67, 68, 69, -1, ! 71, 72, 73, 74, 1, -1, 77, -1, -1, -1, ! -1, -1, 83, -1, -1, 86, 87, -1, -1, -1, ! -1, -1, -1, 94, -1, 96, 97, -1, -1, 100, ! -1, -1, 103, 104, 105, 106, -1, -1, 109, 110, ! -1, -1, -1, -1, -1, -1, -1, -1, 45, 46, ! 47, 48, 49, 50, 51, 52, -1, -1, 55, -1, ! -1, -1, 59, 60, -1, -1, 63, -1, -1, 66, ! 67, 68, 69, -1, 71, 72, 73, 74, 1, -1, ! 77, -1, -1, -1, -1, -1, 83, -1, -1, 86, ! 87, -1, -1, -1, -1, -1, -1, 94, -1, 96, ! 97, 616, 617, 100, -1, -1, 103, 104, 105, 106, ! -1, -1, 109, 110, -1, -1, -1, 632, -1, -1, ! -1, -1, 45, 46, 47, -1, 49, 50, 51, 52, -1, -1, 55, -1, -1, -1, 59, 60, -1, -1, ! -1, -1, -1, 66, 67, 68, 69, 1, 71, 72, ! 73, 74, -1, -1, 77, -1, -1, -1, -1, -1, ! 83, -1, -1, 86, 87, -1, -1, -1, -1, -1, ! -1, 94, -1, 96, 97, -1, -1, 100, -1, -1, ! 103, 104, 105, 106, -1, -1, 109, 110, -1, -1, ! -1, 45, 46, 47, -1, 49, 50, 51, 52, -1, -1, 55, -1, -1, -1, 59, 60, -1, -1, -1, ! -1, -1, 66, 67, 68, 69, 1, 71, 72, 73, ! 74, -1, -1, 77, -1, -1, -1, -1, -1, 83, ! -1, -1, 86, 87, -1, -1, -1, -1, -1, -1, ! 94, -1, 96, -1, -1, -1, 100, -1, -1, 103, ! 104, 105, 106, -1, -1, 109, 110, -1, -1, -1, ! 45, 46, 47, -1, 49, 50, 51, 52, -1, -1, ! 55, -1, -1, -1, 59, 60, -1, -1, -1, -1, ! -1, 66, 67, 1, 69, -1, 71, 72, 73, 74, ! -1, -1, 77, -1, -1, -1, -1, -1, 83, -1, ! -1, 86, 87, -1, -1, -1, -1, -1, -1, 94, ! -1, 96, -1, -1, -1, 100, -1, -1, 103, 104, ! 105, 106, -1, -1, 109, 110, -1, 45, 46, 47, ! -1, 49, 50, 51, 52, -1, -1, 55, -1, -1, ! -1, 59, 60, -1, 1, -1, 3, 4, 66, 67, ! -1, 69, -1, 71, 72, 73, 74, -1, -1, 77, ! -1, -1, -1, -1, -1, 83, -1, -1, 86, 87, ! -1, -1, -1, -1, -1, -1, 94, -1, 96, -1, ! -1, -1, 100, -1, -1, 103, 104, 105, 106, 46, ! 47, 109, 110, -1, 51, 1, -1, 3, 4, -1, ! -1, -1, -1, 60, -1, -1, -1, -1, -1, 66, ! -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, ! 77, -1, -1, -1, -1, -1, 83, -1, -1, 86, ! 87, -1, -1, 90, 91, -1, -1, 94, -1, -1, ! 46, 47, -1, 100, -1, 51, 103, 104, 105, 106, ! -1, -1, 109, 110, 60, -1, 1, -1, 3, 4, 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, ! -1, 77, -1, -1, -1, -1, -1, 83, -1, -1, ! 86, 87, -1, -1, 90, 91, -1, -1, 94, -1, ! -1, -1, -1, 99, -1, -1, -1, 103, 104, 105, ! 106, 46, 47, 109, 110, -1, 51, 1, -1, 3, ! 4, -1, -1, -1, -1, 60, -1, -1, -1, -1, ! -1, 66, -1, -1, -1, -1, -1, -1, 73, -1, ! -1, -1, 77, -1, -1, -1, -1, -1, 83, -1, ! -1, 86, 87, -1, 89, 90, 91, -1, -1, 94, ! -1, -1, 46, 47, -1, -1, -1, 51, 103, 104, ! 105, 106, -1, -1, 109, 110, 60, -1, 1, -1, ! 3, 4, 66, -1, -1, -1, -1, -1, -1, 73, ! -1, -1, -1, 77, -1, -1, -1, -1, -1, 83, ! -1, -1, 86, 87, -1, -1, 90, 91, -1, -1, ! 94, 95, -1, -1, -1, -1, -1, -1, -1, 103, ! 104, 105, 106, 46, 47, 109, 110, -1, 51, 1, ! -1, 3, 4, -1, -1, -1, -1, 60, -1, -1, ! -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, ! 73, -1, -1, -1, 77, -1, -1, -1, -1, -1, ! 83, -1, -1, 86, 87, -1, -1, 90, 91, -1, ! -1, 94, -1, -1, 46, 47, -1, 100, -1, 51, ! 103, 104, 105, 106, -1, -1, 109, 110, 60, -1, ! 1, -1, 3, 4, 66, -1, -1, -1, -1, -1, ! -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, ! -1, 83, -1, -1, 86, 87, -1, -1, 90, 91, ! -1, -1, 94, -1, -1, -1, -1, 99, -1, -1, ! -1, 103, 104, 105, 106, 46, 47, 109, 110, -1, ! 51, 1, -1, 3, 4, -1, -1, -1, -1, 60, ! -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, ! -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, ! -1, -1, 83, -1, -1, 86, 87, -1, -1, 90, ! 91, -1, -1, 94, 95, -1, 46, 47, -1, -1, ! -1, 51, 103, 104, 105, 106, -1, -1, 109, 110, ! 60, -1, 1, -1, 3, 4, 66, -1, -1, -1, ! -1, -1, -1, 73, -1, -1, -1, 77, -1, -1, ! -1, -1, -1, 83, -1, -1, 86, 87, -1, -1, ! 90, 91, -1, -1, 94, 95, -1, -1, -1, -1, ! -1, -1, -1, 103, 104, 105, 106, 46, 47, 109, ! 110, -1, 51, 1, -1, 3, 4, -1, -1, -1, ! -1, 60, -1, -1, -1, -1, -1, 66, -1, -1, ! -1, -1, -1, -1, 73, -1, -1, -1, 77, -1, ! -1, -1, -1, -1, 83, -1, -1, 86, 87, -1, ! -1, 90, 91, -1, -1, 94, 95, -1, 46, 47, ! -1, -1, -1, 51, 103, 104, 105, 106, -1, -1, ! 109, 110, 60, -1, 1, -1, 3, 4, 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, ! -1, -1, -1, -1, -1, 83, -1, -1, 86, 87, ! -1, -1, 90, 91, -1, -1, 94, 95, -1, -1, ! -1, -1, -1, -1, -1, 103, 104, 105, 106, 46, ! 47, 109, 110, -1, 51, 1, -1, 3, 4, -1, ! -1, -1, -1, 60, -1, -1, -1, -1, -1, 66, ! -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, ! 77, -1, -1, -1, -1, -1, 83, -1, -1, 86, ! 87, -1, -1, 90, 91, -1, -1, 94, -1, -1, ! 46, 47, -1, 100, -1, 51, 103, 104, 105, 106, ! -1, -1, 109, 110, 60, -1, 1, -1, 3, 4, ! 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, ! -1, 77, -1, -1, -1, -1, -1, 83, -1, -1, ! 86, 87, -1, -1, 90, 91, -1, -1, 94, -1, ! -1, -1, -1, -1, -1, -1, -1, 103, 104, 105, ! 106, 46, 47, 109, 110, -1, 51, 1, -1, 3, ! 4, -1, -1, -1, -1, 60, -1, -1, -1, -1, ! -1, 66, -1, -1, -1, -1, -1, -1, 73, -1, ! -1, -1, 77, -1, -1, -1, -1, -1, 83, -1, ! -1, 86, 87, -1, -1, 90, 91, -1, -1, 94, ! -1, -1, 46, 47, -1, -1, -1, 51, 103, 104, ! 105, 106, -1, -1, 109, 110, 60, -1, 1, -1, ! 3, 4, 66, -1, -1, -1, -1, -1, -1, 73, ! -1, -1, -1, 77, -1, -1, -1, -1, -1, 83, ! -1, -1, 86, 87, -1, -1, 90, 91, -1, -1, ! 94, -1, -1, -1, -1, -1, -1, -1, -1, 103, ! 104, 105, 106, 46, 47, 109, 110, -1, 51, 1, ! -1, 3, 4, -1, -1, -1, -1, 60, -1, -1, ! -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, ! 73, -1, -1, -1, 77, -1, -1, -1, -1, -1, ! 83, -1, -1, 86, 87, -1, -1, 90, 91, -1, ! -1, 94, -1, -1, 46, 47, -1, -1, -1, 51, ! 103, 104, 105, 106, -1, -1, 109, 110, 60, -1, ! 1, -1, 3, 4, 66, -1, -1, -1, -1, -1, ! -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, ! -1, 83, -1, -1, 86, 87, -1, -1, 90, 91, ! -1, -1, 94, -1, -1, -1, -1, -1, -1, -1, ! -1, 103, 104, 105, 106, 46, 47, 109, 110, -1, ! 51, 1, -1, 3, 4, -1, -1, -1, -1, 60, ! -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, ! -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, ! -1, -1, 83, -1, -1, 86, 87, -1, -1, 90, ! 91, -1, -1, 94, -1, -1, 46, 47, -1, -1, ! -1, 51, 103, 104, 105, 106, -1, -1, 109, 110, ! 60, -1, 1, -1, 3, 4, 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, -1, -1, ! -1, -1, -1, 83, -1, -1, 86, 87, -1, -1, ! 90, 91, -1, -1, 94, -1, -1, -1, -1, -1, ! -1, -1, -1, 103, 104, 105, 106, 46, 47, 109, ! 110, -1, 51, 1, -1, 3, 4, -1, -1, -1, ! -1, 60, -1, -1, -1, -1, -1, 66, -1, -1, ! -1, -1, -1, -1, 73, -1, -1, -1, 77, -1, ! -1, -1, -1, -1, 83, -1, -1, 86, 87, -1, ! -1, 90, 91, -1, -1, 94, -1, -1, 46, 47, ! -1, -1, -1, 51, 103, 104, 105, 106, -1, -1, ! 109, 110, 60, -1, 1, -1, 3, 4, 66, -1, ! -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, ! -1, -1, -1, -1, -1, 83, -1, -1, 86, 87, ! -1, -1, 90, 91, -1, -1, 94, -1, -1, -1, ! -1, -1, -1, -1, -1, 103, 104, 105, 106, 46, ! 47, 109, 110, -1, 51, 1, -1, 3, 4, -1, ! -1, -1, -1, 60, -1, -1, -1, -1, -1, 66, ! -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, ! 77, -1, -1, -1, -1, -1, 83, -1, -1, 86, ! 87, -1, -1, 90, 91, -1, -1, 94, -1, -1, ! 46, 47, -1, -1, -1, 51, 103, 104, 105, 106, ! -1, -1, 109, 110, 60, -1, 1, -1, 3, 4, 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, ! -1, 77, -1, -1, -1, -1, -1, 83, -1, -1, ! 86, 87, -1, -1, 90, 91, -1, -1, 94, -1, ! -1, -1, -1, -1, -1, -1, -1, 103, 104, 105, ! 106, 46, 47, 109, 110, -1, 51, 1, -1, 3, ! 4, -1, -1, -1, -1, 60, -1, -1, -1, -1, ! -1, 66, -1, -1, -1, -1, -1, -1, 73, -1, ! -1, -1, 77, -1, -1, -1, -1, -1, 83, -1, ! -1, 86, 87, -1, -1, 90, 91, -1, -1, 94, ! -1, -1, 46, 47, -1, -1, -1, 51, 103, 104, ! 105, 106, -1, -1, 109, 110, 60, -1, 1, -1, ! 3, 4, 66, -1, -1, -1, -1, -1, -1, 73, ! -1, -1, -1, 77, -1, -1, -1, -1, -1, 83, ! -1, -1, 86, 87, -1, -1, 90, 91, -1, -1, ! 94, -1, -1, -1, -1, -1, -1, -1, -1, 103, ! 104, 105, 106, 46, 47, 109, 110, -1, 51, 1, ! -1, 3, 4, -1, -1, -1, -1, 60, -1, -1, ! -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, ! 73, -1, -1, -1, 77, -1, -1, -1, -1, -1, ! 83, -1, -1, 86, 87, -1, -1, 90, 91, -1, ! -1, 94, -1, -1, 46, 47, -1, -1, -1, 51, ! 103, 104, 105, 106, -1, -1, 109, 110, 60, -1, ! 1, -1, 3, 4, 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, ! -1, 83, -1, -1, 86, 87, -1, -1, 90, 91, ! -1, -1, 94, -1, -1, -1, -1, -1, -1, -1, ! -1, 103, 104, 105, 106, 46, 47, 109, 110, -1, ! 51, 1, -1, 3, 4, -1, -1, -1, -1, 60, ! -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, ! -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, ! -1, -1, 83, -1, -1, 86, 87, -1, -1, 90, ! 91, -1, -1, 94, -1, -1, 46, 47, -1, -1, ! -1, 51, 103, 104, 105, 106, -1, -1, 109, 110, ! 60, -1, 1, -1, 3, 4, 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, -1, -1, ! -1, -1, -1, 83, -1, -1, 86, 87, -1, -1, ! 90, 91, -1, -1, 94, -1, -1, -1, -1, -1, ! -1, -1, -1, 103, 104, 105, 106, 46, 47, 109, ! 110, -1, 51, 1, -1, 3, 4, -1, -1, -1, ! -1, 60, -1, -1, -1, -1, -1, 66, -1, -1, ! -1, -1, -1, -1, 73, -1, -1, -1, 77, -1, ! -1, -1, -1, -1, 83, -1, -1, 86, 87, -1, ! -1, 90, 91, -1, -1, 94, -1, -1, 46, 47, ! -1, -1, -1, 51, 103, 104, 105, 106, -1, -1, ! 109, 110, 60, -1, 1, -1, 3, 4, 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, ! -1, -1, -1, -1, -1, 83, -1, -1, 86, 87, ! -1, -1, 90, 91, -1, -1, 94, -1, -1, -1, ! -1, -1, -1, -1, -1, 103, 104, 105, 106, 46, ! 47, 109, 110, -1, 51, 1, -1, 3, 4, -1, ! -1, -1, -1, 60, -1, -1, -1, -1, -1, 66, ! -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, ! 77, -1, -1, -1, -1, -1, 83, -1, -1, 86, ! 87, -1, -1, 90, 91, -1, -1, 94, -1, -1, ! 46, 47, -1, -1, -1, 51, 103, 104, 105, 106, ! -1, -1, 109, 110, 60, -1, 1, -1, 3, 4, 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, ! -1, 77, -1, -1, -1, -1, -1, 83, -1, -1, ! 86, 87, -1, -1, 90, 91, -1, -1, 94, -1, ! -1, -1, -1, -1, -1, -1, -1, 103, 104, 105, ! 106, 46, 47, 109, 110, -1, 51, 1, -1, 3, ! 4, -1, -1, -1, -1, 60, -1, -1, -1, -1, ! -1, 66, -1, -1, -1, -1, -1, -1, 73, -1, ! -1, -1, 77, -1, -1, -1, -1, -1, 83, -1, ! -1, 86, 87, -1, -1, 90, 91, -1, -1, 94, ! -1, -1, 46, 47, -1, -1, -1, 51, 103, 104, ! 105, 106, -1, -1, 109, 110, 60, -1, 1, -1, ! 3, 4, 66, -1, -1, -1, -1, -1, -1, 73, ! -1, -1, -1, 77, -1, -1, -1, -1, -1, 83, ! -1, -1, 86, 87, -1, -1, 90, 91, -1, -1, ! 94, -1, -1, -1, -1, -1, -1, -1, -1, 103, ! 104, 105, 106, 46, 47, 109, 110, -1, 51, 1, ! -1, 3, 4, -1, -1, -1, -1, 60, -1, -1, ! -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, ! 73, -1, -1, -1, 77, -1, -1, -1, -1, -1, ! 83, -1, -1, 86, 87, -1, -1, 90, 91, -1, ! -1, 94, -1, -1, 46, 47, -1, -1, -1, 51, ! 103, 104, 105, 106, -1, -1, 109, 110, 60, -1, ! 1, -1, 3, 4, 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, ! -1, 83, -1, -1, 86, 87, -1, -1, 90, 91, ! -1, -1, 94, -1, -1, -1, -1, -1, -1, -1, ! -1, 103, 104, 105, 106, 46, 47, 109, 110, -1, ! 51, 1, -1, 3, 4, -1, -1, -1, -1, 60, ! -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, ! -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, ! -1, -1, 83, -1, -1, 86, 87, -1, -1, 90, ! 91, -1, -1, 94, -1, -1, 46, 47, -1, -1, ! -1, 51, 103, 104, 105, 106, -1, -1, 109, 110, ! 60, -1, 1, -1, 3, 4, 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, -1, -1, ! -1, -1, -1, 83, -1, -1, 86, 87, -1, -1, ! 90, 91, -1, -1, 94, -1, -1, -1, -1, -1, ! -1, -1, -1, 103, 104, 105, 106, 46, 47, 109, ! 110, -1, 51, 1, -1, 3, 4, -1, -1, -1, ! -1, 60, -1, -1, -1, -1, -1, 66, -1, -1, ! -1, -1, -1, -1, 73, -1, -1, -1, 77, -1, ! -1, -1, -1, -1, 83, -1, -1, 86, 87, -1, ! -1, 90, 91, -1, -1, 94, -1, -1, 46, 47, ! -1, -1, -1, 51, 103, 104, 105, 106, -1, -1, ! 109, 110, 60, -1, 1, -1, 3, 4, 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, ! -1, -1, -1, -1, -1, 83, -1, -1, 86, 87, ! -1, -1, 90, 91, -1, -1, 94, -1, -1, -1, ! -1, -1, -1, -1, -1, 103, 104, 105, 106, 46, ! 47, 109, 110, -1, 51, 1, -1, 3, 4, -1, ! -1, -1, -1, 60, -1, -1, -1, -1, -1, 66, ! -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, ! 77, -1, -1, -1, -1, -1, 83, -1, -1, 86, ! 87, -1, -1, 90, 91, -1, -1, 94, -1, -1, ! 46, 47, -1, -1, -1, 51, 103, 104, 105, 106, ! -1, -1, 109, 110, 60, -1, 1, -1, 3, 4, ! 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, ! -1, 77, -1, -1, -1, -1, -1, 83, -1, -1, ! 86, 87, -1, -1, 90, 91, -1, -1, 94, -1, ! -1, -1, -1, -1, -1, -1, -1, 103, 104, 105, ! 106, 46, 47, 109, 110, -1, 51, 1, -1, 3, ! 4, -1, -1, -1, -1, 60, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, 73, -1, ! -1, -1, 77, -1, -1, -1, -1, -1, 83, -1, ! -1, 86, 87, -1, -1, 90, 91, -1, -1, 94, ! -1, -1, 46, 47, -1, -1, -1, 51, 103, 104, ! 105, 106, -1, -1, 109, 110, 60, -1, 1, -1, ! 3, 4, 66, -1, -1, -1, -1, -1, -1, 73, ! -1, -1, -1, 77, -1, -1, -1, -1, -1, 83, ! -1, -1, 86, 87, -1, -1, 90, 91, -1, -1, ! 94, -1, -1, -1, -1, -1, -1, -1, -1, 103, ! 104, 105, 106, 46, 47, 109, 110, -1, 51, 1, ! -1, 3, 4, -1, -1, -1, -1, 60, -1, -1, ! -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, -1, ! 83, -1, -1, 86, 87, -1, -1, 90, 91, -1, ! -1, 94, -1, -1, 46, 47, -1, -1, -1, 51, ! 103, 104, 105, 106, -1, -1, 109, 110, 60, -1, ! 1, -1, 3, 4, 66, -1, -1, -1, -1, -1, ! -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, ! -1, 83, -1, -1, 86, 87, -1, -1, 90, 91, ! -1, -1, 94, -1, -1, -1, -1, -1, -1, -1, ! -1, 103, 104, 105, 106, 46, 47, 109, 110, -1, ! 51, 1, -1, 3, 4, -1, -1, -1, -1, 60, ! -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, ! -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, ! -1, -1, 83, -1, -1, 86, 87, -1, -1, 90, ! 91, -1, -1, 94, -1, -1, 46, 47, -1, -1, ! -1, 51, 103, 104, 105, 106, -1, -1, 109, 110, ! 60, -1, 1, -1, -1, -1, 66, -1, -1, -1, ! -1, -1, -1, 73, -1, -1, -1, 77, -1, -1, ! -1, -1, -1, 83, -1, -1, 86, 87, -1, -1, ! 90, 91, -1, -1, 94, -1, -1, -1, -1, -1, ! -1, -1, -1, 103, 104, 105, 106, 46, 47, 109, ! 110, -1, 51, 1, -1, -1, -1, -1, -1, -1, ! -1, 60, -1, -1, -1, -1, -1, 66, -1, -1, ! -1, -1, -1, -1, 73, -1, -1, -1, 77, -1, ! -1, -1, -1, -1, 83, -1, -1, 86, 87, -1, ! -1, -1, -1, -1, -1, 94, 95, -1, 46, 47, ! -1, -1, -1, 51, 103, 104, 105, 106, -1, -1, ! 109, 110, 60, -1, 1, -1, -1, -1, 66, -1, ! -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, ! -1, -1, -1, -1, -1, 83, -1, -1, 86, 87, ! -1, 3, 4, -1, -1, -1, 94, 95, -1, -1, ! -1, -1, -1, -1, -1, 103, 104, 105, 106, 46, ! 47, 109, 110, -1, 51, -1, -1, -1, -1, -1, -1, -1, -1, 60, -1, -1, -1, -1, -1, 66, ! -1, -1, -1, -1, 46, 47, 73, -1, -1, 51, ! 77, -1, -1, -1, -1, -1, 83, -1, 60, 86, ! 87, -1, 3, 4, 66, -1, -1, 94, -1, -1, ! -1, 73, -1, -1, -1, 77, 103, 104, 105, 106, ! -1, 83, 109, 110, 86, 87, -1, -1, 90, 91, ! -1, -1, 94, -1, 96, 97, -1, -1, -1, 101, ! -1, 103, 104, 105, 106, 46, 47, 109, 110, -1, ! 51, -1, -1, 3, 4, -1, -1, -1, -1, 60, ! -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, ! -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, ! -1, -1, 83, -1, -1, 86, 87, -1, -1, 90, ! 91, -1, -1, 94, 95, -1, 46, 47, -1, -1, ! -1, 51, 103, 104, 105, 106, -1, -1, 109, 110, ! 60, -1, -1, -1, 3, 4, 66, -1, -1, -1, ! -1, -1, -1, 73, -1, -1, -1, 77, -1, -1, ! -1, -1, -1, 83, -1, -1, 86, 87, -1, -1, ! 90, 91, -1, -1, 94, 95, -1, -1, -1, -1, ! -1, -1, -1, 103, 104, 105, 106, 46, 47, 109, ! 110, -1, 51, -1, -1, 3, 4, -1, -1, -1, -1, 60, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, -1, ! -1, -1, -1, -1, 83, -1, -1, 86, 87, -1, ! -1, 90, 91, -1, -1, 94, 95, -1, 46, 47, ! -1, -1, -1, 51, 103, 104, 105, 106, -1, -1, ! 109, 110, 60, -1, -1, -1, 3, 4, 66, -1, ! -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, ! -1, -1, -1, -1, -1, 83, -1, -1, 86, 87, ! -1, -1, 90, 91, -1, -1, 94, 95, -1, -1, ! -1, -1, -1, -1, -1, 103, 104, 105, 106, 46, ! 47, 109, 110, -1, 51, -1, -1, -1, -1, -1, ! -1, -1, -1, 60, -1, -1, -1, -1, -1, 66, ! -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, ! 77, -1, -1, -1, -1, -1, 83, -1, -1, 86, ! 87, -1, -1, 90, 91, -1, -1, 94, -1, 45, ! 46, 47, -1, -1, -1, 51, 103, 104, 105, 106, ! -1, -1, 109, 110, 60, -1, -1, -1, -1, -1, ! 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, ! 51, 77, -1, -1, -1, -1, -1, 83, -1, 60, ! 86, 87, -1, -1, -1, 66, -1, -1, 94, -1, ! -1, -1, 73, -1, -1, -1, 77, 103, 104, 105, ! 106, -1, 83, 109, 110, 86, 87, -1, -1, 90, ! 91, -1, -1, 94, -1, -1, -1, -1, -1, -1, ! -1, -1, 103, 104, 105, 106, -1, -1, 109, 110 }; ! /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing ! symbol of state STATE-NUM. */ ! static const unsigned short yystos[] = { ! 0, 112, 113, 0, 1, 45, 56, 62, 68, 76, ! 100, 126, 127, 128, 129, 130, 131, 132, 133, 134, ! 135, 170, 193, 1, 87, 122, 123, 124, 125, 125, ! 1, 125, 1, 122, 128, 130, 133, 127, 128, 45, ! 62, 68, 1, 100, 102, 1, 64, 171, 175, 1, ! 64, 138, 1, 100, 102, 128, 125, 1, 125, 1, ! 5, 125, 1, 118, 120, 122, 96, 176, 101, 173, ! 1, 118, 119, 53, 139, 1, 172, 175, 1, 138, ! 1, 100, 51, 60, 83, 86, 97, 115, 116, 117, ! 118, 121, 122, 134, 135, 145, 152, 170, 177, 178, ! 179, 180, 1, 120, 176, 1, 1, 120, 140, 137, ! 176, 174, 139, 1, 125, 153, 1, 125, 146, 147, ! 148, 153, 98, 245, 245, 1, 60, 115, 1, 100, ! 97, 178, 101, 96, 141, 176, 136, 94, 54, 98, ! 157, 1, 100, 101, 93, 98, 99, 157, 99, 98, ! 1, 153, 1, 146, 153, 1, 120, 96, 97, 123, ! 134, 135, 142, 143, 144, 145, 150, 152, 160, 161, ! 162, 164, 165, 170, 183, 184, 193, 141, 1, 95, ! 115, 134, 154, 155, 156, 1, 119, 158, 1, 99, ! 1, 125, 147, 1, 3, 4, 46, 47, 60, 66, ! 73, 77, 90, 91, 94, 96, 103, 104, 105, 106, ! 109, 110, 114, 116, 121, 122, 149, 181, 233, 234, ! 235, 236, 237, 240, 242, 246, 247, 248, 249, 250, ! 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, ! 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, ! 271, 273, 1, 99, 1, 1, 99, 157, 100, 157, ! 97, 94, 165, 97, 143, 1, 151, 183, 163, 157, ! 1, 49, 50, 52, 55, 59, 66, 67, 69, 71, ! 72, 74, 77, 94, 115, 116, 121, 122, 125, 134, ! 135, 156, 169, 183, 186, 187, 188, 189, 190, 192, ! 193, 194, 195, 197, 198, 199, 200, 202, 204, 210, ! 211, 213, 214, 215, 217, 218, 222, 223, 224, 225, ! 226, 227, 228, 236, 247, 249, 250, 251, 254, 255, ! 270, 1, 148, 95, 101, 115, 101, 1, 122, 246, ! 248, 253, 1, 252, 1, 253, 1, 253, 102, 1, ! 102, 1, 116, 118, 119, 1, 253, 1, 253, 1, ! 116, 122, 273, 97, 101, 149, 182, 102, 102, 94, ! 98, 102, 1, 102, 98, 1, 125, 46, 47, 5, ! 6, 7, 3, 4, 8, 9, 10, 18, 19, 20, ! 21, 58, 16, 17, 11, 12, 13, 14, 15, 88, ! 92, 93, 272, 95, 154, 157, 100, 159, 183, 96, ! 166, 184, 96, 97, 100, 1, 94, 1, 273, 1, ! 100, 125, 1, 100, 273, 1, 94, 1, 94, 1, ! 183, 1, 94, 1, 100, 125, 273, 146, 102, 1, ! 89, 115, 94, 97, 185, 187, 100, 122, 134, 190, ! 100, 203, 190, 190, 122, 189, 198, 219, 221, 100, ! 1, 94, 1, 155, 1, 148, 1, 119, 1, 68, ! 1, 125, 98, 99, 100, 98, 243, 244, 245, 243, ! 245, 1, 94, 95, 98, 245, 245, 1, 95, 97, ! 97, 101, 1, 68, 68, 95, 241, 273, 1, 273, ! 1, 68, 73, 77, 73, 125, 1, 273, 1, 94, ! 1, 253, 1, 253, 1, 253, 1, 258, 1, 258, ! 1, 259, 1, 259, 1, 259, 1, 260, 1, 260, ! 1, 260, 1, 260, 1, 116, 117, 1, 261, 1, ! 261, 1, 262, 1, 263, 1, 264, 1, 265, 1, ! 266, 1, 89, 273, 1, 269, 95, 122, 167, 168, ! 169, 185, 186, 1, 273, 1, 100, 1, 100, 1, ! 100, 1, 273, 1, 273, 61, 65, 229, 230, 231, ! 232, 1, 1, 100, 95, 66, 146, 1, 95, 241, ! 96, 205, 67, 1, 101, 1, 100, 273, 1, 273, ! 95, 102, 94, 1, 273, 244, 245, 181, 245, 181, ! 1, 95, 241, 1, 253, 1, 95, 95, 256, 1, ! 97, 149, 95, 101, 1, 99, 94, 1, 99, 95, ! 241, 1, 89, 102, 167, 186, 94, 167, 1, 95, ! 1, 95, 95, 1, 94, 1, 183, 230, 232, 183, ! 1, 94, 1, 1, 95, 48, 63, 97, 206, 207, ! 208, 209, 94, 1, 198, 1, 220, 221, 100, 95, ! 95, 95, 241, 1, 99, 239, 1, 95, 1, 253, ! 1, 256, 1, 273, 95, 241, 141, 95, 1, 268, ! 66, 167, 95, 241, 49, 190, 191, 192, 194, 196, ! 201, 210, 212, 216, 218, 1, 1, 155, 1, 95, ! 241, 1, 1, 89, 1, 273, 274, 97, 207, 208, ! 97, 186, 209, 273, 95, 1, 220, 1, 183, 95, ! 141, 238, 95, 141, 94, 100, 95, 94, 57, 191, ! 191, 100, 95, 95, 1, 1, 95, 1, 89, 97, ! 95, 190, 95, 141, 95, 241, 100, 273, 190, 100, ! 273, 1, 100, 190, 100, 95, 95, 220, 100, 100, ! 191, 95, 220, 57, 191, 95, 191, 191 }; #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) # define YYSIZE_T __SIZE_TYPE__ #endif --- 1059,2599 ---- 7, 6, 3, 5, 4, 7, 6, 2, 2, 3, 2, 0, 1, 1, 2, 0, 1, 1, 3, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, ! 2, 3, 3, 2, 3, 5, 3, 2, 3, 5, ! 5, 2, 4, 3, 1, 3, 3, 4, 2, 1, ! 2, 2, 4, 2, 3, 4, 2, 2, 1, 1, ! 1, 1, 3, 1, 1, 1, 1, 1, 3, 3, ! 3, 3, 3, 3, 3, 3, 3, 5, 4, 1, ! 4, 5, 5, 6, 3, 3, 4, 5, 2, 3, ! 0, 7, 0, 6, 3, 3, 1, 3, 3, 3, ! 3, 4, 4, 4, 4, 3, 3, 1, 2, 3, ! 3, 2, 2, 3, 3, 3, 3, 2, 3, 4, ! 5, 6, 5, 6, 4, 4, 4, 4, 3, 4, ! 3, 4, 1, 1, 1, 1, 2, 2, 1, 1, ! 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, ! 1, 2, 2, 1, 2, 2, 5, 4, 4, 5, ! 4, 2, 5, 4, 5, 1, 3, 3, 3, 3, ! 3, 3, 1, 3, 3, 3, 3, 1, 3, 3, ! 3, 3, 3, 3, 1, 3, 3, 3, 3, 3, ! 3, 3, 3, 3, 3, 1, 3, 3, 3, 3, ! 1, 3, 3, 1, 3, 3, 1, 3, 3, 1, ! 3, 3, 1, 3, 3, 1, 5, 4, 3, 5, ! 1, 1, 3, 3, 1, 1, 1, 1, 1, 1, ! 1 }; ! /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE ! doesn't specify something else to do. Zero means the default is an ! error. */ ! static const short yydefact[] = { ! 1, 0, 52, 53, 0, 0, 0, 0, 221, 2, ! 0, 0, 0, 34, 41, 42, 36, 0, 49, 50, ! 51, 44, 25, 0, 21, 22, 23, 0, 60, 0, ! 39, 0, 0, 35, 37, 0, 0, 54, 0, 0, ! 45, 43, 0, 162, 0, 0, 158, 61, 0, 67, ! 40, 38, 0, 0, 0, 59, 0, 47, 0, 24, ! 166, 18, 164, 16, 0, 155, 0, 0, 66, 17, ! 0, 0, 57, 163, 0, 160, 62, 67, 48, 46, ! 13, 0, 11, 12, 168, 0, 9, 10, 14, 15, ! 16, 0, 174, 176, 0, 175, 0, 170, 172, 173, ! 167, 165, 159, 65, 69, 70, 68, 0, 157, 0, ! 55, 111, 0, 127, 109, 0, 0, 88, 91, 127, ! 0, 19, 20, 113, 0, 0, 178, 177, 169, 171, ! 0, 0, 58, 161, 0, 0, 0, 0, 106, 97, ! 86, 0, 0, 0, 0, 105, 392, 0, 112, 127, ! 110, 0, 127, 72, 71, 188, 73, 21, 0, 83, ! 0, 75, 77, 81, 82, 0, 78, 0, 79, 137, ! 127, 84, 80, 0, 85, 56, 117, 114, 0, 126, ! 0, 119, 0, 129, 130, 128, 118, 116, 90, 0, ! 89, 93, 0, 0, 0, 0, 0, 0, 0, 341, ! 0, 0, 0, 0, 7, 6, 3, 4, 5, 8, ! 340, 0, 0, 413, 0, 101, 412, 338, 347, 343, ! 359, 0, 339, 344, 345, 346, 430, 414, 415, 423, ! 445, 418, 419, 421, 433, 452, 457, 464, 475, 480, ! 483, 486, 489, 492, 495, 500, 509, 501, 0, 100, ! 98, 96, 99, 394, 393, 108, 87, 107, 186, 0, ! 127, 74, 76, 104, 0, 135, 0, 139, 0, 0, ! 0, 278, 0, 0, 0, 0, 0, 0, 0, 0, ! 341, 0, 0, 0, 9, 15, 413, 0, 126, 194, ! 0, 0, 209, 0, 190, 192, 0, 193, 198, 210, ! 0, 199, 211, 0, 200, 201, 212, 252, 0, 202, ! 0, 213, 203, 291, 0, 214, 215, 216, 218, 220, ! 217, 0, 219, 245, 244, 0, 242, 243, 240, 241, ! 239, 124, 122, 115, 0, 0, 0, 422, 413, 344, ! 346, 420, 425, 424, 429, 428, 427, 426, 0, 397, ! 0, 0, 0, 17, 0, 434, 431, 435, 432, 441, ! 0, 413, 0, 179, 0, 183, 0, 0, 0, 0, ! 0, 0, 94, 0, 0, 368, 0, 417, 416, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 507, 508, 0, 141, 0, 140, 134, 103, 133, 188, ! 138, 0, 228, 229, 227, 247, 0, 313, 0, 302, ! 300, 0, 310, 308, 0, 274, 0, 255, 0, 328, ! 0, 288, 0, 306, 304, 0, 317, 0, 0, 196, ! 0, 224, 222, 0, 0, 189, 187, 191, 195, 413, ! 324, 223, 226, 0, 273, 0, 413, 293, 297, 290, ! 0, 0, 321, 0, 121, 120, 125, 123, 132, 131, ! 352, 356, 0, 396, 386, 385, 364, 0, 379, 387, ! 0, 380, 0, 365, 0, 0, 0, 19, 20, 349, ! 342, 180, 181, 0, 351, 355, 354, 398, 0, 376, ! 408, 0, 350, 353, 374, 348, 375, 395, 410, 0, ! 369, 0, 449, 446, 450, 447, 451, 448, 455, 453, ! 456, 454, 461, 458, 462, 459, 463, 460, 471, 466, ! 473, 468, 470, 465, 472, 467, 474, 0, 469, 478, ! 476, 479, 477, 482, 481, 485, 484, 488, 487, 491, ! 490, 494, 493, 498, 0, 0, 503, 502, 142, 413, ! 143, 0, 0, 147, 0, 248, 0, 314, 312, 303, ! 301, 311, 309, 275, 0, 256, 0, 0, 0, 325, ! 329, 0, 326, 289, 307, 305, 318, 0, 316, 342, ! 0, 197, 230, 0, 0, 0, 253, 0, 294, 0, ! 282, 0, 0, 323, 0, 404, 405, 0, 391, 0, ! 388, 381, 384, 382, 383, 366, 358, 0, 443, 437, ! 440, 0, 0, 438, 185, 182, 184, 399, 0, 409, ! 406, 0, 411, 407, 360, 0, 497, 0, 0, 144, ! 0, 0, 145, 249, 0, 276, 272, 0, 333, 0, ! 337, 336, 330, 327, 331, 0, 234, 0, 231, 232, ! 0, 0, 0, 258, 0, 262, 0, 265, 0, 299, ! 298, 284, 0, 296, 0, 322, 0, 402, 0, 390, ! 389, 0, 367, 357, 442, 436, 444, 439, 378, 377, ! 400, 0, 361, 362, 499, 496, 0, 146, 0, 0, ! 0, 246, 0, 198, 0, 205, 206, 0, 207, 208, ! 0, 257, 334, 0, 315, 235, 0, 0, 233, 271, ! 268, 269, 510, 0, 260, 263, 0, 259, 0, 266, ! 0, 0, 283, 0, 320, 319, 403, 373, 0, 401, ! 363, 0, 148, 0, 0, 0, 225, 277, 0, 335, ! 332, 238, 236, 0, 270, 267, 261, 0, 281, 0, ! 371, 0, 0, 149, 0, 250, 0, 0, 237, 279, ! 280, 151, 0, 0, 0, 0, 150, 0, 0, 0, ! 0, 286, 0, 251, 285, 0, 0, 0 }; static const short yydefgoto[] = { ! 785, 1, 210, 283, 211, 87, 88, 70, 62, 212, ! 213, 24, 25, 26, 9, 10, 11, 12, 13, 14, ! 15, 16, 450, 289, 134, 107, 49, 72, 106, 132, ! 160, 161, 162, 93, 116, 117, 118, 214, 164, 264, ! 94, 113, 180, 181, 290, 138, 185, 407, 166, 167, ! 168, 266, 169, 170, 410, 560, 561, 291, 19, 45, ! 74, 67, 109, 46, 65, 96, 97, 98, 99, 215, ! 366, 292, 173, 563, 728, 294, 295, 296, 297, 702, ! 298, 299, 300, 301, 705, 302, 303, 304, 305, 706, ! 306, 453, 307, 596, 664, 665, 666, 667, 308, 309, ! 708, 310, 311, 312, 709, 313, 314, 459, 672, 673, ! 315, 316, 317, 318, 319, 320, 321, 322, 579, 580, ! 581, 582, 216, 217, 218, 219, 220, 738, 681, 221, ! 498, 222, 478, 479, 122, 223, 224, 225, 226, 227, ! 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, ! 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, ! 248, 402, 499, 723 }; static const short yypact[] = { ! -32768, 421,-32768,-32768, 525, -19, 526, 532,-32768,-32768, ! 472, 401, 605,-32768,-32768,-32768,-32768, 473,-32768,-32768, ! -32768,-32768,-32768, 22,-32768,-32768,-32768, 309,-32768, 479, ! -32768, 40, 681,-32768,-32768, 629, 683,-32768, -19, 553, ! -32768,-32768, 570,-32768, 576, -9, -1,-32768, 607, 53, ! -32768,-32768, -19, 692, 334,-32768, 510,-32768, 44,-32768, ! -32768,-32768,-32768, 143, 1008,-32768, 611, -9,-32768,-32768, ! 58, 633,-32768,-32768, -9, -1,-32768, 53,-32768,-32768, ! -32768, 662,-32768,-32768,-32768, 677, -6,-32768,-32768,-32768, ! 134, 1155,-32768,-32768, 71,-32768, 1370,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768, 205, 263,-32768, -9, ! -32768,-32768, 340, -5,-32768, 239, 326,-32768, 658, -5, ! 303, 344, 344,-32768, 679, 689,-32768,-32768,-32768,-32768, ! 695, 1201,-32768,-32768, 263, 887, 706, 12,-32768,-32768, ! -32768, 711, 1293, 38, 464,-32768,-32768, 60,-32768, -5, ! -32768, 757, -5,-32768,-32768, 390,-32768, 418, 765,-32768, ! 1264,-32768,-32768,-32768,-32768, 47,-32768, 426,-32768,-32768, ! 442,-32768,-32768, 2020,-32768,-32768,-32768,-32768, 714, 533, ! -17,-32768, 954,-32768,-32768, 495,-32768,-32768,-32768, 160, ! -32768,-32768, 2824, 5062, 2876, 2942, 499, 25, 626,-32768, ! 2994, 3060, 3112, 5259,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768, 200, 534, 962, 28,-32768, 556, 580,-32768,-32768, ! -32768, 716,-32768, 791,-32768, 796, 850,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768, 1020, 930, 1026, 932, 931, ! 687, 707, 743, 733, 15,-32768,-32768,-32768, 892,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 820, ! 442,-32768,-32768,-32768, 378,-32768, 665,-32768, 875, 185, ! 3178,-32768, 33, 1518, 56, 242, 266, 67, 366, 180, ! 669, 3230, 5561, -19, 200, 534, 905, 492, 414,-32768, ! 954, 673,-32768, 1951,-32768,-32768, 672,-32768,-32768,-32768, ! 2089,-32768,-32768, 710,-32768,-32768,-32768,-32768, 2089,-32768, ! 2089,-32768,-32768, 5613, 719,-32768,-32768,-32768,-32768,-32768, ! -32768, 404,-32768, 725, 795, 850, 960, 1005,-32768,-32768, ! -32768,-32768, 972,-32768, 873, 724, 731,-32768, 784,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 31,-32768, ! 734, 1003, 691, 691, 413,-32768,-32768,-32768,-32768,-32768, ! 747, 962, 300,-32768, 688,-32768, 517, 41, 735, 5325, ! 2234, 515,-32768, -10, 3296,-32768, 424,-32768,-32768, 3348, ! 3414, 3466, 3532, 3584, 3650, 3702, 3768, 3820, 3886, 3938, ! 4004, 708, 4056, 4122, 4174, 4240, 4292, 4358, 4410, 2286, ! -32768,-32768, 4476,-32768, 188,-32768,-32768,-32768,-32768,-32768, ! -32768, 1951,-32768,-32768,-32768,-32768, 4528,-32768, 73,-32768, ! -32768, 81,-32768,-32768, 83,-32768, 4594,-32768, 4646,-32768, ! 574,-32768, 5114,-32768,-32768, 123,-32768, 102, 348, 686, ! 555,-32768,-32768, -19, 2352,-32768,-32768,-32768,-32768, 1076, ! 533,-32768,-32768, 712,-32768, 750, 951,-32768,-32768,-32768, ! 51, 2404,-32768, 4712,-32768,-32768,-32768, 972,-32768,-32768, ! -32768,-32768, -23, 728,-32768,-32768,-32768, 2470, 691,-32768, ! 126, 691, 126,-32768, 2522, 4764, 95, 192, 468,-32768, ! 5638,-32768,-32768, 1028,-32768,-32768,-32768,-32768, 272,-32768, ! -32768, 231,-32768,-32768,-32768,-32768,-32768, 736,-32768, 243, ! -32768, 5377,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 1020, ! -32768, 1020,-32768, 930,-32768, 930,-32768, 930,-32768, 1026, ! -32768, 1026,-32768, 1026,-32768, 1026,-32768, -6,-32768,-32768, ! 932,-32768, 932,-32768, 931,-32768, 687,-32768, 707,-32768, ! 743,-32768, 733,-32768, 825, 739,-32768,-32768,-32768, 1064, ! -32768, 1951, 744,-32768, 1951,-32768, 354,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768, 358,-32768, 748, 425, 116, 574, ! -32768, 426,-32768,-32768,-32768,-32768,-32768, 5561,-32768,-32768, ! 477, 686,-32768, 855, 69, 360,-32768, 768,-32768, 5207, ! -32768, 5139, 781, 803, 805,-32768,-32768, 5443,-32768, 257, ! -32768, 344,-32768, 344,-32768,-32768, 818, 227,-32768,-32768, ! -32768, 4830, 565,-32768,-32768,-32768,-32768,-32768, 4882,-32768, ! -32768, 5495,-32768,-32768, 263, 316,-32768, 4948, 578,-32768, ! 1951, 2588,-32768,-32768, 2156,-32768,-32768, 268,-32768, 904, ! -32768,-32768,-32768,-32768,-32768, 816,-32768, 2640,-32768,-32768, ! 925, 256, 5000,-32768, 389,-32768, 1696,-32768, 5561,-32768, ! -32768,-32768, 832, 829, 5182,-32768, 269,-32768, 446,-32768, ! -32768, 263,-32768, 839,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768, 459,-32768, 263,-32768,-32768, 503,-32768, 201, 240, ! 509,-32768, 885, 888, 2156,-32768,-32768, 2156,-32768,-32768, ! 853,-32768, 860, 863,-32768,-32768, 965, 251,-32768,-32768, ! -32768,-32768,-32768, 410,-32768,-32768, 1787,-32768, 1882,-32768, ! 893, 2089,-32768, 898,-32768,-32768,-32768,-32768, 263,-32768, ! -32768, 2706,-32768, 204, 4528, 2089,-32768,-32768, 2758,-32768, ! -32768,-32768,-32768, 996,-32768,-32768,-32768, 900,-32768, 2089, ! -32768, 217, 262,-32768, 399,-32768, 5139, 920,-32768,-32768, ! -32768,-32768, 220, 2156, 947, 5182,-32768, 966, 2156, 964, ! 2156,-32768, 2156,-32768,-32768, 1047, 1058,-32768 }; static const short yypgoto[] = { ! -32768,-32768,-32768, -60, -40, 671, -28, -121, 163, 140, ! -4, 603,-32768, 141,-32768, 1052, 589,-32768, 48,-32768, ! -32768, 859, 104, 558,-32768,-32768, 1013, 1010,-32768, -128, ! -32768, 922,-32768, -84, -117, 939, -168, -201,-32768,-32768, ! 184, 690, 831, -322, -124, 68,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768, 933,-32768, 178,-32768, 682, 308,-32768, ! -32768,-32768,-32768, 1044, 620,-32768, 1011,-32768,-32768, 258, ! -32768, -114, 833, 817, -166, -292,-32768, 800, -275, 157, ! -531, 54, -495,-32768,-32768,-32768, -304,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768, 445, 450, -629, -428,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768, -288,-32768, -656, 804, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 539, ! -32768, 542,-32768,-32768,-32768, 147,-32768,-32768,-32768,-32768, ! -430,-32768, 769, 327, -36, 1281, 236, 1341, 237, 423, ! 547, 935, -173, 720, 773, -485,-32768, 702, 758, 590, ! 685, 730, 741, 749, 732, 742,-32768, 513, 745, 927, ! -32768,-32768, 767,-32768 }; ! ! #define YYLAST 5749 ! ! static const short yytable[] = { ! 23, 447, 365, 31, 85, 623, 175, 293, 151, 458, ! 332, 182, 465, 186, 594, 184, 61, 172, 733, 341, ! 69, 345, 347, 40, 86, 451, 349, 356, 358, 372, ! 398, 125, 470, 454, 419, 455, 85, 729, 61, 250, ! 63, 50, 494, 61, 63, 78, 172, 163, 263, 136, ! 121, 86, 598, 265, 617, 20, 86, 349, 33, 103, ! 90, 253, 63, 506, 20, 20, 20, 63, 429, 22, ! 659, 85, 126, 605, 567, 178, 163, 354, 22, 333, ! 606, 635, 569, 33, 571, 334, 20, 90, 64, 20, ! 20, 86, 90, 120, 137, 86, 620, 729, 125, 471, ! 85, 66, 61, 586, 399, 17, 71, 20, 69, 495, ! 774, -64, 187, 703, 17, 17, 17, 650, 86, 779, ! 86, 22, 335, 41, 584, 42, 63, 90, 350, -92, ! -92, 90, 63, 284, 420, 182, 17, 687, 251, 17, ! 17, 51, 86, 52, -102, 79, 27, 29, -102, 704, ! 408, -153, -292, 599, 90, -64, 90, 17, 352, 350, ! 254, 139, 360, 430, 155, 660, 439, 467, 91, 286, ! 353, 628, 127, 703, 568, 121, 703, 678, 90, 54, ! 56, 433, 570, 59, 572, 174, 415, 145, 338, 338, ! 338, 338, 587, 59, 63, 146, 338, 338, 361, 178, ! 91, 691, 658, 588, 89, 718, 513, 515, 517, 704, ! 182, 699, 704, 155, 174, 469, 707, 255, 751, 86, ! 257, 768, 112, 203, 585, 147, 115, 717, 682, 101, ! 443, 89, 629, 120, 105, 158, 89, 52, 267, 179, ! 139, 659, 703, 425, 632, 564, 52, 703, 121, 703, ! 86, 703, 752, 284, -95, 90, -95, 719, 679, -95, ! -95, -95, -95, 752, 158, 112, 115, 427, 22, 711, ! 734, 89, 447, 284, 178, 89, 707, 288, 704, 707, ! 416, 434, 189, 704, 558, 704, 90, 704, 621, 286, ! 334, 147, 626, 154, 86, 670, 449, 458, 89, 120, ! 89, 489, 742, 367, 449, 763, 449, 130, 69, 456, ! 43, 762, 619, 285, 287, 165, 480, 482, 771, 189, ! 323, 776, 89, 683, 487, 488, 591, 713, 405, 628, ! 90, 630, 63, -95, 135, 73, 743, 426, -95, -95, ! -95, -95, 628, 633, 165, 707, 720, 753, 447, 489, ! 707, 537, 707, 628, 707, 643, 710, 680, 772, 645, ! 131, 428, 376, 179, 628, -254, 155, 431, 627, 701, ! 458, 284, 95, 44, 628, 338, 338, 338, 338, 338, ! 338, 338, 338, 338, 338, 338, 338, 90, 338, 338, ! 338, 338, 338, 338, 338, 640, 490, 288, 44, 89, ! 643, -29, 2, 146, 95, 462, -154, 559, 661, 324, ! 325, 754, 693, 421, 483, -324, 710, 179, 628, 710, ! 435, -26, 2, 662, 189, 510, 648, 140, 141, 451, ! 89, -156, 454, 285, 287, 135, 447, 661, 179, 171, ! 323, 287, 611, 147, 589, 613, 3, 323, 685, 287, ! 644, 287, 662, 285, 646, 323, 758, 323, 663, 37, ! 323, 432, 458, 5, 651, 252, 3, 654, 171, 6, ! 765, 458, -28, 2, 89, 155, 189, 4, 656, 406, ! 47, 338, 39, 5, 770, 710, 338, 724, 258, 6, ! 710, 473, 710, 441, 710, 773, 136, 7, 701, 463, ! 755, 121, 8, 758, 656, 765, 692, 770, 484, -324, ! 415, 76, 59, 259, 507, 288, 502, 3, 37, 511, ! 649, 284, 8, 155, 284, 182, 21, 28, 4, 324, ! 325, 89, -63, 30, 5, 38, 324, 325, -23, -23, ! 6, 39, 736, 48, 324, 325, 324, 325, 628, 324, ! 325, 285, 287, 737, 55, 739, 502, 286, 323, 18, ! 286, 628, 735, -63, 622, 740, 686, 147, 18, 18, ! 18, 57, 657, 8, 48, 58, -63, 60, 37, 502, ! -23, 59, 442, 503, 189, -23, -23, -23, 504, 178, ! 18, -23, 505, 18, 18, -23, 326, 336, 741, 32, ! 284, 36, 348, 22, 744, -27, 2, -63, 68, 86, ! 760, 18, 100, 22, 22, 492, 80, 338, 338, 493, ! 22, 590, 92, 503, 53, 196, 284, 351, 504, -30, ! 2, 197, 505, 338, 104, 577, 286, 368, 198, 578, ! 449, 22, 199, 22, 696, 90, 503, 324, 325, 82, ! 3, 504, 83, 22, 92, 505, 200, 201, 22, 373, ! 202, 4, 286, 111, 22, 288, 22, 5, 288, 204, ! 205, 206, 207, 6, 3, 208, 209, 80, 114, 374, ! 148, -32, 2, -31, 2, 4, 284, 102, 284, 159, ! 150, 5, -33, 2, 108, 22, 153, 6, 394, 22, ! 449, 285, 287, 449, 285, 287, 8, 183, 323, 536, ! 82, 323, 188, 83, 22, 331, 326, 375, 159, 395, ! 327, 22, 286, 326, 286, 466, 3, 449, 3, 133, ! 8, 326, 468, 326, 157, 472, 326, 3, 612, 639, ! 614, 449, 642, 5, 288, 5, 323, 397, 323, 6, ! 22, 6, 142, 179, 5, 449, 396, 143, 144, 80, ! 6, 157, 409, 157, -152, 22, 123, 22, 444, 449, ! 288, -343, -343, 448, 449, 119, 449, 22, 449, 59, ! 285, 287, 8, 22, 8, 287, 491, 323, 141, 89, ! 477, 323, 82, 8, 22, 83, 22, 324, 325, 22, ! 324, 325, 22, 496, 22, 610, 285, 287, 610, 595, ! 37, 452, 22, 323, 149, 152, 80, 597, 697, 22, ! 461, 323, 22, 607, -343, 124, 636, 38, -343, 637, ! 288, 631, 288, 39, 326, 324, 325, 324, 325, 641, ! 327, -345, -345, 485, 647, 287, 486, 327, 287, 82, ! 367, 323, 83, 22, 323, 327, 658, 327, 256, 141, ! 327, 746, -136, 668, 747, 3, 285, 287, 285, 287, ! 34, 80, 287, 323, 464, 323, 324, 325, 323, 369, ! 324, 325, 674, 370, -505, -505, 287, 371, 176, -506, ! -506, 34, 323, 328, -345, 34, 377, 378, -345, 675, ! 287, 676, 324, 325, 82, 712, 323, 83, 22, 249, ! 324, 325, 34, 323, 287, -372, 403, 714, 3, 287, ! 323, 287, 323, 287, 80, 323, 718, 323, 731, 323, ! 777, 599, 3, 382, 383, 781, -370, 783, 80, 784, ! 324, 325, 745, 324, 325, -204, 329, 392, 393, 3, ! 387, 388, 389, 390, 748, 80, 749, 82, 327, 750, ! 83, 22, 324, 325, 324, 325, 751, 324, 325, 362, ! 249, 82, 412, 413, 83, 22, 414, 529, 531, 533, ! 535, 324, 325, 177, 326, 400, 401, 326, 82, 757, ! 391, 83, 22, -16, 759, 324, 325, 768, -504, -504, ! 369, 769, 324, 325, 370, 80, -414, -414, 440, 324, ! 325, 324, 325, 328, 324, 325, 324, 325, 324, 325, ! 328, 775, 326, 780, 326, 379, 380, 381, 328, 624, ! 328, 192, 193, 328, 384, 385, 386, 418, 82, -16, ! 424, 83, 22, 778, -504, -504, 369, 786, 437, 438, ! 370, -415, -415, 3, 371, -504, -504, 369, 787, 80, ! 782, 370, 538, 326, 35, 371, 329, 326, 81, 77, ! 5, 143, 144, 329, 194, 195, 6, 540, 542, 80, ! 190, 329, 262, 329, 519, 521, 329, 110, 196, 326, ! 404, 260, 82, 562, 197, 83, 22, 326, 75, 411, ! 330, 198, 474, 475, 476, 199, 84, 129, 327, 725, ! 446, 327, 82, 457, 726, 83, 22, 460, 652, 200, ! 201, 653, 481, 202, 544, 203, 625, 326, 343, 550, ! 326, 328, 204, 205, 206, 207, 546, 501, 208, 209, ! 552, 509, 523, 525, 527, 548, 327, 557, 327, 326, ! 695, 326, -16, 0, 326, 0, 123, -504, -504, 369, ! 0, 0, 0, 370, 0, 0, 555, 638, 326, -504, ! -504, 369, 0, 0, 0, 370, 0, 0, 0, 440, ! 0, 0, 326, 566, 329, 0, 0, 327, 0, 326, ! 0, 327, 0, 574, 0, 576, 326, 0, 326, 0, ! 37, 326, 0, 326, 0, 326, 80, 0, 0, 0, ! 0, 0, 0, 327, 0, 124, 0, 38, 0, 0, ! 330, 327, 0, 39, 0, 0, 0, 330, 602, 0, ! 604, 0, 0, 0, 0, 330, 0, 330, 0, 82, ! 330, 0, 83, 22, 609, 0, 3, 0, 0, 0, ! 0, 327, 80, 0, 327, 0, 0, 0, 0, 0, ! 249, 81, 0, 5, 0, 0, 0, 0, 0, 6, ! 0, 0, 0, 327, 0, 327, 0, 0, 327, 0, ! 0, 328, 0, 0, 328, 82, 0, 0, 83, 22, ! 0, 0, 327, 0, 191, 0, 192, 193, 155, 156, ! 0, 0, 8, 0, 0, 0, 327, 0, 0, 3, ! 0, 0, 0, 327, 0, 80, 0, 0, 0, 328, ! 327, 328, 327, 0, 81, 327, 5, 327, 0, 327, ! 0, 0, 6, 0, 329, 0, 0, 329, 330, 194, ! 195, 0, 0, 0, 80, 0, 0, 0, 82, 0, ! 0, 83, 22, 196, 655, 0, 0, 0, 0, 197, ! 328, 155, 261, 0, 328, 8, 198, 0, 0, 0, ! 199, 0, 329, 0, 329, 0, 0, 82, 0, 0, ! 83, 22, 0, 0, 200, 201, 328, 0, 202, 0, ! 203, 0, 0, 0, 328, 689, 0, 204, 205, 206, ! 207, 0, 0, 208, 209, 0, 0, 0, 0, 0, ! 0, 0, 0, 329, 0, 3, 0, 329, 0, 0, ! 0, 80, 0, 0, 328, 0, 0, 328, 0, 722, ! 81, 0, 5, 0, 0, 730, 0, 0, 6, 329, ! 0, 0, 0, 0, 0, 0, 328, 329, 328, 0, ! 0, 328, 0, 0, 82, 0, 0, 83, 22, 0, ! 0, 0, 0, 0, 0, 328, 0, 0, 128, 0, ! 0, 0, 0, 339, 339, 339, 339, 329, 0, 328, ! 329, 339, 339, 0, 0, 0, 328, 0, 330, 0, ! 0, 330, 0, 328, 0, 328, 0, 0, 328, 329, ! 328, 329, 328, 0, 329, 0, 0, 0, 0, 0, ! 0, 764, 0, 0, 0, 767, 0, 0, 329, 422, ! 0, 192, 193, 0, 0, 0, 330, 0, 330, 0, ! 0, 0, 329, 340, 340, 340, 340, 0, 0, 329, ! 0, 340, 340, 0, 0, 0, 329, 0, 329, 0, ! 0, 329, 0, 329, 0, 329, 0, 0, 0, 0, ! 0, 0, 0, 0, 194, 195, 0, 330, 0, 80, ! 0, 330, 0, 0, 0, 0, 0, 0, 196, 0, ! 0, 0, 0, 0, 197, 0, 0, 0, 0, 0, ! 0, 198, 0, 330, 0, 199, 0, 0, 0, 0, ! 0, 330, 82, 0, 0, 83, 22, 0, 0, 200, ! 201, 0, 0, 202, 0, 0, 0, 0, 0, 423, ! 0, 0, 204, 205, 206, 207, 0, 0, 208, 209, ! 0, 330, 0, 0, 330, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 330, 0, 330, 0, 0, 330, 0, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, ! 339, 339, 330, 339, 339, 339, 339, 339, 339, 339, ! 0, 0, 0, 0, 0, 0, 330, 0, 0, 0, ! 0, 0, 0, 330, 0, 0, 0, 268, 0, 0, ! 330, 0, 330, 0, 0, 330, 0, 330, 0, 330, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 340, 340, 340, 340, 340, 340, 340, 340, 340, 340, ! 340, 340, 0, 340, 340, 340, 340, 340, 340, 340, ! 0, 3, 194, 195, 661, 269, 270, 80, 271, 0, ! 0, 272, 0, 0, 0, 273, 196, 0, 0, 662, ! 0, 0, 274, 275, 6, 276, 339, 277, 278, 198, ! 279, 339, 0, 280, 281, 0, 0, 0, 0, 0, ! 82, 0, 0, 83, 22, 0, 0, 0, 268, 0, ! 0, 282, 0, 155, 727, 0, 0, 8, 0, 0, ! 204, 205, 206, 207, 0, 0, 208, 209, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 340, 0, 0, 0, ! 0, 340, 3, 194, 195, 661, 269, 270, 80, 271, ! 0, 0, 272, 0, 0, 0, 273, 196, 0, 0, ! 662, 0, 0, 274, 275, 6, 276, 0, 277, 278, ! 198, 279, 0, 0, 280, 281, 0, 0, 0, 0, ! 0, 82, 0, 0, 83, 22, 0, 0, 0, 0, ! 0, 0, 282, 268, 155, 756, 0, 0, 8, 0, ! 0, 204, 205, 206, 207, 0, 0, 208, 209, 0, ! 0, 0, 339, 339, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 339, 0, ! 0, 0, 0, 0, 0, 0, 0, 3, 194, 195, ! -264, 269, 270, 80, 271, 0, 0, 272, 0, 0, ! 0, 273, 196, 0, 0, -264, 0, 0, 274, 275, ! 6, 276, 268, 277, 278, 198, 279, 0, 0, 280, ! 281, 0, 340, 340, 0, 0, 82, 0, 0, 83, ! 22, 0, 0, 0, 0, 0, 0, 282, 340, 155, ! -264, 0, 0, 8, 0, 0, 204, 205, 206, 207, ! 0, 0, 208, 209, 0, 0, 3, 194, 195, 0, ! 269, 270, 80, 271, 0, 0, 272, 0, 0, 0, ! 273, 196, 0, 0, 0, 0, 0, 274, 275, 6, ! 276, 268, 277, 278, 198, 279, 0, 0, 280, 281, ! 0, 0, 0, 0, 0, 82, 0, 0, 83, 22, ! 0, 0, 0, 0, 0, 0, 282, 0, 155, 445, ! 0, 0, 8, 0, 0, 204, 205, 206, 207, 0, ! 0, 208, 209, 0, 0, 3, 194, 195, 0, 269, ! 270, 80, 271, 0, 0, 272, 0, 0, 0, 273, ! 196, 0, 0, 0, 0, 0, 274, 275, 6, 276, ! 268, 277, 278, 198, 279, 0, 0, 280, 281, 0, ! 0, 0, 0, 0, 82, 0, 0, 83, 22, 0, ! 0, 0, 0, 0, 0, 282, 0, 155, 0, 0, ! 0, 8, 0, 0, 204, 205, 206, 207, 0, 0, ! 208, 209, 0, 0, 3, 194, 195, 0, 269, 270, ! 80, 271, 0, 0, 272, 0, 0, 0, 273, 196, ! 0, 0, 0, 0, 0, 274, 275, 268, 276, 0, ! 277, 278, 198, 279, 0, 0, 280, 281, 0, 0, ! 0, 0, 0, 82, 0, 0, 83, 22, 0, 0, ! 0, 0, 0, 0, 282, 0, 155, 0, 0, 0, ! 8, 0, 0, 204, 205, 206, 207, 0, 0, 208, ! 209, 3, 194, 195, 0, 700, 270, 80, 271, 0, ! 0, 272, 0, 0, 0, 273, 196, 0, 0, 0, ! 0, 0, 274, 275, 0, 276, 0, 277, 278, 198, ! 279, 0, 0, 280, 281, 500, 0, 192, 193, 0, ! 82, 0, 0, 83, 22, 0, 0, 0, 0, 0, ! 0, 282, 0, 155, 0, 0, 0, 8, 0, 0, ! 204, 205, 206, 207, 0, 0, 208, 209, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 194, 195, 0, 0, 0, 80, 0, 553, 0, 192, ! 193, 0, 0, 0, 196, 0, 0, 0, 0, 0, ! 197, 0, 0, 0, 0, 0, 0, 198, 0, 0, ! 0, 199, 0, 0, 0, 0, 0, 0, 82, 0, ! 0, 83, 22, 0, 0, 200, 201, 0, 0, 202, ! 0, 0, 194, 195, 146, 0, 0, 80, 204, 205, ! 206, 207, 0, 0, 208, 209, 196, 0, 0, 0, ! 0, 0, 197, 592, 0, 192, 193, 0, 0, 198, 0, 0, 0, 199, 0, 0, 0, 0, 0, 0, ! 82, 0, 0, 83, 22, 0, 554, 200, 201, 0, ! 0, 202, 0, 0, 0, 0, 0, 0, 0, 0, ! 204, 205, 206, 207, 0, 0, 208, 209, 194, 195, ! 0, 0, 0, 80, 0, 600, 0, 192, 193, 0, ! 0, 0, 196, 0, 0, 0, 0, 0, 197, 0, ! 0, 0, 0, 0, 0, 198, 0, 0, 0, 199, ! 0, 0, 0, 0, 0, 0, 82, 0, 0, 83, ! 22, 0, 0, 200, 201, 0, 0, 202, 593, 0, ! 194, 195, 0, 0, 0, 80, 204, 205, 206, 207, ! 0, 0, 208, 209, 196, 0, 0, 0, 0, 0, ! 197, 608, 0, 192, 193, 0, 0, 198, 0, 0, ! 0, 199, 0, 0, 0, 0, 0, 0, 82, 0, ! 0, 83, 22, 0, 0, 200, 201, 0, 0, 202, ! 0, 0, 0, 0, 0, 601, 0, 0, 204, 205, ! 206, 207, 0, 0, 208, 209, 194, 195, 0, 0, ! 0, 80, 0, 615, 0, 192, 193, 0, 0, 0, ! 196, 0, 0, 0, 0, 0, 197, 0, 0, 0, ! 0, 0, 0, 198, 0, 0, 0, 199, 0, 0, ! 0, 0, 0, 0, 82, 0, 0, 83, 22, 0, ! 0, 200, 201, 0, 0, 202, 0, 0, 194, 195, ! 146, 0, 0, 80, 204, 205, 206, 207, 0, 0, ! 208, 209, 196, 0, 0, 0, 0, 0, 197, 592, ! 0, 192, 193, 0, 0, 198, 0, 0, 0, 199, ! 0, 0, 0, 0, 0, 0, 82, 0, 0, 83, ! 22, 0, 0, 200, 201, 0, 0, 202, 616, 0, ! 0, 0, 0, 0, 0, 0, 204, 205, 206, 207, ! 0, 0, 208, 209, 194, 195, 0, 0, 0, 80, ! 0, 715, 0, 192, 193, 0, 0, 0, 196, 0, ! 0, 0, 0, 0, 197, 0, 0, 0, 0, 0, ! 0, 198, 0, 0, 0, 199, 0, 0, 0, 0, ! 0, 0, 82, 0, 0, 83, 22, 0, 0, 200, ! 201, 0, 0, 202, 698, 0, 194, 195, 0, 0, ! 0, 80, 204, 205, 206, 207, 0, 0, 208, 209, ! 196, 0, 0, 0, 0, 0, 197, 715, 0, 192, ! 193, 0, 0, 198, 0, 0, 0, 199, 0, 0, ! 0, 0, 0, 0, 82, 0, 0, 83, 22, 0, ! 0, 200, 201, 0, 0, 202, 716, 0, 0, 0, ! 0, 0, 0, 0, 204, 205, 206, 207, 0, 0, ! 208, 209, 194, 195, 0, 0, 0, 80, 0, 600, ! 0, 192, 193, 0, 0, 0, 196, 0, 0, 0, ! 0, 0, 197, 0, 0, 0, 0, 0, 0, 198, 0, 0, 0, 199, 0, 0, 0, 0, 0, 0, ! 82, 0, 0, 83, 22, 0, 0, 200, 201, 0, ! 0, 202, 761, 0, 194, 195, 0, 0, 0, 80, ! 204, 205, 206, 207, 0, 0, 208, 209, 196, 0, ! 0, 0, 0, 0, 197, 337, 0, 192, 193, 0, ! 0, 198, 0, 0, 0, 199, 0, 0, 0, 0, ! 0, 0, 82, 0, 0, 83, 22, 0, 0, 200, ! 201, 0, 0, 202, 0, 0, 0, 0, 0, 766, ! 0, 0, 204, 205, 206, 207, 0, 0, 208, 209, ! 194, 195, 0, 0, 0, 80, 0, 344, 0, 192, ! 193, 0, 0, 0, 196, 0, 0, 0, 0, 0, ! 197, 0, 0, 0, 0, 0, 0, 198, 0, 0, ! 0, 199, 0, 0, 0, 0, 0, 0, 82, 0, ! 0, 83, 22, 0, 0, 200, 201, 0, 0, 202, ! 0, 0, 194, 195, 0, 0, 0, 80, 204, 205, ! 206, 207, 0, 0, 208, 209, 196, 0, 0, 0, ! 0, 0, 197, 346, 0, 192, 193, 0, 0, 198, 0, 0, 0, 199, 0, 0, 0, 0, 0, 0, ! 82, 0, 0, 83, 22, 0, 0, 200, 201, 0, ! 0, 202, 0, 0, 0, 0, 0, 0, 0, 0, ! 204, 205, 206, 207, 0, 0, 208, 209, 194, 195, ! 0, 0, 0, 80, 0, 355, 0, 192, 193, 0, ! 0, 0, 196, 0, 0, 0, 0, 0, 197, 0, ! 0, 0, 0, 0, 0, 198, 0, 0, 0, 199, ! 0, 0, 0, 0, 0, 0, 82, 0, 0, 83, ! 22, 0, 0, 200, 201, 0, 0, 202, 0, 0, ! 194, 195, 0, 0, 0, 80, 204, 205, 206, 207, ! 0, 0, 208, 209, 196, 0, 0, 0, 0, 0, ! 197, 357, 0, 192, 193, 0, 0, 198, 0, 0, ! 0, 199, 0, 0, 0, 0, 0, 0, 82, 0, ! 0, 83, 22, 0, 0, 200, 201, 0, 0, 202, ! 0, 0, 0, 0, 0, 0, 0, 0, 204, 205, ! 206, 207, 0, 0, 208, 209, 194, 195, 0, 0, ! 0, 80, 0, 359, 0, 192, 193, 0, 0, 0, ! 196, 0, 0, 0, 0, 0, 197, 0, 0, 0, ! 0, 0, 0, 198, 0, 0, 0, 199, 0, 0, ! 0, 0, 0, 0, 82, 0, 0, 83, 22, 0, ! 0, 200, 201, 0, 0, 202, 0, 0, 194, 195, ! 0, 0, 0, 80, 204, 205, 206, 207, 0, 0, ! 208, 209, 196, 0, 0, 0, 0, 0, 197, 417, ! 0, 192, 193, 0, 0, 198, 0, 0, 0, 199, ! 0, 0, 0, 0, 0, 0, 82, 0, 0, 83, ! 22, 0, 0, 200, 201, 0, 0, 202, 0, 0, ! 0, 0, 0, 0, 0, 0, 204, 205, 206, 207, ! 0, 0, 208, 209, 194, 195, 0, 0, 0, 80, ! 0, 436, 0, 192, 193, 0, 0, 0, 196, 0, ! 0, 0, 0, 0, 197, 0, 0, 0, 0, 0, ! 0, 198, 0, 0, 0, 199, 0, 0, 0, 0, ! 0, 0, 82, 0, 0, 83, 22, 0, 0, 200, ! 201, 0, 0, 202, 0, 0, 194, 195, 0, 0, ! 0, 80, 204, 205, 206, 207, 0, 0, 208, 209, ! 196, 0, 0, 0, 0, 0, 197, 508, 0, 192, ! 193, 0, 0, 198, 0, 0, 0, 199, 0, 0, ! 0, 0, 0, 0, 82, 0, 0, 83, 22, 0, ! 0, 200, 201, 0, 0, 202, 0, 0, 0, 0, ! 0, 0, 0, 0, 204, 205, 206, 207, 0, 0, ! 208, 209, 194, 195, 0, 0, 0, 80, 0, 512, ! 0, 192, 193, 0, 0, 0, 196, 0, 0, 0, ! 0, 0, 197, 0, 0, 0, 0, 0, 0, 198, 0, 0, 0, 199, 0, 0, 0, 0, 0, 0, ! 82, 0, 0, 83, 22, 0, 0, 200, 201, 0, ! 0, 202, 0, 0, 194, 195, 0, 0, 0, 80, ! 204, 205, 206, 207, 0, 0, 208, 209, 196, 0, ! 0, 0, 0, 0, 197, 514, 0, 192, 193, 0, ! 0, 198, 0, 0, 0, 199, 0, 0, 0, 0, ! 0, 0, 82, 0, 0, 83, 22, 0, 0, 200, ! 201, 0, 0, 202, 0, 0, 0, 0, 0, 0, ! 0, 0, 204, 205, 206, 207, 0, 0, 208, 209, ! 194, 195, 0, 0, 0, 80, 0, 516, 0, 192, ! 193, 0, 0, 0, 196, 0, 0, 0, 0, 0, ! 197, 0, 0, 0, 0, 0, 0, 198, 0, 0, ! 0, 199, 0, 0, 0, 0, 0, 0, 82, 0, ! 0, 83, 22, 0, 0, 200, 201, 0, 0, 202, ! 0, 0, 194, 195, 0, 0, 0, 80, 204, 205, ! 206, 207, 0, 0, 208, 209, 196, 0, 0, 0, ! 0, 0, 197, 518, 0, 192, 193, 0, 0, 198, 0, 0, 0, 199, 0, 0, 0, 0, 0, 0, ! 82, 0, 0, 83, 22, 0, 0, 200, 201, 0, ! 0, 202, 0, 0, 0, 0, 0, 0, 0, 0, ! 204, 205, 206, 207, 0, 0, 208, 209, 194, 195, ! 0, 0, 0, 80, 0, 520, 0, 192, 193, 0, ! 0, 0, 196, 0, 0, 0, 0, 0, 197, 0, ! 0, 0, 0, 0, 0, 198, 0, 0, 0, 199, ! 0, 0, 0, 0, 0, 0, 82, 0, 0, 83, ! 22, 0, 0, 200, 201, 0, 0, 202, 0, 0, ! 194, 195, 0, 0, 0, 80, 204, 205, 206, 207, ! 0, 0, 208, 209, 196, 0, 0, 0, 0, 0, ! 197, 522, 0, 192, 193, 0, 0, 198, 0, 0, ! 0, 199, 0, 0, 0, 0, 0, 0, 82, 0, ! 0, 83, 22, 0, 0, 200, 201, 0, 0, 202, ! 0, 0, 0, 0, 0, 0, 0, 0, 204, 205, ! 206, 207, 0, 0, 208, 209, 194, 195, 0, 0, ! 0, 80, 0, 524, 0, 192, 193, 0, 0, 0, ! 196, 0, 0, 0, 0, 0, 197, 0, 0, 0, ! 0, 0, 0, 198, 0, 0, 0, 199, 0, 0, ! 0, 0, 0, 0, 82, 0, 0, 83, 22, 0, ! 0, 200, 201, 0, 0, 202, 0, 0, 194, 195, ! 0, 0, 0, 80, 204, 205, 206, 207, 0, 0, ! 208, 209, 196, 0, 0, 0, 0, 0, 197, 526, ! 0, 192, 193, 0, 0, 198, 0, 0, 0, 199, ! 0, 0, 0, 0, 0, 0, 82, 0, 0, 83, ! 22, 0, 0, 200, 201, 0, 0, 202, 0, 0, ! 0, 0, 0, 0, 0, 0, 204, 205, 206, 207, ! 0, 0, 208, 209, 194, 195, 0, 0, 0, 80, ! 0, 528, 0, 192, 193, 0, 0, 0, 196, 0, ! 0, 0, 0, 0, 197, 0, 0, 0, 0, 0, ! 0, 198, 0, 0, 0, 199, 0, 0, 0, 0, ! 0, 0, 82, 0, 0, 83, 22, 0, 0, 200, ! 201, 0, 0, 202, 0, 0, 194, 195, 0, 0, ! 0, 80, 204, 205, 206, 207, 0, 0, 208, 209, ! 196, 0, 0, 0, 0, 0, 197, 530, 0, 192, ! 193, 0, 0, 198, 0, 0, 0, 199, 0, 0, ! 0, 0, 0, 0, 82, 0, 0, 83, 22, 0, ! 0, 200, 201, 0, 0, 202, 0, 0, 0, 0, ! 0, 0, 0, 0, 204, 205, 206, 207, 0, 0, ! 208, 209, 194, 195, 0, 0, 0, 80, 0, 532, ! 0, 192, 193, 0, 0, 0, 196, 0, 0, 0, ! 0, 0, 197, 0, 0, 0, 0, 0, 0, 198, ! 0, 0, 0, 199, 0, 0, 0, 0, 0, 0, ! 82, 0, 0, 83, 22, 0, 0, 200, 201, 0, ! 0, 202, 0, 0, 194, 195, 0, 0, 0, 80, ! 204, 205, 206, 207, 0, 0, 208, 209, 196, 0, ! 0, 0, 0, 0, 197, 534, 0, 192, 193, 0, ! 0, 198, 0, 0, 0, 199, 0, 0, 0, 0, ! 0, 0, 82, 0, 0, 83, 22, 0, 0, 200, ! 201, 0, 0, 202, 0, 0, 0, 0, 0, 0, ! 0, 0, 204, 205, 206, 207, 0, 0, 208, 209, ! 194, 195, 0, 0, 0, 80, 0, 539, 0, 192, ! 193, 0, 0, 0, 196, 0, 0, 0, 0, 0, ! 197, 0, 0, 0, 0, 0, 0, 198, 0, 0, ! 0, 199, 0, 0, 0, 0, 0, 0, 82, 0, ! 0, 83, 22, 0, 0, 200, 201, 0, 0, 202, ! 0, 0, 194, 195, 0, 0, 0, 80, 204, 205, ! 206, 207, 0, 0, 208, 209, 196, 0, 0, 0, ! 0, 0, 197, 541, 0, 192, 193, 0, 0, 198, ! 0, 0, 0, 199, 0, 0, 0, 0, 0, 0, ! 82, 0, 0, 83, 22, 0, 0, 200, 201, 0, ! 0, 202, 0, 0, 0, 0, 0, 0, 0, 0, ! 204, 205, 206, 207, 0, 0, 208, 209, 194, 195, ! 0, 0, 0, 80, 0, 543, 0, 192, 193, 0, ! 0, 0, 196, 0, 0, 0, 0, 0, 197, 0, ! 0, 0, 0, 0, 0, 198, 0, 0, 0, 199, ! 0, 0, 0, 0, 0, 0, 82, 0, 0, 83, ! 22, 0, 0, 200, 201, 0, 0, 202, 0, 0, ! 194, 195, 0, 0, 0, 80, 204, 205, 206, 207, ! 0, 0, 208, 209, 196, 0, 0, 0, 0, 0, ! 197, 545, 0, 192, 193, 0, 0, 198, 0, 0, ! 0, 199, 0, 0, 0, 0, 0, 0, 82, 0, ! 0, 83, 22, 0, 0, 200, 201, 0, 0, 202, ! 0, 0, 0, 0, 0, 0, 0, 0, 204, 205, ! 206, 207, 0, 0, 208, 209, 194, 195, 0, 0, ! 0, 80, 0, 547, 0, 192, 193, 0, 0, 0, ! 196, 0, 0, 0, 0, 0, 197, 0, 0, 0, ! 0, 0, 0, 198, 0, 0, 0, 199, 0, 0, ! 0, 0, 0, 0, 82, 0, 0, 83, 22, 0, ! 0, 200, 201, 0, 0, 202, 0, 0, 194, 195, ! 0, 0, 0, 80, 204, 205, 206, 207, 0, 0, ! 208, 209, 196, 0, 0, 0, 0, 0, 197, 549, ! 0, 192, 193, 0, 0, 198, 0, 0, 0, 199, ! 0, 0, 0, 0, 0, 0, 82, 0, 0, 83, ! 22, 0, 0, 200, 201, 0, 0, 202, 0, 0, ! 0, 0, 0, 0, 0, 0, 204, 205, 206, 207, ! 0, 0, 208, 209, 194, 195, 0, 0, 0, 80, ! 0, 551, 0, 192, 193, 0, 0, 0, 196, 0, ! 0, 0, 0, 0, 197, 0, 0, 0, 0, 0, ! 0, 198, 0, 0, 0, 199, 0, 0, 0, 0, ! 0, 0, 82, 0, 0, 83, 22, 0, 0, 200, ! 201, 0, 0, 202, 0, 0, 194, 195, 0, 0, ! 0, 80, 204, 205, 206, 207, 0, 0, 208, 209, ! 196, 0, 0, 0, 0, 0, 197, 556, 0, 192, ! 193, 0, 0, 198, 0, 0, 0, 199, 0, 0, ! 0, 0, 0, 0, 82, 0, 0, 83, 22, 0, ! 0, 200, 201, 0, 0, 202, 0, 0, 0, 0, ! 0, 0, 0, 0, 204, 205, 206, 207, 0, 0, ! 208, 209, 194, 195, 0, 0, 0, 80, 0, 565, ! 0, 192, 193, 0, 0, 0, 196, 0, 0, 0, ! 0, 0, 197, 0, 0, 0, 0, 0, 0, 198, ! 0, 0, 0, 199, 0, 0, 0, 0, 0, 0, ! 82, 0, 0, 83, 22, 0, 0, 200, 201, 0, ! 0, 202, 0, 0, 194, 195, 0, 0, 0, 80, ! 204, 205, 206, 207, 0, 0, 208, 209, 196, 0, ! 0, 0, 0, 0, 197, 573, 0, 192, 193, 0, ! 0, 198, 0, 0, 0, 199, 0, 0, 0, 0, ! 0, 0, 82, 0, 0, 83, 22, 0, 0, 200, ! 201, 0, 0, 202, 0, 0, 0, 0, 0, 0, ! 0, 0, 204, 205, 206, 207, 0, 0, 208, 209, ! 194, 195, 0, 0, 0, 80, 0, 575, 0, 192, ! 193, 0, 0, 0, 196, 0, 0, 0, 0, 0, ! 197, 0, 0, 0, 0, 0, 0, 198, 0, 0, ! 0, 199, 0, 0, 0, 0, 0, 0, 82, 0, ! 0, 83, 22, 0, 0, 200, 201, 0, 0, 202, ! 0, 0, 194, 195, 0, 0, 0, 80, 204, 205, ! 206, 207, 0, 0, 208, 209, 196, 0, 0, 0, ! 0, 0, 197, 603, 0, 192, 193, 0, 0, 198, ! 0, 0, 0, 199, 0, 0, 0, 0, 0, 0, ! 82, 0, 0, 83, 22, 0, 0, 200, 201, 0, ! 0, 202, 0, 0, 0, 0, 0, 0, 0, 0, ! 204, 205, 206, 207, 0, 0, 208, 209, 194, 195, ! 0, 0, 0, 80, 0, 618, 0, 192, 193, 0, ! 0, 0, 196, 0, 0, 0, 0, 0, 197, 0, ! 0, 0, 0, 0, 0, 198, 0, 0, 0, 199, ! 0, 0, 0, 0, 0, 0, 82, 0, 0, 83, ! 22, 0, 0, 200, 201, 0, 0, 202, 0, 0, ! 194, 195, 0, 0, 0, 80, 204, 205, 206, 207, ! 0, 0, 208, 209, 196, 0, 0, 0, 0, 0, ! 197, 684, 0, 192, 193, 0, 0, 198, 0, 0, ! 0, 199, 0, 0, 0, 0, 0, 0, 82, 0, ! 0, 83, 22, 0, 0, 200, 201, 0, 0, 202, ! 0, 0, 0, 0, 0, 0, 0, 0, 204, 205, ! 206, 207, 0, 0, 208, 209, 194, 195, 0, 0, ! 0, 80, 0, 688, 0, 192, 193, 0, 0, 0, ! 196, 0, 0, 0, 0, 0, 197, 0, 0, 0, ! 0, 0, 0, 198, 0, 0, 0, 199, 0, 0, ! 0, 0, 0, 0, 82, 0, 0, 83, 22, 0, ! 0, 200, 201, 0, 0, 202, 0, 0, 194, 195, ! 0, 0, 0, 80, 204, 205, 206, 207, 0, 0, ! 208, 209, 196, 0, 0, 0, 0, 0, 197, 694, ! 0, 192, 193, 0, 0, 198, 0, 0, 0, 199, ! 0, 0, 0, 0, 0, 0, 82, 0, 0, 83, ! 22, 0, 0, 200, 201, 0, 0, 202, 0, 0, ! 0, 0, 0, 0, 0, 0, 204, 205, 206, 207, ! 0, 0, 208, 209, 194, 195, 0, 0, 0, 80, ! 0, 721, 0, 192, 193, 0, 0, 0, 196, 0, ! 0, 0, 0, 0, 197, 0, 0, 0, 0, 0, ! 0, 198, 0, 0, 0, 199, 0, 0, 0, 0, ! 0, 0, 82, 0, 0, 83, 22, 0, 0, 200, ! 201, 0, 0, 202, 0, 0, 194, 195, 0, 0, ! 0, 80, 204, 205, 206, 207, 0, 0, 208, 209, ! 196, 0, 0, 342, 0, 192, 197, 0, 0, 0, ! 0, 0, 0, 198, 0, 0, 0, 199, 0, 0, ! 0, 0, 0, 0, 82, 0, 0, 83, 22, 0, ! 0, 200, 201, 0, 0, 202, 0, 0, 0, 0, ! 0, 0, 0, 0, 204, 205, 206, 207, 194, 195, ! 208, 209, 0, 80, 0, 583, 0, 0, 0, 0, ! 0, 0, 196, 0, 0, 0, 0, 0, 197, 0, ! 0, 0, 0, 0, 0, 198, 0, 0, 0, 199, ! 671, 0, 0, 0, 0, 0, 82, 0, 0, 83, ! 22, 0, 0, 200, 201, 0, 0, 202, 0, -287, ! -287, -287, 0, 0, 0, -287, 204, 205, 206, 207, ! 0, 0, 208, 209, -287, 0, 0, 0, 0, 0, ! -287, 0, 0, 732, 0, 194, 195, -287, 0, 0, ! 80, -287, 0, 0, 0, 0, 0, 0, -287, 196, ! 0, -287, -287, 0, 0, 197, 0, 0, 669, -287, ! 0, 0, 198, 0, 0, -287, 199, 0, -287, -287, ! -287, -287, 0, 82, -287, -287, 83, 22, 194, 195, ! 0, 0, 0, 80, 282, -295, 0, 0, 0, 0, ! 0, 0, 196, 204, 205, 206, 207, 0, 197, 208, ! 209, 0, 0, 194, 195, 198, 0, 0, 80, 199, ! 0, 0, 192, 193, 0, 0, 82, 196, 0, 83, ! 22, 0, 0, 197, 0, 0, 0, 282, -295, 0, ! 198, 0, 0, 0, 199, 0, 204, 205, 206, 207, ! 0, 82, 208, 209, 83, 22, 0, 0, 0, 0, ! 0, 0, 282, 0, 0, 194, 195, 0, 0, 0, ! 80, 204, 205, 206, 207, 0, 0, 208, 209, 196, ! 0, 0, 0, 0, 0, 197, 0, 0, 192, 193, ! 0, 0, 198, 0, 0, 0, 199, 0, 0, 0, ! 0, 0, 0, 82, 0, 0, 83, 22, 0, 0, ! 200, 201, 0, 0, 202, 0, 203, 363, 0, 0, ! 0, 364, 0, 204, 205, 206, 207, 0, 0, 208, ! 209, 194, 195, 0, 0, 0, 80, 0, 0, 0, ! 192, 193, 0, 0, 0, 196, 0, 0, 0, 0, ! 0, 197, 0, 0, 0, 0, 0, 0, 198, 0, ! 0, 0, 199, 0, 0, 0, 0, 0, 0, 82, ! 0, 0, 83, 22, 0, 0, 200, 201, 0, 0, ! 202, 497, 0, 194, 195, 0, 0, 0, 80, 204, ! 205, 206, 207, 0, 0, 208, 209, 196, 0, 0, ! 0, 0, 0, 197, 0, 0, 192, 193, 0, 0, ! 198, 0, 0, 0, 199, 0, 0, 0, 0, 0, ! 0, 82, 0, 0, 83, 22, 0, 0, 200, 201, ! 0, 0, 202, 634, 0, 0, 0, 0, 0, 0, ! 0, 204, 205, 206, 207, 0, 0, 208, 209, 194, ! 195, 0, 0, 0, 80, 0, 0, 0, 192, 193, ! 0, 0, 0, 196, 0, 0, 0, 0, 0, 197, ! 0, 0, 0, 0, 0, 0, 198, 0, 0, 0, ! 199, 0, 0, 0, 0, 0, 0, 82, 0, 0, ! 83, 22, 0, 0, 200, 201, 0, 0, 202, 677, ! 0, 194, 195, 0, 0, 0, 80, 204, 205, 206, ! 207, 0, 0, 208, 209, 196, 0, 0, 0, 0, ! 0, 197, 0, 0, 192, 193, 0, 0, 198, 0, ! 0, 0, 199, 0, 0, 0, 0, 0, 0, 82, ! 0, 0, 83, 22, 0, 0, 200, 201, 0, 0, ! 202, 690, 0, 0, 0, 0, 0, 0, 0, 204, ! 205, 206, 207, 0, 0, 208, 209, 194, 195, 0, ! 0, 0, 80, 0, 0, 0, 0, 0, 0, 0, ! 0, 196, 0, 0, 0, 0, 0, 197, 0, 0, ! 0, 0, 0, 0, 198, 0, 0, 0, 199, 0, ! 0, 0, 0, 0, 0, 82, 0, 0, 83, 22, ! 0, 0, 200, 201, 0, 0, 202, 0, 3, 194, ! 195, 0, 0, 0, 80, 204, 205, 206, 207, 0, ! 0, 208, 209, 196, 0, 0, 0, 0, 0, 197, ! 0, 0, 0, 0, 0, 0, 198, 0, 0, 80, ! 199, 0, 0, 0, 0, 0, 0, 82, 196, 0, ! 83, 22, 0, 0, 197, 0, 0, 0, 282, 0, ! 0, 198, 0, 0, 0, 199, 0, 204, 205, 206, ! 207, 0, 82, 208, 209, 83, 22, 0, 0, 200, ! 201, 0, 0, 202, 0, 0, 0, 0, 0, 0, ! 0, 0, 204, 205, 206, 207, 0, 0, 208, 209 }; static const short yycheck[] = { ! 4, 293, 203, 7, 64, 490, 134, 173, 125, 313, ! 178, 135, 334, 1, 444, 136, 44, 131, 674, 192, ! 48, 194, 195, 1, 64, 300, 1, 200, 201, 1, ! 15, 91, 1, 308, 1, 310, 96, 666, 66, 1, ! 44, 1, 1, 71, 48, 1, 160, 131, 1, 54, ! 86, 91, 1, 167, 484, 1, 96, 1, 10, 1, ! 64, 1, 66, 73, 10, 11, 12, 71, 1, 88, ! 1, 131, 1, 96, 1, 135, 160, 198, 88, 96, ! 103, 511, 1, 35, 1, 102, 32, 91, 97, 35, ! 36, 131, 96, 99, 99, 135, 1, 726, 158, 68, ! 160, 102, 130, 1, 89, 1, 53, 53, 136, 68, ! 766, 53, 100, 644, 10, 11, 12, 1, 158, 775, ! 160, 88, 182, 101, 1, 103, 130, 131, 103, 101, ! 102, 135, 136, 173, 101, 259, 32, 622, 100, 35, ! 36, 101, 182, 103, 97, 101, 5, 6, 101, 644, ! 264, 95, 101, 102, 158, 97, 160, 53, 198, 103, ! 100, 1, 202, 277, 97, 96, 283, 335, 64, 173, ! 198, 102, 101, 704, 101, 211, 707, 607, 182, 38, ! 39, 1, 101, 42, 101, 131, 1, 119, 192, 193, ! 194, 195, 90, 52, 198, 100, 200, 201, 202, 259, ! 96, 631, 1, 101, 64, 1, 379, 380, 381, 704, ! 334, 641, 707, 97, 160, 336, 644, 149, 1, 259, ! 152, 1, 81, 97, 101, 99, 85, 657, 1, 66, ! 290, 91, 1, 99, 71, 131, 96, 103, 170, 135, ! 1, 1, 773, 1, 1, 411, 103, 778, 284, 780, ! 290, 782, 1, 293, 94, 259, 96, 1, 1, 99, ! 100, 101, 102, 1, 160, 124, 125, 1, 88, 1, ! 1, 131, 564, 313, 334, 135, 704, 173, 773, 707, ! 95, 101, 141, 778, 96, 780, 290, 782, 96, 293, ! 102, 99, 493, 130, 334, 599, 300, 601, 158, 99, ! 160, 1, 101, 103, 308, 101, 310, 102, 336, 313, ! 1, 741, 485, 173, 173, 131, 352, 353, 101, 178, ! 173, 101, 182, 96, 360, 361, 443, 649, 260, 102, ! 334, 100, 336, 94, 95, 1, 96, 95, 99, 100, ! 101, 102, 102, 100, 160, 773, 90, 96, 640, 1, ! 778, 391, 780, 102, 782, 1, 644, 100, 96, 1, ! 97, 95, 221, 259, 102, 97, 97, 1, 96, 644, ! 674, 411, 64, 64, 102, 379, 380, 381, 382, 383, ! 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, ! 394, 395, 396, 397, 398, 561, 96, 293, 64, 259, ! 1, 0, 1, 100, 96, 1, 97, 411, 48, 173, ! 173, 1, 96, 272, 1, 1, 704, 313, 102, 707, ! 279, 0, 1, 63, 283, 1, 1, 101, 102, 704, ! 290, 97, 707, 293, 293, 95, 728, 48, 334, 131, ! 293, 300, 478, 99, 96, 481, 45, 300, 621, 308, ! 96, 310, 63, 313, 96, 308, 731, 310, 98, 45, ! 313, 95, 766, 62, 578, 1, 45, 581, 160, 68, ! 745, 775, 0, 1, 334, 97, 335, 56, 1, 101, ! 1, 485, 68, 62, 759, 773, 490, 98, 98, 68, ! 778, 350, 780, 1, 782, 96, 54, 76, 773, 95, ! 90, 537, 101, 778, 1, 780, 634, 782, 95, 95, ! 1, 1, 371, 95, 373, 411, 1, 45, 45, 95, ! 95, 561, 101, 97, 564, 649, 1, 1, 56, 293, ! 293, 391, 53, 1, 62, 62, 300, 300, 46, 47, ! 68, 68, 96, 64, 308, 308, 310, 310, 102, 313, ! 313, 411, 411, 681, 1, 96, 1, 561, 411, 1, ! 564, 102, 676, 53, 96, 693, 1, 99, 10, 11, ! 12, 1, 95, 101, 64, 5, 97, 1, 45, 1, ! 88, 440, 90, 68, 443, 93, 94, 95, 73, 649, ! 32, 99, 77, 35, 36, 103, 173, 102, 95, 10, ! 640, 12, 103, 88, 95, 0, 1, 97, 1, 649, ! 738, 53, 1, 88, 88, 98, 51, 621, 622, 102, ! 88, 66, 64, 68, 35, 60, 666, 1, 73, 0, ! 1, 66, 77, 637, 1, 61, 640, 103, 73, 65, ! 644, 88, 77, 88, 66, 649, 68, 411, 411, 84, ! 45, 73, 87, 88, 96, 77, 91, 92, 88, 103, ! 95, 56, 666, 1, 88, 561, 88, 62, 564, 104, ! 105, 106, 107, 68, 45, 110, 111, 51, 1, 99, ! 1, 0, 1, 0, 1, 56, 726, 67, 728, 131, ! 1, 62, 0, 1, 74, 88, 1, 68, 11, 88, ! 704, 561, 561, 707, 564, 564, 101, 1, 561, 1, ! 84, 564, 1, 87, 88, 1, 293, 1, 160, 12, ! 173, 88, 726, 300, 728, 1, 45, 731, 45, 109, ! 101, 308, 1, 310, 131, 1, 313, 45, 480, 561, ! 482, 745, 564, 62, 640, 62, 599, 14, 601, 68, ! 88, 68, 94, 649, 62, 759, 13, 99, 100, 51, ! 68, 158, 97, 160, 95, 88, 1, 88, 95, 773, ! 666, 46, 47, 101, 778, 85, 780, 88, 782, 638, ! 640, 640, 101, 88, 101, 644, 98, 640, 102, 649, ! 99, 644, 84, 101, 88, 87, 88, 561, 561, 88, ! 564, 564, 88, 68, 88, 478, 666, 666, 481, 97, ! 45, 101, 88, 666, 124, 125, 51, 67, 640, 88, ! 101, 674, 88, 95, 99, 60, 1, 62, 103, 90, ! 726, 95, 728, 68, 411, 599, 599, 601, 601, 95, ! 293, 46, 47, 96, 96, 704, 99, 300, 707, 84, ! 103, 704, 87, 88, 707, 308, 1, 310, 101, 102, ! 313, 704, 97, 95, 707, 45, 726, 726, 728, 728, ! 11, 51, 731, 726, 1, 728, 640, 640, 731, 95, ! 644, 644, 101, 99, 93, 94, 745, 103, 1, 93, ! 94, 32, 745, 173, 99, 36, 46, 47, 103, 96, ! 759, 96, 666, 666, 84, 1, 759, 87, 88, 142, ! 674, 674, 53, 766, 773, 97, 96, 101, 45, 778, ! 773, 780, 775, 782, 51, 778, 1, 780, 96, 782, ! 773, 102, 45, 3, 4, 778, 97, 780, 51, 782, ! 704, 704, 57, 707, 707, 57, 173, 16, 17, 45, ! 18, 19, 20, 21, 101, 51, 96, 84, 411, 96, ! 87, 88, 726, 726, 728, 728, 1, 731, 731, 202, ! 203, 84, 97, 98, 87, 88, 101, 387, 388, 389, ! 390, 745, 745, 96, 561, 93, 94, 564, 84, 96, ! 58, 87, 88, 88, 96, 759, 759, 1, 93, 94, ! 95, 101, 766, 766, 99, 51, 46, 47, 103, 773, ! 773, 775, 775, 293, 778, 778, 780, 780, 782, 782, ! 300, 101, 599, 57, 601, 5, 6, 7, 308, 1, ! 310, 3, 4, 313, 8, 9, 10, 270, 84, 88, ! 273, 87, 88, 96, 93, 94, 95, 0, 281, 282, ! 99, 46, 47, 45, 103, 93, 94, 95, 0, 51, ! 96, 99, 391, 640, 12, 103, 293, 644, 60, 56, ! 62, 99, 100, 300, 46, 47, 68, 392, 393, 51, ! 141, 308, 160, 310, 382, 383, 313, 77, 60, 666, ! 259, 158, 84, 411, 66, 87, 88, 674, 54, 266, ! 173, 73, 99, 100, 101, 77, 98, 96, 561, 664, ! 293, 564, 84, 313, 664, 87, 88, 313, 579, 91, ! 92, 579, 353, 95, 394, 97, 98, 704, 193, 397, ! 707, 411, 104, 105, 106, 107, 395, 370, 110, 111, ! 398, 374, 384, 385, 386, 396, 599, 402, 601, 726, ! 637, 728, 88, -1, 731, -1, 1, 93, 94, 95, ! -1, -1, -1, 99, -1, -1, 399, 103, 745, 93, ! 94, 95, -1, -1, -1, 99, -1, -1, -1, 103, ! -1, -1, 759, 416, 411, -1, -1, 640, -1, 766, ! -1, 644, -1, 426, -1, 428, 773, -1, 775, -1, ! 45, 778, -1, 780, -1, 782, 51, -1, -1, -1, ! -1, -1, -1, 666, -1, 60, -1, 62, -1, -1, ! 293, 674, -1, 68, -1, -1, -1, 300, 461, -1, ! 463, -1, -1, -1, -1, 308, -1, 310, -1, 84, ! 313, -1, 87, 88, 477, -1, 45, -1, -1, -1, ! -1, 704, 51, -1, 707, -1, -1, -1, -1, -1, ! 493, 60, -1, 62, -1, -1, -1, -1, -1, 68, ! -1, -1, -1, 726, -1, 728, -1, -1, 731, -1, ! -1, 561, -1, -1, 564, 84, -1, -1, 87, 88, ! -1, -1, 745, -1, 1, -1, 3, 4, 97, 98, ! -1, -1, 101, -1, -1, -1, 759, -1, -1, 45, ! -1, -1, -1, 766, -1, 51, -1, -1, -1, 599, ! 773, 601, 775, -1, 60, 778, 62, 780, -1, 782, ! -1, -1, 68, -1, 561, -1, -1, 564, 411, 46, ! 47, -1, -1, -1, 51, -1, -1, -1, 84, -1, ! -1, 87, 88, 60, 587, -1, -1, -1, -1, 66, ! 640, 97, 98, -1, 644, 101, 73, -1, -1, -1, ! 77, -1, 599, -1, 601, -1, -1, 84, -1, -1, ! 87, 88, -1, -1, 91, 92, 666, -1, 95, -1, ! 97, -1, -1, -1, 674, 628, -1, 104, 105, 106, ! 107, -1, -1, 110, 111, -1, -1, -1, -1, -1, ! -1, -1, -1, 640, -1, 45, -1, 644, -1, -1, ! -1, 51, -1, -1, 704, -1, -1, 707, -1, 662, ! 60, -1, 62, -1, -1, 668, -1, -1, 68, 666, ! -1, -1, -1, -1, -1, -1, 726, 674, 728, -1, ! -1, 731, -1, -1, 84, -1, -1, 87, 88, -1, ! -1, -1, -1, -1, -1, 745, -1, -1, 98, -1, ! -1, -1, -1, 192, 193, 194, 195, 704, -1, 759, ! 707, 200, 201, -1, -1, -1, 766, -1, 561, -1, ! -1, 564, -1, 773, -1, 775, -1, -1, 778, 726, ! 780, 728, 782, -1, 731, -1, -1, -1, -1, -1, ! -1, 744, -1, -1, -1, 748, -1, -1, 745, 1, ! -1, 3, 4, -1, -1, -1, 599, -1, 601, -1, ! -1, -1, 759, 192, 193, 194, 195, -1, -1, 766, ! -1, 200, 201, -1, -1, -1, 773, -1, 775, -1, ! -1, 778, -1, 780, -1, 782, -1, -1, -1, -1, ! -1, -1, -1, -1, 46, 47, -1, 640, -1, 51, ! -1, 644, -1, -1, -1, -1, -1, -1, 60, -1, ! -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, ! -1, 73, -1, 666, -1, 77, -1, -1, -1, -1, ! -1, 674, 84, -1, -1, 87, 88, -1, -1, 91, ! 92, -1, -1, 95, -1, -1, -1, -1, -1, 101, ! -1, -1, 104, 105, 106, 107, -1, -1, 110, 111, ! -1, 704, -1, -1, 707, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, 726, -1, 728, -1, -1, 731, -1, ! 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, ! 389, 390, 745, 392, 393, 394, 395, 396, 397, 398, -1, -1, -1, -1, -1, -1, 759, -1, -1, -1, ! -1, -1, -1, 766, -1, -1, -1, 1, -1, -1, ! 773, -1, 775, -1, -1, 778, -1, 780, -1, 782, ! -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, ! 389, 390, -1, 392, 393, 394, 395, 396, 397, 398, ! -1, 45, 46, 47, 48, 49, 50, 51, 52, -1, ! -1, 55, -1, -1, -1, 59, 60, -1, -1, 63, ! -1, -1, 66, 67, 68, 69, 485, 71, 72, 73, ! 74, 490, -1, 77, 78, -1, -1, -1, -1, -1, ! 84, -1, -1, 87, 88, -1, -1, -1, 1, -1, ! -1, 95, -1, 97, 98, -1, -1, 101, -1, -1, ! 104, 105, 106, 107, -1, -1, 110, 111, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, 485, -1, -1, -1, ! -1, 490, 45, 46, 47, 48, 49, 50, 51, 52, -1, -1, 55, -1, -1, -1, 59, 60, -1, -1, ! 63, -1, -1, 66, 67, 68, 69, -1, 71, 72, ! 73, 74, -1, -1, 77, 78, -1, -1, -1, -1, ! -1, 84, -1, -1, 87, 88, -1, -1, -1, -1, ! -1, -1, 95, 1, 97, 98, -1, -1, 101, -1, ! -1, 104, 105, 106, 107, -1, -1, 110, 111, -1, ! -1, -1, 621, 622, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, 637, -1, ! -1, -1, -1, -1, -1, -1, -1, 45, 46, 47, ! 48, 49, 50, 51, 52, -1, -1, 55, -1, -1, ! -1, 59, 60, -1, -1, 63, -1, -1, 66, 67, ! 68, 69, 1, 71, 72, 73, 74, -1, -1, 77, ! 78, -1, 621, 622, -1, -1, 84, -1, -1, 87, ! 88, -1, -1, -1, -1, -1, -1, 95, 637, 97, ! 98, -1, -1, 101, -1, -1, 104, 105, 106, 107, ! -1, -1, 110, 111, -1, -1, 45, 46, 47, -1, ! 49, 50, 51, 52, -1, -1, 55, -1, -1, -1, ! 59, 60, -1, -1, -1, -1, -1, 66, 67, 68, ! 69, 1, 71, 72, 73, 74, -1, -1, 77, 78, ! -1, -1, -1, -1, -1, 84, -1, -1, 87, 88, ! -1, -1, -1, -1, -1, -1, 95, -1, 97, 98, ! -1, -1, 101, -1, -1, 104, 105, 106, 107, -1, ! -1, 110, 111, -1, -1, 45, 46, 47, -1, 49, ! 50, 51, 52, -1, -1, 55, -1, -1, -1, 59, ! 60, -1, -1, -1, -1, -1, 66, 67, 68, 69, ! 1, 71, 72, 73, 74, -1, -1, 77, 78, -1, ! -1, -1, -1, -1, 84, -1, -1, 87, 88, -1, ! -1, -1, -1, -1, -1, 95, -1, 97, -1, -1, ! -1, 101, -1, -1, 104, 105, 106, 107, -1, -1, ! 110, 111, -1, -1, 45, 46, 47, -1, 49, 50, ! 51, 52, -1, -1, 55, -1, -1, -1, 59, 60, ! -1, -1, -1, -1, -1, 66, 67, 1, 69, -1, ! 71, 72, 73, 74, -1, -1, 77, 78, -1, -1, ! -1, -1, -1, 84, -1, -1, 87, 88, -1, -1, ! -1, -1, -1, -1, 95, -1, 97, -1, -1, -1, ! 101, -1, -1, 104, 105, 106, 107, -1, -1, 110, ! 111, 45, 46, 47, -1, 49, 50, 51, 52, -1, -1, 55, -1, -1, -1, 59, 60, -1, -1, -1, ! -1, -1, 66, 67, -1, 69, -1, 71, 72, 73, ! 74, -1, -1, 77, 78, 1, -1, 3, 4, -1, ! 84, -1, -1, 87, 88, -1, -1, -1, -1, -1, ! -1, 95, -1, 97, -1, -1, -1, 101, -1, -1, ! 104, 105, 106, 107, -1, -1, 110, 111, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! 46, 47, -1, -1, -1, 51, -1, 1, -1, 3, ! 4, -1, -1, -1, 60, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, ! -1, 77, -1, -1, -1, -1, -1, -1, 84, -1, ! -1, 87, 88, -1, -1, 91, 92, -1, -1, 95, ! -1, -1, 46, 47, 100, -1, -1, 51, 104, 105, ! 106, 107, -1, -1, 110, 111, 60, -1, -1, -1, ! -1, -1, 66, 1, -1, 3, 4, -1, -1, 73, ! -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, ! 84, -1, -1, 87, 88, -1, 90, 91, 92, -1, ! -1, 95, -1, -1, -1, -1, -1, -1, -1, -1, ! 104, 105, 106, 107, -1, -1, 110, 111, 46, 47, ! -1, -1, -1, 51, -1, 1, -1, 3, 4, -1, ! -1, -1, 60, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, ! -1, -1, -1, -1, -1, -1, 84, -1, -1, 87, ! 88, -1, -1, 91, 92, -1, -1, 95, 96, -1, ! 46, 47, -1, -1, -1, 51, 104, 105, 106, 107, ! -1, -1, 110, 111, 60, -1, -1, -1, -1, -1, ! 66, 1, -1, 3, 4, -1, -1, 73, -1, -1, ! -1, 77, -1, -1, -1, -1, -1, -1, 84, -1, ! -1, 87, 88, -1, -1, 91, 92, -1, -1, 95, ! -1, -1, -1, -1, -1, 101, -1, -1, 104, 105, ! 106, 107, -1, -1, 110, 111, 46, 47, -1, -1, ! -1, 51, -1, 1, -1, 3, 4, -1, -1, -1, ! 60, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, -1, -1, ! -1, -1, -1, -1, 84, -1, -1, 87, 88, -1, ! -1, 91, 92, -1, -1, 95, -1, -1, 46, 47, ! 100, -1, -1, 51, 104, 105, 106, 107, -1, -1, ! 110, 111, 60, -1, -1, -1, -1, -1, 66, 1, ! -1, 3, 4, -1, -1, 73, -1, -1, -1, 77, ! -1, -1, -1, -1, -1, -1, 84, -1, -1, 87, ! 88, -1, -1, 91, 92, -1, -1, 95, 96, -1, ! -1, -1, -1, -1, -1, -1, 104, 105, 106, 107, ! -1, -1, 110, 111, 46, 47, -1, -1, -1, 51, ! -1, 1, -1, 3, 4, -1, -1, -1, 60, -1, ! -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, ! -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, ! -1, -1, 84, -1, -1, 87, 88, -1, -1, 91, ! 92, -1, -1, 95, 96, -1, 46, 47, -1, -1, ! -1, 51, 104, 105, 106, 107, -1, -1, 110, 111, ! 60, -1, -1, -1, -1, -1, 66, 1, -1, 3, ! 4, -1, -1, 73, -1, -1, -1, 77, -1, -1, ! -1, -1, -1, -1, 84, -1, -1, 87, 88, -1, ! -1, 91, 92, -1, -1, 95, 96, -1, -1, -1, ! -1, -1, -1, -1, 104, 105, 106, 107, -1, -1, ! 110, 111, 46, 47, -1, -1, -1, 51, -1, 1, ! -1, 3, 4, -1, -1, -1, 60, -1, -1, -1, ! -1, -1, 66, -1, -1, -1, -1, -1, -1, 73, ! -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, ! 84, -1, -1, 87, 88, -1, -1, 91, 92, -1, ! -1, 95, 96, -1, 46, 47, -1, -1, -1, 51, ! 104, 105, 106, 107, -1, -1, 110, 111, 60, -1, ! -1, -1, -1, -1, 66, 1, -1, 3, 4, -1, ! -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, ! -1, -1, 84, -1, -1, 87, 88, -1, -1, 91, ! 92, -1, -1, 95, -1, -1, -1, -1, -1, 101, ! -1, -1, 104, 105, 106, 107, -1, -1, 110, 111, ! 46, 47, -1, -1, -1, 51, -1, 1, -1, 3, ! 4, -1, -1, -1, 60, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, ! -1, 77, -1, -1, -1, -1, -1, -1, 84, -1, ! -1, 87, 88, -1, -1, 91, 92, -1, -1, 95, ! -1, -1, 46, 47, -1, -1, -1, 51, 104, 105, ! 106, 107, -1, -1, 110, 111, 60, -1, -1, -1, ! -1, -1, 66, 1, -1, 3, 4, -1, -1, 73, ! -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, ! 84, -1, -1, 87, 88, -1, -1, 91, 92, -1, ! -1, 95, -1, -1, -1, -1, -1, -1, -1, -1, ! 104, 105, 106, 107, -1, -1, 110, 111, 46, 47, ! -1, -1, -1, 51, -1, 1, -1, 3, 4, -1, ! -1, -1, 60, -1, -1, -1, -1, -1, 66, -1, ! -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, ! -1, -1, -1, -1, -1, -1, 84, -1, -1, 87, ! 88, -1, -1, 91, 92, -1, -1, 95, -1, -1, ! 46, 47, -1, -1, -1, 51, 104, 105, 106, 107, ! -1, -1, 110, 111, 60, -1, -1, -1, -1, -1, ! 66, 1, -1, 3, 4, -1, -1, 73, -1, -1, ! -1, 77, -1, -1, -1, -1, -1, -1, 84, -1, ! -1, 87, 88, -1, -1, 91, 92, -1, -1, 95, ! -1, -1, -1, -1, -1, -1, -1, -1, 104, 105, ! 106, 107, -1, -1, 110, 111, 46, 47, -1, -1, ! -1, 51, -1, 1, -1, 3, 4, -1, -1, -1, ! 60, -1, -1, -1, -1, -1, 66, -1, -1, -1, ! -1, -1, -1, 73, -1, -1, -1, 77, -1, -1, ! -1, -1, -1, -1, 84, -1, -1, 87, 88, -1, ! -1, 91, 92, -1, -1, 95, -1, -1, 46, 47, ! -1, -1, -1, 51, 104, 105, 106, 107, -1, -1, ! 110, 111, 60, -1, -1, -1, -1, -1, 66, 1, ! -1, 3, 4, -1, -1, 73, -1, -1, -1, 77, ! -1, -1, -1, -1, -1, -1, 84, -1, -1, 87, ! 88, -1, -1, 91, 92, -1, -1, 95, -1, -1, ! -1, -1, -1, -1, -1, -1, 104, 105, 106, 107, ! -1, -1, 110, 111, 46, 47, -1, -1, -1, 51, ! -1, 1, -1, 3, 4, -1, -1, -1, 60, -1, ! -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, ! -1, -1, 84, -1, -1, 87, 88, -1, -1, 91, ! 92, -1, -1, 95, -1, -1, 46, 47, -1, -1, ! -1, 51, 104, 105, 106, 107, -1, -1, 110, 111, ! 60, -1, -1, -1, -1, -1, 66, 1, -1, 3, ! 4, -1, -1, 73, -1, -1, -1, 77, -1, -1, ! -1, -1, -1, -1, 84, -1, -1, 87, 88, -1, ! -1, 91, 92, -1, -1, 95, -1, -1, -1, -1, ! -1, -1, -1, -1, 104, 105, 106, 107, -1, -1, ! 110, 111, 46, 47, -1, -1, -1, 51, -1, 1, ! -1, 3, 4, -1, -1, -1, 60, -1, -1, -1, ! -1, -1, 66, -1, -1, -1, -1, -1, -1, 73, ! -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, ! 84, -1, -1, 87, 88, -1, -1, 91, 92, -1, ! -1, 95, -1, -1, 46, 47, -1, -1, -1, 51, ! 104, 105, 106, 107, -1, -1, 110, 111, 60, -1, ! -1, -1, -1, -1, 66, 1, -1, 3, 4, -1, ! -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, ! -1, -1, 84, -1, -1, 87, 88, -1, -1, 91, ! 92, -1, -1, 95, -1, -1, -1, -1, -1, -1, ! -1, -1, 104, 105, 106, 107, -1, -1, 110, 111, ! 46, 47, -1, -1, -1, 51, -1, 1, -1, 3, ! 4, -1, -1, -1, 60, -1, -1, -1, -1, -1, ! 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, ! -1, 77, -1, -1, -1, -1, -1, -1, 84, -1, ! -1, 87, 88, -1, -1, 91, 92, -1, -1, 95, ! -1, -1, 46, 47, -1, -1, -1, 51, 104, 105, ! 106, 107, -1, -1, 110, 111, 60, -1, -1, -1, ! -1, -1, 66, 1, -1, 3, 4, -1, -1, 73, ! -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, ! 84, -1, -1, 87, 88, -1, -1, 91, 92, -1, ! -1, 95, -1, -1, -1, -1, -1, -1, -1, -1, ! 104, 105, 106, 107, -1, -1, 110, 111, 46, 47, ! -1, -1, -1, 51, -1, 1, -1, 3, 4, -1, ! -1, -1, 60, -1, -1, -1, -1, -1, 66, -1, ! -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, ! -1, -1, -1, -1, -1, -1, 84, -1, -1, 87, ! 88, -1, -1, 91, 92, -1, -1, 95, -1, -1, ! 46, 47, -1, -1, -1, 51, 104, 105, 106, 107, ! -1, -1, 110, 111, 60, -1, -1, -1, -1, -1, ! 66, 1, -1, 3, 4, -1, -1, 73, -1, -1, ! -1, 77, -1, -1, -1, -1, -1, -1, 84, -1, ! -1, 87, 88, -1, -1, 91, 92, -1, -1, 95, ! -1, -1, -1, -1, -1, -1, -1, -1, 104, 105, ! 106, 107, -1, -1, 110, 111, 46, 47, -1, -1, ! -1, 51, -1, 1, -1, 3, 4, -1, -1, -1, ! 60, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, -1, -1, ! -1, -1, -1, -1, 84, -1, -1, 87, 88, -1, ! -1, 91, 92, -1, -1, 95, -1, -1, 46, 47, ! -1, -1, -1, 51, 104, 105, 106, 107, -1, -1, ! 110, 111, 60, -1, -1, -1, -1, -1, 66, 1, ! -1, 3, 4, -1, -1, 73, -1, -1, -1, 77, ! -1, -1, -1, -1, -1, -1, 84, -1, -1, 87, ! 88, -1, -1, 91, 92, -1, -1, 95, -1, -1, ! -1, -1, -1, -1, -1, -1, 104, 105, 106, 107, ! -1, -1, 110, 111, 46, 47, -1, -1, -1, 51, ! -1, 1, -1, 3, 4, -1, -1, -1, 60, -1, ! -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, ! -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, ! -1, -1, 84, -1, -1, 87, 88, -1, -1, 91, ! 92, -1, -1, 95, -1, -1, 46, 47, -1, -1, ! -1, 51, 104, 105, 106, 107, -1, -1, 110, 111, ! 60, -1, -1, -1, -1, -1, 66, 1, -1, 3, ! 4, -1, -1, 73, -1, -1, -1, 77, -1, -1, ! -1, -1, -1, -1, 84, -1, -1, 87, 88, -1, ! -1, 91, 92, -1, -1, 95, -1, -1, -1, -1, ! -1, -1, -1, -1, 104, 105, 106, 107, -1, -1, ! 110, 111, 46, 47, -1, -1, -1, 51, -1, 1, ! -1, 3, 4, -1, -1, -1, 60, -1, -1, -1, ! -1, -1, 66, -1, -1, -1, -1, -1, -1, 73, ! -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, ! 84, -1, -1, 87, 88, -1, -1, 91, 92, -1, ! -1, 95, -1, -1, 46, 47, -1, -1, -1, 51, ! 104, 105, 106, 107, -1, -1, 110, 111, 60, -1, ! -1, -1, -1, -1, 66, 1, -1, 3, 4, -1, ! -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, ! -1, -1, 84, -1, -1, 87, 88, -1, -1, 91, ! 92, -1, -1, 95, -1, -1, -1, -1, -1, -1, ! -1, -1, 104, 105, 106, 107, -1, -1, 110, 111, ! 46, 47, -1, -1, -1, 51, -1, 1, -1, 3, ! 4, -1, -1, -1, 60, -1, -1, -1, -1, -1, ! 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, ! -1, 77, -1, -1, -1, -1, -1, -1, 84, -1, ! -1, 87, 88, -1, -1, 91, 92, -1, -1, 95, ! -1, -1, 46, 47, -1, -1, -1, 51, 104, 105, ! 106, 107, -1, -1, 110, 111, 60, -1, -1, -1, ! -1, -1, 66, 1, -1, 3, 4, -1, -1, 73, ! -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, ! 84, -1, -1, 87, 88, -1, -1, 91, 92, -1, ! -1, 95, -1, -1, -1, -1, -1, -1, -1, -1, ! 104, 105, 106, 107, -1, -1, 110, 111, 46, 47, ! -1, -1, -1, 51, -1, 1, -1, 3, 4, -1, ! -1, -1, 60, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, ! -1, -1, -1, -1, -1, -1, 84, -1, -1, 87, ! 88, -1, -1, 91, 92, -1, -1, 95, -1, -1, ! 46, 47, -1, -1, -1, 51, 104, 105, 106, 107, ! -1, -1, 110, 111, 60, -1, -1, -1, -1, -1, ! 66, 1, -1, 3, 4, -1, -1, 73, -1, -1, ! -1, 77, -1, -1, -1, -1, -1, -1, 84, -1, ! -1, 87, 88, -1, -1, 91, 92, -1, -1, 95, ! -1, -1, -1, -1, -1, -1, -1, -1, 104, 105, ! 106, 107, -1, -1, 110, 111, 46, 47, -1, -1, ! -1, 51, -1, 1, -1, 3, 4, -1, -1, -1, ! 60, -1, -1, -1, -1, -1, 66, -1, -1, -1, ! -1, -1, -1, 73, -1, -1, -1, 77, -1, -1, ! -1, -1, -1, -1, 84, -1, -1, 87, 88, -1, ! -1, 91, 92, -1, -1, 95, -1, -1, 46, 47, ! -1, -1, -1, 51, 104, 105, 106, 107, -1, -1, ! 110, 111, 60, -1, -1, -1, -1, -1, 66, 1, ! -1, 3, 4, -1, -1, 73, -1, -1, -1, 77, ! -1, -1, -1, -1, -1, -1, 84, -1, -1, 87, ! 88, -1, -1, 91, 92, -1, -1, 95, -1, -1, ! -1, -1, -1, -1, -1, -1, 104, 105, 106, 107, ! -1, -1, 110, 111, 46, 47, -1, -1, -1, 51, ! -1, 1, -1, 3, 4, -1, -1, -1, 60, -1, ! -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, ! -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, ! -1, -1, 84, -1, -1, 87, 88, -1, -1, 91, ! 92, -1, -1, 95, -1, -1, 46, 47, -1, -1, ! -1, 51, 104, 105, 106, 107, -1, -1, 110, 111, ! 60, -1, -1, -1, -1, -1, 66, 1, -1, 3, ! 4, -1, -1, 73, -1, -1, -1, 77, -1, -1, ! -1, -1, -1, -1, 84, -1, -1, 87, 88, -1, ! -1, 91, 92, -1, -1, 95, -1, -1, -1, -1, ! -1, -1, -1, -1, 104, 105, 106, 107, -1, -1, ! 110, 111, 46, 47, -1, -1, -1, 51, -1, 1, ! -1, 3, 4, -1, -1, -1, 60, -1, -1, -1, ! -1, -1, 66, -1, -1, -1, -1, -1, -1, 73, ! -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, ! 84, -1, -1, 87, 88, -1, -1, 91, 92, -1, ! -1, 95, -1, -1, 46, 47, -1, -1, -1, 51, ! 104, 105, 106, 107, -1, -1, 110, 111, 60, -1, ! -1, -1, -1, -1, 66, 1, -1, 3, 4, -1, ! -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, ! -1, -1, 84, -1, -1, 87, 88, -1, -1, 91, ! 92, -1, -1, 95, -1, -1, -1, -1, -1, -1, ! -1, -1, 104, 105, 106, 107, -1, -1, 110, 111, ! 46, 47, -1, -1, -1, 51, -1, 1, -1, 3, ! 4, -1, -1, -1, 60, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, ! -1, 77, -1, -1, -1, -1, -1, -1, 84, -1, ! -1, 87, 88, -1, -1, 91, 92, -1, -1, 95, ! -1, -1, 46, 47, -1, -1, -1, 51, 104, 105, ! 106, 107, -1, -1, 110, 111, 60, -1, -1, -1, ! -1, -1, 66, 1, -1, 3, 4, -1, -1, 73, ! -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, ! 84, -1, -1, 87, 88, -1, -1, 91, 92, -1, ! -1, 95, -1, -1, -1, -1, -1, -1, -1, -1, ! 104, 105, 106, 107, -1, -1, 110, 111, 46, 47, ! -1, -1, -1, 51, -1, 1, -1, 3, 4, -1, ! -1, -1, 60, -1, -1, -1, -1, -1, 66, -1, ! -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, ! -1, -1, -1, -1, -1, -1, 84, -1, -1, 87, ! 88, -1, -1, 91, 92, -1, -1, 95, -1, -1, ! 46, 47, -1, -1, -1, 51, 104, 105, 106, 107, ! -1, -1, 110, 111, 60, -1, -1, -1, -1, -1, ! 66, 1, -1, 3, 4, -1, -1, 73, -1, -1, ! -1, 77, -1, -1, -1, -1, -1, -1, 84, -1, ! -1, 87, 88, -1, -1, 91, 92, -1, -1, 95, ! -1, -1, -1, -1, -1, -1, -1, -1, 104, 105, ! 106, 107, -1, -1, 110, 111, 46, 47, -1, -1, ! -1, 51, -1, 1, -1, 3, 4, -1, -1, -1, ! 60, -1, -1, -1, -1, -1, 66, -1, -1, -1, ! -1, -1, -1, 73, -1, -1, -1, 77, -1, -1, ! -1, -1, -1, -1, 84, -1, -1, 87, 88, -1, ! -1, 91, 92, -1, -1, 95, -1, -1, 46, 47, ! -1, -1, -1, 51, 104, 105, 106, 107, -1, -1, ! 110, 111, 60, -1, -1, -1, -1, -1, 66, 1, ! -1, 3, 4, -1, -1, 73, -1, -1, -1, 77, ! -1, -1, -1, -1, -1, -1, 84, -1, -1, 87, ! 88, -1, -1, 91, 92, -1, -1, 95, -1, -1, ! -1, -1, -1, -1, -1, -1, 104, 105, 106, 107, ! -1, -1, 110, 111, 46, 47, -1, -1, -1, 51, ! -1, 1, -1, 3, 4, -1, -1, -1, 60, -1, ! -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, ! -1, -1, 84, -1, -1, 87, 88, -1, -1, 91, ! 92, -1, -1, 95, -1, -1, 46, 47, -1, -1, ! -1, 51, 104, 105, 106, 107, -1, -1, 110, 111, ! 60, -1, -1, 1, -1, 3, 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, -1, -1, ! -1, -1, -1, -1, 84, -1, -1, 87, 88, -1, ! -1, 91, 92, -1, -1, 95, -1, -1, -1, -1, ! -1, -1, -1, -1, 104, 105, 106, 107, 46, 47, ! 110, 111, -1, 51, -1, 1, -1, -1, -1, -1, ! -1, -1, 60, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, ! 1, -1, -1, -1, -1, -1, 84, -1, -1, 87, ! 88, -1, -1, 91, 92, -1, -1, 95, -1, 45, ! 46, 47, -1, -1, -1, 51, 104, 105, 106, 107, ! -1, -1, 110, 111, 60, -1, -1, -1, -1, -1, ! 66, -1, -1, 1, -1, 46, 47, 73, -1, -1, ! 51, 77, -1, -1, -1, -1, -1, -1, 84, 60, ! -1, 87, 88, -1, -1, 66, -1, -1, 1, 95, ! -1, -1, 73, -1, -1, 101, 77, -1, 104, 105, ! 106, 107, -1, 84, 110, 111, 87, 88, 46, 47, ! -1, -1, -1, 51, 95, 96, -1, -1, -1, -1, ! -1, -1, 60, 104, 105, 106, 107, -1, 66, 110, ! 111, -1, -1, 46, 47, 73, -1, -1, 51, 77, ! -1, -1, 3, 4, -1, -1, 84, 60, -1, 87, ! 88, -1, -1, 66, -1, -1, -1, 95, 96, -1, ! 73, -1, -1, -1, 77, -1, 104, 105, 106, 107, ! -1, 84, 110, 111, 87, 88, -1, -1, -1, -1, ! -1, -1, 95, -1, -1, 46, 47, -1, -1, -1, ! 51, 104, 105, 106, 107, -1, -1, 110, 111, 60, ! -1, -1, -1, -1, -1, 66, -1, -1, 3, 4, ! -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, ! -1, -1, -1, 84, -1, -1, 87, 88, -1, -1, ! 91, 92, -1, -1, 95, -1, 97, 98, -1, -1, ! -1, 102, -1, 104, 105, 106, 107, -1, -1, 110, ! 111, 46, 47, -1, -1, -1, 51, -1, -1, -1, ! 3, 4, -1, -1, -1, 60, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, 73, -1, ! -1, -1, 77, -1, -1, -1, -1, -1, -1, 84, ! -1, -1, 87, 88, -1, -1, 91, 92, -1, -1, ! 95, 96, -1, 46, 47, -1, -1, -1, 51, 104, ! 105, 106, 107, -1, -1, 110, 111, 60, -1, -1, ! -1, -1, -1, 66, -1, -1, 3, 4, -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, -1, ! -1, 84, -1, -1, 87, 88, -1, -1, 91, 92, ! -1, -1, 95, 96, -1, -1, -1, -1, -1, -1, ! -1, 104, 105, 106, 107, -1, -1, 110, 111, 46, ! 47, -1, -1, -1, 51, -1, -1, -1, 3, 4, -1, -1, -1, 60, -1, -1, -1, -1, -1, 66, ! -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, ! 77, -1, -1, -1, -1, -1, -1, 84, -1, -1, ! 87, 88, -1, -1, 91, 92, -1, -1, 95, 96, ! -1, 46, 47, -1, -1, -1, 51, 104, 105, 106, ! 107, -1, -1, 110, 111, 60, -1, -1, -1, -1, ! -1, 66, -1, -1, 3, 4, -1, -1, 73, -1, ! -1, -1, 77, -1, -1, -1, -1, -1, -1, 84, ! -1, -1, 87, 88, -1, -1, 91, 92, -1, -1, ! 95, 96, -1, -1, -1, -1, -1, -1, -1, 104, ! 105, 106, 107, -1, -1, 110, 111, 46, 47, -1, ! -1, -1, 51, -1, -1, -1, -1, -1, -1, -1, -1, 60, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, -1, ! -1, -1, -1, -1, -1, 84, -1, -1, 87, 88, ! -1, -1, 91, 92, -1, -1, 95, -1, 45, 46, ! 47, -1, -1, -1, 51, 104, 105, 106, 107, -1, ! -1, 110, 111, 60, -1, -1, -1, -1, -1, 66, ! -1, -1, -1, -1, -1, -1, 73, -1, -1, 51, ! 77, -1, -1, -1, -1, -1, -1, 84, 60, -1, ! 87, 88, -1, -1, 66, -1, -1, -1, 95, -1, ! -1, 73, -1, -1, -1, 77, -1, 104, 105, 106, ! 107, -1, 84, 110, 111, 87, 88, -1, -1, 91, ! 92, -1, -1, 95, -1, -1, -1, -1, -1, -1, ! -1, -1, 104, 105, 106, 107, -1, -1, 110, 111 }; + #define YYPURE 1 ! /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ ! #line 3 "/usr/share/bison/bison.simple" ! ! /* Skeleton output parser for bison, ! ! Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software ! Foundation, Inc. ! ! This program is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. ! ! This program is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! GNU General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with this program; if not, write to the Free Software ! Foundation, Inc., 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ ! ! /* As a special exception, when this file is copied by Bison into a ! Bison output file, you may use that output file without restriction. ! This special exception was added by the Free Software Foundation ! in version 1.24 of Bison. */ ! ! /* This is the parser code that is written into each bison parser when ! the %semantic_parser declaration is not specified in the grammar. ! It was written by Richard Stallman by simplifying the hairy parser ! used when %semantic_parser is specified. */ ! ! /* All symbols defined below should begin with yy or YY, to avoid ! infringing on user name space. This should be done even for local ! variables, as they might otherwise be expanded by user macros. ! There are some unavoidable exceptions within include files to ! define necessary library symbols; they are noted "INFRINGES ON ! USER NAME SPACE" below. */ ! ! #if ! defined (yyoverflow) || defined (YYERROR_VERBOSE) ! ! /* The parser invokes alloca or malloc; define the necessary symbols. */ ! ! # if YYSTACK_USE_ALLOCA ! # define YYSTACK_ALLOC alloca ! # else ! # ifndef YYSTACK_USE_ALLOCA ! # if defined (alloca) || defined (_ALLOCA_H) ! # define YYSTACK_ALLOC alloca ! # else ! # ifdef __GNUC__ ! # define YYSTACK_ALLOC __builtin_alloca ! # endif ! # endif ! # endif ! # endif ! ! # ifdef YYSTACK_ALLOC ! /* Pacify GCC's `empty if-body' warning. */ ! # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) ! # else ! # if defined (__STDC__) || defined (__cplusplus) ! # include /* INFRINGES ON USER NAME SPACE */ ! # define YYSIZE_T size_t ! # endif ! # define YYSTACK_ALLOC malloc ! # define YYSTACK_FREE free ! # endif ! #endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */ ! ! ! #if (! defined (yyoverflow) \ ! && (! defined (__cplusplus) \ ! || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) ! ! /* A type that is properly aligned for any stack member. */ ! union yyalloc { ! short yyss; ! YYSTYPE yyvs; ! # if YYLSP_NEEDED ! YYLTYPE yyls; ! # endif }; + /* The size of the maximum gap between one aligned stack and the next. */ + # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1) + + /* The size of an array large to enough to hold all stacks, each with + N elements. */ + # if YYLSP_NEEDED + # define YYSTACK_BYTES(N) \ + ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ + + 2 * YYSTACK_GAP_MAX) + # else + # define YYSTACK_BYTES(N) \ + ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAX) + # endif + + /* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ + # ifndef YYCOPY + # if 1 < __GNUC__ + # define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) + # else + # define YYCOPY(To, From, Count) \ + do \ + { \ + register YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (0) + # endif + # endif + + /* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ + # define YYSTACK_RELOCATE(Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack, Stack, yysize); \ + Stack = &yyptr->Stack; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) + + #endif + + #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) # define YYSIZE_T __SIZE_TYPE__ #endif *************** static const unsigned short yystos[] = *** 2814,2847 **** #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) ! #define YYEMPTY (-2) #define YYEOF 0 - #define YYACCEPT goto yyacceptlab ! #define YYABORT goto yyabortlab #define YYERROR goto yyerrlab1 - /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ - #define YYFAIL goto yyerrlab - #define YYRECOVERING() (!!yyerrstatus) - #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ ! yytoken = YYTRANSLATE (yychar); \ YYPOPSTACK; \ goto yybackup; \ } \ else \ { \ ! yyerror ("syntax error: cannot back up");\ YYERROR; \ } \ while (0) --- 2612,2640 ---- #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) ! #define YYEMPTY -2 #define YYEOF 0 #define YYACCEPT goto yyacceptlab ! #define YYABORT goto yyabortlab #define YYERROR goto yyerrlab1 /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ #define YYFAIL goto yyerrlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ ! yychar1 = YYTRANSLATE (yychar); \ YYPOPSTACK; \ goto yybackup; \ } \ else \ { \ ! yyerror ("syntax error: cannot back up"); \ YYERROR; \ } \ while (0) *************** while (0) *** 2849,2872 **** #define YYTERROR 1 #define YYERRCODE 256 /* YYLLOC_DEFAULT -- Compute the default location (before the actions ! are run). */ #ifndef YYLLOC_DEFAULT ! # define YYLLOC_DEFAULT(Current, Rhs, N) \ ! Current.first_line = Rhs[1].first_line; \ ! Current.first_column = Rhs[1].first_column; \ ! Current.last_line = Rhs[N].last_line; \ ! Current.last_column = Rhs[N].last_column; #endif /* YYLEX -- calling `yylex' with the right arguments. */ ! #ifdef YYLEX_PARAM ! # define YYLEX yylex (&yylval, YYLEX_PARAM) ! #else ! # define YYLEX yylex (&yylval) ! #endif /* Enable debugging if requested. */ #if YYDEBUG --- 2642,2682 ---- #define YYTERROR 1 #define YYERRCODE 256 + /* YYLLOC_DEFAULT -- Compute the default location (before the actions ! are run). ! ! When YYLLOC_DEFAULT is run, CURRENT is set the location of the ! first token. By default, to implement support for ranges, extend ! its range to the last symbol. */ #ifndef YYLLOC_DEFAULT ! # define YYLLOC_DEFAULT(Current, Rhs, N) \ ! Current.last_line = Rhs[N].last_line; \ ! Current.last_column = Rhs[N].last_column; #endif + /* YYLEX -- calling `yylex' with the right arguments. */ ! #if YYPURE ! # if YYLSP_NEEDED ! # ifdef YYLEX_PARAM ! # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) ! # else ! # define YYLEX yylex (&yylval, &yylloc) ! # endif ! # else /* !YYLSP_NEEDED */ ! # ifdef YYLEX_PARAM ! # define YYLEX yylex (&yylval, YYLEX_PARAM) ! # else ! # define YYLEX yylex (&yylval) ! # endif ! # endif /* !YYLSP_NEEDED */ ! #else /* !YYPURE */ ! # define YYLEX yylex () ! #endif /* !YYPURE */ ! /* Enable debugging if requested. */ #if YYDEBUG *************** do { \ *** 2881,2973 **** if (yydebug) \ YYFPRINTF Args; \ } while (0) - - # define YYDSYMPRINT(Args) \ - do { \ - if (yydebug) \ - yysymprint Args; \ - } while (0) - - # define YYDSYMPRINTF(Title, Token, Value, Location) \ - do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yysymprint (stderr, \ - Token, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ - } while (0) - - /*------------------------------------------------------------------. - | yy_stack_print -- Print the state stack from its BOTTOM up to its | - | TOP (cinluded). | - `------------------------------------------------------------------*/ - - #if defined (__STDC__) || defined (__cplusplus) - static void - yy_stack_print (short *bottom, short *top) - #else - static void - yy_stack_print (bottom, top) - short *bottom; - short *top; - #endif - { - YYFPRINTF (stderr, "Stack now"); - for (/* Nothing. */; bottom <= top; ++bottom) - YYFPRINTF (stderr, " %d", *bottom); - YYFPRINTF (stderr, "\n"); - } - - # define YY_STACK_PRINT(Bottom, Top) \ - do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ - } while (0) - - - /*------------------------------------------------. - | Report that the YYRULE is going to be reduced. | - `------------------------------------------------*/ - - #if defined (__STDC__) || defined (__cplusplus) - static void - yy_reduce_print (int yyrule) - #else - static void - yy_reduce_print (yyrule) - int yyrule; - #endif - { - int yyi; - unsigned int yylineno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", - yyrule - 1, yylineno); - /* Print the symbols being reduced, and their result. */ - for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) - YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); - YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]); - } - - # define YY_REDUCE_PRINT(Rule) \ - do { \ - if (yydebug) \ - yy_reduce_print (Rule); \ - } while (0) - /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) - # define YYDSYMPRINT(Args) - # define YYDSYMPRINTF(Title, Token, Value, Location) - # define YY_STACK_PRINT(Bottom, Top) - # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ - /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 --- 2691,2703 ---- *************** int yydebug; *** 2987,2996 **** #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif - ! ! #if YYERROR_VERBOSE # ifndef yystrlen # if defined (__GLIBC__) && defined (_STRING_H) --- 2717,2724 ---- #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif ! #ifdef YYERROR_VERBOSE # ifndef yystrlen # if defined (__GLIBC__) && defined (_STRING_H) *************** yystpcpy (yydest, yysrc) *** 3040,3165 **** } # endif # endif - - #endif /* !YYERROR_VERBOSE */ - - - - #if YYDEBUG - /*--------------------------------. - | Print this symbol on YYOUTPUT. | - `--------------------------------*/ - - #if defined (__STDC__) || defined (__cplusplus) - static void - yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) - #else - static void - yysymprint (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE *yyvaluep; - #endif - { - /* Pacify ``unused variable'' warnings. */ - (void) yyvaluep; - - if (yytype < YYNTOKENS) - { - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - # ifdef YYPRINT - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); - # endif - } - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - - switch (yytype) - { - default: - break; - } - YYFPRINTF (yyoutput, ")"); - } - - #endif /* ! YYDEBUG */ - /*-----------------------------------------------. - | Release the memory associated to this symbol. | - `-----------------------------------------------*/ - - #if defined (__STDC__) || defined (__cplusplus) - static void - yydestruct (int yytype, YYSTYPE *yyvaluep) - #else - static void - yydestruct (yytype, yyvaluep) - int yytype; - YYSTYPE *yyvaluep; #endif - { - /* Pacify ``unused variable'' warnings. */ - (void) yyvaluep; - - switch (yytype) - { - - default: - break; - } - } ! /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM # if defined (__STDC__) || defined (__cplusplus) ! int yyparse (void *YYPARSE_PARAM); # else ! int yyparse (); # endif ! #else /* ! YYPARSE_PARAM */ ! #if defined (__STDC__) || defined (__cplusplus) int yyparse (void); ! #else ! int yyparse (); #endif - #endif /* ! YYPARSE_PARAM */ ! /*----------. ! | yyparse. | ! `----------*/ - #ifdef YYPARSE_PARAM - # if defined (__STDC__) || defined (__cplusplus) - int yyparse (void *YYPARSE_PARAM) - # else - int yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; - # endif - #else /* ! YYPARSE_PARAM */ - #if defined (__STDC__) || defined (__cplusplus) - int - yyparse (void) - #else int ! yyparse () ! ! #endif ! #endif { ! /* The lookahead symbol. */ ! int yychar; ! ! /* The semantic value of the lookahead symbol. */ ! YYSTYPE yylval; ! ! /* Number of syntax errors so far. */ ! int yynerrs; register int yystate; register int yyn; --- 2768,2845 ---- } # endif # endif #endif + #line 315 "/usr/share/bison/bison.simple" ! ! /* The user can define YYPARSE_PARAM as the name of an argument to be passed ! into yyparse. The argument should have type void *. ! It should actually point to an object. ! Grammar actions can access the variable by casting it ! to the proper pointer type. */ #ifdef YYPARSE_PARAM # if defined (__STDC__) || defined (__cplusplus) ! # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM ! # define YYPARSE_PARAM_DECL # else ! # define YYPARSE_PARAM_ARG YYPARSE_PARAM ! # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; # endif ! #else /* !YYPARSE_PARAM */ ! # define YYPARSE_PARAM_ARG ! # define YYPARSE_PARAM_DECL ! #endif /* !YYPARSE_PARAM */ ! ! /* Prevent warning if -Wstrict-prototypes. */ ! #ifdef __GNUC__ ! # ifdef YYPARSE_PARAM ! int yyparse (void *); ! # else int yyparse (void); ! # endif #endif + /* YY_DECL_VARIABLES -- depending whether we use a pure parser, + variables are global, or local to YYPARSE. */ + #define YY_DECL_NON_LSP_VARIABLES \ + /* The lookahead symbol. */ \ + int yychar; \ + \ + /* The semantic value of the lookahead symbol. */ \ + YYSTYPE yylval; \ + \ + /* Number of parse errors so far. */ \ + int yynerrs; + #if YYLSP_NEEDED + # define YY_DECL_VARIABLES \ + YY_DECL_NON_LSP_VARIABLES \ + \ + /* Location data for the lookahead symbol. */ \ + YYLTYPE yylloc; + #else + # define YY_DECL_VARIABLES \ + YY_DECL_NON_LSP_VARIABLES + #endif + /* If nonreentrant, generate the variables here. */ ! #if !YYPURE ! YY_DECL_VARIABLES ! #endif /* !YYPURE */ int ! yyparse (YYPARSE_PARAM_ARG) ! YYPARSE_PARAM_DECL { ! /* If reentrant, generate the variables here. */ ! #if YYPURE ! YY_DECL_VARIABLES ! #endif /* !YYPURE */ register int yystate; register int yyn; *************** int yynerrs; *** 3167,3173 **** /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* Lookahead token as an internal (translated) token number. */ ! int yytoken = 0; /* Three stacks and their tools: `yyss': related to states, --- 2847,2853 ---- /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* Lookahead token as an internal (translated) token number. */ ! int yychar1 = 0; /* Three stacks and their tools: `yyss': related to states, *************** int yynerrs; *** 3177,3183 **** Refer to the stacks thru separate pointers, to allow yyoverflow to reallocate them elsewhere. */ ! /* The state stack. */ short yyssa[YYINITDEPTH]; short *yyss = yyssa; register short *yyssp; --- 2857,2863 ---- Refer to the stacks thru separate pointers, to allow yyoverflow to reallocate them elsewhere. */ ! /* The state stack. */ short yyssa[YYINITDEPTH]; short *yyss = yyssa; register short *yyssp; *************** int yynerrs; *** 3187,3205 **** YYSTYPE *yyvs = yyvsa; register YYSTYPE *yyvsp; ! ! #define YYPOPSTACK (yyvsp--, yyssp--) YYSIZE_T yystacksize = YYINITDEPTH; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; ! /* When reducing, the number of symbols on the RHS of the reduced ! rule. */ int yylen; YYDPRINTF ((stderr, "Starting parse\n")); --- 2867,2897 ---- YYSTYPE *yyvs = yyvsa; register YYSTYPE *yyvsp; + #if YYLSP_NEEDED + /* The location stack. */ + YYLTYPE yylsa[YYINITDEPTH]; + YYLTYPE *yyls = yylsa; + YYLTYPE *yylsp; + #endif ! #if YYLSP_NEEDED ! # define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) ! #else ! # define YYPOPSTACK (yyvsp--, yyssp--) ! #endif YYSIZE_T yystacksize = YYINITDEPTH; + /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; ! #if YYLSP_NEEDED ! YYLTYPE yyloc; ! #endif /* When reducing, the number of symbols on the RHS of the reduced ! rule. */ int yylen; YYDPRINTF ((stderr, "Starting parse\n")); *************** int yynerrs; *** 3216,3222 **** yyssp = yyss; yyvsp = yyvs; ! goto yysetstate; /*------------------------------------------------------------. --- 2908,2916 ---- yyssp = yyss; yyvsp = yyvs; ! #if YYLSP_NEEDED ! yylsp = yyls; ! #endif goto yysetstate; /*------------------------------------------------------------. *************** int yynerrs; *** 3231,3237 **** yysetstate: *yyssp = yystate; ! if (yyss + yystacksize - 1 <= yyssp) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; --- 2925,2931 ---- yysetstate: *yyssp = yystate; ! if (yyssp >= yyss + yystacksize - 1) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; *************** int yynerrs; *** 3244,3260 **** YYSTYPE *yyvs1 = yyvs; short *yyss1 = yyss; - /* Each stack pointer address is followed by the size of the ! data in use in that stack, in bytes. This used to be a ! conditional around just the two extra args, but that might ! be undefined if yyoverflow is a macro. */ yyoverflow ("parser stack overflow", &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), ! &yystacksize); ! yyss = yyss1; yyvs = yyvs1; } --- 2938,2961 ---- YYSTYPE *yyvs1 = yyvs; short *yyss1 = yyss; /* Each stack pointer address is followed by the size of the ! data in use in that stack, in bytes. */ ! # if YYLSP_NEEDED ! YYLTYPE *yyls1 = yyls; ! /* This used to be a conditional around just the two extra args, ! but that might be undefined if yyoverflow is a macro. */ yyoverflow ("parser stack overflow", &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), ! &yyls1, yysize * sizeof (*yylsp), &yystacksize); ! yyls = yyls1; ! # else ! yyoverflow ("parser stack overflow", ! &yyss1, yysize * sizeof (*yyssp), ! &yyvs1, yysize * sizeof (*yyvsp), ! &yystacksize); ! # endif yyss = yyss1; yyvs = yyvs1; } *************** int yynerrs; *** 3263,3272 **** goto yyoverflowlab; # else /* Extend the stack our own way. */ ! if (YYMAXDEPTH <= yystacksize) goto yyoverflowlab; yystacksize *= 2; ! if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { --- 2964,2973 ---- goto yyoverflowlab; # else /* Extend the stack our own way. */ ! if (yystacksize >= YYMAXDEPTH) goto yyoverflowlab; yystacksize *= 2; ! if (yystacksize > YYMAXDEPTH) yystacksize = YYMAXDEPTH; { *************** int yynerrs; *** 3277,3284 **** goto yyoverflowlab; YYSTACK_RELOCATE (yyss); YYSTACK_RELOCATE (yyvs); ! ! # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } --- 2978,2987 ---- goto yyoverflowlab; YYSTACK_RELOCATE (yyss); YYSTACK_RELOCATE (yyvs); ! # if YYLSP_NEEDED ! YYSTACK_RELOCATE (yyls); ! # endif ! # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } *************** int yynerrs; *** 3287,3298 **** yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; ! YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); ! if (yyss + yystacksize - 1 <= yyssp) YYABORT; } --- 2990,3003 ---- yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; ! #if YYLSP_NEEDED ! yylsp = yyls + yysize - 1; ! #endif YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); ! if (yyssp >= yyss + yystacksize - 1) YYABORT; } *************** int yynerrs; *** 3300,3305 **** --- 3005,3011 ---- goto yybackup; + /*-----------. | yybackup. | `-----------*/ *************** yybackup: *** 3312,3366 **** /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; ! if (yyn == YYPACT_NINF) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ ! /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } ! if (yychar <= YYEOF) { ! yychar = yytoken = YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } else { ! yytoken = YYTRANSLATE (yychar); ! YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc); } ! /* If the proper action on seeing token YYTOKEN is to reduce or to ! detect an error, take that action. */ ! yyn += yytoken; ! if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; ! if (yyn <= 0) { ! if (yyn == 0 || yyn == YYTABLE_NINF) goto yyerrlab; yyn = -yyn; goto yyreduce; } if (yyn == YYFINAL) YYACCEPT; /* Shift the lookahead token. */ ! YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken])); /* Discard the token being shifted unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; *++yyvsp = yylval; ! /* Count tokens shifted since error; after three, turn off error status. */ --- 3018,3105 ---- /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; ! if (yyn == YYFLAG) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ ! /* yychar is either YYEMPTY or YYEOF ! or a valid token in external form. */ ! if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } ! /* Convert token to internal form (in yychar1) for indexing tables with */ ! ! if (yychar <= 0) /* This means end of input. */ { ! yychar1 = 0; ! yychar = YYEOF; /* Don't call YYLEX any more */ ! YYDPRINTF ((stderr, "Now at end of input.\n")); } else { ! yychar1 = YYTRANSLATE (yychar); ! ! #if YYDEBUG ! /* We have to keep this `#if YYDEBUG', since we use variables ! which are defined only if `YYDEBUG' is set. */ ! if (yydebug) ! { ! YYFPRINTF (stderr, "Next token is %d (%s", ! yychar, yytname[yychar1]); ! /* Give the individual parser a way to print the precise ! meaning of a token, for further debugging info. */ ! # ifdef YYPRINT ! YYPRINT (stderr, yychar, yylval); ! # endif ! YYFPRINTF (stderr, ")\n"); ! } ! #endif } ! yyn += yychar1; ! if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) goto yydefault; + yyn = yytable[yyn]; ! ! /* yyn is what to do for this token type in this state. ! Negative => reduce, -yyn is rule number. ! Positive => shift, yyn is new state. ! New state is final state => don't bother to shift, ! just return success. ! 0, or most negative number => error. */ ! ! if (yyn < 0) { ! if (yyn == YYFLAG) goto yyerrlab; yyn = -yyn; goto yyreduce; } + else if (yyn == 0) + goto yyerrlab; if (yyn == YYFINAL) YYACCEPT; /* Shift the lookahead token. */ ! YYDPRINTF ((stderr, "Shifting token %d (%s), ", ! yychar, yytname[yychar1])); /* Discard the token being shifted unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; *++yyvsp = yylval; ! #if YYLSP_NEEDED ! *++yylsp = yylloc; ! #endif /* Count tokens shifted since error; after three, turn off error status. */ *************** yyreduce: *** 3391,3507 **** /* If YYLEN is nonzero, implement the default value of the action: `$$ = $1'. ! Otherwise, the following line sets YYVAL to garbage. ! This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; ! YY_REDUCE_PRINT (yyn); ! switch (yyn) ! { ! case 2: ! #line 606 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" { /* Register static variables with the garbage collector. */ ! ggc_add_tree_root (&label_id, 1); ! ggc_add_tree_root (&wfl_string_buffer, 1); ! ggc_add_tree_root (&wfl_append, 1); ! ggc_add_tree_root (&wfl_to_string, 1); ! ggc_add_tree_root (&java_lang_id, 1); ! ggc_add_tree_root (&inst_id, 1); ! ggc_add_tree_root (&java_lang_cloneable, 1); ! ggc_add_tree_root (&java_io_serializable, 1); ! ggc_add_tree_root (¤t_static_block, 1); ! ggc_add_tree_root (&wpv_id, 1); ! ggc_add_tree_root (&package_list, 1); ! ggc_add_tree_root (¤t_this, 1); ! ggc_add_tree_root (¤tly_caught_type_list, 1); ! ggc_add_tree_root (&case_label_list, 1); ! ggc_add_root (&ctxp, 1, sizeof (struct parser_ctxt *), mark_parser_ctxt); ! ggc_add_root (&ctxp_for_generation, 1, sizeof (struct parser_ctxt *), mark_parser_ctxt); ! ;} ! break; ! ! case 3: ! #line 631 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {;} ! break; ! ! case 20: ! #line 675 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { int osb = pop_current_osb (ctxp); tree t = build_java_array_type ((yyvsp[-1].node), -1); while (--osb) t = build_unresolved_array_type (t); yyval.node = t; ! ;} ! break; ! ! case 21: ! #line 683 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { int osb = pop_current_osb (ctxp); tree t = yyvsp[-1].node; while (osb--) t = build_unresolved_array_type (t); yyval.node = t; ! ;} ! break; ! ! case 25: ! #line 704 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = make_qualified_name (yyvsp[-2].node, yyvsp[0].node, yyvsp[-1].operator.location); ;} ! break; ! ! case 27: ! #line 713 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyval.node = NULL;;} ! break; ! ! case 35: ! #line 725 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = NULL; ! ;} ! break; ! ! case 36: ! #line 729 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = NULL; ! ;} ! break; ! ! case 39: ! #line 741 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { ctxp->package = EXPR_WFL_NODE (yyvsp[-1].node); register_package (ctxp->package); ! ;} ! break; ! ! case 40: ! #line 746 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing name"); RECOVER;;} ! break; ! ! case 41: ! #line 748 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("';' expected"); RECOVER;;} ! break; ! ! case 44: ! #line 758 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { tree name = EXPR_WFL_NODE (yyvsp[-1].node), last_name; int i = IDENTIFIER_LENGTH (name)-1; const char *last = &IDENTIFIER_POINTER (name)[i]; --- 3130,3243 ---- /* If YYLEN is nonzero, implement the default value of the action: `$$ = $1'. ! Otherwise, the following line sets YYVAL to the semantic value of ! the lookahead token. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; + #if YYLSP_NEEDED + /* Similarly for the default location. Let the user run additional + commands if for instance locations are ranges. */ + yyloc = yylsp[1-yylen]; + YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); + #endif ! #if YYDEBUG ! /* We have to keep this `#if YYDEBUG', since we use variables which ! are defined only if `YYDEBUG' is set. */ ! if (yydebug) { + int yyi; + + YYFPRINTF (stderr, "Reducing via rule %d (line %d), ", + yyn, yyrline[yyn]); + + /* Print the symbols being reduced, and their result. */ + for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++) + YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); + YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]); + } + #endif + + switch (yyn) { + + case 1: + #line 606 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" + { /* Register static variables with the garbage collector. */ ! ggc_add_root (&ctxp, 1, sizeof (struct parser_ctxt *), mark_parser_ctxt); ! ggc_add_root (&ctxp_for_generation, 1, sizeof (struct parser_ctxt *), mark_parser_ctxt); ! ; ! break;} ! case 2: ! #line 617 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {; ! break;} ! case 19: ! #line 661 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { int osb = pop_current_osb (ctxp); tree t = build_java_array_type ((yyvsp[-1].node), -1); while (--osb) t = build_unresolved_array_type (t); yyval.node = t; ! ; ! break;} ! case 20: ! #line 669 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { int osb = pop_current_osb (ctxp); tree t = yyvsp[-1].node; while (osb--) t = build_unresolved_array_type (t); yyval.node = t; ! ; ! break;} ! case 24: ! #line 690 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = make_qualified_name (yyvsp[-2].node, yyvsp[0].node, yyvsp[-1].operator.location); ; ! break;} ! case 26: ! #line 699 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyval.node = NULL;; ! break;} ! case 34: ! #line 711 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = NULL; ! ; ! break;} ! case 35: ! #line 715 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = NULL; ! ; ! break;} ! case 38: ! #line 727 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { ctxp->package = EXPR_WFL_NODE (yyvsp[-1].node); register_package (ctxp->package); ! ; ! break;} ! case 39: ! #line 732 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing name"); RECOVER;; ! break;} ! case 40: ! #line 734 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("';' expected"); RECOVER;; ! break;} ! case 43: ! #line 744 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { tree name = EXPR_WFL_NODE (yyvsp[-1].node), last_name; int i = IDENTIFIER_LENGTH (name)-1; const char *last = &IDENTIFIER_POINTER (name)[i]; *************** yyreduce: *** 3518,3546 **** if (err && err != name) parse_error_context (yyvsp[-1].node, "Ambiguous class: `%s' and `%s'", ! IDENTIFIER_POINTER (name), IDENTIFIER_POINTER (err)); else REGISTER_IMPORT (yyvsp[-1].node, last_name); } else REGISTER_IMPORT (yyvsp[-1].node, last_name); ! ;} ! break; ! ! case 45: ! #line 784 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing name"); RECOVER;;} ! break; ! ! case 46: ! #line 786 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("';' expected"); RECOVER;;} ! break; ! ! case 47: ! #line 791 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { tree name = EXPR_WFL_NODE (yyvsp[-3].node); tree it; /* Search for duplicates. */ --- 3254,3279 ---- if (err && err != name) parse_error_context (yyvsp[-1].node, "Ambiguous class: `%s' and `%s'", ! IDENTIFIER_POINTER (name), IDENTIFIER_POINTER (err)); else REGISTER_IMPORT (yyvsp[-1].node, last_name); } else REGISTER_IMPORT (yyvsp[-1].node, last_name); ! ; ! break;} ! case 44: ! #line 770 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing name"); RECOVER;; ! break;} ! case 45: ! #line 772 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("';' expected"); RECOVER;; ! break;} ! case 46: ! #line 777 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { tree name = EXPR_WFL_NODE (yyvsp[-3].node); tree it; /* Search for duplicates. */ *************** yyreduce: *** 3552,4772 **** if (! it) { read_import_dir (yyvsp[-3].node); ! ctxp->import_demand_list = chainon (ctxp->import_demand_list, build_tree_list (yyvsp[-3].node, NULL_TREE)); } ! ;} ! break; ! ! case 48: ! #line 809 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("'*' expected"); RECOVER;;} ! break; ! ! case 49: ! #line 811 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("';' expected"); RECOVER;;} ! break; ! ! case 50: ! #line 816 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { end_class_declaration (0); ;} ! break; ! ! case 51: ! #line 818 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { end_class_declaration (0); ;} ! break; ! ! case 53: ! #line 821 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { YYERROR_NOW; yyerror ("Class or interface declaration expected"); ! ;} ! break; ! ! case 54: ! #line 832 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.value = (1 << yyvsp[0].value); ! ;} ! break; ! ! case 55: ! #line 836 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { int acc = (1 << yyvsp[0].value); if (yyval.value & acc) ! parse_error_context (ctxp->modifier_ctx [yyvsp[0].value], "Modifier `%s' declared twice", java_accstring_lookup (acc)); else { yyval.value |= acc; } ! ;} ! break; ! ! case 56: ! #line 852 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { create_class (yyvsp[-4].value, yyvsp[-2].node, yyvsp[-1].node, yyvsp[0].node); ;} ! break; ! ! case 57: ! #line 854 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {;;} ! break; ! ! case 58: ! #line 856 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { create_class (0, yyvsp[-2].node, yyvsp[-1].node, yyvsp[0].node); ;} ! break; ! ! case 59: ! #line 858 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {;;} ! break; ! ! case 60: ! #line 860 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing class name"); RECOVER;;} ! break; ! ! case 61: ! #line 862 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing class name"); RECOVER;;} ! break; ! ! case 62: ! #line 864 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { ! if (!ctxp->class_err) yyerror ("'{' expected"); DRECOVER(class1); ! ;} ! break; ! ! case 63: ! #line 869 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {if (!ctxp->class_err) yyerror ("'{' expected"); RECOVER;;} ! break; ! ! case 64: ! #line 873 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = NULL; ;} ! break; ! ! case 65: ! #line 875 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = yyvsp[0].node; ;} ! break; ! ! case 66: ! #line 877 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("'{' expected"); ctxp->class_err=1;;} ! break; ! ! case 67: ! #line 879 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing super class name"); ctxp->class_err=1;;} ! break; ! ! case 68: ! #line 883 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = NULL_TREE; ;} ! break; ! ! case 69: ! #line 885 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = yyvsp[0].node; ;} ! break; ! ! case 70: ! #line 887 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { ctxp->class_err=1; ! yyerror ("Missing interface name"); ! ;} ! break; ! ! case 71: ! #line 895 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { ctxp->interface_number = 1; yyval.node = build_tree_list (yyvsp[0].node, NULL_TREE); ! ;} ! break; ! ! case 72: ! #line 900 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { ctxp->interface_number++; yyval.node = chainon (yyvsp[-2].node, build_tree_list (yyvsp[0].node, NULL_TREE)); ! ;} ! break; ! ! case 73: ! #line 905 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing interface name"); RECOVER;;} ! break; ! ! case 74: ! #line 910 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { /* Store the location of the `}' when doing xrefs */ if (flag_emit_xref) ! DECL_END_SOURCE_LINE (GET_CPC ()) = EXPR_WFL_ADD_COL (yyvsp[0].operator.location, 1); yyval.node = GET_CPC (); ! ;} ! break; ! ! case 75: ! #line 918 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { /* Store the location of the `}' when doing xrefs */ if (flag_emit_xref) ! DECL_END_SOURCE_LINE (GET_CPC ()) = EXPR_WFL_ADD_COL (yyvsp[0].operator.location, 1); yyval.node = GET_CPC (); ! ;} ! break; ! ! case 81: ! #line 937 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { if (yyvsp[0].node != empty_stmt_node) { TREE_CHAIN (yyvsp[0].node) = CPC_INSTANCE_INITIALIZER_STMT (ctxp); SET_CPC_INSTANCE_INITIALIZER_STMT (ctxp, yyvsp[0].node); } ! ;} ! break; ! ! case 84: ! #line 950 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { end_class_declaration (1); ;} ! break; ! ! case 85: ! #line 952 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { end_class_declaration (1); ;} ! break; ! ! case 87: ! #line 959 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { register_fields (0, yyvsp[-2].node, yyvsp[-1].node); ;} ! break; ! ! case 88: ! #line 961 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { ! check_modifiers ("Illegal modifier `%s' for field declaration", yyvsp[-3].value, FIELD_MODIFIERS); check_modifiers_consistency (yyvsp[-3].value); register_fields (yyvsp[-3].value, yyvsp[-2].node, yyvsp[-1].node); ! ;} ! break; ! ! case 90: ! #line 974 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = chainon (yyvsp[-2].node, yyvsp[0].node); ;} ! break; ! ! case 91: ! #line 976 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;;} ! break; ! ! case 92: ! #line 981 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_tree_list (yyvsp[0].node, NULL_TREE); ;} ! break; ! ! case 93: ! #line 983 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { if (java_error_count) yyvsp[0].node = NULL_TREE; ! yyval.node = build_tree_list (yyvsp[-2].node, build_assignment (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node)); ! ;} ! break; ! ! case 94: ! #line 990 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyerror ("Missing variable initializer"); yyval.node = build_tree_list (yyvsp[-2].node, NULL_TREE); RECOVER; ! ;} ! break; ! ! case 95: ! #line 996 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyerror ("';' expected"); yyval.node = build_tree_list (yyvsp[-3].node, NULL_TREE); RECOVER; ! ;} ! break; ! ! case 97: ! #line 1006 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_unresolved_array_type (yyvsp[-2].node); ;} ! break; ! ! case 98: ! #line 1008 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Invalid declaration"); DRECOVER(vdi);;} ! break; ! ! case 99: ! #line 1010 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { ! tree node = java_lval.node; ! if (node && (TREE_CODE (node) == INTEGER_CST ! || TREE_CODE (node) == EXPR_WITH_FILE_LOCATION)) ! yyerror ("Can't specify array dimension in a declaration"); ! else ! yyerror ("']' expected"); DRECOVER(vdi); ! ;} ! break; ! ! case 100: ! #line 1020 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Unbalanced ']'"); DRECOVER(vdi);;} ! break; ! ! case 103: ! #line 1031 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { current_function_decl = yyvsp[0].node; if (current_function_decl && TREE_CODE (current_function_decl) == FUNCTION_DECL) source_start_java_method (current_function_decl); else current_function_decl = NULL_TREE; ! ;} ! break; ! ! case 104: ! #line 1040 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { finish_method_declaration (yyvsp[0].node); ;} ! break; ! ! case 105: ! #line 1042 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {YYNOT_TWICE yyerror ("'{' expected"); RECOVER;;} ! break; ! ! case 106: ! #line 1047 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = method_header (0, yyvsp[-2].node, yyvsp[-1].node, yyvsp[0].node); ;} ! break; ! ! case 107: ! #line 1049 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = method_header (0, void_type_node, yyvsp[-1].node, yyvsp[0].node); ;} ! break; ! ! case 108: ! #line 1051 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = method_header (yyvsp[-3].value, yyvsp[-2].node, yyvsp[-1].node, yyvsp[0].node); ;} ! break; ! ! case 109: ! #line 1053 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = method_header (yyvsp[-3].value, void_type_node, yyvsp[-1].node, yyvsp[0].node); ;} ! break; ! ! case 110: ! #line 1055 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyerror ("Invalid method declaration, method name required"); RECOVER; ! ;} ! break; ! ! case 111: ! #line 1060 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {RECOVER;;} ! break; ! ! case 112: ! #line 1062 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Identifier expected"); RECOVER;;} ! break; ! ! case 113: ! #line 1064 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Identifier expected"); RECOVER;;} ! break; ! ! case 114: ! #line 1066 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyerror ("Invalid method declaration, return type required"); RECOVER; ! ;} ! break; ! ! case 115: ! #line 1074 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { ctxp->formal_parameter_number = 0; yyval.node = method_declarator (yyvsp[-2].node, NULL_TREE); ! ;} ! break; ! ! case 116: ! #line 1079 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = method_declarator (yyvsp[-3].node, yyvsp[-1].node); ;} ! break; ! ! case 117: ! #line 1081 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { EXPR_WFL_LINECOL (wfl_operator) = yyvsp[-1].operator.location; ! TREE_PURPOSE (yyvsp[-2].node) = build_unresolved_array_type (TREE_PURPOSE (yyvsp[-2].node)); ! parse_warning_context ! (wfl_operator, "Discouraged form of returned type specification"); ! ;} ! break; ! ! case 118: ! #line 1090 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("')' expected"); DRECOVER(method_declarator);;} ! break; ! ! case 119: ! #line 1092 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("']' expected"); RECOVER;;} ! break; ! ! case 120: ! #line 1097 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { ctxp->formal_parameter_number = 1; ! ;} ! break; ! ! case 121: ! #line 1101 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { ctxp->formal_parameter_number += 1; yyval.node = chainon (yyvsp[-2].node, yyvsp[0].node); ! ;} ! break; ! ! case 122: ! #line 1106 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyerror ("Missing formal parameter term"); RECOVER; ;} ! break; ! ! case 123: ! #line 1111 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_tree_list (yyvsp[0].node, yyvsp[-1].node); ! ;} ! break; ! ! case 124: ! #line 1115 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_tree_list (yyvsp[0].node, yyvsp[-1].node); ARG_FINAL_P (yyval.node) = 1; ! ;} ! break; ! ! case 125: ! #line 1120 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyerror ("Missing identifier"); RECOVER; yyval.node = NULL_TREE; ! ;} ! break; ! ! case 126: ! #line 1125 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyerror ("Missing identifier"); RECOVER; yyval.node = NULL_TREE; ! ;} ! break; ! ! case 127: ! #line 1133 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { check_modifiers ("Illegal modifier `%s'. Only `final' was expected here", yyvsp[0].value, ACC_FINAL); if (yyvsp[0].value != ACC_FINAL) MODIFIER_WFL (FINAL_TK) = build_wfl_node (NULL_TREE); ! ;} ! break; ! ! case 128: ! #line 1142 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = NULL_TREE; ;} ! break; ! ! case 129: ! #line 1144 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = yyvsp[0].node; ;} ! break; ! ! case 130: ! #line 1146 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing class type term"); RECOVER;;} ! break; ! ! case 131: ! #line 1151 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_tree_list (yyvsp[0].node, yyvsp[0].node); ;} ! break; ! ! case 132: ! #line 1153 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = tree_cons (yyvsp[0].node, yyvsp[0].node, yyvsp[-2].node); ;} ! break; ! ! case 133: ! #line 1155 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing class type term"); RECOVER;;} ! break; ! ! case 135: ! #line 1160 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = NULL_TREE; ;} ! break; ! ! case 136: ! #line 1166 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { TREE_CHAIN (yyvsp[0].node) = CPC_STATIC_INITIALIZER_STMT (ctxp); SET_CPC_STATIC_INITIALIZER_STMT (ctxp, yyvsp[0].node); current_static_block = NULL_TREE; ! ;} ! break; ! ! case 137: ! #line 1175 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { check_modifiers ("Illegal modifier `%s' for static initializer", yyvsp[0].value, ACC_STATIC); /* Can't have a static initializer in an innerclass */ if (yyvsp[0].value | ACC_STATIC && GET_CPC_LIST () && !TOPLEVEL_CLASS_DECL_P (GET_CPC ())) ! parse_error_context (MODIFIER_WFL (STATIC_TK), "Can't define static initializer in class `%s'. Static initializer can only be defined in top-level classes", IDENTIFIER_POINTER (DECL_NAME (GET_CPC ()))); SOURCE_FRONTEND_DEBUG (("Modifiers: %d", yyvsp[0].value)); ! ;} ! break; ! ! case 138: ! #line 1191 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { current_function_decl = yyvsp[0].node; source_start_java_method (current_function_decl); ! ;} ! break; ! ! case 139: ! #line 1196 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { finish_method_declaration (yyvsp[0].node); ;} ! break; ! ! case 140: ! #line 1201 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = method_header (0, NULL_TREE, yyvsp[-1].node, yyvsp[0].node); ;} ! break; ! ! case 141: ! #line 1203 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = method_header (yyvsp[-2].value, NULL_TREE, yyvsp[-1].node, yyvsp[0].node); ;} ! break; ! ! case 142: ! #line 1208 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { ! ctxp->formal_parameter_number = 0; yyval.node = method_declarator (yyvsp[-2].node, NULL_TREE); ! ;} ! break; ! ! case 143: ! #line 1213 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = method_declarator (yyvsp[-3].node, yyvsp[-1].node); ;} ! break; ! ! case 144: ! #line 1221 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { BLOCK_EXPR_BODY (yyvsp[0].node) = empty_stmt_node; yyval.node = yyvsp[0].node; ! ;} ! break; ! ! case 145: ! #line 1226 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = yyvsp[0].node; ;} ! break; ! ! case 146: ! #line 1228 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = yyvsp[0].node; ;} ! break; ! ! case 147: ! #line 1230 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = yyvsp[0].node; ;} ! break; ! ! case 149: ! #line 1240 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { ! yyval.node = build_method_invocation (yyvsp[-3].node, NULL_TREE); yyval.node = build_debugable_stmt (EXPR_WFL_LINECOL (yyvsp[-3].node), yyval.node); yyval.node = java_method_add_stmt (current_function_decl, yyval.node); ! ;} ! break; ! ! case 150: ! #line 1246 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { ! yyval.node = build_method_invocation (yyvsp[-4].node, yyvsp[-2].node); yyval.node = build_debugable_stmt (EXPR_WFL_LINECOL (yyvsp[-4].node), yyval.node); yyval.node = java_method_add_stmt (current_function_decl, yyval.node); ! ;} ! break; ! ! case 151: ! #line 1254 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyval.node = parse_jdk1_1_error ("explicit constructor invocation"); ;} ! break; ! ! case 152: ! #line 1256 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyval.node = parse_jdk1_1_error ("explicit constructor invocation"); ;} ! break; ! ! case 153: ! #line 1261 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { tree wfl = build_wfl_node (this_identifier_node); EXPR_WFL_LINECOL (wfl) = yyvsp[0].operator.location; yyval.node = wfl; ! ;} ! break; ! ! case 154: ! #line 1267 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { tree wfl = build_wfl_node (super_identifier_node); EXPR_WFL_LINECOL (wfl) = yyvsp[0].operator.location; yyval.node = wfl; ! ;} ! break; ! ! case 155: ! #line 1278 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { create_interface (0, yyvsp[0].node, NULL_TREE); ;} ! break; ! ! case 156: ! #line 1280 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { ; ;} ! break; ! ! case 157: ! #line 1282 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { create_interface (yyvsp[-2].value, yyvsp[0].node, NULL_TREE); ;} ! break; ! ! case 158: ! #line 1284 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { ; ;} ! break; ! ! case 159: ! #line 1286 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { create_interface (0, yyvsp[-1].node, yyvsp[0].node); ;} ! break; ! ! case 160: ! #line 1288 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { ; ;} ! break; ! ! case 161: ! #line 1290 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { create_interface (yyvsp[-3].value, yyvsp[-1].node, yyvsp[0].node); ;} ! break; ! ! case 162: ! #line 1292 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { ; ;} ! break; ! ! case 163: ! #line 1294 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("'{' expected"); RECOVER;;} ! break; ! ! case 164: ! #line 1296 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("'{' expected"); RECOVER;;} ! break; ! ! case 165: ! #line 1301 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { ctxp->interface_number = 1; yyval.node = build_tree_list (yyvsp[0].node, NULL_TREE); ! ;} ! break; ! ! case 166: ! #line 1306 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { ctxp->interface_number++; yyval.node = chainon (yyvsp[-2].node, build_tree_list (yyvsp[0].node, NULL_TREE)); ! ;} ! break; ! ! case 167: ! #line 1311 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Invalid interface type"); RECOVER;;} ! break; ! ! case 168: ! #line 1313 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;;} ! break; ! ! case 169: ! #line 1318 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = NULL_TREE; ;} ! break; ! ! case 170: ! #line 1320 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = NULL_TREE; ;} ! break; ! ! case 175: ! #line 1332 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { end_class_declaration (1); ;} ! break; ! ! case 176: ! #line 1334 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { end_class_declaration (1); ;} ! break; ! ! case 178: ! #line 1343 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { check_abstract_method_header (yyvsp[-1].node); current_function_decl = NULL_TREE; /* FIXME ? */ ! ;} ! break; ! ! case 179: ! #line 1348 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("';' expected"); RECOVER;;} ! break; ! ! case 180: ! #line 1354 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_new_array_init (yyvsp[-1].operator.location, NULL_TREE); ;} ! break; ! ! case 181: ! #line 1356 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_new_array_init (yyvsp[-2].operator.location, NULL_TREE); ;} ! break; ! ! case 182: ! #line 1358 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_new_array_init (yyvsp[-2].operator.location, yyvsp[-1].node); ;} ! break; ! ! case 183: ! #line 1360 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_new_array_init (yyvsp[-3].operator.location, yyvsp[-2].node); ;} ! break; ! ! case 184: ! #line 1365 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { ! yyval.node = tree_cons (maybe_build_array_element_wfl (yyvsp[0].node), yyvsp[0].node, NULL_TREE); ! ;} ! break; ! ! case 185: ! #line 1370 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = tree_cons (maybe_build_array_element_wfl (yyvsp[0].node), yyvsp[0].node, yyvsp[-2].node); ! ;} ! break; ! ! case 186: ! #line 1374 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;;} ! break; ! ! case 187: ! #line 1380 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { /* Store the location of the `}' when doing xrefs */ if (current_function_decl && flag_emit_xref) ! DECL_END_SOURCE_LINE (current_function_decl) = EXPR_WFL_ADD_COL (yyvsp[0].operator.location, 1); ! yyval.node = empty_stmt_node; ! ;} ! break; ! ! case 188: ! #line 1388 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = yyvsp[0].node; ;} ! break; ! ! case 189: ! #line 1393 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { enter_block (); ;} ! break; ! ! case 190: ! #line 1398 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { maybe_absorb_scoping_blocks (); /* Store the location of the `}' when doing xrefs */ if (current_function_decl && flag_emit_xref) ! DECL_END_SOURCE_LINE (current_function_decl) = ! EXPR_WFL_ADD_COL (yyvsp[0].operator.location, 1); yyval.node = exit_block (); if (!BLOCK_SUBBLOCKS (yyval.node)) BLOCK_SUBBLOCKS (yyval.node) = empty_stmt_node; ! ;} ! break; ! ! case 194: ! #line 1418 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { java_method_add_stmt (current_function_decl, yyvsp[0].node); ;} ! break; ! ! case 195: ! #line 1420 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { LOCAL_CLASS_P (TREE_TYPE (GET_CPC ())) = 1; end_class_declaration (1); ! ;} ! break; ! ! case 197: ! #line 1432 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { declare_local_variables (0, yyvsp[-1].node, yyvsp[0].node); ;} ! break; ! ! case 198: ! #line 1434 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { declare_local_variables (yyvsp[-2].value, yyvsp[-1].node, yyvsp[0].node); ;} ! break; ! ! case 204: ! #line 1444 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = exit_block (); ;} ! break; ! ! case 209: ! #line 1453 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = exit_block (); ;} ! break; ! ! case 221: ! #line 1472 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { ! if (flag_extraneous_semicolon ! && ! current_static_block ! && (! current_function_decl || /* Verify we're not in a inner class declaration */ (GET_CPC () != TYPE_NAME (DECL_CONTEXT (current_function_decl))))) ! { EXPR_WFL_SET_LINECOL (wfl_operator, lineno, -1); parse_warning_context (wfl_operator, "An empty declaration is a deprecated feature that should not be used"); } yyval.node = empty_stmt_node; ! ;} ! break; ! ! case 222: ! #line 1490 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { ! yyval.node = build_labeled_block (EXPR_WFL_LINECOL (yyvsp[-1].node), EXPR_WFL_NODE (yyvsp[-1].node)); pushlevel (2); push_labeled_block (yyval.node); PUSH_LABELED_BLOCK (yyval.node); ! ;} ! break; ! ! case 223: ! #line 1501 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = finish_labeled_statement (yyvsp[-1].node, yyvsp[0].node); ;} ! break; ! ! case 224: ! #line 1503 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("':' expected"); RECOVER;;} ! break; ! ! case 225: ! #line 1508 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = finish_labeled_statement (yyvsp[-1].node, yyvsp[0].node); ;} ! break; ! ! case 226: ! #line 1515 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { /* We have a statement. Generate a WFL around it so we can debug it */ yyval.node = build_expr_wfl (yyvsp[-1].node, input_filename, lineno, 0); /* We know we have a statement, so set the debug info to be eventually generate here. */ yyval.node = JAVA_MAYBE_GENERATE_DEBUG_INFO (yyval.node); ! ;} ! break; ! ! case 227: ! #line 1524 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { YYNOT_TWICE yyerror ("Invalid expression statement"); DRECOVER (expr_stmt); ! ;} ! break; ! ! case 228: ! #line 1529 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { YYNOT_TWICE yyerror ("Invalid expression statement"); DRECOVER (expr_stmt); ! ;} ! break; ! ! case 229: ! #line 1534 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { YYNOT_TWICE yyerror ("Invalid expression statement"); DRECOVER (expr_stmt); ! ;} ! break; ! ! case 230: ! #line 1539 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("')' expected"); RECOVER;;} ! break; ! ! case 231: ! #line 1541 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { parse_ctor_invocation_error (); RECOVER; ! ;} ! break; ! ! case 232: ! #line 1546 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("')' expected"); RECOVER;;} ! break; ! ! case 233: ! #line 1548 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { parse_ctor_invocation_error (); RECOVER; ! ;} ! break; ! ! case 234: ! #line 1553 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("'(' expected"); RECOVER;;} ! break; ! ! case 235: ! #line 1555 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("')' expected"); RECOVER;;} ! break; ! ! case 236: ! #line 1557 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("')' expected"); RECOVER;;} ! break; ! ! case 237: ! #line 1559 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("';' expected"); RECOVER;;} ! break; ! ! case 238: ! #line 1561 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("';' expected"); RECOVER;;} ! break; ! ! case 246: ! #line 1576 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { ! yyval.node = build_if_else_statement (yyvsp[-3].operator.location, yyvsp[-2].node, yyvsp[0].node, NULL_TREE); ! ;} ! break; ! ! case 247: ! #line 1581 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("'(' expected"); RECOVER;;} ! break; ! ! case 248: ! #line 1583 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;;} ! break; ! ! case 249: ! #line 1585 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("')' expected"); RECOVER;;} ! break; ! ! case 250: ! #line 1590 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_if_else_statement (yyvsp[-5].operator.location, yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node); ;} ! break; ! ! case 251: ! #line 1595 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_if_else_statement (yyvsp[-5].operator.location, yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node); ;} ! break; ! ! case 252: ! #line 1600 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { enter_block (); ! ;} ! break; ! ! case 253: ! #line 1604 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { /* Make into "proper list" of COMPOUND_EXPRs. I.e. make the last statement also have its own COMPOUND_EXPR. */ maybe_absorb_scoping_blocks (); TREE_OPERAND (yyvsp[-2].node, 1) = exit_block (); yyval.node = build_debugable_stmt (EXPR_WFL_LINECOL (yyvsp[-2].node), yyvsp[-2].node); ! ;} ! break; ! ! case 254: ! #line 1616 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build (SWITCH_EXPR, NULL_TREE, yyvsp[-1].node, NULL_TREE); EXPR_WFL_LINECOL (yyval.node) = yyvsp[-2].operator.location; ! ;} ! break; ! ! case 255: ! #line 1621 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("'(' expected"); RECOVER;;} ! break; ! ! case 256: ! #line 1623 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term or ')'"); DRECOVER(switch_statement);;} ! break; ! ! case 257: ! #line 1625 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("'{' expected"); RECOVER;;} ! break; ! ! case 258: ! #line 1633 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = NULL_TREE; ;} ! break; ! ! case 259: ! #line 1635 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = NULL_TREE; ;} ! break; ! ! case 260: ! #line 1637 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = NULL_TREE; ;} ! break; ! ! case 261: ! #line 1639 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = NULL_TREE; ;} ! break; ! ! case 267: ! #line 1658 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { tree lab = build1 (CASE_EXPR, NULL_TREE, yyvsp[-1].node); EXPR_WFL_LINECOL (lab) = yyvsp[-2].operator.location; java_method_add_stmt (current_function_decl, lab); ! ;} ! break; ! ! case 268: ! #line 1664 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { tree lab = build (DEFAULT_EXPR, NULL_TREE, NULL_TREE); EXPR_WFL_LINECOL (lab) = yyvsp[-1].operator.location; java_method_add_stmt (current_function_decl, lab); ! ;} ! break; ! ! case 269: ! #line 1670 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing or invalid constant expression"); RECOVER;;} ! break; ! ! case 270: ! #line 1672 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("':' expected"); RECOVER;;} ! break; ! ! case 271: ! #line 1674 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("':' expected"); RECOVER;;} ! break; ! ! case 272: ! #line 1679 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { tree body = build_loop_body (yyvsp[-2].operator.location, yyvsp[-1].node, 0); yyval.node = build_new_loop (body); ! ;} ! break; ! ! case 273: ! #line 1687 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = finish_loop_body (0, NULL_TREE, yyvsp[0].node, 0); ;} ! break; ! ! case 274: ! #line 1689 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {YYERROR_NOW; yyerror ("'(' expected"); RECOVER;;} ! break; ! ! case 275: ! #line 1691 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term and ')' expected"); RECOVER;;} ! break; ! ! case 276: ! #line 1693 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("')' expected"); RECOVER;;} ! break; ! ! case 277: ! #line 1698 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = finish_loop_body (0, NULL_TREE, yyvsp[0].node, 0); ;} ! break; ! ! case 278: ! #line 1703 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { tree body = build_loop_body (0, NULL_TREE, 1); yyval.node = build_new_loop (body); ! ;} ! break; ! ! case 279: ! #line 1712 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = finish_loop_body (yyvsp[-3].operator.location, yyvsp[-2].node, yyvsp[-5].node, 1); ;} ! break; ! ! case 280: ! #line 1717 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { if (TREE_CODE_CLASS (TREE_CODE (yyvsp[-4].node)) == 'c') yyvsp[-4].node = build_wfl_node (yyvsp[-4].node); yyval.node = finish_for_loop (EXPR_WFL_LINECOL (yyvsp[-4].node), yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node); ! ;} ! break; ! ! case 281: ! #line 1723 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = finish_for_loop (0, NULL_TREE, yyvsp[-2].node, yyvsp[0].node); /* We have not condition, so we get rid of the EXIT_EXPR */ ! LOOP_EXPR_BODY_CONDITION_EXPR (LOOP_EXPR_BODY (yyval.node), 0) = empty_stmt_node; ! ;} ! break; ! ! case 282: ! #line 1730 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Invalid control expression"); RECOVER;;} ! break; ! ! case 283: ! #line 1732 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Invalid update expression"); RECOVER;;} ! break; ! ! case 284: ! #line 1734 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Invalid update expression"); RECOVER;;} ! break; ! ! case 285: ! #line 1739 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = finish_for_loop (EXPR_WFL_LINECOL (yyvsp[-4].node), yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node);;} ! break; ! ! case 286: ! #line 1741 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = finish_for_loop (0, NULL_TREE, yyvsp[-2].node, yyvsp[0].node); /* We have not condition, so we get rid of the EXIT_EXPR */ ! LOOP_EXPR_BODY_CONDITION_EXPR (LOOP_EXPR_BODY (yyval.node), 0) = empty_stmt_node; ! ;} ! break; ! ! case 287: ! #line 1751 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { /* This scope defined for local variable that may be defined within the scope of the for loop */ ! enter_block (); ! ;} ! break; ! ! case 288: ! #line 1757 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("'(' expected"); DRECOVER(for_1);;} ! break; ! ! case 289: ! #line 1759 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Invalid init statement"); RECOVER;;} ! break; ! ! case 290: ! #line 1764 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { /* We now declare the loop body. The loop is declared as a for loop. */ tree body = build_loop_body (0, NULL_TREE, 0); --- 3285,4322 ---- if (! it) { read_import_dir (yyvsp[-3].node); ! ctxp->import_demand_list = chainon (ctxp->import_demand_list, build_tree_list (yyvsp[-3].node, NULL_TREE)); } ! ; ! break;} ! case 47: ! #line 795 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("'*' expected"); RECOVER;; ! break;} ! case 48: ! #line 797 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("';' expected"); RECOVER;; ! break;} ! case 49: ! #line 802 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { end_class_declaration (0); ; ! break;} ! case 50: ! #line 804 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { end_class_declaration (0); ; ! break;} ! case 52: ! #line 807 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { YYERROR_NOW; yyerror ("Class or interface declaration expected"); ! ; ! break;} ! case 53: ! #line 818 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.value = (1 << yyvsp[0].value); ! ; ! break;} ! case 54: ! #line 822 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { int acc = (1 << yyvsp[0].value); if (yyval.value & acc) ! parse_error_context (ctxp->modifier_ctx [yyvsp[0].value], "Modifier `%s' declared twice", java_accstring_lookup (acc)); else { yyval.value |= acc; } ! ; ! break;} ! case 55: ! #line 838 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { create_class (yyvsp[-4].value, yyvsp[-2].node, yyvsp[-1].node, yyvsp[0].node); ; ! break;} ! case 56: ! #line 840 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {;; ! break;} ! case 57: ! #line 842 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { create_class (0, yyvsp[-2].node, yyvsp[-1].node, yyvsp[0].node); ; ! break;} ! case 58: ! #line 844 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {;; ! break;} ! case 59: ! #line 846 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyerror ("Missing class name"); RECOVER; ; ! break;} ! case 60: ! #line 848 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyerror ("Missing class name"); RECOVER; ; ! break;} ! case 61: ! #line 850 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { ! if (!ctxp->class_err) yyerror ("'{' expected"); DRECOVER(class1); ! ; ! break;} ! case 62: ! #line 855 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { if (!ctxp->class_err) yyerror ("'{' expected"); RECOVER; ; ! break;} ! case 63: ! #line 859 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = NULL; ; ! break;} ! case 64: ! #line 861 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = yyvsp[0].node; ; ! break;} ! case 65: ! #line 863 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("'{' expected"); ctxp->class_err=1;; ! break;} ! case 66: ! #line 865 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing super class name"); ctxp->class_err=1;; ! break;} ! case 67: ! #line 869 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = NULL_TREE; ; ! break;} ! case 68: ! #line 871 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = yyvsp[0].node; ; ! break;} ! case 69: ! #line 873 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { ctxp->class_err=1; ! yyerror ("Missing interface name"); ! ; ! break;} ! case 70: ! #line 881 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { ctxp->interface_number = 1; yyval.node = build_tree_list (yyvsp[0].node, NULL_TREE); ! ; ! break;} ! case 71: ! #line 886 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { ctxp->interface_number++; yyval.node = chainon (yyvsp[-2].node, build_tree_list (yyvsp[0].node, NULL_TREE)); ! ; ! break;} ! case 72: ! #line 891 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing interface name"); RECOVER;; ! break;} ! case 73: ! #line 896 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { /* Store the location of the `}' when doing xrefs */ if (flag_emit_xref) ! DECL_END_SOURCE_LINE (GET_CPC ()) = EXPR_WFL_ADD_COL (yyvsp[0].operator.location, 1); yyval.node = GET_CPC (); ! ; ! break;} ! case 74: ! #line 904 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { /* Store the location of the `}' when doing xrefs */ if (flag_emit_xref) ! DECL_END_SOURCE_LINE (GET_CPC ()) = EXPR_WFL_ADD_COL (yyvsp[0].operator.location, 1); yyval.node = GET_CPC (); ! ; ! break;} ! case 80: ! #line 923 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { if (yyvsp[0].node != empty_stmt_node) { TREE_CHAIN (yyvsp[0].node) = CPC_INSTANCE_INITIALIZER_STMT (ctxp); SET_CPC_INSTANCE_INITIALIZER_STMT (ctxp, yyvsp[0].node); } ! ; ! break;} ! case 83: ! #line 936 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { end_class_declaration (1); ; ! break;} ! case 84: ! #line 938 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { end_class_declaration (1); ; ! break;} ! case 86: ! #line 945 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { register_fields (0, yyvsp[-2].node, yyvsp[-1].node); ; ! break;} ! case 87: ! #line 947 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { ! check_modifiers ("Illegal modifier `%s' for field declaration", yyvsp[-3].value, FIELD_MODIFIERS); check_modifiers_consistency (yyvsp[-3].value); register_fields (yyvsp[-3].value, yyvsp[-2].node, yyvsp[-1].node); ! ; ! break;} ! case 89: ! #line 960 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = chainon (yyvsp[-2].node, yyvsp[0].node); ; ! break;} ! case 90: ! #line 962 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;; ! break;} ! case 91: ! #line 967 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_tree_list (yyvsp[0].node, NULL_TREE); ; ! break;} ! case 92: ! #line 969 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { if (java_error_count) yyvsp[0].node = NULL_TREE; ! yyval.node = build_tree_list (yyvsp[-2].node, build_assignment (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node)); ! ; ! break;} ! case 93: ! #line 976 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyerror ("Missing variable initializer"); yyval.node = build_tree_list (yyvsp[-2].node, NULL_TREE); RECOVER; ! ; ! break;} ! case 94: ! #line 982 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyerror ("';' expected"); yyval.node = build_tree_list (yyvsp[-3].node, NULL_TREE); RECOVER; ! ; ! break;} ! case 96: ! #line 992 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_unresolved_array_type (yyvsp[-2].node); ; ! break;} ! case 97: ! #line 994 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Invalid declaration"); DRECOVER(vdi);; ! break;} ! case 98: ! #line 996 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { ! yyerror ("']' expected"); DRECOVER(vdi); ! ; ! break;} ! case 99: ! #line 1001 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Unbalanced ']'"); DRECOVER(vdi);; ! break;} ! case 102: ! #line 1012 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { current_function_decl = yyvsp[0].node; if (current_function_decl && TREE_CODE (current_function_decl) == FUNCTION_DECL) source_start_java_method (current_function_decl); else current_function_decl = NULL_TREE; ! ; ! break;} ! case 103: ! #line 1021 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { finish_method_declaration (yyvsp[0].node); ; ! break;} ! case 104: ! #line 1023 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {YYNOT_TWICE yyerror ("'{' expected"); RECOVER;; ! break;} ! case 105: ! #line 1028 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = method_header (0, yyvsp[-2].node, yyvsp[-1].node, yyvsp[0].node); ; ! break;} ! case 106: ! #line 1030 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = method_header (0, void_type_node, yyvsp[-1].node, yyvsp[0].node); ; ! break;} ! case 107: ! #line 1032 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = method_header (yyvsp[-3].value, yyvsp[-2].node, yyvsp[-1].node, yyvsp[0].node); ; ! break;} ! case 108: ! #line 1034 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = method_header (yyvsp[-3].value, void_type_node, yyvsp[-1].node, yyvsp[0].node); ; ! break;} ! case 109: ! #line 1036 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyerror ("Invalid method declaration, method name required"); RECOVER; ! ; ! break;} ! case 110: ! #line 1041 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { ! yyerror ("Identifier expected"); ! RECOVER; ! ; ! break;} ! case 111: ! #line 1046 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { ! yyerror ("Identifier expected"); ! RECOVER; ! ; ! break;} ! case 112: ! #line 1051 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { ! yyerror ("Identifier expected"); ! RECOVER; ! ; ! break;} ! case 113: ! #line 1056 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyerror ("Invalid method declaration, return type required"); RECOVER; ! ; ! break;} ! case 114: ! #line 1064 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { ctxp->formal_parameter_number = 0; yyval.node = method_declarator (yyvsp[-2].node, NULL_TREE); ! ; ! break;} ! case 115: ! #line 1069 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = method_declarator (yyvsp[-3].node, yyvsp[-1].node); ; ! break;} ! case 116: ! #line 1071 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { EXPR_WFL_LINECOL (wfl_operator) = yyvsp[-1].operator.location; ! TREE_PURPOSE (yyvsp[-2].node) = build_unresolved_array_type (TREE_PURPOSE (yyvsp[-2].node)); ! parse_warning_context ! (wfl_operator, "Discouraged form of returned type specification"); ! ; ! break;} ! case 117: ! #line 1080 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("')' expected"); DRECOVER(method_declarator);; ! break;} ! case 118: ! #line 1082 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("']' expected"); RECOVER;; ! break;} ! case 119: ! #line 1087 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { ctxp->formal_parameter_number = 1; ! ; ! break;} ! case 120: ! #line 1091 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { ctxp->formal_parameter_number += 1; yyval.node = chainon (yyvsp[-2].node, yyvsp[0].node); ! ; ! break;} ! case 121: ! #line 1096 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyerror ("Missing formal parameter term"); RECOVER; ; ! break;} ! case 122: ! #line 1101 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_tree_list (yyvsp[0].node, yyvsp[-1].node); ! ; ! break;} ! case 123: ! #line 1105 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_tree_list (yyvsp[0].node, yyvsp[-1].node); ARG_FINAL_P (yyval.node) = 1; ! ; ! break;} ! case 124: ! #line 1110 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyerror ("Missing identifier"); RECOVER; yyval.node = NULL_TREE; ! ; ! break;} ! case 125: ! #line 1115 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyerror ("Missing identifier"); RECOVER; yyval.node = NULL_TREE; ! ; ! break;} ! case 126: ! #line 1123 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { check_modifiers ("Illegal modifier `%s'. Only `final' was expected here", yyvsp[0].value, ACC_FINAL); if (yyvsp[0].value != ACC_FINAL) MODIFIER_WFL (FINAL_TK) = build_wfl_node (NULL_TREE); ! ; ! break;} ! case 127: ! #line 1132 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = NULL_TREE; ; ! break;} ! case 128: ! #line 1134 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = yyvsp[0].node; ; ! break;} ! case 129: ! #line 1136 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing class type term"); RECOVER;; ! break;} ! case 130: ! #line 1141 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_tree_list (yyvsp[0].node, yyvsp[0].node); ; ! break;} ! case 131: ! #line 1143 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = tree_cons (yyvsp[0].node, yyvsp[0].node, yyvsp[-2].node); ; ! break;} ! case 132: ! #line 1145 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing class type term"); RECOVER;; ! break;} ! case 134: ! #line 1150 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = NULL_TREE; ; ! break;} ! case 135: ! #line 1156 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { TREE_CHAIN (yyvsp[0].node) = CPC_STATIC_INITIALIZER_STMT (ctxp); SET_CPC_STATIC_INITIALIZER_STMT (ctxp, yyvsp[0].node); current_static_block = NULL_TREE; ! ; ! break;} ! case 136: ! #line 1165 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { check_modifiers ("Illegal modifier `%s' for static initializer", yyvsp[0].value, ACC_STATIC); /* Can't have a static initializer in an innerclass */ if (yyvsp[0].value | ACC_STATIC && GET_CPC_LIST () && !TOPLEVEL_CLASS_DECL_P (GET_CPC ())) ! parse_error_context (MODIFIER_WFL (STATIC_TK), "Can't define static initializer in class `%s'. Static initializer can only be defined in top-level classes", IDENTIFIER_POINTER (DECL_NAME (GET_CPC ()))); SOURCE_FRONTEND_DEBUG (("Modifiers: %d", yyvsp[0].value)); ! ; ! break;} ! case 137: ! #line 1181 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { current_function_decl = yyvsp[0].node; source_start_java_method (current_function_decl); ! ; ! break;} ! case 138: ! #line 1186 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { finish_method_declaration (yyvsp[0].node); ; ! break;} ! case 139: ! #line 1191 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = method_header (0, NULL_TREE, yyvsp[-1].node, yyvsp[0].node); ; ! break;} ! case 140: ! #line 1193 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = method_header (yyvsp[-2].value, NULL_TREE, yyvsp[-1].node, yyvsp[0].node); ; ! break;} ! case 141: ! #line 1198 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { ! ctxp->formal_parameter_number = 0; yyval.node = method_declarator (yyvsp[-2].node, NULL_TREE); ! ; ! break;} ! case 142: ! #line 1203 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = method_declarator (yyvsp[-3].node, yyvsp[-1].node); ; ! break;} ! case 143: ! #line 1211 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { BLOCK_EXPR_BODY (yyvsp[0].node) = empty_stmt_node; yyval.node = yyvsp[0].node; ! ; ! break;} ! case 144: ! #line 1216 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = yyvsp[0].node; ; ! break;} ! case 145: ! #line 1218 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = yyvsp[0].node; ; ! break;} ! case 146: ! #line 1220 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = yyvsp[0].node; ; ! break;} ! case 148: ! #line 1230 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { ! yyval.node = build_method_invocation (yyvsp[-3].node, NULL_TREE); yyval.node = build_debugable_stmt (EXPR_WFL_LINECOL (yyvsp[-3].node), yyval.node); yyval.node = java_method_add_stmt (current_function_decl, yyval.node); ! ; ! break;} ! case 149: ! #line 1236 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { ! yyval.node = build_method_invocation (yyvsp[-4].node, yyvsp[-2].node); yyval.node = build_debugable_stmt (EXPR_WFL_LINECOL (yyvsp[-4].node), yyval.node); yyval.node = java_method_add_stmt (current_function_decl, yyval.node); ! ; ! break;} ! case 150: ! #line 1244 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyval.node = parse_jdk1_1_error ("explicit constructor invocation"); ; ! break;} ! case 151: ! #line 1246 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyval.node = parse_jdk1_1_error ("explicit constructor invocation"); ; ! break;} ! case 152: ! #line 1251 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { tree wfl = build_wfl_node (this_identifier_node); EXPR_WFL_LINECOL (wfl) = yyvsp[0].operator.location; yyval.node = wfl; ! ; ! break;} ! case 153: ! #line 1257 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { tree wfl = build_wfl_node (super_identifier_node); EXPR_WFL_LINECOL (wfl) = yyvsp[0].operator.location; yyval.node = wfl; ! ; ! break;} ! case 154: ! #line 1268 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { create_interface (0, yyvsp[0].node, NULL_TREE); ; ! break;} ! case 155: ! #line 1270 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { ; ; ! break;} ! case 156: ! #line 1272 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { create_interface (yyvsp[-2].value, yyvsp[0].node, NULL_TREE); ; ! break;} ! case 157: ! #line 1274 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { ; ; ! break;} ! case 158: ! #line 1276 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { create_interface (0, yyvsp[-1].node, yyvsp[0].node); ; ! break;} ! case 159: ! #line 1278 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { ; ; ! break;} ! case 160: ! #line 1280 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { create_interface (yyvsp[-3].value, yyvsp[-1].node, yyvsp[0].node); ; ! break;} ! case 161: ! #line 1282 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { ; ; ! break;} ! case 162: ! #line 1284 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyerror ("'{' expected"); RECOVER; ; ! break;} ! case 163: ! #line 1286 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyerror ("'{' expected"); RECOVER; ; ! break;} ! case 164: ! #line 1291 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { ctxp->interface_number = 1; yyval.node = build_tree_list (yyvsp[0].node, NULL_TREE); ! ; ! break;} ! case 165: ! #line 1296 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { ctxp->interface_number++; yyval.node = chainon (yyvsp[-2].node, build_tree_list (yyvsp[0].node, NULL_TREE)); ! ; ! break;} ! case 166: ! #line 1301 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Invalid interface type"); RECOVER;; ! break;} ! case 167: ! #line 1303 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;; ! break;} ! case 168: ! #line 1308 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = NULL_TREE; ; ! break;} ! case 169: ! #line 1310 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = NULL_TREE; ; ! break;} ! case 174: ! #line 1322 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { end_class_declaration (1); ; ! break;} ! case 175: ! #line 1324 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { end_class_declaration (1); ; ! break;} ! case 177: ! #line 1333 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { check_abstract_method_header (yyvsp[-1].node); current_function_decl = NULL_TREE; /* FIXME ? */ ! ; ! break;} ! case 178: ! #line 1338 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("';' expected"); RECOVER;; ! break;} ! case 179: ! #line 1344 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_new_array_init (yyvsp[-1].operator.location, NULL_TREE); ; ! break;} ! case 180: ! #line 1346 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_new_array_init (yyvsp[-2].operator.location, NULL_TREE); ; ! break;} ! case 181: ! #line 1348 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_new_array_init (yyvsp[-2].operator.location, yyvsp[-1].node); ; ! break;} ! case 182: ! #line 1350 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_new_array_init (yyvsp[-3].operator.location, yyvsp[-2].node); ; ! break;} ! case 183: ! #line 1355 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { ! yyval.node = tree_cons (maybe_build_array_element_wfl (yyvsp[0].node), yyvsp[0].node, NULL_TREE); ! ; ! break;} ! case 184: ! #line 1360 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = tree_cons (maybe_build_array_element_wfl (yyvsp[0].node), yyvsp[0].node, yyvsp[-2].node); ! ; ! break;} ! case 185: ! #line 1364 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;; ! break;} ! case 186: ! #line 1370 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { /* Store the location of the `}' when doing xrefs */ if (current_function_decl && flag_emit_xref) ! DECL_END_SOURCE_LINE (current_function_decl) = EXPR_WFL_ADD_COL (yyvsp[0].operator.location, 1); ! yyval.node = empty_stmt_node; ! ; ! break;} ! case 187: ! #line 1378 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = yyvsp[0].node; ; ! break;} ! case 188: ! #line 1383 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { enter_block (); ; ! break;} ! case 189: ! #line 1388 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { maybe_absorb_scoping_blocks (); /* Store the location of the `}' when doing xrefs */ if (current_function_decl && flag_emit_xref) ! DECL_END_SOURCE_LINE (current_function_decl) = ! EXPR_WFL_ADD_COL (yyvsp[0].operator.location, 1); yyval.node = exit_block (); if (!BLOCK_SUBBLOCKS (yyval.node)) BLOCK_SUBBLOCKS (yyval.node) = empty_stmt_node; ! ; ! break;} ! case 193: ! #line 1408 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { java_method_add_stmt (current_function_decl, yyvsp[0].node); ; ! break;} ! case 194: ! #line 1410 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { LOCAL_CLASS_P (TREE_TYPE (GET_CPC ())) = 1; end_class_declaration (1); ! ; ! break;} ! case 196: ! #line 1422 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { declare_local_variables (0, yyvsp[-1].node, yyvsp[0].node); ; ! break;} ! case 197: ! #line 1424 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { declare_local_variables (yyvsp[-2].value, yyvsp[-1].node, yyvsp[0].node); ; ! break;} ! case 203: ! #line 1434 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = exit_block (); ; ! break;} ! case 208: ! #line 1443 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = exit_block (); ; ! break;} ! case 221: ! #line 1463 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { ! if (flag_extraneous_semicolon ! && ! current_static_block ! && (! current_function_decl || /* Verify we're not in a inner class declaration */ (GET_CPC () != TYPE_NAME (DECL_CONTEXT (current_function_decl))))) ! { EXPR_WFL_SET_LINECOL (wfl_operator, lineno, -1); parse_warning_context (wfl_operator, "An empty declaration is a deprecated feature that should not be used"); } yyval.node = empty_stmt_node; ! ; ! break;} ! case 222: ! #line 1481 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { ! yyval.node = build_labeled_block (EXPR_WFL_LINECOL (yyvsp[-1].node), EXPR_WFL_NODE (yyvsp[-1].node)); pushlevel (2); push_labeled_block (yyval.node); PUSH_LABELED_BLOCK (yyval.node); ! ; ! break;} ! case 223: ! #line 1492 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = finish_labeled_statement (yyvsp[-1].node, yyvsp[0].node); ; ! break;} ! case 224: ! #line 1494 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("':' expected"); RECOVER;; ! break;} ! case 225: ! #line 1499 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = finish_labeled_statement (yyvsp[-1].node, yyvsp[0].node); ; ! break;} ! case 226: ! #line 1506 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { /* We have a statement. Generate a WFL around it so we can debug it */ yyval.node = build_expr_wfl (yyvsp[-1].node, input_filename, lineno, 0); /* We know we have a statement, so set the debug info to be eventually generate here. */ yyval.node = JAVA_MAYBE_GENERATE_DEBUG_INFO (yyval.node); ! ; ! break;} ! case 227: ! #line 1515 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { YYNOT_TWICE yyerror ("Invalid expression statement"); DRECOVER (expr_stmt); ! ; ! break;} ! case 228: ! #line 1520 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { YYNOT_TWICE yyerror ("Invalid expression statement"); DRECOVER (expr_stmt); ! ; ! break;} ! case 229: ! #line 1525 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { YYNOT_TWICE yyerror ("Invalid expression statement"); DRECOVER (expr_stmt); ! ; ! break;} ! case 230: ! #line 1530 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("')' expected"); RECOVER;; ! break;} ! case 231: ! #line 1532 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { parse_ctor_invocation_error (); RECOVER; ! ; ! break;} ! case 232: ! #line 1537 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("')' expected"); RECOVER;; ! break;} ! case 233: ! #line 1539 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { parse_ctor_invocation_error (); RECOVER; ! ; ! break;} ! case 234: ! #line 1544 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("'(' expected"); RECOVER;; ! break;} ! case 235: ! #line 1546 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("')' expected"); RECOVER;; ! break;} ! case 236: ! #line 1548 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("')' expected"); RECOVER;; ! break;} ! case 237: ! #line 1550 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("';' expected"); RECOVER;; ! break;} ! case 238: ! #line 1552 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("';' expected"); RECOVER;; ! break;} ! case 246: ! #line 1567 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { ! yyval.node = build_if_else_statement (yyvsp[-3].operator.location, yyvsp[-2].node, yyvsp[0].node, NULL_TREE); ! ; ! break;} ! case 247: ! #line 1572 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("'(' expected"); RECOVER;; ! break;} ! case 248: ! #line 1574 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;; ! break;} ! case 249: ! #line 1576 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("')' expected"); RECOVER;; ! break;} ! case 250: ! #line 1581 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_if_else_statement (yyvsp[-5].operator.location, yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node); ; ! break;} ! case 251: ! #line 1586 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_if_else_statement (yyvsp[-5].operator.location, yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node); ; ! break;} ! case 252: ! #line 1591 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { enter_block (); ! ; ! break;} ! case 253: ! #line 1595 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { /* Make into "proper list" of COMPOUND_EXPRs. I.e. make the last statement also have its own COMPOUND_EXPR. */ maybe_absorb_scoping_blocks (); TREE_OPERAND (yyvsp[-2].node, 1) = exit_block (); yyval.node = build_debugable_stmt (EXPR_WFL_LINECOL (yyvsp[-2].node), yyvsp[-2].node); ! ; ! break;} ! case 254: ! #line 1607 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build (SWITCH_EXPR, NULL_TREE, yyvsp[-1].node, NULL_TREE); EXPR_WFL_LINECOL (yyval.node) = yyvsp[-2].operator.location; ! ; ! break;} ! case 255: ! #line 1612 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("'(' expected"); RECOVER;; ! break;} ! case 256: ! #line 1614 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term or ')'"); DRECOVER(switch_statement);; ! break;} ! case 257: ! #line 1616 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("'{' expected"); RECOVER;; ! break;} ! case 258: ! #line 1624 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = NULL_TREE; ; ! break;} ! case 259: ! #line 1626 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = NULL_TREE; ; ! break;} ! case 260: ! #line 1628 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = NULL_TREE; ; ! break;} ! case 261: ! #line 1630 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = NULL_TREE; ; ! break;} ! case 267: ! #line 1649 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { tree lab = build1 (CASE_EXPR, NULL_TREE, yyvsp[-1].node); EXPR_WFL_LINECOL (lab) = yyvsp[-2].operator.location; java_method_add_stmt (current_function_decl, lab); ! ; ! break;} ! case 268: ! #line 1655 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { tree lab = build (DEFAULT_EXPR, NULL_TREE, NULL_TREE); EXPR_WFL_LINECOL (lab) = yyvsp[-1].operator.location; java_method_add_stmt (current_function_decl, lab); ! ; ! break;} ! case 269: ! #line 1661 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing or invalid constant expression"); RECOVER;; ! break;} ! case 270: ! #line 1663 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("':' expected"); RECOVER;; ! break;} ! case 271: ! #line 1665 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("':' expected"); RECOVER;; ! break;} ! case 272: ! #line 1670 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { tree body = build_loop_body (yyvsp[-2].operator.location, yyvsp[-1].node, 0); yyval.node = build_new_loop (body); ! ; ! break;} ! case 273: ! #line 1678 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = finish_loop_body (0, NULL_TREE, yyvsp[0].node, 0); ; ! break;} ! case 274: ! #line 1680 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {YYERROR_NOW; yyerror ("'(' expected"); RECOVER;; ! break;} ! case 275: ! #line 1682 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term and ')' expected"); RECOVER;; ! break;} ! case 276: ! #line 1684 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("')' expected"); RECOVER;; ! break;} ! case 277: ! #line 1689 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = finish_loop_body (0, NULL_TREE, yyvsp[0].node, 0); ; ! break;} ! case 278: ! #line 1694 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { tree body = build_loop_body (0, NULL_TREE, 1); yyval.node = build_new_loop (body); ! ; ! break;} ! case 279: ! #line 1703 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = finish_loop_body (yyvsp[-3].operator.location, yyvsp[-2].node, yyvsp[-5].node, 1); ; ! break;} ! case 280: ! #line 1708 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { if (TREE_CODE_CLASS (TREE_CODE (yyvsp[-4].node)) == 'c') yyvsp[-4].node = build_wfl_node (yyvsp[-4].node); yyval.node = finish_for_loop (EXPR_WFL_LINECOL (yyvsp[-4].node), yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node); ! ; ! break;} ! case 281: ! #line 1714 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = finish_for_loop (0, NULL_TREE, yyvsp[-2].node, yyvsp[0].node); /* We have not condition, so we get rid of the EXIT_EXPR */ ! LOOP_EXPR_BODY_CONDITION_EXPR (LOOP_EXPR_BODY (yyval.node), 0) = empty_stmt_node; ! ; ! break;} ! case 282: ! #line 1721 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Invalid control expression"); RECOVER;; ! break;} ! case 283: ! #line 1723 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Invalid update expression"); RECOVER;; ! break;} ! case 284: ! #line 1725 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Invalid update expression"); RECOVER;; ! break;} ! case 285: ! #line 1730 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = finish_for_loop (EXPR_WFL_LINECOL (yyvsp[-4].node), yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node);; ! break;} ! case 286: ! #line 1732 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = finish_for_loop (0, NULL_TREE, yyvsp[-2].node, yyvsp[0].node); /* We have not condition, so we get rid of the EXIT_EXPR */ ! LOOP_EXPR_BODY_CONDITION_EXPR (LOOP_EXPR_BODY (yyval.node), 0) = empty_stmt_node; ! ; ! break;} ! case 287: ! #line 1742 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { /* This scope defined for local variable that may be defined within the scope of the for loop */ ! enter_block (); ! ; ! break;} ! case 288: ! #line 1748 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("'(' expected"); DRECOVER(for_1);; ! break;} ! case 289: ! #line 1750 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Invalid init statement"); RECOVER;; ! break;} ! case 290: ! #line 1755 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { /* We now declare the loop body. The loop is declared as a for loop. */ tree body = build_loop_body (0, NULL_TREE, 0); *************** yyreduce: *** 4775,5169 **** /* The loop is added to the current block the for statement is defined within */ java_method_add_stmt (current_function_decl, yyval.node); ! ;} ! break; ! ! case 291: ! #line 1776 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = empty_stmt_node; ;} ! break; ! ! case 292: ! #line 1778 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { /* Init statement recorded within the previously defined block scope */ yyval.node = java_method_add_stmt (current_function_decl, yyvsp[0].node); ! ;} ! break; ! ! case 293: ! #line 1784 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { /* Local variable are recorded within the previously defined block scope */ yyval.node = NULL_TREE; ! ;} ! break; ! ! case 294: ! #line 1790 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("';' expected"); DRECOVER(for_init_1);;} ! break; ! ! case 295: ! #line 1794 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyval.node = empty_stmt_node;;} ! break; ! ! case 296: ! #line 1796 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_debugable_stmt (BUILD_LOCATION (), yyvsp[0].node); ;} ! break; ! ! case 297: ! #line 1801 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = add_stmt_to_compound (NULL_TREE, NULL_TREE, yyvsp[0].node); ;} ! break; ! ! case 298: ! #line 1803 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = add_stmt_to_compound (yyvsp[-2].node, NULL_TREE, yyvsp[0].node); ;} ! break; ! ! case 299: ! #line 1805 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;;} ! break; ! ! case 300: ! #line 1810 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_bc_statement (yyvsp[-1].operator.location, 1, NULL_TREE); ;} ! break; ! ! case 301: ! #line 1812 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_bc_statement (yyvsp[-2].operator.location, 1, yyvsp[-1].node); ;} ! break; ! ! case 302: ! #line 1814 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;;} ! break; ! ! case 303: ! #line 1816 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("';' expected"); RECOVER;;} ! break; ! ! case 304: ! #line 1821 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_bc_statement (yyvsp[-1].operator.location, 0, NULL_TREE); ;} ! break; ! ! case 305: ! #line 1823 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_bc_statement (yyvsp[-2].operator.location, 0, yyvsp[-1].node); ;} ! break; ! ! case 306: ! #line 1825 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;;} ! break; ! ! case 307: ! #line 1827 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("';' expected"); RECOVER;;} ! break; ! ! case 308: ! #line 1832 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_return (yyvsp[-1].operator.location, NULL_TREE); ;} ! break; ! ! case 309: ! #line 1834 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_return (yyvsp[-2].operator.location, yyvsp[-1].node); ;} ! break; ! ! case 310: ! #line 1836 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;;} ! break; ! ! case 311: ! #line 1838 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("';' expected"); RECOVER;;} ! break; ! ! case 312: ! #line 1843 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build1 (THROW_EXPR, NULL_TREE, yyvsp[-1].node); EXPR_WFL_LINECOL (yyval.node) = yyvsp[-2].operator.location; ! ;} ! break; ! ! case 313: ! #line 1848 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;;} ! break; ! ! case 314: ! #line 1850 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("';' expected"); RECOVER;;} ! break; ! ! case 315: ! #line 1855 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build (SYNCHRONIZED_EXPR, NULL_TREE, yyvsp[-2].node, yyvsp[0].node); ! EXPR_WFL_LINECOL (yyval.node) = EXPR_WFL_LINECOL (MODIFIER_WFL (SYNCHRONIZED_TK)); ! ;} ! break; ! ! case 316: ! #line 1861 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("'{' expected"); RECOVER;;} ! break; ! ! case 317: ! #line 1863 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("'(' expected"); RECOVER;;} ! break; ! ! case 318: ! #line 1865 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;;} ! break; ! ! case 319: ! #line 1867 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;;} ! break; ! ! case 320: ! #line 1872 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { check_modifiers ( "Illegal modifier `%s'. Only `synchronized' was expected here", yyvsp[0].value, ACC_SYNCHRONIZED); if (yyvsp[0].value != ACC_SYNCHRONIZED) ! MODIFIER_WFL (SYNCHRONIZED_TK) = build_wfl_node (NULL_TREE); ! ;} ! break; ! ! case 321: ! #line 1884 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_try_statement (yyvsp[-2].operator.location, yyvsp[-1].node, yyvsp[0].node); ;} ! break; ! ! case 322: ! #line 1886 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_try_finally_statement (yyvsp[-2].operator.location, yyvsp[-1].node, yyvsp[0].node); ;} ! break; ! ! case 323: ! #line 1888 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_try_finally_statement (yyvsp[-3].operator.location, build_try_statement (yyvsp[-3].operator.location, yyvsp[-2].node, yyvsp[-1].node), yyvsp[0].node); ! ;} ! break; ! ! case 324: ! #line 1893 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("'{' expected"); DRECOVER (try_statement);;} ! break; ! ! case 326: ! #line 1899 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { TREE_CHAIN (yyvsp[0].node) = yyvsp[-1].node; yyval.node = yyvsp[0].node; ! ;} ! break; ! ! case 327: ! #line 1907 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { java_method_add_stmt (current_function_decl, yyvsp[0].node); exit_block (); yyval.node = yyvsp[-1].node; ! ;} ! break; ! ! case 328: ! #line 1916 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { /* We add a block to define a scope for formal_parameter (CCBP). The formal parameter is declared initialized by the appropriate function call */ tree ccpb = enter_block (); tree init = build_assignment ! (ASSIGN_TK, yyvsp[-2].operator.location, TREE_PURPOSE (yyvsp[-1].node), build (JAVA_EXC_OBJ_EXPR, ptr_type_node)); declare_local_variables (0, TREE_VALUE (yyvsp[-1].node), build_tree_list (TREE_PURPOSE (yyvsp[-1].node), init)); yyval.node = build1 (CATCH_EXPR, NULL_TREE, ccpb); EXPR_WFL_LINECOL (yyval.node) = yyvsp[-3].operator.location; ! ;} ! break; ! ! case 329: ! #line 1932 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("'(' expected"); RECOVER; yyval.node = NULL_TREE;;} ! break; ! ! case 330: ! #line 1934 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { ! yyerror ("Missing term or ')' expected"); RECOVER; yyval.node = NULL_TREE; ! ;} ! break; ! ! case 331: ! #line 1939 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER; yyval.node = NULL_TREE;;} ! break; ! ! case 332: ! #line 1944 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = yyvsp[0].node; ;} ! break; ! ! case 333: ! #line 1946 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("'{' expected"); RECOVER; ;} ! break; ! ! case 337: ! #line 1958 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_this (yyvsp[0].operator.location); ;} ! break; ! ! case 338: ! #line 1960 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyval.node = yyvsp[-1].node;;} ! break; ! ! case 344: ! #line 1970 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { tree wfl = build_wfl_node (this_identifier_node); yyval.node = make_qualified_primary (yyvsp[-2].node, wfl, EXPR_WFL_LINECOL (yyvsp[-2].node)); ! ;} ! break; ! ! case 345: ! #line 1975 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("')' expected"); RECOVER;;} ! break; ! ! case 346: ! #line 1977 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("'class' or 'this' expected" ); RECOVER;;} ! break; ! ! case 347: ! #line 1979 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("'class' expected" ); RECOVER;;} ! break; ! ! case 348: ! #line 1981 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("'class' expected" ); RECOVER;;} ! break; ! ! case 349: ! #line 1986 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_incomplete_class_ref (yyvsp[-1].operator.location, yyvsp[-2].node); ;} ! break; ! ! case 350: ! #line 1988 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_incomplete_class_ref (yyvsp[-1].operator.location, yyvsp[-2].node); ;} ! break; ! ! case 351: ! #line 1990 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_incomplete_class_ref (yyvsp[-1].operator.location, yyvsp[-2].node); ;} ! break; ! ! case 352: ! #line 1992 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_incomplete_class_ref (yyvsp[-1].operator.location, void_type_node); ! ;} ! break; ! ! case 353: ! #line 2000 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_new_invocation (yyvsp[-3].node, yyvsp[-1].node); ;} ! break; ! ! case 354: ! #line 2002 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_new_invocation (yyvsp[-2].node, NULL_TREE); ;} ! break; ! ! case 356: ! #line 2008 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { tree ctor = build_new_invocation (yyvsp[-2].node, NULL_TREE); ! yyval.node = make_qualified_primary (yyvsp[-3].node, ctor, EXPR_WFL_LINECOL (yyvsp[-3].node)); ! ;} ! break; ! ! case 358: ! #line 2015 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { tree ctor = build_new_invocation (yyvsp[-3].node, yyvsp[-1].node); ! yyval.node = make_qualified_primary (yyvsp[-4].node, ctor, EXPR_WFL_LINECOL (yyvsp[-4].node)); ! ;} ! break; ! ! case 360: ! #line 2022 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("'(' expected"); DRECOVER(new_1);;} ! break; ! ! case 361: ! #line 2024 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("'(' expected"); RECOVER;;} ! break; ! ! case 362: ! #line 2026 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("')' or term expected"); RECOVER;;} ! break; ! ! case 363: ! #line 2028 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("')' expected"); RECOVER;;} ! break; ! ! case 364: ! #line 2030 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {YYERROR_NOW; yyerror ("Identifier expected"); RECOVER;;} ! break; ! ! case 365: ! #line 2032 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("'(' expected"); RECOVER;;} ! break; ! ! case 366: ! #line 2042 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { create_anonymous_class (yyvsp[-4].operator.location, yyvsp[-3].node); ;} ! break; ! ! case 367: ! #line 2044 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { tree id = build_wfl_node (DECL_NAME (GET_CPC ())); EXPR_WFL_LINECOL (id) = EXPR_WFL_LINECOL (yyvsp[-5].node); --- 4325,4674 ---- /* The loop is added to the current block the for statement is defined within */ java_method_add_stmt (current_function_decl, yyval.node); ! ; ! break;} ! case 291: ! #line 1767 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = empty_stmt_node; ; ! break;} ! case 292: ! #line 1769 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { /* Init statement recorded within the previously defined block scope */ yyval.node = java_method_add_stmt (current_function_decl, yyvsp[0].node); ! ; ! break;} ! case 293: ! #line 1775 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { /* Local variable are recorded within the previously defined block scope */ yyval.node = NULL_TREE; ! ; ! break;} ! case 294: ! #line 1781 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("';' expected"); DRECOVER(for_init_1);; ! break;} ! case 295: ! #line 1785 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyval.node = empty_stmt_node;; ! break;} ! case 296: ! #line 1787 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_debugable_stmt (BUILD_LOCATION (), yyvsp[0].node); ; ! break;} ! case 297: ! #line 1792 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = add_stmt_to_compound (NULL_TREE, NULL_TREE, yyvsp[0].node); ; ! break;} ! case 298: ! #line 1794 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = add_stmt_to_compound (yyvsp[-2].node, NULL_TREE, yyvsp[0].node); ; ! break;} ! case 299: ! #line 1796 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;; ! break;} ! case 300: ! #line 1801 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_bc_statement (yyvsp[-1].operator.location, 1, NULL_TREE); ; ! break;} ! case 301: ! #line 1803 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_bc_statement (yyvsp[-2].operator.location, 1, yyvsp[-1].node); ; ! break;} ! case 302: ! #line 1805 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;; ! break;} ! case 303: ! #line 1807 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("';' expected"); RECOVER;; ! break;} ! case 304: ! #line 1812 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_bc_statement (yyvsp[-1].operator.location, 0, NULL_TREE); ; ! break;} ! case 305: ! #line 1814 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_bc_statement (yyvsp[-2].operator.location, 0, yyvsp[-1].node); ; ! break;} ! case 306: ! #line 1816 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;; ! break;} ! case 307: ! #line 1818 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("';' expected"); RECOVER;; ! break;} ! case 308: ! #line 1823 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_return (yyvsp[-1].operator.location, NULL_TREE); ; ! break;} ! case 309: ! #line 1825 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_return (yyvsp[-2].operator.location, yyvsp[-1].node); ; ! break;} ! case 310: ! #line 1827 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;; ! break;} ! case 311: ! #line 1829 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("';' expected"); RECOVER;; ! break;} ! case 312: ! #line 1834 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build1 (THROW_EXPR, NULL_TREE, yyvsp[-1].node); EXPR_WFL_LINECOL (yyval.node) = yyvsp[-2].operator.location; ! ; ! break;} ! case 313: ! #line 1839 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;; ! break;} ! case 314: ! #line 1841 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("';' expected"); RECOVER;; ! break;} ! case 315: ! #line 1846 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { ! yyval.node = build_assertion (yyvsp[-4].operator.location, yyvsp[-3].node, yyvsp[-1].node); ! ; ! break;} ! case 316: ! #line 1850 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { ! yyval.node = build_assertion (yyvsp[-2].operator.location, yyvsp[-1].node, NULL_TREE); ! ; ! break;} ! case 317: ! #line 1854 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;; ! break;} ! case 318: ! #line 1856 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("';' expected"); RECOVER;; ! break;} ! case 319: ! #line 1861 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build (SYNCHRONIZED_EXPR, NULL_TREE, yyvsp[-2].node, yyvsp[0].node); ! EXPR_WFL_LINECOL (yyval.node) = EXPR_WFL_LINECOL (MODIFIER_WFL (SYNCHRONIZED_TK)); ! ; ! break;} ! case 320: ! #line 1867 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("'{' expected"); RECOVER;; ! break;} ! case 321: ! #line 1869 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("'(' expected"); RECOVER;; ! break;} ! case 322: ! #line 1871 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;; ! break;} ! case 323: ! #line 1873 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;; ! break;} ! case 324: ! #line 1878 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { check_modifiers ( "Illegal modifier `%s'. Only `synchronized' was expected here", yyvsp[0].value, ACC_SYNCHRONIZED); if (yyvsp[0].value != ACC_SYNCHRONIZED) ! MODIFIER_WFL (SYNCHRONIZED_TK) = build_wfl_node (NULL_TREE); ! ; ! break;} ! case 325: ! #line 1890 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_try_statement (yyvsp[-2].operator.location, yyvsp[-1].node, yyvsp[0].node); ; ! break;} ! case 326: ! #line 1892 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_try_finally_statement (yyvsp[-2].operator.location, yyvsp[-1].node, yyvsp[0].node); ; ! break;} ! case 327: ! #line 1894 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_try_finally_statement (yyvsp[-3].operator.location, build_try_statement (yyvsp[-3].operator.location, yyvsp[-2].node, yyvsp[-1].node), yyvsp[0].node); ! ; ! break;} ! case 328: ! #line 1899 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("'{' expected"); DRECOVER (try_statement);; ! break;} ! case 330: ! #line 1905 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { TREE_CHAIN (yyvsp[0].node) = yyvsp[-1].node; yyval.node = yyvsp[0].node; ! ; ! break;} ! case 331: ! #line 1913 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { java_method_add_stmt (current_function_decl, yyvsp[0].node); exit_block (); yyval.node = yyvsp[-1].node; ! ; ! break;} ! case 332: ! #line 1922 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { /* We add a block to define a scope for formal_parameter (CCBP). The formal parameter is declared initialized by the appropriate function call */ tree ccpb = enter_block (); tree init = build_assignment ! (ASSIGN_TK, yyvsp[-2].operator.location, TREE_PURPOSE (yyvsp[-1].node), build (JAVA_EXC_OBJ_EXPR, ptr_type_node)); declare_local_variables (0, TREE_VALUE (yyvsp[-1].node), build_tree_list (TREE_PURPOSE (yyvsp[-1].node), init)); yyval.node = build1 (CATCH_EXPR, NULL_TREE, ccpb); EXPR_WFL_LINECOL (yyval.node) = yyvsp[-3].operator.location; ! ; ! break;} ! case 333: ! #line 1938 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("'(' expected"); RECOVER; yyval.node = NULL_TREE;; ! break;} ! case 334: ! #line 1940 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { ! yyerror ("Missing term or ')' expected"); RECOVER; yyval.node = NULL_TREE; ! ; ! break;} ! case 335: ! #line 1945 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER; yyval.node = NULL_TREE;; ! break;} ! case 336: ! #line 1950 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = yyvsp[0].node; ; ! break;} ! case 337: ! #line 1952 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("'{' expected"); RECOVER; ; ! break;} ! case 341: ! #line 1964 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_this (yyvsp[0].operator.location); ; ! break;} ! case 342: ! #line 1966 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyval.node = yyvsp[-1].node;; ! break;} ! case 348: ! #line 1976 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { tree wfl = build_wfl_node (this_identifier_node); yyval.node = make_qualified_primary (yyvsp[-2].node, wfl, EXPR_WFL_LINECOL (yyvsp[-2].node)); ! ; ! break;} ! case 349: ! #line 1981 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("')' expected"); RECOVER;; ! break;} ! case 350: ! #line 1983 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("'class' or 'this' expected" ); RECOVER;; ! break;} ! case 351: ! #line 1985 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("'class' expected" ); RECOVER;; ! break;} ! case 352: ! #line 1987 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("'class' expected" ); RECOVER;; ! break;} ! case 353: ! #line 1992 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_incomplete_class_ref (yyvsp[-1].operator.location, yyvsp[-2].node); ; ! break;} ! case 354: ! #line 1994 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_incomplete_class_ref (yyvsp[-1].operator.location, yyvsp[-2].node); ; ! break;} ! case 355: ! #line 1996 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_incomplete_class_ref (yyvsp[-1].operator.location, yyvsp[-2].node); ; ! break;} ! case 356: ! #line 1998 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_incomplete_class_ref (yyvsp[-1].operator.location, void_type_node); ! ; ! break;} ! case 357: ! #line 2006 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_new_invocation (yyvsp[-3].node, yyvsp[-1].node); ; ! break;} ! case 358: ! #line 2008 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_new_invocation (yyvsp[-2].node, NULL_TREE); ; ! break;} ! case 360: ! #line 2014 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { tree ctor = build_new_invocation (yyvsp[-2].node, NULL_TREE); ! yyval.node = make_qualified_primary (yyvsp[-3].node, ctor, EXPR_WFL_LINECOL (yyvsp[-3].node)); ! ; ! break;} ! case 362: ! #line 2021 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { tree ctor = build_new_invocation (yyvsp[-3].node, yyvsp[-1].node); ! yyval.node = make_qualified_primary (yyvsp[-4].node, ctor, EXPR_WFL_LINECOL (yyvsp[-4].node)); ! ; ! break;} ! case 364: ! #line 2028 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("'(' expected"); DRECOVER(new_1);; ! break;} ! case 365: ! #line 2030 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("'(' expected"); RECOVER;; ! break;} ! case 366: ! #line 2032 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("')' or term expected"); RECOVER;; ! break;} ! case 367: ! #line 2034 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("')' expected"); RECOVER;; ! break;} ! case 368: ! #line 2036 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {YYERROR_NOW; yyerror ("Identifier expected"); RECOVER;; ! break;} ! case 369: ! #line 2038 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("'(' expected"); RECOVER;; ! break;} ! case 370: ! #line 2048 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { create_anonymous_class (yyvsp[-4].operator.location, yyvsp[-3].node); ; ! break;} ! case 371: ! #line 2050 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { tree id = build_wfl_node (DECL_NAME (GET_CPC ())); EXPR_WFL_LINECOL (id) = EXPR_WFL_LINECOL (yyvsp[-5].node); *************** yyreduce: *** 5185,5208 **** must be generated following the hints provided by the `new' expression. Whether a super constructor of that nature exists or not is to be verified ! later on in verify_constructor_super. It's during the expansion of a `new' statement refering to an anonymous class that a ctor will be generated for the anonymous class, with the right arguments. */ ! ;} ! break; ! ! case 368: ! #line 2075 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { create_anonymous_class (yyvsp[-3].operator.location, yyvsp[-2].node); ;} ! break; ! ! case 369: ! #line 2077 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { tree id = build_wfl_node (DECL_NAME (GET_CPC ())); EXPR_WFL_LINECOL (id) = EXPR_WFL_LINECOL (yyvsp[-4].node); --- 4690,4711 ---- must be generated following the hints provided by the `new' expression. Whether a super constructor of that nature exists or not is to be verified ! later on in verify_constructor_super. It's during the expansion of a `new' statement refering to an anonymous class that a ctor will be generated for the anonymous class, with the right arguments. */ ! ; ! break;} ! case 372: ! #line 2081 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { create_anonymous_class (yyvsp[-3].operator.location, yyvsp[-2].node); ; ! break;} ! case 373: ! #line 2083 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { tree id = build_wfl_node (DECL_NAME (GET_CPC ())); EXPR_WFL_LINECOL (id) = EXPR_WFL_LINECOL (yyvsp[-4].node); *************** yyreduce: *** 5213,5275 **** constructor can be generated, since its signature is already known. */ yyval.node = build_new_invocation (id, NULL_TREE); ! ;} ! break; ! ! case 370: ! #line 2093 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = yyvsp[-2].node; ;} ! break; ! ! case 371: ! #line 2095 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = yyvsp[-2].node; ;} ! break; ! ! case 372: ! #line 2100 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = tree_cons (NULL_TREE, yyvsp[0].node, NULL_TREE); ! ctxp->formal_parameter_number = 1; ! ;} ! break; ! ! case 373: ! #line 2105 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { ctxp->formal_parameter_number += 1; yyval.node = tree_cons (NULL_TREE, yyvsp[0].node, yyvsp[-2].node); ! ;} ! break; ! ! case 374: ! #line 2110 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;;} ! break; ! ! case 375: ! #line 2115 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_newarray_node (yyvsp[-1].node, yyvsp[0].node, 0); ;} ! break; ! ! case 376: ! #line 2117 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_newarray_node (yyvsp[-1].node, yyvsp[0].node, 0); ;} ! break; ! ! case 377: ! #line 2119 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_newarray_node (yyvsp[-2].node, yyvsp[-1].node, pop_current_osb (ctxp));;} ! break; ! ! case 378: ! #line 2121 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_newarray_node (yyvsp[-2].node, yyvsp[-1].node, pop_current_osb (ctxp));;} ! break; ! ! case 379: ! #line 2125 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { char *sig; int osb = pop_current_osb (ctxp); while (osb--) --- 4716,4768 ---- constructor can be generated, since its signature is already known. */ yyval.node = build_new_invocation (id, NULL_TREE); ! ; ! break;} ! case 374: ! #line 2099 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = yyvsp[-2].node; ; ! break;} ! case 375: ! #line 2101 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = yyvsp[-2].node; ; ! break;} ! case 376: ! #line 2106 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = tree_cons (NULL_TREE, yyvsp[0].node, NULL_TREE); ! ctxp->formal_parameter_number = 1; ! ; ! break;} ! case 377: ! #line 2111 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { ctxp->formal_parameter_number += 1; yyval.node = tree_cons (NULL_TREE, yyvsp[0].node, yyvsp[-2].node); ! ; ! break;} ! case 378: ! #line 2116 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;; ! break;} ! case 379: ! #line 2121 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_newarray_node (yyvsp[-1].node, yyvsp[0].node, 0); ; ! break;} ! case 380: ! #line 2123 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_newarray_node (yyvsp[-1].node, yyvsp[0].node, 0); ; ! break;} ! case 381: ! #line 2125 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_newarray_node (yyvsp[-2].node, yyvsp[-1].node, pop_current_osb (ctxp));; ! break;} ! case 382: ! #line 2127 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_newarray_node (yyvsp[-2].node, yyvsp[-1].node, pop_current_osb (ctxp));; ! break;} ! case 383: ! #line 2131 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { char *sig; int osb = pop_current_osb (ctxp); while (osb--) *************** yyreduce: *** 5278,5321 **** sig = obstack_finish (&temporary_obstack); yyval.node = build (NEW_ANONYMOUS_ARRAY_EXPR, NULL_TREE, yyvsp[-2].node, get_identifier (sig), yyvsp[0].node); ! ;} ! break; ! ! case 380: ! #line 2136 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { int osb = pop_current_osb (ctxp); tree type = yyvsp[-2].node; while (osb--) type = build_java_array_type (type, -1); ! yyval.node = build (NEW_ANONYMOUS_ARRAY_EXPR, NULL_TREE, build_pointer_type (type), NULL_TREE, yyvsp[0].node); ! ;} ! break; ! ! case 381: ! #line 2145 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("'[' expected"); DRECOVER ("]");;} ! break; ! ! case 382: ! #line 2147 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("']' expected"); RECOVER;;} ! break; ! ! case 383: ! #line 2152 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_tree_list (NULL_TREE, yyvsp[0].node); ;} ! break; ! ! case 384: ! #line 2154 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = tree_cons (NULL_TREE, yyvsp[0].node, yyval.node); ;} ! break; ! ! case 385: ! #line 2159 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { if (JNUMERIC_TYPE_P (TREE_TYPE (yyvsp[-1].node))) { yyvsp[-1].node = build_wfl_node (yyvsp[-1].node); --- 4771,4808 ---- sig = obstack_finish (&temporary_obstack); yyval.node = build (NEW_ANONYMOUS_ARRAY_EXPR, NULL_TREE, yyvsp[-2].node, get_identifier (sig), yyvsp[0].node); ! ; ! break;} ! case 384: ! #line 2142 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { int osb = pop_current_osb (ctxp); tree type = yyvsp[-2].node; while (osb--) type = build_java_array_type (type, -1); ! yyval.node = build (NEW_ANONYMOUS_ARRAY_EXPR, NULL_TREE, build_pointer_type (type), NULL_TREE, yyvsp[0].node); ! ; ! break;} ! case 385: ! #line 2151 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("'[' expected"); DRECOVER ("]");; ! break;} ! case 386: ! #line 2153 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("']' expected"); RECOVER;; ! break;} ! case 387: ! #line 2158 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_tree_list (NULL_TREE, yyvsp[0].node); ; ! break;} ! case 388: ! #line 2160 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = tree_cons (NULL_TREE, yyvsp[0].node, yyval.node); ; ! break;} ! case 389: ! #line 2165 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { if (JNUMERIC_TYPE_P (TREE_TYPE (yyvsp[-1].node))) { yyvsp[-1].node = build_wfl_node (yyvsp[-1].node); *************** yyreduce: *** 5323,5348 **** } EXPR_WFL_LINECOL (yyvsp[-1].node) = yyvsp[-2].operator.location; yyval.node = yyvsp[-1].node; ! ;} ! break; ! ! case 386: ! #line 2169 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("']' expected"); RECOVER;;} ! break; ! ! case 387: ! #line 2171 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyerror ("Missing term"); yyerror ("']' expected"); RECOVER; ! ;} ! break; ! ! case 388: ! #line 2180 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { int allocate = 0; /* If not initialized, allocate memory for the osb numbers stack */ --- 4810,4832 ---- } EXPR_WFL_LINECOL (yyvsp[-1].node) = yyvsp[-2].operator.location; yyval.node = yyvsp[-1].node; ! ; ! break;} ! case 390: ! #line 2175 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("']' expected"); RECOVER;; ! break;} ! case 391: ! #line 2177 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyerror ("Missing term"); yyerror ("']' expected"); RECOVER; ! ; ! break;} ! case 392: ! #line 2186 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { int allocate = 0; /* If not initialized, allocate memory for the osb numbers stack */ *************** yyreduce: *** 5354,5360 **** /* If capacity overflown, reallocate a bigger chunk */ else if (ctxp->osb_depth+1 == ctxp->osb_limit) allocate = ctxp->osb_limit << 1; ! if (allocate) { allocate *= sizeof (int); --- 4838,4844 ---- /* If capacity overflown, reallocate a bigger chunk */ else if (ctxp->osb_depth+1 == ctxp->osb_limit) allocate = ctxp->osb_limit << 1; ! if (allocate) { allocate *= sizeof (int); *************** yyreduce: *** 5366,5614 **** } ctxp->osb_depth++; CURRENT_OSB (ctxp) = 1; ! ;} ! break; ! ! case 389: ! #line 2206 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { CURRENT_OSB (ctxp)++; ;} ! break; ! ! case 390: ! #line 2208 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyerror ("']' expected"); RECOVER;;} ! break; ! ! case 391: ! #line 2213 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = make_qualified_primary (yyvsp[-2].node, yyvsp[0].node, yyvsp[-1].operator.location); ;} ! break; ! ! case 392: ! #line 2217 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { tree super_wfl = build_wfl_node (super_identifier_node); EXPR_WFL_LINECOL (super_wfl) = yyvsp[-2].operator.location; yyval.node = make_qualified_name (super_wfl, yyvsp[0].node, yyvsp[-1].operator.location); ! ;} ! break; ! ! case 393: ! #line 2223 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Field expected"); DRECOVER (super_field_acces);;} ! break; ! ! case 394: ! #line 2228 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_method_invocation (yyvsp[-2].node, NULL_TREE); ;} ! break; ! ! case 395: ! #line 2230 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_method_invocation (yyvsp[-3].node, yyvsp[-1].node); ;} ! break; ! ! case 396: ! #line 2232 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { if (TREE_CODE (yyvsp[-4].node) == THIS_EXPR) ! yyval.node = build_this_super_qualified_invocation (1, yyvsp[-2].node, NULL_TREE, 0, yyvsp[-3].operator.location); else { tree invok = build_method_invocation (yyvsp[-2].node, NULL_TREE); yyval.node = make_qualified_primary (yyvsp[-4].node, invok, yyvsp[-3].operator.location); } ! ;} ! break; ! ! case 397: ! #line 2243 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { if (TREE_CODE (yyvsp[-5].node) == THIS_EXPR) ! yyval.node = build_this_super_qualified_invocation (1, yyvsp[-3].node, yyvsp[-1].node, 0, yyvsp[-4].operator.location); else { tree invok = build_method_invocation (yyvsp[-3].node, yyvsp[-1].node); yyval.node = make_qualified_primary (yyvsp[-5].node, invok, yyvsp[-4].operator.location); } ! ;} ! break; ! ! case 398: ! #line 2254 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { ! yyval.node = build_this_super_qualified_invocation (0, yyvsp[-2].node, NULL_TREE, yyvsp[-4].operator.location, yyvsp[-3].operator.location); ! ;} ! break; ! ! case 399: ! #line 2259 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { ! yyval.node = build_this_super_qualified_invocation (0, yyvsp[-3].node, yyvsp[-1].node, yyvsp[-5].operator.location, yyvsp[-4].operator.location); ! ;} ! break; ! ! case 400: ! #line 2268 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyerror ("'(' expected"); DRECOVER (method_invocation); ;} ! break; ! ! case 401: ! #line 2270 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyerror ("'(' expected"); DRECOVER (method_invocation); ;} ! break; ! ! case 402: ! #line 2275 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_array_ref (yyvsp[-2].operator.location, yyvsp[-3].node, yyvsp[-1].node); ;} ! break; ! ! case 403: ! #line 2277 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_array_ref (yyvsp[-2].operator.location, yyvsp[-3].node, yyvsp[-1].node); ;} ! break; ! ! case 404: ! #line 2279 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyerror ("Missing term and ']' expected"); DRECOVER(array_access); ! ;} ! break; ! ! case 405: ! #line 2284 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyerror ("']' expected"); DRECOVER(array_access); ! ;} ! break; ! ! case 406: ! #line 2289 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyerror ("Missing term and ']' expected"); DRECOVER(array_access); ! ;} ! break; ! ! case 407: ! #line 2294 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyerror ("']' expected"); DRECOVER(array_access); ! ;} ! break; ! ! case 412: ! #line 2309 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_incdec (yyvsp[0].operator.token, yyvsp[0].operator.location, yyvsp[-1].node, 1); ;} ! break; ! ! case 413: ! #line 2314 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_incdec (yyvsp[0].operator.token, yyvsp[0].operator.location, yyvsp[-1].node, 1); ;} ! break; ! ! case 416: ! #line 2321 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyval.node = build_unaryop (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node); ;} ! break; ! ! case 418: ! #line 2324 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;} ! break; ! ! case 419: ! #line 2329 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { error_if_numeric_overflow (yyvsp[0].node); yyval.node = yyvsp[0].node; ! ;} ! break; ! ! case 420: ! #line 2334 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyval.node = build_unaryop (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node); ;} ! break; ! ! case 421: ! #line 2336 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;} ! break; ! ! case 422: ! #line 2341 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyval.node = build_incdec (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node, 0); ;} ! break; ! ! case 423: ! #line 2343 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;} ! break; ! ! case 424: ! #line 2348 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyval.node = build_incdec (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node, 0); ;} ! break; ! ! case 425: ! #line 2350 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;} ! break; ! ! case 427: ! #line 2356 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyval.node = build_unaryop (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node); ;} ! break; ! ! case 428: ! #line 2358 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyval.node = build_unaryop (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node); ;} ! break; ! ! case 430: ! #line 2361 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;} ! break; ! ! case 431: ! #line 2363 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;} ! break; ! ! case 432: ! #line 2368 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { tree type = yyvsp[-3].node; int osb = pop_current_osb (ctxp); while (osb--) type = build_java_array_type (type, -1); ! yyval.node = build_cast (yyvsp[-4].operator.location, type, yyvsp[0].node); ! ;} ! break; ! ! case 433: ! #line 2376 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_cast (yyvsp[-3].operator.location, yyvsp[-2].node, yyvsp[0].node); ;} ! break; ! ! case 434: ! #line 2378 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_cast (yyvsp[-3].operator.location, yyvsp[-2].node, yyvsp[0].node); ;} ! break; ! ! case 435: ! #line 2380 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { const char *ptr; ! int osb = pop_current_osb (ctxp); ! obstack_grow (&temporary_obstack, IDENTIFIER_POINTER (EXPR_WFL_NODE (yyvsp[-3].node)), IDENTIFIER_LENGTH (EXPR_WFL_NODE (yyvsp[-3].node))); while (osb--) --- 4850,5060 ---- } ctxp->osb_depth++; CURRENT_OSB (ctxp) = 1; ! ; ! break;} ! case 393: ! #line 2212 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { CURRENT_OSB (ctxp)++; ; ! break;} ! case 394: ! #line 2214 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyerror ("']' expected"); RECOVER;; ! break;} ! case 395: ! #line 2219 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = make_qualified_primary (yyvsp[-2].node, yyvsp[0].node, yyvsp[-1].operator.location); ; ! break;} ! case 396: ! #line 2223 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { tree super_wfl = build_wfl_node (super_identifier_node); EXPR_WFL_LINECOL (super_wfl) = yyvsp[-2].operator.location; yyval.node = make_qualified_name (super_wfl, yyvsp[0].node, yyvsp[-1].operator.location); ! ; ! break;} ! case 397: ! #line 2229 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Field expected"); DRECOVER (super_field_acces);; ! break;} ! case 398: ! #line 2234 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_method_invocation (yyvsp[-2].node, NULL_TREE); ; ! break;} ! case 399: ! #line 2236 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_method_invocation (yyvsp[-3].node, yyvsp[-1].node); ; ! break;} ! case 400: ! #line 2238 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { if (TREE_CODE (yyvsp[-4].node) == THIS_EXPR) ! yyval.node = build_this_super_qualified_invocation (1, yyvsp[-2].node, NULL_TREE, 0, yyvsp[-3].operator.location); else { tree invok = build_method_invocation (yyvsp[-2].node, NULL_TREE); yyval.node = make_qualified_primary (yyvsp[-4].node, invok, yyvsp[-3].operator.location); } ! ; ! break;} ! case 401: ! #line 2249 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { if (TREE_CODE (yyvsp[-5].node) == THIS_EXPR) ! yyval.node = build_this_super_qualified_invocation (1, yyvsp[-3].node, yyvsp[-1].node, 0, yyvsp[-4].operator.location); else { tree invok = build_method_invocation (yyvsp[-3].node, yyvsp[-1].node); yyval.node = make_qualified_primary (yyvsp[-5].node, invok, yyvsp[-4].operator.location); } ! ; ! break;} ! case 402: ! #line 2260 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { ! yyval.node = build_this_super_qualified_invocation (0, yyvsp[-2].node, NULL_TREE, yyvsp[-4].operator.location, yyvsp[-3].operator.location); ! ; ! break;} ! case 403: ! #line 2265 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { ! yyval.node = build_this_super_qualified_invocation (0, yyvsp[-3].node, yyvsp[-1].node, yyvsp[-5].operator.location, yyvsp[-4].operator.location); ! ; ! break;} ! case 404: ! #line 2274 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyerror ("'(' expected"); DRECOVER (method_invocation); ; ! break;} ! case 405: ! #line 2276 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyerror ("'(' expected"); DRECOVER (method_invocation); ; ! break;} ! case 406: ! #line 2281 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_array_ref (yyvsp[-2].operator.location, yyvsp[-3].node, yyvsp[-1].node); ; ! break;} ! case 407: ! #line 2283 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_array_ref (yyvsp[-2].operator.location, yyvsp[-3].node, yyvsp[-1].node); ; ! break;} ! case 408: ! #line 2285 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyerror ("Missing term and ']' expected"); DRECOVER(array_access); ! ; ! break;} ! case 409: ! #line 2290 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyerror ("']' expected"); DRECOVER(array_access); ! ; ! break;} ! case 410: ! #line 2295 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyerror ("Missing term and ']' expected"); DRECOVER(array_access); ! ; ! break;} ! case 411: ! #line 2300 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyerror ("']' expected"); DRECOVER(array_access); ! ; ! break;} ! case 416: ! #line 2315 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_incdec (yyvsp[0].operator.token, yyvsp[0].operator.location, yyvsp[-1].node, 1); ; ! break;} ! case 417: ! #line 2320 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_incdec (yyvsp[0].operator.token, yyvsp[0].operator.location, yyvsp[-1].node, 1); ; ! break;} ! case 420: ! #line 2327 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyval.node = build_unaryop (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node); ; ! break;} ! case 422: ! #line 2330 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER; ! break;} ! case 423: ! #line 2335 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { error_if_numeric_overflow (yyvsp[0].node); yyval.node = yyvsp[0].node; ! ; ! break;} ! case 424: ! #line 2340 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyval.node = build_unaryop (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node); ; ! break;} ! case 425: ! #line 2342 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER; ! break;} ! case 426: ! #line 2347 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyval.node = build_incdec (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node, 0); ; ! break;} ! case 427: ! #line 2349 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER; ! break;} ! case 428: ! #line 2354 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyval.node = build_incdec (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node, 0); ; ! break;} ! case 429: ! #line 2356 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER; ! break;} ! case 431: ! #line 2362 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyval.node = build_unaryop (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node); ; ! break;} ! case 432: ! #line 2364 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyval.node = build_unaryop (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node); ; ! break;} ! case 434: ! #line 2367 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER; ! break;} ! case 435: ! #line 2369 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER; ! break;} ! case 436: ! #line 2374 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { tree type = yyvsp[-3].node; int osb = pop_current_osb (ctxp); while (osb--) type = build_java_array_type (type, -1); ! yyval.node = build_cast (yyvsp[-4].operator.location, type, yyvsp[0].node); ! ; ! break;} ! case 437: ! #line 2382 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_cast (yyvsp[-3].operator.location, yyvsp[-2].node, yyvsp[0].node); ; ! break;} ! case 438: ! #line 2384 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_cast (yyvsp[-3].operator.location, yyvsp[-2].node, yyvsp[0].node); ; ! break;} ! case 439: ! #line 2386 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { const char *ptr; ! int osb = pop_current_osb (ctxp); ! obstack_grow (&temporary_obstack, IDENTIFIER_POINTER (EXPR_WFL_NODE (yyvsp[-3].node)), IDENTIFIER_LENGTH (EXPR_WFL_NODE (yyvsp[-3].node))); while (osb--) *************** yyreduce: *** 5617,5964 **** ptr = obstack_finish (&temporary_obstack); EXPR_WFL_NODE (yyvsp[-3].node) = get_identifier (ptr); yyval.node = build_cast (yyvsp[-4].operator.location, yyvsp[-3].node, yyvsp[0].node); ! ;} ! break; ! ! case 436: ! #line 2394 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("']' expected, invalid type expression");;} ! break; ! ! case 437: ! #line 2396 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { YYNOT_TWICE yyerror ("Invalid type expression"); RECOVER; RECOVER; ! ;} ! break; ! ! case 438: ! #line 2401 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;;} ! break; ! ! case 439: ! #line 2403 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;;} ! break; ! ! case 440: ! #line 2405 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;;} ! break; ! ! case 442: ! #line 2411 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { ! yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ! ;} ! break; ! ! case 443: ! #line 2416 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, ! yyvsp[-2].node, yyvsp[0].node); ! ;} ! break; ! ! case 444: ! #line 2421 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, ! yyvsp[-2].node, yyvsp[0].node); ! ;} ! break; ! ! case 445: ! #line 2426 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;;} ! break; ! ! case 446: ! #line 2428 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;;} ! break; ! ! case 447: ! #line 2430 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;;} ! break; ! ! case 449: ! #line 2436 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, ! yyvsp[-2].node, yyvsp[0].node); ! ;} ! break; ! ! case 450: ! #line 2441 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, ! yyvsp[-2].node, yyvsp[0].node); ! ;} ! break; ! ! case 451: ! #line 2446 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;;} ! break; ! ! case 452: ! #line 2448 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;;} ! break; ! ! case 454: ! #line 2454 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, ! yyvsp[-2].node, yyvsp[0].node); ! ;} ! break; ! ! case 455: ! #line 2459 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, ! yyvsp[-2].node, yyvsp[0].node); ! ;} ! break; ! ! case 456: ! #line 2464 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, ! yyvsp[-2].node, yyvsp[0].node); ! ;} ! break; ! ! case 457: ! #line 2469 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;;} ! break; ! ! case 458: ! #line 2471 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;;} ! break; ! ! case 459: ! #line 2473 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;;} ! break; ! ! case 461: ! #line 2479 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, ! yyvsp[-2].node, yyvsp[0].node); ! ;} ! break; ! ! case 462: ! #line 2484 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, ! yyvsp[-2].node, yyvsp[0].node); ! ;} ! break; ! ! case 463: ! #line 2489 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, ! yyvsp[-2].node, yyvsp[0].node); ! ;} ! break; ! ! case 464: ! #line 2494 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, ! yyvsp[-2].node, yyvsp[0].node); ! ;} ! break; ! ! case 465: ! #line 2499 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_binop (INSTANCEOF_EXPR, yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ;} ! break; ! ! case 466: ! #line 2501 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;;} ! break; ! ! case 467: ! #line 2503 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;;} ! break; ! ! case 468: ! #line 2505 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;;} ! break; ! ! case 469: ! #line 2507 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;;} ! break; ! ! case 470: ! #line 2509 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Invalid reference type"); RECOVER;;} ! break; ! ! case 472: ! #line 2515 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, ! yyvsp[-2].node, yyvsp[0].node); ! ;} ! break; ! ! case 473: ! #line 2520 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, ! yyvsp[-2].node, yyvsp[0].node); ! ;} ! break; ! ! case 474: ! #line 2525 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;;} ! break; ! ! case 475: ! #line 2527 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;;} ! break; ! ! case 477: ! #line 2533 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, ! yyvsp[-2].node, yyvsp[0].node); ! ;} ! break; ! ! case 478: ! #line 2538 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;;} ! break; ! ! case 480: ! #line 2544 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, ! yyvsp[-2].node, yyvsp[0].node); ! ;} ! break; ! ! case 481: ! #line 2549 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;;} ! break; ! ! case 483: ! #line 2555 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, ! yyvsp[-2].node, yyvsp[0].node); ! ;} ! break; ! ! case 484: ! #line 2560 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;;} ! break; ! ! case 486: ! #line 2566 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, ! yyvsp[-2].node, yyvsp[0].node); ! ;} ! break; ! ! case 487: ! #line 2571 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;;} ! break; ! ! case 489: ! #line 2577 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, ! yyvsp[-2].node, yyvsp[0].node); ! ;} ! break; ! ! case 490: ! #line 2582 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;;} ! break; ! ! case 492: ! #line 2588 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build (CONDITIONAL_EXPR, NULL_TREE, yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node); EXPR_WFL_LINECOL (yyval.node) = yyvsp[-3].operator.location; ! ;} ! break; ! ! case 493: ! #line 2593 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { YYERROR_NOW; yyerror ("Missing term"); DRECOVER (1); ! ;} ! break; ! ! case 494: ! #line 2599 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); DRECOVER (2);;} ! break; ! ! case 495: ! #line 2601 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! {yyerror ("Missing term"); DRECOVER (3);;} ! break; ! ! case 498: ! #line 2611 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { yyval.node = build_assignment (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ;} ! break; ! ! case 499: ! #line 2613 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" ! { YYNOT_TWICE yyerror ("Missing term"); DRECOVER (assign); ! ;} ! break; ! ! } - /* Line 991 of yacc.c. */ - #line 5952 "p2378.c" yyvsp -= yylen; yyssp -= yylen; ! ! YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; ! /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule --- 5063,5370 ---- ptr = obstack_finish (&temporary_obstack); EXPR_WFL_NODE (yyvsp[-3].node) = get_identifier (ptr); yyval.node = build_cast (yyvsp[-4].operator.location, yyvsp[-3].node, yyvsp[0].node); ! ; ! break;} ! case 440: ! #line 2400 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("']' expected, invalid type expression");; ! break;} ! case 441: ! #line 2402 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { YYNOT_TWICE yyerror ("Invalid type expression"); RECOVER; RECOVER; ! ; ! break;} ! case 442: ! #line 2407 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;; ! break;} ! case 443: ! #line 2409 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;; ! break;} ! case 444: ! #line 2411 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;; ! break;} ! case 446: ! #line 2417 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { ! yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ! ; ! break;} ! case 447: ! #line 2422 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, ! yyvsp[-2].node, yyvsp[0].node); ! ; ! break;} ! case 448: ! #line 2427 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, ! yyvsp[-2].node, yyvsp[0].node); ! ; ! break;} ! case 449: ! #line 2432 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;; ! break;} ! case 450: ! #line 2434 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;; ! break;} ! case 451: ! #line 2436 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;; ! break;} ! case 453: ! #line 2442 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, ! yyvsp[-2].node, yyvsp[0].node); ! ; ! break;} ! case 454: ! #line 2447 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, ! yyvsp[-2].node, yyvsp[0].node); ! ; ! break;} ! case 455: ! #line 2452 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;; ! break;} ! case 456: ! #line 2454 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;; ! break;} ! case 458: ! #line 2460 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, ! yyvsp[-2].node, yyvsp[0].node); ! ; ! break;} ! case 459: ! #line 2465 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, ! yyvsp[-2].node, yyvsp[0].node); ! ; ! break;} ! case 460: ! #line 2470 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, ! yyvsp[-2].node, yyvsp[0].node); ! ; ! break;} ! case 461: ! #line 2475 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;; ! break;} ! case 462: ! #line 2477 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;; ! break;} ! case 463: ! #line 2479 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;; ! break;} ! case 465: ! #line 2485 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, ! yyvsp[-2].node, yyvsp[0].node); ! ; ! break;} ! case 466: ! #line 2490 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, ! yyvsp[-2].node, yyvsp[0].node); ! ; ! break;} ! case 467: ! #line 2495 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, ! yyvsp[-2].node, yyvsp[0].node); ! ; ! break;} ! case 468: ! #line 2500 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, ! yyvsp[-2].node, yyvsp[0].node); ! ; ! break;} ! case 469: ! #line 2505 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_binop (INSTANCEOF_EXPR, yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; ! break;} ! case 470: ! #line 2507 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;; ! break;} ! case 471: ! #line 2509 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;; ! break;} ! case 472: ! #line 2511 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;; ! break;} ! case 473: ! #line 2513 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;; ! break;} ! case 474: ! #line 2515 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Invalid reference type"); RECOVER;; ! break;} ! case 476: ! #line 2521 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, ! yyvsp[-2].node, yyvsp[0].node); ! ; ! break;} ! case 477: ! #line 2526 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, ! yyvsp[-2].node, yyvsp[0].node); ! ; ! break;} ! case 478: ! #line 2531 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;; ! break;} ! case 479: ! #line 2533 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;; ! break;} ! case 481: ! #line 2539 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, ! yyvsp[-2].node, yyvsp[0].node); ! ; ! break;} ! case 482: ! #line 2544 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;; ! break;} ! case 484: ! #line 2550 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, ! yyvsp[-2].node, yyvsp[0].node); ! ; ! break;} ! case 485: ! #line 2555 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;; ! break;} ! case 487: ! #line 2561 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, ! yyvsp[-2].node, yyvsp[0].node); ! ; ! break;} ! case 488: ! #line 2566 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;; ! break;} ! case 490: ! #line 2572 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, ! yyvsp[-2].node, yyvsp[0].node); ! ; ! break;} ! case 491: ! #line 2577 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;; ! break;} ! case 493: ! #line 2583 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, ! yyvsp[-2].node, yyvsp[0].node); ! ; ! break;} ! case 494: ! #line 2588 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); RECOVER;; ! break;} ! case 496: ! #line 2594 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build (CONDITIONAL_EXPR, NULL_TREE, yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node); EXPR_WFL_LINECOL (yyval.node) = yyvsp[-3].operator.location; ! ; ! break;} ! case 497: ! #line 2599 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { YYERROR_NOW; yyerror ("Missing term"); DRECOVER (1); ! ; ! break;} ! case 498: ! #line 2605 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); DRECOVER (2);; ! break;} ! case 499: ! #line 2607 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! {yyerror ("Missing term"); DRECOVER (3);; ! break;} ! case 502: ! #line 2617 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { yyval.node = build_assignment (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; ! break;} ! case 503: ! #line 2619 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" ! { YYNOT_TWICE yyerror ("Missing term"); DRECOVER (assign); ! ; ! break;} ! } ! #line 705 "/usr/share/bison/bison.simple" yyvsp -= yylen; yyssp -= yylen; + #if YYLSP_NEEDED + yylsp -= yylen; + #endif ! #if YYDEBUG ! if (yydebug) ! { ! short *yyssp1 = yyss - 1; ! YYFPRINTF (stderr, "state stack now"); ! while (yyssp1 != yyssp) ! YYFPRINTF (stderr, " %d", *++yyssp1); ! YYFPRINTF (stderr, "\n"); ! } ! #endif *++yyvsp = yyval; ! #if YYLSP_NEEDED ! *++yylsp = yyloc; ! #endif /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule *************** yyreduce: *** 5966,5976 **** yyn = yyr1[yyn]; ! yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; ! if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else ! yystate = yydefgoto[yyn - YYNTOKENS]; goto yynewstate; --- 5372,5382 ---- yyn = yyr1[yyn]; ! yystate = yypgoto[yyn - YYNTBASE] + *yyssp; ! if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else ! yystate = yydefgoto[yyn - YYNTBASE]; goto yynewstate; *************** yyerrlab: *** 5983,5995 **** if (!yyerrstatus) { ++yynerrs; ! #if YYERROR_VERBOSE yyn = yypact[yystate]; ! if (YYPACT_NINF < yyn && yyn < YYLAST) { YYSIZE_T yysize = 0; - int yytype = YYTRANSLATE (yychar); char *yymsg; int yyx, yycount; --- 5389,5401 ---- if (!yyerrstatus) { ++yynerrs; ! ! #ifdef YYERROR_VERBOSE yyn = yypact[yystate]; ! if (yyn > YYFLAG && yyn < YYLAST) { YYSIZE_T yysize = 0; char *yymsg; int yyx, yycount; *************** yyerrlab: *** 5998,6012 **** YYCHECK. */ for (yyx = yyn < 0 ? -yyn : 0; yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) ! if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) yysize += yystrlen (yytname[yyx]) + 15, yycount++; ! yysize += yystrlen ("syntax error, unexpected ") + 1; ! yysize += yystrlen (yytname[yytype]); yymsg = (char *) YYSTACK_ALLOC (yysize); if (yymsg != 0) { ! char *yyp = yystpcpy (yymsg, "syntax error, unexpected "); ! yyp = yystpcpy (yyp, yytname[yytype]); if (yycount < 5) { --- 5404,5418 ---- YYCHECK. */ for (yyx = yyn < 0 ? -yyn : 0; yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) ! if (yycheck[yyx + yyn] == yyx) yysize += yystrlen (yytname[yyx]) + 15, yycount++; ! yysize += yystrlen ("parse error, unexpected ") + 1; ! yysize += yystrlen (yytname[YYTRANSLATE (yychar)]); yymsg = (char *) YYSTACK_ALLOC (yysize); if (yymsg != 0) { ! char *yyp = yystpcpy (yymsg, "parse error, unexpected "); ! yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]); if (yycount < 5) { *************** yyerrlab: *** 6014,6020 **** for (yyx = yyn < 0 ? -yyn : 0; yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) ! if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) { const char *yyq = ! yycount ? ", expecting " : " or "; yyp = yystpcpy (yyp, yyq); --- 5420,5426 ---- for (yyx = yyn < 0 ? -yyn : 0; yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) ! if (yycheck[yyx + yyn] == yyx) { const char *yyq = ! yycount ? ", expecting " : " or "; yyp = yystpcpy (yyp, yyq); *************** yyerrlab: *** 6026,6117 **** YYSTACK_FREE (yymsg); } else ! yyerror ("syntax error; also virtual memory exhausted"); } else ! #endif /* YYERROR_VERBOSE */ ! yyerror ("syntax error"); } ! if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ ! /* Return failure if at end of input. */ if (yychar == YYEOF) ! { ! /* Pop the error token. */ ! YYPOPSTACK; ! /* Pop the rest of the stack. */ ! while (yyss < yyssp) ! { ! YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); ! yydestruct (yystos[*yyssp], yyvsp); ! YYPOPSTACK; ! } ! YYABORT; ! } ! ! YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc); ! yydestruct (yytoken, &yylval); yychar = YYEMPTY; - } /* Else will try to reuse lookahead token after shifting the error token. */ - goto yyerrlab2; ! /*----------------------------------------------------. ! | yyerrlab1 -- error raised explicitly by an action. | ! `----------------------------------------------------*/ ! yyerrlab1: - /* Suppress GCC warning that yyerrlab1 is unused when no action - invokes YYERROR. */ - #if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__) - __attribute__ ((__unused__)); - #endif ! goto yyerrlab2; /*---------------------------------------------------------------. ! | yyerrlab2 -- pop states until the error token can be shifted. | `---------------------------------------------------------------*/ ! yyerrlab2: ! yyerrstatus = 3; /* Each real token shifted decrements this. */ ! for (;;) { ! yyn = yypact[yystate]; ! if (yyn != YYPACT_NINF) ! { ! yyn += YYTERROR; ! if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) ! { ! yyn = yytable[yyn]; ! if (0 < yyn) ! break; ! } ! } ! /* Pop the current state because it cannot handle the error token. */ ! if (yyssp == yyss) ! YYABORT; ! YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); ! yydestruct (yystos[yystate], yyvsp); ! yyvsp--; ! yystate = *--yyssp; ! YY_STACK_PRINT (yyss, yyssp); } if (yyn == YYFINAL) YYACCEPT; --- 5432,5533 ---- YYSTACK_FREE (yymsg); } else ! yyerror ("parse error; also virtual memory exhausted"); } else ! #endif /* defined (YYERROR_VERBOSE) */ ! yyerror ("parse error"); } + goto yyerrlab1; ! /*--------------------------------------------------. ! | yyerrlab1 -- error raised explicitly by an action | ! `--------------------------------------------------*/ ! yyerrlab1: if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ ! /* return failure if at end of input */ if (yychar == YYEOF) ! YYABORT; ! YYDPRINTF ((stderr, "Discarding token %d (%s).\n", ! yychar, yytname[yychar1])); yychar = YYEMPTY; } /* Else will try to reuse lookahead token after shifting the error token. */ + yyerrstatus = 3; /* Each real token shifted decrements this */ ! goto yyerrhandle; + /*-------------------------------------------------------------------. + | yyerrdefault -- current state does not do anything special for the | + | error token. | + `-------------------------------------------------------------------*/ + yyerrdefault: + #if 0 + /* This is wrong; only states that explicitly want error tokens + should shift them. */ ! /* If its default is to accept any token, ok. Otherwise pop it. */ ! yyn = yydefact[yystate]; ! if (yyn) ! goto yydefault; ! #endif /*---------------------------------------------------------------. ! | yyerrpop -- pop the current state because it cannot handle the | ! | error token | `---------------------------------------------------------------*/ ! yyerrpop: ! if (yyssp == yyss) ! YYABORT; ! yyvsp--; ! yystate = *--yyssp; ! #if YYLSP_NEEDED ! yylsp--; ! #endif ! #if YYDEBUG ! if (yydebug) { ! short *yyssp1 = yyss - 1; ! YYFPRINTF (stderr, "Error: state stack now"); ! while (yyssp1 != yyssp) ! YYFPRINTF (stderr, " %d", *++yyssp1); ! YYFPRINTF (stderr, "\n"); ! } ! #endif ! /*--------------. ! | yyerrhandle. | ! `--------------*/ ! yyerrhandle: ! yyn = yypact[yystate]; ! if (yyn == YYFLAG) ! goto yyerrdefault; ! yyn += YYTERROR; ! if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) ! goto yyerrdefault; ! yyn = yytable[yyn]; ! if (yyn < 0) ! { ! if (yyn == YYFLAG) ! goto yyerrpop; ! yyn = -yyn; ! goto yyreduce; } + else if (yyn == 0) + goto yyerrpop; if (yyn == YYFINAL) YYACCEPT; *************** yyerrlab2: *** 6119,6125 **** YYDPRINTF ((stderr, "Shifting error token, ")); *++yyvsp = yylval; ! yystate = yyn; goto yynewstate; --- 5535,5543 ---- YYDPRINTF ((stderr, "Shifting error token, ")); *++yyvsp = yylval; ! #if YYLSP_NEEDED ! *++yylsp = yylloc; ! #endif yystate = yyn; goto yynewstate; *************** yyabortlab: *** 6139,6153 **** yyresult = 1; goto yyreturn; ! #ifndef yyoverflow ! /*----------------------------------------------. ! | yyoverflowlab -- parser overflow comes here. | ! `----------------------------------------------*/ yyoverflowlab: yyerror ("parser stack overflow"); yyresult = 2; /* Fall through. */ - #endif yyreturn: #ifndef yyoverflow --- 5557,5569 ---- yyresult = 1; goto yyreturn; ! /*---------------------------------------------. ! | yyoverflowab -- parser overflow comes here. | ! `---------------------------------------------*/ yyoverflowlab: yyerror ("parser stack overflow"); yyresult = 2; /* Fall through. */ yyreturn: #ifndef yyoverflow *************** yyreturn: *** 6156,6164 **** #endif return yyresult; } ! ! ! #line 2638 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse.y" /* Helper function to retrieve an OSB count. Should be used when the --- 5572,5578 ---- #endif return yyresult; } ! #line 2644 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse.y" /* Helper function to retrieve an OSB count. Should be used when the *************** pop_current_osb (ctxp) *** 6172,6181 **** if (ctxp->osb_depth < 0) abort (); ! to_return = CURRENT_OSB (ctxp); ctxp->osb_depth--; ! return to_return; } --- 5586,5595 ---- if (ctxp->osb_depth < 0) abort (); ! to_return = CURRENT_OSB (ctxp); ctxp->osb_depth--; ! return to_return; } *************** pop_current_osb (ctxp) *** 6185,6191 **** Add mode documentation here. FIXME */ /* Helper function. Create a new parser context. With ! COPY_FROM_PREVIOUS set to a non zero value, content of the previous context is copied, otherwise, the new context is zeroed. The newly created context becomes the current one. */ --- 5599,5605 ---- Add mode documentation here. FIXME */ /* Helper function. Create a new parser context. With ! COPY_FROM_PREVIOUS set to a nonzero value, content of the previous context is copied, otherwise, the new context is zeroed. The newly created context becomes the current one. */ *************** create_new_parser_context (copy_from_pre *** 6203,6209 **** } else memset ((PTR) new, 0, sizeof (struct parser_ctxt)); ! new->next = ctxp; ctxp = new; } --- 5617,5623 ---- } else memset ((PTR) new, 0, sizeof (struct parser_ctxt)); ! new->next = ctxp; ctxp = new; } *************** void *** 6214,6222 **** java_push_parser_context () { create_new_parser_context (0); ! } ! void java_pop_parser_context (generate) int generate; { --- 5628,5636 ---- java_push_parser_context () { create_new_parser_context (0); ! } ! void java_pop_parser_context (generate) int generate; { *************** java_pop_parser_context (generate) *** 6247,6253 **** if ((ctxp = next)) /* Assignment is really meant here */ for (current = ctxp->import_list; current; current = TREE_CHAIN (current)) IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P (TREE_VALUE (current)) = 1; ! /* If we pushed a context to parse a class intended to be generated, we keep it so we can remember the class. What we could actually do is to just update a list of class names. */ --- 5661,5667 ---- if ((ctxp = next)) /* Assignment is really meant here */ for (current = ctxp->import_list; current; current = TREE_CHAIN (current)) IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P (TREE_VALUE (current)) = 1; ! /* If we pushed a context to parse a class intended to be generated, we keep it so we can remember the class. What we could actually do is to just update a list of class names. */ *************** java_parser_context_resume () *** 6354,6360 **** ctxp = restored; /* Re-installed the data for the parsing to carry on */ ! memcpy (&ctxp->marker_begining, &old->marker_begining, (size_t)(&ctxp->marker_end - &ctxp->marker_begining)); /* Buffer context can now be discarded */ --- 5768,5774 ---- ctxp = restored; /* Re-installed the data for the parsing to carry on */ ! memcpy (&ctxp->marker_begining, &old->marker_begining, (size_t)(&ctxp->marker_end - &ctxp->marker_begining)); /* Buffer context can now be discarded */ *************** java_parser_context_pop_initialized_fiel *** 6405,6411 **** if (CPC_STATIC_INITIALIZER_LIST (ctxp)) { stmts = CPC_STATIC_INITIALIZER_STMT (ctxp); ! CPC_STATIC_INITIALIZER_LIST (ctxp) = TREE_CHAIN (CPC_STATIC_INITIALIZER_LIST (ctxp)); /* Keep initialization in order to enforce 8.5 */ if (stmts && !java_error_count) --- 5819,5825 ---- if (CPC_STATIC_INITIALIZER_LIST (ctxp)) { stmts = CPC_STATIC_INITIALIZER_STMT (ctxp); ! CPC_STATIC_INITIALIZER_LIST (ctxp) = TREE_CHAIN (CPC_STATIC_INITIALIZER_LIST (ctxp)); /* Keep initialization in order to enforce 8.5 */ if (stmts && !java_error_count) *************** java_parser_context_pop_initialized_fiel *** 6416,6422 **** if (CPC_INSTANCE_INITIALIZER_LIST (ctxp)) { stmts = CPC_INSTANCE_INITIALIZER_STMT (ctxp); ! CPC_INSTANCE_INITIALIZER_LIST (ctxp) = TREE_CHAIN (CPC_INSTANCE_INITIALIZER_LIST (ctxp)); if (stmts && !java_error_count) TYPE_II_STMT_LIST (class_type) = nreverse (stmts); --- 5830,5836 ---- if (CPC_INSTANCE_INITIALIZER_LIST (ctxp)) { stmts = CPC_INSTANCE_INITIALIZER_STMT (ctxp); ! CPC_INSTANCE_INITIALIZER_LIST (ctxp) = TREE_CHAIN (CPC_INSTANCE_INITIALIZER_LIST (ctxp)); if (stmts && !java_error_count) TYPE_II_STMT_LIST (class_type) = nreverse (stmts); *************** reorder_static_initialized (list) *** 6432,6441 **** keep them in lexical order. */ tree marker, previous = NULL_TREE; for (marker = list; marker; previous = marker, marker = TREE_CHAIN (marker)) ! if (TREE_CODE (marker) == TREE_LIST && !TREE_VALUE (marker) && !TREE_PURPOSE (marker)) break; ! /* No static initialized, the list is fine as is */ if (!previous) list = TREE_CHAIN (marker); --- 5846,5855 ---- keep them in lexical order. */ tree marker, previous = NULL_TREE; for (marker = list; marker; previous = marker, marker = TREE_CHAIN (marker)) ! if (TREE_CODE (marker) == TREE_LIST && !TREE_VALUE (marker) && !TREE_PURPOSE (marker)) break; ! /* No static initialized, the list is fine as is */ if (!previous) list = TREE_CHAIN (marker); *************** java_debug_context_do (tab) *** 6475,6481 **** fprintf (stderr, "lineno: %d\n", copy->lineno); TAB_CONTEXT (tab); fprintf (stderr, "package: %s\n", ! (copy->package ? IDENTIFIER_POINTER (copy->package) : "")); TAB_CONTEXT (tab); fprintf (stderr, "context for saving: %d\n", copy->saved_data_ctx); --- 5889,5895 ---- fprintf (stderr, "lineno: %d\n", copy->lineno); TAB_CONTEXT (tab); fprintf (stderr, "package: %s\n", ! (copy->package ? IDENTIFIER_POINTER (copy->package) : "")); TAB_CONTEXT (tab); fprintf (stderr, "context for saving: %d\n", copy->saved_data_ctx); *************** static void *** 6508,6514 **** parse_ctor_invocation_error () { if (DECL_CONSTRUCTOR_P (current_function_decl)) ! yyerror ("Constructor invocation must be first thing in a constructor"); else yyerror ("Only constructors can invoke constructors"); } --- 5922,5928 ---- parse_ctor_invocation_error () { if (DECL_CONSTRUCTOR_P (current_function_decl)) ! yyerror ("Constructor invocation must be first thing in a constructor"); else yyerror ("Only constructors can invoke constructors"); } *************** yyerror (msg) *** 6536,6542 **** int save_lineno; char *remainder, *code_from_source; ! if (!force_error && prev_lineno == lineno) return; --- 5950,5956 ---- int save_lineno; char *remainder, *code_from_source; ! if (!force_error && prev_lineno == lineno) return; *************** yyerror (msg) *** 6563,6569 **** java_warning_count++; else java_error_count++; ! if (elc.col == 0 && msg && msg[1] == ';') { elc.col = ctxp->p_line->char_col-1; --- 5977,5983 ---- java_warning_count++; else java_error_count++; ! if (elc.col == 0 && msg && msg[1] == ';') { elc.col = ctxp->p_line->char_col-1; *************** yyerror (msg) *** 6575,6581 **** prev_msg = msg; code_from_source = java_get_line_col (ctxp->filename, elc.line, elc.col); ! obstack_grow0 (&temporary_obstack, code_from_source, strlen (code_from_source)); remainder = obstack_finish (&temporary_obstack); if (do_warning) --- 5989,5995 ---- prev_msg = msg; code_from_source = java_get_line_col (ctxp->filename, elc.line, elc.col); ! obstack_grow0 (&temporary_obstack, code_from_source, strlen (code_from_source)); remainder = obstack_finish (&temporary_obstack); if (do_warning) *************** issue_warning_error_from_context (cl, ms *** 6603,6609 **** force_error = 1; ctxp->elc.line = EXPR_WFL_LINENO (cl); ! ctxp->elc.col = (EXPR_WFL_COLNO (cl) == 0xfff ? -1 : (EXPR_WFL_COLNO (cl) == 0xffe ? -2 : EXPR_WFL_COLNO (cl))); /* We have a CL, that's a good reason for using it if it contains data */ --- 6017,6023 ---- force_error = 1; ctxp->elc.line = EXPR_WFL_LINENO (cl); ! ctxp->elc.col = (EXPR_WFL_COLNO (cl) == 0xfff ? -1 : (EXPR_WFL_COLNO (cl) == 0xffe ? -2 : EXPR_WFL_COLNO (cl))); /* We have a CL, that's a good reason for using it if it contains data */ *************** find_expr_with_wfl (node) *** 6671,6677 **** case LOOP_EXPR: node = TREE_OPERAND (node, 0); continue; ! case LABELED_BLOCK_EXPR: node = TREE_OPERAND (node, 1); continue; --- 6085,6091 ---- case LOOP_EXPR: node = TREE_OPERAND (node, 0); continue; ! case LABELED_BLOCK_EXPR: node = TREE_OPERAND (node, 1); continue; *************** int *** 6724,6730 **** java_report_errors () { if (java_error_count) ! fprintf (stderr, "%d error%s", java_error_count, (java_error_count == 1 ? "" : "s")); if (java_warning_count) fprintf (stderr, "%s%d warning%s", (java_error_count ? ", " : ""), --- 6138,6144 ---- java_report_errors () { if (java_error_count) ! fprintf (stderr, "%d error%s", java_error_count, (java_error_count == 1 ? "" : "s")); if (java_warning_count) fprintf (stderr, "%s%d warning%s", (java_error_count ? ", " : ""), *************** classitf_redefinition_error (context, id *** 6768,6775 **** const char *context; tree id, decl, cl; { ! parse_error_context (cl, "%s `%s' already defined in %s:%d", ! context, IDENTIFIER_POINTER (id), DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl)); /* Here we should point out where its redefined. It's a unicode. FIXME */ } --- 6182,6189 ---- const char *context; tree id, decl, cl; { ! parse_error_context (cl, "%s `%s' already defined in %s:%d", ! context, IDENTIFIER_POINTER (id), DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl)); /* Here we should point out where its redefined. It's a unicode. FIXME */ } *************** variable_redefinition_error (context, na *** 6788,6794 **** type_name = lang_printable_name (type, 0); parse_error_context (context, ! "Variable `%s' is already defined in this method and was declared `%s %s' at line %d", IDENTIFIER_POINTER (name), type_name, IDENTIFIER_POINTER (name), line); } --- 6202,6208 ---- type_name = lang_printable_name (type, 0); parse_error_context (context, ! "Variable `%s' is already defined in this method and was declared `%s %s' at line %d", IDENTIFIER_POINTER (name), type_name, IDENTIFIER_POINTER (name), line); } *************** build_array_from_name (type, type_wfl, n *** 6823,6829 **** /* Eventually get more dims */ more_dims = build_type_name_from_array_name (name, &name); ! /* If we have, then craft a new type for this variable */ if (more_dims) { --- 6237,6243 ---- /* Eventually get more dims */ more_dims = build_type_name_from_array_name (name, &name); ! /* If we have, then craft a new type for this variable */ if (more_dims) { *************** check_class_interface_creation (is_inter *** 6918,6926 **** int uaaf = CLASS_MODIFIERS; /* Usually allowed access flags */ if (!quiet_flag) ! fprintf (stderr, " %s%s %s", (CPC_INNER_P () ? "inner" : ""), ! (is_interface ? "interface" : "class"), IDENTIFIER_POINTER (qualified_name)); /* Scope of an interface/class type name: --- 6332,6340 ---- int uaaf = CLASS_MODIFIERS; /* Usually allowed access flags */ if (!quiet_flag) ! fprintf (stderr, " %s%s %s", (CPC_INNER_P () ? "inner" : ""), ! (is_interface ? "interface" : "class"), IDENTIFIER_POINTER (qualified_name)); /* Scope of an interface/class type name: *************** check_class_interface_creation (is_inter *** 6930,6936 **** && (node = find_name_in_single_imports (raw_name)) && !CPC_INNER_P ()) { ! parse_error_context (cl, "%s name `%s' clashes with imported type `%s'", (is_interface ? "Interface" : "Class"), IDENTIFIER_POINTER (raw_name), IDENTIFIER_POINTER (node)); --- 6344,6350 ---- && (node = find_name_in_single_imports (raw_name)) && !CPC_INNER_P ()) { ! parse_error_context (cl, "%s name `%s' clashes with imported type `%s'", (is_interface ? "Interface" : "Class"), IDENTIFIER_POINTER (raw_name), IDENTIFIER_POINTER (node)); *************** check_class_interface_creation (is_inter *** 6938,6944 **** } if (decl && CLASS_COMPLETE_P (decl)) { ! classitf_redefinition_error ((is_interface ? "Interface" : "Class"), qualified_name, decl, cl); return 1; } --- 6352,6358 ---- } if (decl && CLASS_COMPLETE_P (decl)) { ! classitf_redefinition_error ((is_interface ? "Interface" : "Class"), qualified_name, decl, cl); return 1; } *************** check_class_interface_creation (is_inter *** 6952,6969 **** { const char *f; ! /* Contains OS dependent assumption on path separator. FIXME */ ! for (f = &input_filename [strlen (input_filename)]; ! f != input_filename && f[0] != '/' && f[0] != DIR_SEPARATOR; f--) ; ! if (f[0] == '/' || f[0] == DIR_SEPARATOR) f++; ! if (strncmp (IDENTIFIER_POINTER (raw_name), f , IDENTIFIER_LENGTH (raw_name)) || f [IDENTIFIER_LENGTH (raw_name)] != '.') parse_error_context ! (cl, "Public %s `%s' must be defined in a file called `%s.java'", (is_interface ? "interface" : "class"), IDENTIFIER_POINTER (qualified_name), IDENTIFIER_POINTER (raw_name)); --- 6366,6382 ---- { const char *f; ! for (f = &input_filename [strlen (input_filename)]; ! f != input_filename && ! IS_DIR_SEPARATOR (f[0]); f--) ; ! if (IS_DIR_SEPARATOR (f[0])) f++; ! if (strncmp (IDENTIFIER_POINTER (raw_name), f , IDENTIFIER_LENGTH (raw_name)) || f [IDENTIFIER_LENGTH (raw_name)] != '.') parse_error_context ! (cl, "Public %s `%s' must be defined in a file called `%s.java'", (is_interface ? "interface" : "class"), IDENTIFIER_POINTER (qualified_name), IDENTIFIER_POINTER (raw_name)); *************** check_class_interface_creation (is_inter *** 6978,6984 **** complaining a second time */ if (CPC_INNER_P () && !TOPLEVEL_CLASS_DECL_P (GET_CPC())) { ! parse_error_context (cl, "Inner class `%s' can't be static. Static classes can only occur in interfaces and top-level classes", IDENTIFIER_POINTER (qualified_name)); sca = ACC_STATIC; } --- 6391,6397 ---- complaining a second time */ if (CPC_INNER_P () && !TOPLEVEL_CLASS_DECL_P (GET_CPC())) { ! parse_error_context (cl, "Inner class `%s' can't be static. Static classes can only occur in interfaces and top-level classes", IDENTIFIER_POINTER (qualified_name)); sca = ACC_STATIC; } *************** check_class_interface_creation (is_inter *** 7006,7019 **** } } ! if (is_interface) { if (CPC_INNER_P ()) uaaf = INTERFACE_INNER_MODIFIERS; else uaaf = INTERFACE_MODIFIERS; ! ! check_modifiers ("Illegal modifier `%s' for interface declaration", flags, uaaf); } else --- 6419,6432 ---- } } ! if (is_interface) { if (CPC_INNER_P ()) uaaf = INTERFACE_INNER_MODIFIERS; else uaaf = INTERFACE_MODIFIERS; ! ! check_modifiers ("Illegal modifier `%s' for interface declaration", flags, uaaf); } else *************** check_class_interface_creation (is_inter *** 7024,7047 **** return 0; } ! static void make_nested_class_name (cpc_list) tree cpc_list; { tree name; if (!cpc_list) ! return; ! else ! make_nested_class_name (TREE_CHAIN (cpc_list)); /* Pick the qualified name when dealing with the first upmost enclosing class */ ! name = (TREE_CHAIN (cpc_list) ? ! TREE_PURPOSE (cpc_list) : DECL_NAME (TREE_VALUE (cpc_list))); obstack_grow (&temporary_obstack, IDENTIFIER_POINTER (name), IDENTIFIER_LENGTH (name)); obstack_1grow (&temporary_obstack, '$'); } /* Can't redefine a class already defined in an earlier scope. */ --- 6437,6464 ---- return 0; } ! /* Construct a nested class name. If the final component starts with ! a digit, return true. Otherwise return false. */ ! static int make_nested_class_name (cpc_list) tree cpc_list; { tree name; if (!cpc_list) ! return 0; ! ! make_nested_class_name (TREE_CHAIN (cpc_list)); /* Pick the qualified name when dealing with the first upmost enclosing class */ ! name = (TREE_CHAIN (cpc_list) ! ? TREE_PURPOSE (cpc_list) : DECL_NAME (TREE_VALUE (cpc_list))); obstack_grow (&temporary_obstack, IDENTIFIER_POINTER (name), IDENTIFIER_LENGTH (name)); obstack_1grow (&temporary_obstack, '$'); + + return ISDIGIT (IDENTIFIER_POINTER (name)[0]); } /* Can't redefine a class already defined in an earlier scope. */ *************** check_inner_class_redefinition (raw_name *** 7052,7062 **** { tree scope_list; ! for (scope_list = GET_CPC_LIST (); scope_list; scope_list = GET_NEXT_ENCLOSING_CPC (scope_list)) if (raw_name == GET_CPC_UN_NODE (scope_list)) { ! parse_error_context (cl, "The class name `%s' is already defined in this scope. An inner class may not have the same simple name as any of its enclosing classes", IDENTIFIER_POINTER (raw_name)); return 1; --- 6469,6479 ---- { tree scope_list; ! for (scope_list = GET_CPC_LIST (); scope_list; scope_list = GET_NEXT_ENCLOSING_CPC (scope_list)) if (raw_name == GET_CPC_UN_NODE (scope_list)) { ! parse_error_context (cl, "The class name `%s' is already defined in this scope. An inner class may not have the same simple name as any of its enclosing classes", IDENTIFIER_POINTER (raw_name)); return 1; *************** check_inner_class_redefinition (raw_name *** 7069,7075 **** static tree resolve_inner_class (circularity_hash, cl, enclosing, super, class_type) ! struct hash_table *circularity_hash; tree cl, *enclosing, *super, class_type; { tree local_enclosing = *enclosing; --- 6486,6492 ---- static tree resolve_inner_class (circularity_hash, cl, enclosing, super, class_type) ! htab_t circularity_hash; tree cl, *enclosing, *super, class_type; { tree local_enclosing = *enclosing; *************** resolve_inner_class (circularity_hash, c *** 7079,7086 **** { tree intermediate, decl; ! hash_lookup (circularity_hash, ! (const hash_table_key) local_enclosing, TRUE, NULL); if ((decl = find_as_inner_class (local_enclosing, class_type, cl))) return decl; --- 6496,6503 ---- { tree intermediate, decl; ! *htab_find_slot (circularity_hash, local_enclosing, INSERT) = ! local_enclosing; if ((decl = find_as_inner_class (local_enclosing, class_type, cl))) return decl; *************** resolve_inner_class (circularity_hash, c *** 7108,7119 **** /* We may not have checked for circular inheritance yet, so do so here to prevent an infinite loop. */ ! if (hash_lookup (circularity_hash, ! (const hash_table_key) local_super, FALSE, NULL)) { if (!cl) cl = lookup_cl (local_enclosing); ! parse_error_context (cl, "Cyclic inheritance involving %s", IDENTIFIER_POINTER (DECL_NAME (local_enclosing))); --- 6525,6535 ---- /* We may not have checked for circular inheritance yet, so do so here to prevent an infinite loop. */ ! if (htab_find (circularity_hash, local_super) != NULL) { if (!cl) cl = lookup_cl (local_enclosing); ! parse_error_context (cl, "Cyclic inheritance involving %s", IDENTIFIER_POINTER (DECL_NAME (local_enclosing))); *************** find_as_inner_class (enclosing, name, cl *** 7150,7156 **** qual = build_tree_list (cl, NULL_TREE); else qual = build_tree_list (build_expr_wfl (name, NULL, 0, 0), NULL_TREE); ! if ((to_return = find_as_inner_class_do (qual, enclosing))) return to_return; --- 6566,6572 ---- qual = build_tree_list (cl, NULL_TREE); else qual = build_tree_list (build_expr_wfl (name, NULL, 0, 0), NULL_TREE); ! if ((to_return = find_as_inner_class_do (qual, enclosing))) return to_return; *************** find_as_inner_class (enclosing, name, cl *** 7160,7169 **** { tree acc = NULL_TREE, decl = NULL_TREE, ptr; ! for (qual = EXPR_WFL_QUALIFICATION (cl); qual && !decl; qual = TREE_CHAIN (qual)) { ! acc = merge_qualified_name (acc, EXPR_WFL_NODE (TREE_PURPOSE (qual))); BUILD_PTR_FROM_NAME (ptr, acc); decl = do_resolve_class (NULL_TREE, ptr, NULL_TREE, cl); --- 6576,6585 ---- { tree acc = NULL_TREE, decl = NULL_TREE, ptr; ! for (qual = EXPR_WFL_QUALIFICATION (cl); qual && !decl; qual = TREE_CHAIN (qual)) { ! acc = merge_qualified_name (acc, EXPR_WFL_NODE (TREE_PURPOSE (qual))); BUILD_PTR_FROM_NAME (ptr, acc); decl = do_resolve_class (NULL_TREE, ptr, NULL_TREE, cl); *************** find_as_inner_class (enclosing, name, cl *** 7171,7177 **** /* A NULL qual and a decl means that the search ended successfully?!? We have to do something then. FIXME */ ! if (decl) enclosing = decl; else --- 6587,6593 ---- /* A NULL qual and a decl means that the search ended successfully?!? We have to do something then. FIXME */ ! if (decl) enclosing = decl; else *************** find_as_inner_class (enclosing, name, cl *** 7180,7186 **** /* Otherwise, create a qual for the other part of the resolution. */ else qual = build_tree_list (build_expr_wfl (name, NULL, 0, 0), NULL_TREE); ! return find_as_inner_class_do (qual, enclosing); } --- 6596,6602 ---- /* Otherwise, create a qual for the other part of the resolution. */ else qual = build_tree_list (build_expr_wfl (name, NULL, 0, 0), NULL_TREE); ! return find_as_inner_class_do (qual, enclosing); } *************** set_nested_class_simple_name_value (oute *** 7226,7232 **** tree l; for (l = DECL_INNER_CLASS_LIST (outer); l; l = TREE_CHAIN (l)) ! IDENTIFIER_GLOBAL_VALUE (TREE_VALUE (l)) = (set ? TREE_PURPOSE (l) : NULL_TREE); } --- 6642,6648 ---- tree l; for (l = DECL_INNER_CLASS_LIST (outer); l; l = TREE_CHAIN (l)) ! IDENTIFIER_GLOBAL_VALUE (TREE_VALUE (l)) = (set ? TREE_PURPOSE (l) : NULL_TREE); } *************** link_nested_class_to_enclosing () *** 7236,7242 **** if (GET_ENCLOSING_CPC ()) { tree enclosing = GET_ENCLOSING_CPC_CONTEXT (); ! DECL_INNER_CLASS_LIST (enclosing) = tree_cons (GET_CPC (), GET_CPC_UN (), DECL_INNER_CLASS_LIST (enclosing)); } --- 6652,6658 ---- if (GET_ENCLOSING_CPC ()) { tree enclosing = GET_ENCLOSING_CPC_CONTEXT (); ! DECL_INNER_CLASS_LIST (enclosing) = tree_cons (GET_CPC (), GET_CPC_UN (), DECL_INNER_CLASS_LIST (enclosing)); } *************** maybe_make_nested_class_name (name) *** 7250,7258 **** if (CPC_INNER_P ()) { ! make_nested_class_name (GET_CPC_LIST ()); obstack_grow0 (&temporary_obstack, ! IDENTIFIER_POINTER (name), IDENTIFIER_LENGTH (name)); id = get_identifier (obstack_finish (&temporary_obstack)); if (ctxp->package) --- 6666,6687 ---- if (CPC_INNER_P ()) { ! /* If we're in a function, we must append a number to create the ! nested class name. However, we don't do this if the class we ! are constructing is anonymous, because in that case we'll ! already have a number as the class name. */ ! if (! make_nested_class_name (GET_CPC_LIST ()) ! && current_function_decl != NULL_TREE ! && ! ISDIGIT (IDENTIFIER_POINTER (name)[0])) ! { ! char buf[10]; ! sprintf (buf, "%d", anonymous_class_counter); ! ++anonymous_class_counter; ! obstack_grow (&temporary_obstack, buf, strlen (buf)); ! obstack_1grow (&temporary_obstack, '$'); ! } obstack_grow0 (&temporary_obstack, ! IDENTIFIER_POINTER (name), IDENTIFIER_LENGTH (name)); id = get_identifier (obstack_finish (&temporary_obstack)); if (ctxp->package) *************** maybe_create_class_interface_decl (decl, *** 7297,7303 **** /* Install a new dependency list element */ create_jdep_list (ctxp); ! SOURCE_FRONTEND_DEBUG (("Defining class/interface %s", IDENTIFIER_POINTER (qualified_name))); return decl; } --- 6726,6732 ---- /* Install a new dependency list element */ create_jdep_list (ctxp); ! SOURCE_FRONTEND_DEBUG (("Defining class/interface %s", IDENTIFIER_POINTER (qualified_name))); return decl; } *************** create_interface (flags, id, super) *** 7348,7354 **** EXPR_WFL_NODE (id) = q_name; /* Keep source location, even if refined. */ ! /* Basic checks: scope, redefinition, modifiers */ if (check_class_interface_creation (1, flags, raw_name, q_name, decl, id)) { PUSH_ERROR (); --- 6777,6783 ---- EXPR_WFL_NODE (id) = q_name; /* Keep source location, even if refined. */ ! /* Basic checks: scope, redefinition, modifiers */ if (check_class_interface_creation (1, flags, raw_name, q_name, decl, id)) { PUSH_ERROR (); *************** create_interface (flags, id, super) *** 7373,7379 **** - abstract is obsolete (comes first, it's a warning, or should be) - Can't use twice the same (checked in the modifier rule) */ if ((flags & ACC_ABSTRACT) && flag_redundant) ! parse_warning_context (MODIFIER_WFL (ABSTRACT_TK), "Redundant use of `abstract' modifier. Interface `%s' is implicitly abstract", IDENTIFIER_POINTER (raw_name)); --- 6802,6808 ---- - abstract is obsolete (comes first, it's a warning, or should be) - Can't use twice the same (checked in the modifier rule) */ if ((flags & ACC_ABSTRACT) && flag_redundant) ! parse_warning_context (MODIFIER_WFL (ABSTRACT_TK), "Redundant use of `abstract' modifier. Interface `%s' is implicitly abstract", IDENTIFIER_POINTER (raw_name)); *************** create_interface (flags, id, super) *** 7381,7387 **** decl = maybe_create_class_interface_decl (decl, raw_name, q_name, id); /* Set super info and mark the class a complete */ ! set_super_info (ACC_INTERFACE | flags, TREE_TYPE (decl), object_type_node, ctxp->interface_number); ctxp->interface_number = 0; CLASS_COMPLETE_P (decl) = 1; --- 6810,6816 ---- decl = maybe_create_class_interface_decl (decl, raw_name, q_name, id); /* Set super info and mark the class a complete */ ! set_super_info (ACC_INTERFACE | flags, TREE_TYPE (decl), object_type_node, ctxp->interface_number); ctxp->interface_number = 0; CLASS_COMPLETE_P (decl) = 1; *************** create_interface (flags, id, super) *** 7390,7399 **** return decl; } - /* Anonymous class counter. Will be reset to 1 every time a non - anonymous class gets created. */ - static int anonymous_class_counter = 1; - /* Patch anonymous class CLASS, by either extending or implementing DEP. */ --- 6819,6824 ---- *************** create_class (flags, id, super, interfac *** 7498,7504 **** PUSH_ERROR (); return NULL_TREE; } ! /* Suspend the current parsing context if we're parsing an inner class or an anonymous class. */ if (CPC_INNER_P ()) --- 6923,6929 ---- PUSH_ERROR (); return NULL_TREE; } ! /* Suspend the current parsing context if we're parsing an inner class or an anonymous class. */ if (CPC_INNER_P ()) *************** create_class (flags, id, super, interfac *** 7508,7520 **** if (CLASS_INTERFACE (GET_CPC ())) flags |= ACC_PUBLIC; } ! /* Push a new context for (static) initialized upon declaration fields */ java_parser_context_push_initialized_field (); ! /* Class modifier check: - Allowed modifier (already done at that point) ! - abstract AND final forbidden - Public classes defined in the correct file */ if ((flags & ACC_ABSTRACT) && (flags & ACC_FINAL)) parse_error_context --- 6933,6945 ---- if (CLASS_INTERFACE (GET_CPC ())) flags |= ACC_PUBLIC; } ! /* Push a new context for (static) initialized upon declaration fields */ java_parser_context_push_initialized_field (); ! /* Class modifier check: - Allowed modifier (already done at that point) ! - abstract AND final forbidden - Public classes defined in the correct file */ if ((flags & ACC_ABSTRACT) && (flags & ACC_FINAL)) parse_error_context *************** create_class (flags, id, super, interfac *** 7534,7540 **** return NULL_TREE; } ! super_decl_type = register_incomplete_type (JDEP_SUPER, super, decl, NULL_TREE); } else if (TREE_TYPE (decl) != object_type_node) --- 6959,6965 ---- return NULL_TREE; } ! super_decl_type = register_incomplete_type (JDEP_SUPER, super, decl, NULL_TREE); } else if (TREE_TYPE (decl) != object_type_node) *************** create_class (flags, id, super, interfac *** 7551,7557 **** } /* Set super info and mark the class as complete. */ ! set_super_info (flags, TREE_TYPE (decl), super_decl_type, ctxp->interface_number); ctxp->interface_number = 0; CLASS_COMPLETE_P (decl) = 1; --- 6976,6982 ---- } /* Set super info and mark the class as complete. */ ! set_super_info (flags, TREE_TYPE (decl), super_decl_type, ctxp->interface_number); ctxp->interface_number = 0; CLASS_COMPLETE_P (decl) = 1; *************** add_inner_class_fields (class_decl, fct_ *** 7615,7628 **** f = add_field (TREE_TYPE (class_decl), build_current_thisn (TREE_TYPE (class_decl)), ! build_pointer_type (TREE_TYPE (DECL_CONTEXT (class_decl))), ACC_PRIVATE); FIELD_THISN (f) = 1; if (!fct_decl) return; ! ! for (block = GET_CURRENT_BLOCK (fct_decl); block && TREE_CODE (block) == BLOCK; block = BLOCK_SUPERCONTEXT (block)) { tree decl; --- 7040,7053 ---- f = add_field (TREE_TYPE (class_decl), build_current_thisn (TREE_TYPE (class_decl)), ! build_pointer_type (TREE_TYPE (DECL_CONTEXT (class_decl))), ACC_PRIVATE); FIELD_THISN (f) = 1; if (!fct_decl) return; ! ! for (block = GET_CURRENT_BLOCK (fct_decl); block && TREE_CODE (block) == BLOCK; block = BLOCK_SUPERCONTEXT (block)) { tree decl; *************** add_inner_class_fields (class_decl, fct_ *** 7630,7640 **** { tree name, pname; tree wfl, init, list; ! /* Avoid non final arguments. */ if (!LOCAL_FINAL_P (decl)) continue; ! MANGLE_OUTER_LOCAL_VARIABLE_NAME (name, DECL_NAME (decl)); MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID (pname, DECL_NAME (decl)); wfl = build_wfl_node (name); --- 7055,7065 ---- { tree name, pname; tree wfl, init, list; ! /* Avoid non final arguments. */ if (!LOCAL_FINAL_P (decl)) continue; ! MANGLE_OUTER_LOCAL_VARIABLE_NAME (name, DECL_NAME (decl)); MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID (pname, DECL_NAME (decl)); wfl = build_wfl_node (name); *************** add_inner_class_fields (class_decl, fct_ *** 7646,7652 **** invoking it (hence the constructor will also feature a hidden parameter, set to the value of the outer context local at the time the inner class is created.) ! Note: we take into account all possible locals that can be accessed by the inner class. It's actually not trivial to minimize these aliases down to the ones really --- 7071,7077 ---- invoking it (hence the constructor will also feature a hidden parameter, set to the value of the outer context local at the time the inner class is created.) ! Note: we take into account all possible locals that can be accessed by the inner class. It's actually not trivial to minimize these aliases down to the ones really *************** add_inner_class_fields (class_decl, fct_ *** 7661,7674 **** identify locals really used in the inner class. We leave the flag FIELD_LOCAL_ALIAS_USED around for that future use. ! On the other hand, it only affect local inner classes, whose constructors (and finit$ call) will be featuring unecessary arguments. It's easy for a developper to keep this number of parameter down by using the `final' keyword only when necessary. For the time being, we can issue a warning on unecessary finals. FIXME */ ! init = build_assignment (ASSIGN_TK, EXPR_WFL_LINECOL (wfl), wfl, init); /* Register the field. The TREE_LIST holding the part --- 7086,7099 ---- identify locals really used in the inner class. We leave the flag FIELD_LOCAL_ALIAS_USED around for that future use. ! On the other hand, it only affect local inner classes, whose constructors (and finit$ call) will be featuring unecessary arguments. It's easy for a developper to keep this number of parameter down by using the `final' keyword only when necessary. For the time being, we can issue a warning on unecessary finals. FIXME */ ! init = build_assignment (ASSIGN_TK, EXPR_WFL_LINECOL (wfl), wfl, init); /* Register the field. The TREE_LIST holding the part *************** duplicate_declaration_error_p (new_field *** 7762,7780 **** if (decl) { char *t1 = xstrdup (purify_type_name ! ((TREE_CODE (new_type) == POINTER_TYPE && TREE_TYPE (new_type) == NULL_TREE) ? IDENTIFIER_POINTER (TYPE_NAME (new_type)) : lang_printable_name (new_type, 1))); /* The type may not have been completed by the time we report the error */ char *t2 = xstrdup (purify_type_name ! ((TREE_CODE (TREE_TYPE (decl)) == POINTER_TYPE && TREE_TYPE (TREE_TYPE (decl)) == NULL_TREE) ? IDENTIFIER_POINTER (TYPE_NAME (TREE_TYPE (decl))) : lang_printable_name (TREE_TYPE (decl), 1))); ! parse_error_context ! (cl , "Duplicate variable declaration: `%s %s' was `%s %s' (%s:%d)", t1, IDENTIFIER_POINTER (new_field_name), t2, IDENTIFIER_POINTER (DECL_NAME (decl)), DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl)); --- 7187,7205 ---- if (decl) { char *t1 = xstrdup (purify_type_name ! ((TREE_CODE (new_type) == POINTER_TYPE && TREE_TYPE (new_type) == NULL_TREE) ? IDENTIFIER_POINTER (TYPE_NAME (new_type)) : lang_printable_name (new_type, 1))); /* The type may not have been completed by the time we report the error */ char *t2 = xstrdup (purify_type_name ! ((TREE_CODE (TREE_TYPE (decl)) == POINTER_TYPE && TREE_TYPE (TREE_TYPE (decl)) == NULL_TREE) ? IDENTIFIER_POINTER (TYPE_NAME (TREE_TYPE (decl))) : lang_printable_name (TREE_TYPE (decl), 1))); ! parse_error_context ! (cl , "Duplicate variable declaration: `%s %s' was `%s %s' (%s:%d)", t1, IDENTIFIER_POINTER (new_field_name), t2, IDENTIFIER_POINTER (DECL_NAME (decl)), DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl)); *************** register_fields (flags, type, variable_l *** 7827,7833 **** /* If TYPE is fully resolved and we don't have a reference, make one */ PROMOTE_RECORD_IF_COMPLETE (type, must_chain); ! for (current = variable_list, saved_type = type; current; current = TREE_CHAIN (current), type = saved_type) { tree real_type; --- 7252,7258 ---- /* If TYPE is fully resolved and we don't have a reference, make one */ PROMOTE_RECORD_IF_COMPLETE (type, must_chain); ! for (current = variable_list, saved_type = type; current; current = TREE_CHAIN (current), type = saved_type) { tree real_type; *************** register_fields (flags, type, variable_l *** 7839,7845 **** /* Can't declare non-final static fields in inner classes */ if ((flags & ACC_STATIC) && !TOPLEVEL_CLASS_TYPE_P (class_type) && !(flags & ACC_FINAL)) ! parse_error_context (cl, "Field `%s' can't be static in inner class `%s' unless it is final", IDENTIFIER_POINTER (EXPR_WFL_NODE (cl)), lang_printable_name (class_type, 0)); --- 7264,7270 ---- /* Can't declare non-final static fields in inner classes */ if ((flags & ACC_STATIC) && !TOPLEVEL_CLASS_TYPE_P (class_type) && !(flags & ACC_FINAL)) ! parse_error_context (cl, "Field `%s' can't be static in inner class `%s' unless it is final", IDENTIFIER_POINTER (EXPR_WFL_NODE (cl)), lang_printable_name (class_type, 0)); *************** register_fields (flags, type, variable_l *** 7893,7903 **** FIELD_LOCAL_ALIAS (field_decl) = 1; FIELD_FINAL (field_decl) = 0; } ! /* Check if we must chain. */ if (must_chain) register_incomplete_type (JDEP_FIELD, wfl, field_decl, type); ! /* If we have an initialization value tied to the field */ if (init) { --- 7318,7328 ---- FIELD_LOCAL_ALIAS (field_decl) = 1; FIELD_FINAL (field_decl) = 0; } ! /* Check if we must chain. */ if (must_chain) register_incomplete_type (JDEP_FIELD, wfl, field_decl, type); ! /* If we have an initialization value tied to the field */ if (init) { *************** register_fields (flags, type, variable_l *** 7912,7918 **** appropriately. */ TREE_CHAIN (init) = CPC_STATIC_INITIALIZER_STMT (ctxp); SET_CPC_STATIC_INITIALIZER_STMT (ctxp, init); ! if (TREE_OPERAND (init, 1) && TREE_CODE (TREE_OPERAND (init, 1)) == NEW_ARRAY_INIT) TREE_STATIC (TREE_OPERAND (init, 1)) = 1; } --- 7337,7343 ---- appropriately. */ TREE_CHAIN (init) = CPC_STATIC_INITIALIZER_STMT (ctxp); SET_CPC_STATIC_INITIALIZER_STMT (ctxp, init); ! if (TREE_OPERAND (init, 1) && TREE_CODE (TREE_OPERAND (init, 1)) == NEW_ARRAY_INIT) TREE_STATIC (TREE_OPERAND (init, 1)) = 1; } *************** generate_finit (class_type) *** 7944,7951 **** tree list = TYPE_FINIT_STMT_LIST (class_type); tree mdecl, current, parms; ! parms = build_alias_initializer_parameter_list (AIPL_FUNCTION_CREATION, ! class_type, NULL_TREE, &count); CRAFTED_PARAM_LIST_FIXUP (parms); mdecl = create_artificial_method (class_type, ACC_PRIVATE, void_type_node, --- 7369,7376 ---- tree list = TYPE_FINIT_STMT_LIST (class_type); tree mdecl, current, parms; ! parms = build_alias_initializer_parameter_list (AIPL_FUNCTION_CREATION, ! class_type, NULL_TREE, &count); CRAFTED_PARAM_LIST_FIXUP (parms); mdecl = create_artificial_method (class_type, ACC_PRIVATE, void_type_node, *************** generate_finit (class_type) *** 7957,7964 **** start_artificial_method_body (mdecl); for (current = list; current; current = TREE_CHAIN (current)) ! java_method_add_stmt (mdecl, ! build_debugable_stmt (EXPR_WFL_LINECOL (current), current)); end_artificial_method_body (mdecl); return mdecl; --- 7382,7389 ---- start_artificial_method_body (mdecl); for (current = list; current; current = TREE_CHAIN (current)) ! java_method_add_stmt (mdecl, ! build_debugable_stmt (EXPR_WFL_LINECOL (current), current)); end_artificial_method_body (mdecl); return mdecl; *************** generate_instinit (class_type) *** 7987,7993 **** mdecl, NULL_TREE); /* Gather all the statements in a compound */ ! for (current = TYPE_II_STMT_LIST (class_type); current; current = TREE_CHAIN (current)) compound = add_stmt_to_compound (compound, NULL_TREE, current); --- 7412,7418 ---- mdecl, NULL_TREE); /* Gather all the statements in a compound */ ! for (current = TYPE_II_STMT_LIST (class_type); current; current = TREE_CHAIN (current)) compound = add_stmt_to_compound (compound, NULL_TREE, current); *************** generate_instinit (class_type) *** 7996,8005 **** We do that only if all ctors of CLASS_TYPE are set to catch a checked exception. This doesn't apply to anonymous classes (since they don't have declared ctors.) */ ! if (!ANONYMOUS_CLASS_P (class_type) && ctors_unchecked_throws_clause_p (class_type)) { ! compound = encapsulate_with_try_catch (0, exception_type_node, compound, build1 (THROW_EXPR, NULL_TREE, build_wfl_node (wpv_id))); DECL_FUNCTION_THROWS (mdecl) = build_tree_list (NULL_TREE, --- 7421,7430 ---- We do that only if all ctors of CLASS_TYPE are set to catch a checked exception. This doesn't apply to anonymous classes (since they don't have declared ctors.) */ ! if (!ANONYMOUS_CLASS_P (class_type) && ctors_unchecked_throws_clause_p (class_type)) { ! compound = encapsulate_with_try_catch (0, exception_type_node, compound, build1 (THROW_EXPR, NULL_TREE, build_wfl_node (wpv_id))); DECL_FUNCTION_THROWS (mdecl) = build_tree_list (NULL_TREE, *************** method_header (flags, type, mdecl, throw *** 8062,8068 **** return error_mark_node; meth = TREE_VALUE (mdecl); id = TREE_PURPOSE (mdecl); ! check_modifiers_consistency (flags); if (GET_CPC ()) --- 7487,7493 ---- return error_mark_node; meth = TREE_VALUE (mdecl); id = TREE_PURPOSE (mdecl); ! check_modifiers_consistency (flags); if (GET_CPC ()) *************** method_header (flags, type, mdecl, throw *** 8070,8076 **** if (!this_class || this_class == error_mark_node) return NULL_TREE; ! /* There are some forbidden modifiers for an abstract method and its class must be abstract as well. */ if (type && (flags & ACC_ABSTRACT)) --- 7495,7501 ---- if (!this_class || this_class == error_mark_node) return NULL_TREE; ! /* There are some forbidden modifiers for an abstract method and its class must be abstract as well. */ if (type && (flags & ACC_ABSTRACT)) *************** method_header (flags, type, mdecl, throw *** 8083,8094 **** ABSTRACT_CHECK (flags, ACC_STRICT, id, "Strictfp"); if (!CLASS_ABSTRACT (TYPE_NAME (this_class)) && !CLASS_INTERFACE (TYPE_NAME (this_class))) ! parse_error_context ! (id, "Class `%s' must be declared abstract to define abstract method `%s'", IDENTIFIER_POINTER (DECL_NAME (GET_CPC ())), IDENTIFIER_POINTER (EXPR_WFL_NODE (id))); } /* Things to be checked when declaring a constructor */ if (!type) { --- 7508,7531 ---- ABSTRACT_CHECK (flags, ACC_STRICT, id, "Strictfp"); if (!CLASS_ABSTRACT (TYPE_NAME (this_class)) && !CLASS_INTERFACE (TYPE_NAME (this_class))) ! parse_error_context ! (id, "Class `%s' must be declared abstract to define abstract method `%s'", IDENTIFIER_POINTER (DECL_NAME (GET_CPC ())), IDENTIFIER_POINTER (EXPR_WFL_NODE (id))); } + /* A native method can't be strictfp. */ + if ((flags & ACC_NATIVE) && (flags & ACC_STRICT)) + parse_error_context (id, "native method `%s' can't be strictfp", + IDENTIFIER_POINTER (EXPR_WFL_NODE (id))); + /* No such thing as a transient or volatile method. */ + if ((flags & ACC_TRANSIENT)) + parse_error_context (id, "method `%s' can't be transient", + IDENTIFIER_POINTER (EXPR_WFL_NODE (id))); + if ((flags & ACC_VOLATILE)) + parse_error_context (id, "method `%s' can't be volatile", + IDENTIFIER_POINTER (EXPR_WFL_NODE (id))); + /* Things to be checked when declaring a constructor */ if (!type) { *************** method_header (flags, type, mdecl, throw *** 8096,8102 **** /* 8.6: Constructor declarations: we might be trying to define a method without specifying a return type. */ if (EXPR_WFL_NODE (id) != GET_CPC_UN ()) ! parse_error_context (id, "Invalid method declaration, return type required"); /* 8.6.3: Constructor modifiers */ else --- 7533,7539 ---- /* 8.6: Constructor declarations: we might be trying to define a method without specifying a return type. */ if (EXPR_WFL_NODE (id) != GET_CPC_UN ()) ! parse_error_context (id, "Invalid method declaration, return type required"); /* 8.6.3: Constructor modifiers */ else *************** method_header (flags, type, mdecl, throw *** 8135,8141 **** /* Inner class can't declare static methods */ if ((flags & ACC_STATIC) && !TOPLEVEL_CLASS_TYPE_P (this_class)) { ! parse_error_context (id, "Method `%s' can't be static in inner class `%s'. Only members of interfaces and top-level classes can be static", IDENTIFIER_POINTER (EXPR_WFL_NODE (id)), lang_printable_name (this_class, 0)); --- 7572,7578 ---- /* Inner class can't declare static methods */ if ((flags & ACC_STATIC) && !TOPLEVEL_CLASS_TYPE_P (this_class)) { ! parse_error_context (id, "Method `%s' can't be static in inner class `%s'. Only members of interfaces and top-level classes can be static", IDENTIFIER_POINTER (EXPR_WFL_NODE (id)), lang_printable_name (this_class, 0)); *************** method_header (flags, type, mdecl, throw *** 8177,8183 **** /* When defining an abstract or interface method, the curly bracket at level 1 doesn't exist because there is no function body */ ! lineno = (ctxp->first_ccb_indent1 ? ctxp->first_ccb_indent1 : EXPR_WFL_LINENO (id)); /* Remember the original argument list */ --- 7614,7620 ---- /* When defining an abstract or interface method, the curly bracket at level 1 doesn't exist because there is no function body */ ! lineno = (ctxp->first_ccb_indent1 ? ctxp->first_ccb_indent1 : EXPR_WFL_LINENO (id)); /* Remember the original argument list */ *************** method_header (flags, type, mdecl, throw *** 8198,8204 **** register_incomplete_type (JDEP_METHOD_END, NULL_TREE, meth, NULL_TREE); } else ! meth = add_method (this_class, flags, meth_name, build_java_signature (meth)); /* Remember final parameters */ --- 7635,7641 ---- register_incomplete_type (JDEP_METHOD_END, NULL_TREE, meth, NULL_TREE); } else ! meth = add_method (this_class, flags, meth_name, build_java_signature (meth)); /* Remember final parameters */ *************** method_header (flags, type, mdecl, throw *** 8224,8230 **** { register_incomplete_type (JDEP_EXCEPTION, TREE_VALUE (current), NULL_TREE, NULL_TREE); ! JDEP_GET_PATCH (CLASSD_LAST (ctxp->classd_list)) = &TREE_VALUE (current); } DECL_FUNCTION_THROWS (meth) = throws; --- 7661,7667 ---- { register_incomplete_type (JDEP_EXCEPTION, TREE_VALUE (current), NULL_TREE, NULL_TREE); ! JDEP_GET_PATCH (CLASSD_LAST (ctxp->classd_list)) = &TREE_VALUE (current); } DECL_FUNCTION_THROWS (meth) = throws; *************** method_header (flags, type, mdecl, throw *** 8239,8245 **** DECL_CONSTRUCTOR_P (meth) = 1; /* Compute and store the number of artificial parameters declared for this constructor */ ! for (count = 0, current = TYPE_FIELDS (this_class); current; current = TREE_CHAIN (current)) if (FIELD_LOCAL_ALIAS (current)) count++; --- 7676,7682 ---- DECL_CONSTRUCTOR_P (meth) = 1; /* Compute and store the number of artificial parameters declared for this constructor */ ! for (count = 0, current = TYPE_FIELDS (this_class); current; current = TREE_CHAIN (current)) if (FIELD_LOCAL_ALIAS (current)) count++; *************** finish_method_declaration (method_body) *** 8292,8298 **** if ((flags & ACC_ABSTRACT || flags & ACC_NATIVE) && method_body) { tree name = DECL_NAME (current_function_decl); ! parse_error_context (DECL_FUNCTION_WFL (current_function_decl), "%s method `%s' can't have a body defined", (METHOD_NATIVE (current_function_decl) ? "Native" : "Abstract"), --- 7729,7735 ---- if ((flags & ACC_ABSTRACT || flags & ACC_NATIVE) && method_body) { tree name = DECL_NAME (current_function_decl); ! parse_error_context (DECL_FUNCTION_WFL (current_function_decl), "%s method `%s' can't have a body defined", (METHOD_NATIVE (current_function_decl) ? "Native" : "Abstract"), *************** finish_method_declaration (method_body) *** 8303,8317 **** { tree name = DECL_NAME (current_function_decl); parse_error_context ! (DECL_FUNCTION_WFL (current_function_decl), "Non native and non abstract method `%s' must have a body defined", IDENTIFIER_POINTER (name)); method_body = NULL_TREE; } ! if (flag_emit_class_files && method_body ! && TREE_CODE (method_body) == NOP_EXPR ! && TREE_TYPE (current_function_decl) && TREE_TYPE (TREE_TYPE (current_function_decl)) == void_type_node) method_body = build1 (RETURN_EXPR, void_type_node, NULL); --- 7740,7754 ---- { tree name = DECL_NAME (current_function_decl); parse_error_context ! (DECL_FUNCTION_WFL (current_function_decl), "Non native and non abstract method `%s' must have a body defined", IDENTIFIER_POINTER (name)); method_body = NULL_TREE; } ! if (flag_emit_class_files && method_body ! && TREE_CODE (method_body) == NOP_EXPR ! && TREE_TYPE (current_function_decl) && TREE_TYPE (TREE_TYPE (current_function_decl)) == void_type_node) method_body = build1 (RETURN_EXPR, void_type_node, NULL); *************** finish_method_declaration (method_body) *** 8328,8334 **** ARG_FINAL_P parameter that might have been set on some of this function parameters. */ UNMARK_FINAL_PARMS (current_function_decl); ! /* So we don't have an irrelevant function declaration context for the next static block we'll see. */ current_function_decl = NULL_TREE; --- 7765,7771 ---- ARG_FINAL_P parameter that might have been set on some of this function parameters. */ UNMARK_FINAL_PARMS (current_function_decl); ! /* So we don't have an irrelevant function declaration context for the next static block we'll see. */ current_function_decl = NULL_TREE; *************** constructor_circularity_msg (from, to) *** 8350,8404 **** /* Verify a circular call to METH. Return 1 if an error is found, 0 otherwise. */ static int verify_constructor_circularity (meth, current) tree meth, current; { - static tree list = NULL_TREE; - static int initialized_p; tree c; - /* If we haven't already registered LIST with the garbage collector, - do so now. */ - if (!initialized_p) - { - ggc_add_tree_root (&list, 1); - initialized_p = 1; - } - for (c = DECL_CONSTRUCTOR_CALLS (current); c; c = TREE_CHAIN (c)) { if (TREE_VALUE (c) == meth) { char *t; ! if (list) { tree liste; ! list = nreverse (list); ! for (liste = list; liste; liste = TREE_CHAIN (liste)) { ! parse_error_context (TREE_PURPOSE (TREE_PURPOSE (liste)), "%s", constructor_circularity_msg ! (TREE_VALUE (liste), TREE_VALUE (TREE_PURPOSE (liste)))); java_error_count--; } } t = xstrdup (lang_printable_name (meth, 0)); ! parse_error_context (TREE_PURPOSE (c), "%s: recursive invocation of constructor `%s'", constructor_circularity_msg (current, meth), t); free (t); ! list = NULL_TREE; return 1; } } for (c = DECL_CONSTRUCTOR_CALLS (current); c; c = TREE_CHAIN (c)) { ! list = tree_cons (c, current, list); if (verify_constructor_circularity (meth, TREE_VALUE (c))) return 1; ! list = TREE_CHAIN (list); } return 0; } --- 7787,7832 ---- /* Verify a circular call to METH. Return 1 if an error is found, 0 otherwise. */ + static GTY(()) tree vcc_list; static int verify_constructor_circularity (meth, current) tree meth, current; { tree c; for (c = DECL_CONSTRUCTOR_CALLS (current); c; c = TREE_CHAIN (c)) { if (TREE_VALUE (c) == meth) { char *t; ! if (vcc_list) { tree liste; ! vcc_list = nreverse (vcc_list); ! for (liste = vcc_list; liste; liste = TREE_CHAIN (liste)) { ! parse_error_context (TREE_PURPOSE (TREE_PURPOSE (liste)), "%s", constructor_circularity_msg ! (TREE_VALUE (liste), TREE_VALUE (TREE_PURPOSE (liste)))); java_error_count--; } } t = xstrdup (lang_printable_name (meth, 0)); ! parse_error_context (TREE_PURPOSE (c), "%s: recursive invocation of constructor `%s'", constructor_circularity_msg (current, meth), t); free (t); ! vcc_list = NULL_TREE; return 1; } } for (c = DECL_CONSTRUCTOR_CALLS (current); c; c = TREE_CHAIN (c)) { ! vcc_list = tree_cons (c, current, vcc_list); if (verify_constructor_circularity (meth, TREE_VALUE (c))) return 1; ! vcc_list = TREE_CHAIN (vcc_list); } return 0; } *************** check_abstract_method_header (meth) *** 8439,8445 **** OBSOLETE_MODIFIER_WARNING2 (MODIFIER_WFL (ABSTRACT_TK), flags, ACC_ABSTRACT, "abstract method", IDENTIFIER_POINTER (DECL_NAME (meth))); ! OBSOLETE_MODIFIER_WARNING2 (MODIFIER_WFL (PUBLIC_TK), flags, ACC_PUBLIC, "abstract method", IDENTIFIER_POINTER (DECL_NAME (meth))); --- 7867,7873 ---- OBSOLETE_MODIFIER_WARNING2 (MODIFIER_WFL (ABSTRACT_TK), flags, ACC_ABSTRACT, "abstract method", IDENTIFIER_POINTER (DECL_NAME (meth))); ! OBSOLETE_MODIFIER_WARNING2 (MODIFIER_WFL (PUBLIC_TK), flags, ACC_PUBLIC, "abstract method", IDENTIFIER_POINTER (DECL_NAME (meth))); *************** method_declarator (id, list) *** 8469,8481 **** this$ decl in the name field of its parameter declaration. We also might have to hide the outer context local alias initializers. Not done when the class is a toplevel class. */ ! if (PURE_INNER_CLASS_DECL_P (GET_CPC ()) && EXPR_WFL_NODE (id) == GET_CPC_UN ()) { tree aliases_list, type, thisn; /* First the aliases, linked to the regular parameters */ aliases_list = ! build_alias_initializer_parameter_list (AIPL_FUNCTION_DECLARATION, TREE_TYPE (GET_CPC ()), NULL_TREE, NULL); list = chainon (nreverse (aliases_list), list); --- 7897,7909 ---- this$ decl in the name field of its parameter declaration. We also might have to hide the outer context local alias initializers. Not done when the class is a toplevel class. */ ! if (PURE_INNER_CLASS_DECL_P (GET_CPC ()) && EXPR_WFL_NODE (id) == GET_CPC_UN ()) { tree aliases_list, type, thisn; /* First the aliases, linked to the regular parameters */ aliases_list = ! build_alias_initializer_parameter_list (AIPL_FUNCTION_DECLARATION, TREE_TYPE (GET_CPC ()), NULL_TREE, NULL); list = chainon (nreverse (aliases_list), list); *************** method_declarator (id, list) *** 8486,8492 **** list = tree_cons (build_wfl_node (thisn), build_pointer_type (type), list); } ! for (current = list; current; current = TREE_CHAIN (current)) { int must_chain = 0; --- 7914,7920 ---- list = tree_cons (build_wfl_node (thisn), build_pointer_type (type), list); } ! for (current = list; current; current = TREE_CHAIN (current)) { int must_chain = 0; *************** method_declarator (id, list) *** 8529,8535 **** if (must_chain) { patch_stage = JDEP_METHOD; ! type = register_incomplete_type (patch_stage, type_wfl, wfl_name, type); jdep = CLASSD_LAST (ctxp->classd_list); JDEP_MISC (jdep) = id; --- 7957,7963 ---- if (must_chain) { patch_stage = JDEP_METHOD; ! type = register_incomplete_type (patch_stage, type_wfl, wfl_name, type); jdep = CLASSD_LAST (ctxp->classd_list); JDEP_MISC (jdep) = id; *************** method_declarator (id, list) *** 8539,8545 **** arg_node = build_tree_list (name, real_type); /* Remeber arguments declared final. */ ARG_FINAL_P (arg_node) = ARG_FINAL_P (current); ! if (jdep) JDEP_GET_PATCH (jdep) = &TREE_VALUE (arg_node); TREE_CHAIN (arg_node) = arg_types; --- 7967,7973 ---- arg_node = build_tree_list (name, real_type); /* Remeber arguments declared final. */ ARG_FINAL_P (arg_node) = ARG_FINAL_P (current); ! if (jdep) JDEP_GET_PATCH (jdep) = &TREE_VALUE (arg_node); TREE_CHAIN (arg_node) = arg_types; *************** static int *** 8554,8560 **** unresolved_type_p (wfl, returned) tree wfl; tree *returned; ! { if (TREE_CODE (wfl) == EXPR_WITH_FILE_LOCATION) { --- 7982,7988 ---- unresolved_type_p (wfl, returned) tree wfl; tree *returned; ! { if (TREE_CODE (wfl) == EXPR_WITH_FILE_LOCATION) { *************** parser_qualified_classname (name) *** 8589,8595 **** if (ctxp->package) return merge_qualified_name (ctxp->package, name); ! else return name; } --- 8017,8023 ---- if (ctxp->package) return merge_qualified_name (ctxp->package, name); ! else return name; } *************** parser_check_super_interface (super_decl *** 8605,8613 **** /* Has to be an interface */ if (!CLASS_INTERFACE (super_decl)) { ! parse_error_context (this_wfl, "%s `%s' can't implement/extend %s `%s'", ! (CLASS_INTERFACE (TYPE_NAME (TREE_TYPE (this_decl))) ? "Interface" : "Class"), IDENTIFIER_POINTER (DECL_NAME (this_decl)), (TYPE_ARRAY_P (super_type) ? "array" : "class"), --- 8033,8041 ---- /* Has to be an interface */ if (!CLASS_INTERFACE (super_decl)) { ! parse_error_context (this_wfl, "%s `%s' can't implement/extend %s `%s'", ! (CLASS_INTERFACE (TYPE_NAME (TREE_TYPE (this_decl))) ? "Interface" : "Class"), IDENTIFIER_POINTER (DECL_NAME (this_decl)), (TYPE_ARRAY_P (super_type) ? "array" : "class"), *************** parser_check_super_interface (super_decl *** 8615,8621 **** return 1; } ! /* Check top-level interface access. Inner classes are subject to member access rules (6.6.1). */ if (! INNER_CLASS_P (super_type) && check_pkg_class_access (DECL_NAME (super_decl), --- 8043,8049 ---- return 1; } ! /* Check top-level interface access. Inner classes are subject to member access rules (6.6.1). */ if (! INNER_CLASS_P (super_type) && check_pkg_class_access (DECL_NAME (super_decl), *************** parser_check_super (super_decl, this_dec *** 8640,8646 **** /* SUPER should be a CLASS (neither an array nor an interface) */ if (TYPE_ARRAY_P (super_type) || CLASS_INTERFACE (TYPE_NAME (super_type))) { ! parse_error_context (wfl, "Class `%s' can't subclass %s `%s'", IDENTIFIER_POINTER (DECL_NAME (this_decl)), (CLASS_INTERFACE (TYPE_NAME (super_type)) ? "interface" : "array"), --- 8068,8074 ---- /* SUPER should be a CLASS (neither an array nor an interface) */ if (TYPE_ARRAY_P (super_type) || CLASS_INTERFACE (TYPE_NAME (super_type))) { ! parse_error_context (wfl, "Class `%s' can't subclass %s `%s'", IDENTIFIER_POINTER (DECL_NAME (this_decl)), (CLASS_INTERFACE (TYPE_NAME (super_type)) ? "interface" : "array"), *************** parser_check_super (super_decl, this_dec *** 8660,8666 **** if (! INNER_CLASS_P (super_type) && (check_pkg_class_access (DECL_NAME (super_decl), wfl, true))) return 1; ! SOURCE_FRONTEND_DEBUG (("Completing class %s with %s", IDENTIFIER_POINTER (DECL_NAME (this_decl)), IDENTIFIER_POINTER (DECL_NAME (super_decl)))); --- 8088,8094 ---- if (! INNER_CLASS_P (super_type) && (check_pkg_class_access (DECL_NAME (super_decl), wfl, true))) return 1; ! SOURCE_FRONTEND_DEBUG (("Completing class %s with %s", IDENTIFIER_POINTER (DECL_NAME (this_decl)), IDENTIFIER_POINTER (DECL_NAME (super_decl)))); *************** static void *** 8674,8680 **** create_jdep_list (ctxp) struct parser_ctxt *ctxp; { ! jdeplist *new = (jdeplist *)xmalloc (sizeof (jdeplist)); new->first = new->last = NULL; new->next = ctxp->classd_list; ctxp->classd_list = new; --- 8102,8108 ---- create_jdep_list (ctxp) struct parser_ctxt *ctxp; { ! jdeplist *new = (jdeplist *)xmalloc (sizeof (jdeplist)); new->first = new->last = NULL; new->next = ctxp->classd_list; ctxp->classd_list = new; *************** register_incomplete_type (kind, wfl, dec *** 8744,8750 **** && GET_ENCLOSING_CPC ()) JDEP_ENCLOSING (new) = TREE_VALUE (GET_ENCLOSING_CPC ()); else if (kind == JDEP_SUPER) ! JDEP_ENCLOSING (new) = (GET_ENCLOSING_CPC () ? TREE_VALUE (GET_ENCLOSING_CPC ()) : NULL_TREE); else JDEP_ENCLOSING (new) = GET_CPC (); --- 8172,8178 ---- && GET_ENCLOSING_CPC ()) JDEP_ENCLOSING (new) = TREE_VALUE (GET_ENCLOSING_CPC ()); else if (kind == JDEP_SUPER) ! JDEP_ENCLOSING (new) = (GET_ENCLOSING_CPC () ? TREE_VALUE (GET_ENCLOSING_CPC ()) : NULL_TREE); else JDEP_ENCLOSING (new) = GET_CPC (); *************** check_circular_reference (type) *** 8827,8833 **** return lookup_cl (TYPE_NAME (type)); return NULL_TREE; } ! for (i = 0; i < TREE_VEC_LENGTH (basetype_vec); i++) { tree vec_elt = TREE_VEC_ELT (basetype_vec, i); --- 8255,8261 ---- return lookup_cl (TYPE_NAME (type)); return NULL_TREE; } ! for (i = 0; i < TREE_VEC_LENGTH (basetype_vec); i++) { tree vec_elt = TREE_VEC_ELT (basetype_vec, i); *************** build_alias_initializer_parameter_list ( *** 8883,8889 **** switch (mode) { case AIPL_FUNCTION_DECLARATION: ! MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR (mangled_id, &buffer [4]); purpose = build_wfl_node (mangled_id); if (TREE_CODE (TREE_TYPE (field)) == POINTER_TYPE) --- 8311,8317 ---- switch (mode) { case AIPL_FUNCTION_DECLARATION: ! MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR (mangled_id, &buffer [4]); purpose = build_wfl_node (mangled_id); if (TREE_CODE (TREE_TYPE (field)) == POINTER_TYPE) *************** build_alias_initializer_parameter_list ( *** 8899,8905 **** break; case AIPL_FUNCTION_FINIT_INVOCATION: ! MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR (mangled_id, &buffer [4]); /* Now, this is wrong. purpose should always be the NAME of something and value its matching value (decl, type, --- 8327,8333 ---- break; case AIPL_FUNCTION_FINIT_INVOCATION: ! MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR (mangled_id, &buffer [4]); /* Now, this is wrong. purpose should always be the NAME of something and value its matching value (decl, type, *************** build_alias_initializer_parameter_list ( *** 8932,8938 **** } if (additional_parms) { ! if (ANONYMOUS_CLASS_P (class_type) && mode == AIPL_FUNCTION_CTOR_INVOCATION) additional_parms = nreverse (additional_parms); parm = chainon (additional_parms, parm); --- 8360,8366 ---- } if (additional_parms) { ! if (ANONYMOUS_CLASS_P (class_type) && mode == AIPL_FUNCTION_CTOR_INVOCATION) additional_parms = nreverse (additional_parms); parm = chainon (additional_parms, parm); *************** craft_constructor (class_decl, args) *** 8956,8962 **** int i = 0, artificial = 0; tree decl, ctor_name; char buffer [80]; ! /* The constructor name is unless we're dealing with an anonymous class, in which case the name will be fixed after having be expanded. */ --- 8384,8390 ---- int i = 0, artificial = 0; tree decl, ctor_name; char buffer [80]; ! /* The constructor name is unless we're dealing with an anonymous class, in which case the name will be fixed after having be expanded. */ *************** craft_constructor (class_decl, args) *** 8976,8982 **** /* Some more arguments to be hidden here. The values of the local variables of the outer context that the inner class needs to see. */ parm = build_alias_initializer_parameter_list (AIPL_FUNCTION_CREATION, ! class_type, parm, &artificial); } --- 8404,8410 ---- /* Some more arguments to be hidden here. The values of the local variables of the outer context that the inner class needs to see. */ parm = build_alias_initializer_parameter_list (AIPL_FUNCTION_CREATION, ! class_type, parm, &artificial); } *************** craft_constructor (class_decl, args) *** 8988,8994 **** } CRAFTED_PARAM_LIST_FIXUP (parm); ! decl = create_artificial_method (class_type, flags, void_type_node, ctor_name, parm); fix_method_argument_names (parm, decl); /* Now, mark the artificial parameters. */ --- 8416,8422 ---- } CRAFTED_PARAM_LIST_FIXUP (parm); ! decl = create_artificial_method (class_type, flags, void_type_node, ctor_name, parm); fix_method_argument_names (parm, decl); /* Now, mark the artificial parameters. */ *************** jdep_resolve_class (dep) *** 9067,9073 **** JDEP_DECL (dep), JDEP_WFL (dep)); JDEP_RESOLVED (dep, decl); } ! if (!decl) complete_class_report_errors (dep); else if (PURE_INNER_CLASS_DECL_P (decl)) --- 8495,8501 ---- JDEP_DECL (dep), JDEP_WFL (dep)); JDEP_RESOLVED (dep, decl); } ! if (!decl) complete_class_report_errors (dep); else if (PURE_INNER_CLASS_DECL_P (decl)) *************** java_complete_class () *** 9097,9108 **** /* Process imports */ process_imports (); ! /* Rever things so we have the right order */ ctxp->class_list = nreverse (ctxp->class_list); ctxp->classd_list = reverse_jdep_list (ctxp); ! for (cclassd = ctxp->classd_list, cclass = ctxp->class_list; ! cclass && cclassd; cclass = TREE_CHAIN (cclass), cclassd = CLASSD_CHAIN (cclassd)) { jdep *dep; --- 8525,8536 ---- /* Process imports */ process_imports (); ! /* Reverse things so we have the right order */ ctxp->class_list = nreverse (ctxp->class_list); ctxp->classd_list = reverse_jdep_list (ctxp); ! for (cclassd = ctxp->classd_list, cclass = ctxp->class_list; ! cclass && cclassd; cclass = TREE_CHAIN (cclass), cclassd = CLASSD_CHAIN (cclassd)) { jdep *dep; *************** java_complete_class () *** 9126,9132 **** /* Simply patch super */ if (parser_check_super (decl, JDEP_DECL (dep), JDEP_WFL (dep))) continue; ! BINFO_TYPE (TREE_VEC_ELT (BINFO_BASETYPES (TYPE_BINFO (TREE_TYPE (JDEP_DECL (dep)))), 0)) = TREE_TYPE (decl); break; --- 8554,8560 ---- /* Simply patch super */ if (parser_check_super (decl, JDEP_DECL (dep), JDEP_WFL (dep))) continue; ! BINFO_TYPE (TREE_VEC_ELT (BINFO_BASETYPES (TYPE_BINFO (TREE_TYPE (JDEP_DECL (dep)))), 0)) = TREE_TYPE (decl); break; *************** java_complete_class () *** 9141,9147 **** DECL_ALIGN (field_decl) = 0; DECL_USER_ALIGN (field_decl) = 0; layout_decl (field_decl, 0); ! SOURCE_FRONTEND_DEBUG (("Completed field/var decl `%s' with `%s'", IDENTIFIER_POINTER (DECL_NAME (field_decl)), IDENTIFIER_POINTER (DECL_NAME (decl)))); --- 8569,8575 ---- DECL_ALIGN (field_decl) = 0; DECL_USER_ALIGN (field_decl) = 0; layout_decl (field_decl, 0); ! SOURCE_FRONTEND_DEBUG (("Completed field/var decl `%s' with `%s'", IDENTIFIER_POINTER (DECL_NAME (field_decl)), IDENTIFIER_POINTER (DECL_NAME (decl)))); *************** java_complete_class () *** 9158,9168 **** if (TREE_CODE (type) == RECORD_TYPE) type = promote_type (type); JDEP_APPLY_PATCH (dep, type); ! SOURCE_FRONTEND_DEBUG (((JDEP_KIND (dep) == JDEP_METHOD_RETURN ? "Completing fct `%s' with ret type `%s'": "Completing arg `%s' with type `%s'"), ! IDENTIFIER_POINTER (EXPR_WFL_NODE (JDEP_DECL_WFL (dep))), IDENTIFIER_POINTER (DECL_NAME (decl)))); } --- 8586,8596 ---- if (TREE_CODE (type) == RECORD_TYPE) type = promote_type (type); JDEP_APPLY_PATCH (dep, type); ! SOURCE_FRONTEND_DEBUG (((JDEP_KIND (dep) == JDEP_METHOD_RETURN ? "Completing fct `%s' with ret type `%s'": "Completing arg `%s' with type `%s'"), ! IDENTIFIER_POINTER (EXPR_WFL_NODE (JDEP_DECL_WFL (dep))), IDENTIFIER_POINTER (DECL_NAME (decl)))); } *************** java_complete_class () *** 9207,9220 **** case JDEP_TYPE: JDEP_APPLY_PATCH (dep, TREE_TYPE (decl)); ! SOURCE_FRONTEND_DEBUG (("Completing a random type dependency on a '%s' node", tree_code_name [TREE_CODE (JDEP_DECL (dep))])); break; case JDEP_EXCEPTION: JDEP_APPLY_PATCH (dep, TREE_TYPE (decl)); ! SOURCE_FRONTEND_DEBUG (("Completing `%s' `throws' argument node", IDENTIFIER_POINTER (EXPR_WFL_NODE (JDEP_WFL (dep))))); break; --- 8635,8648 ---- case JDEP_TYPE: JDEP_APPLY_PATCH (dep, TREE_TYPE (decl)); ! SOURCE_FRONTEND_DEBUG (("Completing a random type dependency on a '%s' node", tree_code_name [TREE_CODE (JDEP_DECL (dep))])); break; case JDEP_EXCEPTION: JDEP_APPLY_PATCH (dep, TREE_TYPE (decl)); ! SOURCE_FRONTEND_DEBUG (("Completing `%s' `throws' argument node", IDENTIFIER_POINTER (EXPR_WFL_NODE (JDEP_WFL (dep))))); break; *************** resolve_class (enclosing, class_type, de *** 9242,9248 **** tree resolved_type = TREE_TYPE (class_type); int array_dims = 0; tree resolved_type_decl; ! if (resolved_type != NULL_TREE) { tree resolved_type_decl = TYPE_NAME (resolved_type); --- 8670,8676 ---- tree resolved_type = TREE_TYPE (class_type); int array_dims = 0; tree resolved_type_decl; ! if (resolved_type != NULL_TREE) { tree resolved_type_decl = TYPE_NAME (resolved_type); *************** resolve_class (enclosing, class_type, de *** 9263,9274 **** WFL_STRIP_BRACKET (cl, cl); /* 2- Resolve the bare type */ ! if (!(resolved_type_decl = do_resolve_class (enclosing, class_type, decl, cl))) return NULL_TREE; resolved_type = TREE_TYPE (resolved_type_decl); ! /* 3- If we have and array, reconstruct the array down to its nesting */ if (array_dims) { for (; array_dims; array_dims--) --- 8691,8702 ---- WFL_STRIP_BRACKET (cl, cl); /* 2- Resolve the bare type */ ! if (!(resolved_type_decl = do_resolve_class (enclosing, class_type, decl, cl))) return NULL_TREE; resolved_type = TREE_TYPE (resolved_type_decl); ! /* 3- If we have an array, reconstruct the array down to its nesting */ if (array_dims) { for (; array_dims; array_dims--) *************** resolve_class (enclosing, class_type, de *** 9279,9289 **** return resolved_type_decl; } ! /* Effectively perform the resolution of class CLASS_TYPE. DECL or CL ! are used to report error messages. Do not try to replace TYPE_NAME ! (class_type) by a variable, since it is changed by ! find_in_imports{_on_demand} and (but it doesn't really matter) ! qualify_and_find. */ tree do_resolve_class (enclosing, class_type, decl, cl) --- 8707,8717 ---- return resolved_type_decl; } ! /* Effectively perform the resolution of class CLASS_TYPE. DECL or CL ! are used to report error messages; CL must either be NULL_TREE or a ! WFL wrapping a class. Do not try to replace TYPE_NAME (class_type) ! by a variable, since it is changed by find_in_imports{_on_demand} ! and (but it doesn't really matter) qualify_and_find. */ tree do_resolve_class (enclosing, class_type, decl, cl) *************** do_resolve_class (enclosing, class_type, *** 9292,9330 **** tree new_class_decl = NULL_TREE, super = NULL_TREE; tree saved_enclosing_type = enclosing ? TREE_TYPE (enclosing) : NULL_TREE; tree decl_result; ! struct hash_table _ht, *circularity_hash = &_ht; ! /* This hash table is used to register the classes we're going ! through when searching the current class as an inner class, in ! order to detect circular references. Remember to free it before ! returning the section 0- of this function. */ ! hash_table_init (circularity_hash, hash_newfunc, ! java_hash_hash_tree_node, java_hash_compare_tree_node); ! /* 0- Search in the current class as an inner class. ! Maybe some code here should be added to load the class or ! something, at least if the class isn't an inner class and ended ! being loaded from class file. FIXME. */ ! while (enclosing) { ! new_class_decl = resolve_inner_class (circularity_hash, cl, &enclosing, ! &super, class_type); ! if (new_class_decl) ! break; ! /* If we haven't found anything because SUPER reached Object and ! ENCLOSING happens to be an innerclass, try the enclosing context. */ ! if ((!super || super == object_type_node) && ! enclosing && INNER_CLASS_DECL_P (enclosing)) ! enclosing = DECL_CONTEXT (enclosing); ! else ! enclosing = NULL_TREE; ! } ! hash_table_free (circularity_hash); ! if (new_class_decl) ! return new_class_decl; /* 1- Check for the type in single imports. This will change TYPE_NAME() if something relevant is found */ --- 8720,8779 ---- tree new_class_decl = NULL_TREE, super = NULL_TREE; tree saved_enclosing_type = enclosing ? TREE_TYPE (enclosing) : NULL_TREE; tree decl_result; ! htab_t circularity_hash; ! if (QUALIFIED_P (TYPE_NAME (class_type))) ! { ! /* If the type name is of the form `Q . Id', then Q is either a ! package name or a class name. First we try to find Q as a ! class and then treat Id as a member type. If we can't find Q ! as a class then we fall through. */ ! tree q, left, left_type, right; ! breakdown_qualified (&left, &right, TYPE_NAME (class_type)); ! BUILD_PTR_FROM_NAME (left_type, left); ! q = do_resolve_class (enclosing, left_type, decl, cl); ! if (q) ! { ! enclosing = q; ! saved_enclosing_type = TREE_TYPE (q); ! BUILD_PTR_FROM_NAME (class_type, right); ! } ! } ! if (enclosing) { ! /* This hash table is used to register the classes we're going ! through when searching the current class as an inner class, in ! order to detect circular references. Remember to free it before ! returning the section 0- of this function. */ ! circularity_hash = htab_create (20, htab_hash_pointer, htab_eq_pointer, ! NULL); ! /* 0- Search in the current class as an inner class. ! Maybe some code here should be added to load the class or ! something, at least if the class isn't an inner class and ended ! being loaded from class file. FIXME. */ ! while (enclosing) ! { ! new_class_decl = resolve_inner_class (circularity_hash, cl, &enclosing, ! &super, class_type); ! if (new_class_decl) ! break; ! /* If we haven't found anything because SUPER reached Object and ! ENCLOSING happens to be an innerclass, try the enclosing context. */ ! if ((!super || super == object_type_node) && ! enclosing && INNER_CLASS_DECL_P (enclosing)) ! enclosing = DECL_CONTEXT (enclosing); ! else ! enclosing = NULL_TREE; ! } ! htab_delete (circularity_hash); ! ! if (new_class_decl) ! return new_class_decl; ! } /* 1- Check for the type in single imports. This will change TYPE_NAME() if something relevant is found */ *************** do_resolve_class (enclosing, class_type, *** 9353,9359 **** if (find_in_imports_on_demand (saved_enclosing_type, class_type)) return NULL_TREE; ! /* If found in find_in_imports_on_demant, the type has already been loaded. */ if ((new_class_decl = IDENTIFIER_CLASS_VALUE (TYPE_NAME (class_type)))) return new_class_decl; --- 8802,8808 ---- if (find_in_imports_on_demand (saved_enclosing_type, class_type)) return NULL_TREE; ! /* If found in find_in_imports_on_demand, the type has already been loaded. */ if ((new_class_decl = IDENTIFIER_CLASS_VALUE (TYPE_NAME (class_type)))) return new_class_decl; *************** do_resolve_class (enclosing, class_type, *** 9365,9386 **** /* If there is a current package (ctxp->package), it's the first element of package_list and we can skip it. */ ! for (package = (ctxp->package ? TREE_CHAIN (package_list) : package_list); package; package = TREE_CHAIN (package)) if ((new_class_decl = qualify_and_find (class_type, ! TREE_PURPOSE (package), TYPE_NAME (class_type)))) return new_class_decl; } ! /* 5- Check an other compilation unit that bears the name of type */ load_class (TYPE_NAME (class_type), 0); ! if (!cl) cl = lookup_cl (decl); ! ! /* If we don't have a value for CL, then we're being called recursively. We can't check package access just yet, but it will be taken care of by the caller. */ if (cl) --- 8814,8835 ---- /* If there is a current package (ctxp->package), it's the first element of package_list and we can skip it. */ ! for (package = (ctxp->package ? TREE_CHAIN (package_list) : package_list); package; package = TREE_CHAIN (package)) if ((new_class_decl = qualify_and_find (class_type, ! TREE_PURPOSE (package), TYPE_NAME (class_type)))) return new_class_decl; } ! /* 5- Check another compilation unit that bears the name of type */ load_class (TYPE_NAME (class_type), 0); ! if (!cl) cl = lookup_cl (decl); ! ! /* If we don't have a value for CL, then we're being called recursively. We can't check package access just yet, but it will be taken care of by the caller. */ if (cl) *************** resolve_and_layout (something, cl) *** 9495,9501 **** /* Check methods */ if (CLASS_FROM_SOURCE_P (decl_type)) java_check_methods (decl); ! /* Layout the type if necessary */ if (decl_type != current_class && !CLASS_LOADED_P (decl_type)) safe_layout_class (decl_type); --- 8944,8950 ---- /* Check methods */ if (CLASS_FROM_SOURCE_P (decl_type)) java_check_methods (decl); ! /* Layout the type if necessary */ if (decl_type != current_class && !CLASS_LOADED_P (decl_type)) safe_layout_class (decl_type); *************** resolve_no_layout (name, cl) *** 9514,9520 **** java_parser_context_save_global (); decl = resolve_class (TYPE_NAME (current_class), ptr, NULL_TREE, cl); java_parser_context_restore_global (); ! return decl; } --- 8963,8969 ---- java_parser_context_save_global (); decl = resolve_class (TYPE_NAME (current_class), ptr, NULL_TREE, cl); java_parser_context_restore_global (); ! return decl; } *************** complete_class_report_errors (dep) *** 9554,9560 **** switch (JDEP_KIND (dep)) { case JDEP_SUPER: ! parse_error_context (JDEP_WFL (dep), "Superclass `%s' of class `%s' not found", purify_type_name (name), IDENTIFIER_POINTER (DECL_NAME (JDEP_DECL (dep)))); --- 9003,9009 ---- switch (JDEP_KIND (dep)) { case JDEP_SUPER: ! parse_error_context (JDEP_WFL (dep), "Superclass `%s' of class `%s' not found", purify_type_name (name), IDENTIFIER_POINTER (DECL_NAME (JDEP_DECL (dep)))); *************** complete_class_report_errors (dep) *** 9574,9580 **** break; case JDEP_METHOD_RETURN: /* Covers return type */ parse_error_context ! (JDEP_WFL (dep), "Type `%s' not found in the declaration of the return type of method `%s'", purify_type_name (name), IDENTIFIER_POINTER (EXPR_WFL_NODE (JDEP_DECL_WFL (dep)))); break; --- 9023,9029 ---- break; case JDEP_METHOD_RETURN: /* Covers return type */ parse_error_context ! (JDEP_WFL (dep), "Type `%s' not found in the declaration of the return type of method `%s'", purify_type_name (name), IDENTIFIER_POINTER (EXPR_WFL_NODE (JDEP_DECL_WFL (dep)))); break; *************** complete_class_report_errors (dep) *** 9587,9599 **** break; case JDEP_VARIABLE: parse_error_context ! (JDEP_WFL (dep), "Type `%s' not found in the declaration of the local variable `%s'", ! purify_type_name (IDENTIFIER_POINTER (EXPR_WFL_NODE (JDEP_WFL (dep)))), IDENTIFIER_POINTER (DECL_NAME (JDEP_DECL (dep)))); break; case JDEP_EXCEPTION: /* As specified by `throws' */ ! parse_error_context (JDEP_WFL (dep), "Class `%s' not found in `throws'", IDENTIFIER_POINTER (EXPR_WFL_NODE (JDEP_WFL (dep)))); break; --- 9036,9048 ---- break; case JDEP_VARIABLE: parse_error_context ! (JDEP_WFL (dep), "Type `%s' not found in the declaration of the local variable `%s'", ! purify_type_name (IDENTIFIER_POINTER (EXPR_WFL_NODE (JDEP_WFL (dep)))), IDENTIFIER_POINTER (DECL_NAME (JDEP_DECL (dep)))); break; case JDEP_EXCEPTION: /* As specified by `throws' */ ! parse_error_context (JDEP_WFL (dep), "Class `%s' not found in `throws'", IDENTIFIER_POINTER (EXPR_WFL_NODE (JDEP_WFL (dep)))); break; *************** get_printable_method_name (decl) *** 9620,9630 **** name = DECL_NAME (decl); DECL_NAME (decl) = DECL_NAME (TYPE_NAME (DECL_CONTEXT (decl))); } ! to_return = lang_printable_name (decl, 0); if (DECL_CONSTRUCTOR_P (decl)) DECL_NAME (decl) = name; ! return to_return; } --- 9069,9079 ---- name = DECL_NAME (decl); DECL_NAME (decl) = DECL_NAME (TYPE_NAME (DECL_CONTEXT (decl))); } ! to_return = lang_printable_name (decl, 0); if (DECL_CONSTRUCTOR_P (decl)) DECL_NAME (decl) = name; ! return to_return; } *************** check_method_redefinition (class, method *** 9652,9658 **** && sig == TYPE_ARGUMENT_SIGNATURE (TREE_TYPE (redef)) && !DECL_ARTIFICIAL (method)) { ! parse_error_context (DECL_FUNCTION_WFL (method), "Duplicate %s declaration `%s'", (DECL_CONSTRUCTOR_P (redef) ? "constructor" : "method"), get_printable_method_name (redef)); --- 9101,9107 ---- && sig == TYPE_ARGUMENT_SIGNATURE (TREE_TYPE (redef)) && !DECL_ARTIFICIAL (method)) { ! parse_error_context (DECL_FUNCTION_WFL (method), "Duplicate %s declaration `%s'", (DECL_CONSTRUCTOR_P (redef) ? "constructor" : "method"), get_printable_method_name (redef)); *************** check_abstract_method_definitions (do_in *** 9678,9691 **** tree other_super, other_method, method_sig, method_name; int found = 0; int end_type_reached = 0; ! if (!METHOD_ABSTRACT (method) || METHOD_FINAL (method)) continue; ! /* Now verify that somewhere in between TYPE and CLASS, abstract method METHOD gets a non abstract definition that is inherited by CLASS. */ ! method_sig = build_java_signature (TREE_TYPE (method)); method_name = DECL_NAME (method); if (TREE_CODE (method_name) == EXPR_WITH_FILE_LOCATION) --- 9127,9140 ---- tree other_super, other_method, method_sig, method_name; int found = 0; int end_type_reached = 0; ! if (!METHOD_ABSTRACT (method) || METHOD_FINAL (method)) continue; ! /* Now verify that somewhere in between TYPE and CLASS, abstract method METHOD gets a non abstract definition that is inherited by CLASS. */ ! method_sig = build_java_signature (TREE_TYPE (method)); method_name = DECL_NAME (method); if (TREE_CODE (method_name) == EXPR_WITH_FILE_LOCATION) *************** check_abstract_method_definitions (do_in *** 9695,9708 **** do { if (other_super == end_type) end_type_reached = 1; ! /* Method search */ for (other_method = TYPE_METHODS (other_super); other_method; other_method = TREE_CHAIN (other_method)) { tree s = build_java_signature (TREE_TYPE (other_method)); tree other_name = DECL_NAME (other_method); ! if (TREE_CODE (other_name) == EXPR_WITH_FILE_LOCATION) other_name = EXPR_WFL_NODE (other_name); if (!DECL_CLINIT_P (other_method) --- 9144,9157 ---- do { if (other_super == end_type) end_type_reached = 1; ! /* Method search */ for (other_method = TYPE_METHODS (other_super); other_method; other_method = TREE_CHAIN (other_method)) { tree s = build_java_signature (TREE_TYPE (other_method)); tree other_name = DECL_NAME (other_method); ! if (TREE_CODE (other_name) == EXPR_WITH_FILE_LOCATION) other_name = EXPR_WFL_NODE (other_name); if (!DECL_CLINIT_P (other_method) *************** check_abstract_method_definitions (do_in *** 9717,9737 **** } other_super = CLASSTYPE_SUPER (other_super); } while (!end_type_reached); ! /* Report that abstract METHOD didn't find an implementation that CLASS can use. */ if (!found) { ! char *t = xstrdup (lang_printable_name (TREE_TYPE (TREE_TYPE (method)), 0)); tree ccn = DECL_NAME (TYPE_NAME (DECL_CONTEXT (method))); ! ! parse_error_context (lookup_cl (class_decl), "Class `%s' doesn't define the abstract method `%s %s' from %s `%s'. This method must be defined or %s `%s' must be declared abstract", IDENTIFIER_POINTER (DECL_NAME (class_decl)), ! t, lang_printable_name (method, 0), ! (CLASS_INTERFACE (TYPE_NAME (DECL_CONTEXT (method))) ? "interface" : "class"), IDENTIFIER_POINTER (ccn), (CLASS_INTERFACE (class_decl) ? "interface" : "class"), --- 9166,9186 ---- } other_super = CLASSTYPE_SUPER (other_super); } while (!end_type_reached); ! /* Report that abstract METHOD didn't find an implementation that CLASS can use. */ if (!found) { ! char *t = xstrdup (lang_printable_name (TREE_TYPE (TREE_TYPE (method)), 0)); tree ccn = DECL_NAME (TYPE_NAME (DECL_CONTEXT (method))); ! ! parse_error_context (lookup_cl (class_decl), "Class `%s' doesn't define the abstract method `%s %s' from %s `%s'. This method must be defined or %s `%s' must be declared abstract", IDENTIFIER_POINTER (DECL_NAME (class_decl)), ! t, lang_printable_name (method, 0), ! (CLASS_INTERFACE (TYPE_NAME (DECL_CONTEXT (method))) ? "interface" : "class"), IDENTIFIER_POINTER (ccn), (CLASS_INTERFACE (class_decl) ? "interface" : "class"), *************** check_method_types_complete (decl) *** 9799,9805 **** if (!INCOMPLETE_TYPE_P (TREE_TYPE (type))) return 0; ! args = TYPE_ARG_TYPES (type); if (TREE_CODE (type) == METHOD_TYPE) args = TREE_CHAIN (args); --- 9248,9254 ---- if (!INCOMPLETE_TYPE_P (TREE_TYPE (type))) return 0; ! args = TYPE_ARG_TYPES (type); if (TREE_CODE (type) == METHOD_TYPE) args = TREE_CHAIN (args); *************** java_check_methods (class_decl) *** 9823,9829 **** java_check_abstract_methods (class_decl); else java_check_regular_methods (class_decl); ! CLASS_METHOD_CHECKED_P (TREE_TYPE (class_decl)) = 1; } --- 9272,9278 ---- java_check_abstract_methods (class_decl); else java_check_regular_methods (class_decl); ! CLASS_METHOD_CHECKED_P (TREE_TYPE (class_decl)) = 1; } *************** java_check_regular_methods (class_decl) *** 9838,9844 **** { int saw_constructor = ANONYMOUS_CLASS_P (TREE_TYPE (class_decl)); tree method; ! tree class = CLASS_TO_HANDLE_TYPE (TREE_TYPE (class_decl)); tree found = NULL_TREE; tree mthrows; --- 9287,9293 ---- { int saw_constructor = ANONYMOUS_CLASS_P (TREE_TYPE (class_decl)); tree method; ! tree class = TREE_TYPE (class_decl); tree found = NULL_TREE; tree mthrows; *************** java_check_regular_methods (class_decl) *** 9860,9886 **** if (check_method_redefinition (class, method)) continue; ! /* If we see one constructor a mark so we don't generate the ! default one. Also skip other verifications: constructors ! can't be inherited hence hiden or overriden */ ! if (DECL_CONSTRUCTOR_P (method)) ! { ! saw_constructor = 1; ! continue; ! } ! ! /* We verify things thrown by the method. They must inherits from ! java.lang.Throwable */ for (mthrows = DECL_FUNCTION_THROWS (method); mthrows; mthrows = TREE_CHAIN (mthrows)) { if (!inherits_from_p (TREE_VALUE (mthrows), throwable_type_node)) ! parse_error_context (TREE_PURPOSE (mthrows), "Class `%s' in `throws' clause must be a subclass of class `java.lang.Throwable'", ! IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (TREE_VALUE (mthrows))))); } sig = build_java_argument_signature (TREE_TYPE (method)); found = lookup_argument_method2 (class, DECL_NAME (method), sig); --- 9309,9335 ---- if (check_method_redefinition (class, method)) continue; ! /* We verify things thrown by the method. They must inherit from ! java.lang.Throwable. */ for (mthrows = DECL_FUNCTION_THROWS (method); mthrows; mthrows = TREE_CHAIN (mthrows)) { if (!inherits_from_p (TREE_VALUE (mthrows), throwable_type_node)) ! parse_error_context (TREE_PURPOSE (mthrows), "Class `%s' in `throws' clause must be a subclass of class `java.lang.Throwable'", ! IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (TREE_VALUE (mthrows))))); } + /* If we see one constructor a mark so we don't generate the + default one. Also skip other verifications: constructors + can't be inherited hence hidden or overridden. */ + if (DECL_CONSTRUCTOR_P (method)) + { + saw_constructor = 1; + continue; + } + sig = build_java_argument_signature (TREE_TYPE (method)); found = lookup_argument_method2 (class, DECL_NAME (method), sig); *************** java_check_regular_methods (class_decl) *** 9888,9894 **** if (METHOD_STATIC (method) && !TOPLEVEL_CLASS_DECL_P (class_decl)) { char *t = xstrdup (lang_printable_name (class, 0)); ! parse_error_context (method_wfl, "Method `%s' can't be static in inner class `%s'. Only members of interfaces and top-level classes can be static", lang_printable_name (method, 0), t); free (t); --- 9337,9343 ---- if (METHOD_STATIC (method) && !TOPLEVEL_CLASS_DECL_P (class_decl)) { char *t = xstrdup (lang_printable_name (class, 0)); ! parse_error_context (method_wfl, "Method `%s' can't be static in inner class `%s'. Only members of interfaces and top-level classes can be static", lang_printable_name (method, 0), t); free (t); *************** java_check_regular_methods (class_decl) *** 9905,9911 **** /* If `found' is declared in an interface, make sure the modifier matches. */ ! if (CLASS_INTERFACE (TYPE_NAME (DECL_CONTEXT (found))) && clinit_identifier_node != DECL_NAME (found) && !METHOD_PUBLIC (method)) { --- 9354,9360 ---- /* If `found' is declared in an interface, make sure the modifier matches. */ ! if (CLASS_INTERFACE (TYPE_NAME (DECL_CONTEXT (found))) && clinit_identifier_node != DECL_NAME (found) && !METHOD_PUBLIC (method)) { *************** java_check_regular_methods (class_decl) *** 9920,9932 **** types. */ if (TREE_TYPE (TREE_TYPE (found)) != TREE_TYPE (TREE_TYPE (method))) { ! char *t = xstrdup (lang_printable_name (TREE_TYPE (TREE_TYPE (found)), 0)); ! parse_error_context (method_wfl, ! "Method `%s' was defined with return type `%s' in class `%s'", lang_printable_name (found, 0), t, ! IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found))))); free (t); } --- 9369,9381 ---- types. */ if (TREE_TYPE (TREE_TYPE (found)) != TREE_TYPE (TREE_TYPE (method))) { ! char *t = xstrdup (lang_printable_name (TREE_TYPE (TREE_TYPE (found)), 0)); ! parse_error_context (method_wfl, ! "Method `%s' was defined with return type `%s' in class `%s'", lang_printable_name (found, 0), t, ! IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found))))); free (t); } *************** java_check_regular_methods (class_decl) *** 9939,9945 **** /* Static *can* override static */ if (METHOD_STATIC (found) && METHOD_STATIC (method)) continue; ! parse_error_context (method_wfl, "%s methods can't be overriden. Method `%s' is %s in class `%s'", (METHOD_FINAL (found) ? "Final" : "Static"), --- 9388,9394 ---- /* Static *can* override static */ if (METHOD_STATIC (found) && METHOD_STATIC (method)) continue; ! parse_error_context (method_wfl, "%s methods can't be overriden. Method `%s' is %s in class `%s'", (METHOD_FINAL (found) ? "Final" : "Static"), *************** java_check_regular_methods (class_decl) *** 9953,9959 **** /* Static method can't override instance method. */ if (METHOD_STATIC (method)) { ! parse_error_context (method_wfl, "Instance methods can't be overriden by a static method. Method `%s' is an instance method in class `%s'", lang_printable_name (found, 0), --- 9402,9408 ---- /* Static method can't override instance method. */ if (METHOD_STATIC (method)) { ! parse_error_context (method_wfl, "Instance methods can't be overriden by a static method. Method `%s' is an instance method in class `%s'", lang_printable_name (found, 0), *************** java_check_regular_methods (class_decl) *** 9971,9987 **** taken care of. */ if (!CLASS_INTERFACE (TYPE_NAME (DECL_CONTEXT (found))) && ((METHOD_PUBLIC (found) && !METHOD_PUBLIC (method)) ! || (METHOD_PROTECTED (found) && !(METHOD_PUBLIC (method) || METHOD_PROTECTED (method))) || (!(aflags & (ACC_PUBLIC | ACC_PRIVATE | ACC_STATIC)) && METHOD_PRIVATE (method)))) { ! parse_error_context (method_wfl, "Methods can't be overridden to be more private. Method `%s' is not %s in class `%s'", lang_printable_name (method, 0), ! (METHOD_PUBLIC (method) ? "public" : (METHOD_PRIVATE (method) ? "private" : "protected")), ! IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found))))); continue; } --- 9420,9436 ---- taken care of. */ if (!CLASS_INTERFACE (TYPE_NAME (DECL_CONTEXT (found))) && ((METHOD_PUBLIC (found) && !METHOD_PUBLIC (method)) ! || (METHOD_PROTECTED (found) && !(METHOD_PUBLIC (method) || METHOD_PROTECTED (method))) || (!(aflags & (ACC_PUBLIC | ACC_PRIVATE | ACC_STATIC)) && METHOD_PRIVATE (method)))) { ! parse_error_context (method_wfl, "Methods can't be overridden to be more private. Method `%s' is not %s in class `%s'", lang_printable_name (method, 0), ! (METHOD_PUBLIC (method) ? "public" : (METHOD_PRIVATE (method) ? "private" : "protected")), ! IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found))))); continue; } *************** java_check_regular_methods (class_decl) *** 9992,9998 **** /* Inheriting multiple methods with the same signature. FIXME */ } ! if (!TYPE_NVIRTUALS (class)) TYPE_METHODS (class) = nreverse (TYPE_METHODS (class)); --- 9441,9447 ---- /* Inheriting multiple methods with the same signature. FIXME */ } ! if (!TYPE_NVIRTUALS (class)) TYPE_METHODS (class) = nreverse (TYPE_METHODS (class)); *************** java_check_regular_methods (class_decl) *** 10004,10010 **** abort (); } ! /* Return a non zero value if the `throws' clause of METHOD (if any) is incompatible with the `throws' clause of FOUND (if any). */ static void --- 9453,9459 ---- abort (); } ! /* Return a nonzero value if the `throws' clause of METHOD (if any) is incompatible with the `throws' clause of FOUND (if any). */ static void *************** check_throws_clauses (method, method_wfl *** 10024,10040 **** if (IS_UNCHECKED_EXCEPTION_P (TREE_VALUE (mthrows))) continue; /* Checked expression must be compatible */ ! for (fthrows = DECL_FUNCTION_THROWS (found); fthrows; fthrows = TREE_CHAIN (fthrows)) if (inherits_from_p (TREE_VALUE (mthrows), TREE_VALUE (fthrows))) break; if (!fthrows) { ! parse_error_context (method_wfl, "Invalid checked exception class `%s' in `throws' clause. The exception must be a subclass of an exception thrown by `%s' from class `%s'", IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (TREE_VALUE (mthrows)))), lang_printable_name (found, 0), ! IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found))))); } } --- 9473,9489 ---- if (IS_UNCHECKED_EXCEPTION_P (TREE_VALUE (mthrows))) continue; /* Checked expression must be compatible */ ! for (fthrows = DECL_FUNCTION_THROWS (found); fthrows; fthrows = TREE_CHAIN (fthrows)) if (inherits_from_p (TREE_VALUE (mthrows), TREE_VALUE (fthrows))) break; if (!fthrows) { ! parse_error_context (method_wfl, "Invalid checked exception class `%s' in `throws' clause. The exception must be a subclass of an exception thrown by `%s' from class `%s'", IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (TREE_VALUE (mthrows)))), lang_printable_name (found, 0), ! IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found))))); } } *************** java_check_abstract_methods (interface_d *** 10063,10073 **** { char *t; t = xstrdup (lang_printable_name (TREE_TYPE (TREE_TYPE (found)), 0)); ! parse_error_context (DECL_FUNCTION_WFL (found), "Method `%s' was defined with return type `%s' in class `%s'", lang_printable_name (found, 0), t, ! IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found))))); free (t); continue; --- 9512,9522 ---- { char *t; t = xstrdup (lang_printable_name (TREE_TYPE (TREE_TYPE (found)), 0)); ! parse_error_context (DECL_FUNCTION_WFL (found), "Method `%s' was defined with return type `%s' in class `%s'", lang_printable_name (found, 0), t, ! IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found))))); free (t); continue; *************** java_check_abstract_methods (interface_d *** 10085,10107 **** if (!vec_elt) continue; sub_interface = BINFO_TYPE (vec_elt); ! for (sub_interface_method = TYPE_METHODS (sub_interface); sub_interface_method; sub_interface_method = TREE_CHAIN (sub_interface_method)) { ! found = lookup_java_interface_method2 (interface, sub_interface_method); if (found && (found != sub_interface_method)) { ! parse_error_context (lookup_cl (sub_interface_method), "Interface `%s' inherits method `%s' from interface `%s'. This method is redefined with a different return type in interface `%s'", IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (interface))), lang_printable_name (found, 0), ! IDENTIFIER_POINTER ! (DECL_NAME (TYPE_NAME (DECL_CONTEXT (sub_interface_method)))), ! IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found))))); } } --- 9534,9556 ---- if (!vec_elt) continue; sub_interface = BINFO_TYPE (vec_elt); ! for (sub_interface_method = TYPE_METHODS (sub_interface); sub_interface_method; sub_interface_method = TREE_CHAIN (sub_interface_method)) { ! found = lookup_java_interface_method2 (interface, sub_interface_method); if (found && (found != sub_interface_method)) { ! parse_error_context (lookup_cl (sub_interface_method), "Interface `%s' inherits method `%s' from interface `%s'. This method is redefined with a different return type in interface `%s'", IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (interface))), lang_printable_name (found, 0), ! IDENTIFIER_POINTER ! (DECL_NAME (TYPE_NAME (DECL_CONTEXT (sub_interface_method)))), ! IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found))))); } } *************** lookup_java_interface_method2 (class, me *** 10126,10138 **** { tree vec_elt = TREE_VEC_ELT (basetype_vec, i), to_return; if ((BINFO_TYPE (vec_elt) != object_type_node) ! && (to_return = lookup_java_method2 (BINFO_TYPE (vec_elt), method_decl, 1))) return to_return; } for (i = 0; i < n; i++) { ! to_return = lookup_java_interface_method2 (BINFO_TYPE (TREE_VEC_ELT (basetype_vec, i)), method_decl); if (to_return) return to_return; --- 9575,9587 ---- { tree vec_elt = TREE_VEC_ELT (basetype_vec, i), to_return; if ((BINFO_TYPE (vec_elt) != object_type_node) ! && (to_return = lookup_java_method2 (BINFO_TYPE (vec_elt), method_decl, 1))) return to_return; } for (i = 0; i < n; i++) { ! to_return = lookup_java_interface_method2 (BINFO_TYPE (TREE_VEC_ELT (basetype_vec, i)), method_decl); if (to_return) return to_return; *************** lookup_java_method2 (clas, method_decl, *** 10153,10159 **** method_signature = build_java_argument_signature (TREE_TYPE (method_decl)); name = DECL_NAME (method_decl); ! method_name = (TREE_CODE (name) == EXPR_WITH_FILE_LOCATION ? EXPR_WFL_NODE (name) : name); method_type = TREE_TYPE (TREE_TYPE (method_decl)); --- 9602,9608 ---- method_signature = build_java_argument_signature (TREE_TYPE (method_decl)); name = DECL_NAME (method_decl); ! method_name = (TREE_CODE (name) == EXPR_WITH_FILE_LOCATION ? EXPR_WFL_NODE (name) : name); method_type = TREE_TYPE (TREE_TYPE (method_decl)); *************** lookup_java_method2 (clas, method_decl, *** 10166,10172 **** tree name = DECL_NAME (method); if ((TREE_CODE (name) == EXPR_WITH_FILE_LOCATION ? EXPR_WFL_NODE (name) : name) == method_name ! && method_sig == method_signature && TREE_TYPE (TREE_TYPE (method)) != method_type) return method; } --- 9615,9621 ---- tree name = DECL_NAME (method); if ((TREE_CODE (name) == EXPR_WITH_FILE_LOCATION ? EXPR_WFL_NODE (name) : name) == method_name ! && method_sig == method_signature && TREE_TYPE (TREE_TYPE (method)) != method_type) return method; } *************** lookup_java_method2 (clas, method_decl, *** 10178,10211 **** /* Return the line that matches DECL line number, and try its best to position the column number. Used during error reports. */ static tree lookup_cl (decl) tree decl; { - static tree cl = NULL_TREE; char *line, *found; ! if (!decl) return NULL_TREE; ! if (cl == NULL_TREE) { ! cl = build_expr_wfl (NULL_TREE, NULL, 0, 0); ! ggc_add_tree_root (&cl, 1); } ! EXPR_WFL_FILENAME_NODE (cl) = get_identifier (DECL_SOURCE_FILE (decl)); ! EXPR_WFL_SET_LINECOL (cl, DECL_SOURCE_LINE_FIRST (decl), -1); ! line = java_get_line_col (EXPR_WFL_FILENAME (cl), ! EXPR_WFL_LINENO (cl), EXPR_WFL_COLNO (cl)); ! found = strstr ((const char *)line, (const char *)IDENTIFIER_POINTER (DECL_NAME (decl))); if (found) ! EXPR_WFL_SET_LINECOL (cl, EXPR_WFL_LINENO (cl), found - line); ! return cl; } /* Look for a simple name in the single-type import list */ --- 9627,9659 ---- /* Return the line that matches DECL line number, and try its best to position the column number. Used during error reports. */ + static GTY(()) tree cl_v; static tree lookup_cl (decl) tree decl; { char *line, *found; ! if (!decl) return NULL_TREE; ! if (cl_v == NULL_TREE) { ! cl_v = build_expr_wfl (NULL_TREE, NULL, 0, 0); } ! EXPR_WFL_FILENAME_NODE (cl_v) = get_identifier (DECL_SOURCE_FILE (decl)); ! EXPR_WFL_SET_LINECOL (cl_v, DECL_SOURCE_LINE_FIRST (decl), -1); ! line = java_get_line_col (EXPR_WFL_FILENAME (cl_v), ! EXPR_WFL_LINENO (cl_v), EXPR_WFL_COLNO (cl_v)); ! found = strstr ((const char *)line, (const char *)IDENTIFIER_POINTER (DECL_NAME (decl))); if (found) ! EXPR_WFL_SET_LINECOL (cl_v, EXPR_WFL_LINENO (cl_v), found - line); ! return cl_v; } /* Look for a simple name in the single-type import list */ *************** process_imports () *** 10244,10250 **** /* Don't load twice something already defined. */ if (IDENTIFIER_CLASS_VALUE (to_be_found)) continue; ! while (1) { tree left; --- 9692,9698 ---- /* Don't load twice something already defined. */ if (IDENTIFIER_CLASS_VALUE (to_be_found)) continue; ! while (1) { tree left; *************** process_imports () *** 10253,10259 **** load_class (to_be_found, 0); error_found = check_pkg_class_access (to_be_found, TREE_PURPOSE (import), true); ! /* We found it, we can bail out */ if (IDENTIFIER_CLASS_VALUE (to_be_found)) break; --- 9701,9707 ---- load_class (to_be_found, 0); error_found = check_pkg_class_access (to_be_found, TREE_PURPOSE (import), true); ! /* We found it, we can bail out */ if (IDENTIFIER_CLASS_VALUE (to_be_found)) break; *************** find_in_imports (enclosing_type, class_t *** 10290,10296 **** tree enclosing_type; tree class_type; { ! tree import = (enclosing_type ? TYPE_IMPORT_LIST (enclosing_type) : ctxp->import_list); while (import) { --- 9738,9744 ---- tree enclosing_type; tree class_type; { ! tree import = (enclosing_type ? TYPE_IMPORT_LIST (enclosing_type) : ctxp->import_list); while (import) { *************** read_import_dir (wfl) *** 10378,10384 **** int current_entry_len = zipd->filename_length; if (current_entry_len >= BUFFER_LENGTH (filename) ! && strncmp (filename->data, current_entry, BUFFER_LENGTH (filename)) != 0) continue; found |= note_possible_classname (current_entry, --- 9826,9832 ---- int current_entry_len = zipd->filename_length; if (current_entry_len >= BUFFER_LENGTH (filename) ! && strncmp (filename->data, current_entry, BUFFER_LENGTH (filename)) != 0) continue; found |= note_possible_classname (current_entry, *************** read_import_dir (wfl) *** 10405,10411 **** *filename->ptr++ = '/'; for (;;) { ! int len; const char *d_name; struct dirent *direntp = readdir (dirp); if (!direntp) --- 9853,9859 ---- *filename->ptr++ = '/'; for (;;) { ! int len; const char *d_name; struct dirent *direntp = readdir (dirp); if (!direntp) *************** read_import_dir (wfl) *** 10447,10453 **** /* Possibly find a type in the import on demands specified types. Returns 1 if an error occurred, 0 otherwise. Run through the entire list, to detected potential double definitions. */ ! static int find_in_imports_on_demand (enclosing_type, class_type) tree enclosing_type; --- 9895,9901 ---- /* Possibly find a type in the import on demands specified types. Returns 1 if an error occurred, 0 otherwise. Run through the entire list, to detected potential double definitions. */ ! static int find_in_imports_on_demand (enclosing_type, class_type) tree enclosing_type; *************** find_in_imports_on_demand (enclosing_typ *** 10468,10482 **** const char *id_name; tree decl, type_name_copy; ! obstack_grow (&temporary_obstack, IDENTIFIER_POINTER (EXPR_WFL_NODE (TREE_PURPOSE (import))), IDENTIFIER_LENGTH (EXPR_WFL_NODE (TREE_PURPOSE (import)))); obstack_1grow (&temporary_obstack, '.'); ! obstack_grow0 (&temporary_obstack, IDENTIFIER_POINTER (class_type_name), IDENTIFIER_LENGTH (class_type_name)); id_name = obstack_finish (&temporary_obstack); ! if (! (node = maybe_get_identifier (id_name))) continue; --- 9916,9930 ---- const char *id_name; tree decl, type_name_copy; ! obstack_grow (&temporary_obstack, IDENTIFIER_POINTER (EXPR_WFL_NODE (TREE_PURPOSE (import))), IDENTIFIER_LENGTH (EXPR_WFL_NODE (TREE_PURPOSE (import)))); obstack_1grow (&temporary_obstack, '.'); ! obstack_grow0 (&temporary_obstack, IDENTIFIER_POINTER (class_type_name), IDENTIFIER_LENGTH (class_type_name)); id_name = obstack_finish (&temporary_obstack); ! if (! (node = maybe_get_identifier (id_name))) continue; *************** find_in_imports_on_demand (enclosing_typ *** 10514,10520 **** TYPE_NAME (class_type) = type_name_copy; continue; } ! /* If the loaded class is accessible, we keep a tab on it to detect and report multiple inclusions. */ if (IS_A_CLASSFILE_NAME (node)) --- 9962,9968 ---- TYPE_NAME (class_type) = type_name_copy; continue; } ! /* If the loaded class is accessible, we keep a tab on it to detect and report multiple inclusions. */ if (IS_A_CLASSFILE_NAME (node)) *************** find_in_imports_on_demand (enclosing_typ *** 10527,10539 **** else if (seen_once >= 0) { tree location = (cl ? cl : TREE_PURPOSE (import)); ! tree package = (cl ? EXPR_WFL_NODE (cl) : EXPR_WFL_NODE (TREE_PURPOSE (import))); seen_once++; ! parse_error_context (location, "Type `%s' also potentially defined in package `%s'", ! IDENTIFIER_POINTER (TYPE_NAME (class_type)), IDENTIFIER_POINTER (package)); } } --- 9975,9987 ---- else if (seen_once >= 0) { tree location = (cl ? cl : TREE_PURPOSE (import)); ! tree package = (cl ? EXPR_WFL_NODE (cl) : EXPR_WFL_NODE (TREE_PURPOSE (import))); seen_once++; ! parse_error_context (location, "Type `%s' also potentially defined in package `%s'", ! IDENTIFIER_POINTER (TYPE_NAME (class_type)), IDENTIFIER_POINTER (package)); } } *************** find_in_imports_on_demand (enclosing_typ *** 10546,10552 **** return (seen_once < 0 ? 0 : seen_once); /* It's ok not to have found */ } ! /* Add package NAME to the list of package encountered so far. To speed up class lookup in do_resolve_class, we make sure a particular package is added only once. */ --- 9994,10000 ---- return (seen_once < 0 ? 0 : seen_once); /* It's ok not to have found */ } ! /* Add package NAME to the list of packages encountered so far. To speed up class lookup in do_resolve_class, we make sure a particular package is added only once. */ *************** static void *** 10554,10572 **** register_package (name) tree name; { ! static struct hash_table _pht, *pht = NULL; ! if (!pht) ! { ! hash_table_init (&_pht, hash_newfunc, ! java_hash_hash_tree_node, java_hash_compare_tree_node); ! pht = &_pht; ! } ! ! if (!hash_lookup (pht, (const hash_table_key) name, FALSE, NULL)) { package_list = chainon (package_list, build_tree_list (name, NULL)); ! hash_lookup (pht, (const hash_table_key) name, TRUE, NULL); } } --- 10002,10018 ---- register_package (name) tree name; { ! static htab_t pht; ! PTR *e; ! if (pht == NULL) ! pht = htab_create (50, htab_hash_pointer, htab_eq_pointer, NULL); ! ! e = htab_find_slot (pht, name, INSERT); ! if (*e == NULL) { package_list = chainon (package_list, build_tree_list (name, NULL)); ! *e = name; } } *************** resolve_package (pkg, next, type_name) *** 10586,10599 **** /* Try to progressively construct a type name */ if (TREE_CODE (pkg) == EXPR_WITH_FILE_LOCATION) ! for (current = EXPR_WFL_QUALIFICATION (pkg); current; current = TREE_CHAIN (current)) { /* If we don't have what we're expecting, exit now. TYPE_NAME will be null and the error caught later. */ if (TREE_CODE (QUAL_WFL (current)) != EXPR_WITH_FILE_LOCATION) break; ! *type_name = merge_qualified_name (*type_name, EXPR_WFL_NODE (QUAL_WFL (current))); if ((decl = resolve_no_layout (*type_name, NULL_TREE))) { --- 10032,10045 ---- /* Try to progressively construct a type name */ if (TREE_CODE (pkg) == EXPR_WITH_FILE_LOCATION) ! for (current = EXPR_WFL_QUALIFICATION (pkg); current; current = TREE_CHAIN (current)) { /* If we don't have what we're expecting, exit now. TYPE_NAME will be null and the error caught later. */ if (TREE_CODE (QUAL_WFL (current)) != EXPR_WITH_FILE_LOCATION) break; ! *type_name = merge_qualified_name (*type_name, EXPR_WFL_NODE (QUAL_WFL (current))); if ((decl = resolve_no_layout (*type_name, NULL_TREE))) { *************** resolve_package (pkg, next, type_name) *** 10608,10614 **** } ! /* Check accessibility of inner classes according to member access rules. DECL is the inner class, ENCLOSING_DECL is the class from which the access is being attempted. */ --- 10054,10060 ---- } ! /* Check accessibility of inner classes according to member access rules. DECL is the inner class, ENCLOSING_DECL is the class from which the access is being attempted. */ *************** check_inner_class_access (decl, enclosin *** 10635,10645 **** class in which DECL is declared. */ tree top_level = decl; while (DECL_CONTEXT (top_level)) ! top_level = DECL_CONTEXT (top_level); while (DECL_CONTEXT (enclosing_decl)) enclosing_decl = DECL_CONTEXT (enclosing_decl); if (top_level == enclosing_decl) ! return; access = "private"; } else if (CLASS_PROTECTED (decl)) --- 10081,10091 ---- class in which DECL is declared. */ tree top_level = decl; while (DECL_CONTEXT (top_level)) ! top_level = DECL_CONTEXT (top_level); while (DECL_CONTEXT (enclosing_decl)) enclosing_decl = DECL_CONTEXT (enclosing_decl); if (top_level == enclosing_decl) ! return; access = "private"; } else if (CLASS_PROTECTED (decl)) *************** check_inner_class_access (decl, enclosin *** 10648,10654 **** /* Access is permitted from within the same package... */ if (in_same_package (decl, enclosing_decl)) return; ! /* ... or from within the body of a subtype of the context in which DECL is declared. */ decl_context = DECL_CONTEXT (decl); --- 10094,10100 ---- /* Access is permitted from within the same package... */ if (in_same_package (decl, enclosing_decl)) return; ! /* ... or from within the body of a subtype of the context in which DECL is declared. */ decl_context = DECL_CONTEXT (decl); *************** check_inner_class_access (decl, enclosin *** 10656,10674 **** { if (CLASS_INTERFACE (decl)) { ! if (interface_of_p (TREE_TYPE (decl_context), enclosing_decl_type)) return; } else { /* Eww. The order of the arguments is different!! */ ! if (inherits_from_p (enclosing_decl_type, TREE_TYPE (decl_context))) return; } enclosing_decl = DECL_CONTEXT (enclosing_decl); ! } access = "protected"; } else if (! CLASS_PUBLIC (decl)) --- 10102,10120 ---- { if (CLASS_INTERFACE (decl)) { ! if (interface_of_p (TREE_TYPE (decl_context), enclosing_decl_type)) return; } else { /* Eww. The order of the arguments is different!! */ ! if (inherits_from_p (enclosing_decl_type, TREE_TYPE (decl_context))) return; } enclosing_decl = DECL_CONTEXT (enclosing_decl); ! } access = "protected"; } else if (! CLASS_PUBLIC (decl)) *************** check_pkg_class_access (class_name, cl, *** 10720,10726 **** return 0; if (verbose) ! parse_error_context (cl, "Can't access %s `%s'. Only public classes and interfaces in other packages can be accessed", (CLASS_INTERFACE (TYPE_NAME (type)) ? "interface" : "class"), IDENTIFIER_POINTER (class_name)); --- 10166,10172 ---- return 0; if (verbose) ! parse_error_context (cl, "Can't access %s `%s'. Only public classes and interfaces in other packages can be accessed", (CLASS_INTERFACE (TYPE_NAME (type)) ? "interface" : "class"), IDENTIFIER_POINTER (class_name)); *************** declare_local_variables (modifier, type, *** 10752,10765 **** if (modifier) { ! int i; ! for (i = 0; i <= 10; i++) if (1 << i & modifier) break; if (modifier == ACC_FINAL) final_p = 1; ! else { ! parse_error_context ! (ctxp->modifier_ctx [i], "Only `final' is allowed as a local variables modifier"); return; } --- 10198,10213 ---- if (modifier) { ! size_t i; ! for (i = 0; i < ARRAY_SIZE (ctxp->modifier_ctx); i++) ! if (1 << i & modifier) ! break; if (modifier == ACC_FINAL) final_p = 1; ! else { ! parse_error_context ! (ctxp->modifier_ctx [i], "Only `final' is allowed as a local variables modifier"); return; } *************** declare_local_variables (modifier, type, *** 10805,10820 **** MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC (decl); DECL_FINAL (decl) = final_p; BLOCK_CHAIN_DECL (decl); ! /* If doing xreferencing, replace the line number with the WFL compound value */ if (flag_emit_xref) DECL_SOURCE_LINE (decl) = EXPR_WFL_LINECOL (wfl); ! /* Don't try to use an INIT statement when an error was found */ if (init && java_error_count) init = NULL_TREE; ! /* Add the initialization function to the current function's code */ if (init) { --- 10253,10268 ---- MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC (decl); DECL_FINAL (decl) = final_p; BLOCK_CHAIN_DECL (decl); ! /* If doing xreferencing, replace the line number with the WFL compound value */ if (flag_emit_xref) DECL_SOURCE_LINE (decl) = EXPR_WFL_LINECOL (wfl); ! /* Don't try to use an INIT statement when an error was found */ if (init && java_error_count) init = NULL_TREE; ! /* Add the initialization function to the current function's code */ if (init) { *************** declare_local_variables (modifier, type, *** 10825,10831 **** build_debugable_stmt (EXPR_WFL_LINECOL (init), init)); } ! /* Setup dependency the type of the decl */ if (must_chain) { --- 10273,10279 ---- build_debugable_stmt (EXPR_WFL_LINECOL (init), init)); } ! /* Setup dependency the type of the decl */ if (must_chain) { *************** source_start_java_method (fndecl) *** 10860,10866 **** { tree type = TREE_VALUE (tem); tree name = TREE_PURPOSE (tem); ! /* If type is incomplete. Create an incomplete decl and ask for the decl to be patched later */ if (INCOMPLETE_TYPE_P (type)) --- 10308,10314 ---- { tree type = TREE_VALUE (tem); tree name = TREE_PURPOSE (tem); ! /* If type is incomplete. Create an incomplete decl and ask for the decl to be patched later */ if (INCOMPLETE_TYPE_P (type)) *************** create_artificial_method (class, flags, *** 10905,10917 **** tree mdecl; java_parser_context_save_global (); ! lineno = 0; ! mdecl = make_node (FUNCTION_TYPE); TREE_TYPE (mdecl) = type; TYPE_ARG_TYPES (mdecl) = args; ! mdecl = add_method (class, flags, name, build_java_signature (mdecl)); java_parser_context_restore_global (); ! DECL_ARTIFICIAL (mdecl) = 1; return mdecl; } --- 10353,10365 ---- tree mdecl; java_parser_context_save_global (); ! lineno = 0; ! mdecl = make_node (FUNCTION_TYPE); TREE_TYPE (mdecl) = type; TYPE_ARG_TYPES (mdecl) = args; ! mdecl = add_method (class, flags, name, build_java_signature (mdecl)); java_parser_context_restore_global (); ! DECL_ARTIFICIAL (mdecl) = 1; return mdecl; } *************** dump_java_tree (phase, t) *** 10950,10955 **** --- 10398,10404 ---- int flags; stream = dump_begin (phase, &flags); + flags |= TDF_SLIM; if (stream) { dump_node (t, flags, stream); *************** source_end_java_method () *** 10980,10985 **** --- 10429,10436 ---- patched. Dump it to a file if the user requested it. */ dump_java_tree (TDI_original, fndecl); + java_optimize_inline (fndecl); + /* Generate function's code */ if (BLOCK_EXPR_BODY (DECL_FUNCTION_BODY (fndecl)) && ! flag_emit_class_files *************** add_stmt_to_block (b, type, stmt) *** 11024,11033 **** tree b, type, stmt; { tree body = BLOCK_EXPR_BODY (b), c; ! if (java_error_count) return body; ! if ((c = add_stmt_to_compound (body, type, stmt)) == body) return body; --- 10475,10484 ---- tree b, type, stmt; { tree body = BLOCK_EXPR_BODY (b), c; ! if (java_error_count) return body; ! if ((c = add_stmt_to_compound (body, type, stmt)) == body) return body; *************** static tree *** 11043,11048 **** --- 10494,10503 ---- add_stmt_to_compound (existing, type, stmt) tree existing, type, stmt; { + /* Keep track of this for inlining. */ + if (current_function_decl) + ++DECL_NUM_STMTS (current_function_decl); + if (existing) return build (COMPOUND_EXPR, type, existing, stmt); else *************** void java_layout_seen_class_methods () *** 11057,11066 **** while (1) { ! for (current = previous_list; current != end; current = TREE_CHAIN (current)) layout_class_methods (TREE_TYPE (TREE_VALUE (current))); ! if (previous_list != all_class_list) { end = previous_list; --- 10512,10521 ---- while (1) { ! for (current = previous_list; current != end; current = TREE_CHAIN (current)) layout_class_methods (TREE_TYPE (TREE_VALUE (current))); ! if (previous_list != all_class_list) { end = previous_list; *************** void java_layout_seen_class_methods () *** 11071,11090 **** } } void java_reorder_fields () { - static tree stop_reordering = NULL_TREE; - static int initialized_p; tree current; - /* Register STOP_REORDERING with the garbage collector. */ - if (!initialized_p) - { - ggc_add_tree_root (&stop_reordering, 1); - initialized_p = 1; - } - for (current = gclass_list; current; current = TREE_CHAIN (current)) { current_class = TREE_TYPE (TREE_VALUE (current)); --- 10526,10537 ---- } } + static GTY(()) tree stop_reordering; void java_reorder_fields () { tree current; for (current = gclass_list; current; current = TREE_CHAIN (current)) { current_class = TREE_TYPE (TREE_VALUE (current)); *************** java_reorder_fields () *** 11109,11115 **** after having reversed the fields */ else { ! TYPE_FIELDS (current_class) = nreverse (TYPE_FIELDS (current_class)); TYPE_SIZE (current_class) = NULL_TREE; } --- 10556,10562 ---- after having reversed the fields */ else { ! TYPE_FIELDS (current_class) = nreverse (TYPE_FIELDS (current_class)); TYPE_SIZE (current_class) = NULL_TREE; } *************** java_complete_expand_methods (class_decl *** 11239,11245 **** if (!DECL_CONSTRUCTOR_P (decl)) continue; ! no_body = !DECL_FUNCTION_BODY (decl); /* Don't generate debug info on line zero when expanding a generated constructor. */ --- 10686,10692 ---- if (!DECL_CONSTRUCTOR_P (decl)) continue; ! no_body = !DECL_FUNCTION_BODY (decl); /* Don't generate debug info on line zero when expanding a generated constructor. */ *************** java_complete_expand_methods (class_decl *** 11258,11264 **** /* Ctors aren't part of this batch. */ if (DECL_CONSTRUCTOR_P (decl) || DECL_CLINIT_P (decl)) continue; ! /* Skip abstract or native methods -- but do handle native methods when generating JNI stubs. */ if (METHOD_ABSTRACT (decl) || (! flag_jni && METHOD_NATIVE (decl))) --- 10705,10711 ---- /* Ctors aren't part of this batch. */ if (DECL_CONSTRUCTOR_P (decl) || DECL_CLINIT_P (decl)) continue; ! /* Skip abstract or native methods -- but do handle native methods when generating JNI stubs. */ if (METHOD_ABSTRACT (decl) || (! flag_jni && METHOD_NATIVE (decl))) *************** java_complete_expand_methods (class_decl *** 11286,11292 **** java_complete_expand_method (clinit); ctxp->explicit_constructor_p = 0; } ! /* We might have generated a class$ that we now want to expand */ if (TYPE_DOT_CLASS (current_class)) java_complete_expand_method (TYPE_DOT_CLASS (current_class)); --- 10733,10739 ---- java_complete_expand_method (clinit); ctxp->explicit_constructor_p = 0; } ! /* We might have generated a class$ that we now want to expand */ if (TYPE_DOT_CLASS (current_class)) java_complete_expand_method (TYPE_DOT_CLASS (current_class)); *************** java_complete_expand_methods (class_decl *** 11295,11301 **** prove wrong.) */ if (!CLASS_INTERFACE (class_decl)) for (decl = TYPE_METHODS (current_class); decl; decl = TREE_CHAIN (decl)) ! if (DECL_CONSTRUCTOR_P (decl) && verify_constructor_circularity (decl, decl)) break; --- 10742,10748 ---- prove wrong.) */ if (!CLASS_INTERFACE (class_decl)) for (decl = TYPE_METHODS (current_class); decl; decl = TREE_CHAIN (decl)) ! if (DECL_CONSTRUCTOR_P (decl) && verify_constructor_circularity (decl, decl)) break; *************** maybe_generate_pre_expand_clinit (class_ *** 11316,11322 **** return NULL_TREE; /* Go through all static fields and pre expand them */ ! for (current = TYPE_FIELDS (class_type); current; current = TREE_CHAIN (current)) if (FIELD_STATIC (current)) build_field_ref (NULL_TREE, class_type, DECL_NAME (current)); --- 10763,10769 ---- return NULL_TREE; /* Go through all static fields and pre expand them */ ! for (current = TYPE_FIELDS (class_type); current; current = TREE_CHAIN (current)) if (FIELD_STATIC (current)) build_field_ref (NULL_TREE, class_type, DECL_NAME (current)); *************** analyze_clinit_body (this_class, bbody) *** 11376,11392 **** case BLOCK: bbody = BLOCK_EXPR_BODY (bbody); break; ! case EXPR_WITH_FILE_LOCATION: bbody = EXPR_WFL_NODE (bbody); break; ! case COMPOUND_EXPR: if (analyze_clinit_body (this_class, TREE_OPERAND (bbody, 0))) return 1; bbody = TREE_OPERAND (bbody, 1); break; ! case MODIFY_EXPR: /* If we're generating to class file and we're dealing with an array initialization, we return 1 to keep */ --- 10823,10839 ---- case BLOCK: bbody = BLOCK_EXPR_BODY (bbody); break; ! case EXPR_WITH_FILE_LOCATION: bbody = EXPR_WFL_NODE (bbody); break; ! case COMPOUND_EXPR: if (analyze_clinit_body (this_class, TREE_OPERAND (bbody, 0))) return 1; bbody = TREE_OPERAND (bbody, 1); break; ! case MODIFY_EXPR: /* If we're generating to class file and we're dealing with an array initialization, we return 1 to keep */ *************** maybe_yank_clinit (mdecl) *** 11421,11427 **** { tree type, current; tree fbody, bbody; ! if (!DECL_CLINIT_P (mdecl)) return 0; --- 10868,10874 ---- { tree type, current; tree fbody, bbody; ! if (!DECL_CLINIT_P (mdecl)) return 0; *************** maybe_yank_clinit (mdecl) *** 11440,11446 **** type = DECL_CONTEXT (mdecl); current = TYPE_FIELDS (type); ! for (current = (current ? TREE_CHAIN (current) : current); current; current = TREE_CHAIN (current)) { tree f_init; --- 10887,10893 ---- type = DECL_CONTEXT (mdecl); current = TYPE_FIELDS (type); ! for (current = (current ? TREE_CHAIN (current) : current); current; current = TREE_CHAIN (current)) { tree f_init; *************** maybe_yank_clinit (mdecl) *** 11475,11481 **** if (TYPE_METHODS (type) == mdecl) TYPE_METHODS (type) = TREE_CHAIN (mdecl); else ! for (current = TYPE_METHODS (type); current; current = TREE_CHAIN (current)) if (TREE_CHAIN (current) == mdecl) { --- 10922,10928 ---- if (TYPE_METHODS (type) == mdecl) TYPE_METHODS (type) = TREE_CHAIN (mdecl); else ! for (current = TYPE_METHODS (type); current; current = TREE_CHAIN (current)) if (TREE_CHAIN (current) == mdecl) { *************** start_complete_expand_method (mdecl) *** 11501,11507 **** for (; tem; tem = TREE_CHAIN (tem)) { ! /* TREE_CHAIN (tem) will change after pushdecl. */ tree next = TREE_CHAIN (tem); tree type = TREE_TYPE (tem); if (PROMOTE_PROTOTYPES --- 10948,10954 ---- for (; tem; tem = TREE_CHAIN (tem)) { ! /* TREE_CHAIN (tem) will change after pushdecl. */ tree next = TREE_CHAIN (tem); tree type = TREE_TYPE (tem); if (PROMOTE_PROTOTYPES *************** java_complete_expand_method (mdecl) *** 11533,11539 **** /* Fix constructors before expanding them */ if (DECL_CONSTRUCTOR_P (mdecl)) fix_constructors (mdecl); ! /* Expand functions that have a body */ if (!DECL_FUNCTION_BODY (mdecl)) return; --- 10980,10986 ---- /* Fix constructors before expanding them */ if (DECL_CONSTRUCTOR_P (mdecl)) fix_constructors (mdecl); ! /* Expand functions that have a body */ if (!DECL_FUNCTION_BODY (mdecl)) return; *************** java_complete_expand_method (mdecl) *** 11550,11584 **** announce_function (mdecl); if (! quiet_flag) fprintf (stderr, "]"); ! /* Prepare the function for tree completion */ start_complete_expand_method (mdecl); /* Install the current this */ ! current_this = (!METHOD_STATIC (mdecl) ? BLOCK_EXPR_DECLS (DECL_FUNCTION_BODY (mdecl)) : NULL_TREE); /* Purge the `throws' list of unchecked exceptions (we save a copy of the list and re-install it later.) */ exception_copy = copy_list (DECL_FUNCTION_THROWS (mdecl)); purge_unchecked_exceptions (mdecl); ! /* Install exceptions thrown with `throws' */ PUSH_EXCEPTIONS (DECL_FUNCTION_THROWS (mdecl)); ! if (block_body != NULL_TREE) { block_body = java_complete_tree (block_body); ! /* Before we check initialization, attached all class initialization variable to the block_body */ ! hash_traverse (&DECL_FUNCTION_INIT_TEST_TABLE (mdecl), attach_init_test_initialization_flags, block_body); ! if (! flag_emit_xref && ! METHOD_NATIVE (mdecl)) { check_for_initialization (block_body, mdecl); ! /* Go through all the flags marking the initialization of static variables and see whether they're definitively assigned, in which case the type is remembered as --- 10997,11031 ---- announce_function (mdecl); if (! quiet_flag) fprintf (stderr, "]"); ! /* Prepare the function for tree completion */ start_complete_expand_method (mdecl); /* Install the current this */ ! current_this = (!METHOD_STATIC (mdecl) ? BLOCK_EXPR_DECLS (DECL_FUNCTION_BODY (mdecl)) : NULL_TREE); /* Purge the `throws' list of unchecked exceptions (we save a copy of the list and re-install it later.) */ exception_copy = copy_list (DECL_FUNCTION_THROWS (mdecl)); purge_unchecked_exceptions (mdecl); ! /* Install exceptions thrown with `throws' */ PUSH_EXCEPTIONS (DECL_FUNCTION_THROWS (mdecl)); ! if (block_body != NULL_TREE) { block_body = java_complete_tree (block_body); ! /* Before we check initialization, attached all class initialization variable to the block_body */ ! htab_traverse (DECL_FUNCTION_INIT_TEST_TABLE (mdecl), attach_init_test_initialization_flags, block_body); ! if (! flag_emit_xref && ! METHOD_NATIVE (mdecl)) { check_for_initialization (block_body, mdecl); ! /* Go through all the flags marking the initialization of static variables and see whether they're definitively assigned, in which case the type is remembered as *************** java_complete_expand_method (mdecl) *** 11589,11604 **** MDECL. This used with caution helps removing extra initialization of self. */ if (METHOD_STATIC (mdecl)) ! hash_lookup (&DECL_FUNCTION_INITIALIZED_CLASS_TABLE (mdecl), ! (hash_table_key) DECL_CONTEXT (mdecl), ! TRUE, NULL); } } ctxp->explicit_constructor_p = 0; } ! BLOCK_EXPR_BODY (fbody) = block_body; ! /* If we saw a return but couldn't evaluate it properly, we'll have an error_mark_node here. */ if (block_body != error_mark_node --- 11036,11053 ---- MDECL. This used with caution helps removing extra initialization of self. */ if (METHOD_STATIC (mdecl)) ! { ! *(htab_find_slot ! (DECL_FUNCTION_INITIALIZED_CLASS_TABLE (mdecl), ! DECL_CONTEXT (mdecl), INSERT)) = DECL_CONTEXT (mdecl); ! } } } ctxp->explicit_constructor_p = 0; } ! BLOCK_EXPR_BODY (fbody) = block_body; ! /* If we saw a return but couldn't evaluate it properly, we'll have an error_mark_node here. */ if (block_body != error_mark_node *************** java_expand_method_bodies (class) *** 11638,11643 **** --- 11087,11097 ---- current_function_decl = decl; + /* Save the function for inlining. */ + if (flag_inline_trees) + DECL_SAVED_TREE (decl) = + BLOCK_EXPR_BODY (DECL_FUNCTION_BODY (decl)); + /* It's time to assign the variable flagging static class initialization based on which classes invoked static methods are definitely initializing. This should be flagged. */ *************** java_expand_method_bodies (class) *** 11659,11665 **** /* For each class definitely initialized in CALLED_METHOD, fill ASSIGNMENT_COMPOUND with assignment to the class initialization flag. */ ! hash_traverse (&DECL_FUNCTION_INITIALIZED_CLASS_TABLE (called_method), emit_test_initialization, assignment_compound_list); --- 11113,11119 ---- /* For each class definitely initialized in CALLED_METHOD, fill ASSIGNMENT_COMPOUND with assignment to the class initialization flag. */ ! htab_traverse (DECL_FUNCTION_INITIALIZED_CLASS_TABLE (called_method), emit_test_initialization, assignment_compound_list); *************** java_expand_method_bodies (class) *** 11669,11675 **** } } ! /* Prepare the function for RTL expansion */ start_complete_expand_method (decl); /* Expand function start, generate initialization flag --- 11123,11129 ---- } } ! /* Prepare the function for RTL expansion */ start_complete_expand_method (decl); /* Expand function start, generate initialization flag *************** build_outer_field_access (id, decl) *** 11710,11716 **** && (!FIELD_PRIVATE (decl) || !flag_emit_class_files )) { tree thisn = build_current_thisn (current_class); ! access = make_qualified_primary (build_wfl_node (thisn), id, EXPR_WFL_LINECOL (id)); } /* Otherwise, generate access methods to outer this and access the --- 11164,11170 ---- && (!FIELD_PRIVATE (decl) || !flag_emit_class_files )) { tree thisn = build_current_thisn (current_class); ! access = make_qualified_primary (build_wfl_node (thisn), id, EXPR_WFL_LINECOL (id)); } /* Otherwise, generate access methods to outer this and access the *************** build_outer_field_access (id, decl) *** 11741,11758 **** return resolve_expression_name (access, NULL); } ! /* Return a non zero value if NODE describes an outer field inner access. */ static int outer_field_access_p (type, decl) tree type, decl; { ! if (!INNER_CLASS_TYPE_P (type) || TREE_CODE (decl) != FIELD_DECL || DECL_CONTEXT (decl) == type) return 0; ! /* If the inner class extends the declaration context of the field we're try to acces, then this isn't an outer field access */ if (inherits_from_p (type, DECL_CONTEXT (decl))) --- 11195,11212 ---- return resolve_expression_name (access, NULL); } ! /* Return a nonzero value if NODE describes an outer field inner access. */ static int outer_field_access_p (type, decl) tree type, decl; { ! if (!INNER_CLASS_TYPE_P (type) || TREE_CODE (decl) != FIELD_DECL || DECL_CONTEXT (decl) == type) return 0; ! /* If the inner class extends the declaration context of the field we're try to acces, then this isn't an outer field access */ if (inherits_from_p (type, DECL_CONTEXT (decl))) *************** outer_field_access_p (type, decl) *** 11777,11783 **** return 0; } ! /* Return a non zero value if NODE represents an outer field inner access that was been already expanded. As a side effect, it returns the name of the field being accessed and the argument passed to the access function, suitable for a regeneration of the access method --- 11231,11237 ---- return 0; } ! /* Return a nonzero value if NODE represents an outer field inner access that was been already expanded. As a side effect, it returns the name of the field being accessed and the argument passed to the access function, suitable for a regeneration of the access method *************** outer_field_expanded_access_p (node, nam *** 11795,11815 **** /* Well, gcj generates slightly different tree nodes when compiling to native or bytecodes. It's the case for function calls. */ ! if (flag_emit_class_files && TREE_CODE (node) == CALL_EXPR && OUTER_FIELD_ACCESS_IDENTIFIER_P (DECL_NAME (TREE_OPERAND (node, 0)))) identified = 1; else if (!flag_emit_class_files) { node = TREE_OPERAND (node, 0); ! if (node && TREE_OPERAND (node, 0) && TREE_CODE (TREE_OPERAND (node, 0)) == ADDR_EXPR) { node = TREE_OPERAND (node, 0); if (TREE_OPERAND (node, 0) && TREE_CODE (TREE_OPERAND (node, 0)) == FUNCTION_DECL ! && (OUTER_FIELD_ACCESS_IDENTIFIER_P (DECL_NAME (TREE_OPERAND (node, 0))))) identified = 1; } --- 11249,11269 ---- /* Well, gcj generates slightly different tree nodes when compiling to native or bytecodes. It's the case for function calls. */ ! if (flag_emit_class_files && TREE_CODE (node) == CALL_EXPR && OUTER_FIELD_ACCESS_IDENTIFIER_P (DECL_NAME (TREE_OPERAND (node, 0)))) identified = 1; else if (!flag_emit_class_files) { node = TREE_OPERAND (node, 0); ! if (node && TREE_OPERAND (node, 0) && TREE_CODE (TREE_OPERAND (node, 0)) == ADDR_EXPR) { node = TREE_OPERAND (node, 0); if (TREE_OPERAND (node, 0) && TREE_CODE (TREE_OPERAND (node, 0)) == FUNCTION_DECL ! && (OUTER_FIELD_ACCESS_IDENTIFIER_P (DECL_NAME (TREE_OPERAND (node, 0))))) identified = 1; } *************** outer_field_access_fix (wfl, node, rhs) *** 11835,11844 **** tree wfl, node, rhs; { tree name, arg_type, arg; ! if (outer_field_expanded_access_p (node, &name, &arg_type, &arg)) { ! node = build_outer_field_access_expr (EXPR_WFL_LINECOL (wfl), arg_type, name, arg, rhs); return java_complete_tree (node); } --- 11289,11298 ---- tree wfl, node, rhs; { tree name, arg_type, arg; ! if (outer_field_expanded_access_p (node, &name, &arg_type, &arg)) { ! node = build_outer_field_access_expr (EXPR_WFL_LINECOL (wfl), arg_type, name, arg, rhs); return java_complete_tree (node); } *************** outer_field_access_fix (wfl, node, rhs) *** 11846,11852 **** } /* Construct the expression that calls an access method: ! .access$( [, ]); ARG2 can be NULL and will be omitted in that case. It will denote a read access. */ --- 11300,11306 ---- } /* Construct the expression that calls an access method: ! .access$( [, ]); ARG2 can be NULL and will be omitted in that case. It will denote a read access. */ *************** build_outer_field_access_expr (lc, type, *** 11858,11864 **** { tree args, cn, access; ! args = arg1 ? arg1 : build_wfl_node (build_current_thisn (current_class)); args = build_tree_list (NULL_TREE, args); --- 11312,11318 ---- { tree args, cn, access; ! args = arg1 ? arg1 : build_wfl_node (build_current_thisn (current_class)); args = build_tree_list (NULL_TREE, args); *************** build_outer_field_access_methods (decl) *** 11899,11910 **** tree decl; { tree id, args, stmt, mdecl; ! if (FIELD_INNER_ACCESS_P (decl)) return FIELD_INNER_ACCESS (decl); MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC (decl); ! /* Create the identifier and a function named after it. */ id = build_new_access_id (); --- 11353,11364 ---- tree decl; { tree id, args, stmt, mdecl; ! if (FIELD_INNER_ACCESS_P (decl)) return FIELD_INNER_ACCESS (decl); MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC (decl); ! /* Create the identifier and a function named after it. */ id = build_new_access_id (); *************** build_outer_field_access_methods (decl) *** 11918,11931 **** stmt = make_qualified_primary (build_wfl_node (inst_id), build_wfl_node (DECL_NAME (decl)), 0); stmt = build_return (0, stmt); ! mdecl = build_outer_field_access_method (DECL_CONTEXT (decl), TREE_TYPE (decl), id, args, stmt); DECL_FUNCTION_ACCESS_DECL (mdecl) = decl; /* Create the write access method. No write access for final variable */ if (!FIELD_FINAL (decl)) { ! args = build_tree_list (inst_id, build_pointer_type (DECL_CONTEXT (decl))); TREE_CHAIN (args) = build_tree_list (wpv_id, TREE_TYPE (decl)); TREE_CHAIN (TREE_CHAIN (args)) = end_params_node; --- 11372,11385 ---- stmt = make_qualified_primary (build_wfl_node (inst_id), build_wfl_node (DECL_NAME (decl)), 0); stmt = build_return (0, stmt); ! mdecl = build_outer_field_access_method (DECL_CONTEXT (decl), TREE_TYPE (decl), id, args, stmt); DECL_FUNCTION_ACCESS_DECL (mdecl) = decl; /* Create the write access method. No write access for final variable */ if (!FIELD_FINAL (decl)) { ! args = build_tree_list (inst_id, build_pointer_type (DECL_CONTEXT (decl))); TREE_CHAIN (args) = build_tree_list (wpv_id, TREE_TYPE (decl)); TREE_CHAIN (TREE_CHAIN (args)) = end_params_node; *************** build_outer_field_access_methods (decl) *** 11933,11940 **** build_wfl_node (DECL_NAME (decl)), 0); stmt = build_return (0, build_assignment (ASSIGN_TK, 0, stmt, build_wfl_node (wpv_id))); ! mdecl = build_outer_field_access_method (DECL_CONTEXT (decl), ! TREE_TYPE (decl), id, args, stmt); } DECL_FUNCTION_ACCESS_DECL (mdecl) = decl; --- 11387,11394 ---- build_wfl_node (DECL_NAME (decl)), 0); stmt = build_return (0, build_assignment (ASSIGN_TK, 0, stmt, build_wfl_node (wpv_id))); ! mdecl = build_outer_field_access_method (DECL_CONTEXT (decl), ! TREE_TYPE (decl), id, args, stmt); } DECL_FUNCTION_ACCESS_DECL (mdecl) = decl; *************** build_outer_field_access_methods (decl) *** 11945,11951 **** /* Build an field access method NAME. */ ! static tree build_outer_field_access_method (class, type, name, args, body) tree class, type, name, args, body; { --- 11399,11405 ---- /* Build an field access method NAME. */ ! static tree build_outer_field_access_method (class, type, name, args, body) tree class, type, name, args, body; { *************** build_outer_method_access_method (decl) *** 11996,12012 **** carg = TYPE_ARG_TYPES (TREE_TYPE (decl)); /* Create the arguments, as much as the original */ ! for (; carg && carg != end_params_node; carg = TREE_CHAIN (carg)) { sprintf (buffer, "write_parm_value$%d", parm_id_count++); ! args = chainon (args, build_tree_list (get_identifier (buffer), TREE_VALUE (carg))); } args = chainon (args, end_params_node); /* Create the method */ ! mdecl = create_artificial_method (class, ACC_STATIC, TREE_TYPE (TREE_TYPE (decl)), id, args); layout_class_method (class, NULL_TREE, mdecl, NULL_TREE); /* There is a potential bug here. We should be able to use --- 11450,11466 ---- carg = TYPE_ARG_TYPES (TREE_TYPE (decl)); /* Create the arguments, as much as the original */ ! for (; carg && carg != end_params_node; carg = TREE_CHAIN (carg)) { sprintf (buffer, "write_parm_value$%d", parm_id_count++); ! args = chainon (args, build_tree_list (get_identifier (buffer), TREE_VALUE (carg))); } args = chainon (args, end_params_node); /* Create the method */ ! mdecl = create_artificial_method (class, ACC_STATIC, TREE_TYPE (TREE_TYPE (decl)), id, args); layout_class_method (class, NULL_TREE, mdecl, NULL_TREE); /* There is a potential bug here. We should be able to use *************** build_outer_method_access_method (decl) *** 12030,12039 **** call_args = tree_cons (NULL_TREE, build_wfl_node (TREE_PURPOSE (carg)), call_args); ! body = build_method_invocation (build_wfl_node (DECL_NAME (decl)), call_args); if (!METHOD_STATIC (decl)) ! body = make_qualified_primary (build_wfl_node (TREE_PURPOSE (args)), body, 0); if (TREE_TYPE (TREE_TYPE (decl)) != void_type_node) body = build_return (0, body); --- 11484,11493 ---- call_args = tree_cons (NULL_TREE, build_wfl_node (TREE_PURPOSE (carg)), call_args); ! body = build_method_invocation (build_wfl_node (DECL_NAME (decl)), call_args); if (!METHOD_STATIC (decl)) ! body = make_qualified_primary (build_wfl_node (TREE_PURPOSE (args)), body, 0); if (TREE_TYPE (TREE_TYPE (decl)) != void_type_node) body = build_return (0, body); *************** build_outer_method_access_method (decl) *** 12053,12059 **** the enclosing instance of an inner class. The enclosing instance is kept in a generated field called this$, with being the inner class nesting level (starting from 0.) */ ! /* Build an access to a given this$, always chaining access call to others. Access methods to this$ are build on the fly if necessary. This CAN'T be used to solely access this$ from --- 11507,11513 ---- the enclosing instance of an inner class. The enclosing instance is kept in a generated field called this$, with being the inner class nesting level (starting from 0.) */ ! /* Build an access to a given this$, always chaining access call to others. Access methods to this$ are build on the fly if necessary. This CAN'T be used to solely access this$ from *************** build_access_to_thisn (from, to, lc) *** 12099,12105 **** /* Build an access function to the this$ local to TYPE. NULL_TREE is returned if nothing needs to be generated. Otherwise, the method ! generated and a method decl is returned. NOTE: These generated methods should be declared in a class file attribute so that they can't be referred to directly. */ --- 11553,11559 ---- /* Build an access function to the this$ local to TYPE. NULL_TREE is returned if nothing needs to be generated. Otherwise, the method ! generated and a method decl is returned. NOTE: These generated methods should be declared in a class file attribute so that they can't be referred to directly. */ *************** maybe_build_thisn_access_method (type) *** 12127,12133 **** fix_method_argument_names (args, mdecl); layout_class_method (type, NULL_TREE, mdecl, NULL_TREE); stmt = build_current_thisn (type); ! stmt = make_qualified_primary (build_wfl_node (inst_id), build_wfl_node (stmt), 0); stmt = build_return (0, stmt); --- 11581,11587 ---- fix_method_argument_names (args, mdecl); layout_class_method (type, NULL_TREE, mdecl, NULL_TREE); stmt = build_current_thisn (type); ! stmt = make_qualified_primary (build_wfl_node (inst_id), build_wfl_node (stmt), 0); stmt = build_return (0, stmt); *************** maybe_build_thisn_access_method (type) *** 12147,12183 **** This function can be invoked with TYPE to NULL, available and then has to count the parser context. */ static tree build_current_thisn (type) tree type; { static int saved_i = -1; - static tree saved_thisn = NULL_TREE; - static tree saved_type = NULL_TREE; static int saved_type_i = 0; - static int initialized_p; tree decl; char buffer [24]; int i = 0; - /* Register SAVED_THISN and SAVED_TYPE with the garbage collector. */ - if (!initialized_p) - { - ggc_add_tree_root (&saved_thisn, 1); - ggc_add_tree_root (&saved_type, 1); - initialized_p = 1; - } - if (type) { if (type == saved_type) i = saved_type_i; else { ! for (i = -1, decl = DECL_CONTEXT (TYPE_NAME (type)); decl; decl = DECL_CONTEXT (decl), i++) ; ! saved_type = type; saved_type_i = i; } --- 11601,11629 ---- This function can be invoked with TYPE to NULL, available and then has to count the parser context. */ + static GTY(()) tree saved_thisn; + static GTY(()) tree saved_type; + static tree build_current_thisn (type) tree type; { static int saved_i = -1; static int saved_type_i = 0; tree decl; char buffer [24]; int i = 0; if (type) { if (type == saved_type) i = saved_type_i; else { ! for (i = -1, decl = DECL_CONTEXT (TYPE_NAME (type)); decl; decl = DECL_CONTEXT (decl), i++) ; ! saved_type = type; saved_type_i = i; } *************** build_current_thisn (type) *** 12187,12193 **** if (i == saved_i) return saved_thisn; ! sprintf (buffer, "this$%d", i); saved_i = i; saved_thisn = get_identifier (buffer); --- 11633,11639 ---- if (i == saved_i) return saved_thisn; ! sprintf (buffer, "this$%d", i); saved_i = i; saved_thisn = get_identifier (buffer); *************** build_thisn_assign () *** 12224,12229 **** --- 11670,11678 ---- throw new NoClassDefFoundError(e.getMessage());} } */ + static GTY(()) tree get_message_wfl; + static GTY(()) tree type_parm_wfl; + static tree build_dot_class_method (class) tree class; *************** build_dot_class_method (class) *** 12233,12246 **** tree args, tmp, saved_current_function_decl, mdecl; tree stmt, throw_stmt; - static tree get_message_wfl, type_parm_wfl; - if (!get_message_wfl) { get_message_wfl = build_wfl_node (get_identifier ("getMessage")); type_parm_wfl = build_wfl_node (get_identifier ("type$")); - ggc_add_tree_root (&get_message_wfl, 1); - ggc_add_tree_root (&type_parm_wfl, 1); } /* Build the arguments */ --- 11682,11691 ---- *************** build_dot_class_method (class) *** 12249,12280 **** TREE_CHAIN (args) = end_params_node; /* Build the qualified name java.lang.Class.forName */ ! tmp = MQN (MQN (MQN (BWF ("java"), BWF ("lang")), BWF ("Class")), BWF ("forName")); load_class (class_not_found_type_node, 1); load_class (no_class_def_found_type_node, 1); ! /* Create the "class$" function */ ! mdecl = create_artificial_method (class, ACC_STATIC, build_pointer_type (class_type_node), classdollar_identifier_node, args); ! DECL_FUNCTION_THROWS (mdecl) = build_tree_list (NULL_TREE, no_class_def_found_type_node); /* We start by building the try block. We need to build: return (java.lang.Class.forName (type)); */ ! stmt = build_method_invocation (tmp, build_tree_list (NULL_TREE, type_parm_wfl)); stmt = build_return (0, stmt); /* Now onto the catch block. We start by building the expression throwing a new exception: throw new NoClassDefFoundError (_.getMessage) */ ! throw_stmt = make_qualified_name (build_wfl_node (wpv_id), get_message_wfl, 0); throw_stmt = build_method_invocation (throw_stmt, NULL_TREE); ! /* Build new NoClassDefFoundError (_.getMessage) */ ! throw_stmt = build_new_invocation (build_wfl_node (get_identifier ("NoClassDefFoundError")), build_tree_list (build_pointer_type (string_type_node), throw_stmt)); --- 11694,11725 ---- TREE_CHAIN (args) = end_params_node; /* Build the qualified name java.lang.Class.forName */ ! tmp = MQN (MQN (MQN (BWF ("java"), BWF ("lang")), BWF ("Class")), BWF ("forName")); load_class (class_not_found_type_node, 1); load_class (no_class_def_found_type_node, 1); ! /* Create the "class$" function */ ! mdecl = create_artificial_method (class, ACC_STATIC, build_pointer_type (class_type_node), classdollar_identifier_node, args); ! DECL_FUNCTION_THROWS (mdecl) = build_tree_list (NULL_TREE, no_class_def_found_type_node); /* We start by building the try block. We need to build: return (java.lang.Class.forName (type)); */ ! stmt = build_method_invocation (tmp, build_tree_list (NULL_TREE, type_parm_wfl)); stmt = build_return (0, stmt); /* Now onto the catch block. We start by building the expression throwing a new exception: throw new NoClassDefFoundError (_.getMessage) */ ! throw_stmt = make_qualified_name (build_wfl_node (wpv_id), get_message_wfl, 0); throw_stmt = build_method_invocation (throw_stmt, NULL_TREE); ! /* Build new NoClassDefFoundError (_.getMessage) */ ! throw_stmt = build_new_invocation (build_wfl_node (get_identifier ("NoClassDefFoundError")), build_tree_list (build_pointer_type (string_type_node), throw_stmt)); *************** build_dot_class_method_invocation (type) *** 12312,12318 **** sig_id = unmangle_classname (IDENTIFIER_POINTER (sig_id), IDENTIFIER_LENGTH (sig_id)); ! s = build_string (IDENTIFIER_LENGTH (sig_id), IDENTIFIER_POINTER (sig_id)); return build_method_invocation (build_wfl_node (classdollar_identifier_node), build_tree_list (NULL_TREE, s)); --- 11757,11763 ---- sig_id = unmangle_classname (IDENTIFIER_POINTER (sig_id), IDENTIFIER_LENGTH (sig_id)); ! s = build_string (IDENTIFIER_LENGTH (sig_id), IDENTIFIER_POINTER (sig_id)); return build_method_invocation (build_wfl_node (classdollar_identifier_node), build_tree_list (NULL_TREE, s)); *************** fix_constructors (mdecl) *** 12349,12365 **** const char *n = IDENTIFIER_POINTER (DECL_NAME (sclass_decl)); DECL_NAME (mdecl) = DECL_NAME (sclass_decl); parse_error_context ! (lookup_cl (TYPE_NAME (class_type)), "No constructor matching `%s' found in class `%s'", lang_printable_name (mdecl, 0), n); DECL_NAME (mdecl) = save; } ! /* The constructor body must be crafted by hand. It's the constructor we defined when we realize we didn't have the CLASSNAME() constructor */ start_artificial_method_body (mdecl); ! /* Insert an assignment to the this$ hidden field, if necessary */ if ((thisn_assign = build_thisn_assign ())) --- 11794,11810 ---- const char *n = IDENTIFIER_POINTER (DECL_NAME (sclass_decl)); DECL_NAME (mdecl) = DECL_NAME (sclass_decl); parse_error_context ! (lookup_cl (TYPE_NAME (class_type)), "No constructor matching `%s' found in class `%s'", lang_printable_name (mdecl, 0), n); DECL_NAME (mdecl) = save; } ! /* The constructor body must be crafted by hand. It's the constructor we defined when we realize we didn't have the CLASSNAME() constructor */ start_artificial_method_body (mdecl); ! /* Insert an assignment to the this$ hidden field, if necessary */ if ((thisn_assign = build_thisn_assign ())) *************** fix_constructors (mdecl) *** 12377,12389 **** end_artificial_method_body (mdecl); } /* Search for an explicit constructor invocation */ ! else { int found = 0; int invokes_this = 0; tree found_call = NULL_TREE; tree main_block = BLOCK_EXPR_BODY (body); ! while (body) switch (TREE_CODE (body)) { --- 11822,11834 ---- end_artificial_method_body (mdecl); } /* Search for an explicit constructor invocation */ ! else { int found = 0; int invokes_this = 0; tree found_call = NULL_TREE; tree main_block = BLOCK_EXPR_BODY (body); ! while (body) switch (TREE_CODE (body)) { *************** fix_constructors (mdecl) *** 12423,12429 **** TREE_OPERAND (found_call, 0)); TREE_OPERAND (found_call, 0) = empty_stmt_node; } ! DECL_INIT_CALLS_THIS (mdecl) = invokes_this; /* Insert the instance initializer block right after. */ --- 11868,11874 ---- TREE_OPERAND (found_call, 0)); TREE_OPERAND (found_call, 0) = empty_stmt_node; } ! DECL_INIT_CALLS_THIS (mdecl) = invokes_this; /* Insert the instance initializer block right after. */ *************** verify_constructor_super (mdecl) *** 12467,12478 **** tree arg_type = TREE_CHAIN (TYPE_ARG_TYPES (TREE_TYPE (sdecl))); if (super_inner) arg_type = TREE_CHAIN (arg_type); ! for (m_arg_type = mdecl_arg_type; ! (arg_type != end_params_node && m_arg_type != end_params_node); ! arg_type = TREE_CHAIN (arg_type), m_arg_type = TREE_CHAIN (m_arg_type)) ! if (!valid_method_invocation_conversion_p (TREE_VALUE (arg_type), TREE_VALUE (m_arg_type))) break; --- 11912,11923 ---- tree arg_type = TREE_CHAIN (TYPE_ARG_TYPES (TREE_TYPE (sdecl))); if (super_inner) arg_type = TREE_CHAIN (arg_type); ! for (m_arg_type = mdecl_arg_type; ! (arg_type != end_params_node && m_arg_type != end_params_node); ! arg_type = TREE_CHAIN (arg_type), m_arg_type = TREE_CHAIN (m_arg_type)) ! if (!valid_method_invocation_conversion_p (TREE_VALUE (arg_type), TREE_VALUE (m_arg_type))) break; *************** verify_constructor_super (mdecl) *** 12497,12502 **** --- 11942,11948 ---- /* Generate code for all context remembered for code generation. */ + static GTY(()) tree reversed_class_list; void java_expand_classes () { *************** java_expand_classes () *** 12547,12557 **** } } /* If we've found error at that stage, don't try to generate anything, unless we're emitting xrefs or checking the syntax only (but not using -fsyntax-only for the purpose of generating bytecode. */ ! if (java_error_count && !flag_emit_xref && (!flag_syntax_only && !flag_emit_class_files)) return; --- 11993,12062 ---- } } + /* Expanding the constructors of anonymous classes generates access + methods. Scan all the methods looking for null DECL_RESULTs -- + this will be the case if a method hasn't been expanded. */ + for (cur_ctxp = ctxp_for_generation; cur_ctxp; cur_ctxp = cur_ctxp->next) + { + tree current; + ctxp = cur_ctxp; + for (current = ctxp->class_list; current; current = TREE_CHAIN (current)) + { + tree d; + current_class = TREE_TYPE (current); + for (d = TYPE_METHODS (current_class); d; d = TREE_CHAIN (d)) + { + if (DECL_RESULT (d) == NULL_TREE) + { + restore_line_number_status (1); + java_complete_expand_method (d); + restore_line_number_status (0); + } + } + } + } + + /* ??? Instead of all this we could iterate around the list of + classes until there were no more un-expanded methods. It would + take a little longer -- one pass over the whole list of methods + -- but it would be simpler. Like this: */ + #if 0 + { + int something_changed; + + do + { + something_changed = 0; + for (cur_ctxp = ctxp_for_generation; cur_ctxp; cur_ctxp = cur_ctxp->next) + { + tree current; + ctxp = cur_ctxp; + for (current = ctxp->class_list; current; current = TREE_CHAIN (current)) + { + tree d; + current_class = TREE_TYPE (current); + for (d = TYPE_METHODS (current_class); d; d = TREE_CHAIN (d)) + { + if (DECL_RESULT (d) == NULL_TREE) + { + something_changed = 1; + restore_line_number_status (1); + java_complete_expand_method (d); + restore_line_number_status (0); + } + } + } + } + } + while (something_changed); + } + #endif + /* If we've found error at that stage, don't try to generate anything, unless we're emitting xrefs or checking the syntax only (but not using -fsyntax-only for the purpose of generating bytecode. */ ! if (java_error_count && !flag_emit_xref && (!flag_syntax_only && !flag_emit_class_files)) return; *************** java_expand_classes () *** 12578,12584 **** for (cur_ctxp = ctxp_for_generation; cur_ctxp; cur_ctxp = cur_ctxp->next) { tree current; ! tree reversed_class_list = NULL; ctxp = cur_ctxp; --- 12083,12089 ---- for (cur_ctxp = ctxp_for_generation; cur_ctxp; cur_ctxp = cur_ctxp->next) { tree current; ! reversed_class_list = NULL; ctxp = cur_ctxp; *************** java_expand_classes () *** 12590,12604 **** situation, the compiler cannot fall back to the original source, having already read the outer class, so we must prevent that situation. */ ! for (current = ctxp->class_list; ! current; current = TREE_CHAIN (current)) reversed_class_list = tree_cons (NULL_TREE, current, reversed_class_list); - ggc_add_tree_root (&reversed_class_list, 1); ! for (current = reversed_class_list; ! current; current = TREE_CHAIN (current)) { current_class = TREE_TYPE (TREE_VALUE (current)); --- 12095,12108 ---- situation, the compiler cannot fall back to the original source, having already read the outer class, so we must prevent that situation. */ ! for (current = ctxp->class_list; ! current; current = TREE_CHAIN (current)) reversed_class_list = tree_cons (NULL_TREE, current, reversed_class_list); ! for (current = reversed_class_list; ! current; current = TREE_CHAIN (current)) { current_class = TREE_TYPE (TREE_VALUE (current)); *************** java_expand_classes () *** 12613,12620 **** finish_class (); } } - - ggc_del_root (&reversed_class_list); } } --- 12117,12122 ---- *************** make_qualified_name (left, right, locati *** 12701,12707 **** EXPR_WFL_LINECOL (wfl) = EXPR_WFL_LINECOL (left); EXPR_WFL_QUALIFICATION (left) = build_tree_list (wfl, NULL_TREE); } ! wfl = build_expr_wfl (right_id, ctxp->filename, 0, 0); EXPR_WFL_LINECOL (wfl) = location; chainon (EXPR_WFL_QUALIFICATION (left), build_tree_list (wfl, NULL_TREE)); --- 12203,12209 ---- EXPR_WFL_LINECOL (wfl) = EXPR_WFL_LINECOL (left); EXPR_WFL_QUALIFICATION (left) = build_tree_list (wfl, NULL_TREE); } ! wfl = build_expr_wfl (right_id, ctxp->filename, 0, 0); EXPR_WFL_LINECOL (wfl) = location; chainon (EXPR_WFL_QUALIFICATION (left), build_tree_list (wfl, NULL_TREE)); *************** resolve_expression_name (id, orig) *** 12751,12757 **** return decl; /* 15.13.1: NAME can appear within a class declaration */ ! else { decl = lookup_field_wrapper (current_class, name); if (decl) --- 12253,12259 ---- return decl; /* 15.13.1: NAME can appear within a class declaration */ ! else { decl = lookup_field_wrapper (current_class, name); if (decl) *************** resolve_expression_name (id, orig) *** 12826,12838 **** /* We've got an error here */ if (INNER_CLASS_TYPE_P (current_class)) ! parse_error_context (id, "Local variable `%s' can't be accessed from within the inner class `%s' unless it is declared final", IDENTIFIER_POINTER (name), IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (current_class)))); else ! parse_error_context (id, "Undefined variable `%s'", IDENTIFIER_POINTER (name)); return error_mark_node; --- 12328,12340 ---- /* We've got an error here */ if (INNER_CLASS_TYPE_P (current_class)) ! parse_error_context (id, "Local variable `%s' can't be accessed from within the inner class `%s' unless it is declared final", IDENTIFIER_POINTER (name), IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (current_class)))); else ! parse_error_context (id, "Undefined variable `%s'", IDENTIFIER_POINTER (name)); return error_mark_node; *************** static void *** 12842,12851 **** static_ref_err (wfl, field_id, class_type) tree wfl, field_id, class_type; { ! parse_error_context ! (wfl, "Can't make a static reference to nonstatic variable `%s' in class `%s'", ! IDENTIFIER_POINTER (field_id), IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (class_type)))); } --- 12344,12353 ---- static_ref_err (wfl, field_id, class_type) tree wfl, field_id, class_type; { ! parse_error_context ! (wfl, "Can't make a static reference to nonstatic variable `%s' in class `%s'", ! IDENTIFIER_POINTER (field_id), IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (class_type)))); } *************** resolve_field_access (qual_wfl, field_de *** 12868,12875 **** return error_mark_node; /* Resolve the LENGTH field of an array here */ ! if (DECL_P (decl) && DECL_NAME (decl) == length_identifier_node ! && type_found && TYPE_ARRAY_P (type_found) && ! flag_emit_class_files && ! flag_emit_xref) { tree length = build_java_array_length_access (where_found); --- 12370,12377 ---- return error_mark_node; /* Resolve the LENGTH field of an array here */ ! if (DECL_P (decl) && DECL_NAME (decl) == length_identifier_node ! && type_found && TYPE_ARRAY_P (type_found) && ! flag_emit_class_files && ! flag_emit_xref) { tree length = build_java_array_length_access (where_found); *************** resolve_field_access (qual_wfl, field_de *** 12896,12908 **** if (!type_found) type_found = DECL_CONTEXT (decl); is_static = FIELD_STATIC (decl); ! field_ref = build_field_ref ((is_static && !flag_emit_xref? ! NULL_TREE : where_found), type_found, DECL_NAME (decl)); if (field_ref == error_mark_node) return error_mark_node; if (is_static) field_ref = maybe_build_class_init_for_field (decl, field_ref); } else field_ref = decl; --- 12398,12423 ---- if (!type_found) type_found = DECL_CONTEXT (decl); is_static = FIELD_STATIC (decl); ! field_ref = build_field_ref ((is_static && !flag_emit_xref? ! NULL_TREE : where_found), type_found, DECL_NAME (decl)); if (field_ref == error_mark_node) return error_mark_node; if (is_static) field_ref = maybe_build_class_init_for_field (decl, field_ref); + + /* If we're looking at a static field, we may need to generate a + class initialization for it. This can happen when the access + looks like `field.ref', where `field' is a static field in an + interface we implement. */ + if (!flag_emit_class_files + && !flag_emit_xref + && TREE_CODE (where_found) == VAR_DECL + && FIELD_STATIC (where_found)) + { + build_static_field_ref (where_found); + field_ref = build_class_init (DECL_CONTEXT (where_found), field_ref); + } } else field_ref = decl; *************** resolve_field_access (qual_wfl, field_de *** 12910,12916 **** if (field_decl) *field_decl = decl; if (field_type) ! *field_type = (QUAL_DECL_TYPE (decl) ? QUAL_DECL_TYPE (decl) : TREE_TYPE (decl)); return field_ref; } --- 12425,12431 ---- if (field_decl) *field_decl = decl; if (field_type) ! *field_type = (QUAL_DECL_TYPE (decl) ? QUAL_DECL_TYPE (decl) : TREE_TYPE (decl)); return field_ref; } *************** resolve_qualified_expression_name (wfl, *** 12954,12960 **** int is_static; tree decl = NULL_TREE, type = NULL_TREE, q; /* For certain for of inner class instantiation */ ! tree saved_current, saved_this; #define RESTORE_THIS_AND_CURRENT_CLASS \ { current_class = saved_current; current_this = saved_this;} --- 12469,12475 ---- int is_static; tree decl = NULL_TREE, type = NULL_TREE, q; /* For certain for of inner class instantiation */ ! tree saved_current, saved_this; #define RESTORE_THIS_AND_CURRENT_CLASS \ { current_class = saved_current; current_this = saved_this;} *************** resolve_qualified_expression_name (wfl, *** 12975,12981 **** build the code to access it. */ if (JDECL_P (decl) && !FIELD_STATIC (decl)) { ! decl = maybe_access_field (decl, *where_found, DECL_CONTEXT (decl)); if (decl == error_mark_node) return 1; --- 12490,12496 ---- build the code to access it. */ if (JDECL_P (decl) && !FIELD_STATIC (decl)) { ! decl = maybe_access_field (decl, *where_found, DECL_CONTEXT (decl)); if (decl == error_mark_node) return 1; *************** resolve_qualified_expression_name (wfl, *** 12991,12997 **** saved and restored shortly after */ saved_current = current_class; saved_this = current_this; ! if (decl && (TREE_CODE (qual_wfl) == NEW_CLASS_EXPR || from_qualified_this)) { --- 12506,12512 ---- saved and restored shortly after */ saved_current = current_class; saved_this = current_this; ! if (decl && (TREE_CODE (qual_wfl) == NEW_CLASS_EXPR || from_qualified_this)) { *************** resolve_qualified_expression_name (wfl, *** 13023,13034 **** } *type_found = type = QUAL_DECL_TYPE (*where_found); /* If we're creating an inner class instance, check for that an enclosing instance is in scope */ if (TREE_CODE (qual_wfl) == NEW_CLASS_EXPR && INNER_ENCLOSING_SCOPE_CHECK (type)) { ! parse_error_context (qual_wfl, "No enclosing instance for inner class `%s' is in scope%s", lang_printable_name (type, 0), (!current_this ? "" : --- 12538,12551 ---- } *type_found = type = QUAL_DECL_TYPE (*where_found); + *where_found = force_evaluation_order (*where_found); + /* If we're creating an inner class instance, check for that an enclosing instance is in scope */ if (TREE_CODE (qual_wfl) == NEW_CLASS_EXPR && INNER_ENCLOSING_SCOPE_CHECK (type)) { ! parse_error_context (qual_wfl, "No enclosing instance for inner class `%s' is in scope%s", lang_printable_name (type, 0), (!current_this ? "" : *************** resolve_qualified_expression_name (wfl, *** 13042,13049 **** RESTORE_THIS_AND_CURRENT_CLASS; /* EH check. No check on access$ functions */ ! if (location ! && !OUTER_FIELD_ACCESS_IDENTIFIER_P (DECL_NAME (current_function_decl))) check_thrown_exceptions (location, ret_decl); --- 12559,12566 ---- RESTORE_THIS_AND_CURRENT_CLASS; /* EH check. No check on access$ functions */ ! if (location ! && !OUTER_FIELD_ACCESS_IDENTIFIER_P (DECL_NAME (current_function_decl))) check_thrown_exceptions (location, ret_decl); *************** resolve_qualified_expression_name (wfl, *** 13137,13143 **** { if (!current_this) { ! parse_error_context (wfl, "Keyword `this' used outside allowed context"); return 1; } --- 12654,12660 ---- { if (!current_this) { ! parse_error_context (wfl, "Keyword `this' used outside allowed context"); return 1; } *************** resolve_qualified_expression_name (wfl, *** 13160,13167 **** if (!enclosing_context_p (type, current_class)) { char *p = xstrdup (lang_printable_name (type, 0)); ! parse_error_context (qual_wfl, "Can't use variable `%s.this': type `%s' isn't an outer type of type `%s'", ! p, p, lang_printable_name (current_class, 0)); free (p); return 1; --- 12677,12684 ---- if (!enclosing_context_p (type, current_class)) { char *p = xstrdup (lang_printable_name (type, 0)); ! parse_error_context (qual_wfl, "Can't use variable `%s.this': type `%s' isn't an outer type of type `%s'", ! p, p, lang_printable_name (current_class, 0)); free (p); return 1; *************** resolve_qualified_expression_name (wfl, *** 13192,13203 **** if (METHOD_STATIC (current_function_decl) || current_class == object_type_node) { ! parse_error_context (wfl, "Keyword `super' used outside allowed context"); return 1; } /* Otherwise, treat SUPER as (SUPER_CLASS)THIS */ ! node = build_cast (EXPR_WFL_LINECOL (qual_wfl), CLASSTYPE_SUPER (current_class), build_this (EXPR_WFL_LINECOL (qual_wfl))); *where_found = decl = java_complete_tree (node); --- 12709,12720 ---- if (METHOD_STATIC (current_function_decl) || current_class == object_type_node) { ! parse_error_context (wfl, "Keyword `super' used outside allowed context"); return 1; } /* Otherwise, treat SUPER as (SUPER_CLASS)THIS */ ! node = build_cast (EXPR_WFL_LINECOL (qual_wfl), CLASSTYPE_SUPER (current_class), build_this (EXPR_WFL_LINECOL (qual_wfl))); *where_found = decl = java_complete_tree (node); *************** resolve_qualified_expression_name (wfl, *** 13239,13245 **** else { if (from_super || from_cast) ! parse_error_context ((from_cast ? qual_wfl : wfl), "No variable `%s' defined in class `%s'", IDENTIFIER_POINTER (EXPR_WFL_NODE (qual_wfl)), --- 12756,12762 ---- else { if (from_super || from_cast) ! parse_error_context ((from_cast ? qual_wfl : wfl), "No variable `%s' defined in class `%s'", IDENTIFIER_POINTER (EXPR_WFL_NODE (qual_wfl)), *************** resolve_qualified_expression_name (wfl, *** 13261,13267 **** /* Sneak preview. If next we see a `new', we're facing a qualification with resulted in a type being selected instead of a field. Report the error */ ! if(TREE_CHAIN (q) && TREE_CODE (TREE_PURPOSE (TREE_CHAIN (q))) == NEW_CLASS_EXPR) { parse_error_context (qual_wfl, "Undefined variable `%s'", --- 12778,12784 ---- /* Sneak preview. If next we see a `new', we're facing a qualification with resulted in a type being selected instead of a field. Report the error */ ! if(TREE_CHAIN (q) && TREE_CODE (TREE_PURPOSE (TREE_CHAIN (q))) == NEW_CLASS_EXPR) { parse_error_context (qual_wfl, "Undefined variable `%s'", *************** resolve_qualified_expression_name (wfl, *** 13271,13277 **** if (not_accessible_p (TREE_TYPE (decl), decl, type, 0)) { ! parse_error_context (qual_wfl, "Can't access %s field `%s.%s' from `%s'", java_accstring_lookup (get_access_flags_from_decl (decl)), GET_TYPE_NAME (type), --- 12788,12794 ---- if (not_accessible_p (TREE_TYPE (decl), decl, type, 0)) { ! parse_error_context (qual_wfl, "Can't access %s field `%s.%s' from `%s'", java_accstring_lookup (get_access_flags_from_decl (decl)), GET_TYPE_NAME (type), *************** resolve_qualified_expression_name (wfl, *** 13285,13291 **** from_type = 1; } /* We resolve an expression name */ ! else { tree field_decl = NULL_TREE; --- 12802,12808 ---- from_type = 1; } /* We resolve an expression name */ ! else { tree field_decl = NULL_TREE; *************** resolve_qualified_expression_name (wfl, *** 13343,13356 **** if (!from_type && !JREFERENCE_TYPE_P (type)) { ! parse_error_context (qual_wfl, "Attempt to reference field `%s' in `%s %s'", IDENTIFIER_POINTER (EXPR_WFL_NODE (qual_wfl)), lang_printable_name (type, 0), IDENTIFIER_POINTER (DECL_NAME (decl))); return 1; } ! field_decl = lookup_field_wrapper (type, EXPR_WFL_NODE (qual_wfl)); --- 12860,12873 ---- if (!from_type && !JREFERENCE_TYPE_P (type)) { ! parse_error_context (qual_wfl, "Attempt to reference field `%s' in `%s %s'", IDENTIFIER_POINTER (EXPR_WFL_NODE (qual_wfl)), lang_printable_name (type, 0), IDENTIFIER_POINTER (DECL_NAME (decl))); return 1; } ! field_decl = lookup_field_wrapper (type, EXPR_WFL_NODE (qual_wfl)); *************** resolve_qualified_expression_name (wfl, *** 13364,13370 **** inner_decl = resolve_class (decl, ptr, NULL_TREE, qual_wfl); if (inner_decl) { ! check_inner_class_access (inner_decl, decl, qual_wfl); type = TREE_TYPE (inner_decl); decl = inner_decl; from_type = 1; --- 12881,12887 ---- inner_decl = resolve_class (decl, ptr, NULL_TREE, qual_wfl); if (inner_decl) { ! check_inner_class_access (inner_decl, decl, qual_wfl); type = TREE_TYPE (inner_decl); decl = inner_decl; from_type = 1; *************** resolve_qualified_expression_name (wfl, *** 13374,13382 **** if (field_decl == NULL_TREE) { ! parse_error_context (qual_wfl, "No variable `%s' defined in type `%s'", ! IDENTIFIER_POINTER (EXPR_WFL_NODE (qual_wfl)), GET_TYPE_NAME (type)); return 1; } --- 12891,12899 ---- if (field_decl == NULL_TREE) { ! parse_error_context (qual_wfl, "No variable `%s' defined in type `%s'", ! IDENTIFIER_POINTER (EXPR_WFL_NODE (qual_wfl)), GET_TYPE_NAME (type)); return 1; } *************** resolve_qualified_expression_name (wfl, *** 13391,13427 **** field_decl_type = TREE_TYPE (TREE_TYPE (field_decl)); else field_decl_type = TREE_TYPE (field_decl); ! if (!JPRIMITIVE_TYPE_P (field_decl_type) && !CLASS_LOADED_P (field_decl_type) && !TYPE_ARRAY_P (field_decl_type)) resolve_and_layout (field_decl_type, NULL_TREE); ! /* Check on accessibility here */ if (not_accessible_p (current_class, field_decl, DECL_CONTEXT (field_decl), from_super)) { ! parse_error_context (qual_wfl, "Can't access %s field `%s.%s' from `%s'", ! java_accstring_lookup (get_access_flags_from_decl (field_decl)), GET_TYPE_NAME (type), IDENTIFIER_POINTER (DECL_NAME (field_decl)), ! IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (current_class)))); return 1; } check_deprecation (qual_wfl, field_decl); ! /* There are things to check when fields are accessed from type. There are no restrictions on a static declaration of the field when it is accessed from an interface */ is_static = FIELD_STATIC (field_decl); ! if (!from_super && from_type ! && !TYPE_INTERFACE_P (type) ! && !is_static ! && (current_function_decl && METHOD_STATIC (current_function_decl))) { static_ref_err (qual_wfl, EXPR_WFL_NODE (qual_wfl), type); --- 12908,12944 ---- field_decl_type = TREE_TYPE (TREE_TYPE (field_decl)); else field_decl_type = TREE_TYPE (field_decl); ! if (!JPRIMITIVE_TYPE_P (field_decl_type) && !CLASS_LOADED_P (field_decl_type) && !TYPE_ARRAY_P (field_decl_type)) resolve_and_layout (field_decl_type, NULL_TREE); ! /* Check on accessibility here */ if (not_accessible_p (current_class, field_decl, DECL_CONTEXT (field_decl), from_super)) { ! parse_error_context (qual_wfl, "Can't access %s field `%s.%s' from `%s'", ! java_accstring_lookup (get_access_flags_from_decl (field_decl)), GET_TYPE_NAME (type), IDENTIFIER_POINTER (DECL_NAME (field_decl)), ! IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (current_class)))); return 1; } check_deprecation (qual_wfl, field_decl); ! /* There are things to check when fields are accessed from type. There are no restrictions on a static declaration of the field when it is accessed from an interface */ is_static = FIELD_STATIC (field_decl); ! if (!from_super && from_type ! && !TYPE_INTERFACE_P (type) ! && !is_static ! && (current_function_decl && METHOD_STATIC (current_function_decl))) { static_ref_err (qual_wfl, EXPR_WFL_NODE (qual_wfl), type); *************** resolve_qualified_expression_name (wfl, *** 13466,13476 **** /* Sneak preview. If decl is qualified by a `new', report the error here to be accurate on the peculiar construct */ ! if (TREE_CHAIN (q) && TREE_CODE (TREE_PURPOSE (TREE_CHAIN (q))) == NEW_CLASS_EXPR && !JREFERENCE_TYPE_P (type)) { ! parse_error_context (qual_wfl, "Attempt to reference field `new' in a `%s'", lang_printable_name (type, 0)); return 1; } --- 12983,12993 ---- /* Sneak preview. If decl is qualified by a `new', report the error here to be accurate on the peculiar construct */ ! if (TREE_CHAIN (q) && TREE_CODE (TREE_PURPOSE (TREE_CHAIN (q))) == NEW_CLASS_EXPR && !JREFERENCE_TYPE_P (type)) { ! parse_error_context (qual_wfl, "Attempt to reference field `new' in a `%s'", lang_printable_name (type, 0)); return 1; } *************** not_accessible_p (reference, member, whe *** 13506,13512 **** /* Access always granted for members declared public */ if (access_flag & ACC_PUBLIC) return 0; ! /* Check access on protected members */ if (access_flag & ACC_PROTECTED) { --- 13023,13029 ---- /* Access always granted for members declared public */ if (access_flag & ACC_PUBLIC) return 0; ! /* Check access on protected members */ if (access_flag & ACC_PROTECTED) { *************** check_deprecation (wfl, decl) *** 13574,13580 **** /* Complain if the field is deprecated and the file it was defined in isn't compiled at the same time the file which contains its use is */ ! if (DECL_DEPRECATED (decl) && !IS_A_COMMAND_LINE_FILENAME_P (get_identifier (file))) { char the [20]; --- 13091,13097 ---- /* Complain if the field is deprecated and the file it was defined in isn't compiled at the same time the file which contains its use is */ ! if (DECL_DEPRECATED (decl) && !IS_A_COMMAND_LINE_FILENAME_P (get_identifier (file))) { char the [20]; *************** check_deprecation (wfl, decl) *** 13597,13604 **** /* Don't issue a message if the context as been deprecated as a whole. */ if (! CLASS_DEPRECATED (TYPE_NAME (DECL_CONTEXT (decl)))) ! parse_warning_context ! (wfl, "The %s `%s' in class `%s' has been deprecated", the, lang_printable_name (decl, 0), IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (DECL_CONTEXT (decl))))); } --- 13114,13121 ---- /* Don't issue a message if the context as been deprecated as a whole. */ if (! CLASS_DEPRECATED (TYPE_NAME (DECL_CONTEXT (decl)))) ! parse_warning_context ! (wfl, "The %s `%s' in class `%s' has been deprecated", the, lang_printable_name (decl, 0), IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (DECL_CONTEXT (decl))))); } *************** check_deprecation (wfl, decl) *** 13606,13620 **** /* Returns 1 if class was declared in the current package, 0 otherwise */ static int class_in_current_package (class) tree class; { - static tree cache = NULL_TREE; int qualified_flag; tree left; ! if (cache == class) return 1; qualified_flag = QUALIFIED_P (DECL_NAME (TYPE_NAME (class))); --- 13123,13137 ---- /* Returns 1 if class was declared in the current package, 0 otherwise */ + static GTY(()) tree cicp_cache; static int class_in_current_package (class) tree class; { int qualified_flag; tree left; ! if (cicp_cache == class) return 1; qualified_flag = QUALIFIED_P (DECL_NAME (TYPE_NAME (class))); *************** class_in_current_package (class) *** 13635,13649 **** breakdown_qualified (&left, NULL, DECL_NAME (TYPE_NAME (class))); if (ctxp->package == left) { ! static int initialized_p; ! /* Register CACHE with the garbage collector. */ ! if (!initialized_p) ! { ! ggc_add_tree_root (&cache, 1); ! initialized_p = 1; ! } ! ! cache = class; return 1; } return 0; --- 13152,13158 ---- breakdown_qualified (&left, NULL, DECL_NAME (TYPE_NAME (class))); if (ctxp->package == left) { ! cicp_cache = class; return 1; } return 0; *************** maybe_access_field (decl, where, type) *** 13658,13664 **** { if (TREE_CODE (decl) == FIELD_DECL && decl != current_this && !FIELD_STATIC (decl)) ! decl = build_field_ref (where ? where : current_this, (type ? type : DECL_CONTEXT (decl)), DECL_NAME (decl)); return decl; --- 13167,13173 ---- { if (TREE_CODE (decl) == FIELD_DECL && decl != current_this && !FIELD_STATIC (decl)) ! decl = build_field_ref (where ? where : current_this, (type ? type : DECL_CONTEXT (decl)), DECL_NAME (decl)); return decl; *************** patch_method_invocation (patch, primary, *** 13684,13690 **** int is_super_init = 0; tree this_arg = NULL_TREE; int is_array_clone_call = 0; ! /* Should be overriden if everything goes well. Otherwise, if something fails, it should keep this value. It stop the evaluation of a bogus assignment. See java_complete_tree, --- 13193,13199 ---- int is_super_init = 0; tree this_arg = NULL_TREE; int is_array_clone_call = 0; ! /* Should be overriden if everything goes well. Otherwise, if something fails, it should keep this value. It stop the evaluation of a bogus assignment. See java_complete_tree, *************** patch_method_invocation (patch, primary, *** 13707,13720 **** data during error report. */ identifier_wfl = cut_identifier_in_qualified (wfl); identifier = EXPR_WFL_NODE (identifier_wfl); ! /* Given the context, IDENTIFIER is syntactically qualified as a MethodName. We need to qualify what's before */ qualify_ambiguous_name (wfl); resolved = resolve_field_access (wfl, NULL, NULL); if (TREE_CODE (resolved) == VAR_DECL && FIELD_STATIC (resolved) ! && FIELD_FINAL (resolved) && !inherits_from_p (DECL_CONTEXT (resolved), current_class) && !flag_emit_class_files && !flag_emit_xref) resolved = build_class_init (DECL_CONTEXT (resolved), resolved); --- 13216,13229 ---- data during error report. */ identifier_wfl = cut_identifier_in_qualified (wfl); identifier = EXPR_WFL_NODE (identifier_wfl); ! /* Given the context, IDENTIFIER is syntactically qualified as a MethodName. We need to qualify what's before */ qualify_ambiguous_name (wfl); resolved = resolve_field_access (wfl, NULL, NULL); if (TREE_CODE (resolved) == VAR_DECL && FIELD_STATIC (resolved) ! && FIELD_FINAL (resolved) && !inherits_from_p (DECL_CONTEXT (resolved), current_class) && !flag_emit_class_files && !flag_emit_xref) resolved = build_class_init (DECL_CONTEXT (resolved), resolved); *************** patch_method_invocation (patch, primary, *** 13724,13737 **** type = GET_SKIP_TYPE (resolved); resolve_and_layout (type, NULL_TREE); ! if (JPRIMITIVE_TYPE_P (type)) { parse_error_context (identifier_wfl, "Can't invoke a method on primitive type `%s'", IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type)))); ! PATCH_METHOD_RETURN_ERROR (); } list = lookup_method_invoke (0, identifier_wfl, type, identifier, args); --- 13233,13246 ---- type = GET_SKIP_TYPE (resolved); resolve_and_layout (type, NULL_TREE); ! if (JPRIMITIVE_TYPE_P (type)) { parse_error_context (identifier_wfl, "Can't invoke a method on primitive type `%s'", IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type)))); ! PATCH_METHOD_RETURN_ERROR (); } list = lookup_method_invoke (0, identifier_wfl, type, identifier, args); *************** patch_method_invocation (patch, primary, *** 13745,13761 **** parse_error_context (identifier_wfl, "Can't make static reference to method `%s' in interface `%s'", ! IDENTIFIER_POINTER (identifier), IDENTIFIER_POINTER (name)); PATCH_METHOD_RETURN_ERROR (); } if (list && !METHOD_STATIC (list)) { char *fct_name = xstrdup (lang_printable_name (list, 0)); ! parse_error_context (identifier_wfl, "Can't make static reference to method `%s %s' in class `%s'", ! lang_printable_name (TREE_TYPE (TREE_TYPE (list)), 0), fct_name, IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type)))); free (fct_name); PATCH_METHOD_RETURN_ERROR (); --- 13254,13270 ---- parse_error_context (identifier_wfl, "Can't make static reference to method `%s' in interface `%s'", ! IDENTIFIER_POINTER (identifier), IDENTIFIER_POINTER (name)); PATCH_METHOD_RETURN_ERROR (); } if (list && !METHOD_STATIC (list)) { char *fct_name = xstrdup (lang_printable_name (list, 0)); ! parse_error_context (identifier_wfl, "Can't make static reference to method `%s %s' in class `%s'", ! lang_printable_name (TREE_TYPE (TREE_TYPE (list)), 0), fct_name, IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type)))); free (fct_name); PATCH_METHOD_RETURN_ERROR (); *************** patch_method_invocation (patch, primary, *** 13763,13772 **** } else this_arg = primary = resolved; ! if (TYPE_ARRAY_P (type) && identifier == get_identifier ("clone")) is_array_clone_call = 1; ! /* IDENTIFIER_WFL will be used to report any problem further */ wfl = identifier_wfl; } --- 13272,13281 ---- } else this_arg = primary = resolved; ! if (TYPE_ARRAY_P (type) && identifier == get_identifier ("clone")) is_array_clone_call = 1; ! /* IDENTIFIER_WFL will be used to report any problem further */ wfl = identifier_wfl; } *************** patch_method_invocation (patch, primary, *** 13776,13788 **** { tree class_to_search = NULL_TREE; int lc; /* Looking for Constructor */ ! /* We search constructor in their target class */ if (CALL_CONSTRUCTOR_P (patch)) { if (TREE_CODE (patch) == NEW_CLASS_EXPR) class_to_search = EXPR_WFL_NODE (wfl); ! else if (EXPR_WFL_NODE (TREE_OPERAND (patch, 0)) == this_identifier_node) class_to_search = NULL_TREE; else if (EXPR_WFL_NODE (TREE_OPERAND (patch, 0)) == --- 13285,13297 ---- { tree class_to_search = NULL_TREE; int lc; /* Looking for Constructor */ ! /* We search constructor in their target class */ if (CALL_CONSTRUCTOR_P (patch)) { if (TREE_CODE (patch) == NEW_CLASS_EXPR) class_to_search = EXPR_WFL_NODE (wfl); ! else if (EXPR_WFL_NODE (TREE_OPERAND (patch, 0)) == this_identifier_node) class_to_search = NULL_TREE; else if (EXPR_WFL_NODE (TREE_OPERAND (patch, 0)) == *************** patch_method_invocation (patch, primary, *** 13790,13796 **** { is_super_init = 1; if (CLASSTYPE_SUPER (current_class)) ! class_to_search = DECL_NAME (TYPE_NAME (CLASSTYPE_SUPER (current_class))); else { --- 13299,13305 ---- { is_super_init = 1; if (CLASSTYPE_SUPER (current_class)) ! class_to_search = DECL_NAME (TYPE_NAME (CLASSTYPE_SUPER (current_class))); else { *************** patch_method_invocation (patch, primary, *** 13806,13824 **** if (!class_to_search) { ! parse_error_context (wfl, "Class `%s' not found in type declaration", IDENTIFIER_POINTER (EXPR_WFL_NODE (wfl))); PATCH_METHOD_RETURN_ERROR (); } ! /* Can't instantiate an abstract class, but we can invoke it's constructor. It's use within the `new' context is denied here. */ ! if (CLASS_ABSTRACT (class_to_search) && TREE_CODE (patch) == NEW_CLASS_EXPR) { ! parse_error_context (wfl, "Class `%s' is an abstract class. It can't be instantiated", IDENTIFIER_POINTER (EXPR_WFL_NODE (wfl))); PATCH_METHOD_RETURN_ERROR (); --- 13315,13333 ---- if (!class_to_search) { ! parse_error_context (wfl, "Class `%s' not found in type declaration", IDENTIFIER_POINTER (EXPR_WFL_NODE (wfl))); PATCH_METHOD_RETURN_ERROR (); } ! /* Can't instantiate an abstract class, but we can invoke it's constructor. It's use within the `new' context is denied here. */ ! if (CLASS_ABSTRACT (class_to_search) && TREE_CODE (patch) == NEW_CLASS_EXPR) { ! parse_error_context (wfl, "Class `%s' is an abstract class. It can't be instantiated", IDENTIFIER_POINTER (EXPR_WFL_NODE (wfl))); PATCH_METHOD_RETURN_ERROR (); *************** patch_method_invocation (patch, primary, *** 13870,13882 **** can't be executed then. */ if (!list) PATCH_METHOD_RETURN_ERROR (); ! if (TYPE_ARRAY_P (class_to_search) && DECL_NAME (list) == get_identifier ("clone")) is_array_clone_call = 1; /* Check for static reference if non static methods */ ! if (check_for_static_method_reference (wfl, patch, list, class_to_search, primary)) PATCH_METHOD_RETURN_ERROR (); --- 13379,13391 ---- can't be executed then. */ if (!list) PATCH_METHOD_RETURN_ERROR (); ! if (TYPE_ARRAY_P (class_to_search) && DECL_NAME (list) == get_identifier ("clone")) is_array_clone_call = 1; /* Check for static reference if non static methods */ ! if (check_for_static_method_reference (wfl, patch, list, class_to_search, primary)) PATCH_METHOD_RETURN_ERROR (); *************** patch_method_invocation (patch, primary, *** 13886,13892 **** && INNER_ENCLOSING_SCOPE_CHECK (class_to_search) && !DECL_INIT_P (current_function_decl)) { ! parse_error_context (wfl, "No enclosing instance for inner class `%s' is in scope%s", lang_printable_name (class_to_search, 0), (!current_this ? "" : --- 13395,13401 ---- && INNER_ENCLOSING_SCOPE_CHECK (class_to_search) && !DECL_INIT_P (current_function_decl)) { ! parse_error_context (wfl, "No enclosing instance for inner class `%s' is in scope%s", lang_printable_name (class_to_search, 0), (!current_this ? "" : *************** patch_method_invocation (patch, primary, *** 13914,13930 **** x(a1,...,an) into TYPE_OF(this$).x(a1,....an) 2) We're generating bytecodes: ! - LIST is non static. It's invocation is transformed from x(a1,....,an) into access$(this$,a1,...,an). - LIST is static. It's invocation is transformed from x(a1,....,an) into TYPE_OF(this$).x(a1,....an). Of course, this$ can be abitrary complex, ranging from ! this$0 (the immediate outer context) to ! access$0(access$0(...(this$0))). ! ! maybe_use_access_method returns a non zero value if the this_arg has to be moved into the (then generated) stub argument list. In the meantime, the selected function might have be replaced by a generated stub. */ --- 13423,13439 ---- x(a1,...,an) into TYPE_OF(this$).x(a1,....an) 2) We're generating bytecodes: ! - LIST is non static. It's invocation is transformed from x(a1,....,an) into access$(this$,a1,...,an). - LIST is static. It's invocation is transformed from x(a1,....,an) into TYPE_OF(this$).x(a1,....an). Of course, this$ can be abitrary complex, ranging from ! this$0 (the immediate outer context) to ! access$0(access$0(...(this$0))). ! ! maybe_use_access_method returns a nonzero value if the this_arg has to be moved into the (then generated) stub argument list. In the meantime, the selected function might have be replaced by a generated stub. */ *************** patch_method_invocation (patch, primary, *** 13939,13951 **** /* Merge point of all resolution schemes. If we have nothing, this is an error, already signaled */ ! if (!list) PATCH_METHOD_RETURN_ERROR (); /* Check accessibility, position the is_static flag, build and return the call */ if (not_accessible_p (DECL_CONTEXT (current_function_decl), list, ! (primary ? TREE_TYPE (TREE_TYPE (primary)) : NULL_TREE), from_super) /* Calls to clone() on array types are permitted as a special-case. */ && !is_array_clone_call) --- 13448,13460 ---- /* Merge point of all resolution schemes. If we have nothing, this is an error, already signaled */ ! if (!list) PATCH_METHOD_RETURN_ERROR (); /* Check accessibility, position the is_static flag, build and return the call */ if (not_accessible_p (DECL_CONTEXT (current_function_decl), list, ! (primary ? TREE_TYPE (TREE_TYPE (primary)) : NULL_TREE), from_super) /* Calls to clone() on array types are permitted as a special-case. */ && !is_array_clone_call) *************** patch_method_invocation (patch, primary, *** 13976,13982 **** /* If invoking a innerclass constructor, there are hidden parameters to pass */ ! if (TREE_CODE (patch) == NEW_CLASS_EXPR && PURE_INNER_CLASS_TYPE_P (DECL_CONTEXT (list))) { /* And make sure we add the accessed local variables to be saved --- 13485,13491 ---- /* If invoking a innerclass constructor, there are hidden parameters to pass */ ! if (TREE_CODE (patch) == NEW_CLASS_EXPR && PURE_INNER_CLASS_TYPE_P (DECL_CONTEXT (list))) { /* And make sure we add the accessed local variables to be saved *************** patch_method_invocation (patch, primary, *** 14020,14031 **** /* This handles the situation where a constructor invocation needs to have an enclosing context passed as a second parameter (the constructor is one of an inner class). */ ! if ((is_super_init || (TREE_CODE (patch) == CALL_EXPR && name == this_identifier_node)) && PURE_INNER_CLASS_TYPE_P (DECL_CONTEXT (list))) { tree dest = TYPE_NAME (DECL_CONTEXT (list)); ! tree extra_arg = build_access_to_thisn (current_class, DECL_CONTEXT (dest), 0); extra_arg = java_complete_tree (extra_arg); args = tree_cons (NULL_TREE, extra_arg, args); --- 13529,13540 ---- /* This handles the situation where a constructor invocation needs to have an enclosing context passed as a second parameter (the constructor is one of an inner class). */ ! if ((is_super_init || (TREE_CODE (patch) == CALL_EXPR && name == this_identifier_node)) && PURE_INNER_CLASS_TYPE_P (DECL_CONTEXT (list))) { tree dest = TYPE_NAME (DECL_CONTEXT (list)); ! tree extra_arg = build_access_to_thisn (current_class, DECL_CONTEXT (dest), 0); extra_arg = java_complete_tree (extra_arg); args = tree_cons (NULL_TREE, extra_arg, args); *************** patch_method_invocation (patch, primary, *** 14039,14046 **** invoke any method relying on `this'. Exceptions are: we're invoking a static function, primary exists and is not the current this, we're creating a new object. */ ! if (ctxp->explicit_constructor_p ! && !is_static_flag && (!primary || primary == current_this) && (TREE_CODE (patch) != NEW_CLASS_EXPR)) { --- 13548,13555 ---- invoke any method relying on `this'. Exceptions are: we're invoking a static function, primary exists and is not the current this, we're creating a new object. */ ! if (ctxp->explicit_constructor_p ! && !is_static_flag && (!primary || primary == current_this) && (TREE_CODE (patch) != NEW_CLASS_EXPR)) { *************** patch_method_invocation (patch, primary, *** 14048,14054 **** PATCH_METHOD_RETURN_ERROR (); } java_parser_context_restore_global (); ! if (is_static) *is_static = is_static_flag; /* Sometimes, we want the decl of the selected method. Such as for EH checking */ --- 13557,13563 ---- PATCH_METHOD_RETURN_ERROR (); } java_parser_context_restore_global (); ! if (is_static) *is_static = is_static_flag; /* Sometimes, we want the decl of the selected method. Such as for EH checking */ *************** patch_method_invocation (patch, primary, *** 14060,14071 **** if (is_super_init && CLASS_HAS_FINIT_P (current_class)) { tree finit_parms, finit_call; ! /* Prepare to pass hidden parameters to finit$, if any. */ ! finit_parms = build_alias_initializer_parameter_list (AIPL_FUNCTION_FINIT_INVOCATION, current_class, NULL_TREE, NULL); ! ! finit_call = build_method_invocation (build_wfl_node (finit_identifier_node), finit_parms); --- 13569,13580 ---- if (is_super_init && CLASS_HAS_FINIT_P (current_class)) { tree finit_parms, finit_call; ! /* Prepare to pass hidden parameters to finit$, if any. */ ! finit_parms = build_alias_initializer_parameter_list (AIPL_FUNCTION_FINIT_INVOCATION, current_class, NULL_TREE, NULL); ! ! finit_call = build_method_invocation (build_wfl_node (finit_identifier_node), finit_parms); *************** static int *** 14086,14097 **** check_for_static_method_reference (wfl, node, method, where, primary) tree wfl, node, method, where, primary; { ! if (METHOD_STATIC (current_function_decl) && !METHOD_STATIC (method) && !primary && !CALL_CONSTRUCTOR_P (node)) { char *fct_name = xstrdup (lang_printable_name (method, 0)); ! parse_error_context ! (wfl, "Can't make static reference to method `%s %s' in class `%s'", lang_printable_name (TREE_TYPE (TREE_TYPE (method)), 0), fct_name, IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (where)))); free (fct_name); --- 13595,13606 ---- check_for_static_method_reference (wfl, node, method, where, primary) tree wfl, node, method, where, primary; { ! if (METHOD_STATIC (current_function_decl) && !METHOD_STATIC (method) && !primary && !CALL_CONSTRUCTOR_P (node)) { char *fct_name = xstrdup (lang_printable_name (method, 0)); ! parse_error_context ! (wfl, "Can't make static reference to method `%s %s' in class `%s'", lang_printable_name (TREE_TYPE (TREE_TYPE (method)), 0), fct_name, IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (where)))); free (fct_name); *************** maybe_use_access_method (is_super_init, *** 14115,14127 **** int to_return = 0; int non_static_context = !METHOD_STATIC (md); ! if (is_super_init || DECL_CONTEXT (md) == current_class ! || !PURE_INNER_CLASS_TYPE_P (current_class) || DECL_FINIT_P (md) || DECL_INSTINIT_P (md)) return 0; ! /* If we're calling a method found in an enclosing class, generate what it takes to retrieve the right this. Don't do that if we're invoking a static method. Note that if MD's type is unrelated to --- 13624,13636 ---- int to_return = 0; int non_static_context = !METHOD_STATIC (md); ! if (is_super_init || DECL_CONTEXT (md) == current_class ! || !PURE_INNER_CLASS_TYPE_P (current_class) || DECL_FINIT_P (md) || DECL_INSTINIT_P (md)) return 0; ! /* If we're calling a method found in an enclosing class, generate what it takes to retrieve the right this. Don't do that if we're invoking a static method. Note that if MD's type is unrelated to *************** maybe_use_access_method (is_super_init, *** 14146,14152 **** ta = build_access_to_thisn (ctx, type, 0); break; } ! type = (DECL_CONTEXT (TYPE_NAME (type)) ? TREE_TYPE (DECL_CONTEXT (TYPE_NAME (type))) : NULL_TREE); } } --- 13655,13661 ---- ta = build_access_to_thisn (ctx, type, 0); break; } ! type = (DECL_CONTEXT (TYPE_NAME (type)) ? TREE_TYPE (DECL_CONTEXT (TYPE_NAME (type))) : NULL_TREE); } } *************** maybe_use_access_method (is_super_init, *** 14165,14171 **** *mdecl = md; *this_arg = ta; ! /* Returnin a non zero value indicates we were doing a non static method invokation that is now a static invocation. It will have callee displace `this' to insert it in the regular argument list. */ --- 13674,13680 ---- *mdecl = md; *this_arg = ta; ! /* Returnin a nonzero value indicates we were doing a non static method invokation that is now a static invocation. It will have callee displace `this' to insert it in the regular argument list. */ *************** patch_invoke (patch, method, args) *** 14190,14196 **** t = TYPE_ARG_TYPES (TREE_TYPE (method)); if (TREE_CODE (patch) == NEW_CLASS_EXPR) t = TREE_CHAIN (t); ! for (ta = args; t != end_params_node && ta; t = TREE_CHAIN (t), ta = TREE_CHAIN (ta)) if (JPRIMITIVE_TYPE_P (TREE_TYPE (TREE_VALUE (ta))) && TREE_TYPE (TREE_VALUE (ta)) != TREE_VALUE (t)) --- 13699,13705 ---- t = TYPE_ARG_TYPES (TREE_TYPE (method)); if (TREE_CODE (patch) == NEW_CLASS_EXPR) t = TREE_CHAIN (t); ! for (ta = args; t != end_params_node && ta; t = TREE_CHAIN (t), ta = TREE_CHAIN (ta)) if (JPRIMITIVE_TYPE_P (TREE_TYPE (TREE_VALUE (ta))) && TREE_TYPE (TREE_VALUE (ta)) != TREE_VALUE (t)) *************** patch_invoke (patch, method, args) *** 14281,14287 **** new = build (CALL_EXPR, promote_type (class), build_address_of (alloc_node), tree_cons (NULL_TREE, build_class_ref (class), ! build_tree_list (NULL_TREE, size_in_bytes (class))), NULL_TREE); saved_new = save_expr (new); --- 13790,13796 ---- new = build (CALL_EXPR, promote_type (class), build_address_of (alloc_node), tree_cons (NULL_TREE, build_class_ref (class), ! build_tree_list (NULL_TREE, size_in_bytes (class))), NULL_TREE); saved_new = save_expr (new); *************** patch_invoke (patch, method, args) *** 14296,14302 **** is NULL. */ if (check != NULL_TREE) { ! patch = build (COMPOUND_EXPR, TREE_TYPE (patch), check, patch); TREE_SIDE_EFFECTS (patch) = 1; } --- 13805,13815 ---- is NULL. */ if (check != NULL_TREE) { ! /* We have to call force_evaluation_order now because creating a ! COMPOUND_EXPR wraps the arg list in a way that makes it ! unrecognizable by force_evaluation_order later. Yuk. */ ! patch = build (COMPOUND_EXPR, TREE_TYPE (patch), check, ! force_evaluation_order (patch)); TREE_SIDE_EFFECTS (patch) = 1; } *************** patch_invoke (patch, method, args) *** 14312,14318 **** { tree list; tree fndecl = current_function_decl; ! tree save = save_expr (patch); tree type = TREE_TYPE (patch); patch = build (COMPOUND_EXPR, type, save, empty_stmt_node); --- 13825,13834 ---- { tree list; tree fndecl = current_function_decl; ! /* We have to call force_evaluation_order now because creating a ! COMPOUND_EXPR wraps the arg list in a way that makes it ! unrecognizable by force_evaluation_order later. Yuk. */ ! tree save = save_expr (force_evaluation_order (patch)); tree type = TREE_TYPE (patch); patch = build (COMPOUND_EXPR, type, save, empty_stmt_node); *************** lookup_method_invoke (lc, cl, class, nam *** 14419,14425 **** char string [4096]; if (!cm || not_accessible_p (class, cm, NULL_TREE, 0)) continue; ! sprintf (string, " `%s' in `%s'%s", get_printable_method_name (cm), IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (DECL_CONTEXT (cm)))), --- 13935,13941 ---- char string [4096]; if (!cm || not_accessible_p (class, cm, NULL_TREE, 0)) continue; ! sprintf (string, " `%s' in `%s'%s", get_printable_method_name (cm), IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (DECL_CONTEXT (cm)))), *************** find_applicable_accessible_methods_list *** 14451,14478 **** int lc; tree class, name, arglist; { ! static struct hash_table t, *searched_classes = NULL; static int search_not_done = 0; tree list = NULL_TREE, all_list = NULL_TREE; ! /* Check the hash table to determine if this class has been searched already. */ if (searched_classes) { ! if (hash_lookup (searched_classes, ! (const hash_table_key) class, FALSE, NULL)) ! return NULL; } else { ! hash_table_init (&t, hash_newfunc, java_hash_hash_tree_node, ! java_hash_compare_tree_node); ! searched_classes = &t; } ! search_not_done++; ! hash_lookup (searched_classes, ! (const hash_table_key) class, TRUE, NULL); if (!CLASS_LOADED_P (class) && !CLASS_FROM_SOURCE_P (class)) { --- 13967,13991 ---- int lc; tree class, name, arglist; { ! static htab_t searched_classes; static int search_not_done = 0; tree list = NULL_TREE, all_list = NULL_TREE; ! /* Check the hash table to determine if this class has been searched already. */ if (searched_classes) { ! if (htab_find (searched_classes, class) != NULL) ! return NULL; } else { ! searched_classes = htab_create (10, htab_hash_pointer, ! htab_eq_pointer, NULL); } ! search_not_done++; ! *htab_find_slot (searched_classes, class, INSERT) = class; if (!CLASS_LOADED_P (class) && !CLASS_FROM_SOURCE_P (class)) { *************** find_applicable_accessible_methods_list *** 14481,14492 **** } /* Search interfaces */ ! if (TREE_CODE (TYPE_NAME (class)) == TYPE_DECL && CLASS_INTERFACE (TYPE_NAME (class))) { int i, n; tree basetype_vec = TYPE_BINFO_BASETYPES (class); ! search_applicable_methods_list (lc, TYPE_METHODS (class), name, arglist, &list, &all_list); n = TREE_VEC_LENGTH (basetype_vec); for (i = 1; i < n; i++) --- 13994,14005 ---- } /* Search interfaces */ ! if (TREE_CODE (TYPE_NAME (class)) == TYPE_DECL && CLASS_INTERFACE (TYPE_NAME (class))) { int i, n; tree basetype_vec = TYPE_BINFO_BASETYPES (class); ! search_applicable_methods_list (lc, TYPE_METHODS (class), name, arglist, &list, &all_list); n = TREE_VEC_LENGTH (basetype_vec); for (i = 1; i < n; i++) *************** find_applicable_accessible_methods_list *** 14494,14500 **** tree t = BINFO_TYPE (TREE_VEC_ELT (basetype_vec, i)); tree rlist; ! rlist = find_applicable_accessible_methods_list (lc, t, name, arglist); list = chainon (rlist, list); } --- 14007,14013 ---- tree t = BINFO_TYPE (TREE_VEC_ELT (basetype_vec, i)); tree rlist; ! rlist = find_applicable_accessible_methods_list (lc, t, name, arglist); list = chainon (rlist, list); } *************** find_applicable_accessible_methods_list *** 14502,14508 **** /* Search classes */ else { ! search_applicable_methods_list (lc, TYPE_METHODS (class), name, arglist, &list, &all_list); /* When looking finit$, class$ or instinit$, we turn LC to 1 so --- 14015,14021 ---- /* Search classes */ else { ! search_applicable_methods_list (lc, TYPE_METHODS (class), name, arglist, &list, &all_list); /* When looking finit$, class$ or instinit$, we turn LC to 1 so *************** find_applicable_accessible_methods_list *** 14538,14544 **** { tree rlist; class = CLASSTYPE_SUPER (class); ! rlist = find_applicable_accessible_methods_list (lc, class, name, arglist); list = chainon (rlist, list); } --- 14051,14057 ---- { tree rlist; class = CLASSTYPE_SUPER (class); ! rlist = find_applicable_accessible_methods_list (lc, class, name, arglist); list = chainon (rlist, list); } *************** find_applicable_accessible_methods_list *** 14552,14566 **** { if (!lc && TYPE_METHODS (object_type_node) ! && !hash_lookup (searched_classes, ! (const hash_table_key) object_type_node, ! FALSE, NULL)) { ! search_applicable_methods_list (lc, TYPE_METHODS (object_type_node), name, arglist, &list, &all_list); } ! hash_table_free (searched_classes); searched_classes = NULL; } --- 14065,14077 ---- { if (!lc && TYPE_METHODS (object_type_node) ! && htab_find (searched_classes, object_type_node) == NULL) { ! search_applicable_methods_list (lc, TYPE_METHODS (object_type_node), name, arglist, &list, &all_list); } ! htab_delete (searched_classes); searched_classes = NULL; } *************** find_applicable_accessible_methods_list *** 14571,14577 **** /* Effectively search for the appropriate method in method */ ! static void search_applicable_methods_list (lc, method, name, arglist, list, all_list) int lc; tree method, name, arglist; --- 14082,14088 ---- /* Effectively search for the appropriate method in method */ ! static void search_applicable_methods_list (lc, method, name, arglist, list, all_list) int lc; tree method, name, arglist; *************** search_applicable_methods_list (lc, meth *** 14583,14596 **** other classes */ if (lc && !DECL_CONSTRUCTOR_P (method)) continue; ! else if (!lc && (DECL_CONSTRUCTOR_P (method) || (DECL_NAME (method) != name))) continue; if (argument_types_convertible (method, arglist)) { /* Retain accessible methods only */ ! if (!not_accessible_p (DECL_CONTEXT (current_function_decl), method, NULL_TREE, 0)) *list = tree_cons (NULL_TREE, method, *list); else --- 14094,14107 ---- other classes */ if (lc && !DECL_CONSTRUCTOR_P (method)) continue; ! else if (!lc && (DECL_CONSTRUCTOR_P (method) || (DECL_NAME (method) != name))) continue; if (argument_types_convertible (method, arglist)) { /* Retain accessible methods only */ ! if (!not_accessible_p (DECL_CONTEXT (current_function_decl), method, NULL_TREE, 0)) *list = tree_cons (NULL_TREE, method, *list); else *************** find_most_specific_methods_list (list) *** 14627,14639 **** /* Compare arguments and location where methods where declared */ if (argument_types_convertible (method_v, current_v)) { ! if (valid_method_invocation_conversion_p (DECL_CONTEXT (method_v), DECL_CONTEXT (current_v)) || (INNER_CLASS_TYPE_P (DECL_CONTEXT (current_v)) && enclosing_context_p (DECL_CONTEXT (method_v), DECL_CONTEXT (current_v)))) { ! int v = (DECL_SPECIFIC_COUNT (current_v) += (INNER_CLASS_TYPE_P (DECL_CONTEXT (current_v)) ? 2 : 1)); max = (v > max ? v : max); } --- 14138,14150 ---- /* Compare arguments and location where methods where declared */ if (argument_types_convertible (method_v, current_v)) { ! if (valid_method_invocation_conversion_p (DECL_CONTEXT (method_v), DECL_CONTEXT (current_v)) || (INNER_CLASS_TYPE_P (DECL_CONTEXT (current_v)) && enclosing_context_p (DECL_CONTEXT (method_v), DECL_CONTEXT (current_v)))) { ! int v = (DECL_SPECIFIC_COUNT (current_v) += (INNER_CLASS_TYPE_P (DECL_CONTEXT (current_v)) ? 2 : 1)); max = (v > max ? v : max); } *************** find_most_specific_methods_list (list) *** 14690,14714 **** corresponding parameter of M1. Implementation expects M2_OR_ARGLIST to change less often than M1. */ static int argument_types_convertible (m1, m2_or_arglist) tree m1, m2_or_arglist; { - static tree m2_arg_value = NULL_TREE; - static tree m2_arg_cache = NULL_TREE; - static int initialized_p; - register tree m1_arg, m2_arg; - /* Register M2_ARG_VALUE and M2_ARG_CACHE with the garbage - collector. */ - if (!initialized_p) - { - ggc_add_tree_root (&m2_arg_value, 1); - ggc_add_tree_root (&m2_arg_cache, 1); - initialized_p = 1; - } - SKIP_THIS_AND_ARTIFICIAL_PARMS (m1_arg, m1) if (m2_arg_value == m2_or_arglist) --- 14201,14215 ---- corresponding parameter of M1. Implementation expects M2_OR_ARGLIST to change less often than M1. */ + static GTY(()) tree m2_arg_value; + static GTY(()) tree m2_arg_cache; + static int argument_types_convertible (m1, m2_or_arglist) tree m1, m2_or_arglist; { register tree m1_arg, m2_arg; SKIP_THIS_AND_ARTIFICIAL_PARMS (m1_arg, m1) if (m2_arg_value == m2_or_arglist) *************** qualify_ambiguous_name (id) *** 14837,14843 **** else if (code == TREE_LIST) name = EXPR_WFL_NODE (TREE_PURPOSE (qual_wfl)); ! else if (code == STRING_CST || code == CONDITIONAL_EXPR || code == PLUS_EXPR) { qual = TREE_CHAIN (qual); --- 14338,14344 ---- else if (code == TREE_LIST) name = EXPR_WFL_NODE (TREE_PURPOSE (qual_wfl)); ! else if (code == STRING_CST || code == CONDITIONAL_EXPR || code == PLUS_EXPR) { qual = TREE_CHAIN (qual); *************** qualify_ambiguous_name (id) *** 14862,14868 **** if (TREE_CODE (TREE_PURPOSE (qual)) == ARRAY_REF && TREE_CODE (TREE_OPERAND (TREE_PURPOSE (qual), 0)) == EXPR_WITH_FILE_LOCATION ! && EXPR_WFL_NODE (TREE_OPERAND (TREE_PURPOSE (qual), 0)) == this_identifier_node) { qual = TREE_OPERAND (TREE_PURPOSE (qual), 0); --- 14363,14369 ---- if (TREE_CODE (TREE_PURPOSE (qual)) == ARRAY_REF && TREE_CODE (TREE_OPERAND (TREE_PURPOSE (qual), 0)) == EXPR_WITH_FILE_LOCATION ! && EXPR_WFL_NODE (TREE_OPERAND (TREE_PURPOSE (qual), 0)) == this_identifier_node) { qual = TREE_OPERAND (TREE_PURPOSE (qual), 0); *************** qualify_ambiguous_name (id) *** 14895,14906 **** super_found = again = 1; } } while (again); ! /* If name appears within the scope of a local variable declaration or parameter declaration, then it is an expression name. We don't carry this test out if we're in the context of the use of SUPER or THIS */ ! if (!this_found && !super_found && TREE_CODE (name) != STRING_CST && TREE_CODE (name) != INTEGER_CST && (decl = IDENTIFIER_LOCAL_VALUE (name))) { --- 14396,14407 ---- super_found = again = 1; } } while (again); ! /* If name appears within the scope of a local variable declaration or parameter declaration, then it is an expression name. We don't carry this test out if we're in the context of the use of SUPER or THIS */ ! if (!this_found && !super_found && TREE_CODE (name) != STRING_CST && TREE_CODE (name) != INTEGER_CST && (decl = IDENTIFIER_LOCAL_VALUE (name))) { *************** qualify_ambiguous_name (id) *** 14926,14932 **** - NAME is declared in an another compilation unit of the package of the compilation unit containing NAME, - NAME is declared by exactly on type-import-on-demand declaration ! of the compilation unit containing NAME. - NAME is actually a STRING_CST. This can't happen if the expression was qualified by `this.' */ else if (! this_found && --- 14427,14433 ---- - NAME is declared in an another compilation unit of the package of the compilation unit containing NAME, - NAME is declared by exactly on type-import-on-demand declaration ! of the compilation unit containing NAME. - NAME is actually a STRING_CST. This can't happen if the expression was qualified by `this.' */ else if (! this_found && *************** qualify_ambiguous_name (id) *** 14950,14956 **** containing NAME. FIXME */ /* Otherwise, NAME is reclassified as a package name */ ! else RESOLVE_PACKAGE_NAME_P (qual_wfl) = 1; /* Propagate the qualification accross other components of the --- 14451,14457 ---- containing NAME. FIXME */ /* Otherwise, NAME is reclassified as a package name */ ! else RESOLVE_PACKAGE_NAME_P (qual_wfl) = 1; /* Propagate the qualification accross other components of the *************** qualify_ambiguous_name (id) *** 14960,14966 **** { if (RESOLVE_PACKAGE_NAME_P (qual_wfl)) RESOLVE_PACKAGE_NAME_P (QUAL_WFL (qual)) = 1; ! else RESOLVE_EXPRESSION_NAME_P (QUAL_WFL (qual)) = 1; } --- 14461,14467 ---- { if (RESOLVE_PACKAGE_NAME_P (qual_wfl)) RESOLVE_PACKAGE_NAME_P (QUAL_WFL (qual)) = 1; ! else RESOLVE_EXPRESSION_NAME_P (QUAL_WFL (qual)) = 1; } *************** breakdown_qualified (left, right, source *** 14982,14998 **** tree *left, *right, source; { char *p, *base; ! int l = IDENTIFIER_LENGTH (source); base = alloca (l + 1); memcpy (base, IDENTIFIER_POINTER (source), l + 1); ! /* Breakdown NAME into REMAINDER . IDENTIFIER */ p = base + l - 1; while (*p != '.' && p != base) p--; ! /* We didn't find a '.'. Return an error */ if (p == base) return 1; --- 14483,14499 ---- tree *left, *right, source; { char *p, *base; ! int l = IDENTIFIER_LENGTH (source); base = alloca (l + 1); memcpy (base, IDENTIFIER_POINTER (source), l + 1); ! /* Breakdown NAME into REMAINDER . IDENTIFIER. */ p = base + l - 1; while (*p != '.' && p != base) p--; ! /* We didn't find a '.'. Return an error. */ if (p == base) return 1; *************** breakdown_qualified (left, right, source *** 15000,15006 **** if (right) *right = get_identifier (p+1); *left = get_identifier (base); ! return 0; } --- 14501,14507 ---- if (right) *right = get_identifier (p+1); *left = get_identifier (base); ! return 0; } *************** in_same_package (name1, name2) *** 15013,15019 **** tree tmp; tree pkg1; tree pkg2; ! if (TREE_CODE (name1) == TYPE_DECL) name1 = DECL_NAME (name1); if (TREE_CODE (name2) == TYPE_DECL) --- 14514,14520 ---- tree tmp; tree pkg1; tree pkg2; ! if (TREE_CODE (name1) == TYPE_DECL) name1 = DECL_NAME (name1); if (TREE_CODE (name2) == TYPE_DECL) *************** in_same_package (name1, name2) *** 15029,15035 **** breakdown_qualified (&pkg1, &tmp, name1); breakdown_qualified (&pkg2, &tmp, name2); ! return (pkg1 == pkg2); } --- 14530,14536 ---- breakdown_qualified (&pkg1, &tmp, name1); breakdown_qualified (&pkg2, &tmp, name2); ! return (pkg1 == pkg2); } *************** java_complete_tree (node) *** 15046,15067 **** && DECL_INITIAL (node) != NULL_TREE && !flag_emit_xref) { ! tree value = DECL_INITIAL (node); ! DECL_INITIAL (node) = NULL_TREE; ! value = fold_constant_for_init (value, node); ! DECL_INITIAL (node) = value; if (value != NULL_TREE) ! { ! /* fold_constant_for_init sometimes widens the original type ! of the constant (i.e. byte to int). It's not desirable, ! especially if NODE is a function argument. */ ! if ((TREE_CODE (value) == INTEGER_CST ! || TREE_CODE (value) == REAL_CST) ! && TREE_TYPE (node) != TREE_TYPE (value)) ! return convert (TREE_TYPE (node), value); ! else ! return value; ! } } return node; } --- 14547,14555 ---- && DECL_INITIAL (node) != NULL_TREE && !flag_emit_xref) { ! tree value = fold_constant_for_init (node, node); if (value != NULL_TREE) ! return value; } return node; } *************** java_complete_lhs (node) *** 15122,15128 **** int error_seen = 0; if (TREE_CODE (stmt) == COMPOUND_EXPR) { ! /* Re-order from (((A; B); C); ...; Z) to (A; (B; (C ; (...; Z)))). This makes it easier to scan the statements left-to-right without using recursion (which might overflow the stack --- 14610,14616 ---- int error_seen = 0; if (TREE_CODE (stmt) == COMPOUND_EXPR) { ! /* Re-order from (((A; B); C); ...; Z) to (A; (B; (C ; (...; Z)))). This makes it easier to scan the statements left-to-right without using recursion (which might overflow the stack *************** java_complete_lhs (node) *** 15268,15278 **** nn = ctxp->current_loop; /* It must be assignable to the type of the switch expression. */ ! if (!try_builtin_assignconv (NULL_TREE, TREE_TYPE (TREE_OPERAND (nn, 0)), cn)) { EXPR_WFL_LINECOL (wfl_operator) = EXPR_WFL_LINECOL (node); ! parse_error_context (wfl_operator, "Incompatible type for case. Can't convert `%s' to `int'", lang_printable_name (TREE_TYPE (cn), 0)); --- 14756,14766 ---- nn = ctxp->current_loop; /* It must be assignable to the type of the switch expression. */ ! if (!try_builtin_assignconv (NULL_TREE, TREE_TYPE (TREE_OPERAND (nn, 0)), cn)) { EXPR_WFL_LINECOL (wfl_operator) = EXPR_WFL_LINECOL (node); ! parse_error_context (wfl_operator, "Incompatible type for case. Can't convert `%s' to `int'", lang_printable_name (TREE_TYPE (cn), 0)); *************** java_complete_lhs (node) *** 15303,15309 **** if (SWITCH_HAS_DEFAULT (nn)) { EXPR_WFL_LINECOL (wfl_operator) = EXPR_WFL_LINECOL (node); ! parse_error_context (wfl_operator, "Duplicate case label: `default'"); return error_mark_node; } --- 14791,14797 ---- if (SWITCH_HAS_DEFAULT (nn)) { EXPR_WFL_LINECOL (wfl_operator) = EXPR_WFL_LINECOL (node); ! parse_error_context (wfl_operator, "Duplicate case label: `default'"); return error_mark_node; } *************** java_complete_lhs (node) *** 15378,15384 **** /* 3- Expression section */ case COMPOUND_EXPR: wfl_op2 = TREE_OPERAND (node, 1); ! TREE_OPERAND (node, 0) = nn = java_complete_tree (TREE_OPERAND (node, 0)); if (wfl_op2 == empty_stmt_node) CAN_COMPLETE_NORMALLY (node) = CAN_COMPLETE_NORMALLY (nn); --- 14866,14872 ---- /* 3- Expression section */ case COMPOUND_EXPR: wfl_op2 = TREE_OPERAND (node, 1); ! TREE_OPERAND (node, 0) = nn = java_complete_tree (TREE_OPERAND (node, 0)); if (wfl_op2 == empty_stmt_node) CAN_COMPLETE_NORMALLY (node) = CAN_COMPLETE_NORMALLY (nn); *************** java_complete_lhs (node) *** 15391,15400 **** nn = wfl_op2; if (TREE_CODE (nn) == EXPR_WITH_FILE_LOCATION) nn = EXPR_WFL_NODE (nn); ! if (TREE_CODE (nn) != EXIT_EXPR) { SET_WFL_OPERATOR (wfl_operator, node, wfl_op2); ! parse_error_context (wfl_operator, "Unreachable statement"); } } TREE_OPERAND (node, 1) = java_complete_tree (TREE_OPERAND (node, 1)); --- 14879,14900 ---- nn = wfl_op2; if (TREE_CODE (nn) == EXPR_WITH_FILE_LOCATION) nn = EXPR_WFL_NODE (nn); ! /* NN can be NULL_TREE exactly when UPDATE is, in ! finish_for_loop. */ ! if (nn != NULL_TREE && TREE_CODE (nn) != EXIT_EXPR) { SET_WFL_OPERATOR (wfl_operator, node, wfl_op2); ! if (SUPPRESS_UNREACHABLE_ERROR (nn)) ! { ! /* Perhaps this warning should have an ! associated flag. The code being compiled is ! pedantically correct, but useless. */ ! parse_warning_context (wfl_operator, ! "Unreachable statement"); ! } ! else ! parse_error_context (wfl_operator, ! "Unreachable statement"); } } TREE_OPERAND (node, 1) = java_complete_tree (TREE_OPERAND (node, 1)); *************** java_complete_lhs (node) *** 15455,15461 **** } else TREE_TYPE (node) = TREE_TYPE (EXPR_WFL_NODE (node)); ! } break; --- 14955,14961 ---- } else TREE_TYPE (node) = TREE_TYPE (EXPR_WFL_NODE (node)); ! } break; *************** java_complete_lhs (node) *** 15465,15471 **** for (cn = TREE_OPERAND (node, 1); cn; cn = TREE_CHAIN (cn)) { int location = EXPR_WFL_LINECOL (TREE_VALUE (cn)); ! tree dim = convert (int_type_node, java_complete_tree (TREE_VALUE (cn))); if (dim == error_mark_node) { --- 14965,14971 ---- for (cn = TREE_OPERAND (node, 1); cn; cn = TREE_CHAIN (cn)) { int location = EXPR_WFL_LINECOL (TREE_VALUE (cn)); ! tree dim = convert (int_type_node, java_complete_tree (TREE_VALUE (cn))); if (dim == error_mark_node) { *************** java_complete_lhs (node) *** 15477,15483 **** TREE_VALUE (cn) = dim; /* Setup the location of the current dimension, for later error report. */ ! TREE_PURPOSE (cn) = build_expr_wfl (NULL_TREE, input_filename, 0, 0); EXPR_WFL_LINECOL (TREE_PURPOSE (cn)) = location; } --- 14977,14983 ---- TREE_VALUE (cn) = dim; /* Setup the location of the current dimension, for later error report. */ ! TREE_PURPOSE (cn) = build_expr_wfl (NULL_TREE, input_filename, 0, 0); EXPR_WFL_LINECOL (TREE_PURPOSE (cn)) = location; } *************** java_complete_lhs (node) *** 15526,15533 **** check_thrown_exceptions (EXPR_WFL_LINECOL (node), decl); /* If we call this(...), register signature and positions */ if (in_this) ! DECL_CONSTRUCTOR_CALLS (current_function_decl) = ! tree_cons (wfl, decl, DECL_CONSTRUCTOR_CALLS (current_function_decl)); CAN_COMPLETE_NORMALLY (node) = 1; return force_evaluation_order (node); --- 15026,15033 ---- check_thrown_exceptions (EXPR_WFL_LINECOL (node), decl); /* If we call this(...), register signature and positions */ if (in_this) ! DECL_CONSTRUCTOR_CALLS (current_function_decl) = ! tree_cons (wfl, decl, DECL_CONSTRUCTOR_CALLS (current_function_decl)); CAN_COMPLETE_NORMALLY (node) = 1; return force_evaluation_order (node); *************** java_complete_lhs (node) *** 15537,15556 **** /* Save potential wfls */ wfl_op1 = TREE_OPERAND (node, 0); TREE_OPERAND (node, 0) = nn = java_complete_lhs (wfl_op1); ! if (MODIFY_EXPR_FROM_INITIALIZATION_P (node) && TREE_CODE (nn) == VAR_DECL && TREE_STATIC (nn) && DECL_INITIAL (nn) != NULL_TREE) { tree value; ! value = fold_constant_for_init (nn, nn); /* When we have a primitype type, or a string and we're not emitting a class file, we actually don't want to generate anything for the assignment. */ if (value != NULL_TREE && ! (JPRIMITIVE_TYPE_P (TREE_TYPE (value)) || (TREE_TYPE (value) == string_ptr_type_node && ! flag_emit_class_files))) { --- 15037,15056 ---- /* Save potential wfls */ wfl_op1 = TREE_OPERAND (node, 0); TREE_OPERAND (node, 0) = nn = java_complete_lhs (wfl_op1); ! if (MODIFY_EXPR_FROM_INITIALIZATION_P (node) && TREE_CODE (nn) == VAR_DECL && TREE_STATIC (nn) && DECL_INITIAL (nn) != NULL_TREE) { tree value; ! value = fold_constant_for_init (nn, nn); /* When we have a primitype type, or a string and we're not emitting a class file, we actually don't want to generate anything for the assignment. */ if (value != NULL_TREE && ! (JPRIMITIVE_TYPE_P (TREE_TYPE (value)) || (TREE_TYPE (value) == string_ptr_type_node && ! flag_emit_class_files))) { *************** java_complete_lhs (node) *** 15586,15596 **** { /* This might break when accessing outer field from inner class. TESTME, FIXME */ ! tree lvalue = java_stabilize_reference (TREE_OPERAND (node, 0)); /* Hand stabilize the lhs on both places */ TREE_OPERAND (node, 0) = lvalue; ! TREE_OPERAND (TREE_OPERAND (node, 1), 0) = (flag_emit_class_files ? lvalue : save_expr (lvalue)); /* 15.25.2.a: Left hand is not an array access. FIXME */ --- 15086,15096 ---- { /* This might break when accessing outer field from inner class. TESTME, FIXME */ ! tree lvalue = java_stabilize_reference (TREE_OPERAND (node, 0)); /* Hand stabilize the lhs on both places */ TREE_OPERAND (node, 0) = lvalue; ! TREE_OPERAND (TREE_OPERAND (node, 1), 0) = (flag_emit_class_files ? lvalue : save_expr (lvalue)); /* 15.25.2.a: Left hand is not an array access. FIXME */ *************** java_complete_lhs (node) *** 15600,15608 **** if ((cn = patch_string (nn))) nn = cn; ! /* The last part of the rewrite for E1 op= E2 is to have E1 = (T)(E1 op E2), with T being the type of E1. */ ! nn = java_complete_tree (build_cast (EXPR_WFL_LINECOL (wfl_op2), TREE_TYPE (lvalue), nn)); /* If the assignment is compound and has reference type, --- 15100,15108 ---- if ((cn = patch_string (nn))) nn = cn; ! /* The last part of the rewrite for E1 op= E2 is to have E1 = (T)(E1 op E2), with T being the type of E1. */ ! nn = java_complete_tree (build_cast (EXPR_WFL_LINECOL (wfl_op2), TREE_TYPE (lvalue), nn)); /* If the assignment is compound and has reference type, *************** java_complete_lhs (node) *** 15656,15662 **** if (node == error_mark_node) return error_mark_node; /* Reorganize the tree if necessary. */ ! if (flag && (!JREFERENCE_TYPE_P (TREE_TYPE (node)) || JSTRING_P (TREE_TYPE (node)))) node = java_refold (node); } --- 15156,15162 ---- if (node == error_mark_node) return error_mark_node; /* Reorganize the tree if necessary. */ ! if (flag && (!JREFERENCE_TYPE_P (TREE_TYPE (node)) || JSTRING_P (TREE_TYPE (node)))) node = java_refold (node); } *************** java_complete_lhs (node) *** 15665,15673 **** undergone a conversion in patch_assignment. We do that only when it's necessary to have DECL_INITIAL properly set. */ nn = TREE_OPERAND (node, 0); ! if (TREE_CODE (nn) == VAR_DECL && DECL_INITIAL (nn) && CONSTANT_VALUE_P (DECL_INITIAL (nn)) ! && FIELD_STATIC (nn) && FIELD_FINAL (nn) && (JPRIMITIVE_TYPE_P (TREE_TYPE (nn)) || TREE_TYPE (nn) == string_ptr_type_node)) DECL_INITIAL (nn) = TREE_OPERAND (node, 1); --- 15165,15173 ---- undergone a conversion in patch_assignment. We do that only when it's necessary to have DECL_INITIAL properly set. */ nn = TREE_OPERAND (node, 0); ! if (TREE_CODE (nn) == VAR_DECL && DECL_INITIAL (nn) && CONSTANT_VALUE_P (DECL_INITIAL (nn)) ! && FIELD_STATIC (nn) && FIELD_FINAL (nn) && (JPRIMITIVE_TYPE_P (TREE_TYPE (nn)) || TREE_TYPE (nn) == string_ptr_type_node)) DECL_INITIAL (nn) = TREE_OPERAND (node, 1); *************** java_complete_lhs (node) *** 15689,15695 **** case RDIV_EXPR: case TRUTH_ANDIF_EXPR: case TRUTH_ORIF_EXPR: ! case EQ_EXPR: case NE_EXPR: case GT_EXPR: case GE_EXPR: --- 15189,15195 ---- case RDIV_EXPR: case TRUTH_ANDIF_EXPR: case TRUTH_ORIF_EXPR: ! case EQ_EXPR: case NE_EXPR: case GT_EXPR: case GE_EXPR: *************** java_complete_lhs (node) *** 15808,15820 **** if (ctxp->explicit_constructor_p) { EXPR_WFL_LINECOL (wfl_operator) = EXPR_WFL_LINECOL (node); ! parse_error_context (wfl_operator, "Can't reference `this' or `super' before the superclass constructor has been called"); TREE_TYPE (node) = error_mark_node; return error_mark_node; } return current_this; ! case CLASS_LITERAL: CAN_COMPLETE_NORMALLY (node) = 1; node = patch_incomplete_class_ref (node); --- 15308,15320 ---- if (ctxp->explicit_constructor_p) { EXPR_WFL_LINECOL (wfl_operator) = EXPR_WFL_LINECOL (node); ! parse_error_context (wfl_operator, "Can't reference `this' or `super' before the superclass constructor has been called"); TREE_TYPE (node) = error_mark_node; return error_mark_node; } return current_this; ! case CLASS_LITERAL: CAN_COMPLETE_NORMALLY (node) = 1; node = patch_incomplete_class_ref (node); *************** java_complete_lhs (node) *** 15834,15840 **** return node; } ! /* Complete function call's argument. Return a non zero value is an error was found. */ static int --- 15334,15340 ---- return node; } ! /* Complete function call's argument. Return a nonzero value is an error was found. */ static int *************** enter_block () *** 15911,15917 **** for the first time for a given function. The current function body (DECL_FUNCTION_BODY) is set to be block B. */ ! tree fndecl = current_function_decl; if (!fndecl) { BLOCK_SUPERCONTEXT (b) = current_static_block; --- 15411,15417 ---- for the first time for a given function. The current function body (DECL_FUNCTION_BODY) is set to be block B. */ ! tree fndecl = current_function_decl; if (!fndecl) { BLOCK_SUPERCONTEXT (b) = current_static_block; *************** lookup_name_in_blocks (name) *** 15973,15979 **** if (TREE_CODE (b) != BLOCK) abort (); ! for (current = BLOCK_EXPR_DECLS (b); current; current = TREE_CHAIN (current)) if (DECL_NAME (current) == name) return current; --- 15473,15479 ---- if (TREE_CODE (b) != BLOCK) abort (); ! for (current = BLOCK_EXPR_DECLS (b); current; current = TREE_CHAIN (current)) if (DECL_NAME (current) == name) return current; *************** build_wfl_wrap (node, location) *** 16006,16012 **** int location; { tree wfl, node_to_insert = node; ! /* We want to process THIS . xxx symbolicaly, to keep it consistent with the way we're processing SUPER. A THIS from a primary as a different form than a SUPER. Turn THIS into something symbolic */ --- 15506,15512 ---- int location; { tree wfl, node_to_insert = node; ! /* We want to process THIS . xxx symbolicaly, to keep it consistent with the way we're processing SUPER. A THIS from a primary as a different form than a SUPER. Turn THIS into something symbolic */ *************** build_this_super_qualified_invocation (u *** 16054,16060 **** int lloc, rloc; { tree invok; ! tree wfl = build_wfl_node (use_this ? this_identifier_node : super_identifier_node); EXPR_WFL_LINECOL (wfl) = lloc; invok = build_method_invocation (name, args); --- 15554,15560 ---- int lloc, rloc; { tree invok; ! tree wfl = build_wfl_node (use_this ? this_identifier_node : super_identifier_node); EXPR_WFL_LINECOL (wfl) = lloc; invok = build_method_invocation (name, args); *************** build_assignment (op, op_location, lhs, *** 16108,16115 **** return assignment; } ! /* Print an INTEGER_CST node in a static buffer, and return the buffer. */ char * print_int_node (node) tree node; --- 15608,15691 ---- return assignment; } ! /* Print an INTEGER_CST node as decimal in a static buffer, and return ! the buffer. This is used only for string conversion. */ ! static char * ! string_convert_int_cst (node) ! tree node; ! { ! /* Long.MIN_VALUE is -9223372036854775808, 20 characters. */ ! static char buffer[21]; ! ! unsigned HOST_WIDE_INT lo = TREE_INT_CST_LOW (node); ! unsigned HOST_WIDE_INT hi = TREE_INT_CST_HIGH (node); ! char *p = buffer + sizeof (buffer); ! int neg = 0; ! ! unsigned HOST_WIDE_INT hibit = (((unsigned HOST_WIDE_INT) 1) ! << (HOST_BITS_PER_WIDE_INT - 1)); ! ! *--p = '\0'; ! ! /* If negative, note the fact and negate the value. */ ! if ((hi & hibit)) ! { ! lo = ~lo; ! hi = ~hi; ! if (++lo == 0) ! ++hi; ! neg = 1; ! } ! ! /* Divide by 10 until there are no bits left. */ ! do ! { ! unsigned HOST_WIDE_INT acc = 0; ! unsigned HOST_WIDE_INT outhi = 0, outlo = 0; ! unsigned int i; ! ! /* Use long division to compute the result and the remainder. */ ! for (i = 0; i < 2 * HOST_BITS_PER_WIDE_INT; ++i) ! { ! /* Shift a bit into accumulator. */ ! acc <<= 1; ! if ((hi & hibit)) ! acc |= 1; ! ! /* Shift the value. */ ! hi <<= 1; ! if ((lo & hibit)) ! hi |= 1; ! lo <<= 1; ! ! /* Shift the correct bit into the result. */ ! outhi <<= 1; ! if ((outlo & hibit)) ! outhi |= 1; ! outlo <<= 1; ! if (acc >= 10) ! { ! acc -= 10; ! outlo |= 1; ! } ! } ! ! /* '0' == 060 in Java, but might not be here (think EBCDIC). */ ! *--p = '\060' + acc; ! ! hi = outhi; ! lo = outlo; ! } ! while (hi || lo); ! ! if (neg) ! *--p = '\055'; /* '-' == 055 in Java, but might not be here. */ + return p; + } + + /* Print an INTEGER_CST node in a static buffer, and return the + buffer. This is used only for error handling. */ char * print_int_node (node) tree node; *************** print_int_node (node) *** 16117,16123 **** static char buffer [80]; if (TREE_CONSTANT_OVERFLOW (node)) sprintf (buffer, ""); ! if (TREE_INT_CST_HIGH (node) == 0) sprintf (buffer, HOST_WIDE_INT_PRINT_UNSIGNED, TREE_INT_CST_LOW (node)); --- 15693,15699 ---- static char buffer [80]; if (TREE_CONSTANT_OVERFLOW (node)) sprintf (buffer, ""); ! if (TREE_INT_CST_HIGH (node) == 0) sprintf (buffer, HOST_WIDE_INT_PRINT_UNSIGNED, TREE_INT_CST_LOW (node)); *************** patch_assignment (node, wfl_op1) *** 16187,16193 **** { lhs_type = TREE_TYPE (lvalue); } ! else { parse_error_context (wfl_op1, "Invalid left hand side of assignment"); error_found = 1; --- 15763,15769 ---- { lhs_type = TREE_TYPE (lvalue); } ! else { parse_error_context (wfl_op1, "Invalid left hand side of assignment"); error_found = 1; *************** patch_assignment (node, wfl_op1) *** 16260,16271 **** /* 10.10: Array Store Exception runtime check */ if (!flag_emit_class_files && !flag_emit_xref ! && lvalue_from_array && JREFERENCE_TYPE_P (TYPE_ARRAY_ELEMENT (lhs_type))) { tree array, store_check, base, index_expr; ! ! /* Save RHS so that it doesn't get re-evaluated by the store check. */ new_rhs = save_expr (new_rhs); /* Get the INDIRECT_REF. */ --- 15836,15847 ---- /* 10.10: Array Store Exception runtime check */ if (!flag_emit_class_files && !flag_emit_xref ! && lvalue_from_array && JREFERENCE_TYPE_P (TYPE_ARRAY_ELEMENT (lhs_type))) { tree array, store_check, base, index_expr; ! ! /* Save RHS so that it doesn't get re-evaluated by the store check. */ new_rhs = save_expr (new_rhs); /* Get the INDIRECT_REF. */ *************** patch_assignment (node, wfl_op1) *** 16273,16299 **** /* Get the array pointer expr. */ array = TREE_OPERAND (array, 0); store_check = build_java_arraystore_check (array, new_rhs); ! index_expr = TREE_OPERAND (lvalue, 1); ! if (TREE_CODE (index_expr) == COMPOUND_EXPR) { ! /* A COMPOUND_EXPR here is a bounds check. The bounds check must happen before the store check, so prepare to insert the store check within the second operand of the existing COMPOUND_EXPR. */ base = index_expr; } else base = lvalue; ! index_expr = TREE_OPERAND (base, 1); ! TREE_OPERAND (base, 1) = build (COMPOUND_EXPR, TREE_TYPE (index_expr), store_check, index_expr); } /* Final locals can be used as case values in switch statement. Prepare them for this eventuality. */ ! if (TREE_CODE (lvalue) == VAR_DECL && DECL_FINAL (lvalue) && TREE_CONSTANT (new_rhs) && IDENTIFIER_LOCAL_VALUE (DECL_NAME (lvalue)) --- 15849,15875 ---- /* Get the array pointer expr. */ array = TREE_OPERAND (array, 0); store_check = build_java_arraystore_check (array, new_rhs); ! index_expr = TREE_OPERAND (lvalue, 1); ! if (TREE_CODE (index_expr) == COMPOUND_EXPR) { ! /* A COMPOUND_EXPR here is a bounds check. The bounds check must happen before the store check, so prepare to insert the store check within the second operand of the existing COMPOUND_EXPR. */ base = index_expr; } else base = lvalue; ! index_expr = TREE_OPERAND (base, 1); ! TREE_OPERAND (base, 1) = build (COMPOUND_EXPR, TREE_TYPE (index_expr), store_check, index_expr); } /* Final locals can be used as case values in switch statement. Prepare them for this eventuality. */ ! if (TREE_CODE (lvalue) == VAR_DECL && DECL_FINAL (lvalue) && TREE_CONSTANT (new_rhs) && IDENTIFIER_LOCAL_VALUE (DECL_NAME (lvalue)) *************** patch_assignment (node, wfl_op1) *** 16304,16309 **** --- 15880,15922 ---- DECL_INITIAL (lvalue) = new_rhs; } + /* Copy the rhs if it's a reference. */ + if (! flag_check_references && ! flag_emit_class_files && optimize > 0) + { + switch (TREE_CODE (new_rhs)) + { + case ARRAY_REF: + case INDIRECT_REF: + case COMPONENT_REF: + /* Transform a = foo.bar + into a = { int tmp; tmp = foo.bar; tmp; ). + We need to ensure that if a read from memory fails + because of a NullPointerException, a destination variable + will remain unchanged. An explicit temporary does what + we need. + + If flag_check_references is set, this is unnecessary + because we'll check each reference before doing any + reads. If optimize is not set the result will never be + written to a stack slot that contains the LHS. */ + { + tree tmp = build_decl (VAR_DECL, get_identifier (""), + TREE_TYPE (new_rhs)); + tree block = build (BLOCK, TREE_TYPE (new_rhs), NULL); + tree assignment + = build (MODIFY_EXPR, TREE_TYPE (new_rhs), tmp, fold (new_rhs)); + BLOCK_VARS (block) = tmp; + BLOCK_EXPR_BODY (block) + = build (COMPOUND_EXPR, TREE_TYPE (new_rhs), assignment, tmp); + TREE_SIDE_EFFECTS (block) = 1; + new_rhs = block; + } + break; + default: + break; + } + } + TREE_OPERAND (node, 0) = lvalue; TREE_OPERAND (node, 1) = new_rhs; TREE_TYPE (node) = lhs_type; *************** try_builtin_assignconv (wfl_op1, lhs_typ *** 16362,16381 **** else if (valid_builtin_assignconv_identity_widening_p (lhs_type, rhs_type)) new_rhs = convert (lhs_type, rhs); ! /* Try a narrowing primitive conversion (5.1.3): ! - expression is a constant expression of type int AND - variable is byte, short or char AND ! - The value of the expression is representable in the type of the variable */ ! else if (rhs_type == int_type_node && TREE_CONSTANT (rhs) && (lhs_type == byte_type_node || lhs_type == char_type_node || lhs_type == short_type_node)) { if (int_fits_type_p (rhs, lhs_type)) new_rhs = convert (lhs_type, rhs); else if (wfl_op1) /* Might be called with a NULL */ ! parse_warning_context ! (wfl_op1, "Constant expression `%s' too wide for narrowing primitive conversion to `%s'", print_int_node (rhs), lang_printable_name (lhs_type, 0)); /* Reported a warning that will turn into an error further down, so we don't return */ --- 15975,15997 ---- else if (valid_builtin_assignconv_identity_widening_p (lhs_type, rhs_type)) new_rhs = convert (lhs_type, rhs); ! /* Try a narrowing primitive conversion (5.1.3): ! - expression is a constant expression of type byte, short, char, ! or int, AND - variable is byte, short or char AND ! - The value of the expression is representable in the type of the variable */ ! else if ((rhs_type == byte_type_node || rhs_type == short_type_node ! || rhs_type == char_type_node || rhs_type == int_type_node) ! && TREE_CONSTANT (rhs) && (lhs_type == byte_type_node || lhs_type == char_type_node || lhs_type == short_type_node)) { if (int_fits_type_p (rhs, lhs_type)) new_rhs = convert (lhs_type, rhs); else if (wfl_op1) /* Might be called with a NULL */ ! parse_warning_context ! (wfl_op1, "Constant expression `%s' too wide for narrowing primitive conversion to `%s'", print_int_node (rhs), lang_printable_name (lhs_type, 0)); /* Reported a warning that will turn into an error further down, so we don't return */ *************** valid_builtin_assignconv_identity_wideni *** 16420,16426 **** /* From here, an integral is widened if its precision is smaller than the precision of the LHS or if the LHS is a floating point type, or the RHS is a float and the RHS a double. */ ! if ((JINTEGRAL_TYPE_P (rhs_type) && JINTEGRAL_TYPE_P (lhs_type) && (TYPE_PRECISION (rhs_type) < TYPE_PRECISION (lhs_type))) || (JINTEGRAL_TYPE_P (rhs_type) && JFLOAT_TYPE_P (lhs_type)) || (rhs_type == float_type_node && lhs_type == double_type_node)) --- 16036,16042 ---- /* From here, an integral is widened if its precision is smaller than the precision of the LHS or if the LHS is a floating point type, or the RHS is a float and the RHS a double. */ ! if ((JINTEGRAL_TYPE_P (rhs_type) && JINTEGRAL_TYPE_P (lhs_type) && (TYPE_PRECISION (rhs_type) < TYPE_PRECISION (lhs_type))) || (JINTEGRAL_TYPE_P (rhs_type) && JFLOAT_TYPE_P (lhs_type)) || (rhs_type == float_type_node && lhs_type == double_type_node)) *************** valid_ref_assignconv_cast_p (source, des *** 16468,16474 **** if (TYPE_CLASS_P (source)) { if (TYPE_CLASS_P (dest)) ! return (source == dest || inherits_from_p (source, dest) || (cast && inherits_from_p (dest, source))); if (TYPE_INTERFACE_P (dest)) --- 16084,16090 ---- if (TYPE_CLASS_P (source)) { if (TYPE_CLASS_P (dest)) ! return (source == dest || inherits_from_p (source, dest) || (cast && inherits_from_p (dest, source))); if (TYPE_INTERFACE_P (dest)) *************** valid_ref_assignconv_cast_p (source, des *** 16509,16524 **** tree source_type; tree source_sig; tree source_name; ! for (method_source = TYPE_METHODS (source); method_source; method_source = TREE_CHAIN (method_source)) { ! source_sig = build_java_argument_signature (TREE_TYPE (method_source)); source_type = TREE_TYPE (TREE_TYPE (method_source)); source_name = DECL_NAME (method_source); for (method_dest = TYPE_METHODS (dest); method_dest; method_dest = TREE_CHAIN (method_dest)) ! if (source_sig == build_java_argument_signature (TREE_TYPE (method_dest)) && source_name == DECL_NAME (method_dest) && source_type != TREE_TYPE (TREE_TYPE (method_dest))) --- 16125,16140 ---- tree source_type; tree source_sig; tree source_name; ! for (method_source = TYPE_METHODS (source); method_source; method_source = TREE_CHAIN (method_source)) { ! source_sig = build_java_argument_signature (TREE_TYPE (method_source)); source_type = TREE_TYPE (TREE_TYPE (method_source)); source_name = DECL_NAME (method_source); for (method_dest = TYPE_METHODS (dest); method_dest; method_dest = TREE_CHAIN (method_dest)) ! if (source_sig == build_java_argument_signature (TREE_TYPE (method_dest)) && source_name == DECL_NAME (method_dest) && source_type != TREE_TYPE (TREE_TYPE (method_dest))) *************** valid_ref_assignconv_cast_p (source, des *** 16533,16541 **** { /* Array */ return (cast ! && (DECL_NAME (TYPE_NAME (source)) == java_lang_cloneable || (DECL_NAME (TYPE_NAME (source)) ! == java_io_serializable))); } } if (TYPE_ARRAY_P (source)) --- 16149,16158 ---- { /* Array */ return (cast ! && (DECL_NAME (TYPE_NAME (source)) ! == java_lang_cloneable_identifier_node || (DECL_NAME (TYPE_NAME (source)) ! == java_io_serializable_identifier_node))); } } if (TYPE_ARRAY_P (source)) *************** valid_ref_assignconv_cast_p (source, des *** 16545,16557 **** /* Can't cast an array to an interface unless the interface is java.lang.Cloneable or java.io.Serializable. */ if (TYPE_INTERFACE_P (dest)) ! return (DECL_NAME (TYPE_NAME (dest)) == java_lang_cloneable ! || DECL_NAME (TYPE_NAME (dest)) == java_io_serializable); else /* Arrays */ { tree source_element_type = TYPE_ARRAY_ELEMENT (source); tree dest_element_type = TYPE_ARRAY_ELEMENT (dest); ! /* In case of severe errors, they turn out null */ if (!dest_element_type || !source_element_type) return 0; --- 16162,16176 ---- /* Can't cast an array to an interface unless the interface is java.lang.Cloneable or java.io.Serializable. */ if (TYPE_INTERFACE_P (dest)) ! return (DECL_NAME (TYPE_NAME (dest)) ! == java_lang_cloneable_identifier_node ! || (DECL_NAME (TYPE_NAME (dest)) ! == java_io_serializable_identifier_node)); else /* Arrays */ { tree source_element_type = TYPE_ARRAY_ELEMENT (source); tree dest_element_type = TYPE_ARRAY_ELEMENT (dest); ! /* In case of severe errors, they turn out null */ if (!dest_element_type || !source_element_type) return 0; *************** do_unary_numeric_promotion (arg) *** 16599,16605 **** return arg; } ! /* Return a non zero value if SOURCE can be converted into DEST using the method invocation conversion rule (5.3). */ static int valid_method_invocation_conversion_p (dest, source) --- 16218,16224 ---- return arg; } ! /* Return a nonzero value if SOURCE can be converted into DEST using the method invocation conversion rule (5.3). */ static int valid_method_invocation_conversion_p (dest, source) *************** operator_string (node) *** 16643,16649 **** sprintf (buffer, "%s%s", S, (COMPOUND_ASSIGN_P (node) ? "=" : "")); \ return buffer; \ } ! static char buffer [10]; switch (TREE_CODE (node)) { --- 16262,16268 ---- sprintf (buffer, "%s%s", S, (COMPOUND_ASSIGN_P (node) ? "=" : "")); \ return buffer; \ } ! static char buffer [10]; switch (TREE_CODE (node)) { *************** java_decl_equiv (var_acc1, var_acc2) *** 16690,16696 **** { if (JDECL_P (var_acc1)) return (var_acc1 == var_acc2); ! return (TREE_CODE (var_acc1) == COMPONENT_REF && TREE_CODE (var_acc2) == COMPONENT_REF && TREE_OPERAND (TREE_OPERAND (var_acc1, 0), 0) --- 16309,16315 ---- { if (JDECL_P (var_acc1)) return (var_acc1 == var_acc2); ! return (TREE_CODE (var_acc1) == COMPONENT_REF && TREE_CODE (var_acc2) == COMPONENT_REF && TREE_OPERAND (TREE_OPERAND (var_acc1, 0), 0) *************** java_decl_equiv (var_acc1, var_acc2) *** 16698,16704 **** && TREE_OPERAND (var_acc1, 1) == TREE_OPERAND (var_acc2, 1)); } ! /* Return a non zero value if CODE is one of the operators that can be used in conjunction with the `=' operator in a compound assignment. */ static int --- 16317,16323 ---- && TREE_OPERAND (var_acc1, 1) == TREE_OPERAND (var_acc2, 1)); } ! /* Return a nonzero value if CODE is one of the operators that can be used in conjunction with the `=' operator in a compound assignment. */ static int *************** java_refold (t) *** 16732,16738 **** /* Now the left branch of the binary operator. */ b = TREE_OPERAND (TREE_OPERAND (c, 1), 0); ! if (! (b && TREE_CODE (b) == NOP_EXPR && TREE_CODE (TREE_OPERAND (b, 0)) == SAVE_EXPR)) return t; --- 16351,16357 ---- /* Now the left branch of the binary operator. */ b = TREE_OPERAND (TREE_OPERAND (c, 1), 0); ! if (! (b && TREE_CODE (b) == NOP_EXPR && TREE_CODE (TREE_OPERAND (b, 0)) == SAVE_EXPR)) return t; *************** patch_binop (node, wfl_op1, wfl_op2) *** 16786,16792 **** error situation, unless it's too early to tell (in case we're handling a `+', `==', `!=' or `instanceof'.) We want to set op_type correctly so the error can be later on reported accurately. */ ! if (! (code == PLUS_EXPR || code == NE_EXPR || code == EQ_EXPR || code == INSTANCEOF_EXPR)) { tree n; --- 16405,16411 ---- error situation, unless it's too early to tell (in case we're handling a `+', `==', `!=' or `instanceof'.) We want to set op_type correctly so the error can be later on reported accurately. */ ! if (! (code == PLUS_EXPR || code == NE_EXPR || code == EQ_EXPR || code == INSTANCEOF_EXPR)) { tree n; *************** patch_binop (node, wfl_op1, wfl_op2) *** 16831,16837 **** parse_warning_context (wfl_operator, "Evaluating this expression will result in an arithmetic exception being thrown"); TREE_CONSTANT (node) = 0; } ! /* Change the division operator if necessary */ if (code == RDIV_EXPR && TREE_CODE (prom_type) == INTEGER_TYPE) TREE_SET_CODE (node, TRUNC_DIV_EXPR); --- 16450,16456 ---- parse_warning_context (wfl_operator, "Evaluating this expression will result in an arithmetic exception being thrown"); TREE_CONSTANT (node) = 0; } ! /* Change the division operator if necessary */ if (code == RDIV_EXPR && TREE_CODE (prom_type) == INTEGER_TYPE) TREE_SET_CODE (node, TRUNC_DIV_EXPR); *************** patch_binop (node, wfl_op1, wfl_op2) *** 16854,16860 **** && ! flag_emit_class_files && (code == RDIV_EXPR || code == TRUNC_MOD_EXPR)) return build_java_soft_divmod (TREE_CODE (node), prom_type, op1, op2); ! /* This one is more complicated. FLOATs are processed by a function call to soft_fmod. Duplicate the value of the COMPOUND_ASSIGN_P flag. */ --- 16473,16479 ---- && ! flag_emit_class_files && (code == RDIV_EXPR || code == TRUNC_MOD_EXPR)) return build_java_soft_divmod (TREE_CODE (node), prom_type, op1, op2); ! /* This one is more complicated. FLOATs are processed by a function call to soft_fmod. Duplicate the value of the COMPOUND_ASSIGN_P flag. */ *************** patch_binop (node, wfl_op1, wfl_op2) *** 16876,16882 **** purpose of the a previous usage of the String concatenation operator */ ! if (TREE_CODE (op1) == STRING_CST || TREE_CODE (op2) == STRING_CST || JSTRING_TYPE_P (op1_type) || JSTRING_TYPE_P (op2_type) --- 16495,16501 ---- purpose of the a previous usage of the String concatenation operator */ ! if (TREE_CODE (op1) == STRING_CST || TREE_CODE (op2) == STRING_CST || JSTRING_TYPE_P (op1_type) || JSTRING_TYPE_P (op2_type) *************** patch_binop (node, wfl_op1, wfl_op2) *** 16916,16922 **** lang_printable_name (op2_type, 0)); else parse_error_context (wfl_operator, ! "Incompatible type for `%s'. Can't convert shift distance from `%s' to integral", operator_string (node), lang_printable_name (op2_type, 0)); } --- 16535,16541 ---- lang_printable_name (op2_type, 0)); else parse_error_context (wfl_operator, ! "Incompatible type for `%s'. Can't convert shift distance from `%s' to integral", operator_string (node), lang_printable_name (op2_type, 0)); } *************** patch_binop (node, wfl_op1, wfl_op2) *** 16930,16952 **** op1 = do_unary_numeric_promotion (op1); op2 = do_unary_numeric_promotion (op2); /* The type of the shift expression is the type of the promoted type of the left-hand operand */ prom_type = TREE_TYPE (op1); /* Shift int only up to 0x1f and long up to 0x3f */ if (prom_type == int_type_node) ! op2 = fold (build (BIT_AND_EXPR, int_type_node, op2, build_int_2 (0x1f, 0))); else ! op2 = fold (build (BIT_AND_EXPR, int_type_node, op2, build_int_2 (0x3f, 0))); /* The >>> operator is a >> operating on unsigned quantities */ if (code == URSHIFT_EXPR && ! flag_emit_class_files) { tree to_return; ! tree utype = unsigned_type (prom_type); op1 = convert (utype, op1); TREE_SET_CODE (node, RSHIFT_EXPR); TREE_OPERAND (node, 0) = op1; --- 16549,16576 ---- op1 = do_unary_numeric_promotion (op1); op2 = do_unary_numeric_promotion (op2); + /* If the right hand side is of type `long', first cast it to + `int'. */ + if (TREE_TYPE (op2) == long_type_node) + op2 = build1 (CONVERT_EXPR, int_type_node, op2); + /* The type of the shift expression is the type of the promoted type of the left-hand operand */ prom_type = TREE_TYPE (op1); /* Shift int only up to 0x1f and long up to 0x3f */ if (prom_type == int_type_node) ! op2 = fold (build (BIT_AND_EXPR, int_type_node, op2, build_int_2 (0x1f, 0))); else ! op2 = fold (build (BIT_AND_EXPR, int_type_node, op2, build_int_2 (0x3f, 0))); /* The >>> operator is a >> operating on unsigned quantities */ if (code == URSHIFT_EXPR && ! flag_emit_class_files) { tree to_return; ! tree utype = java_unsigned_type (prom_type); op1 = convert (utype, op1); TREE_SET_CODE (node, RSHIFT_EXPR); TREE_OPERAND (node, 0) = op1; *************** patch_binop (node, wfl_op1, wfl_op2) *** 16966,16971 **** --- 16590,16604 ---- TREE_TYPE (node) = boolean_type_node; + /* OP1_TYPE might be NULL when OP1 is a string constant. */ + if ((cn = patch_string (op1))) + { + op1 = cn; + op1_type = TREE_TYPE (op1); + } + if (op1_type == NULL_TREE) + abort (); + if (!(op2_type = resolve_type_during_patch (op2))) return error_mark_node; *************** patch_binop (node, wfl_op1, wfl_op2) *** 17004,17016 **** { char *t1 = xstrdup (lang_printable_name (op1_type, 0)); SET_WFL_OPERATOR (wfl_operator, node, wfl_op1); ! parse_error_context (wfl_operator, "Impossible for `%s' to be instance of `%s'", t1, lang_printable_name (op2_type, 0)); free (t1); error_found = 1; } ! break; /* 15.21 Bitwise and Logical Operators */ --- 16637,16649 ---- { char *t1 = xstrdup (lang_printable_name (op1_type, 0)); SET_WFL_OPERATOR (wfl_operator, node, wfl_op1); ! parse_error_context (wfl_operator, "Impossible for `%s' to be instance of `%s'", t1, lang_printable_name (op2_type, 0)); free (t1); error_found = 1; } ! break; /* 15.21 Bitwise and Logical Operators */ *************** patch_binop (node, wfl_op1, wfl_op2) *** 17022,17028 **** expression retain that type */ prom_type = binary_numeric_promotion (op1_type, op2_type, &op1, &op2); ! else if (TREE_CODE (op1_type) == BOOLEAN_TYPE && TREE_CODE (op1_type) == BOOLEAN_TYPE) /* The type of the bitwise operator expression is BOOLEAN */ prom_type = boolean_type_node; --- 16655,16661 ---- expression retain that type */ prom_type = binary_numeric_promotion (op1_type, op2_type, &op1, &op2); ! else if (TREE_CODE (op1_type) == BOOLEAN_TYPE && TREE_CODE (op1_type) == BOOLEAN_TYPE) /* The type of the bitwise operator expression is BOOLEAN */ prom_type = boolean_type_node; *************** patch_binop (node, wfl_op1, wfl_op2) *** 17044,17050 **** /* 15.23 Conditional-Or Operator */ case TRUTH_ORIF_EXPR: /* Operands must be of BOOLEAN type */ ! if (TREE_CODE (op1_type) != BOOLEAN_TYPE || TREE_CODE (op2_type) != BOOLEAN_TYPE) { if (TREE_CODE (op1_type) != BOOLEAN_TYPE) --- 16677,16683 ---- /* 15.23 Conditional-Or Operator */ case TRUTH_ORIF_EXPR: /* Operands must be of BOOLEAN type */ ! if (TREE_CODE (op1_type) != BOOLEAN_TYPE || TREE_CODE (op2_type) != BOOLEAN_TYPE) { if (TREE_CODE (op1_type) != BOOLEAN_TYPE) *************** patch_binop (node, wfl_op1, wfl_op2) *** 17094,17141 **** case EQ_EXPR: case NE_EXPR: /* It's time for us to patch the strings. */ ! if ((cn = patch_string (op1))) { op1 = cn; op1_type = TREE_TYPE (op1); } ! if ((cn = patch_string (op2))) { op2 = cn; op2_type = TREE_TYPE (op2); } ! /* 15.20.1 Numerical Equality Operators == and != */ /* Binary numeric promotion is performed on the operands */ if (JNUMERIC_TYPE_P (op1_type) && JNUMERIC_TYPE_P (op2_type)) binary_numeric_promotion (op1_type, op2_type, &op1, &op2); ! /* 15.20.2 Boolean Equality Operators == and != */ else if (TREE_CODE (op1_type) == BOOLEAN_TYPE && TREE_CODE (op2_type) == BOOLEAN_TYPE) ; /* Nothing to do here */ ! /* 15.20.3 Reference Equality Operators == and != */ /* Types have to be either references or the null type. If they're references, it must be possible to convert either type to the other by casting conversion. */ ! else if (op1 == null_pointer_node || op2 == null_pointer_node || (JREFERENCE_TYPE_P (op1_type) && JREFERENCE_TYPE_P (op2_type) && (valid_ref_assignconv_cast_p (op1_type, op2_type, 1) ! || valid_ref_assignconv_cast_p (op2_type, op1_type, 1)))) ; /* Nothing to do here */ ! /* Else we have an error figure what can't be converted into what and report the error */ else { char *t1; t1 = xstrdup (lang_printable_name (op1_type, 0)); ! parse_error_context (wfl_operator, "Incompatible type for `%s'. Can't convert `%s' to `%s'", ! operator_string (node), t1, lang_printable_name (op2_type, 0)); free (t1); TREE_TYPE (node) = boolean_type_node; --- 16727,16774 ---- case EQ_EXPR: case NE_EXPR: /* It's time for us to patch the strings. */ ! if ((cn = patch_string (op1))) { op1 = cn; op1_type = TREE_TYPE (op1); } ! if ((cn = patch_string (op2))) { op2 = cn; op2_type = TREE_TYPE (op2); } ! /* 15.20.1 Numerical Equality Operators == and != */ /* Binary numeric promotion is performed on the operands */ if (JNUMERIC_TYPE_P (op1_type) && JNUMERIC_TYPE_P (op2_type)) binary_numeric_promotion (op1_type, op2_type, &op1, &op2); ! /* 15.20.2 Boolean Equality Operators == and != */ else if (TREE_CODE (op1_type) == BOOLEAN_TYPE && TREE_CODE (op2_type) == BOOLEAN_TYPE) ; /* Nothing to do here */ ! /* 15.20.3 Reference Equality Operators == and != */ /* Types have to be either references or the null type. If they're references, it must be possible to convert either type to the other by casting conversion. */ ! else if (op1 == null_pointer_node || op2 == null_pointer_node || (JREFERENCE_TYPE_P (op1_type) && JREFERENCE_TYPE_P (op2_type) && (valid_ref_assignconv_cast_p (op1_type, op2_type, 1) ! || valid_ref_assignconv_cast_p (op2_type, op1_type, 1)))) ; /* Nothing to do here */ ! /* Else we have an error figure what can't be converted into what and report the error */ else { char *t1; t1 = xstrdup (lang_printable_name (op1_type, 0)); ! parse_error_context (wfl_operator, "Incompatible type for `%s'. Can't convert `%s' to `%s'", ! operator_string (node), t1, lang_printable_name (op2_type, 0)); free (t1); TREE_TYPE (node) = boolean_type_node; *************** patch_binop (node, wfl_op1, wfl_op2) *** 17155,17161 **** TREE_OPERAND (node, 1) = op2; TREE_TYPE (node) = prom_type; TREE_SIDE_EFFECTS (node) = TREE_SIDE_EFFECTS (op1) | TREE_SIDE_EFFECTS (op2); ! if (flag_emit_xref) return node; --- 16788,16794 ---- TREE_OPERAND (node, 1) = op2; TREE_TYPE (node) = prom_type; TREE_SIDE_EFFECTS (node) = TREE_SIDE_EFFECTS (op1) | TREE_SIDE_EFFECTS (op2); ! if (flag_emit_xref) return node; *************** do_merge_string_cste (cste, string, stri *** 17198,17239 **** } /* Tries to merge OP1 (a STRING_CST) and OP2 (if suitable). Return a ! new STRING_CST on success, NULL_TREE on failure */ static tree merge_string_cste (op1, op2, after) tree op1, op2; int after; { ! /* Handle two string constants right away */ if (TREE_CODE (op2) == STRING_CST) ! return do_merge_string_cste (op1, TREE_STRING_POINTER (op2), TREE_STRING_LENGTH (op2), after); ! ! /* Reasonable integer constant can be treated right away */ if (TREE_CODE (op2) == INTEGER_CST && !TREE_CONSTANT_OVERFLOW (op2)) { static const char *const boolean_true = "true"; static const char *const boolean_false = "false"; static const char *const null_pointer = "null"; ! char ch[3]; const char *string; ! if (op2 == boolean_true_node) string = boolean_true; else if (op2 == boolean_false_node) string = boolean_false; else if (op2 == null_pointer_node) string = null_pointer; else if (TREE_TYPE (op2) == char_type_node) { ! ch[0] = (char )TREE_INT_CST_LOW (op2); ! ch[1] = '\0'; string = ch; } else ! string = print_int_node (op2); ! return do_merge_string_cste (op1, string, strlen (string), after); } return NULL_TREE; --- 16831,16891 ---- } /* Tries to merge OP1 (a STRING_CST) and OP2 (if suitable). Return a ! new STRING_CST on success, NULL_TREE on failure. */ static tree merge_string_cste (op1, op2, after) tree op1, op2; int after; { ! /* Handle two string constants right away. */ if (TREE_CODE (op2) == STRING_CST) ! return do_merge_string_cste (op1, TREE_STRING_POINTER (op2), TREE_STRING_LENGTH (op2), after); ! ! /* Reasonable integer constant can be treated right away. */ if (TREE_CODE (op2) == INTEGER_CST && !TREE_CONSTANT_OVERFLOW (op2)) { static const char *const boolean_true = "true"; static const char *const boolean_false = "false"; static const char *const null_pointer = "null"; ! char ch[4]; const char *string; ! if (op2 == boolean_true_node) string = boolean_true; else if (op2 == boolean_false_node) string = boolean_false; else if (op2 == null_pointer_node) + /* FIXME: null is not a compile-time constant, so it is only safe to + merge if the overall expression is non-constant. However, this + code always merges without checking the overall expression. */ string = null_pointer; else if (TREE_TYPE (op2) == char_type_node) { ! /* Convert the character into UTF-8. */ ! unsigned int c = (unsigned int) TREE_INT_CST_LOW (op2); ! unsigned char *p = (unsigned char *) ch; ! if (0x01 <= c && c <= 0x7f) ! *p++ = (unsigned char) c; ! else if (c < 0x7ff) ! { ! *p++ = (unsigned char) (c >> 6 | 0xc0); ! *p++ = (unsigned char) ((c & 0x3f) | 0x80); ! } ! else ! { ! *p++ = (unsigned char) (c >> 12 | 0xe0); ! *p++ = (unsigned char) (((c >> 6) & 0x3f) | 0x80); ! *p++ = (unsigned char) ((c & 0x3f) | 0x80); ! } ! *p = '\0'; ! string = ch; } else ! string = string_convert_int_cst (op2); ! return do_merge_string_cste (op1, string, strlen (string), after); } return NULL_TREE; *************** string_constant_concatenation (op1, op2) *** 17255,17265 **** { tree string, rest; int invert; ! string = (TREE_CODE (op1) == STRING_CST ? op1 : op2); rest = (string == op1 ? op2 : op1); invert = (string == op1 ? 0 : 1 ); ! /* Walk REST, only if it looks reasonable */ if (TREE_CODE (rest) != STRING_CST && !IS_CRAFTED_STRING_BUFFER_P (rest) --- 16907,16917 ---- { tree string, rest; int invert; ! string = (TREE_CODE (op1) == STRING_CST ? op1 : op2); rest = (string == op1 ? op2 : op1); invert = (string == op1 ? 0 : 1 ); ! /* Walk REST, only if it looks reasonable */ if (TREE_CODE (rest) != STRING_CST && !IS_CRAFTED_STRING_BUFFER_P (rest) *************** build_string_concatenation (op1, op2) *** 17291,17297 **** if (flag_emit_xref) return build (PLUS_EXPR, string_type_node, op1, op2); ! /* Try to do some static optimization */ if ((result = string_constant_concatenation (op1, op2))) return result; --- 16943,16949 ---- if (flag_emit_xref) return build (PLUS_EXPR, string_type_node, op1, op2); ! /* Try to do some static optimization */ if ((result = string_constant_concatenation (op1, op2))) return result; *************** build_string_concatenation (op1, op2) *** 17312,17326 **** op2 = patch_string_cst (op2); /* If either one of the constant is null and the other non null ! operand is a String object, return it. */ ! if (JSTRING_TYPE_P (TREE_TYPE (op1)) && !op2) return op1; /* If OP1 isn't already a StringBuffer, create and initialize a new one */ if (!IS_CRAFTED_STRING_BUFFER_P (op1)) { ! /* Two solutions here: 1) OP1 is a constant string reference, we call new StringBuffer(OP1) 2) OP1 is something else, we call new StringBuffer().append(OP1). */ if (TREE_CONSTANT (op1) && JSTRING_TYPE_P (TREE_TYPE (op1))) --- 16964,16978 ---- op2 = patch_string_cst (op2); /* If either one of the constant is null and the other non null ! operand is a String constant, return it. */ ! if ((TREE_CODE (op1) == STRING_CST) && !op2) return op1; /* If OP1 isn't already a StringBuffer, create and initialize a new one */ if (!IS_CRAFTED_STRING_BUFFER_P (op1)) { ! /* Two solutions here: 1) OP1 is a constant string reference, we call new StringBuffer(OP1) 2) OP1 is something else, we call new StringBuffer().append(OP1). */ if (TREE_CONSTANT (op1) && JSTRING_TYPE_P (TREE_TYPE (op1))) *************** build_incdec (op_token, op_location, op1 *** 17431,17449 **** tree op1; int is_post_p; { ! static const enum tree_code lookup [2][2] = { { PREDECREMENT_EXPR, PREINCREMENT_EXPR, }, { POSTDECREMENT_EXPR, POSTINCREMENT_EXPR, }, }; ! tree node = build (lookup [is_post_p][(op_token - DECR_TK)], NULL_TREE, op1, NULL_TREE); TREE_SIDE_EFFECTS (node) = 1; /* Store the location of the operator, for better error report. The string of the operator will be rebuild based on the OP value. */ EXPR_WFL_LINECOL (node) = op_location; return node; ! } /* Build an incomplete cast operator, based on the use of the CONVERT_EXPR. Note that TREE_TYPE of the constructed node is --- 17083,17101 ---- tree op1; int is_post_p; { ! static const enum tree_code lookup [2][2] = { { PREDECREMENT_EXPR, PREINCREMENT_EXPR, }, { POSTDECREMENT_EXPR, POSTINCREMENT_EXPR, }, }; ! tree node = build (lookup [is_post_p][(op_token - DECR_TK)], NULL_TREE, op1, NULL_TREE); TREE_SIDE_EFFECTS (node) = 1; /* Store the location of the operator, for better error report. The string of the operator will be rebuild based on the OP value. */ EXPR_WFL_LINECOL (node) = op_location; return node; ! } /* Build an incomplete cast operator, based on the use of the CONVERT_EXPR. Note that TREE_TYPE of the constructed node is *************** patch_incomplete_class_ref (node) *** 17482,17488 **** if (!(ref_type = resolve_type_during_patch (type))) return error_mark_node; ! if (!flag_emit_class_files || JPRIMITIVE_TYPE_P (ref_type)) { tree dot = build_class_ref (ref_type); /* A class referenced by `foo.class' is initialized. */ --- 17134,17141 ---- if (!(ref_type = resolve_type_during_patch (type))) return error_mark_node; ! if (!flag_emit_class_files || JPRIMITIVE_TYPE_P (ref_type) ! || TREE_CODE (ref_type) == VOID_TYPE) { tree dot = build_class_ref (ref_type); /* A class referenced by `foo.class' is initialized. */ *************** patch_unaryop (node, wfl_op) *** 17544,17550 **** decl = DECL_FUNCTION_ACCESS_DECL (decl); } /* We really should have a JAVA_ARRAY_EXPR to avoid this */ ! else if (!JDECL_P (decl) && TREE_CODE (decl) != COMPONENT_REF && !(flag_emit_class_files && TREE_CODE (decl) == ARRAY_REF) && TREE_CODE (decl) != INDIRECT_REF --- 17197,17203 ---- decl = DECL_FUNCTION_ACCESS_DECL (decl); } /* We really should have a JAVA_ARRAY_EXPR to avoid this */ ! else if (!JDECL_P (decl) && TREE_CODE (decl) != COMPONENT_REF && !(flag_emit_class_files && TREE_CODE (decl) == ARRAY_REF) && TREE_CODE (decl) != INDIRECT_REF *************** patch_unaryop (node, wfl_op) *** 17555,17561 **** TREE_TYPE (node) = error_mark_node; error_found = 1; } ! /* From now on, we know that op if a variable and that it has a valid wfl. We use wfl_op to locate errors related to the ++/-- operand. */ --- 17208,17214 ---- TREE_TYPE (node) = error_mark_node; error_found = 1; } ! /* From now on, we know that op if a variable and that it has a valid wfl. We use wfl_op to locate errors related to the ++/-- operand. */ *************** patch_unaryop (node, wfl_op) *** 17579,17586 **** else { value = build_int_2 (1, 0); ! TREE_TYPE (node) = ! binary_numeric_promotion (op_type, TREE_TYPE (value), &op, &value); } --- 17232,17239 ---- else { value = build_int_2 (1, 0); ! TREE_TYPE (node) = ! binary_numeric_promotion (op_type, TREE_TYPE (value), &op, &value); } *************** patch_unaryop (node, wfl_op) *** 17588,17597 **** if (outer_field_flag) { /* We re-generate an access to the field */ ! value = build (PLUS_EXPR, TREE_TYPE (op), build_outer_field_access (wfl_op, decl), value); ! ! /* And we patch the original access$() into a write with plus_op as a rhs */ return outer_field_access_fix (node, op, value); } --- 17241,17250 ---- if (outer_field_flag) { /* We re-generate an access to the field */ ! value = build (PLUS_EXPR, TREE_TYPE (op), build_outer_field_access (wfl_op, decl), value); ! ! /* And we patch the original access$() into a write with plus_op as a rhs */ return outer_field_access_fix (node, op, value); } *************** patch_unaryop (node, wfl_op) *** 17676,17682 **** } break; } ! if (error_found) return error_mark_node; --- 17329,17335 ---- } break; } ! if (error_found) return error_mark_node; *************** resolve_type_during_patch (type) *** 17702,17708 **** tree type_decl = resolve_and_layout (EXPR_WFL_NODE (type), type); if (!type_decl) { ! parse_error_context (type, "Class `%s' not found in type declaration", IDENTIFIER_POINTER (EXPR_WFL_NODE (type))); return NULL_TREE; --- 17355,17361 ---- tree type_decl = resolve_and_layout (EXPR_WFL_NODE (type), type); if (!type_decl) { ! parse_error_context (type, "Class `%s' not found in type declaration", IDENTIFIER_POINTER (EXPR_WFL_NODE (type))); return NULL_TREE; *************** patch_cast (node, wfl_op) *** 17761,17767 **** /* The remaining legal casts involve conversion between reference types. Check for their compile time correctness. */ ! if (JREFERENCE_TYPE_P (op_type) && JREFERENCE_TYPE_P (cast_type) && valid_ref_assignconv_cast_p (op_type, cast_type, 1)) { TREE_TYPE (node) = promote_type (cast_type); --- 17414,17420 ---- /* The remaining legal casts involve conversion between reference types. Check for their compile time correctness. */ ! if (JREFERENCE_TYPE_P (op_type) && JREFERENCE_TYPE_P (cast_type) && valid_ref_assignconv_cast_p (op_type, cast_type, 1)) { TREE_TYPE (node) = promote_type (cast_type); *************** patch_array_ref (node) *** 17840,17846 **** /* The array reference must be an array */ if (!TYPE_ARRAY_P (array_type)) { ! parse_error_context (wfl_operator, "`[]' can only be applied to arrays. It can't be applied to `%s'", lang_printable_name (array_type, 0)); --- 17493,17499 ---- /* The array reference must be an array */ if (!TYPE_ARRAY_P (array_type)) { ! parse_error_context (wfl_operator, "`[]' can only be applied to arrays. It can't be applied to `%s'", lang_printable_name (array_type, 0)); *************** build_newarray_node (type, dims, extra_d *** 17890,17896 **** int extra_dims; { tree node = ! build (NEW_ARRAY_EXPR, NULL_TREE, type, nreverse (dims), build_int_2 (extra_dims, 0)); return node; } --- 17543,17549 ---- int extra_dims; { tree node = ! build (NEW_ARRAY_EXPR, NULL_TREE, type, nreverse (dims), build_int_2 (extra_dims, 0)); return node; } *************** patch_newarray (node) *** 17932,17940 **** /* Report errors on types here */ if (dim_error) { ! parse_error_context ! (TREE_PURPOSE (cdim), ! "Incompatible type for dimension in array creation expression. %s convert `%s' to `int'", (valid_cast_to_p (TREE_TYPE (dim), int_type_node) ? "Explicit cast needed to" : "Can't"), lang_printable_name (TREE_TYPE (dim), 0)); --- 17585,17593 ---- /* Report errors on types here */ if (dim_error) { ! parse_error_context ! (TREE_PURPOSE (cdim), ! "Incompatible type for dimension in array creation expression. %s convert `%s' to `int'", (valid_cast_to_p (TREE_TYPE (dim), int_type_node) ? "Explicit cast needed to" : "Can't"), lang_printable_name (TREE_TYPE (dim), 0)); *************** patch_newarray (node) *** 17983,17995 **** (primitive or not) matters. */ if (ndims == 1) return build_new_array (type, TREE_VALUE (dims)); ! /* Can't reuse what's already written in expr.c because it uses the JVM stack representation. Provide a build_multianewarray. FIXME */ return build (CALL_EXPR, array_type, build_address_of (soft_multianewarray_node), tree_cons (NULL_TREE, build_class_ref (TREE_TYPE (array_type)), ! tree_cons (NULL_TREE, build_int_2 (ndims, 0), dims )), NULL_TREE); } --- 17636,17648 ---- (primitive or not) matters. */ if (ndims == 1) return build_new_array (type, TREE_VALUE (dims)); ! /* Can't reuse what's already written in expr.c because it uses the JVM stack representation. Provide a build_multianewarray. FIXME */ return build (CALL_EXPR, array_type, build_address_of (soft_multianewarray_node), tree_cons (NULL_TREE, build_class_ref (TREE_TYPE (array_type)), ! tree_cons (NULL_TREE, build_int_2 (ndims, 0), dims )), NULL_TREE); } *************** patch_new_array_init (type, node) *** 18070,18076 **** TREE_PURPOSE (current) = NULL_TREE; all_constant = 0; } ! if (elt && TREE_CODE (elt) == TREE_LIST && TREE_VALUE (elt) == error_mark_node) error_seen = 1; } --- 17723,17729 ---- TREE_PURPOSE (current) = NULL_TREE; all_constant = 0; } ! if (elt && TREE_CODE (elt) == TREE_LIST && TREE_VALUE (elt) == error_mark_node) error_seen = 1; } *************** array_constructor_check_entry (type, ent *** 18110,18118 **** value = patched; if (value == error_mark_node) return 1; ! type_value = TREE_TYPE (value); ! /* At anytime, try_builtin_assignconv can report a warning on constant overflow during narrowing. */ SET_WFL_OPERATOR (wfl_operator, TREE_PURPOSE (entry), wfl_value); --- 17763,17771 ---- value = patched; if (value == error_mark_node) return 1; ! type_value = TREE_TYPE (value); ! /* At anytime, try_builtin_assignconv can report a warning on constant overflow during narrowing. */ SET_WFL_OPERATOR (wfl_operator, TREE_PURPOSE (entry), wfl_value); *************** array_constructor_check_entry (type, ent *** 18127,18138 **** "Can't" : "Explicit cast needed to"); if (!array_type_string) array_type_string = xstrdup (lang_printable_name (type, 1)); ! parse_error_context (wfl_operator, "Incompatible type for array. %s convert `%s' to `%s'", msg, lang_printable_name (type_value, 1), array_type_string); error_seen = 1; } ! if (new_value) TREE_VALUE (entry) = new_value; --- 17780,17791 ---- "Can't" : "Explicit cast needed to"); if (!array_type_string) array_type_string = xstrdup (lang_printable_name (type, 1)); ! parse_error_context (wfl_operator, "Incompatible type for array. %s convert `%s' to `%s'", msg, lang_printable_name (type_value, 1), array_type_string); error_seen = 1; } ! if (new_value) TREE_VALUE (entry) = new_value; *************** patch_return (node) *** 18193,18199 **** isn't declared with the keyword `void' */ if (!return_exp && (mtype != void_type_node && !DECL_CONSTRUCTOR_P (meth))) error_found = 2; ! if (DECL_INSTINIT_P (current_function_decl)) error_found = 1; --- 17846,17852 ---- isn't declared with the keyword `void' */ if (!return_exp && (mtype != void_type_node && !DECL_CONSTRUCTOR_P (meth))) error_found = 2; ! if (DECL_INSTINIT_P (current_function_decl)) error_found = 1; *************** patch_return (node) *** 18202,18208 **** if (DECL_INSTINIT_P (current_function_decl)) parse_error_context (wfl_operator, "`return' inside instance initializer"); ! else if (DECL_CLINIT_P (current_function_decl)) parse_error_context (wfl_operator, "`return' inside static initializer"); --- 17855,17861 ---- if (DECL_INSTINIT_P (current_function_decl)) parse_error_context (wfl_operator, "`return' inside instance initializer"); ! else if (DECL_CLINIT_P (current_function_decl)) parse_error_context (wfl_operator, "`return' inside static initializer"); *************** patch_return (node) *** 18210,18223 **** else if (!DECL_CONSTRUCTOR_P (meth)) { char *t = xstrdup (lang_printable_name (mtype, 0)); ! parse_error_context (wfl_operator, "`return' with%s value from `%s %s'", ! (error_found == 1 ? "" : "out"), t, lang_printable_name (meth, 0)); free (t); } else ! parse_error_context (wfl_operator, "`return' with value from constructor `%s'", lang_printable_name (meth, 0)); return error_mark_node; --- 17863,17876 ---- else if (!DECL_CONSTRUCTOR_P (meth)) { char *t = xstrdup (lang_printable_name (mtype, 0)); ! parse_error_context (wfl_operator, "`return' with%s value from `%s %s'", ! (error_found == 1 ? "" : "out"), t, lang_printable_name (meth, 0)); free (t); } else ! parse_error_context (wfl_operator, "`return' with value from constructor `%s'", lang_printable_name (meth, 0)); return error_mark_node; *************** patch_return (node) *** 18233,18239 **** if ((patched = patch_string (exp))) exp = patched; ! modify = build (MODIFY_EXPR, NULL_TREE, DECL_RESULT (meth), exp); EXPR_WFL_LINECOL (modify) = EXPR_WFL_LINECOL (node); modify = java_complete_tree (modify); --- 17886,17892 ---- if ((patched = patch_string (exp))) exp = patched; ! modify = build (MODIFY_EXPR, NULL_TREE, DECL_RESULT (meth), exp); EXPR_WFL_LINECOL (modify) = EXPR_WFL_LINECOL (node); modify = java_complete_tree (modify); *************** patch_if_else_statement (node) *** 18283,18295 **** if (TREE_TYPE (expression) != boolean_type_node && TREE_TYPE (expression) != promoted_boolean_type_node) { ! parse_error_context ! (wfl_operator, ! "Incompatible type for `if'. Can't convert `%s' to `boolean'", lang_printable_name (TREE_TYPE (expression), 0)); return error_mark_node; } ! if (TREE_CODE (expression) == INTEGER_CST) { if (integer_zerop (expression)) --- 17936,17948 ---- if (TREE_TYPE (expression) != boolean_type_node && TREE_TYPE (expression) != promoted_boolean_type_node) { ! parse_error_context ! (wfl_operator, ! "Incompatible type for `if'. Can't convert `%s' to `boolean'", lang_printable_name (TREE_TYPE (expression), 0)); return error_mark_node; } ! if (TREE_CODE (expression) == INTEGER_CST) { if (integer_zerop (expression)) *************** build_labeled_block (location, label) *** 18335,18341 **** parse_error_context (wfl_operator, "Declaration of `%s' shadows a previous label declaration", IDENTIFIER_POINTER (label)); ! EXPR_WFL_LINECOL (wfl_operator) = EXPR_WFL_LINECOL (IDENTIFIER_LOCAL_VALUE (label_name)); parse_error_context (wfl_operator, "This is the location of the previous declaration of label `%s'", --- 17988,17994 ---- parse_error_context (wfl_operator, "Declaration of `%s' shadows a previous label declaration", IDENTIFIER_POINTER (label)); ! EXPR_WFL_LINECOL (wfl_operator) = EXPR_WFL_LINECOL (IDENTIFIER_LOCAL_VALUE (label_name)); parse_error_context (wfl_operator, "This is the location of the previous declaration of label `%s'", *************** build_new_loop (loop_body) *** 18385,18395 **** COMPOUND_EXPR (loop main body) EXIT_EXPR (this order is for while/for loops. LABELED_BLOCK_EXPR the order is reversed for do loops) ! LABEL_DECL (a continue occurring here branches at the BODY end of this labeled block) INCREMENT (if any) ! REVERSED, if non zero, tells that the loop condition expr comes after the body, like in the do-while loop. To obtain a loop, the loop body structure described above is --- 18038,18048 ---- COMPOUND_EXPR (loop main body) EXIT_EXPR (this order is for while/for loops. LABELED_BLOCK_EXPR the order is reversed for do loops) ! LABEL_DECL (a continue occurring here branches at the BODY end of this labeled block) INCREMENT (if any) ! REVERSED, if nonzero, tells that the loop condition expr comes after the body, like in the do-while loop. To obtain a loop, the loop body structure described above is *************** build_loop_body (location, condition, re *** 18416,18423 **** body = build_labeled_block (0, continue_identifier_node); first = (reversed ? body : condition); second = (reversed ? condition : body); ! return ! build (COMPOUND_EXPR, NULL_TREE, build (COMPOUND_EXPR, NULL_TREE, first, second), empty_stmt_node); } --- 18069,18076 ---- body = build_labeled_block (0, continue_identifier_node); first = (reversed ? body : condition); second = (reversed ? condition : body); ! return ! build (COMPOUND_EXPR, NULL_TREE, build (COMPOUND_EXPR, NULL_TREE, first, second), empty_stmt_node); } *************** finish_for_loop (location, condition, up *** 18459,18465 **** /* Put the condition and the loop body in place */ tree loop = finish_loop_body (location, condition, body, 0); /* LOOP is the current loop which has been now popped of the loop ! stack. Install the update block */ LOOP_EXPR_BODY_UPDATE_BLOCK (LOOP_EXPR_BODY (loop)) = update; return loop; } --- 18112,18138 ---- /* Put the condition and the loop body in place */ tree loop = finish_loop_body (location, condition, body, 0); /* LOOP is the current loop which has been now popped of the loop ! stack. Mark the update block as reachable and install it. We do ! this because the (current interpretation of the) JLS requires ! that the update expression be considered reachable even if the ! for loop's body doesn't complete normally. */ ! if (update != NULL_TREE && update != empty_stmt_node) ! { ! tree up2 = update; ! if (TREE_CODE (up2) == EXPR_WITH_FILE_LOCATION) ! up2 = EXPR_WFL_NODE (up2); ! /* It is possible for the update expression to be an ! EXPR_WFL_NODE wrapping nothing. */ ! if (up2 != NULL_TREE && up2 != empty_stmt_node) ! { ! /* Try to detect constraint violations. These would be ! programming errors somewhere. */ ! if (! IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (TREE_CODE (up2))) ! || TREE_CODE (up2) == LOOP_EXPR) ! abort (); ! SUPPRESS_UNREACHABLE_ERROR (up2) = 1; ! } ! } LOOP_EXPR_BODY_UPDATE_BLOCK (LOOP_EXPR_BODY (loop)) = update; return loop; } *************** build_bc_statement (location, is_break, *** 18546,18552 **** if (name) { ! if (!(label_block_expr = IDENTIFIER_LOCAL_VALUE (merge_qualified_name (label_id, EXPR_WFL_NODE (name))))) /* Null means that we don't have a target for this named break/continue. In this case, we make the target to be the --- 18219,18225 ---- if (name) { ! if (!(label_block_expr = IDENTIFIER_LOCAL_VALUE (merge_qualified_name (label_id, EXPR_WFL_NODE (name))))) /* Null means that we don't have a target for this named break/continue. In this case, we make the target to be the *************** build_bc_statement (location, is_break, *** 18556,18562 **** } /* Unlabeled break/continue will be handled during the break/continue patch operation */ ! break_continue = build (EXIT_BLOCK_EXPR, NULL_TREE, label_block_expr, NULL_TREE); IS_BREAK_STMT_P (break_continue) = is_break; --- 18229,18235 ---- } /* Unlabeled break/continue will be handled during the break/continue patch operation */ ! break_continue = build (EXIT_BLOCK_EXPR, NULL_TREE, label_block_expr, NULL_TREE); IS_BREAK_STMT_P (break_continue) = is_break; *************** patch_bc_statement (node) *** 18575,18581 **** tree bc_label = EXIT_BLOCK_LABELED_BLOCK (node), target_stmt; tree labeled_block = ctxp->current_labeled_block; EXPR_WFL_LINECOL (wfl_operator) = EXPR_WFL_LINECOL (node); ! /* Having an identifier here means that the target is unknown. */ if (bc_label != NULL_TREE && TREE_CODE (bc_label) == IDENTIFIER_NODE) { --- 18248,18254 ---- tree bc_label = EXIT_BLOCK_LABELED_BLOCK (node), target_stmt; tree labeled_block = ctxp->current_labeled_block; EXPR_WFL_LINECOL (wfl_operator) = EXPR_WFL_LINECOL (node); ! /* Having an identifier here means that the target is unknown. */ if (bc_label != NULL_TREE && TREE_CODE (bc_label) == IDENTIFIER_NODE) { *************** patch_bc_statement (node) *** 18594,18600 **** parse_error_context (wfl_operator, "`continue' must be in loop"); else ! parse_error_context (wfl_operator, "continue label `%s' does not name a loop", IDENTIFIER_POINTER (bc_label)); return error_mark_node; --- 18267,18273 ---- parse_error_context (wfl_operator, "`continue' must be in loop"); else ! parse_error_context (wfl_operator, "continue label `%s' does not name a loop", IDENTIFIER_POINTER (bc_label)); return error_mark_node; *************** patch_bc_statement (node) *** 18610,18616 **** } } else if (!bc_label) ! { for (;; labeled_block = TREE_CHAIN (labeled_block)) { if (labeled_block == NULL_TREE) --- 18283,18289 ---- } } else if (!bc_label) ! { for (;; labeled_block = TREE_CHAIN (labeled_block)) { if (labeled_block == NULL_TREE) *************** patch_exit_expr (node) *** 18656,18670 **** /* The type of expression must be boolean */ if (TREE_TYPE (expression) != boolean_type_node) { ! parse_error_context ! (wfl_operator, ! "Incompatible type for loop conditional. Can't convert `%s' to `boolean'", lang_printable_name (TREE_TYPE (expression), 0)); return error_mark_node; } /* Now we know things are allright, invert the condition, fold and return */ ! TREE_OPERAND (node, 0) = fold (build1 (TRUTH_NOT_EXPR, boolean_type_node, expression)); if (! integer_zerop (TREE_OPERAND (node, 0)) --- 18329,18343 ---- /* The type of expression must be boolean */ if (TREE_TYPE (expression) != boolean_type_node) { ! parse_error_context ! (wfl_operator, ! "Incompatible type for loop conditional. Can't convert `%s' to `boolean'", lang_printable_name (TREE_TYPE (expression), 0)); return error_mark_node; } /* Now we know things are allright, invert the condition, fold and return */ ! TREE_OPERAND (node, 0) = fold (build1 (TRUTH_NOT_EXPR, boolean_type_node, expression)); if (! integer_zerop (TREE_OPERAND (node, 0)) *************** patch_switch_statement (node) *** 18750,18760 **** TREE_TYPE (node) = void_type_node; TREE_SIDE_EFFECTS (node) = 1; CAN_COMPLETE_NORMALLY (node) ! = CAN_COMPLETE_NORMALLY (TREE_OPERAND (node, 1)) || ! SWITCH_HAS_DEFAULT (node); return node; } /* 14.18 The try/catch statements */ /* Encapsulate TRY_STMTS' in a try catch sequence. The catch clause --- 18423,18511 ---- TREE_TYPE (node) = void_type_node; TREE_SIDE_EFFECTS (node) = 1; CAN_COMPLETE_NORMALLY (node) ! = CAN_COMPLETE_NORMALLY (TREE_OPERAND (node, 1)) || ! SWITCH_HAS_DEFAULT (node); return node; } + /* Assertions. */ + + /* Build an assertion expression for `assert CONDITION : VALUE'; VALUE + might be NULL_TREE. */ + static tree + build_assertion (location, condition, value) + int location; + tree condition, value; + { + tree node; + tree klass = GET_CPC (); + + if (! CLASS_USES_ASSERTIONS (klass)) + { + tree field, classdollar, id, call; + tree class_type = TREE_TYPE (klass); + + field = add_field (class_type, + get_identifier ("$assertionsDisabled"), + boolean_type_node, + ACC_PRIVATE | ACC_STATIC | ACC_FINAL); + MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC (field); + FIELD_SYNTHETIC (field) = 1; + + if (!TYPE_DOT_CLASS (class_type)) + build_dot_class_method (class_type); + classdollar = build_dot_class_method_invocation (class_type); + + /* Call CLASS.desiredAssertionStatus(). */ + id = build_wfl_node (get_identifier ("desiredAssertionStatus")); + call = build (CALL_EXPR, NULL_TREE, id, NULL_TREE, NULL_TREE); + call = make_qualified_primary (classdollar, call, location); + TREE_SIDE_EFFECTS (call) = 1; + + /* Invert to obtain !CLASS.desiredAssertionStatus(). This may + seem odd, but we do it to generate code identical to that of + the JDK. */ + call = build1 (TRUTH_NOT_EXPR, NULL_TREE, call); + TREE_SIDE_EFFECTS (call) = 1; + DECL_INITIAL (field) = call; + + /* Record the initializer in the initializer statement list. */ + call = build (MODIFY_EXPR, NULL_TREE, field, call); + TREE_CHAIN (call) = CPC_STATIC_INITIALIZER_STMT (ctxp); + SET_CPC_STATIC_INITIALIZER_STMT (ctxp, call); + MODIFY_EXPR_FROM_INITIALIZATION_P (call) = 1; + + CLASS_USES_ASSERTIONS (klass) = 1; + } + + if (value != NULL_TREE) + value = tree_cons (NULL_TREE, value, NULL_TREE); + + node = build_wfl_node (get_identifier ("java")); + node = make_qualified_name (node, build_wfl_node (get_identifier ("lang")), + location); + node = make_qualified_name (node, build_wfl_node (get_identifier ("AssertionError")), + location); + + node = build (NEW_CLASS_EXPR, NULL_TREE, node, value, NULL_TREE); + TREE_SIDE_EFFECTS (node) = 1; + /* It is too early to use BUILD_THROW. */ + node = build1 (THROW_EXPR, NULL_TREE, node); + TREE_SIDE_EFFECTS (node) = 1; + + /* We invert the condition; if we just put NODE as the `else' part + then we generate weird-looking bytecode. */ + condition = build1 (TRUTH_NOT_EXPR, NULL_TREE, condition); + /* Check $assertionsDisabled. */ + condition + = build (TRUTH_ANDIF_EXPR, NULL_TREE, + build1 (TRUTH_NOT_EXPR, NULL_TREE, + build_wfl_node (get_identifier ("$assertionsDisabled"))), + condition); + node = build_if_else_statement (location, condition, node, NULL_TREE); + return node; + } + /* 14.18 The try/catch statements */ /* Encapsulate TRY_STMTS' in a try catch sequence. The catch clause *************** encapsulate_with_try_catch (location, ty *** 18771,18781 **** try_block = build_expr_block (try_stmts, NULL_TREE); /* Build a catch block: we need a catch clause parameter */ ! catch_clause_param = build_decl (VAR_DECL, wpv_id, build_pointer_type (type)); /* And a block */ catch_block = build_expr_block (NULL_TREE, catch_clause_param); ! /* Initialize the variable and store in the block */ catch = build (MODIFY_EXPR, NULL_TREE, catch_clause_param, build (JAVA_EXC_OBJ_EXPR, ptr_type_node)); --- 18522,18532 ---- try_block = build_expr_block (try_stmts, NULL_TREE); /* Build a catch block: we need a catch clause parameter */ ! catch_clause_param = build_decl (VAR_DECL, wpv_id, build_pointer_type (type)); /* And a block */ catch_block = build_expr_block (NULL_TREE, catch_clause_param); ! /* Initialize the variable and store in the block */ catch = build (MODIFY_EXPR, NULL_TREE, catch_clause_param, build (JAVA_EXC_OBJ_EXPR, ptr_type_node)); *************** patch_try_statement (node) *** 18846,18852 **** only parameter of the clause statement in of class Throwable or a subclass of Throwable, but that was done earlier. The catch clause parameter type has also been resolved. */ ! /* Just make sure that the catch clause parameter type inherits from java.lang.Throwable */ if (!inherits_from_p (carg_type, throwable_type_node)) --- 18597,18603 ---- only parameter of the clause statement in of class Throwable or a subclass of Throwable, but that was done earlier. The catch clause parameter type has also been resolved. */ ! /* Just make sure that the catch clause parameter type inherits from java.lang.Throwable */ if (!inherits_from_p (carg_type, throwable_type_node)) *************** patch_try_statement (node) *** 18858,18864 **** error_found = 1; continue; } ! /* Partial check for unreachable catch statement: The catch clause is reachable iff is no earlier catch block A in the try statement such that the type of the catch --- 18609,18615 ---- error_found = 1; continue; } ! /* Partial check for unreachable catch statement: The catch clause is reachable iff is no earlier catch block A in the try statement such that the type of the catch *************** patch_try_statement (node) *** 18875,18881 **** if (inherits_from_p (carg_type, TREE_TYPE (TREE_TYPE (decl)))) { EXPR_WFL_LINECOL (wfl_operator) = EXPR_WFL_LINECOL (current); ! parse_error_context (wfl_operator, "`catch' not reached because of the catch clause at line %d", EXPR_WFL_LINENO (sub_current)); --- 18626,18632 ---- if (inherits_from_p (carg_type, TREE_TYPE (TREE_TYPE (decl)))) { EXPR_WFL_LINECOL (wfl_operator) = EXPR_WFL_LINECOL (current); ! parse_error_context (wfl_operator, "`catch' not reached because of the catch clause at line %d", EXPR_WFL_LINENO (sub_current)); *************** patch_try_statement (node) *** 18911,18917 **** POP_EXCEPTIONS (); /* Verification ends here */ ! if (error_found) return error_mark_node; TREE_OPERAND (node, 0) = try; --- 18662,18668 ---- POP_EXCEPTIONS (); /* Verification ends here */ ! if (error_found) return error_mark_node; TREE_OPERAND (node, 0) = try; *************** patch_synchronized_statement (node, wfl_ *** 18962,18968 **** that the handler that catches all throw exception calls _Jv_MonitorExit and then rethrow the exception. The synchronized statement is then implemented as: ! TRY { _Jv_MonitorEnter (expression) synchronized_block --- 18713,18719 ---- that the handler that catches all throw exception calls _Jv_MonitorExit and then rethrow the exception. The synchronized statement is then implemented as: ! TRY { _Jv_MonitorEnter (expression) synchronized_block *************** patch_throw_statement (node, wfl_op1) *** 19024,19040 **** is explicitly declared in the `throws' clause of each constructor. This doesn't apply to anonymous classes, since they don't have declared constructors. */ ! if (!unchecked_ok && DECL_INSTINIT_P (current_function_decl) && !ANONYMOUS_CLASS_P (current_class)) { tree current; ! for (current = TYPE_METHODS (current_class); current; current = TREE_CHAIN (current)) ! if (DECL_CONSTRUCTOR_P (current) && !check_thrown_exceptions_do (TREE_TYPE (expr))) { ! parse_error_context (wfl_operator, "Checked exception `%s' can't be thrown in instance initializer (not all declared constructor are declaring it in their `throws' clause)", lang_printable_name (TREE_TYPE (expr), 0)); return error_mark_node; } --- 18775,18791 ---- is explicitly declared in the `throws' clause of each constructor. This doesn't apply to anonymous classes, since they don't have declared constructors. */ ! if (!unchecked_ok && DECL_INSTINIT_P (current_function_decl) && !ANONYMOUS_CLASS_P (current_class)) { tree current; ! for (current = TYPE_METHODS (current_class); current; current = TREE_CHAIN (current)) ! if (DECL_CONSTRUCTOR_P (current) && !check_thrown_exceptions_do (TREE_TYPE (expr))) { ! parse_error_context (wfl_operator, "Checked exception `%s' can't be thrown in instance initializer (not all declared constructor are declaring it in their `throws' clause)", lang_printable_name (TREE_TYPE (expr), 0)); return error_mark_node; } *************** patch_throw_statement (node, wfl_op1) *** 19063,19069 **** /* We report that the exception can't be throw from a try block in all circumstances but when the `throw' is inside a static block. */ ! else if (!EXCEPTIONS_P (currently_caught_type_list) && !tryblock_throws_ok) { if (DECL_CLINIT_P (current_function_decl)) --- 18814,18820 ---- /* We report that the exception can't be throw from a try block in all circumstances but when the `throw' is inside a static block. */ ! else if (!EXCEPTIONS_P (currently_caught_type_list) && !tryblock_throws_ok) { if (DECL_CLINIT_P (current_function_decl)) *************** patch_throw_statement (node, wfl_op1) *** 19072,19084 **** lang_printable_name (type, 0)); else parse_error_context (wfl_operator, ! "Checked exception `%s' isn't thrown from a `try' block", lang_printable_name (type, 0)); } /* Otherwise, the current method doesn't have the appropriate throws declaration */ else ! parse_error_context (wfl_operator, "Checked exception `%s' doesn't match any of current method's `throws' declaration(s)", lang_printable_name (type, 0)); return error_mark_node; } --- 18823,18835 ---- lang_printable_name (type, 0)); else parse_error_context (wfl_operator, ! "Checked exception `%s' isn't thrown from a `try' block", lang_printable_name (type, 0)); } /* Otherwise, the current method doesn't have the appropriate throws declaration */ else ! parse_error_context (wfl_operator, "Checked exception `%s' doesn't match any of current method's `throws' declaration(s)", lang_printable_name (type, 0)); return error_mark_node; } *************** check_thrown_exceptions (location, decl) *** 19102,19109 **** { tree throws; /* For all the unchecked exceptions thrown by DECL */ ! for (throws = DECL_FUNCTION_THROWS (decl); throws; ! throws = TREE_CHAIN (throws)) if (!check_thrown_exceptions_do (TREE_VALUE (throws))) { #if 1 --- 18853,18860 ---- { tree throws; /* For all the unchecked exceptions thrown by DECL */ ! for (throws = DECL_FUNCTION_THROWS (decl); throws; ! throws = TREE_CHAIN (throws)) if (!check_thrown_exceptions_do (TREE_VALUE (throws))) { #if 1 *************** check_thrown_exceptions (location, decl) *** 19116,19125 **** parse_error_context (wfl_operator, "Exception `%s' can't be thrown in initializer", lang_printable_name (TREE_VALUE (throws), 0)); ! else { ! parse_error_context ! (wfl_operator, "Exception `%s' must be caught, or it must be declared in the `throws' clause of `%s'", lang_printable_name (TREE_VALUE (throws), 0), (DECL_INIT_P (current_function_decl) ? IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (current_class))) : --- 18867,18876 ---- parse_error_context (wfl_operator, "Exception `%s' can't be thrown in initializer", lang_printable_name (TREE_VALUE (throws), 0)); ! else { ! parse_error_context ! (wfl_operator, "Exception `%s' must be caught, or it must be declared in the `throws' clause of `%s'", lang_printable_name (TREE_VALUE (throws), 0), (DECL_INIT_P (current_function_decl) ? IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (current_class))) : *************** patch_conditional_expr (node, wfl_cond, *** 19242,19248 **** /* Second and third can be numeric, boolean (i.e. primitive), references or null. Anything else results in an error */ if (!((JNUMERIC_TYPE_P (t1) && JNUMERIC_TYPE_P (t2)) ! || ((JREFERENCE_TYPE_P (t1) || op1 == null_pointer_node) && (JREFERENCE_TYPE_P (t2) || op2 == null_pointer_node)) || (t1 == boolean_type_node && t2 == boolean_type_node))) error_found = 1; --- 18993,18999 ---- /* Second and third can be numeric, boolean (i.e. primitive), references or null. Anything else results in an error */ if (!((JNUMERIC_TYPE_P (t1) && JNUMERIC_TYPE_P (t2)) ! || ((JREFERENCE_TYPE_P (t1) || op1 == null_pointer_node) && (JREFERENCE_TYPE_P (t2) || op2 == null_pointer_node)) || (t1 == boolean_type_node && t2 == boolean_type_node))) error_found = 1; *************** patch_conditional_expr (node, wfl_cond, *** 19274,19282 **** /* Otherwise, binary numeric promotion is applied and the resulting type is the promoted type of operand 1 and 2 */ ! else ! resulting_type = binary_numeric_promotion (t1, t2, ! &TREE_OPERAND (node, 1), &TREE_OPERAND (node, 2)); } --- 19025,19033 ---- /* Otherwise, binary numeric promotion is applied and the resulting type is the promoted type of operand 1 and 2 */ ! else ! resulting_type = binary_numeric_promotion (t1, t2, ! &TREE_OPERAND (node, 1), &TREE_OPERAND (node, 2)); } *************** fold_constant_for_init (node, context) *** 19357,19364 **** switch (code) { - case STRING_CST: case INTEGER_CST: case REAL_CST: return node; --- 19108,19117 ---- switch (code) { case INTEGER_CST: + if (node == null_pointer_node) + return NULL_TREE; + case STRING_CST: case REAL_CST: return node; *************** fold_constant_for_init (node, context) *** 19375,19381 **** case BIT_IOR_EXPR: case TRUTH_ANDIF_EXPR: case TRUTH_ORIF_EXPR: ! case EQ_EXPR: case NE_EXPR: case GT_EXPR: case GE_EXPR: --- 19128,19134 ---- case BIT_IOR_EXPR: case TRUTH_ANDIF_EXPR: case TRUTH_ORIF_EXPR: ! case EQ_EXPR: case NE_EXPR: case GT_EXPR: case GE_EXPR: *************** fold_constant_for_init (node, context) *** 19431,19436 **** --- 19184,19191 ---- /* Guard against infinite recursion. */ DECL_INITIAL (node) = NULL_TREE; val = fold_constant_for_init (val, node); + if (val != NULL_TREE && TREE_CODE (val) != STRING_CST) + val = try_builtin_assignconv (NULL_TREE, TREE_TYPE (node), val); DECL_INITIAL (node) = val; return val; *************** fold_constant_for_init (node, context) *** 19446,19452 **** else if (! QUALIFIED_P (name)) { decl = lookup_field_wrapper (DECL_CONTEXT (context), name); ! if (decl == NULL_TREE || (! FIELD_STATIC (decl) && ! FIELD_FINAL (decl))) return NULL_TREE; return fold_constant_for_init (decl, decl); --- 19201,19207 ---- else if (! QUALIFIED_P (name)) { decl = lookup_field_wrapper (DECL_CONTEXT (context), name); ! if (decl == NULL_TREE || (! FIELD_STATIC (decl) && ! FIELD_FINAL (decl))) return NULL_TREE; return fold_constant_for_init (decl, decl); *************** mark_parser_ctxt (p) *** 19514,19526 **** void *p; { struct parser_ctxt *pc = *((struct parser_ctxt **) p); ! int i; if (!pc) return; #ifndef JC1_LITE ! for (i = 0; i < 11; ++i) ggc_mark_tree (pc->modifier_ctx[i]); ggc_mark_tree (pc->class_type); ggc_mark_tree (pc->function_decl); --- 19269,19283 ---- void *p; { struct parser_ctxt *pc = *((struct parser_ctxt **) p); ! #ifndef JC1_LITE ! size_t i; ! #endif if (!pc) return; #ifndef JC1_LITE ! for (i = 0; i < ARRAY_SIZE (pc->modifier_ctx); ++i) ggc_mark_tree (pc->modifier_ctx[i]); ggc_mark_tree (pc->class_type); ggc_mark_tree (pc->function_decl); *************** mark_parser_ctxt (p) *** 19544,19555 **** void init_src_parse () { - /* Register roots with the garbage collector. */ - ggc_add_tree_root (src_parse_roots, sizeof (src_parse_roots) / sizeof(tree)); - /* Sanity check; we've been bit by this before. */ ! if (sizeof (ctxp->modifier_ctx) / sizeof (tree) != ! MODIFIER_TK - PUBLIC_TK) abort (); } --- 19301,19308 ---- void init_src_parse () { /* Sanity check; we've been bit by this before. */ ! if (ARRAY_SIZE (ctxp->modifier_ctx) != MODIFIER_TK - PUBLIC_TK) abort (); } *************** init_src_parse () *** 19560,19575 **** /* Attach to PTR (a block) the declaration found in ENTRY. */ ! static bool attach_init_test_initialization_flags (entry, ptr) ! struct hash_entry *entry; PTR ptr; { tree block = (tree)ptr; ! struct init_test_hash_entry *ite = (struct init_test_hash_entry *) entry; ! ! TREE_CHAIN (ite->init_test_decl) = BLOCK_EXPR_DECLS (block); ! BLOCK_EXPR_DECLS (block) = ite->init_test_decl; return true; } --- 19313,19331 ---- /* Attach to PTR (a block) the declaration found in ENTRY. */ ! static int attach_init_test_initialization_flags (entry, ptr) ! PTR *entry; PTR ptr; { tree block = (tree)ptr; ! struct treetreehash_entry *ite = (struct treetreehash_entry *) *entry; ! ! if (block != error_mark_node) ! { ! TREE_CHAIN (ite->value) = BLOCK_EXPR_DECLS (block); ! BLOCK_EXPR_DECLS (block) = ite->value; ! } return true; } *************** attach_init_test_initialization_flags (e *** 19579,19609 **** initialized static class flags if a flag already existed, otherwise a new one is created. */ ! static bool ! emit_test_initialization (entry, info) ! struct hash_entry *entry; PTR info; { tree l = (tree) info; tree decl, init; ! ! struct init_test_hash_entry *ite = (struct init_test_hash_entry *) ! hash_lookup (&DECL_FUNCTION_INIT_TEST_TABLE (current_function_decl), ! entry->key, ! current_function_decl != TREE_PURPOSE (l), NULL); /* If we haven't found a flag and we're dealing with self registered with current_function_decl, then don't do anything. Self is always added as definitely initialized but this information is valid only if used outside the current function. */ ! if (! ite) return true; /* If we don't have a variable, create one and install it. */ ! if (! ite->init_test_decl) { tree block; ! decl = build_decl (VAR_DECL, NULL_TREE, boolean_type_node); MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC (decl); LOCAL_CLASS_INITIALIZATION_FLAG (decl) = 1; --- 19335,19366 ---- initialized static class flags if a flag already existed, otherwise a new one is created. */ ! static int ! emit_test_initialization (entry_p, info) ! PTR *entry_p; PTR info; { tree l = (tree) info; tree decl, init; ! tree key = (tree) *entry_p; ! tree *ite; ! htab_t cf_ht = DECL_FUNCTION_INIT_TEST_TABLE (current_function_decl); /* If we haven't found a flag and we're dealing with self registered with current_function_decl, then don't do anything. Self is always added as definitely initialized but this information is valid only if used outside the current function. */ ! if (current_function_decl == TREE_PURPOSE (l) ! && java_treetreehash_find (cf_ht, key) == NULL) return true; + ite = java_treetreehash_new (cf_ht, key); + /* If we don't have a variable, create one and install it. */ ! if (*ite == NULL) { tree block; ! decl = build_decl (VAR_DECL, NULL_TREE, boolean_type_node); MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC (decl); LOCAL_CLASS_INITIALIZATION_FLAG (decl) = 1; *************** emit_test_initialization (entry, info) *** 19614,19623 **** block = BLOCK_SUBBLOCKS (GET_CURRENT_BLOCK (current_function_decl)); TREE_CHAIN (decl) = BLOCK_EXPR_DECLS (block); BLOCK_EXPR_DECLS (block) = decl; ! ite->init_test_decl = decl; } else ! decl = ite->init_test_decl; /* Now simply augment the compound that holds all the assignments pertaining to this method invocation. */ --- 19371,19380 ---- block = BLOCK_SUBBLOCKS (GET_CURRENT_BLOCK (current_function_decl)); TREE_CHAIN (decl) = BLOCK_EXPR_DECLS (block); BLOCK_EXPR_DECLS (block) = decl; ! *ite = decl; } else ! decl = *ite; /* Now simply augment the compound that holds all the assignments pertaining to this method invocation. */ *************** emit_test_initialization (entry, info) *** 19629,19632 **** return true; } ! --- 19386,19390 ---- return true; } ! #include "gt-java-parse.h" ! #include "gtype-java.h" diff -Nrc3pad gcc-3.2.3/gcc/java/parse.h gcc-3.3/gcc/java/parse.h *** gcc-3.2.3/gcc/java/parse.h 2002-04-17 08:24:44.000000000 +0000 --- gcc-3.3/gcc/java/parse.h 2002-08-04 22:45:31.000000000 +0000 *************** The Free Software Foundation is independ *** 31,37 **** /* Extern global variable declarations */ extern int java_error_count; extern struct obstack temporary_obstack; - extern struct obstack permanent_obstack; extern int quiet_flag; #ifndef JC1_LITE --- 31,36 ---- diff -Nrc3pad gcc-3.2.3/gcc/java/parse-scan.c gcc-3.3/gcc/java/parse-scan.c *** gcc-3.2.3/gcc/java/parse-scan.c 2003-04-22 08:18:55.000000000 +0000 --- gcc-3.3/gcc/java/parse-scan.c 2003-05-14 01:01:24.000000000 +0000 *************** *** 1,282 **** ! /* A Bison parser, made by GNU Bison 1.875. */ ! ! /* Skeleton parser for Yacc-like parsing with Bison, ! Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc. ! ! This program is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. ! ! This program is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! GNU General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with this program; if not, write to the Free Software ! Foundation, Inc., 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ ! ! /* As a special exception, when this file is copied by Bison into a ! Bison output file, you may use that output file without restriction. ! This special exception was added by the Free Software Foundation ! in version 1.24 of Bison. */ ! ! /* Written by Richard Stallman by simplifying the original so called ! ``semantic'' parser. */ ! ! /* All symbols defined below should begin with yy or YY, to avoid ! infringing on user name space. This should be done even for local ! variables, as they might otherwise be expanded by user macros. ! There are some unavoidable exceptions within include files to ! define necessary library symbols; they are noted "INFRINGES ON ! USER NAME SPACE" below. */ ! ! /* Identify Bison output. */ ! #define YYBISON 1 ! ! /* Skeleton name. */ ! #define YYSKELETON_NAME "yacc.c" ! ! /* Pure parsers. */ ! #define YYPURE 1 ! ! /* Using locations. */ ! #define YYLSP_NEEDED 0 ! ! ! ! /* Tokens. */ ! #ifndef YYTOKENTYPE ! # define YYTOKENTYPE ! /* Put the tokens into the symbol table, so that GDB and other debuggers ! know about them. */ ! enum yytokentype { ! PLUS_TK = 258, ! MINUS_TK = 259, ! MULT_TK = 260, ! DIV_TK = 261, ! REM_TK = 262, ! LS_TK = 263, ! SRS_TK = 264, ! ZRS_TK = 265, ! AND_TK = 266, ! XOR_TK = 267, ! OR_TK = 268, ! BOOL_AND_TK = 269, ! BOOL_OR_TK = 270, ! EQ_TK = 271, ! NEQ_TK = 272, ! GT_TK = 273, ! GTE_TK = 274, ! LT_TK = 275, ! LTE_TK = 276, ! PLUS_ASSIGN_TK = 277, ! MINUS_ASSIGN_TK = 278, ! MULT_ASSIGN_TK = 279, ! DIV_ASSIGN_TK = 280, ! REM_ASSIGN_TK = 281, ! LS_ASSIGN_TK = 282, ! SRS_ASSIGN_TK = 283, ! ZRS_ASSIGN_TK = 284, ! AND_ASSIGN_TK = 285, ! XOR_ASSIGN_TK = 286, ! OR_ASSIGN_TK = 287, ! PUBLIC_TK = 288, ! PRIVATE_TK = 289, ! PROTECTED_TK = 290, ! STATIC_TK = 291, ! FINAL_TK = 292, ! SYNCHRONIZED_TK = 293, ! VOLATILE_TK = 294, ! TRANSIENT_TK = 295, ! NATIVE_TK = 296, ! PAD_TK = 297, ! ABSTRACT_TK = 298, ! MODIFIER_TK = 299, ! STRICT_TK = 300, ! DECR_TK = 301, ! INCR_TK = 302, ! DEFAULT_TK = 303, ! IF_TK = 304, ! THROW_TK = 305, ! BOOLEAN_TK = 306, ! DO_TK = 307, ! IMPLEMENTS_TK = 308, ! THROWS_TK = 309, ! BREAK_TK = 310, ! IMPORT_TK = 311, ! ELSE_TK = 312, ! INSTANCEOF_TK = 313, ! RETURN_TK = 314, ! VOID_TK = 315, ! CATCH_TK = 316, ! INTERFACE_TK = 317, ! CASE_TK = 318, ! EXTENDS_TK = 319, ! FINALLY_TK = 320, ! SUPER_TK = 321, ! WHILE_TK = 322, ! CLASS_TK = 323, ! SWITCH_TK = 324, ! CONST_TK = 325, ! TRY_TK = 326, ! FOR_TK = 327, ! NEW_TK = 328, ! CONTINUE_TK = 329, ! GOTO_TK = 330, ! PACKAGE_TK = 331, ! THIS_TK = 332, ! BYTE_TK = 333, ! SHORT_TK = 334, ! INT_TK = 335, ! LONG_TK = 336, ! CHAR_TK = 337, ! INTEGRAL_TK = 338, ! FLOAT_TK = 339, ! DOUBLE_TK = 340, ! FP_TK = 341, ! ID_TK = 342, ! REL_QM_TK = 343, ! REL_CL_TK = 344, ! NOT_TK = 345, ! NEG_TK = 346, ! ASSIGN_ANY_TK = 347, ! ASSIGN_TK = 348, ! OP_TK = 349, ! CP_TK = 350, ! OCB_TK = 351, ! CCB_TK = 352, ! OSB_TK = 353, ! CSB_TK = 354, ! SC_TK = 355, ! C_TK = 356, ! DOT_TK = 357, ! STRING_LIT_TK = 358, ! CHAR_LIT_TK = 359, ! INT_LIT_TK = 360, ! FP_LIT_TK = 361, ! TRUE_TK = 362, ! FALSE_TK = 363, ! BOOL_LIT_TK = 364, ! NULL_TK = 365 ! }; ! #endif ! #define PLUS_TK 258 ! #define MINUS_TK 259 ! #define MULT_TK 260 ! #define DIV_TK 261 ! #define REM_TK 262 ! #define LS_TK 263 ! #define SRS_TK 264 ! #define ZRS_TK 265 ! #define AND_TK 266 ! #define XOR_TK 267 ! #define OR_TK 268 ! #define BOOL_AND_TK 269 ! #define BOOL_OR_TK 270 ! #define EQ_TK 271 ! #define NEQ_TK 272 ! #define GT_TK 273 ! #define GTE_TK 274 ! #define LT_TK 275 ! #define LTE_TK 276 ! #define PLUS_ASSIGN_TK 277 ! #define MINUS_ASSIGN_TK 278 ! #define MULT_ASSIGN_TK 279 ! #define DIV_ASSIGN_TK 280 ! #define REM_ASSIGN_TK 281 ! #define LS_ASSIGN_TK 282 ! #define SRS_ASSIGN_TK 283 ! #define ZRS_ASSIGN_TK 284 ! #define AND_ASSIGN_TK 285 ! #define XOR_ASSIGN_TK 286 ! #define OR_ASSIGN_TK 287 ! #define PUBLIC_TK 288 ! #define PRIVATE_TK 289 ! #define PROTECTED_TK 290 ! #define STATIC_TK 291 ! #define FINAL_TK 292 ! #define SYNCHRONIZED_TK 293 ! #define VOLATILE_TK 294 ! #define TRANSIENT_TK 295 ! #define NATIVE_TK 296 ! #define PAD_TK 297 ! #define ABSTRACT_TK 298 ! #define MODIFIER_TK 299 ! #define STRICT_TK 300 ! #define DECR_TK 301 ! #define INCR_TK 302 ! #define DEFAULT_TK 303 ! #define IF_TK 304 ! #define THROW_TK 305 ! #define BOOLEAN_TK 306 ! #define DO_TK 307 ! #define IMPLEMENTS_TK 308 ! #define THROWS_TK 309 ! #define BREAK_TK 310 ! #define IMPORT_TK 311 ! #define ELSE_TK 312 ! #define INSTANCEOF_TK 313 ! #define RETURN_TK 314 ! #define VOID_TK 315 ! #define CATCH_TK 316 ! #define INTERFACE_TK 317 ! #define CASE_TK 318 ! #define EXTENDS_TK 319 ! #define FINALLY_TK 320 ! #define SUPER_TK 321 ! #define WHILE_TK 322 ! #define CLASS_TK 323 ! #define SWITCH_TK 324 ! #define CONST_TK 325 ! #define TRY_TK 326 ! #define FOR_TK 327 ! #define NEW_TK 328 ! #define CONTINUE_TK 329 ! #define GOTO_TK 330 ! #define PACKAGE_TK 331 ! #define THIS_TK 332 ! #define BYTE_TK 333 ! #define SHORT_TK 334 ! #define INT_TK 335 ! #define LONG_TK 336 ! #define CHAR_TK 337 ! #define INTEGRAL_TK 338 ! #define FLOAT_TK 339 ! #define DOUBLE_TK 340 ! #define FP_TK 341 ! #define ID_TK 342 ! #define REL_QM_TK 343 ! #define REL_CL_TK 344 ! #define NOT_TK 345 ! #define NEG_TK 346 ! #define ASSIGN_ANY_TK 347 ! #define ASSIGN_TK 348 ! #define OP_TK 349 ! #define CP_TK 350 ! #define OCB_TK 351 ! #define CCB_TK 352 ! #define OSB_TK 353 ! #define CSB_TK 354 ! #define SC_TK 355 ! #define C_TK 356 ! #define DOT_TK 357 ! #define STRING_LIT_TK 358 ! #define CHAR_LIT_TK 359 ! #define INT_LIT_TK 360 ! #define FP_LIT_TK 361 ! #define TRUE_TK 362 ! #define FALSE_TK 363 ! #define BOOL_LIT_TK 364 ! #define NULL_TK 365 ! ! /* Copy the first part of user declarations. */ ! #line 37 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" #define JC1_LITE --- 1,119 ---- ! /* A Bison parser, made from /home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y ! by GNU bison 1.35. */ + #define YYBISON 1 /* Identify Bison output. */ + # define PLUS_TK 257 + # define MINUS_TK 258 + # define MULT_TK 259 + # define DIV_TK 260 + # define REM_TK 261 + # define LS_TK 262 + # define SRS_TK 263 + # define ZRS_TK 264 + # define AND_TK 265 + # define XOR_TK 266 + # define OR_TK 267 + # define BOOL_AND_TK 268 + # define BOOL_OR_TK 269 + # define EQ_TK 270 + # define NEQ_TK 271 + # define GT_TK 272 + # define GTE_TK 273 + # define LT_TK 274 + # define LTE_TK 275 + # define PLUS_ASSIGN_TK 276 + # define MINUS_ASSIGN_TK 277 + # define MULT_ASSIGN_TK 278 + # define DIV_ASSIGN_TK 279 + # define REM_ASSIGN_TK 280 + # define LS_ASSIGN_TK 281 + # define SRS_ASSIGN_TK 282 + # define ZRS_ASSIGN_TK 283 + # define AND_ASSIGN_TK 284 + # define XOR_ASSIGN_TK 285 + # define OR_ASSIGN_TK 286 + # define PUBLIC_TK 287 + # define PRIVATE_TK 288 + # define PROTECTED_TK 289 + # define STATIC_TK 290 + # define FINAL_TK 291 + # define SYNCHRONIZED_TK 292 + # define VOLATILE_TK 293 + # define TRANSIENT_TK 294 + # define NATIVE_TK 295 + # define PAD_TK 296 + # define ABSTRACT_TK 297 + # define MODIFIER_TK 298 + # define STRICT_TK 299 + # define DECR_TK 300 + # define INCR_TK 301 + # define DEFAULT_TK 302 + # define IF_TK 303 + # define THROW_TK 304 + # define BOOLEAN_TK 305 + # define DO_TK 306 + # define IMPLEMENTS_TK 307 + # define THROWS_TK 308 + # define BREAK_TK 309 + # define IMPORT_TK 310 + # define ELSE_TK 311 + # define INSTANCEOF_TK 312 + # define RETURN_TK 313 + # define VOID_TK 314 + # define CATCH_TK 315 + # define INTERFACE_TK 316 + # define CASE_TK 317 + # define EXTENDS_TK 318 + # define FINALLY_TK 319 + # define SUPER_TK 320 + # define WHILE_TK 321 + # define CLASS_TK 322 + # define SWITCH_TK 323 + # define CONST_TK 324 + # define TRY_TK 325 + # define FOR_TK 326 + # define NEW_TK 327 + # define CONTINUE_TK 328 + # define GOTO_TK 329 + # define PACKAGE_TK 330 + # define THIS_TK 331 + # define ASSERT_TK 332 + # define BYTE_TK 333 + # define SHORT_TK 334 + # define INT_TK 335 + # define LONG_TK 336 + # define CHAR_TK 337 + # define INTEGRAL_TK 338 + # define FLOAT_TK 339 + # define DOUBLE_TK 340 + # define FP_TK 341 + # define ID_TK 342 + # define REL_QM_TK 343 + # define REL_CL_TK 344 + # define NOT_TK 345 + # define NEG_TK 346 + # define ASSIGN_ANY_TK 347 + # define ASSIGN_TK 348 + # define OP_TK 349 + # define CP_TK 350 + # define OCB_TK 351 + # define CCB_TK 352 + # define OSB_TK 353 + # define CSB_TK 354 + # define SC_TK 355 + # define C_TK 356 + # define DOT_TK 357 + # define STRING_LIT_TK 358 + # define CHAR_LIT_TK 359 + # define INT_LIT_TK 360 + # define FP_LIT_TK 361 + # define TRUE_TK 362 + # define FALSE_TK 363 + # define BOOL_LIT_TK 364 + # define NULL_TK 365 ! #line 37 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" #define JC1_LITE *************** *** 286,291 **** --- 123,131 ---- #include "obstack.h" #include "toplev.h" + #define obstack_chunk_alloc xmalloc + #define obstack_chunk_free free + extern char *input_filename; extern FILE *finput, *out; *************** int lineno; *** 305,317 **** static int absorber; #define USE_ABSORBER absorber = 0 ! /* Keep track of the current class name and package name. */ ! static char *current_class; static const char *package_name; - /* Keep track of the current inner class qualifier. */ - static int current_class_length; - /* Keep track of whether things have be listed before. */ static int previous_output; --- 145,153 ---- static int absorber; #define USE_ABSORBER absorber = 0 ! /* Keep track of the current package name. */ static const char *package_name; /* Keep track of whether things have be listed before. */ static int previous_output; *************** static int bracket_count; *** 328,333 **** --- 164,185 ---- /* Numbers anonymous classes */ static int anonymous_count; + /* This is used to record the current class context. */ + struct class_context + { + char *name; + struct class_context *next; + }; + + /* The global class context. */ + static struct class_context *current_class_context; + + /* A special constant used to represent an anonymous context. */ + static const char *anonymous_context = "ANONYMOUS"; + + /* Count of method depth. */ + static int method_depth; + /* Record a method declaration */ struct method_declarator { const char *method_name; *************** struct method_declarator { *** 342,347 **** --- 194,202 ---- } /* Two actions for this grammar */ + static int make_class_name_recursive PARAMS ((struct obstack *stack, + struct class_context *ctx)); + static char *get_class_name PARAMS ((void)); static void report_class_declaration PARAMS ((const char *)); static void report_main_declaration PARAMS ((struct method_declarator *)); static void push_class_context PARAMS ((const char *)); *************** void report PARAMS ((void)); *** 352,513 **** #include "lex.h" #include "parse.h" ! ! /* Enabling traces. */ ! #ifndef YYDEBUG ! # define YYDEBUG 1 ! #endif ! ! /* Enabling verbose error messages. */ ! #ifdef YYERROR_VERBOSE ! # undef YYERROR_VERBOSE ! # define YYERROR_VERBOSE 1 ! #else ! # define YYERROR_VERBOSE 0 ! #endif ! ! #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) ! #line 113 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! typedef union YYSTYPE { char *node; struct method_declarator *declarator; int value; /* For modifiers */ ! } YYSTYPE; ! /* Line 191 of yacc.c. */ ! #line 377 "ps2505.c" ! # define yystype YYSTYPE /* obsolescent; will be withdrawn */ ! # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 #endif ! ! ! /* Copy the second part of user declarations. */ ! #line 119 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" #include "lex.c" ! ! ! /* Line 214 of yacc.c. */ ! #line 392 "ps2505.c" ! ! #if ! defined (yyoverflow) || YYERROR_VERBOSE ! ! /* The parser invokes alloca or malloc; define the necessary symbols. */ ! ! # if YYSTACK_USE_ALLOCA ! # define YYSTACK_ALLOC alloca ! # else ! # ifndef YYSTACK_USE_ALLOCA ! # if defined (alloca) || defined (_ALLOCA_H) ! # define YYSTACK_ALLOC alloca ! # else ! # ifdef __GNUC__ ! # define YYSTACK_ALLOC __builtin_alloca ! # endif ! # endif ! # endif ! # endif ! ! # ifdef YYSTACK_ALLOC ! /* Pacify GCC's `empty if-body' warning. */ ! # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) ! # else ! # if defined (__STDC__) || defined (__cplusplus) ! # include /* INFRINGES ON USER NAME SPACE */ ! # define YYSIZE_T size_t ! # endif ! # define YYSTACK_ALLOC malloc ! # define YYSTACK_FREE free ! # endif ! #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ ! ! ! #if (! defined (yyoverflow) \ ! && (! defined (__cplusplus) \ ! || (YYSTYPE_IS_TRIVIAL))) ! ! /* A type that is properly aligned for any stack member. */ ! union yyalloc ! { ! short yyss; ! YYSTYPE yyvs; ! }; ! ! /* The size of the maximum gap between one aligned stack and the next. */ ! # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) ! ! /* The size of an array large to enough to hold all stacks, each with ! N elements. */ ! # define YYSTACK_BYTES(N) \ ! ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ ! + YYSTACK_GAP_MAXIMUM) ! ! /* Copy COUNT objects from FROM to TO. The source and destination do ! not overlap. */ ! # ifndef YYCOPY ! # if 1 < __GNUC__ ! # define YYCOPY(To, From, Count) \ ! __builtin_memcpy (To, From, (Count) * sizeof (*(From))) ! # else ! # define YYCOPY(To, From, Count) \ ! do \ ! { \ ! register YYSIZE_T yyi; \ ! for (yyi = 0; yyi < (Count); yyi++) \ ! (To)[yyi] = (From)[yyi]; \ ! } \ ! while (0) ! # endif ! # endif ! ! /* Relocate STACK from its old location to the new one. The ! local variables YYSIZE and YYSTACKSIZE give the old and new number of ! elements in the stack, and YYPTR gives the new location of the ! stack. Advance YYPTR to a properly aligned location for the next ! stack. */ ! # define YYSTACK_RELOCATE(Stack) \ ! do \ ! { \ ! YYSIZE_T yynewbytes; \ ! YYCOPY (&yyptr->Stack, Stack, yysize); \ ! Stack = &yyptr->Stack; \ ! yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ ! yyptr += yynewbytes / sizeof (*yyptr); \ ! } \ ! while (0) ! #endif - #if defined (__STDC__) || defined (__cplusplus) - typedef signed char yysigned_char; - #else - typedef short yysigned_char; - #endif - /* YYFINAL -- State number of the termination state. */ - #define YYFINAL 28 - /* YYLAST -- Last index in YYTABLE. */ - #define YYLAST 3238 ! /* YYNTOKENS -- Number of terminals. */ ! #define YYNTOKENS 111 ! /* YYNNTS -- Number of nonterminals. */ ! #define YYNNTS 152 ! /* YYNRULES -- Number of rules. */ ! #define YYNRULES 351 ! /* YYNRULES -- Number of states. */ ! #define YYNSTATES 606 ! ! /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ ! #define YYUNDEFTOK 2 ! #define YYMAXUTOK 365 ! #define YYTRANSLATE(YYX) \ ! ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) ! /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ ! static const unsigned char yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, --- 207,242 ---- #include "lex.h" #include "parse.h" ! #line 131 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! #ifndef YYSTYPE ! typedef union { char *node; struct method_declarator *declarator; int value; /* For modifiers */ ! } yystype; ! # define YYSTYPE yystype # define YYSTYPE_IS_TRIVIAL 1 #endif + #line 137 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! extern int flag_assert; #include "lex.c" ! #ifndef YYDEBUG ! # define YYDEBUG 1 #endif ! #define YYFINAL 616 ! #define YYFLAG -32768 ! #define YYNTBASE 112 ! /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */ ! #define YYTRANSLATE(x) ((unsigned)(x) <= 365 ? yytranslate[x] : 265) ! /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */ ! static const char yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, *************** static const unsigned char yytranslate[] *** 534,763 **** 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, ! 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, ! 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, ! 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, ! 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, ! 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, ! 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, ! 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ! 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, ! 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, ! 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, ! 105, 106, 107, 108, 109, 110 }; #if YYDEBUG ! /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in ! YYRHS. */ ! static const unsigned short yyprhs[] = { ! 0, 0, 3, 5, 7, 9, 11, 13, 15, 17, ! 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, ! 40, 43, 45, 47, 49, 53, 55, 56, 58, 60, ! 62, 65, 68, 71, 75, 77, 80, 82, 85, 89, ! 91, 93, 97, 103, 105, 107, 109, 111, 114, 115, ! 123, 124, 131, 132, 135, 136, 139, 141, 145, 148, ! 152, 154, 157, 159, 161, 163, 165, 167, 169, 171, ! 173, 175, 179, 184, 186, 190, 192, 196, 198, 202, ! 204, 206, 209, 213, 217, 222, 227, 231, 236, 240, ! 242, 246, 249, 253, 254, 257, 259, 263, 265, 267, ! 270, 272, 276, 281, 286, 292, 296, 301, 304, 308, ! 312, 317, 322, 328, 336, 343, 345, 347, 348, 353, ! 354, 360, 361, 367, 368, 375, 378, 382, 385, 389, ! 391, 394, 396, 398, 400, 402, 404, 407, 410, 414, ! 418, 423, 425, 429, 432, 436, 438, 441, 443, 445, ! 447, 450, 453, 457, 459, 461, 463, 465, 467, 469, ! 471, 473, 475, 477, 479, 481, 483, 485, 487, 489, ! 491, 493, 495, 497, 499, 501, 503, 506, 509, 512, ! 515, 517, 519, 521, 523, 525, 527, 529, 535, 543, ! 551, 557, 560, 564, 568, 573, 575, 578, 581, 583, ! 586, 590, 593, 598, 601, 604, 606, 614, 622, 629, ! 637, 644, 647, 650, 651, 653, 655, 656, 658, 660, ! 664, 667, 671, 674, 678, 681, 685, 689, 695, 701, ! 703, 707, 711, 716, 718, 721, 727, 730, 732, 734, ! 736, 738, 742, 744, 746, 748, 750, 752, 756, 760, ! 764, 768, 772, 778, 783, 785, 790, 796, 802, 809, ! 810, 817, 818, 826, 830, 834, 836, 840, 844, 848, ! 852, 857, 862, 867, 872, 874, 877, 881, 884, 888, ! 892, 896, 900, 905, 911, 918, 924, 931, 936, 941, ! 943, 945, 947, 949, 952, 955, 957, 959, 962, 965, ! 967, 970, 973, 975, 978, 981, 983, 989, 994, 999, ! 1005, 1007, 1011, 1015, 1019, 1021, 1025, 1029, 1031, 1035, ! 1039, 1043, 1045, 1049, 1053, 1057, 1061, 1065, 1067, 1071, ! 1075, 1077, 1081, 1083, 1087, 1089, 1093, 1095, 1099, 1101, ! 1105, 1107, 1113, 1115, 1117, 1121, 1123, 1125, 1127, 1129, ! 1131, 1133 }; - - /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const short yyrhs[] = { ! 112, 0, -1, 125, -1, 105, -1, 106, -1, 109, ! -1, 104, -1, 103, -1, 110, -1, 115, -1, 116, ! -1, 83, -1, 86, -1, 51, -1, 117, -1, 120, ! -1, 121, -1, 117, -1, 117, -1, 115, 234, -1, ! 121, 234, -1, 122, -1, 123, -1, 124, -1, 121, ! 102, 124, -1, 87, -1, -1, 128, -1, 126, -1, ! 127, -1, 128, 126, -1, 128, 127, -1, 126, 127, ! -1, 128, 126, 127, -1, 129, -1, 126, 129, -1, ! 132, -1, 127, 132, -1, 76, 121, 100, -1, 130, ! -1, 131, -1, 56, 121, 100, -1, 56, 121, 102, ! 5, 100, -1, 134, -1, 164, -1, 185, -1, 44, ! -1, 133, 44, -1, -1, 133, 68, 124, 137, 138, ! 135, 140, -1, -1, 68, 124, 137, 138, 136, 140, ! -1, -1, 64, 118, -1, -1, 53, 139, -1, 119, ! -1, 139, 101, 119, -1, 96, 97, -1, 96, 141, ! 97, -1, 142, -1, 141, 142, -1, 143, -1, 157, ! -1, 159, -1, 177, -1, 144, -1, 149, -1, 134, ! -1, 164, -1, 185, -1, 114, 145, 100, -1, 133, ! 114, 145, 100, -1, 146, -1, 145, 101, 146, -1, ! 147, -1, 147, 93, 148, -1, 124, -1, 147, 98, ! 99, -1, 261, -1, 175, -1, 150, 156, -1, 114, ! 151, 154, -1, 60, 151, 154, -1, 133, 114, 151, ! 154, -1, 133, 60, 151, 154, -1, 124, 94, 95, ! -1, 124, 94, 152, 95, -1, 151, 98, 99, -1, ! 153, -1, 152, 101, 153, -1, 114, 147, -1, 133, ! 114, 147, -1, -1, 54, 155, -1, 118, -1, 155, ! 101, 118, -1, 177, -1, 100, -1, 158, 177, -1, ! 44, -1, 160, 154, 161, -1, 133, 160, 154, 161, ! -1, 160, 154, 161, 100, -1, 133, 160, 154, 161, ! 100, -1, 122, 94, 95, -1, 122, 94, 152, 95, ! -1, 96, 97, -1, 96, 162, 97, -1, 96, 178, ! 97, -1, 96, 162, 178, 97, -1, 163, 94, 95, ! 100, -1, 163, 94, 230, 95, 100, -1, 121, 102, ! 66, 94, 230, 95, 100, -1, 121, 102, 66, 94, ! 95, 100, -1, 77, -1, 66, -1, -1, 62, 124, ! 165, 170, -1, -1, 133, 62, 124, 166, 170, -1, ! -1, 62, 124, 169, 167, 170, -1, -1, 133, 62, ! 124, 169, 168, 170, -1, 64, 119, -1, 169, 101, ! 119, -1, 96, 97, -1, 96, 171, 97, -1, 172, ! -1, 171, 172, -1, 173, -1, 174, -1, 134, -1, ! 164, -1, 144, -1, 150, 100, -1, 96, 97, -1, ! 96, 176, 97, -1, 96, 101, 97, -1, 96, 176, ! 101, 97, -1, 148, -1, 176, 101, 148, -1, 96, ! 97, -1, 96, 178, 97, -1, 179, -1, 178, 179, ! -1, 180, -1, 182, -1, 134, -1, 181, 100, -1, ! 114, 145, -1, 133, 114, 145, -1, 184, -1, 187, ! -1, 191, -1, 192, -1, 201, -1, 205, -1, 184, ! -1, 188, -1, 193, -1, 202, -1, 206, -1, 177, ! -1, 185, -1, 189, -1, 194, -1, 204, -1, 212, ! -1, 213, -1, 214, -1, 216, -1, 215, -1, 218, ! -1, 100, -1, 124, 89, -1, 186, 182, -1, 186, ! 183, -1, 190, 100, -1, 258, -1, 242, -1, 243, ! -1, 239, -1, 240, -1, 236, -1, 225, -1, 49, ! 94, 261, 95, 182, -1, 49, 94, 261, 95, 183, ! 57, 182, -1, 49, 94, 261, 95, 183, 57, 183, ! -1, 69, 94, 261, 95, 195, -1, 96, 97, -1, ! 96, 198, 97, -1, 96, 196, 97, -1, 96, 196, ! 198, 97, -1, 197, -1, 196, 197, -1, 198, 178, ! -1, 199, -1, 198, 199, -1, 63, 262, 89, -1, ! 48, 89, -1, 67, 94, 261, 95, -1, 200, 182, ! -1, 200, 183, -1, 52, -1, 203, 182, 67, 94, ! 261, 95, 100, -1, 208, 100, 261, 100, 210, 95, ! 182, -1, 208, 100, 100, 210, 95, 182, -1, 208, ! 100, 261, 100, 210, 95, 183, -1, 208, 100, 100, ! 210, 95, 183, -1, 72, 94, -1, 207, 209, -1, ! -1, 211, -1, 181, -1, -1, 211, -1, 190, -1, ! 211, 101, 190, -1, 55, 100, -1, 55, 124, 100, ! -1, 74, 100, -1, 74, 124, 100, -1, 59, 100, ! -1, 59, 261, 100, -1, 50, 261, 100, -1, 217, ! 94, 261, 95, 177, -1, 217, 94, 261, 95, 1, ! -1, 44, -1, 71, 177, 219, -1, 71, 177, 221, ! -1, 71, 177, 219, 221, -1, 220, -1, 219, 220, ! -1, 61, 94, 153, 95, 177, -1, 65, 177, -1, ! 223, -1, 231, -1, 113, -1, 77, -1, 94, 261, ! 95, -1, 225, -1, 235, -1, 236, -1, 237, -1, ! 224, -1, 121, 102, 77, -1, 121, 102, 68, -1, ! 120, 102, 68, -1, 115, 102, 68, -1, 60, 102, ! 68, -1, 73, 118, 94, 230, 95, -1, 73, 118, ! 94, 95, -1, 226, -1, 229, 124, 94, 95, -1, ! 229, 124, 94, 95, 140, -1, 229, 124, 94, 230, ! 95, -1, 229, 124, 94, 230, 95, 140, -1, -1, ! 73, 118, 94, 95, 227, 140, -1, -1, 73, 118, ! 94, 230, 95, 228, 140, -1, 121, 102, 73, -1, ! 222, 102, 73, -1, 261, -1, 230, 101, 261, -1, ! 230, 101, 1, -1, 73, 115, 232, -1, 73, 117, ! 232, -1, 73, 115, 232, 234, -1, 73, 117, 232, ! 234, -1, 73, 117, 234, 175, -1, 73, 115, 234, ! 175, -1, 233, -1, 232, 233, -1, 98, 261, 99, ! -1, 98, 99, -1, 234, 98, 99, -1, 222, 102, ! 124, -1, 66, 102, 124, -1, 121, 94, 95, -1, ! 121, 94, 230, 95, -1, 222, 102, 124, 94, 95, ! -1, 222, 102, 124, 94, 230, 95, -1, 66, 102, ! 124, 94, 95, -1, 66, 102, 124, 94, 230, 95, ! -1, 121, 98, 261, 99, -1, 223, 98, 261, 99, ! -1, 222, -1, 121, -1, 239, -1, 240, -1, 238, ! 47, -1, 238, 46, -1, 242, -1, 243, -1, 3, ! 241, -1, 4, 241, -1, 244, -1, 47, 241, -1, ! 46, 241, -1, 238, -1, 90, 241, -1, 91, 241, ! -1, 245, -1, 94, 115, 234, 95, 241, -1, 94, ! 115, 95, 241, -1, 94, 261, 95, 244, -1, 94, ! 121, 234, 95, 244, -1, 241, -1, 246, 5, 241, ! -1, 246, 6, 241, -1, 246, 7, 241, -1, 246, ! -1, 247, 3, 246, -1, 247, 4, 246, -1, 247, ! -1, 248, 8, 247, -1, 248, 9, 247, -1, 248, ! 10, 247, -1, 248, -1, 249, 20, 248, -1, 249, ! 18, 248, -1, 249, 21, 248, -1, 249, 19, 248, ! -1, 249, 58, 116, -1, 249, -1, 250, 16, 249, ! -1, 250, 17, 249, -1, 250, -1, 251, 11, 250, ! -1, 251, -1, 252, 12, 251, -1, 252, -1, 253, ! 13, 252, -1, 253, -1, 254, 14, 253, -1, 254, ! -1, 255, 15, 254, -1, 255, -1, 255, 88, 261, ! 89, 256, -1, 256, -1, 258, -1, 259, 260, 257, ! -1, 121, -1, 235, -1, 237, -1, 92, -1, 93, ! -1, 257, -1, 261, -1 }; ! /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ ! static const unsigned short yyrline[] = { ! 0, 190, 190, 195, 196, 197, 198, 199, 200, 205, ! 206, 210, 215, 220, 228, 229, 233, 237, 241, 245, ! 250, 259, 260, 264, 268, 275, 279, 280, 281, 282, ! 283, 284, 285, 286, 290, 291, 295, 296, 300, 305, ! 306, 310, 314, 318, 319, 320, 327, 335, 348, 347, ! 354, 353, 358, 359, 362, 363, 367, 369, 374, 376, ! 381, 382, 386, 387, 388, 389, 393, 394, 395, 396, ! 397, 402, 404, 410, 411, 415, 416, 420, 422, 427, ! 428, 433, 437, 439, 440, 442, 450, 456, 462, 466, ! 467, 474, 489, 505, 506, 510, 512, 517, 518, 523, ! 527, 537, 538, 541, 543, 550, 552, 557, 558, 559, ! 560, 565, 566, 569, 571, 576, 577, 584, 583, 587, ! 586, 590, 589, 593, 592, 598, 599, 603, 605, 610, ! 611, 615, 616, 617, 618, 622, 626, 631, 632, 633, ! 634, 638, 639, 644, 645, 649, 650, 654, 655, 656, ! 660, 664, 666, 671, 672, 673, 674, 675, 676, 680, ! 681, 682, 683, 684, 688, 689, 690, 691, 692, 693, ! 694, 695, 696, 697, 698, 702, 706, 711, 715, 721, ! 725, 726, 727, 728, 729, 730, 731, 735, 739, 744, ! 749, 753, 754, 755, 756, 760, 761, 765, 770, 771, ! 775, 776, 780, 784, 788, 792, 796, 801, 802, 806, ! 807, 811, 815, 817, 818, 819, 822, 823, 827, 828, ! 832, 833, 839, 840, 844, 845, 849, 853, 854, 858, ! 863, 864, 865, 869, 870, 874, 878, 883, 884, 888, ! 889, 890, 891, 892, 893, 894, 895, 899, 904, 906, ! 908, 910, 915, 916, 917, 918, 919, 920, 921, 926, ! 925, 929, 928, 934, 936, 940, 941, 942, 946, 947, ! 948, 949, 952, 953, 957, 958, 962, 966, 968, 973, ! 974, 981, 983, 985, 986, 987, 988, 992, 994, 998, ! 999, 1001, 1002, 1006, 1010, 1014, 1015, 1016, 1017, 1018, ! 1022, 1026, 1030, 1031, 1032, 1033, 1037, 1038, 1039, 1040, ! 1044, 1045, 1046, 1047, 1051, 1052, 1053, 1057, 1058, 1059, ! 1060, 1064, 1065, 1066, 1067, 1068, 1069, 1073, 1074, 1075, ! 1079, 1080, 1084, 1085, 1089, 1090, 1094, 1095, 1100, 1101, ! 1106, 1107, 1112, 1113, 1117, 1121, 1123, 1124, 1128, 1129, ! 1133, 1137 }; #endif ! #if YYDEBUG || YYERROR_VERBOSE ! /* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. ! First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { ! "$end", "error", "$undefined", "PLUS_TK", "MINUS_TK", "MULT_TK", "DIV_TK", "REM_TK", "LS_TK", "SRS_TK", "ZRS_TK", "AND_TK", "XOR_TK", "OR_TK", "BOOL_AND_TK", "BOOL_OR_TK", "EQ_TK", "NEQ_TK", "GT_TK", "GTE_TK", "LT_TK", "LTE_TK", "PLUS_ASSIGN_TK", "MINUS_ASSIGN_TK", --- 263,494 ---- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 1, 3, 4, 5, ! 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ! 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, ! 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, ! 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, ! 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, ! 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, ! 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, ! 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, ! 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, ! 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, ! 106, 107, 108, 109, 110, 111 }; #if YYDEBUG ! static const short yyprhs[] = { ! 0, 0, 2, 4, 6, 8, 10, 12, 14, 16, ! 18, 20, 22, 24, 26, 28, 30, 32, 34, 37, ! 40, 42, 44, 46, 50, 52, 53, 55, 57, 59, ! 62, 65, 68, 72, 74, 77, 79, 82, 86, 88, ! 90, 94, 100, 102, 104, 106, 108, 111, 112, 120, ! 121, 128, 129, 132, 133, 136, 138, 142, 145, 149, ! 151, 154, 156, 158, 160, 162, 164, 166, 168, 170, ! 172, 176, 181, 183, 187, 189, 193, 195, 199, 201, ! 203, 204, 208, 212, 216, 221, 226, 230, 235, 239, ! 241, 245, 248, 252, 253, 256, 258, 262, 264, 266, ! 269, 271, 275, 280, 285, 291, 295, 300, 303, 307, ! 311, 316, 321, 327, 335, 342, 344, 346, 347, 352, ! 353, 359, 360, 366, 367, 374, 377, 381, 384, 388, ! 390, 393, 395, 397, 399, 401, 403, 406, 409, 413, ! 417, 422, 424, 428, 431, 435, 437, 440, 442, 444, ! 446, 449, 452, 456, 458, 460, 462, 464, 466, 468, ! 470, 472, 474, 476, 478, 480, 482, 484, 486, 488, ! 490, 492, 494, 496, 498, 500, 502, 504, 507, 510, ! 513, 516, 518, 520, 522, 524, 526, 528, 530, 536, ! 544, 552, 558, 561, 565, 569, 574, 576, 579, 582, ! 584, 587, 591, 594, 599, 602, 605, 607, 615, 623, ! 630, 638, 645, 648, 651, 652, 654, 656, 657, 659, ! 661, 665, 668, 672, 675, 679, 682, 686, 690, 696, ! 700, 703, 707, 713, 719, 721, 725, 729, 734, 736, ! 739, 745, 748, 750, 752, 754, 756, 760, 762, 764, ! 766, 768, 770, 774, 778, 782, 786, 790, 796, 801, ! 803, 808, 814, 820, 827, 828, 835, 836, 844, 848, ! 852, 854, 858, 862, 866, 870, 875, 880, 885, 890, ! 892, 895, 899, 902, 906, 910, 914, 918, 923, 929, ! 936, 942, 949, 954, 959, 961, 963, 965, 967, 970, ! 973, 975, 977, 980, 983, 985, 988, 991, 993, 996, ! 999, 1001, 1007, 1012, 1017, 1023, 1025, 1029, 1033, 1037, ! 1039, 1043, 1047, 1049, 1053, 1057, 1061, 1063, 1067, 1071, ! 1075, 1079, 1083, 1085, 1089, 1093, 1095, 1099, 1101, 1105, ! 1107, 1111, 1113, 1117, 1119, 1123, 1125, 1131, 1133, 1135, ! 1139, 1141, 1143, 1145, 1147, 1149, 1151 }; static const short yyrhs[] = { ! 125, 0, 106, 0, 107, 0, 110, 0, 105, 0, ! 104, 0, 111, 0, 115, 0, 116, 0, 84, 0, ! 87, 0, 51, 0, 117, 0, 120, 0, 121, 0, ! 117, 0, 117, 0, 115, 236, 0, 121, 236, 0, ! 122, 0, 123, 0, 124, 0, 121, 103, 124, 0, ! 88, 0, 0, 128, 0, 126, 0, 127, 0, 128, ! 126, 0, 128, 127, 0, 126, 127, 0, 128, 126, ! 127, 0, 129, 0, 126, 129, 0, 132, 0, 127, ! 132, 0, 76, 121, 101, 0, 130, 0, 131, 0, ! 56, 121, 101, 0, 56, 121, 103, 5, 101, 0, ! 134, 0, 165, 0, 186, 0, 44, 0, 133, 44, ! 0, 0, 133, 68, 124, 137, 138, 135, 140, 0, ! 0, 68, 124, 137, 138, 136, 140, 0, 0, 64, ! 118, 0, 0, 53, 139, 0, 119, 0, 139, 102, ! 119, 0, 97, 98, 0, 97, 141, 98, 0, 142, ! 0, 141, 142, 0, 143, 0, 158, 0, 160, 0, ! 178, 0, 144, 0, 149, 0, 134, 0, 165, 0, ! 186, 0, 114, 145, 101, 0, 133, 114, 145, 101, ! 0, 146, 0, 145, 102, 146, 0, 147, 0, 147, ! 94, 148, 0, 124, 0, 147, 99, 100, 0, 263, ! 0, 176, 0, 0, 151, 150, 157, 0, 114, 152, ! 155, 0, 60, 152, 155, 0, 133, 114, 152, 155, ! 0, 133, 60, 152, 155, 0, 124, 95, 96, 0, ! 124, 95, 153, 96, 0, 152, 99, 100, 0, 154, ! 0, 153, 102, 154, 0, 114, 147, 0, 133, 114, ! 147, 0, 0, 54, 156, 0, 118, 0, 156, 102, ! 118, 0, 178, 0, 101, 0, 159, 178, 0, 44, ! 0, 161, 155, 162, 0, 133, 161, 155, 162, 0, ! 161, 155, 162, 101, 0, 133, 161, 155, 162, 101, ! 0, 122, 95, 96, 0, 122, 95, 153, 96, 0, ! 97, 98, 0, 97, 163, 98, 0, 97, 179, 98, ! 0, 97, 163, 179, 98, 0, 164, 95, 96, 101, ! 0, 164, 95, 232, 96, 101, 0, 121, 103, 66, ! 95, 232, 96, 101, 0, 121, 103, 66, 95, 96, ! 101, 0, 77, 0, 66, 0, 0, 62, 124, 166, ! 171, 0, 0, 133, 62, 124, 167, 171, 0, 0, ! 62, 124, 170, 168, 171, 0, 0, 133, 62, 124, ! 170, 169, 171, 0, 64, 119, 0, 170, 102, 119, ! 0, 97, 98, 0, 97, 172, 98, 0, 173, 0, ! 172, 173, 0, 174, 0, 175, 0, 134, 0, 165, ! 0, 144, 0, 151, 101, 0, 97, 98, 0, 97, ! 177, 98, 0, 97, 102, 98, 0, 97, 177, 102, ! 98, 0, 148, 0, 177, 102, 148, 0, 97, 98, ! 0, 97, 179, 98, 0, 180, 0, 179, 180, 0, ! 181, 0, 183, 0, 134, 0, 182, 101, 0, 114, ! 145, 0, 133, 114, 145, 0, 185, 0, 188, 0, ! 192, 0, 193, 0, 202, 0, 206, 0, 185, 0, ! 189, 0, 194, 0, 203, 0, 207, 0, 178, 0, ! 186, 0, 190, 0, 195, 0, 205, 0, 213, 0, ! 214, 0, 215, 0, 218, 0, 216, 0, 220, 0, ! 217, 0, 101, 0, 124, 90, 0, 187, 183, 0, ! 187, 184, 0, 191, 101, 0, 260, 0, 244, 0, ! 245, 0, 241, 0, 242, 0, 238, 0, 227, 0, ! 49, 95, 263, 96, 183, 0, 49, 95, 263, 96, ! 184, 57, 183, 0, 49, 95, 263, 96, 184, 57, ! 184, 0, 69, 95, 263, 96, 196, 0, 97, 98, ! 0, 97, 199, 98, 0, 97, 197, 98, 0, 97, ! 197, 199, 98, 0, 198, 0, 197, 198, 0, 199, ! 179, 0, 200, 0, 199, 200, 0, 63, 264, 90, ! 0, 48, 90, 0, 67, 95, 263, 96, 0, 201, ! 183, 0, 201, 184, 0, 52, 0, 204, 183, 67, ! 95, 263, 96, 101, 0, 209, 101, 263, 101, 211, ! 96, 183, 0, 209, 101, 101, 211, 96, 183, 0, ! 209, 101, 263, 101, 211, 96, 184, 0, 209, 101, ! 101, 211, 96, 184, 0, 72, 95, 0, 208, 210, ! 0, 0, 212, 0, 182, 0, 0, 212, 0, 191, ! 0, 212, 102, 191, 0, 55, 101, 0, 55, 124, ! 101, 0, 74, 101, 0, 74, 124, 101, 0, 59, ! 101, 0, 59, 263, 101, 0, 50, 263, 101, 0, ! 78, 263, 90, 263, 101, 0, 78, 263, 101, 0, ! 78, 1, 0, 78, 263, 1, 0, 219, 95, 263, ! 96, 178, 0, 219, 95, 263, 96, 1, 0, 44, ! 0, 71, 178, 221, 0, 71, 178, 223, 0, 71, ! 178, 221, 223, 0, 222, 0, 221, 222, 0, 61, ! 95, 154, 96, 178, 0, 65, 178, 0, 225, 0, ! 233, 0, 113, 0, 77, 0, 95, 263, 96, 0, ! 227, 0, 237, 0, 238, 0, 239, 0, 226, 0, ! 121, 103, 77, 0, 121, 103, 68, 0, 120, 103, ! 68, 0, 115, 103, 68, 0, 60, 103, 68, 0, ! 73, 118, 95, 232, 96, 0, 73, 118, 95, 96, ! 0, 228, 0, 231, 124, 95, 96, 0, 231, 124, ! 95, 96, 140, 0, 231, 124, 95, 232, 96, 0, ! 231, 124, 95, 232, 96, 140, 0, 0, 73, 118, ! 95, 96, 229, 140, 0, 0, 73, 118, 95, 232, ! 96, 230, 140, 0, 121, 103, 73, 0, 224, 103, ! 73, 0, 263, 0, 232, 102, 263, 0, 232, 102, ! 1, 0, 73, 115, 234, 0, 73, 117, 234, 0, ! 73, 115, 234, 236, 0, 73, 117, 234, 236, 0, ! 73, 117, 236, 176, 0, 73, 115, 236, 176, 0, ! 235, 0, 234, 235, 0, 99, 263, 100, 0, 99, ! 100, 0, 236, 99, 100, 0, 224, 103, 124, 0, ! 66, 103, 124, 0, 121, 95, 96, 0, 121, 95, ! 232, 96, 0, 224, 103, 124, 95, 96, 0, 224, ! 103, 124, 95, 232, 96, 0, 66, 103, 124, 95, ! 96, 0, 66, 103, 124, 95, 232, 96, 0, 121, ! 99, 263, 100, 0, 225, 99, 263, 100, 0, 224, ! 0, 121, 0, 241, 0, 242, 0, 240, 47, 0, ! 240, 46, 0, 244, 0, 245, 0, 3, 243, 0, ! 4, 243, 0, 246, 0, 47, 243, 0, 46, 243, ! 0, 240, 0, 91, 243, 0, 92, 243, 0, 247, ! 0, 95, 115, 236, 96, 243, 0, 95, 115, 96, ! 243, 0, 95, 263, 96, 246, 0, 95, 121, 236, ! 96, 246, 0, 243, 0, 248, 5, 243, 0, 248, ! 6, 243, 0, 248, 7, 243, 0, 248, 0, 249, ! 3, 248, 0, 249, 4, 248, 0, 249, 0, 250, ! 8, 249, 0, 250, 9, 249, 0, 250, 10, 249, ! 0, 250, 0, 251, 20, 250, 0, 251, 18, 250, ! 0, 251, 21, 250, 0, 251, 19, 250, 0, 251, ! 58, 116, 0, 251, 0, 252, 16, 251, 0, 252, ! 17, 251, 0, 252, 0, 253, 11, 252, 0, 253, ! 0, 254, 12, 253, 0, 254, 0, 255, 13, 254, ! 0, 255, 0, 256, 14, 255, 0, 256, 0, 257, ! 15, 256, 0, 257, 0, 257, 89, 263, 90, 258, ! 0, 258, 0, 260, 0, 261, 262, 259, 0, 121, ! 0, 237, 0, 239, 0, 93, 0, 94, 0, 259, ! 0, 263, 0 }; ! #endif ! ! #if YYDEBUG ! /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ ! static const short yyrline[] = { ! 0, 210, 215, 217, 218, 219, 220, 221, 225, 227, ! 230, 236, 241, 248, 250, 253, 257, 261, 265, 271, ! 279, 281, 284, 288, 295, 300, 301, 302, 303, 304, ! 305, 306, 307, 310, 312, 315, 317, 320, 325, 327, ! 330, 334, 338, 340, 341, 347, 356, 367, 367, 374, ! 374, 379, 380, 383, 384, 387, 390, 394, 397, 401, ! 403, 406, 408, 409, 410, 413, 415, 416, 417, 418, ! 422, 425, 429, 432, 435, 437, 440, 443, 447, 449, ! 453, 453, 460, 463, 464, 466, 473, 480, 486, 489, ! 491, 497, 513, 529, 530, 533, 536, 540, 542, 546, ! 550, 560, 562, 565, 567, 573, 576, 580, 582, 583, ! 584, 588, 590, 593, 595, 599, 601, 606, 606, 610, ! 610, 613, 613, 616, 616, 621, 623, 626, 629, 633, ! 635, 638, 640, 641, 642, 645, 649, 654, 656, 657, ! 658, 661, 663, 667, 669, 672, 674, 677, 679, 680, ! 683, 687, 690, 694, 696, 697, 698, 699, 700, 703, ! 705, 706, 707, 708, 711, 713, 714, 715, 716, 717, ! 718, 719, 720, 721, 722, 723, 726, 730, 735, 739, ! 745, 749, 751, 752, 753, 754, 755, 756, 759, 763, ! 768, 773, 777, 779, 780, 781, 784, 786, 789, 794, ! 796, 799, 801, 804, 808, 812, 816, 820, 825, 827, ! 830, 832, 835, 839, 842, 843, 844, 847, 848, 851, ! 853, 856, 858, 863, 865, 868, 870, 873, 877, 879, ! 880, 882, 885, 887, 890, 895, 897, 898, 901, 903, ! 906, 910, 915, 917, 920, 922, 923, 924, 925, 926, ! 927, 928, 932, 936, 939, 941, 943, 947, 949, 950, ! 951, 952, 953, 954, 957, 957, 961, 961, 966, 969, ! 972, 974, 975, 978, 980, 981, 982, 985, 986, 989, ! 991, 994, 998, 1001, 1005, 1007, 1013, 1016, 1018, 1019, ! 1020, 1021, 1024, 1027, 1030, 1032, 1034, 1035, 1038, 1042, ! 1046, 1048, 1049, 1050, 1051, 1054, 1058, 1062, 1064, 1065, ! 1066, 1069, 1071, 1072, 1073, 1076, 1078, 1079, 1080, 1083, ! 1085, 1086, 1089, 1091, 1092, 1093, 1096, 1098, 1099, 1100, ! 1101, 1102, 1105, 1107, 1108, 1111, 1113, 1116, 1118, 1121, ! 1123, 1126, 1128, 1132, 1134, 1138, 1140, 1144, 1146, 1149, ! 1153, 1156, 1157, 1160, 1162, 1165, 1169 }; #endif ! ! #if (YYDEBUG) || defined YYERROR_VERBOSE ! ! /* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */ static const char *const yytname[] = { ! "$", "error", "$undefined.", "PLUS_TK", "MINUS_TK", "MULT_TK", "DIV_TK", "REM_TK", "LS_TK", "SRS_TK", "ZRS_TK", "AND_TK", "XOR_TK", "OR_TK", "BOOL_AND_TK", "BOOL_OR_TK", "EQ_TK", "NEQ_TK", "GT_TK", "GTE_TK", "LT_TK", "LTE_TK", "PLUS_ASSIGN_TK", "MINUS_ASSIGN_TK", *************** static const char *const yytname[] = *** 771,783 **** "ELSE_TK", "INSTANCEOF_TK", "RETURN_TK", "VOID_TK", "CATCH_TK", "INTERFACE_TK", "CASE_TK", "EXTENDS_TK", "FINALLY_TK", "SUPER_TK", "WHILE_TK", "CLASS_TK", "SWITCH_TK", "CONST_TK", "TRY_TK", "FOR_TK", ! "NEW_TK", "CONTINUE_TK", "GOTO_TK", "PACKAGE_TK", "THIS_TK", "BYTE_TK", ! "SHORT_TK", "INT_TK", "LONG_TK", "CHAR_TK", "INTEGRAL_TK", "FLOAT_TK", ! "DOUBLE_TK", "FP_TK", "ID_TK", "REL_QM_TK", "REL_CL_TK", "NOT_TK", ! "NEG_TK", "ASSIGN_ANY_TK", "ASSIGN_TK", "OP_TK", "CP_TK", "OCB_TK", ! "CCB_TK", "OSB_TK", "CSB_TK", "SC_TK", "C_TK", "DOT_TK", ! "STRING_LIT_TK", "CHAR_LIT_TK", "INT_LIT_TK", "FP_LIT_TK", "TRUE_TK", ! "FALSE_TK", "BOOL_LIT_TK", "NULL_TK", "$accept", "goal", "literal", "type", "primitive_type", "reference_type", "class_or_interface_type", "class_type", "interface_type", "array_type", "name", "simple_name", "qualified_name", "identifier", "compilation_unit", --- 502,514 ---- "ELSE_TK", "INSTANCEOF_TK", "RETURN_TK", "VOID_TK", "CATCH_TK", "INTERFACE_TK", "CASE_TK", "EXTENDS_TK", "FINALLY_TK", "SUPER_TK", "WHILE_TK", "CLASS_TK", "SWITCH_TK", "CONST_TK", "TRY_TK", "FOR_TK", ! "NEW_TK", "CONTINUE_TK", "GOTO_TK", "PACKAGE_TK", "THIS_TK", ! "ASSERT_TK", "BYTE_TK", "SHORT_TK", "INT_TK", "LONG_TK", "CHAR_TK", ! "INTEGRAL_TK", "FLOAT_TK", "DOUBLE_TK", "FP_TK", "ID_TK", "REL_QM_TK", ! "REL_CL_TK", "NOT_TK", "NEG_TK", "ASSIGN_ANY_TK", "ASSIGN_TK", "OP_TK", ! "CP_TK", "OCB_TK", "CCB_TK", "OSB_TK", "CSB_TK", "SC_TK", "C_TK", ! "DOT_TK", "STRING_LIT_TK", "CHAR_LIT_TK", "INT_LIT_TK", "FP_LIT_TK", ! "TRUE_TK", "FALSE_TK", "BOOL_LIT_TK", "NULL_TK", "goal", "literal", "type", "primitive_type", "reference_type", "class_or_interface_type", "class_type", "interface_type", "array_type", "name", "simple_name", "qualified_name", "identifier", "compilation_unit", *************** static const char *const yytname[] = *** 789,800 **** "class_body_declaration", "class_member_declaration", "field_declaration", "variable_declarators", "variable_declarator", "variable_declarator_id", "variable_initializer", "method_declaration", ! "method_header", "method_declarator", "formal_parameter_list", "formal_parameter", "throws", "class_type_list", "method_body", "static_initializer", "static", "constructor_declaration", "constructor_declarator", "constructor_body", "explicit_constructor_invocation", "this_or_super", ! "interface_declaration", "@3", "@4", "@5", "@6", "extends_interfaces", "interface_body", "interface_member_declarations", "interface_member_declaration", "constant_declaration", "abstract_method_declaration", "array_initializer", --- 520,531 ---- "class_body_declaration", "class_member_declaration", "field_declaration", "variable_declarators", "variable_declarator", "variable_declarator_id", "variable_initializer", "method_declaration", ! "@3", "method_header", "method_declarator", "formal_parameter_list", "formal_parameter", "throws", "class_type_list", "method_body", "static_initializer", "static", "constructor_declaration", "constructor_declarator", "constructor_body", "explicit_constructor_invocation", "this_or_super", ! "interface_declaration", "@4", "@5", "@6", "@7", "extends_interfaces", "interface_body", "interface_member_declarations", "interface_member_declaration", "constant_declaration", "abstract_method_declaration", "array_initializer", *************** static const char *const yytname[] = *** 811,821 **** "for_statement", "for_statement_nsi", "for_header", "for_begin", "for_init", "for_update", "statement_expression_list", "break_statement", "continue_statement", "return_statement", ! "throw_statement", "synchronized_statement", "synchronized", ! "try_statement", "catches", "catch_clause", "finally", "primary", ! "primary_no_new_array", "type_literals", ! "class_instance_creation_expression", "anonymous_class_creation", "@7", ! "@8", "something_dot_new", "argument_list", "array_creation_expression", "dim_exprs", "dim_expr", "dims", "field_access", "method_invocation", "array_access", "postfix_expression", "post_increment_expression", "post_decrement_expression", "unary_expression", --- 542,552 ---- "for_statement", "for_statement_nsi", "for_header", "for_begin", "for_init", "for_update", "statement_expression_list", "break_statement", "continue_statement", "return_statement", ! "throw_statement", "assert_statement", "synchronized_statement", ! "synchronized", "try_statement", "catches", "catch_clause", "finally", ! "primary", "primary_no_new_array", "type_literals", ! "class_instance_creation_expression", "anonymous_class_creation", "@8", ! "@9", "something_dot_new", "argument_list", "array_creation_expression", "dim_exprs", "dim_expr", "dims", "field_access", "method_invocation", "array_access", "postfix_expression", "post_increment_expression", "post_decrement_expression", "unary_expression", *************** static const char *const yytname[] = *** 831,909 **** }; #endif ! # ifdef YYPRINT ! /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to ! token YYLEX-NUM. */ ! static const unsigned short yytoknum[] = ! { ! 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, ! 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, ! 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, ! 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, ! 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, ! 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, ! 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, ! 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, ! 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, ! 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, ! 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, ! 365 ! }; ! # endif ! ! /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ ! static const unsigned short yyr1[] = { ! 0, 111, 112, 113, 113, 113, 113, 113, 113, 114, ! 114, 115, 115, 115, 116, 116, 117, 118, 119, 120, ! 120, 121, 121, 122, 123, 124, 125, 125, 125, 125, ! 125, 125, 125, 125, 126, 126, 127, 127, 128, 129, ! 129, 130, 131, 132, 132, 132, 133, 133, 135, 134, ! 136, 134, 137, 137, 138, 138, 139, 139, 140, 140, ! 141, 141, 142, 142, 142, 142, 143, 143, 143, 143, ! 143, 144, 144, 145, 145, 146, 146, 147, 147, 148, ! 148, 149, 150, 150, 150, 150, 151, 151, 151, 152, ! 152, 153, 153, 154, 154, 155, 155, 156, 156, 157, ! 158, 159, 159, 159, 159, 160, 160, 161, 161, 161, ! 161, 162, 162, 162, 162, 163, 163, 165, 164, 166, ! 164, 167, 164, 168, 164, 169, 169, 170, 170, 171, ! 171, 172, 172, 172, 172, 173, 174, 175, 175, 175, ! 175, 176, 176, 177, 177, 178, 178, 179, 179, 179, ! 180, 181, 181, 182, 182, 182, 182, 182, 182, 183, ! 183, 183, 183, 183, 184, 184, 184, 184, 184, 184, ! 184, 184, 184, 184, 184, 185, 186, 187, 188, 189, ! 190, 190, 190, 190, 190, 190, 190, 191, 192, 193, ! 194, 195, 195, 195, 195, 196, 196, 197, 198, 198, ! 199, 199, 200, 201, 202, 203, 204, 205, 205, 206, ! 206, 207, 208, 209, 209, 209, 210, 210, 211, 211, ! 212, 212, 213, 213, 214, 214, 215, 216, 216, 217, ! 218, 218, 218, 219, 219, 220, 221, 222, 222, 223, ! 223, 223, 223, 223, 223, 223, 223, 223, 224, 224, ! 224, 224, 225, 225, 225, 225, 225, 225, 225, 227, ! 226, 228, 226, 229, 229, 230, 230, 230, 231, 231, ! 231, 231, 231, 231, 232, 232, 233, 234, 234, 235, ! 235, 236, 236, 236, 236, 236, 236, 237, 237, 238, ! 238, 238, 238, 239, 240, 241, 241, 241, 241, 241, ! 242, 243, 244, 244, 244, 244, 245, 245, 245, 245, ! 246, 246, 246, 246, 247, 247, 247, 248, 248, 248, ! 248, 249, 249, 249, 249, 249, 249, 250, 250, 250, ! 251, 251, 252, 252, 253, 253, 254, 254, 255, 255, ! 256, 256, 257, 257, 258, 259, 259, 259, 260, 260, ! 261, 262 }; ! /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ ! static const unsigned char yyr2[] = { ! 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, ! 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, ! 2, 1, 1, 1, 3, 1, 0, 1, 1, 1, ! 2, 2, 2, 3, 1, 2, 1, 2, 3, 1, ! 1, 3, 5, 1, 1, 1, 1, 2, 0, 7, ! 0, 6, 0, 2, 0, 2, 1, 3, 2, 3, ! 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, ! 1, 3, 4, 1, 3, 1, 3, 1, 3, 1, ! 1, 2, 3, 3, 4, 4, 3, 4, 3, 1, 3, 2, 3, 0, 2, 1, 3, 1, 1, 2, 1, 3, 4, 4, 5, 3, 4, 2, 3, 3, 4, 4, 5, 7, 6, 1, 1, 0, 4, 0, --- 562,620 ---- }; #endif ! /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ ! static const short yyr1[] = { ! 0, 112, 113, 113, 113, 113, 113, 113, 114, 114, ! 115, 115, 115, 116, 116, 117, 118, 119, 120, 120, ! 121, 121, 122, 123, 124, 125, 125, 125, 125, 125, ! 125, 125, 125, 126, 126, 127, 127, 128, 129, 129, ! 130, 131, 132, 132, 132, 133, 133, 135, 134, 136, ! 134, 137, 137, 138, 138, 139, 139, 140, 140, 141, ! 141, 142, 142, 142, 142, 143, 143, 143, 143, 143, ! 144, 144, 145, 145, 146, 146, 147, 147, 148, 148, ! 150, 149, 151, 151, 151, 151, 152, 152, 152, 153, ! 153, 154, 154, 155, 155, 156, 156, 157, 157, 158, ! 159, 160, 160, 160, 160, 161, 161, 162, 162, 162, ! 162, 163, 163, 163, 163, 164, 164, 166, 165, 167, ! 165, 168, 165, 169, 165, 170, 170, 171, 171, 172, ! 172, 173, 173, 173, 173, 174, 175, 176, 176, 176, ! 176, 177, 177, 178, 178, 179, 179, 180, 180, 180, ! 181, 182, 182, 183, 183, 183, 183, 183, 183, 184, ! 184, 184, 184, 184, 185, 185, 185, 185, 185, 185, ! 185, 185, 185, 185, 185, 185, 186, 187, 188, 189, ! 190, 191, 191, 191, 191, 191, 191, 191, 192, 193, ! 194, 195, 196, 196, 196, 196, 197, 197, 198, 199, ! 199, 200, 200, 201, 202, 203, 204, 205, 206, 206, ! 207, 207, 208, 209, 210, 210, 210, 211, 211, 212, ! 212, 213, 213, 214, 214, 215, 215, 216, 217, 217, ! 217, 217, 218, 218, 219, 220, 220, 220, 221, 221, ! 222, 223, 224, 224, 225, 225, 225, 225, 225, 225, ! 225, 225, 225, 226, 226, 226, 226, 227, 227, 227, ! 227, 227, 227, 227, 229, 228, 230, 228, 231, 231, ! 232, 232, 232, 233, 233, 233, 233, 233, 233, 234, ! 234, 235, 236, 236, 237, 237, 238, 238, 238, 238, ! 238, 238, 239, 239, 240, 240, 240, 240, 241, 242, ! 243, 243, 243, 243, 243, 244, 245, 246, 246, 246, ! 246, 247, 247, 247, 247, 248, 248, 248, 248, 249, ! 249, 249, 250, 250, 250, 250, 251, 251, 251, 251, ! 251, 251, 252, 252, 252, 253, 253, 254, 254, 255, ! 255, 256, 256, 257, 257, 258, 258, 259, 259, 260, ! 261, 261, 261, 262, 262, 263, 264 }; ! /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ ! static const short yyr2[] = { ! 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, ! 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, ! 1, 1, 1, 3, 1, 0, 1, 1, 1, 2, ! 2, 2, 3, 1, 2, 1, 2, 3, 1, 1, ! 3, 5, 1, 1, 1, 1, 2, 0, 7, 0, ! 6, 0, 2, 0, 2, 1, 3, 2, 3, 1, ! 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, ! 3, 4, 1, 3, 1, 3, 1, 3, 1, 1, ! 0, 3, 3, 3, 4, 4, 3, 4, 3, 1, 3, 2, 3, 0, 2, 1, 3, 1, 1, 2, 1, 3, 4, 4, 5, 3, 4, 2, 3, 3, 4, 4, 5, 7, 6, 1, 1, 0, 4, 0, *************** static const unsigned char yyr2[] = *** 912,1844 **** 4, 1, 3, 2, 3, 1, 2, 1, 1, 1, 2, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ! 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, ! 1, 1, 1, 1, 1, 1, 1, 5, 7, 7, ! 5, 2, 3, 3, 4, 1, 2, 2, 1, 2, ! 3, 2, 4, 2, 2, 1, 7, 7, 6, 7, ! 6, 2, 2, 0, 1, 1, 0, 1, 1, 3, ! 2, 3, 2, 3, 2, 3, 3, 5, 5, 1, ! 3, 3, 4, 1, 2, 5, 2, 1, 1, 1, ! 1, 3, 1, 1, 1, 1, 1, 3, 3, 3, ! 3, 3, 5, 4, 1, 4, 5, 5, 6, 0, ! 6, 0, 7, 3, 3, 1, 3, 3, 3, 3, ! 4, 4, 4, 4, 1, 2, 3, 2, 3, 3, ! 3, 3, 4, 5, 6, 5, 6, 4, 4, 1, ! 1, 1, 1, 2, 2, 1, 1, 2, 2, 1, ! 2, 2, 1, 2, 2, 1, 5, 4, 4, 5, ! 1, 3, 3, 3, 1, 3, 3, 1, 3, 3, ! 3, 1, 3, 3, 3, 3, 3, 1, 3, 3, ! 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, ! 1, 5, 1, 1, 3, 1, 1, 1, 1, 1, ! 1, 1 }; ! /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state ! STATE-NUM when YYTABLE doesn't specify something else to do. Zero ! means the default is an error. */ ! static const unsigned short yydefact[] = { ! 26, 46, 0, 0, 0, 0, 175, 0, 2, 28, ! 29, 27, 34, 39, 40, 36, 0, 43, 44, 45, ! 25, 0, 21, 22, 23, 117, 52, 0, 1, 32, ! 35, 37, 30, 31, 47, 0, 0, 41, 0, 0, ! 0, 121, 0, 54, 38, 0, 33, 119, 52, 0, ! 24, 18, 125, 16, 0, 118, 0, 0, 17, 53, ! 0, 50, 0, 123, 54, 42, 13, 0, 11, 12, ! 127, 0, 9, 10, 14, 15, 16, 0, 133, 135, ! 0, 134, 0, 129, 131, 132, 126, 122, 56, 55, ! 0, 120, 0, 48, 0, 93, 77, 0, 73, 75, ! 93, 0, 19, 20, 0, 0, 136, 128, 130, 0, ! 0, 51, 124, 0, 0, 0, 0, 83, 71, 0, ! 0, 0, 82, 277, 0, 93, 0, 93, 57, 46, ! 0, 58, 21, 0, 68, 0, 60, 62, 66, 67, ! 0, 63, 0, 64, 93, 69, 65, 70, 49, 86, ! 0, 0, 0, 89, 95, 94, 88, 77, 74, 0, ! 0, 0, 0, 0, 0, 0, 240, 0, 0, 0, ! 0, 7, 6, 3, 4, 5, 8, 239, 0, 0, ! 290, 76, 80, 289, 237, 246, 242, 254, 0, 238, ! 243, 244, 245, 302, 291, 292, 310, 295, 296, 299, ! 305, 314, 317, 321, 327, 330, 332, 334, 336, 338, ! 340, 342, 350, 343, 0, 79, 78, 278, 85, 72, ! 84, 46, 0, 0, 205, 0, 0, 0, 0, 0, ! 0, 0, 0, 143, 0, 9, 15, 290, 23, 0, ! 149, 164, 0, 145, 147, 0, 148, 153, 165, 0, ! 154, 166, 0, 155, 156, 167, 0, 157, 0, 168, ! 158, 213, 0, 169, 170, 171, 173, 172, 0, 174, ! 242, 244, 0, 183, 184, 181, 182, 180, 0, 93, ! 59, 61, 98, 81, 97, 99, 0, 91, 0, 87, ! 0, 0, 290, 243, 245, 297, 298, 301, 300, 0, ! 0, 0, 17, 0, 303, 304, 0, 290, 0, 137, ! 0, 141, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 294, 293, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 348, 349, 0, 0, 0, 220, ! 0, 224, 0, 0, 0, 0, 211, 222, 0, 0, ! 151, 176, 0, 144, 146, 150, 229, 177, 179, 203, ! 0, 0, 215, 218, 212, 214, 0, 0, 105, 0, ! 0, 0, 101, 92, 90, 96, 251, 280, 0, 268, ! 274, 0, 269, 0, 0, 0, 19, 20, 241, 139, ! 138, 0, 250, 249, 281, 0, 265, 0, 248, 263, ! 247, 264, 279, 0, 0, 311, 312, 313, 315, 316, ! 318, 319, 320, 323, 325, 322, 324, 0, 326, 328, ! 329, 331, 333, 335, 337, 339, 0, 344, 0, 226, ! 221, 225, 0, 0, 0, 0, 230, 233, 231, 223, ! 241, 152, 0, 0, 216, 0, 0, 106, 102, 116, ! 240, 107, 290, 0, 0, 0, 103, 0, 0, 275, ! 270, 273, 271, 272, 253, 0, 307, 0, 0, 308, ! 140, 142, 282, 0, 287, 0, 288, 255, 0, 0, ! 0, 202, 0, 0, 236, 234, 232, 0, 219, 0, ! 217, 216, 0, 104, 0, 108, 0, 0, 109, 285, ! 0, 276, 0, 252, 306, 309, 267, 266, 283, 0, ! 256, 257, 341, 0, 187, 0, 153, 0, 160, 161, ! 0, 162, 163, 0, 0, 190, 0, 0, 0, 0, ! 228, 227, 0, 110, 0, 0, 286, 260, 0, 284, ! 258, 0, 0, 178, 204, 0, 0, 0, 191, 0, ! 195, 0, 198, 0, 0, 208, 0, 0, 111, 0, ! 262, 0, 188, 216, 0, 201, 351, 0, 193, 196, ! 0, 192, 197, 199, 235, 206, 207, 0, 0, 112, ! 0, 0, 216, 200, 194, 114, 0, 0, 0, 0, ! 113, 0, 210, 0, 189, 209 }; - /* YYDEFGOTO[NTERM-NUM]. */ static const short yydefgoto[] = { ! -1, 7, 177, 234, 178, 73, 74, 59, 52, 179, ! 180, 22, 23, 24, 8, 9, 10, 11, 12, 13, ! 14, 15, 239, 240, 113, 90, 43, 61, 89, 111, ! 135, 136, 137, 79, 97, 98, 99, 181, 139, 80, ! 95, 152, 153, 117, 155, 283, 141, 142, 143, 144, ! 382, 463, 464, 18, 40, 62, 57, 92, 41, 55, ! 82, 83, 84, 85, 182, 312, 241, 582, 243, 244, ! 245, 246, 525, 247, 248, 249, 250, 528, 251, 252, ! 253, 254, 529, 255, 535, 559, 560, 561, 562, 256, ! 257, 531, 258, 259, 260, 532, 261, 262, 374, 499, ! 500, 263, 264, 265, 266, 267, 268, 269, 446, 447, ! 448, 183, 184, 185, 186, 187, 512, 548, 188, 405, ! 189, 389, 390, 103, 190, 191, 192, 193, 194, 195, ! 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, ! 206, 207, 208, 209, 210, 211, 212, 213, 214, 346, ! 406, 577 }; - /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ - #define YYPACT_NINF -489 static const short yypact[] = { ! 55, -489, -68, -68, -68, -68, -489, 61, -489, -22, ! 100, -22, -489, -489, -489, -489, 104, -489, -489, -489, ! -489, 191, -489, -489, -489, 77, 114, 203, -489, 100, ! -489, -489, -22, 100, -489, -68, -68, -489, 4, -68, ! -25, 87, -68, 65, -489, -68, 100, 77, 114, 121, ! -489, -489, -489, 97, 303, -489, -68, -25, -489, -489, ! -68, -489, -25, 87, 65, -489, -489, -68, -489, -489, ! -489, -68, 116, -489, -489, -489, 190, 451, -489, -489, ! 132, -489, 431, -489, -489, -489, -489, -489, -489, 136, ! 149, -489, -25, -489, 196, -39, 196, 6, -489, 36, ! -39, 223, 204, 204, -68, -68, -489, -489, -489, -68, ! 542, -489, -489, 149, 224, -68, 263, -489, -489, -68, ! 1668, 270, -489, -489, 285, -39, 159, -39, -489, 229, ! 2541, -489, 340, 451, -489, 674, -489, -489, -489, -489, ! 238, -489, 343, -489, 394, -489, -489, -489, -489, -489, ! -68, 84, 139, -489, -489, 296, -489, -489, -489, 2340, ! 2340, 2340, 2340, 356, 368, 143, -489, 2340, 2340, 2340, ! 1541, -489, -489, -489, -489, -489, -489, -489, 237, 371, ! 645, -489, -489, 392, 383, -489, -489, -489, -68, -489, ! 188, -489, 300, 379, -489, -489, -489, -489, -489, -489, ! -489, 461, 475, 488, 425, 490, 489, 500, 502, 509, ! 9, -489, -489, -489, 429, -489, -489, -489, -489, -489, ! -489, 442, 445, 2340, -489, 89, 1719, 449, 452, 343, ! 454, 119, 2340, -489, -68, 237, 371, 283, 436, 265, ! -489, -489, 2608, -489, -489, 450, -489, -489, -489, 3010, ! -489, -489, 457, -489, -489, -489, 3010, -489, 3010, -489, ! -489, 3128, 464, -489, -489, -489, -489, -489, 458, -489, ! 169, 217, 379, 521, 526, -489, -489, -489, 245, 394, ! -489, -489, -489, -489, -489, -489, 473, 483, -68, -489, ! 344, -68, 338, -489, -489, -489, -489, -489, -489, 514, ! -68, 494, 494, 505, -489, -489, 118, 645, 506, -489, ! 510, -489, 256, 538, 540, 1780, 1831, 493, 96, 2340, ! 515, -489, -489, 2340, 2340, 2340, 2340, 2340, 2340, 2340, ! 2340, 2340, 2340, 2340, 2340, 143, 2340, 2340, 2340, 2340, ! 2340, 2340, 2340, 2340, -489, -489, 2340, 2340, 511, -489, ! 512, -489, 513, 2340, 2340, 318, -489, -489, 519, 525, ! 520, -489, -68, -489, -489, -489, -489, -489, -489, -489, ! 555, 84, -489, -489, -489, 523, 1892, 2340, -489, 157, ! 473, 2675, 527, 483, -489, -489, -489, 539, 1831, 494, ! -489, 378, 494, 378, 1943, 2340, -77, 59, 1073, -489, ! -489, 1607, -489, -489, -489, 225, -489, 532, -489, -489, ! -489, -489, 543, 535, 2004, -489, -489, -489, 461, 461, ! 475, 475, 475, 488, 488, 488, 488, 116, -489, 425, ! 425, 490, 489, 500, 502, 509, 552, -489, 549, -489, ! -489, -489, 550, 553, 556, 343, 318, -489, -489, -489, ! -489, 520, 557, 1150, 1150, 559, 560, -489, 563, 368, ! 558, -489, 609, 2742, 566, 2809, -489, 2055, 567, -489, ! 204, -489, 204, -489, 561, 255, -489, 2340, 1073, -489, ! -489, -489, -489, 1476, -489, 2116, -489, 149, 301, 2340, ! 3077, -489, 573, 344, -489, -489, -489, 2340, -489, 576, ! 523, 1150, 7, -489, 314, -489, 2876, 2167, -489, -489, ! 346, -489, 149, 577, -489, -489, -489, -489, -489, 355, ! -489, 149, -489, 578, -489, 618, 619, 3077, -489, -489, ! 3077, -489, -489, 579, 17, -489, 582, 587, 3010, 589, ! -489, -489, 591, -489, 592, 360, -489, -489, 149, -489, ! -489, 2340, 3010, -489, -489, 2228, 608, 2340, -489, 18, ! -489, 2407, -489, 343, 598, -489, 3010, 2279, -489, 600, ! -489, 613, -489, 1150, 612, -489, -489, 620, -489, -489, ! 2474, -489, 2943, -489, -489, -489, -489, 614, 370, -489, ! 3077, 621, 1150, -489, -489, -489, 615, 656, 3077, 622, ! -489, 3077, -489, 3077, -489, -489 }; - /* YYPGOTO[NTERM-NUM]. */ static const short yypgoto[] = { ! -489, -489, -489, 194, 375, 384, -19, -111, 0, 23, ! 82, -82, -489, -3, -489, 710, 166, -489, 54, -489, ! -489, 253, 16, 695, -489, -489, 678, 658, -489, -84, ! -489, 594, -489, -60, -95, 611, -139, -163, -489, -52, ! 152, 455, -285, -70, -489, -489, -489, -489, -489, 599, ! 364, -489, -489, -15, -489, -489, -489, -489, 688, -45, ! -489, 666, -489, -489, 99, -489, -104, -127, -240, -489, ! 479, 327, -458, -438, 778, -417, -489, -489, -489, -218, ! -489, -489, -489, -489, -489, -489, 192, 205, -468, -408, ! -489, -489, -489, -489, -489, -489, -489, -303, -489, -488, ! 491, -489, -489, -489, -489, -489, -489, -489, -489, 304, ! 307, -489, -489, -489, 88, -489, -489, -489, -489, -306, ! -489, 456, -313, -28, 1131, 193, 1179, 374, 432, 537, ! 43, 642, 776, -384, -489, 264, 226, 199, 260, 424, ! 426, 423, 427, 434, -489, 278, 435, 821, -489, -489, ! 942, -489 }; ! /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If ! positive, shift that token. If negative, reduce the rule which ! number is the opposite. If zero, do what YYDEFACT says. ! If YYTABLE_NINF, syntax error. */ ! #define YYTABLE_NINF -348 static const short yytable[] = { ! 25, 26, 364, 242, 154, 384, 146, 311, 540, 49, ! 126, 287, 87, 539, 479, 115, 16, 91, 477, 20, ! 51, 124, 1, 58, 342, 16, 16, 16, 132, 148, ! 122, 146, 47, 48, 2, 50, 284, 51, 285, 81, ! 3, 51, 50, 373, 102, 16, 4, 112, 16, 16, ! 138, 132, 526, 132, 303, 218, 86, 220, 140, 116, ! 88, 28, 16, 30, 94, 556, 556, 81, 96, 553, ! 77, 54, 554, 527, 286, 138, 469, 75, 6, 469, ! 557, 557, 530, 140, 21, 591, 30, 27, 475, 526, ! 51, 20, 526, 583, 515, 145, 58, 343, 77, 1, ! 75, 94, 96, 130, 599, 75, 118, 119, 488, 128, ! 527, 2, 583, 527, 558, 578, 157, 3, 60, 530, ! 145, 53, 530, 4, 53, 355, 133, 238, 34, 120, ! 151, 5, 597, 75, 121, 66, 76, 75, 53, 360, ! 602, 39, 53, 604, 1, 605, 302, 157, 34, 383, ! 102, 133, 526, 236, 478, 6, 75, 124, 75, 76, ! 526, 510, 3, 526, 76, 526, 35, 68, 4, 411, ! 69, 20, 36, 527, 75, 29, 20, 33, 42, 519, ! 385, 527, 530, 20, 527, 320, 527, 533, 56, 349, ! 530, 53, 76, 530, 66, 530, 76, 53, 46, 45, ! 6, 545, 295, 296, 297, 298, 20, 102, 536, 380, ! 304, 305, 237, 395, 101, 76, 101, 76, 270, 357, ! 313, 65, 350, 100, 533, 364, 68, 533, 358, 69, ! 20, 157, 106, 76, 289, 498, 373, 109, 481, 238, ! 290, 292, 292, 292, 292, 110, 238, 53, 71, 292, ! 292, 307, 457, 238, 465, 238, 125, 127, 290, 219, ! 119, 588, 75, 31, -186, 236, 364, 451, 1, -186, ! -186, 105, 58, 391, 393, 66, 71, 371, 396, 397, ! -346, -346, 31, 373, 236, 157, 31, 533, 101, 1, ! 114, 37, 45, 38, 151, 533, 66, 387, 533, 31, ! 533, 75, 124, 44, 71, 45, 151, 68, 150, 34, ! 69, 20, -185, 75, 50, 412, 66, -185, -185, 149, ! 482, 76, 123, 271, 237, -100, 483, 105, 68, 71, ! 270, 69, 20, 36, 130, 101, 506, 270, 282, 313, ! 378, 494, 364, 237, 270, 288, 270, 1, 68, 270, ! 513, 69, 20, 400, 66, 373, 483, 401, 75, 157, ! 76, 470, 156, 67, 472, 3, 415, 416, 417, 216, ! -16, 4, 76, 53, 373, -345, -345, 315, 238, 444, ! 542, 316, 408, 445, 217, 317, 68, 409, 1, 69, ! 20, 410, -347, -347, 75, 66, 521, 291, 541, 102, ! 70, 20, 483, 520, 236, 292, 292, 292, 292, 292, ! 292, 292, 292, 292, 292, 292, 292, 76, 292, 292, ! 292, 292, 292, 292, 292, 321, 322, 68, 547, 72, ! 69, 20, 315, 362, 278, 271, 316, 550, 476, 130, ! 317, 546, 271, 331, 332, 333, 334, 483, 115, 271, ! 549, 271, 72, 76, 271, 569, 483, 72, 299, 584, ! 238, 483, 238, 462, 570, 596, 323, 324, 325, 270, ! 300, 483, 150, 314, 170, 1, 124, 292, 326, 327, ! 292, 319, 66, 335, 150, 72, 236, 238, 236, 72, ! 471, 67, 473, 3, 318, 34, 328, 329, 330, 4, ! 338, 50, 66, 238, 272, 235, 336, 337, 72, 151, ! 72, 104, 339, 35, 68, 340, 75, 69, 20, 36, ! 514, 344, 345, 341, 238, 361, 72, 238, 107, 236, ! 423, 424, 425, 426, 68, 238, -229, 69, 20, 347, ! 301, 270, 270, 353, 306, 237, 354, 237, 356, 238, ! 365, 270, 377, 270, 420, 421, 422, 368, 238, 292, ! 292, 408, 273, 238, 376, 362, 409, -291, -291, 381, ! 410, 292, -292, -292, 271, 76, 367, 238, 270, 238, ! 20, 121, 386, 369, 236, 370, 129, 238, 237, 270, ! 418, 419, 388, 66, 270, 238, 429, 430, 238, 394, ! 238, 398, 67, 236, 3, 236, 402, 399, 403, 414, ! 4, 439, 440, 441, 72, 270, 272, 235, 270, 449, ! 450, 119, 452, 272, 453, 68, 270, 466, 69, 20, ! 272, 484, 272, 467, 486, 272, 235, 485, 130, 131, ! 270, 489, 6, 237, 490, 491, 271, 271, 492, 270, ! 493, 497, -115, 72, 270, 502, 271, -259, 271, 501, ! 507, 270, 237, 503, 237, 72, 511, 274, 270, 534, ! 270, 538, 551, -261, 273, 552, -159, 563, 270, 555, ! 270, 273, 564, 271, 566, 567, 270, 150, 273, 270, ! 273, 270, 568, 273, 271, 17, -16, 575, 585, 271, ! 589, -345, -345, 315, 17, 17, 17, 316, 590, 593, ! 427, 504, 592, 601, 595, 600, 598, 603, 129, 428, ! 271, 32, 93, 271, 17, 66, 64, 17, 17, 281, ! 158, 271, 279, 379, 67, 63, 3, -345, -345, 315, ! 372, 17, 4, 316, 458, 271, 72, 317, 108, 78, ! 495, 579, 375, 496, 271, 272, 235, 68, 392, 271, ! 69, 20, 431, 433, 580, 432, 271, 522, 434, 0, ! 130, 280, 275, 271, 6, 271, 435, 78, 19, 274, ! 0, 437, 0, 271, 0, 271, 274, 19, 19, 19, ! 0, 271, 0, 274, 271, 274, 271, 0, 274, 0, ! 0, 0, 0, 0, 0, 134, 0, 19, 0, 0, ! 19, 19, 0, 273, 0, 0, 0, 524, 0, 0, ! 0, 0, 0, 0, 19, 0, 0, 272, 272, 0, ! 134, 0, 0, 0, 0, 0, 0, 272, 235, 272, ! 235, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 367, 0, 0, 369, 0, 0, ! 0, 0, 0, 0, 272, 565, 0, 0, 72, 0, ! 0, 0, 0, 0, 0, 272, 0, 0, 0, 572, ! 272, 235, 0, 0, 275, 273, 273, 0, 147, 0, ! 0, 275, 0, 586, 0, 273, 0, 273, 275, 0, ! 275, 272, 0, 275, 272, 0, 276, 0, 0, 0, ! 0, 0, 272, 147, 0, 0, 0, 524, 274, 0, ! 0, 0, 273, 0, 0, 565, 272, 0, 572, 0, ! 586, 0, 0, 273, 0, 272, 235, 0, 273, 0, ! 272, 0, 0, 0, 0, 0, 0, 272, 0, 0, ! 0, 277, 0, 0, 272, 235, 272, 235, 0, 273, ! 0, 0, 273, 0, 272, 0, 272, 0, 0, 0, ! 273, 0, 272, 0, 0, 272, 0, 272, 0, 0, ! 0, 0, 0, 0, 273, 0, 0, 0, 0, 0, ! 274, 274, 0, 273, 0, 0, 0, 0, 273, 0, ! 274, 0, 274, 0, 0, 273, 0, 0, 0, 0, ! 0, 0, 273, 0, 273, 0, 0, 0, 276, 0, ! 0, 0, 273, 275, 273, 276, 0, 274, 0, 0, ! 273, 0, 276, 273, 276, 273, 0, 276, 274, 0, ! 0, 0, 0, 274, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 215, 277, 274, 0, 0, 274, 0, 0, ! 277, 0, 0, 0, 0, 274, 0, 277, 0, 277, ! 0, 0, 277, 0, 0, 0, 0, 0, 0, 274, ! 0, 0, 0, 0, 0, 275, 275, 0, 274, 0, ! 0, 0, 0, 274, 0, 275, 0, 275, 0, 0, ! 274, 308, 215, 0, 0, 0, 0, 274, 0, 274, ! 0, 0, 0, 0, 66, 0, 0, 274, 0, 274, ! 0, 0, 275, 163, 0, 274, 0, 0, 274, 164, ! 274, 0, 0, 275, 0, 0, 165, 0, 275, 0, ! 166, 0, 0, 0, 0, 0, 68, 276, 0, 69, ! 20, 0, 0, 167, 168, 348, 0, 169, 352, 275, ! 0, 0, 275, 0, 359, 0, 171, 172, 173, 174, ! 275, 0, 175, 176, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 275, 0, 161, 162, 0, 0, ! 0, 66, 277, 275, 0, 0, 0, 0, 275, 0, ! 163, 0, 0, 0, 0, 275, 164, 0, 0, 0, ! 0, 0, 275, 165, 275, 0, 0, 166, 0, 276, ! 276, 0, 275, 68, 275, 0, 69, 20, 0, 276, ! 275, 276, 0, 275, 232, 275, 0, 0, 0, 0, ! 0, 0, 0, 171, 172, 173, 174, 0, 407, 175, ! 176, 413, 0, 0, 0, 0, 276, 0, 0, 0, ! 0, 0, 0, 0, 277, 277, 0, 276, 0, 0, ! 0, 0, 276, 0, 277, 436, 277, 0, 0, 438, ! 293, 293, 293, 293, 0, 442, 443, 0, 293, 293, ! 0, 0, 0, 276, 0, 0, 276, 0, 0, 0, ! 0, 277, 0, 0, 276, 0, 0, 0, 455, 456, ! 0, 0, 277, 0, 0, 0, 0, 277, 276, 0, ! 468, 0, 0, 0, 0, 0, 0, 276, 294, 294, ! 294, 294, 276, 215, 0, 0, 294, 294, 277, 276, ! 0, 277, 0, 0, 0, 0, 276, 0, 276, 277, ! 0, 0, 0, 0, 0, 0, 276, 0, 276, 0, ! 0, 0, 0, 277, 276, 0, 0, 276, 0, 276, ! 0, 0, 277, 0, 0, 0, 0, 277, 0, 0, ! 0, 0, 0, 0, 277, 0, 0, 0, 0, 0, ! 0, 277, 0, 277, 0, 0, 0, 0, 0, 0, ! 0, 277, 0, 277, 0, 0, 0, 0, 0, 277, ! 0, 0, 277, 0, 277, 517, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 537, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 293, 293, 293, 293, 293, 293, ! 293, 293, 293, 293, 293, 293, 0, 293, 293, 293, ! 293, 293, 293, 293, 0, 0, 0, 516, 0, 159, ! 160, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 571, 0, 0, 0, 574, 0, 576, ! 0, 0, 294, 294, 294, 294, 294, 294, 294, 294, ! 294, 294, 294, 294, 0, 294, 294, 294, 294, 294, ! 294, 294, 161, 162, 0, 0, 293, 66, 0, 293, ! 0, 0, 0, 0, 0, 0, 163, 0, 0, 0, ! 0, 0, 164, 0, 159, 160, 0, 0, 0, 165, ! 0, 0, 0, 166, 0, 0, 0, 0, 0, 68, ! 0, 0, 69, 20, 0, 0, 167, 168, 0, 0, ! 169, 0, 0, 0, 294, 0, 0, 294, 0, 171, ! 172, 173, 174, 0, 0, 175, 176, 161, 162, 0, ! 0, 0, 66, 0, 0, 0, 0, 0, 0, 0, ! 0, 163, 0, 0, 0, 0, 0, 164, 293, 293, ! 159, 160, 0, 0, 165, 0, 0, 0, 166, 0, ! 293, 0, 0, 0, 68, 0, 0, 69, 20, 0, ! 0, 167, 168, 0, 0, 169, 0, 170, 309, 0, ! 0, 0, 310, 0, 171, 172, 173, 174, 0, 0, ! 175, 176, 0, 161, 162, 0, 294, 294, 66, 0, ! 0, 0, 0, 0, 0, 0, 0, 163, 294, 0, ! 0, 159, 160, 164, 0, 0, 0, 0, 0, 0, ! 165, 0, 0, 0, 166, 0, 0, 0, 0, 0, ! 68, 0, 0, 69, 20, 0, 0, 167, 168, 0, ! 0, 169, 0, 170, 480, 0, 0, 0, 0, 0, ! 171, 172, 173, 174, 161, 162, 175, 176, 0, 66, ! 0, 0, 159, 160, 0, 0, 0, 0, 163, 0, ! 0, 0, 0, 0, 164, 0, 0, 0, 0, 0, ! 0, 165, 0, 0, 0, 166, 0, 0, 0, 0, ! 0, 68, 0, 0, 69, 20, 0, 0, 167, 168, ! 0, 0, 169, 0, 170, 161, 162, 0, 0, 0, ! 66, 171, 172, 173, 174, 0, 0, 175, 176, 163, ! 0, 0, 0, 159, 160, 164, 0, 0, 0, 0, ! 0, 0, 165, 0, 0, 0, 166, 0, 0, 0, ! 0, 0, 68, 0, 0, 69, 20, 0, 0, 167, ! 168, 0, 0, 169, 0, 0, 0, 0, 0, 351, ! 0, 0, 171, 172, 173, 174, 161, 162, 175, 176, ! 0, 66, 0, 0, 159, 160, 0, 0, 0, 0, ! 163, 0, 0, 0, 0, 0, 164, 0, 0, 0, ! 0, 0, 0, 165, 0, 0, 0, 166, 0, 0, ! 0, 0, 0, 68, 0, 0, 69, 20, 0, 0, ! 167, 168, 0, 0, 169, 404, 0, 161, 162, 0, ! 0, 0, 66, 171, 172, 173, 174, 0, 0, 175, ! 176, 163, 0, 0, 0, 159, 160, 164, 0, 0, ! 0, 0, 0, 0, 165, 0, 0, 0, 166, 0, ! 0, 0, 0, 0, 68, 0, 0, 69, 20, 0, ! 0, 167, 168, 0, 0, 169, 0, 0, 0, 0, ! 123, 0, 0, 0, 171, 172, 173, 174, 161, 162, ! 175, 176, 0, 66, 0, 0, 159, 160, 0, 0, ! 0, 0, 163, 0, 0, 0, 0, 0, 164, 0, ! 0, 0, 0, 0, 0, 165, 0, 0, 0, 166, ! 0, 0, 0, 0, 0, 68, 0, 0, 69, 20, ! 0, 0, 167, 168, 0, 0, 169, 0, 0, 161, ! 162, 0, 454, 0, 66, 171, 172, 173, 174, 0, ! 0, 175, 176, 163, 0, 0, 0, 159, 160, 164, ! 0, 0, 0, 0, 0, 0, 165, 0, 0, 0, ! 166, 0, 0, 0, 0, 0, 68, 0, 0, 69, ! 20, 0, 0, 167, 168, 0, 0, 169, 474, 0, ! 0, 0, 0, 0, 0, 0, 171, 172, 173, 174, ! 161, 162, 175, 176, 0, 66, 0, 0, 159, 160, ! 0, 0, 0, 0, 163, 0, 0, 0, 0, 0, ! 164, 0, 0, 0, 0, 0, 0, 165, 0, 0, ! 0, 166, 0, 0, 0, 0, 0, 68, 0, 0, ! 69, 20, 0, 0, 167, 168, 0, 0, 169, 487, ! 0, 161, 162, 0, 0, 0, 66, 171, 172, 173, ! 174, 0, 0, 175, 176, 163, 0, 0, 0, 159, ! 160, 164, 0, 0, 0, 0, 0, 0, 165, 0, ! 0, 0, 166, 0, 0, 0, 0, 0, 68, 0, ! 0, 69, 20, 0, 0, 167, 168, 0, 0, 169, ! 509, 0, 0, 0, 0, 0, 0, 0, 171, 172, ! 173, 174, 161, 162, 175, 176, 0, 66, 0, 0, ! 159, 160, 0, 0, 0, 0, 163, 0, 0, 0, ! 0, 0, 164, 0, 0, 0, 0, 0, 0, 165, ! 0, 0, 0, 166, 0, 0, 0, 0, 0, 68, ! 0, 0, 69, 20, 0, 0, 167, 168, 0, 0, ! 169, 518, 0, 161, 162, 0, 0, 0, 66, 171, ! 172, 173, 174, 0, 0, 175, 176, 163, 0, 0, ! 0, 159, 160, 164, 0, 0, 0, 0, 0, 0, ! 165, 0, 0, 0, 166, 0, 0, 0, 0, 0, ! 68, 0, 0, 69, 20, 0, 0, 167, 168, 0, ! 0, 169, 544, 0, 0, 0, 0, 0, 0, 0, ! 171, 172, 173, 174, 161, 162, 175, 176, 0, 66, ! 0, 0, 159, 160, 0, 0, 0, 0, 163, 0, ! 0, 0, 0, 0, 164, 0, 0, 0, 0, 0, ! 0, 165, 0, 0, 0, 166, 0, 0, 0, 0, ! 0, 68, 0, 0, 69, 20, 0, 0, 167, 168, ! 0, 0, 169, 0, 0, 161, 162, 0, 573, 0, ! 66, 171, 172, 173, 174, 0, 0, 175, 176, 163, ! 0, 0, 0, 159, 160, 164, 0, 0, 0, 0, ! 0, 0, 165, 0, 0, 0, 166, 0, 0, 0, ! 0, 0, 68, 0, 0, 69, 20, 0, 0, 167, ! 168, 0, 0, 169, 587, 0, 0, 0, 0, 0, ! 0, 0, 171, 172, 173, 174, 161, 162, 175, 176, ! 0, 66, 0, 0, 0, 0, 0, 0, 0, 0, ! 163, 0, 0, 0, 0, 0, 164, 0, 0, 0, ! 0, 0, 0, 165, 0, 0, 0, 166, 0, 0, ! 0, 0, 0, 68, 0, 0, 69, 20, 0, 0, ! 167, 168, 0, 0, 169, 0, 0, 0, 0, 0, ! 0, 0, 0, 171, 172, 173, 174, 0, 0, 175, ! 176, 221, 0, 161, 162, 556, 222, 223, 66, 224, ! 0, 0, 225, 0, 0, 0, 226, 163, 0, 0, ! 557, 0, 0, 164, 227, 4, 228, 0, 229, 230, ! 165, 231, 0, 0, 166, 0, 0, 0, 0, 0, ! 68, 0, 0, 69, 20, 0, 0, 0, 0, 0, ! 0, 232, 0, 130, 581, 0, 0, 6, 0, 0, ! 171, 172, 173, 174, 0, 0, 175, 176, 221, 0, ! 161, 162, 556, 222, 223, 66, 224, 0, 0, 225, ! 0, 0, 0, 226, 163, 0, 0, 557, 0, 0, ! 164, 227, 4, 228, 0, 229, 230, 165, 231, 0, ! 0, 166, 0, 0, 0, 0, 0, 68, 0, 0, ! 69, 20, 0, 0, 0, 0, 0, 0, 232, 0, ! 130, 594, 0, 0, 6, 0, 0, 171, 172, 173, ! 174, 0, 0, 175, 176, 221, 0, 161, 162, 0, ! 222, 223, 66, 224, 0, 0, 225, 0, 0, 0, ! 226, 163, 0, 0, 0, 0, 0, 164, 227, 4, ! 228, 0, 229, 230, 165, 231, 0, 0, 166, 0, ! 0, 0, 0, 0, 68, 0, 0, 69, 20, 0, ! 0, 0, 0, 0, 0, 232, 0, 130, 233, 0, ! 0, 6, 0, 0, 171, 172, 173, 174, 0, 0, ! 175, 176, 221, 0, 161, 162, 0, 222, 223, 66, ! 224, 0, 0, 225, 0, 0, 0, 226, 163, 0, ! 0, 0, 0, 0, 164, 227, 4, 228, 0, 229, ! 230, 165, 231, 0, 0, 166, 0, 0, 0, 0, ! 0, 68, 0, 0, 69, 20, 0, 0, 0, 0, ! 0, 0, 232, 0, 130, 363, 0, 0, 6, 0, ! 0, 171, 172, 173, 174, 0, 0, 175, 176, 221, ! 0, 161, 162, 0, 222, 223, 66, 224, 0, 0, ! 225, 0, 0, 0, 226, 163, 0, 0, 0, 0, ! 0, 459, 227, 4, 228, 0, 229, 230, 165, 231, ! 0, 0, 460, 0, 0, 0, 0, 0, 68, 0, ! 0, 69, 20, 0, 0, 0, 0, 0, 0, 232, ! 0, 130, 461, 0, 0, 6, 0, 0, 171, 172, ! 173, 174, 0, 0, 175, 176, 221, 0, 161, 162, ! 0, 222, 223, 66, 224, 0, 0, 225, 0, 0, ! 0, 226, 163, 0, 0, 0, 0, 0, 164, 227, ! 4, 228, 0, 229, 230, 165, 231, 0, 0, 166, ! 0, 0, 0, 0, 0, 68, 0, 0, 69, 20, ! 0, 0, 0, 0, 0, 0, 232, 0, 130, 505, ! 0, 0, 6, 0, 0, 171, 172, 173, 174, 0, ! 0, 175, 176, 221, 0, 161, 162, 0, 222, 223, ! 66, 224, 0, 0, 225, 0, 0, 0, 226, 163, ! 0, 0, 0, 0, 0, 164, 227, 4, 228, 0, ! 229, 230, 165, 231, 0, 0, 166, 0, 0, 0, ! 0, 0, 68, 0, 0, 69, 20, 0, 0, 0, ! 0, 0, 0, 232, 0, 130, 508, 0, 0, 6, ! 0, 0, 171, 172, 173, 174, 0, 0, 175, 176, ! 221, 0, 161, 162, 0, 222, 223, 66, 224, 0, ! 0, 225, 0, 0, 0, 226, 163, 0, 0, 0, ! 0, 0, 164, 227, 4, 228, 0, 229, 230, 165, ! 231, 0, 0, 166, 0, 0, 0, 0, 0, 68, ! 0, 0, 69, 20, 0, 0, 0, 0, 0, 0, ! 232, 0, 130, 543, 0, 0, 6, 0, 0, 171, ! 172, 173, 174, 0, 0, 175, 176, 221, 0, 161, ! 162, 0, 222, 223, 66, 224, 0, 0, 225, 0, ! 0, 0, 226, 163, 0, 0, 0, 0, 0, 164, ! 227, 4, 228, 0, 229, 230, 165, 231, 0, 0, ! 166, 0, 0, 0, 0, 0, 68, 0, 0, 69, ! 20, 0, 0, 0, 0, 0, 0, 232, 0, 130, ! 0, 0, 0, 6, 0, 0, 171, 172, 173, 174, ! 0, 0, 175, 176, 366, 0, 161, 162, 0, 222, ! 223, 66, 224, 0, 0, 225, 0, 0, 0, 226, ! 163, 0, 0, 0, 0, 0, 164, 227, 0, 228, ! 0, 229, 230, 165, 231, 0, 0, 166, 0, 0, ! 0, 0, 0, 68, 0, 0, 69, 20, 0, 0, ! 0, 0, 0, 0, 232, 0, 130, 0, 0, 0, ! 6, 0, 0, 171, 172, 173, 174, 0, 0, 175, ! 176, 366, 0, 161, 162, 0, 523, 223, 66, 224, ! 0, 0, 225, 0, 0, 0, 226, 163, 0, 0, ! 0, 0, 0, 164, 227, 0, 228, 0, 229, 230, ! 165, 231, 0, 0, 166, 0, 0, 0, 0, 0, ! 68, 0, 0, 69, 20, 0, 0, 0, 0, 0, ! 0, 232, 1, 130, 161, 162, 0, 6, 0, 66, ! 171, 172, 173, 174, 0, 0, 175, 176, 163, 0, ! 0, 0, 0, 0, 164, 0, 0, 0, 0, 0, ! 0, 165, 0, 0, 0, 166, 0, 0, 0, 0, ! 0, 68, 0, 0, 69, 20, 0, 0, 0, 0, ! 0, 0, 232, 0, 0, 0, 0, 0, 0, 0, ! 0, 171, 172, 173, 174, 0, 0, 175, 176 }; static const short yycheck[] = { ! 3, 4, 242, 130, 115, 290, 110, 170, 1, 5, ! 105, 150, 57, 501, 398, 54, 0, 62, 95, 87, ! 39, 98, 44, 42, 15, 9, 10, 11, 110, 113, ! 100, 135, 35, 36, 56, 38, 140, 56, 142, 54, ! 62, 60, 45, 261, 72, 29, 68, 92, 32, 33, ! 110, 133, 490, 135, 165, 125, 56, 127, 110, 98, ! 60, 0, 46, 9, 67, 48, 48, 82, 71, 527, ! 54, 96, 530, 490, 144, 135, 389, 54, 100, 392, ! 63, 63, 490, 135, 2, 573, 32, 5, 394, 527, ! 109, 87, 530, 561, 478, 110, 115, 88, 82, 44, ! 77, 104, 105, 96, 592, 82, 100, 101, 414, 109, ! 527, 56, 580, 530, 97, 97, 119, 62, 53, 527, ! 135, 39, 530, 68, 42, 229, 110, 130, 44, 93, ! 114, 76, 590, 110, 98, 51, 54, 114, 56, 234, ! 598, 64, 60, 601, 44, 603, 165, 150, 44, 288, ! 178, 135, 590, 130, 95, 100, 133, 98, 135, 77, ! 598, 467, 62, 601, 82, 603, 62, 83, 68, 73, ! 86, 87, 68, 590, 151, 9, 87, 11, 64, 485, ! 291, 598, 590, 87, 601, 188, 603, 490, 101, 100, ! 598, 109, 110, 601, 51, 603, 114, 115, 32, 102, ! 100, 507, 159, 160, 161, 162, 87, 235, 493, 279, ! 167, 168, 130, 95, 98, 133, 98, 135, 130, 100, ! 102, 100, 225, 71, 527, 465, 83, 530, 231, 86, ! 87, 234, 100, 151, 95, 453, 454, 101, 401, 242, ! 101, 159, 160, 161, 162, 96, 249, 165, 54, 167, ! 168, 169, 95, 256, 381, 258, 104, 105, 101, 100, ! 101, 567, 239, 10, 95, 242, 506, 362, 44, 100, ! 101, 77, 291, 301, 302, 51, 82, 261, 306, 307, ! 92, 93, 29, 501, 261, 288, 33, 590, 98, 44, ! 94, 100, 102, 102, 278, 598, 51, 300, 601, 46, ! 603, 278, 98, 100, 110, 102, 290, 83, 114, 44, ! 86, 87, 95, 290, 317, 318, 51, 100, 101, 95, ! 95, 239, 99, 130, 242, 96, 101, 133, 83, 135, ! 242, 86, 87, 68, 96, 98, 463, 249, 100, 102, ! 95, 445, 582, 261, 256, 151, 258, 44, 83, 261, ! 95, 86, 87, 97, 51, 573, 101, 101, 335, 362, ! 278, 389, 99, 60, 392, 62, 323, 324, 325, 99, ! 87, 68, 290, 291, 592, 92, 93, 94, 381, 61, ! 66, 98, 68, 65, 99, 102, 83, 73, 44, 86, ! 87, 77, 92, 93, 371, 51, 95, 101, 502, 427, ! 97, 87, 101, 487, 381, 323, 324, 325, 326, 327, ! 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, ! 338, 339, 340, 341, 342, 46, 47, 83, 512, 54, ! 86, 87, 94, 239, 94, 242, 98, 521, 395, 96, ! 102, 95, 249, 18, 19, 20, 21, 101, 54, 256, ! 95, 258, 77, 371, 261, 95, 101, 82, 102, 563, ! 463, 101, 465, 381, 548, 95, 5, 6, 7, 381, ! 102, 101, 278, 102, 96, 44, 98, 395, 3, 4, ! 398, 98, 51, 58, 290, 110, 463, 490, 465, 114, ! 391, 60, 393, 62, 102, 44, 8, 9, 10, 68, ! 11, 504, 51, 506, 130, 130, 16, 17, 133, 493, ! 135, 60, 12, 62, 83, 13, 493, 86, 87, 68, ! 477, 92, 93, 14, 527, 89, 151, 530, 97, 506, ! 331, 332, 333, 334, 83, 538, 94, 86, 87, 94, ! 165, 453, 454, 94, 169, 463, 94, 465, 94, 552, ! 100, 463, 94, 465, 328, 329, 330, 100, 561, 477, ! 478, 68, 130, 566, 100, 371, 73, 46, 47, 96, ! 77, 489, 46, 47, 381, 493, 249, 580, 490, 582, ! 87, 98, 68, 256, 561, 258, 44, 590, 506, 501, ! 326, 327, 98, 51, 506, 598, 336, 337, 601, 94, ! 603, 95, 60, 580, 62, 582, 68, 97, 68, 94, ! 68, 100, 100, 100, 239, 527, 242, 242, 530, 100, ! 95, 101, 67, 249, 101, 83, 538, 100, 86, 87, ! 256, 99, 258, 94, 99, 261, 261, 94, 96, 97, ! 552, 89, 100, 561, 95, 95, 453, 454, 95, 561, ! 94, 94, 94, 278, 566, 95, 463, 96, 465, 100, ! 94, 573, 580, 100, 582, 290, 99, 130, 580, 96, ! 582, 95, 94, 96, 242, 57, 57, 95, 590, 100, ! 592, 249, 95, 490, 95, 94, 598, 493, 256, 601, ! 258, 603, 100, 261, 501, 0, 87, 89, 100, 506, ! 100, 92, 93, 94, 9, 10, 11, 98, 95, 89, ! 335, 102, 100, 57, 100, 100, 95, 95, 44, 335, ! 527, 11, 64, 530, 29, 51, 48, 32, 33, 135, ! 119, 538, 133, 278, 60, 47, 62, 92, 93, 94, ! 261, 46, 68, 98, 380, 552, 371, 102, 82, 54, ! 446, 559, 261, 446, 561, 381, 381, 83, 302, 566, ! 86, 87, 338, 340, 559, 339, 573, 489, 341, -1, ! 96, 97, 130, 580, 100, 582, 342, 82, 0, 242, ! -1, 346, -1, 590, -1, 592, 249, 9, 10, 11, ! -1, 598, -1, 256, 601, 258, 603, -1, 261, -1, ! -1, -1, -1, -1, -1, 110, -1, 29, -1, -1, ! 32, 33, -1, 381, -1, -1, -1, 490, -1, -1, ! -1, -1, -1, -1, 46, -1, -1, 453, 454, -1, ! 135, -1, -1, -1, -1, -1, -1, 463, 463, 465, ! 465, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, 527, -1, -1, 530, -1, -1, ! -1, -1, -1, -1, 490, 538, -1, -1, 493, -1, ! -1, -1, -1, -1, -1, 501, -1, -1, -1, 552, ! 506, 506, -1, -1, 242, 453, 454, -1, 110, -1, ! -1, 249, -1, 566, -1, 463, -1, 465, 256, -1, ! 258, 527, -1, 261, 530, -1, 130, -1, -1, -1, ! -1, -1, 538, 135, -1, -1, -1, 590, 381, -1, ! -1, -1, 490, -1, -1, 598, 552, -1, 601, -1, ! 603, -1, -1, 501, -1, 561, 561, -1, 506, -1, ! 566, -1, -1, -1, -1, -1, -1, 573, -1, -1, ! -1, 130, -1, -1, 580, 580, 582, 582, -1, 527, ! -1, -1, 530, -1, 590, -1, 592, -1, -1, -1, ! 538, -1, 598, -1, -1, 601, -1, 603, -1, -1, ! -1, -1, -1, -1, 552, -1, -1, -1, -1, -1, ! 453, 454, -1, 561, -1, -1, -1, -1, 566, -1, ! 463, -1, 465, -1, -1, 573, -1, -1, -1, -1, ! -1, -1, 580, -1, 582, -1, -1, -1, 242, -1, ! -1, -1, 590, 381, 592, 249, -1, 490, -1, -1, ! 598, -1, 256, 601, 258, 603, -1, 261, 501, -1, ! -1, -1, -1, 506, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, 120, 242, 527, -1, -1, 530, -1, -1, ! 249, -1, -1, -1, -1, 538, -1, 256, -1, 258, ! -1, -1, 261, -1, -1, -1, -1, -1, -1, 552, ! -1, -1, -1, -1, -1, 453, 454, -1, 561, -1, ! -1, -1, -1, 566, -1, 463, -1, 465, -1, -1, ! 573, 169, 170, -1, -1, -1, -1, 580, -1, 582, ! -1, -1, -1, -1, 51, -1, -1, 590, -1, 592, ! -1, -1, 490, 60, -1, 598, -1, -1, 601, 66, ! 603, -1, -1, 501, -1, -1, 73, -1, 506, -1, ! 77, -1, -1, -1, -1, -1, 83, 381, -1, 86, ! 87, -1, -1, 90, 91, 223, -1, 94, 226, 527, ! -1, -1, 530, -1, 232, -1, 103, 104, 105, 106, ! 538, -1, 109, 110, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, 552, -1, 46, 47, -1, -1, ! -1, 51, 381, 561, -1, -1, -1, -1, 566, -1, ! 60, -1, -1, -1, -1, 573, 66, -1, -1, -1, ! -1, -1, 580, 73, 582, -1, -1, 77, -1, 453, ! 454, -1, 590, 83, 592, -1, 86, 87, -1, 463, ! 598, 465, -1, 601, 94, 603, -1, -1, -1, -1, ! -1, -1, -1, 103, 104, 105, 106, -1, 316, 109, ! 110, 319, -1, -1, -1, -1, 490, -1, -1, -1, ! -1, -1, -1, -1, 453, 454, -1, 501, -1, -1, ! -1, -1, 506, -1, 463, 343, 465, -1, -1, 347, ! 159, 160, 161, 162, -1, 353, 354, -1, 167, 168, ! -1, -1, -1, 527, -1, -1, 530, -1, -1, -1, ! -1, 490, -1, -1, 538, -1, -1, -1, 376, 377, ! -1, -1, 501, -1, -1, -1, -1, 506, 552, -1, ! 388, -1, -1, -1, -1, -1, -1, 561, 159, 160, ! 161, 162, 566, 401, -1, -1, 167, 168, 527, 573, ! -1, 530, -1, -1, -1, -1, 580, -1, 582, 538, ! -1, -1, -1, -1, -1, -1, 590, -1, 592, -1, ! -1, -1, -1, 552, 598, -1, -1, 601, -1, 603, ! -1, -1, 561, -1, -1, -1, -1, 566, -1, -1, ! -1, -1, -1, -1, 573, -1, -1, -1, -1, -1, ! -1, 580, -1, 582, -1, -1, -1, -1, -1, -1, ! -1, 590, -1, 592, -1, -1, -1, -1, -1, 598, ! -1, -1, 601, -1, 603, 483, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, -1, 497, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, 323, 324, 325, 326, 327, 328, ! 329, 330, 331, 332, 333, 334, -1, 336, 337, 338, ! 339, 340, 341, 342, -1, -1, -1, 1, -1, 3, ! 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, 551, -1, -1, -1, 555, -1, 557, ! -1, -1, 323, 324, 325, 326, 327, 328, 329, 330, ! 331, 332, 333, 334, -1, 336, 337, 338, 339, 340, ! 341, 342, 46, 47, -1, -1, 395, 51, -1, 398, ! -1, -1, -1, -1, -1, -1, 60, -1, -1, -1, ! -1, -1, 66, -1, 3, 4, -1, -1, -1, 73, ! -1, -1, -1, 77, -1, -1, -1, -1, -1, 83, ! -1, -1, 86, 87, -1, -1, 90, 91, -1, -1, ! 94, -1, -1, -1, 395, -1, -1, 398, -1, 103, ! 104, 105, 106, -1, -1, 109, 110, 46, 47, -1, ! -1, -1, 51, -1, -1, -1, -1, -1, -1, -1, ! -1, 60, -1, -1, -1, -1, -1, 66, 477, 478, ! 3, 4, -1, -1, 73, -1, -1, -1, 77, -1, ! 489, -1, -1, -1, 83, -1, -1, 86, 87, -1, ! -1, 90, 91, -1, -1, 94, -1, 96, 97, -1, ! -1, -1, 101, -1, 103, 104, 105, 106, -1, -1, ! 109, 110, -1, 46, 47, -1, 477, 478, 51, -1, ! -1, -1, -1, -1, -1, -1, -1, 60, 489, -1, ! -1, 3, 4, 66, -1, -1, -1, -1, -1, -1, ! 73, -1, -1, -1, 77, -1, -1, -1, -1, -1, ! 83, -1, -1, 86, 87, -1, -1, 90, 91, -1, ! -1, 94, -1, 96, 97, -1, -1, -1, -1, -1, ! 103, 104, 105, 106, 46, 47, 109, 110, -1, 51, ! -1, -1, 3, 4, -1, -1, -1, -1, 60, -1, ! -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, ! -1, 83, -1, -1, 86, 87, -1, -1, 90, 91, ! -1, -1, 94, -1, 96, 46, 47, -1, -1, -1, ! 51, 103, 104, 105, 106, -1, -1, 109, 110, 60, ! -1, -1, -1, 3, 4, 66, -1, -1, -1, -1, ! -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, ! -1, -1, 83, -1, -1, 86, 87, -1, -1, 90, ! 91, -1, -1, 94, -1, -1, -1, -1, -1, 100, ! -1, -1, 103, 104, 105, 106, 46, 47, 109, 110, ! -1, 51, -1, -1, 3, 4, -1, -1, -1, -1, ! 60, -1, -1, -1, -1, -1, 66, -1, -1, -1, ! -1, -1, -1, 73, -1, -1, -1, 77, -1, -1, ! -1, -1, -1, 83, -1, -1, 86, 87, -1, -1, ! 90, 91, -1, -1, 94, 95, -1, 46, 47, -1, ! -1, -1, 51, 103, 104, 105, 106, -1, -1, 109, ! 110, 60, -1, -1, -1, 3, 4, 66, -1, -1, ! -1, -1, -1, -1, 73, -1, -1, -1, 77, -1, ! -1, -1, -1, -1, 83, -1, -1, 86, 87, -1, ! -1, 90, 91, -1, -1, 94, -1, -1, -1, -1, ! 99, -1, -1, -1, 103, 104, 105, 106, 46, 47, ! 109, 110, -1, 51, -1, -1, 3, 4, -1, -1, -1, -1, 60, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, ! -1, -1, -1, -1, -1, 83, -1, -1, 86, 87, ! -1, -1, 90, 91, -1, -1, 94, -1, -1, 46, ! 47, -1, 100, -1, 51, 103, 104, 105, 106, -1, ! -1, 109, 110, 60, -1, -1, -1, 3, 4, 66, ! -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, ! 77, -1, -1, -1, -1, -1, 83, -1, -1, 86, ! 87, -1, -1, 90, 91, -1, -1, 94, 95, -1, ! -1, -1, -1, -1, -1, -1, 103, 104, 105, 106, ! 46, 47, 109, 110, -1, 51, -1, -1, 3, 4, ! -1, -1, -1, -1, 60, -1, -1, -1, -1, -1, ! 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, ! -1, 77, -1, -1, -1, -1, -1, 83, -1, -1, ! 86, 87, -1, -1, 90, 91, -1, -1, 94, 95, ! -1, 46, 47, -1, -1, -1, 51, 103, 104, 105, ! 106, -1, -1, 109, 110, 60, -1, -1, -1, 3, ! 4, 66, -1, -1, -1, -1, -1, -1, 73, -1, ! -1, -1, 77, -1, -1, -1, -1, -1, 83, -1, ! -1, 86, 87, -1, -1, 90, 91, -1, -1, 94, ! 95, -1, -1, -1, -1, -1, -1, -1, 103, 104, ! 105, 106, 46, 47, 109, 110, -1, 51, -1, -1, ! 3, 4, -1, -1, -1, -1, 60, -1, -1, -1, ! -1, -1, 66, -1, -1, -1, -1, -1, -1, 73, ! -1, -1, -1, 77, -1, -1, -1, -1, -1, 83, ! -1, -1, 86, 87, -1, -1, 90, 91, -1, -1, ! 94, 95, -1, 46, 47, -1, -1, -1, 51, 103, ! 104, 105, 106, -1, -1, 109, 110, 60, -1, -1, ! -1, 3, 4, 66, -1, -1, -1, -1, -1, -1, ! 73, -1, -1, -1, 77, -1, -1, -1, -1, -1, ! 83, -1, -1, 86, 87, -1, -1, 90, 91, -1, ! -1, 94, 95, -1, -1, -1, -1, -1, -1, -1, ! 103, 104, 105, 106, 46, 47, 109, 110, -1, 51, ! -1, -1, 3, 4, -1, -1, -1, -1, 60, -1, ! -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, ! -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, ! -1, 83, -1, -1, 86, 87, -1, -1, 90, 91, ! -1, -1, 94, -1, -1, 46, 47, -1, 100, -1, ! 51, 103, 104, 105, 106, -1, -1, 109, 110, 60, ! -1, -1, -1, 3, 4, 66, -1, -1, -1, -1, ! -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, ! -1, -1, 83, -1, -1, 86, 87, -1, -1, 90, ! 91, -1, -1, 94, 95, -1, -1, -1, -1, -1, ! -1, -1, 103, 104, 105, 106, 46, 47, 109, 110, ! -1, 51, -1, -1, -1, -1, -1, -1, -1, -1, 60, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, -1, -1, ! -1, -1, -1, 83, -1, -1, 86, 87, -1, -1, ! 90, 91, -1, -1, 94, -1, -1, -1, -1, -1, ! -1, -1, -1, 103, 104, 105, 106, -1, -1, 109, ! 110, 44, -1, 46, 47, 48, 49, 50, 51, 52, ! -1, -1, 55, -1, -1, -1, 59, 60, -1, -1, ! 63, -1, -1, 66, 67, 68, 69, -1, 71, 72, ! 73, 74, -1, -1, 77, -1, -1, -1, -1, -1, ! 83, -1, -1, 86, 87, -1, -1, -1, -1, -1, ! -1, 94, -1, 96, 97, -1, -1, 100, -1, -1, ! 103, 104, 105, 106, -1, -1, 109, 110, 44, -1, ! 46, 47, 48, 49, 50, 51, 52, -1, -1, 55, ! -1, -1, -1, 59, 60, -1, -1, 63, -1, -1, ! 66, 67, 68, 69, -1, 71, 72, 73, 74, -1, ! -1, 77, -1, -1, -1, -1, -1, 83, -1, -1, ! 86, 87, -1, -1, -1, -1, -1, -1, 94, -1, ! 96, 97, -1, -1, 100, -1, -1, 103, 104, 105, ! 106, -1, -1, 109, 110, 44, -1, 46, 47, -1, ! 49, 50, 51, 52, -1, -1, 55, -1, -1, -1, ! 59, 60, -1, -1, -1, -1, -1, 66, 67, 68, ! 69, -1, 71, 72, 73, 74, -1, -1, 77, -1, ! -1, -1, -1, -1, 83, -1, -1, 86, 87, -1, ! -1, -1, -1, -1, -1, 94, -1, 96, 97, -1, ! -1, 100, -1, -1, 103, 104, 105, 106, -1, -1, ! 109, 110, 44, -1, 46, 47, -1, 49, 50, 51, 52, -1, -1, 55, -1, -1, -1, 59, 60, -1, ! -1, -1, -1, -1, 66, 67, 68, 69, -1, 71, ! 72, 73, 74, -1, -1, 77, -1, -1, -1, -1, ! -1, 83, -1, -1, 86, 87, -1, -1, -1, -1, ! -1, -1, 94, -1, 96, 97, -1, -1, 100, -1, ! -1, 103, 104, 105, 106, -1, -1, 109, 110, 44, ! -1, 46, 47, -1, 49, 50, 51, 52, -1, -1, ! 55, -1, -1, -1, 59, 60, -1, -1, -1, -1, ! -1, 66, 67, 68, 69, -1, 71, 72, 73, 74, ! -1, -1, 77, -1, -1, -1, -1, -1, 83, -1, ! -1, 86, 87, -1, -1, -1, -1, -1, -1, 94, ! -1, 96, 97, -1, -1, 100, -1, -1, 103, 104, ! 105, 106, -1, -1, 109, 110, 44, -1, 46, 47, -1, 49, 50, 51, 52, -1, -1, 55, -1, -1, -1, 59, 60, -1, -1, -1, -1, -1, 66, 67, 68, 69, -1, 71, 72, 73, 74, -1, -1, 77, ! -1, -1, -1, -1, -1, 83, -1, -1, 86, 87, ! -1, -1, -1, -1, -1, -1, 94, -1, 96, 97, ! -1, -1, 100, -1, -1, 103, 104, 105, 106, -1, ! -1, 109, 110, 44, -1, 46, 47, -1, 49, 50, ! 51, 52, -1, -1, 55, -1, -1, -1, 59, 60, ! -1, -1, -1, -1, -1, 66, 67, 68, 69, -1, ! 71, 72, 73, 74, -1, -1, 77, -1, -1, -1, ! -1, -1, 83, -1, -1, 86, 87, -1, -1, -1, ! -1, -1, -1, 94, -1, 96, 97, -1, -1, 100, ! -1, -1, 103, 104, 105, 106, -1, -1, 109, 110, 44, -1, 46, 47, -1, 49, 50, 51, 52, -1, -1, 55, -1, -1, -1, 59, 60, -1, -1, -1, -1, -1, 66, 67, 68, 69, -1, 71, 72, 73, ! 74, -1, -1, 77, -1, -1, -1, -1, -1, 83, ! -1, -1, 86, 87, -1, -1, -1, -1, -1, -1, ! 94, -1, 96, 97, -1, -1, 100, -1, -1, 103, ! 104, 105, 106, -1, -1, 109, 110, 44, -1, 46, ! 47, -1, 49, 50, 51, 52, -1, -1, 55, -1, ! -1, -1, 59, 60, -1, -1, -1, -1, -1, 66, ! 67, 68, 69, -1, 71, 72, 73, 74, -1, -1, ! 77, -1, -1, -1, -1, -1, 83, -1, -1, 86, ! 87, -1, -1, -1, -1, -1, -1, 94, -1, 96, ! -1, -1, -1, 100, -1, -1, 103, 104, 105, 106, ! -1, -1, 109, 110, 44, -1, 46, 47, -1, 49, 50, 51, 52, -1, -1, 55, -1, -1, -1, 59, 60, -1, -1, -1, -1, -1, 66, 67, -1, 69, ! -1, 71, 72, 73, 74, -1, -1, 77, -1, -1, ! -1, -1, -1, 83, -1, -1, 86, 87, -1, -1, ! -1, -1, -1, -1, 94, -1, 96, -1, -1, -1, ! 100, -1, -1, 103, 104, 105, 106, -1, -1, 109, ! 110, 44, -1, 46, 47, -1, 49, 50, 51, 52, ! -1, -1, 55, -1, -1, -1, 59, 60, -1, -1, ! -1, -1, -1, 66, 67, -1, 69, -1, 71, 72, ! 73, 74, -1, -1, 77, -1, -1, -1, -1, -1, ! 83, -1, -1, 86, 87, -1, -1, -1, -1, -1, ! -1, 94, 44, 96, 46, 47, -1, 100, -1, 51, ! 103, 104, 105, 106, -1, -1, 109, 110, 60, -1, ! -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, ! -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, ! -1, 83, -1, -1, 86, 87, -1, -1, -1, -1, ! -1, -1, 94, -1, -1, -1, -1, -1, -1, -1, ! -1, 103, 104, 105, 106, -1, -1, 109, 110 }; ! /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing ! symbol of state STATE-NUM. */ ! static const unsigned short yystos[] = { ! 0, 44, 56, 62, 68, 76, 100, 112, 125, 126, ! 127, 128, 129, 130, 131, 132, 133, 134, 164, 185, ! 87, 121, 122, 123, 124, 124, 124, 121, 0, 127, ! 129, 132, 126, 127, 44, 62, 68, 100, 102, 64, ! 165, 169, 64, 137, 100, 102, 127, 124, 124, 5, ! 124, 117, 119, 121, 96, 170, 101, 167, 117, 118, ! 53, 138, 166, 169, 137, 100, 51, 60, 83, 86, ! 97, 114, 115, 116, 117, 120, 121, 133, 134, 144, ! 150, 164, 171, 172, 173, 174, 119, 170, 119, 139, ! 136, 170, 168, 138, 124, 151, 124, 145, 146, 147, ! 151, 98, 234, 234, 60, 114, 100, 97, 172, 101, ! 96, 140, 170, 135, 94, 54, 98, 154, 100, 101, ! 93, 98, 154, 99, 98, 151, 145, 151, 119, 44, ! 96, 97, 122, 133, 134, 141, 142, 143, 144, 149, ! 150, 157, 158, 159, 160, 164, 177, 185, 140, 95, ! 114, 133, 152, 153, 118, 155, 99, 124, 146, 3, ! 4, 46, 47, 60, 66, 73, 77, 90, 91, 94, ! 96, 103, 104, 105, 106, 109, 110, 113, 115, 120, ! 121, 148, 175, 222, 223, 224, 225, 226, 229, 231, ! 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, ! 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, ! 255, 256, 257, 258, 259, 261, 99, 99, 154, 100, ! 154, 44, 49, 50, 52, 55, 59, 67, 69, 71, ! 72, 74, 94, 97, 114, 115, 120, 121, 124, 133, ! 134, 177, 178, 179, 180, 181, 182, 184, 185, 186, ! 187, 189, 190, 191, 192, 194, 200, 201, 203, 204, ! 205, 207, 208, 212, 213, 214, 215, 216, 217, 218, ! 225, 236, 238, 239, 240, 242, 243, 258, 94, 160, ! 97, 142, 100, 156, 177, 177, 154, 147, 114, 95, ! 101, 101, 121, 235, 237, 241, 241, 241, 241, 102, ! 102, 115, 117, 118, 241, 241, 115, 121, 261, 97, ! 101, 148, 176, 102, 102, 94, 98, 102, 102, 98, ! 124, 46, 47, 5, 6, 7, 3, 4, 8, 9, ! 10, 18, 19, 20, 21, 58, 16, 17, 11, 12, ! 13, 14, 15, 88, 92, 93, 260, 94, 261, 100, ! 124, 100, 261, 94, 94, 177, 94, 100, 124, 261, ! 145, 89, 114, 97, 179, 100, 44, 182, 100, 182, ! 182, 133, 181, 190, 209, 211, 100, 94, 95, 152, ! 154, 96, 161, 147, 153, 118, 68, 124, 98, 232, ! 233, 234, 232, 234, 94, 95, 234, 234, 95, 97, ! 97, 101, 68, 68, 95, 230, 261, 261, 68, 73, ! 77, 73, 124, 261, 94, 241, 241, 241, 246, 246, ! 247, 247, 247, 248, 248, 248, 248, 115, 116, 249, ! 249, 250, 251, 252, 253, 254, 261, 257, 261, 100, ! 100, 100, 261, 261, 61, 65, 219, 220, 221, 100, ! 95, 145, 67, 101, 100, 261, 261, 95, 161, 66, ! 77, 97, 121, 162, 163, 178, 100, 94, 261, 233, ! 234, 175, 234, 175, 95, 230, 241, 95, 95, 244, ! 97, 148, 95, 101, 99, 94, 99, 95, 230, 89, ! 95, 95, 95, 94, 177, 220, 221, 94, 190, 210, ! 211, 100, 95, 100, 102, 97, 178, 94, 97, 95, ! 230, 99, 227, 95, 241, 244, 1, 261, 95, 230, ! 140, 95, 256, 49, 182, 183, 184, 186, 188, 193, ! 200, 202, 206, 208, 96, 195, 153, 261, 95, 210, ! 1, 177, 66, 97, 95, 230, 95, 140, 228, 95, ! 140, 94, 57, 183, 183, 100, 48, 63, 97, 196, ! 197, 198, 199, 95, 95, 182, 95, 94, 100, 95, ! 140, 261, 182, 100, 261, 89, 261, 262, 97, 197, ! 198, 97, 178, 199, 177, 100, 182, 95, 230, 100, ! 95, 210, 100, 89, 97, 100, 95, 183, 95, 210, ! 100, 57, 183, 95, 183, 183 }; #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) # define YYSIZE_T __SIZE_TYPE__ #endif --- 623,1635 ---- 4, 1, 3, 2, 3, 1, 2, 1, 1, 1, 2, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ! 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, ! 2, 1, 1, 1, 1, 1, 1, 1, 5, 7, ! 7, 5, 2, 3, 3, 4, 1, 2, 2, 1, ! 2, 3, 2, 4, 2, 2, 1, 7, 7, 6, ! 7, 6, 2, 2, 0, 1, 1, 0, 1, 1, ! 3, 2, 3, 2, 3, 2, 3, 3, 5, 3, ! 2, 3, 5, 5, 1, 3, 3, 4, 1, 2, ! 5, 2, 1, 1, 1, 1, 3, 1, 1, 1, ! 1, 1, 3, 3, 3, 3, 3, 5, 4, 1, ! 4, 5, 5, 6, 0, 6, 0, 7, 3, 3, ! 1, 3, 3, 3, 3, 4, 4, 4, 4, 1, ! 2, 3, 2, 3, 3, 3, 3, 4, 5, 6, ! 5, 6, 4, 4, 1, 1, 1, 1, 2, 2, ! 1, 1, 2, 2, 1, 2, 2, 1, 2, 2, ! 1, 5, 4, 4, 5, 1, 3, 3, 3, 1, ! 3, 3, 1, 3, 3, 3, 1, 3, 3, 3, ! 3, 3, 1, 3, 3, 1, 3, 1, 3, 1, ! 3, 1, 3, 1, 3, 1, 5, 1, 1, 3, ! 1, 1, 1, 1, 1, 1, 1 }; ! /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE ! doesn't specify something else to do. Zero means the default is an ! error. */ ! static const short yydefact[] = { ! 25, 45, 0, 0, 0, 0, 176, 1, 27, 28, ! 26, 33, 38, 39, 35, 0, 42, 43, 44, 24, ! 0, 20, 21, 22, 117, 51, 0, 31, 34, 36, ! 29, 30, 46, 0, 0, 40, 0, 0, 0, 121, ! 0, 53, 37, 0, 32, 119, 51, 0, 23, 17, ! 125, 15, 0, 118, 0, 0, 16, 52, 0, 49, ! 0, 123, 53, 41, 12, 0, 10, 11, 127, 0, ! 8, 9, 13, 14, 15, 0, 133, 135, 0, 134, ! 0, 129, 131, 132, 126, 122, 55, 54, 0, 120, ! 0, 47, 0, 93, 76, 0, 72, 74, 93, 0, ! 18, 19, 0, 0, 136, 128, 130, 0, 0, 50, ! 124, 0, 0, 0, 0, 83, 70, 0, 0, 0, ! 82, 282, 0, 93, 0, 93, 56, 45, 0, 57, ! 20, 0, 67, 0, 59, 61, 65, 66, 80, 62, ! 0, 63, 93, 68, 64, 69, 48, 86, 0, 0, ! 0, 89, 95, 94, 88, 76, 73, 0, 0, 0, ! 0, 0, 0, 0, 245, 0, 0, 0, 0, 6, ! 5, 2, 3, 4, 7, 244, 0, 0, 295, 75, ! 79, 294, 242, 251, 247, 259, 0, 243, 248, 249, ! 250, 307, 296, 297, 315, 300, 301, 304, 310, 319, ! 322, 326, 332, 335, 337, 339, 341, 343, 345, 347, ! 355, 348, 0, 78, 77, 283, 85, 71, 84, 45, ! 0, 0, 206, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 143, 0, 8, 14, 295, 22, 0, 149, ! 164, 0, 145, 147, 0, 148, 153, 165, 0, 154, ! 166, 0, 155, 156, 167, 0, 157, 0, 168, 158, ! 214, 0, 169, 170, 171, 173, 175, 172, 0, 174, ! 247, 249, 0, 184, 185, 182, 183, 181, 0, 93, ! 58, 60, 0, 99, 0, 91, 0, 87, 0, 0, ! 295, 248, 250, 302, 303, 306, 305, 0, 0, 0, ! 16, 0, 308, 309, 0, 295, 0, 137, 0, 141, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 299, ! 298, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 353, 354, 0, 0, 0, 221, 0, 225, ! 0, 0, 0, 0, 212, 223, 0, 230, 0, 0, ! 151, 177, 0, 144, 146, 150, 234, 178, 180, 204, ! 0, 0, 216, 219, 213, 215, 0, 0, 105, 0, ! 0, 98, 81, 97, 0, 101, 92, 90, 96, 256, ! 285, 0, 273, 279, 0, 274, 0, 0, 0, 18, ! 19, 246, 139, 138, 0, 255, 254, 286, 0, 270, ! 0, 253, 268, 252, 269, 284, 0, 0, 316, 317, ! 318, 320, 321, 323, 324, 325, 328, 330, 327, 329, ! 0, 331, 333, 334, 336, 338, 340, 342, 344, 0, ! 349, 0, 227, 222, 226, 0, 0, 0, 0, 235, ! 238, 236, 224, 231, 0, 229, 246, 152, 0, 0, ! 217, 0, 0, 106, 102, 116, 245, 107, 295, 0, ! 0, 0, 103, 0, 0, 280, 275, 278, 276, 277, ! 258, 0, 312, 0, 0, 313, 140, 142, 287, 0, ! 292, 0, 293, 260, 0, 0, 0, 203, 0, 0, ! 241, 239, 237, 0, 0, 220, 0, 218, 217, 0, ! 104, 0, 108, 0, 0, 109, 290, 0, 281, 0, ! 257, 311, 314, 272, 271, 288, 0, 261, 262, 346, ! 0, 188, 0, 153, 0, 160, 161, 0, 162, 163, ! 0, 0, 191, 0, 228, 0, 0, 0, 233, 232, ! 0, 110, 0, 0, 291, 265, 0, 289, 263, 0, ! 0, 179, 205, 0, 0, 0, 192, 0, 196, 0, ! 199, 0, 0, 209, 0, 0, 111, 0, 267, 0, ! 189, 217, 0, 202, 356, 0, 194, 197, 0, 193, ! 198, 200, 240, 207, 208, 0, 0, 112, 0, 0, ! 217, 201, 195, 114, 0, 0, 0, 0, 113, 0, ! 211, 0, 190, 210, 0, 0, 0 }; static const short yydefgoto[] = { ! 614, 175, 233, 176, 71, 72, 57, 50, 177, 178, ! 21, 22, 23, 7, 8, 9, 10, 11, 12, 13, ! 14, 238, 239, 111, 88, 41, 59, 87, 109, 133, ! 134, 135, 77, 95, 96, 97, 179, 137, 282, 78, ! 93, 150, 151, 115, 153, 382, 139, 140, 141, 142, ! 385, 469, 470, 17, 38, 60, 55, 90, 39, 53, ! 80, 81, 82, 83, 180, 310, 240, 590, 242, 243, ! 244, 245, 532, 246, 247, 248, 249, 535, 250, 251, ! 252, 253, 536, 254, 542, 567, 568, 569, 570, 255, ! 256, 538, 257, 258, 259, 539, 260, 261, 374, 506, ! 507, 262, 263, 264, 265, 266, 267, 268, 269, 449, ! 450, 451, 181, 182, 183, 184, 185, 519, 556, 186, ! 408, 187, 392, 393, 101, 188, 189, 190, 191, 192, ! 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, ! 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, ! 344, 409, 585 }; static const short yypact[] = { ! 128,-32768, -71, -71, -71, -71,-32768,-32768, 187, 87, ! 187,-32768,-32768,-32768,-32768, 150,-32768,-32768,-32768,-32768, ! 213,-32768,-32768,-32768, -40, -26, 303, 87,-32768,-32768, ! 187, 87,-32768, -71, -71,-32768, 7, -71, -37, -28, ! -71, 68,-32768, -71, 87, -40, -26, 60,-32768,-32768, ! -32768, 114, 906,-32768, -71, -37,-32768,-32768, -71,-32768, ! -37, -28, 68,-32768,-32768, -71,-32768,-32768,-32768, -71, ! 110,-32768,-32768,-32768, 136, 369,-32768,-32768, 139,-32768, ! 1354,-32768,-32768,-32768,-32768,-32768,-32768, 28, 161,-32768, ! -37,-32768, 175, -34, 175, 344,-32768, 86, -34, 177, ! 212, 212, -71, -71,-32768,-32768,-32768, -71, 1200,-32768, ! -32768, 161, 407, -71, 191,-32768,-32768, -71, 1604, 255, ! -32768,-32768, 282, -34, 353, -34,-32768, 227, 2516,-32768, ! 253, 369,-32768, 1359,-32768,-32768,-32768,-32768,-32768,-32768, ! 315,-32768, 367,-32768,-32768,-32768,-32768,-32768, -71, 202, ! 16,-32768,-32768, 330,-32768,-32768,-32768, 2312, 2312, 2312, ! 2312, 336, 345, 243,-32768, 2312, 2312, 2312, 1472,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768, 181, 347, 323,-32768, ! -32768, 361, 360,-32768,-32768,-32768, -71,-32768, 368,-32768, ! 395, 450,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 429, ! 533, 471, 455, 542, 472, 480, 489, 491, 0,-32768, ! -32768,-32768, 476,-32768,-32768,-32768,-32768,-32768,-32768, 421, ! 430, 2312,-32768, -19, 1656, 434, 437, 315, 443, 66, ! 1219, 2312,-32768, -71, 181, 347, 612, 451, 90,-32768, ! -32768, 2584,-32768,-32768, 445,-32768,-32768,-32768, 2992,-32768, ! -32768, 454,-32768,-32768,-32768, 2992,-32768, 2992,-32768,-32768, ! 3112, 461,-32768,-32768,-32768,-32768,-32768,-32768, 457,-32768, ! 171, 208, 450, 528, 530,-32768,-32768,-32768, 496, 367, ! -32768,-32768, 224,-32768, 467, 468, -71,-32768, 248, -71, ! 133,-32768,-32768,-32768,-32768,-32768,-32768, 504, -71, 483, ! 483, 493,-32768,-32768, 160, 323, 490,-32768, 498,-32768, ! 239, 521, 523, 1722, 1774, 266, 50, 2312, 499,-32768, ! -32768, 2312, 2312, 2312, 2312, 2312, 2312, 2312, 2312, 2312, ! 2312, 2312, 2312, 243, 2312, 2312, 2312, 2312, 2312, 2312, ! 2312, 2312,-32768,-32768, 2312, 2312, 500,-32768, 501,-32768, ! 506, 2312, 2312, 295,-32768,-32768, 511,-32768, 18, 509, ! 513,-32768, -71,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! 551, 202,-32768,-32768,-32768, 518, 1840, 2312,-32768, 48, ! 467,-32768,-32768,-32768, 2652, 520, 468,-32768,-32768,-32768, ! 529, 1774, 483,-32768, 310, 483, 310, 1892, 2312, -13, ! 169, 3179,-32768,-32768, 1538,-32768,-32768,-32768, 74,-32768, ! 532,-32768,-32768,-32768,-32768, 538, 534, 1958,-32768,-32768, ! -32768, 429, 429, 533, 533, 533, 471, 471, 471, 471, ! 110,-32768, 455, 455, 542, 472, 480, 489, 491, 545, ! -32768, 527,-32768,-32768,-32768, 540, 547, 544, 315, 295, ! -32768,-32768,-32768,-32768, 2312,-32768,-32768, 513, 546, 3137, ! 3137, 537, 550,-32768, 548, 345, 555,-32768, 658, 2720, ! 556, 2788,-32768, 2010, 552,-32768, 212,-32768, 212,-32768, ! 558, 99,-32768, 2312, 3179,-32768,-32768,-32768,-32768, 1393, ! -32768, 2076,-32768, 161, 106, 2312, 3060,-32768, 559, 248, ! -32768,-32768,-32768, 564, 2312,-32768, 557, 518, 3137, 8, ! -32768, 317,-32768, 2856, 2128,-32768,-32768, 250,-32768, 161, ! 570,-32768,-32768,-32768,-32768,-32768, 290,-32768, 161,-32768, ! 573,-32768, 613, 615, 3060,-32768,-32768, 3060,-32768,-32768, ! 575, -22,-32768, 578,-32768, 581, 2992, 582,-32768,-32768, ! 584,-32768, 579, 291,-32768,-32768, 161,-32768,-32768, 2312, ! 2992,-32768,-32768, 2194, 591, 2312,-32768, 94,-32768, 2380, ! -32768, 315, 583,-32768, 2992, 2246,-32768, 585,-32768, 586, ! -32768, 3137, 592,-32768,-32768, 597,-32768,-32768, 2448,-32768, ! 2924,-32768,-32768,-32768,-32768, 594, 301,-32768, 3060, 596, ! 3137,-32768,-32768,-32768, 607, 641, 3060, 620,-32768, 3060, ! -32768, 3060,-32768,-32768, 709, 718,-32768 }; static const short yypgoto[] = { ! -32768,-32768, 111, -27, 387, 30, -107, 10, 189, 40, ! 117,-32768, -3,-32768, 711, 13,-32768, 21,-32768,-32768, ! 19, 27, 617,-32768,-32768, 677, 662,-32768, -109,-32768, ! 595,-32768, -86, -100, 610, -140, -157,-32768,-32768, -5, ! 63, 452, -283, -64,-32768,-32768,-32768,-32768,-32768, 598, ! 357,-32768,-32768, -36,-32768,-32768,-32768,-32768, 691, 167, ! -32768, 661,-32768,-32768, 29,-32768, -101, -118, -237,-32768, ! 485, -146, -313, -482, 704, -447,-32768,-32768,-32768, -185, ! -32768,-32768,-32768,-32768,-32768,-32768, 180, 182, -413, -94, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768, 31,-32768, -490, ! 495,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! 307, 311,-32768,-32768,-32768, 85,-32768,-32768,-32768,-32768, ! -304,-32768, 459, -113, 3, 1033, 230, 1053, 273, 356, ! 462, 341, 543, 626, -388,-32768, 254, 192, 219, 265, ! 426, 428, 425, 427, 431,-32768, 275, 424, 669,-32768, ! -32768, 785,-32768 }; ! ! #define YYLAST 3290 ! ! static const short yytable[] = { ! 24, 25, 146, 124, 364, 387, 152, 144, 285, 548, ! 241, 309, 47, 485, 533, 340, 79, 19, 547, 453, ! 113, 27, 136, 31, 37, 70, 564, 15, 29, 28, ! 45, 46, 144, 48, 120, 15, 15, 15, 40, 283, ! 48, 565, 20, 44, 79, 26, 29, 136, 70, 534, ! 29, 28, 533, 70, 15, 533, 301, 15, 15, 216, ! 52, 218, 92, 29, 84, 114, 94, 49, 86, 19, ! 56, 15, 143, 100, 54, 373, 566, 51, 284, 75, ! 51, 70, 347, 483, 49, 70, 122, 534, 49, 341, ! 534, 599, 74, 481, 51, 19, 522, 143, 51, 92, ! 94, 234, 367, 138, 70, 128, 70, 75, 454, 369, ! 607, 370, 287, 494, 155, 74, 533, 126, 288, 455, ! 74, 58, 70, 414, 533, 237, 353, 533, 138, 533, ! 107, 1, 98, 360, 32, 131, 299, 49, 19, 149, ! 304, 64, 564, 56, 463, 155, 386, 51, 74, 3, ! 288, 534, 74, 51, 19, 4, 591, 565, 34, 534, ! 131, 63, 534, 69, 534, 123, 125, 355, 236, 517, ! 488, 74, 1, 74, 66, 591, 489, 67, 19, 100, ! 118, 383, 388, 318, 2, 119, 103, 526, 6, 74, ! 3, 69, 586, 300, 32, 520, 4, 290, 290, 290, ! 290, 489, 528, 51, 5, 290, 290, 305, 489, 99, ! 553, 70, 33, 270, 234, 380, 543, 43, 34, 69, ! 348, 561, 85, 148, 562, 130, 356, 89, 313, 6, ! 155, 1, 314, 234, 364, 99, 315, 100, 237, 43, ! 104, 73, 103, 2, 69, 237, 32, 487, 130, 3, ! 130, 70, 237, 64, 237, 4, 398, 110, 108, 99, ! 286, 70, 457, 311, 73, 484, 471, -187, 122, 73, ! 112, 596, -187, -187, 505, 373, 364, 121, 74, 475, ! 99, 236, 475, 155, 311, 605, 66, 371, 6, 67, ! 19, 154, 1, 610, 64, 390, 612, 73, 613, 64, ! 236, 73, 394, 396, -186, 149, 430, 399, 400, -186, ! -186, 122, 48, 415, 35, 149, 36, 235, 74, 56, ! 73, 128, 73, 373, -100, 381, 270, 66, 74, 51, ! 67, 19, 66, 270, 411, 67, 19, 403, 73, 412, ! 270, 404, 270, 413, 70, 270, 554, 500, 278, 362, ! 531, 513, 489, 364, 19, 214, 447, 234, 271, 155, ! 448, 290, 290, 290, 290, 290, 290, 290, 290, 290, ! 290, 290, 290, 74, 290, 290, 290, 290, 290, 290, ! 290, 237, 215, 550, 527, 411, 557, 577, 367, 148, ! 412, 369, 489, 489, 413, 476, 373, 604, 478, 148, ! 573, 272, 537, 489, 42, 19, 43, 168, 549, 122, ! 555, 74, 128, 32, 580, 373, -350, -350, 313, 558, ! 64, 113, 314, 477, 468, 479, 315, 73, 594, 102, ! 235, 33, 289, 100, 321, 322, 323, 34, 290, 297, ! 537, 290, 234, 537, 234, 116, 117, 578, 298, 235, ! 312, 1, 531, 66, 217, 117, 67, 19, 64, 317, ! 573, -351, -351, 580, 316, 594, 237, 73, 237, 270, ! 592, 271, 70, 329, 330, 331, 332, 73, 271, 326, ! 327, 328, 362, 336, 273, 271, 234, 271, -352, -352, ! 271, 66, 337, 237, 67, 19, 319, 320, 293, 294, ! 295, 296, 338, 147, 537, 339, 302, 303, 48, 236, ! 237, 236, 537, 333, 272, 537, -234, 537, 423, 424, ! 425, 272, 73, 290, 290, 345, 149, 540, 272, 351, ! 272, 237, 352, 272, 237, 290, 324, 325, 354, 74, ! 1, 361, 234, 237, 270, 270, 365, 64, 426, 427, ! 428, 429, 377, 236, 270, 368, 270, 237, 334, 335, ! 73, 234, 376, 234, 384, 540, 237, 119, 540, 342, ! 343, 237, 389, 235, -296, -296, -297, -297, 421, 422, ! 66, 270, 391, 67, 19, 237, 401, 237, 397, 405, ! 274, 406, 378, 270, 417, 237, 402, 273, 270, 432, ! 433, 442, 443, 237, 273, 456, 237, 444, 237, 236, ! 148, 273, 452, 273, 271, 117, 273, 16, 458, 270, ! 459, 472, 270, 496, 473, 16, 16, 16, 236, 540, ! 236, 270, 490, 491, 492, 495, 497, 540, 508, 499, ! 540, 504, 540, 498, 16, 270, 509, 16, 16, 510, ! -115, 514, 518, 546, 270, -264, 541, 272, 235, 270, ! 235, 16, 418, 419, 420, 544, 270, -266, 559, 76, ! 560, 275, -159, 270, 571, 270, 563, 572, 574, 575, ! 576, 583, 598, 270, 593, 270, 597, 601, 73, 271, ! 271, 270, 606, 600, 270, 603, 270, 76, 609, 271, ! -15, 271, 235, 274, 18, -350, -350, 313, 608, 615, ! 274, 314, 18, 18, 18, 315, 611, 274, 616, 274, ! 431, 30, 274, 62, 91, 132, 271, 156, 281, 279, ! 379, 18, 272, 272, 18, 18, 61, 464, 271, 482, ! 273, 106, 272, 271, 272, 372, -15, 587, 18, 588, ! 132, -350, -350, 313, 276, 375, 501, 314, 235, 395, ! 502, 511, 434, 436, 271, 435, 437, 271, 440, 272, ! 529, 438, 0, 0, 0, 0, 271, 235, 0, 235, ! 0, 272, 0, 0, 275, 0, 272, 0, 0, 0, ! 271, 275, 0, 0, 0, 0, 0, 277, 275, 271, ! 275, 0, 0, 275, 271, 0, 0, 272, 0, 0, ! 272, 271, 145, 0, 0, 273, 273, 0, 271, 272, ! 271, 0, 0, 0, 521, 273, 0, 273, 271, 0, ! 271, 0, 0, 272, 0, 0, 271, 145, 0, 271, ! 0, 271, 272, 0, 0, 0, 274, 272, 0, 0, ! 0, 0, 273, 0, 272, 0, 0, 0, 0, 0, ! 0, 272, 0, 272, 273, 0, 0, 276, 0, 273, ! 0, 272, 0, 272, 276, 0, 0, 0, 0, 272, ! 0, 276, 272, 276, 272, 0, 276, 0, 0, 0, ! 273, 0, 0, 273, 0, 0, 0, 0, 0, 0, ! 0, 0, 273, 213, 0, 0, 0, 0, 0, 0, ! 277, 0, 0, 0, 0, 0, 273, 277, 0, 0, ! 0, 274, 274, 0, 277, 273, 277, 275, 0, 277, ! 273, 274, 0, 274, 0, 0, 0, 273, 0, 0, ! 0, 0, 0, 0, 273, 0, 273, 0, 0, 0, ! 1, 0, 306, 213, 273, 0, 273, 64, 274, 0, ! 0, 0, 273, 0, 0, 273, 65, 273, 3, 0, ! 274, 0, 0, 0, 4, 274, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 66, 0, 0, 67, 19, 0, 274, 0, 0, 274, ! 0, 0, 275, 275, 68, 0, 346, 0, 274, 350, ! 276, 0, 275, 0, 275, 358, 359, 0, 0, 0, ! 0, 0, 274, 0, 0, 0, 0, 0, 0, 0, ! 0, 274, 0, 0, 0, 0, 274, 0, 0, 275, ! 0, 0, 0, 274, 0, 0, 0, 0, 0, 0, ! 274, 275, 274, 277, 0, 0, 275, 0, 0, 0, ! 274, 0, 274, 0, 0, 0, 0, 0, 274, 0, ! 0, 274, 0, 274, 0, 0, 0, 275, 0, 0, ! 275, 0, 0, 0, 0, 276, 276, 0, 0, 275, ! 0, 0, 0, 0, 0, 276, 0, 276, 0, 410, ! 0, 0, 416, 275, 0, 0, 0, 0, 0, 0, ! 0, 0, 275, 0, 0, 0, 0, 275, 0, 0, ! 0, 0, 276, 0, 275, 0, 439, 0, 277, 277, ! 441, 275, 0, 275, 276, 0, 445, 446, 277, 276, ! 277, 275, 0, 275, 0, 0, 0, 0, 0, 275, ! 0, 0, 275, 0, 275, 0, 0, 0, 0, 0, ! 276, 461, 462, 276, 0, 277, 0, 0, 0, 0, ! 0, 0, 276, 0, 0, 0, 474, 277, 0, 0, ! 0, 0, 277, 0, 0, 0, 276, 0, 0, 213, ! 291, 291, 291, 291, 0, 276, 0, 0, 291, 291, ! 276, 0, 0, 277, 0, 0, 277, 276, 0, 0, ! 292, 292, 292, 292, 276, 277, 276, 0, 292, 292, ! 357, 0, 157, 158, 276, 0, 276, 0, 0, 277, ! 0, 0, 276, 0, 0, 276, 0, 276, 277, 503, ! 0, 0, 0, 277, 127, 0, 0, 0, 0, 0, ! 277, 64, 0, 0, 0, 0, 0, 277, 0, 277, ! 65, 0, 3, 0, 0, 159, 160, 277, 4, 277, ! 64, 0, 0, 0, 524, 277, 0, 0, 277, 161, ! 277, 0, 0, 0, 66, 162, 0, 67, 19, 545, ! 0, 0, 163, 0, 0, 0, 164, 128, 129, 0, ! 0, 6, 0, 66, 0, 0, 67, 19, 0, 0, ! 165, 166, 0, 0, 167, 0, 0, 0, 0, 0, ! 0, 0, 0, 169, 170, 171, 172, 0, 0, 173, ! 174, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 579, 0, 0, 0, 582, 0, ! 584, 0, 0, 0, 291, 291, 291, 291, 291, 291, ! 291, 291, 291, 291, 291, 291, 0, 291, 291, 291, ! 291, 291, 291, 291, 292, 292, 292, 292, 292, 292, ! 292, 292, 292, 292, 292, 292, 0, 292, 292, 292, ! 292, 292, 292, 292, 523, 0, 157, 158, 1, 0, ! 0, 0, 0, 127, 0, 64, 0, 0, 0, 0, ! 64, 0, 0, 0, 65, 0, 3, 0, 0, 65, ! 0, 3, 4, 0, 0, 0, 0, 4, 0, 0, ! 0, 291, 0, 0, 291, 0, 0, 0, 66, 159, ! 160, 67, 19, 66, 64, 0, 67, 19, 0, 0, ! 0, 292, 105, 161, 292, 0, 128, 280, 0, 162, ! 6, 0, 0, 0, 0, 0, 163, 0, 0, 0, ! 164, 0, 0, 0, 0, 157, 158, 66, 0, 0, ! 67, 19, 0, 0, 165, 166, 0, 0, 167, 0, ! 0, 0, 0, 0, 0, 0, 0, 169, 170, 171, ! 172, 0, 0, 173, 174, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 291, 291, 159, 160, ! 0, 0, 0, 64, 0, 0, 0, 0, 291, 0, ! 0, 0, 161, 0, 0, 0, 292, 292, 162, 0, ! 0, 157, 158, 0, 0, 163, 0, 0, 292, 164, ! 0, 0, 0, 0, 0, 0, 66, 0, 0, 67, ! 19, 0, 0, 165, 166, 0, 0, 167, 0, 168, ! 307, 0, 0, 0, 308, 0, 169, 170, 171, 172, ! 0, 0, 173, 174, 159, 160, 0, 0, 0, 64, ! 0, 0, 0, 0, 0, 0, 0, 0, 161, 0, ! 0, 0, 0, 0, 162, 0, 0, 157, 158, 0, ! 0, 163, 0, 0, 0, 164, 0, 0, 0, 0, ! 0, 0, 66, 0, 0, 67, 19, 0, 0, 165, ! 166, 0, 0, 167, 0, 168, 486, 0, 0, 0, ! 0, 0, 169, 170, 171, 172, 0, 0, 173, 174, ! 159, 160, 0, 0, 0, 64, 0, 0, 0, 157, ! 158, 0, 0, 0, 161, 0, 0, 0, 0, 0, ! 162, 0, 0, 0, 0, 0, 0, 163, 0, 0, ! 0, 164, 0, 0, 0, 0, 0, 0, 66, 0, ! 0, 67, 19, 0, 0, 165, 166, 0, 0, 167, ! 0, 168, 159, 160, 0, 0, 0, 64, 169, 170, ! 171, 172, 0, 0, 173, 174, 161, 0, 0, 0, ! 0, 0, 162, 0, 0, 157, 158, 0, 0, 163, ! 0, 0, 0, 164, 0, 0, 0, 0, 0, 0, ! 66, 0, 0, 67, 19, 0, 0, 165, 166, 0, ! 0, 167, 0, 0, 0, 0, 0, 349, 0, 0, ! 169, 170, 171, 172, 0, 0, 173, 174, 159, 160, ! 0, 0, 0, 64, 0, 0, 0, 157, 158, 0, ! 0, 0, 161, 0, 0, 0, 0, 0, 162, 0, ! 0, 0, 0, 0, 0, 163, 0, 0, 0, 164, ! 0, 0, 0, 0, 0, 0, 66, 0, 0, 67, ! 19, 0, 0, 165, 166, 0, 0, 167, 407, 0, ! 159, 160, 0, 0, 0, 64, 169, 170, 171, 172, ! 0, 0, 173, 174, 161, 0, 0, 0, 0, 0, ! 162, 0, 0, 157, 158, 0, 0, 163, 0, 0, ! 0, 164, 0, 0, 0, 0, 0, 0, 66, 0, ! 0, 67, 19, 0, 0, 165, 166, 0, 0, 167, ! 0, 0, 0, 0, 121, 0, 0, 0, 169, 170, ! 171, 172, 0, 0, 173, 174, 159, 160, 0, 0, ! 0, 64, 0, 0, 0, 157, 158, 0, 0, 0, ! 161, 0, 0, 0, 0, 0, 162, 0, 0, 0, ! 0, 0, 0, 163, 0, 0, 0, 164, 0, 0, ! 0, 0, 0, 0, 66, 0, 0, 67, 19, 0, ! 0, 165, 166, 0, 0, 167, 0, 0, 159, 160, ! 0, 460, 0, 64, 169, 170, 171, 172, 0, 0, ! 173, 174, 161, 0, 0, 0, 0, 0, 162, 0, ! 0, 157, 158, 0, 0, 163, 0, 0, 0, 164, ! 0, 0, 0, 0, 0, 0, 66, 0, 0, 67, ! 19, 0, 0, 165, 166, 0, 0, 167, 480, 0, ! 0, 0, 0, 0, 0, 0, 169, 170, 171, 172, ! 0, 0, 173, 174, 159, 160, 0, 0, 0, 64, ! 0, 0, 0, 157, 158, 0, 0, 0, 161, 0, ! 0, 0, 0, 0, 162, 0, 0, 0, 0, 0, ! 0, 163, 0, 0, 0, 164, 0, 0, 0, 0, ! 0, 0, 66, 0, 0, 67, 19, 0, 0, 165, ! 166, 0, 0, 167, 493, 0, 159, 160, 0, 0, ! 0, 64, 169, 170, 171, 172, 0, 0, 173, 174, ! 161, 0, 0, 0, 0, 0, 162, 0, 0, 157, ! 158, 0, 0, 163, 0, 0, 0, 164, 0, 0, ! 0, 0, 0, 0, 66, 0, 0, 67, 19, 0, ! 0, 165, 166, 0, 0, 167, 516, 0, 0, 0, ! 0, 0, 0, 0, 169, 170, 171, 172, 0, 0, ! 173, 174, 159, 160, 0, 0, 0, 64, 0, 0, ! 0, 157, 158, 0, 0, 0, 161, 0, 0, 0, ! 0, 0, 162, 0, 0, 0, 0, 0, 0, 163, ! 0, 0, 0, 164, 0, 0, 0, 0, 0, 0, ! 66, 0, 0, 67, 19, 0, 0, 165, 166, 0, ! 0, 167, 525, 0, 159, 160, 0, 0, 0, 64, ! 169, 170, 171, 172, 0, 0, 173, 174, 161, 0, ! 0, 0, 0, 0, 162, 0, 0, 157, 158, 0, ! 0, 163, 0, 0, 0, 164, 0, 0, 0, 0, ! 0, 0, 66, 0, 0, 67, 19, 0, 0, 165, ! 166, 0, 0, 167, 552, 0, 0, 0, 0, 0, ! 0, 0, 169, 170, 171, 172, 0, 0, 173, 174, ! 159, 160, 0, 0, 0, 64, 0, 0, 0, 157, ! 158, 0, 0, 0, 161, 0, 0, 0, 0, 0, ! 162, 0, 0, 0, 0, 0, 0, 163, 0, 0, ! 0, 164, 0, 0, 0, 0, 0, 0, 66, 0, ! 0, 67, 19, 0, 0, 165, 166, 0, 0, 167, ! 0, 0, 159, 160, 0, 581, 0, 64, 169, 170, ! 171, 172, 0, 0, 173, 174, 161, 0, 0, 0, ! 0, 0, 162, 0, 0, 157, 158, 0, 0, 163, ! 0, 0, 0, 164, 0, 0, 0, 0, 0, 0, ! 66, 0, 0, 67, 19, 0, 0, 165, 166, 0, ! 0, 167, 595, 0, 0, 0, 0, 0, 0, 0, ! 169, 170, 171, 172, 0, 0, 173, 174, 159, 160, ! 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, ! 0, 0, 161, 0, 0, 0, 0, 0, 162, 0, ! 0, 0, 0, 0, 0, 163, 0, 0, 0, 164, ! 0, 0, 0, 0, 0, 0, 66, 0, 0, 67, ! 19, 0, 0, 165, 166, 0, 0, 167, 0, 0, ! 0, 0, 0, 0, 0, 0, 169, 170, 171, 172, ! 0, 0, 173, 174, 219, 0, 159, 160, 564, 220, ! 221, 64, 222, 0, 0, 223, 0, 0, 0, 224, ! 161, 0, 0, 565, 0, 0, 162, 225, 4, 226, ! 0, 227, 228, 163, 229, 0, 0, 164, 230, 0, ! 0, 0, 0, 0, 66, 0, 0, 67, 19, 0, ! 0, 0, 0, 0, 0, 231, 0, 128, 589, 0, ! 0, 6, 0, 0, 169, 170, 171, 172, 0, 0, ! 173, 174, 219, 0, 159, 160, 564, 220, 221, 64, ! 222, 0, 0, 223, 0, 0, 0, 224, 161, 0, ! 0, 565, 0, 0, 162, 225, 4, 226, 0, 227, ! 228, 163, 229, 0, 0, 164, 230, 0, 0, 0, ! 0, 0, 66, 0, 0, 67, 19, 0, 0, 0, ! 0, 0, 0, 231, 0, 128, 602, 0, 0, 6, ! 0, 0, 169, 170, 171, 172, 0, 0, 173, 174, ! 219, 0, 159, 160, 0, 220, 221, 64, 222, 0, ! 0, 223, 0, 0, 0, 224, 161, 0, 0, 0, ! 0, 0, 162, 225, 4, 226, 0, 227, 228, 163, ! 229, 0, 0, 164, 230, 0, 0, 0, 0, 0, ! 66, 0, 0, 67, 19, 0, 0, 0, 0, 0, ! 0, 231, 0, 128, 232, 0, 0, 6, 0, 0, ! 169, 170, 171, 172, 0, 0, 173, 174, 219, 0, ! 159, 160, 0, 220, 221, 64, 222, 0, 0, 223, ! 0, 0, 0, 224, 161, 0, 0, 0, 0, 0, ! 162, 225, 4, 226, 0, 227, 228, 163, 229, 0, ! 0, 164, 230, 0, 0, 0, 0, 0, 66, 0, ! 0, 67, 19, 0, 0, 0, 0, 0, 0, 231, ! 0, 128, 363, 0, 0, 6, 0, 0, 169, 170, ! 171, 172, 0, 0, 173, 174, 219, 0, 159, 160, ! 0, 220, 221, 64, 222, 0, 0, 223, 0, 0, ! 0, 224, 161, 0, 0, 0, 0, 0, 465, 225, ! 4, 226, 0, 227, 228, 163, 229, 0, 0, 466, ! 230, 0, 0, 0, 0, 0, 66, 0, 0, 67, ! 19, 0, 0, 0, 0, 0, 0, 231, 0, 128, ! 467, 0, 0, 6, 0, 0, 169, 170, 171, 172, ! 0, 0, 173, 174, 219, 0, 159, 160, 0, 220, ! 221, 64, 222, 0, 0, 223, 0, 0, 0, 224, ! 161, 0, 0, 0, 0, 0, 162, 225, 4, 226, ! 0, 227, 228, 163, 229, 0, 0, 164, 230, 0, ! 0, 0, 0, 0, 66, 0, 0, 67, 19, 0, ! 0, 0, 0, 0, 0, 231, 0, 128, 512, 0, ! 0, 6, 0, 0, 169, 170, 171, 172, 0, 0, ! 173, 174, 219, 0, 159, 160, 0, 220, 221, 64, ! 222, 0, 0, 223, 0, 0, 0, 224, 161, 0, ! 0, 0, 0, 0, 162, 225, 4, 226, 0, 227, ! 228, 163, 229, 0, 0, 164, 230, 0, 0, 0, ! 0, 0, 66, 0, 0, 67, 19, 0, 0, 0, ! 0, 0, 0, 231, 0, 128, 515, 0, 0, 6, ! 0, 0, 169, 170, 171, 172, 0, 0, 173, 174, ! 219, 0, 159, 160, 0, 220, 221, 64, 222, 0, ! 0, 223, 0, 0, 0, 224, 161, 0, 0, 0, ! 0, 0, 162, 225, 4, 226, 0, 227, 228, 163, ! 229, 0, 0, 164, 230, 0, 0, 0, 0, 0, ! 66, 0, 0, 67, 19, 0, 0, 0, 0, 0, ! 0, 231, 0, 128, 551, 0, 0, 6, 0, 0, ! 169, 170, 171, 172, 0, 0, 173, 174, 219, 0, ! 159, 160, 0, 220, 221, 64, 222, 0, 0, 223, ! 0, 0, 0, 224, 161, 0, 0, 0, 0, 0, ! 162, 225, 4, 226, 0, 227, 228, 163, 229, 0, ! 0, 164, 230, 0, 0, 0, 0, 0, 66, 0, ! 0, 67, 19, 0, 0, 0, 0, 0, 0, 231, ! 0, 128, 0, 0, 0, 6, 0, 0, 169, 170, ! 171, 172, 0, 0, 173, 174, 366, 0, 159, 160, ! 0, 220, 221, 64, 222, 0, 0, 223, 0, 0, ! 0, 224, 161, 0, 0, 0, 0, 0, 162, 225, ! 0, 226, 0, 227, 228, 163, 229, 0, 0, 164, ! 230, 0, 0, 0, 0, 0, 66, 0, 0, 67, ! 19, 0, 0, 0, 0, 0, 0, 231, 0, 128, ! 0, 0, 0, 6, 0, 0, 169, 170, 171, 172, ! 0, 0, 173, 174, 366, 0, 159, 160, 0, 530, ! 221, 64, 222, 0, 0, 223, 0, 0, 0, 224, ! 161, 0, 0, 0, 0, 0, 162, 225, 0, 226, ! 0, 227, 228, 163, 229, 0, 0, 164, 230, 0, ! 0, 0, 0, 0, 66, 0, 0, 67, 19, 0, ! 0, 0, 0, 0, 0, 231, 1, 128, 159, 160, ! 0, 6, 0, 64, 169, 170, 171, 172, 0, 0, ! 173, 174, 161, 0, 0, 0, 0, 0, 162, 0, ! 0, 0, 0, 159, 160, 163, 0, 0, 64, 164, ! 0, 0, 0, 0, 0, 0, 66, 161, 0, 67, ! 19, 0, 0, 162, 0, 0, 0, 231, 0, 0, ! 163, 0, 0, 0, 164, 0, 169, 170, 171, 172, ! 0, 66, 173, 174, 67, 19, 0, 0, 0, 0, ! 64, 0, 231, 0, 0, 0, 0, 0, 0, 161, ! 0, 169, 170, 171, 172, 162, 0, 173, 174, 0, ! 0, 0, 163, 0, 0, 0, 164, 0, 0, 0, ! 0, 0, 0, 66, 0, 0, 67, 19, 0, 0, ! 165, 166, 0, 0, 167, 0, 0, 0, 0, 0, ! 0, 0, 0, 169, 170, 171, 172, 0, 0, 173, ! 174 }; static const short yycheck[] = { ! 3, 4, 111, 103, 241, 288, 113, 108, 148, 1, ! 128, 168, 5, 401, 496, 15, 52, 88, 508, 1, ! 54, 8, 108, 10, 64, 52, 48, 0, 9, 8, ! 33, 34, 133, 36, 98, 8, 9, 10, 64, 140, ! 43, 63, 2, 30, 80, 5, 27, 133, 75, 496, ! 31, 30, 534, 80, 27, 537, 163, 30, 31, 123, ! 97, 125, 65, 44, 54, 99, 69, 37, 58, 88, ! 40, 44, 108, 70, 102, 260, 98, 37, 142, 52, ! 40, 108, 101, 96, 54, 112, 99, 534, 58, 89, ! 537, 581, 52, 397, 54, 88, 484, 133, 58, 102, ! 103, 128, 248, 108, 131, 97, 133, 80, 90, 255, ! 600, 257, 96, 417, 117, 75, 598, 107, 102, 101, ! 80, 53, 149, 73, 606, 128, 227, 609, 133, 611, ! 102, 44, 69, 233, 44, 108, 163, 107, 88, 112, ! 167, 51, 48, 113, 96, 148, 286, 107, 108, 62, ! 102, 598, 112, 113, 88, 68, 569, 63, 68, 606, ! 133, 101, 609, 52, 611, 102, 103, 101, 128, 473, ! 96, 131, 44, 133, 84, 588, 102, 87, 88, 176, ! 94, 282, 289, 186, 56, 99, 75, 491, 101, 149, ! 62, 80, 98, 163, 44, 96, 68, 157, 158, 159, ! 160, 102, 96, 163, 76, 165, 166, 167, 102, 99, ! 514, 238, 62, 128, 241, 279, 499, 103, 68, 108, ! 223, 534, 55, 112, 537, 108, 229, 60, 95, 101, ! 233, 44, 99, 260, 471, 99, 103, 234, 241, 103, ! 101, 52, 131, 56, 133, 248, 44, 404, 131, 62, ! 133, 278, 255, 51, 257, 68, 96, 90, 97, 99, ! 149, 288, 362, 103, 75, 96, 384, 96, 99, 80, ! 95, 575, 101, 102, 459, 460, 513, 100, 238, 392, ! 99, 241, 395, 286, 103, 598, 84, 260, 101, 87, ! 88, 100, 44, 606, 51, 298, 609, 108, 611, 51, ! 260, 112, 299, 300, 96, 278, 333, 304, 305, 101, ! 102, 99, 315, 316, 101, 288, 103, 128, 278, 289, ! 131, 97, 133, 508, 97, 101, 241, 84, 288, 289, ! 87, 88, 84, 248, 68, 87, 88, 98, 149, 73, ! 255, 102, 257, 77, 371, 260, 96, 448, 95, 238, ! 496, 469, 102, 590, 88, 100, 61, 384, 128, 362, ! 65, 321, 322, 323, 324, 325, 326, 327, 328, 329, ! 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, ! 340, 384, 100, 66, 493, 68, 96, 96, 534, 278, ! 73, 537, 102, 102, 77, 392, 581, 96, 395, 288, ! 546, 128, 496, 102, 101, 88, 103, 97, 509, 99, ! 519, 371, 97, 44, 560, 600, 93, 94, 95, 528, ! 51, 54, 99, 394, 384, 396, 103, 238, 574, 60, ! 241, 62, 102, 430, 5, 6, 7, 68, 398, 103, ! 534, 401, 469, 537, 471, 101, 102, 556, 103, 260, ! 103, 44, 598, 84, 101, 102, 87, 88, 51, 99, ! 606, 93, 94, 609, 103, 611, 469, 278, 471, 384, ! 571, 241, 499, 18, 19, 20, 21, 288, 248, 8, ! 9, 10, 371, 11, 128, 255, 513, 257, 93, 94, ! 260, 84, 12, 496, 87, 88, 46, 47, 157, 158, ! 159, 160, 13, 96, 598, 14, 165, 166, 511, 469, ! 513, 471, 606, 58, 241, 609, 95, 611, 326, 327, ! 328, 248, 333, 483, 484, 95, 499, 496, 255, 95, ! 257, 534, 95, 260, 537, 495, 3, 4, 95, 499, ! 44, 90, 569, 546, 459, 460, 101, 51, 329, 330, ! 331, 332, 95, 513, 469, 101, 471, 560, 16, 17, ! 371, 588, 101, 590, 97, 534, 569, 99, 537, 93, ! 94, 574, 68, 384, 46, 47, 46, 47, 324, 325, ! 84, 496, 99, 87, 88, 588, 96, 590, 95, 68, ! 128, 68, 96, 508, 95, 598, 98, 241, 513, 334, ! 335, 101, 101, 606, 248, 96, 609, 101, 611, 569, ! 499, 255, 101, 257, 384, 102, 260, 0, 67, 534, ! 102, 101, 537, 96, 95, 8, 9, 10, 588, 598, ! 590, 546, 100, 95, 100, 90, 96, 606, 101, 95, ! 609, 95, 611, 96, 27, 560, 96, 30, 31, 101, ! 95, 95, 100, 96, 569, 97, 97, 384, 469, 574, ! 471, 44, 321, 322, 323, 101, 581, 97, 95, 52, ! 57, 128, 57, 588, 96, 590, 101, 96, 96, 95, ! 101, 90, 96, 598, 101, 600, 101, 90, 499, 459, ! 460, 606, 96, 101, 609, 101, 611, 80, 57, 469, ! 88, 471, 513, 241, 0, 93, 94, 95, 101, 0, ! 248, 99, 8, 9, 10, 103, 96, 255, 0, 257, ! 333, 10, 260, 46, 62, 108, 496, 117, 133, 131, ! 278, 27, 459, 460, 30, 31, 45, 380, 508, 398, ! 384, 80, 469, 513, 471, 260, 88, 567, 44, 567, ! 133, 93, 94, 95, 128, 260, 449, 99, 569, 300, ! 449, 103, 336, 338, 534, 337, 339, 537, 344, 496, ! 495, 340, -1, -1, -1, -1, 546, 588, -1, 590, ! -1, 508, -1, -1, 241, -1, 513, -1, -1, -1, ! 560, 248, -1, -1, -1, -1, -1, 128, 255, 569, ! 257, -1, -1, 260, 574, -1, -1, 534, -1, -1, ! 537, 581, 108, -1, -1, 459, 460, -1, 588, 546, ! 590, -1, -1, -1, 483, 469, -1, 471, 598, -1, ! 600, -1, -1, 560, -1, -1, 606, 133, -1, 609, ! -1, 611, 569, -1, -1, -1, 384, 574, -1, -1, ! -1, -1, 496, -1, 581, -1, -1, -1, -1, -1, ! -1, 588, -1, 590, 508, -1, -1, 241, -1, 513, ! -1, 598, -1, 600, 248, -1, -1, -1, -1, 606, ! -1, 255, 609, 257, 611, -1, 260, -1, -1, -1, ! 534, -1, -1, 537, -1, -1, -1, -1, -1, -1, ! -1, -1, 546, 118, -1, -1, -1, -1, -1, -1, ! 241, -1, -1, -1, -1, -1, 560, 248, -1, -1, ! -1, 459, 460, -1, 255, 569, 257, 384, -1, 260, ! 574, 469, -1, 471, -1, -1, -1, 581, -1, -1, ! -1, -1, -1, -1, 588, -1, 590, -1, -1, -1, ! 44, -1, 167, 168, 598, -1, 600, 51, 496, -1, ! -1, -1, 606, -1, -1, 609, 60, 611, 62, -1, ! 508, -1, -1, -1, 68, 513, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! 84, -1, -1, 87, 88, -1, 534, -1, -1, 537, ! -1, -1, 459, 460, 98, -1, 221, -1, 546, 224, ! 384, -1, 469, -1, 471, 230, 231, -1, -1, -1, ! -1, -1, 560, -1, -1, -1, -1, -1, -1, -1, ! -1, 569, -1, -1, -1, -1, 574, -1, -1, 496, ! -1, -1, -1, 581, -1, -1, -1, -1, -1, -1, ! 588, 508, 590, 384, -1, -1, 513, -1, -1, -1, ! 598, -1, 600, -1, -1, -1, -1, -1, 606, -1, ! -1, 609, -1, 611, -1, -1, -1, 534, -1, -1, ! 537, -1, -1, -1, -1, 459, 460, -1, -1, 546, ! -1, -1, -1, -1, -1, 469, -1, 471, -1, 314, ! -1, -1, 317, 560, -1, -1, -1, -1, -1, -1, ! -1, -1, 569, -1, -1, -1, -1, 574, -1, -1, ! -1, -1, 496, -1, 581, -1, 341, -1, 459, 460, ! 345, 588, -1, 590, 508, -1, 351, 352, 469, 513, ! 471, 598, -1, 600, -1, -1, -1, -1, -1, 606, ! -1, -1, 609, -1, 611, -1, -1, -1, -1, -1, ! 534, 376, 377, 537, -1, 496, -1, -1, -1, -1, ! -1, -1, 546, -1, -1, -1, 391, 508, -1, -1, ! -1, -1, 513, -1, -1, -1, 560, -1, -1, 404, ! 157, 158, 159, 160, -1, 569, -1, -1, 165, 166, ! 574, -1, -1, 534, -1, -1, 537, 581, -1, -1, ! 157, 158, 159, 160, 588, 546, 590, -1, 165, 166, ! 1, -1, 3, 4, 598, -1, 600, -1, -1, 560, ! -1, -1, 606, -1, -1, 609, -1, 611, 569, 454, ! -1, -1, -1, 574, 44, -1, -1, -1, -1, -1, ! 581, 51, -1, -1, -1, -1, -1, 588, -1, 590, ! 60, -1, 62, -1, -1, 46, 47, 598, 68, 600, ! 51, -1, -1, -1, 489, 606, -1, -1, 609, 60, ! 611, -1, -1, -1, 84, 66, -1, 87, 88, 504, ! -1, -1, 73, -1, -1, -1, 77, 97, 98, -1, ! -1, 101, -1, 84, -1, -1, 87, 88, -1, -1, ! 91, 92, -1, -1, 95, -1, -1, -1, -1, -1, ! -1, -1, -1, 104, 105, 106, 107, -1, -1, 110, ! 111, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, 559, -1, -1, -1, 563, -1, ! 565, -1, -1, -1, 321, 322, 323, 324, 325, 326, ! 327, 328, 329, 330, 331, 332, -1, 334, 335, 336, ! 337, 338, 339, 340, 321, 322, 323, 324, 325, 326, ! 327, 328, 329, 330, 331, 332, -1, 334, 335, 336, ! 337, 338, 339, 340, 1, -1, 3, 4, 44, -1, ! -1, -1, -1, 44, -1, 51, -1, -1, -1, -1, ! 51, -1, -1, -1, 60, -1, 62, -1, -1, 60, ! -1, 62, 68, -1, -1, -1, -1, 68, -1, -1, ! -1, 398, -1, -1, 401, -1, -1, -1, 84, 46, ! 47, 87, 88, 84, 51, -1, 87, 88, -1, -1, ! -1, 398, 98, 60, 401, -1, 97, 98, -1, 66, ! 101, -1, -1, -1, -1, -1, 73, -1, -1, -1, ! 77, -1, -1, -1, -1, 3, 4, 84, -1, -1, ! 87, 88, -1, -1, 91, 92, -1, -1, 95, -1, ! -1, -1, -1, -1, -1, -1, -1, 104, 105, 106, ! 107, -1, -1, 110, 111, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, 483, 484, 46, 47, ! -1, -1, -1, 51, -1, -1, -1, -1, 495, -1, ! -1, -1, 60, -1, -1, -1, 483, 484, 66, -1, ! -1, 3, 4, -1, -1, 73, -1, -1, 495, 77, ! -1, -1, -1, -1, -1, -1, 84, -1, -1, 87, ! 88, -1, -1, 91, 92, -1, -1, 95, -1, 97, ! 98, -1, -1, -1, 102, -1, 104, 105, 106, 107, ! -1, -1, 110, 111, 46, 47, -1, -1, -1, 51, ! -1, -1, -1, -1, -1, -1, -1, -1, 60, -1, ! -1, -1, -1, -1, 66, -1, -1, 3, 4, -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, ! -1, -1, 84, -1, -1, 87, 88, -1, -1, 91, ! 92, -1, -1, 95, -1, 97, 98, -1, -1, -1, ! -1, -1, 104, 105, 106, 107, -1, -1, 110, 111, ! 46, 47, -1, -1, -1, 51, -1, -1, -1, 3, ! 4, -1, -1, -1, 60, -1, -1, -1, -1, -1, ! 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, ! -1, 77, -1, -1, -1, -1, -1, -1, 84, -1, ! -1, 87, 88, -1, -1, 91, 92, -1, -1, 95, ! -1, 97, 46, 47, -1, -1, -1, 51, 104, 105, ! 106, 107, -1, -1, 110, 111, 60, -1, -1, -1, ! -1, -1, 66, -1, -1, 3, 4, -1, -1, 73, ! -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, ! 84, -1, -1, 87, 88, -1, -1, 91, 92, -1, ! -1, 95, -1, -1, -1, -1, -1, 101, -1, -1, ! 104, 105, 106, 107, -1, -1, 110, 111, 46, 47, ! -1, -1, -1, 51, -1, -1, -1, 3, 4, -1, -1, -1, 60, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, ! -1, -1, -1, -1, -1, -1, 84, -1, -1, 87, ! 88, -1, -1, 91, 92, -1, -1, 95, 96, -1, ! 46, 47, -1, -1, -1, 51, 104, 105, 106, 107, ! -1, -1, 110, 111, 60, -1, -1, -1, -1, -1, ! 66, -1, -1, 3, 4, -1, -1, 73, -1, -1, ! -1, 77, -1, -1, -1, -1, -1, -1, 84, -1, ! -1, 87, 88, -1, -1, 91, 92, -1, -1, 95, ! -1, -1, -1, -1, 100, -1, -1, -1, 104, 105, ! 106, 107, -1, -1, 110, 111, 46, 47, -1, -1, ! -1, 51, -1, -1, -1, 3, 4, -1, -1, -1, 60, -1, -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, -1, -1, ! -1, -1, -1, -1, 84, -1, -1, 87, 88, -1, ! -1, 91, 92, -1, -1, 95, -1, -1, 46, 47, ! -1, 101, -1, 51, 104, 105, 106, 107, -1, -1, ! 110, 111, 60, -1, -1, -1, -1, -1, 66, -1, ! -1, 3, 4, -1, -1, 73, -1, -1, -1, 77, ! -1, -1, -1, -1, -1, -1, 84, -1, -1, 87, ! 88, -1, -1, 91, 92, -1, -1, 95, 96, -1, ! -1, -1, -1, -1, -1, -1, 104, 105, 106, 107, ! -1, -1, 110, 111, 46, 47, -1, -1, -1, 51, ! -1, -1, -1, 3, 4, -1, -1, -1, 60, -1, ! -1, -1, -1, -1, 66, -1, -1, -1, -1, -1, ! -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, ! -1, -1, 84, -1, -1, 87, 88, -1, -1, 91, ! 92, -1, -1, 95, 96, -1, 46, 47, -1, -1, ! -1, 51, 104, 105, 106, 107, -1, -1, 110, 111, ! 60, -1, -1, -1, -1, -1, 66, -1, -1, 3, ! 4, -1, -1, 73, -1, -1, -1, 77, -1, -1, ! -1, -1, -1, -1, 84, -1, -1, 87, 88, -1, ! -1, 91, 92, -1, -1, 95, 96, -1, -1, -1, ! -1, -1, -1, -1, 104, 105, 106, 107, -1, -1, ! 110, 111, 46, 47, -1, -1, -1, 51, -1, -1, ! -1, 3, 4, -1, -1, -1, 60, -1, -1, -1, ! -1, -1, 66, -1, -1, -1, -1, -1, -1, 73, ! -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, ! 84, -1, -1, 87, 88, -1, -1, 91, 92, -1, ! -1, 95, 96, -1, 46, 47, -1, -1, -1, 51, ! 104, 105, 106, 107, -1, -1, 110, 111, 60, -1, ! -1, -1, -1, -1, 66, -1, -1, 3, 4, -1, ! -1, 73, -1, -1, -1, 77, -1, -1, -1, -1, ! -1, -1, 84, -1, -1, 87, 88, -1, -1, 91, ! 92, -1, -1, 95, 96, -1, -1, -1, -1, -1, ! -1, -1, 104, 105, 106, 107, -1, -1, 110, 111, ! 46, 47, -1, -1, -1, 51, -1, -1, -1, 3, ! 4, -1, -1, -1, 60, -1, -1, -1, -1, -1, ! 66, -1, -1, -1, -1, -1, -1, 73, -1, -1, ! -1, 77, -1, -1, -1, -1, -1, -1, 84, -1, ! -1, 87, 88, -1, -1, 91, 92, -1, -1, 95, ! -1, -1, 46, 47, -1, 101, -1, 51, 104, 105, ! 106, 107, -1, -1, 110, 111, 60, -1, -1, -1, ! -1, -1, 66, -1, -1, 3, 4, -1, -1, 73, ! -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, ! 84, -1, -1, 87, 88, -1, -1, 91, 92, -1, ! -1, 95, 96, -1, -1, -1, -1, -1, -1, -1, ! 104, 105, 106, 107, -1, -1, 110, 111, 46, 47, ! -1, -1, -1, 51, -1, -1, -1, -1, -1, -1, ! -1, -1, 60, -1, -1, -1, -1, -1, 66, -1, ! -1, -1, -1, -1, -1, 73, -1, -1, -1, 77, ! -1, -1, -1, -1, -1, -1, 84, -1, -1, 87, ! 88, -1, -1, 91, 92, -1, -1, 95, -1, -1, ! -1, -1, -1, -1, -1, -1, 104, 105, 106, 107, ! -1, -1, 110, 111, 44, -1, 46, 47, 48, 49, ! 50, 51, 52, -1, -1, 55, -1, -1, -1, 59, ! 60, -1, -1, 63, -1, -1, 66, 67, 68, 69, ! -1, 71, 72, 73, 74, -1, -1, 77, 78, -1, ! -1, -1, -1, -1, 84, -1, -1, 87, 88, -1, ! -1, -1, -1, -1, -1, 95, -1, 97, 98, -1, ! -1, 101, -1, -1, 104, 105, 106, 107, -1, -1, ! 110, 111, 44, -1, 46, 47, 48, 49, 50, 51, 52, -1, -1, 55, -1, -1, -1, 59, 60, -1, ! -1, 63, -1, -1, 66, 67, 68, 69, -1, 71, ! 72, 73, 74, -1, -1, 77, 78, -1, -1, -1, ! -1, -1, 84, -1, -1, 87, 88, -1, -1, -1, ! -1, -1, -1, 95, -1, 97, 98, -1, -1, 101, ! -1, -1, 104, 105, 106, 107, -1, -1, 110, 111, ! 44, -1, 46, 47, -1, 49, 50, 51, 52, -1, ! -1, 55, -1, -1, -1, 59, 60, -1, -1, -1, ! -1, -1, 66, 67, 68, 69, -1, 71, 72, 73, ! 74, -1, -1, 77, 78, -1, -1, -1, -1, -1, ! 84, -1, -1, 87, 88, -1, -1, -1, -1, -1, ! -1, 95, -1, 97, 98, -1, -1, 101, -1, -1, ! 104, 105, 106, 107, -1, -1, 110, 111, 44, -1, ! 46, 47, -1, 49, 50, 51, 52, -1, -1, 55, ! -1, -1, -1, 59, 60, -1, -1, -1, -1, -1, ! 66, 67, 68, 69, -1, 71, 72, 73, 74, -1, ! -1, 77, 78, -1, -1, -1, -1, -1, 84, -1, ! -1, 87, 88, -1, -1, -1, -1, -1, -1, 95, ! -1, 97, 98, -1, -1, 101, -1, -1, 104, 105, ! 106, 107, -1, -1, 110, 111, 44, -1, 46, 47, -1, 49, 50, 51, 52, -1, -1, 55, -1, -1, -1, 59, 60, -1, -1, -1, -1, -1, 66, 67, 68, 69, -1, 71, 72, 73, 74, -1, -1, 77, ! 78, -1, -1, -1, -1, -1, 84, -1, -1, 87, ! 88, -1, -1, -1, -1, -1, -1, 95, -1, 97, ! 98, -1, -1, 101, -1, -1, 104, 105, 106, 107, ! -1, -1, 110, 111, 44, -1, 46, 47, -1, 49, ! 50, 51, 52, -1, -1, 55, -1, -1, -1, 59, ! 60, -1, -1, -1, -1, -1, 66, 67, 68, 69, ! -1, 71, 72, 73, 74, -1, -1, 77, 78, -1, ! -1, -1, -1, -1, 84, -1, -1, 87, 88, -1, ! -1, -1, -1, -1, -1, 95, -1, 97, 98, -1, ! -1, 101, -1, -1, 104, 105, 106, 107, -1, -1, ! 110, 111, 44, -1, 46, 47, -1, 49, 50, 51, ! 52, -1, -1, 55, -1, -1, -1, 59, 60, -1, ! -1, -1, -1, -1, 66, 67, 68, 69, -1, 71, ! 72, 73, 74, -1, -1, 77, 78, -1, -1, -1, ! -1, -1, 84, -1, -1, 87, 88, -1, -1, -1, ! -1, -1, -1, 95, -1, 97, 98, -1, -1, 101, ! -1, -1, 104, 105, 106, 107, -1, -1, 110, 111, 44, -1, 46, 47, -1, 49, 50, 51, 52, -1, -1, 55, -1, -1, -1, 59, 60, -1, -1, -1, -1, -1, 66, 67, 68, 69, -1, 71, 72, 73, ! 74, -1, -1, 77, 78, -1, -1, -1, -1, -1, ! 84, -1, -1, 87, 88, -1, -1, -1, -1, -1, ! -1, 95, -1, 97, 98, -1, -1, 101, -1, -1, ! 104, 105, 106, 107, -1, -1, 110, 111, 44, -1, ! 46, 47, -1, 49, 50, 51, 52, -1, -1, 55, ! -1, -1, -1, 59, 60, -1, -1, -1, -1, -1, ! 66, 67, 68, 69, -1, 71, 72, 73, 74, -1, ! -1, 77, 78, -1, -1, -1, -1, -1, 84, -1, ! -1, 87, 88, -1, -1, -1, -1, -1, -1, 95, ! -1, 97, -1, -1, -1, 101, -1, -1, 104, 105, ! 106, 107, -1, -1, 110, 111, 44, -1, 46, 47, ! -1, 49, 50, 51, 52, -1, -1, 55, -1, -1, ! -1, 59, 60, -1, -1, -1, -1, -1, 66, 67, ! -1, 69, -1, 71, 72, 73, 74, -1, -1, 77, ! 78, -1, -1, -1, -1, -1, 84, -1, -1, 87, ! 88, -1, -1, -1, -1, -1, -1, 95, -1, 97, ! -1, -1, -1, 101, -1, -1, 104, 105, 106, 107, ! -1, -1, 110, 111, 44, -1, 46, 47, -1, 49, 50, 51, 52, -1, -1, 55, -1, -1, -1, 59, 60, -1, -1, -1, -1, -1, 66, 67, -1, 69, ! -1, 71, 72, 73, 74, -1, -1, 77, 78, -1, ! -1, -1, -1, -1, 84, -1, -1, 87, 88, -1, ! -1, -1, -1, -1, -1, 95, 44, 97, 46, 47, ! -1, 101, -1, 51, 104, 105, 106, 107, -1, -1, ! 110, 111, 60, -1, -1, -1, -1, -1, 66, -1, ! -1, -1, -1, 46, 47, 73, -1, -1, 51, 77, ! -1, -1, -1, -1, -1, -1, 84, 60, -1, 87, ! 88, -1, -1, 66, -1, -1, -1, 95, -1, -1, ! 73, -1, -1, -1, 77, -1, 104, 105, 106, 107, ! -1, 84, 110, 111, 87, 88, -1, -1, -1, -1, ! 51, -1, 95, -1, -1, -1, -1, -1, -1, 60, ! -1, 104, 105, 106, 107, 66, -1, 110, 111, -1, ! -1, -1, 73, -1, -1, -1, 77, -1, -1, -1, ! -1, -1, -1, 84, -1, -1, 87, 88, -1, -1, ! 91, 92, -1, -1, 95, -1, -1, -1, -1, -1, ! -1, -1, -1, 104, 105, 106, 107, -1, -1, 110, ! 111 }; + #define YYPURE 1 ! /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ ! #line 3 "/usr/share/bison/bison.simple" ! ! /* Skeleton output parser for bison, ! ! Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software ! Foundation, Inc. ! ! This program is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) ! any later version. ! ! This program is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! GNU General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with this program; if not, write to the Free Software ! Foundation, Inc., 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ ! ! /* As a special exception, when this file is copied by Bison into a ! Bison output file, you may use that output file without restriction. ! This special exception was added by the Free Software Foundation ! in version 1.24 of Bison. */ ! ! /* This is the parser code that is written into each bison parser when ! the %semantic_parser declaration is not specified in the grammar. ! It was written by Richard Stallman by simplifying the hairy parser ! used when %semantic_parser is specified. */ ! ! /* All symbols defined below should begin with yy or YY, to avoid ! infringing on user name space. This should be done even for local ! variables, as they might otherwise be expanded by user macros. ! There are some unavoidable exceptions within include files to ! define necessary library symbols; they are noted "INFRINGES ON ! USER NAME SPACE" below. */ ! ! #if ! defined (yyoverflow) || defined (YYERROR_VERBOSE) ! ! /* The parser invokes alloca or malloc; define the necessary symbols. */ ! ! # if YYSTACK_USE_ALLOCA ! # define YYSTACK_ALLOC alloca ! # else ! # ifndef YYSTACK_USE_ALLOCA ! # if defined (alloca) || defined (_ALLOCA_H) ! # define YYSTACK_ALLOC alloca ! # else ! # ifdef __GNUC__ ! # define YYSTACK_ALLOC __builtin_alloca ! # endif ! # endif ! # endif ! # endif ! ! # ifdef YYSTACK_ALLOC ! /* Pacify GCC's `empty if-body' warning. */ ! # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) ! # else ! # if defined (__STDC__) || defined (__cplusplus) ! # include /* INFRINGES ON USER NAME SPACE */ ! # define YYSIZE_T size_t ! # endif ! # define YYSTACK_ALLOC malloc ! # define YYSTACK_FREE free ! # endif ! #endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */ ! ! ! #if (! defined (yyoverflow) \ ! && (! defined (__cplusplus) \ ! || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) ! ! /* A type that is properly aligned for any stack member. */ ! union yyalloc { ! short yyss; ! YYSTYPE yyvs; ! # if YYLSP_NEEDED ! YYLTYPE yyls; ! # endif }; + /* The size of the maximum gap between one aligned stack and the next. */ + # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1) + + /* The size of an array large to enough to hold all stacks, each with + N elements. */ + # if YYLSP_NEEDED + # define YYSTACK_BYTES(N) \ + ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ + + 2 * YYSTACK_GAP_MAX) + # else + # define YYSTACK_BYTES(N) \ + ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAX) + # endif + + /* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ + # ifndef YYCOPY + # if 1 < __GNUC__ + # define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) + # else + # define YYCOPY(To, From, Count) \ + do \ + { \ + register YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (0) + # endif + # endif + + /* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ + # define YYSTACK_RELOCATE(Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack, Stack, yysize); \ + Stack = &yyptr->Stack; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) + + #endif + + #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) # define YYSIZE_T __SIZE_TYPE__ #endif *************** static const unsigned short yystos[] = *** 1857,1890 **** #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) ! #define YYEMPTY (-2) #define YYEOF 0 - #define YYACCEPT goto yyacceptlab ! #define YYABORT goto yyabortlab #define YYERROR goto yyerrlab1 - /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ - #define YYFAIL goto yyerrlab - #define YYRECOVERING() (!!yyerrstatus) - #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ ! yytoken = YYTRANSLATE (yychar); \ YYPOPSTACK; \ goto yybackup; \ } \ else \ { \ ! yyerror ("syntax error: cannot back up");\ YYERROR; \ } \ while (0) --- 1648,1676 ---- #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) ! #define YYEMPTY -2 #define YYEOF 0 #define YYACCEPT goto yyacceptlab ! #define YYABORT goto yyabortlab #define YYERROR goto yyerrlab1 /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ #define YYFAIL goto yyerrlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ ! yychar1 = YYTRANSLATE (yychar); \ YYPOPSTACK; \ goto yybackup; \ } \ else \ { \ ! yyerror ("syntax error: cannot back up"); \ YYERROR; \ } \ while (0) *************** while (0) *** 1892,1915 **** #define YYTERROR 1 #define YYERRCODE 256 /* YYLLOC_DEFAULT -- Compute the default location (before the actions ! are run). */ #ifndef YYLLOC_DEFAULT ! # define YYLLOC_DEFAULT(Current, Rhs, N) \ ! Current.first_line = Rhs[1].first_line; \ ! Current.first_column = Rhs[1].first_column; \ ! Current.last_line = Rhs[N].last_line; \ ! Current.last_column = Rhs[N].last_column; #endif /* YYLEX -- calling `yylex' with the right arguments. */ ! #ifdef YYLEX_PARAM ! # define YYLEX yylex (&yylval, YYLEX_PARAM) ! #else ! # define YYLEX yylex (&yylval) ! #endif /* Enable debugging if requested. */ #if YYDEBUG --- 1678,1718 ---- #define YYTERROR 1 #define YYERRCODE 256 + /* YYLLOC_DEFAULT -- Compute the default location (before the actions ! are run). ! ! When YYLLOC_DEFAULT is run, CURRENT is set the location of the ! first token. By default, to implement support for ranges, extend ! its range to the last symbol. */ #ifndef YYLLOC_DEFAULT ! # define YYLLOC_DEFAULT(Current, Rhs, N) \ ! Current.last_line = Rhs[N].last_line; \ ! Current.last_column = Rhs[N].last_column; #endif + /* YYLEX -- calling `yylex' with the right arguments. */ ! #if YYPURE ! # if YYLSP_NEEDED ! # ifdef YYLEX_PARAM ! # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) ! # else ! # define YYLEX yylex (&yylval, &yylloc) ! # endif ! # else /* !YYLSP_NEEDED */ ! # ifdef YYLEX_PARAM ! # define YYLEX yylex (&yylval, YYLEX_PARAM) ! # else ! # define YYLEX yylex (&yylval) ! # endif ! # endif /* !YYLSP_NEEDED */ ! #else /* !YYPURE */ ! # define YYLEX yylex () ! #endif /* !YYPURE */ ! /* Enable debugging if requested. */ #if YYDEBUG *************** do { \ *** 1924,2016 **** if (yydebug) \ YYFPRINTF Args; \ } while (0) - - # define YYDSYMPRINT(Args) \ - do { \ - if (yydebug) \ - yysymprint Args; \ - } while (0) - - # define YYDSYMPRINTF(Title, Token, Value, Location) \ - do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yysymprint (stderr, \ - Token, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ - } while (0) - - /*------------------------------------------------------------------. - | yy_stack_print -- Print the state stack from its BOTTOM up to its | - | TOP (cinluded). | - `------------------------------------------------------------------*/ - - #if defined (__STDC__) || defined (__cplusplus) - static void - yy_stack_print (short *bottom, short *top) - #else - static void - yy_stack_print (bottom, top) - short *bottom; - short *top; - #endif - { - YYFPRINTF (stderr, "Stack now"); - for (/* Nothing. */; bottom <= top; ++bottom) - YYFPRINTF (stderr, " %d", *bottom); - YYFPRINTF (stderr, "\n"); - } - - # define YY_STACK_PRINT(Bottom, Top) \ - do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ - } while (0) - - - /*------------------------------------------------. - | Report that the YYRULE is going to be reduced. | - `------------------------------------------------*/ - - #if defined (__STDC__) || defined (__cplusplus) - static void - yy_reduce_print (int yyrule) - #else - static void - yy_reduce_print (yyrule) - int yyrule; - #endif - { - int yyi; - unsigned int yylineno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", - yyrule - 1, yylineno); - /* Print the symbols being reduced, and their result. */ - for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) - YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); - YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]); - } - - # define YY_REDUCE_PRINT(Rule) \ - do { \ - if (yydebug) \ - yy_reduce_print (Rule); \ - } while (0) - /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) - # define YYDSYMPRINT(Args) - # define YYDSYMPRINTF(Title, Token, Value, Location) - # define YY_STACK_PRINT(Bottom, Top) - # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ - /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 --- 1727,1739 ---- *************** int yydebug; *** 2030,2039 **** #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif - ! ! #if YYERROR_VERBOSE # ifndef yystrlen # if defined (__GLIBC__) && defined (_STRING_H) --- 1753,1760 ---- #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif ! #ifdef YYERROR_VERBOSE # ifndef yystrlen # if defined (__GLIBC__) && defined (_STRING_H) *************** yystpcpy (yydest, yysrc) *** 2083,2208 **** } # endif # endif - - #endif /* !YYERROR_VERBOSE */ - - - - #if YYDEBUG - /*--------------------------------. - | Print this symbol on YYOUTPUT. | - `--------------------------------*/ - - #if defined (__STDC__) || defined (__cplusplus) - static void - yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) - #else - static void - yysymprint (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE *yyvaluep; #endif - { - /* Pacify ``unused variable'' warnings. */ - (void) yyvaluep; - - if (yytype < YYNTOKENS) - { - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - # ifdef YYPRINT - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); - # endif - } - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - - switch (yytype) - { - default: - break; - } - YYFPRINTF (yyoutput, ")"); - } - - #endif /* ! YYDEBUG */ - /*-----------------------------------------------. - | Release the memory associated to this symbol. | - `-----------------------------------------------*/ - - #if defined (__STDC__) || defined (__cplusplus) - static void - yydestruct (int yytype, YYSTYPE *yyvaluep) - #else - static void - yydestruct (yytype, yyvaluep) - int yytype; - YYSTYPE *yyvaluep; - #endif - { - /* Pacify ``unused variable'' warnings. */ - (void) yyvaluep; - - switch (yytype) - { - - default: - break; - } - } ! /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM # if defined (__STDC__) || defined (__cplusplus) ! int yyparse (void *YYPARSE_PARAM); # else ! int yyparse (); # endif ! #else /* ! YYPARSE_PARAM */ ! #if defined (__STDC__) || defined (__cplusplus) int yyparse (void); ! #else ! int yyparse (); #endif - #endif /* ! YYPARSE_PARAM */ ! /*----------. ! | yyparse. | ! `----------*/ - #ifdef YYPARSE_PARAM - # if defined (__STDC__) || defined (__cplusplus) - int yyparse (void *YYPARSE_PARAM) - # else - int yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; - # endif - #else /* ! YYPARSE_PARAM */ - #if defined (__STDC__) || defined (__cplusplus) - int - yyparse (void) - #else int ! yyparse () ! ! #endif ! #endif { ! /* The lookahead symbol. */ ! int yychar; ! ! /* The semantic value of the lookahead symbol. */ ! YYSTYPE yylval; ! ! /* Number of syntax errors so far. */ ! int yynerrs; register int yystate; register int yyn; --- 1804,1881 ---- } # endif # endif #endif + #line 315 "/usr/share/bison/bison.simple" ! ! /* The user can define YYPARSE_PARAM as the name of an argument to be passed ! into yyparse. The argument should have type void *. ! It should actually point to an object. ! Grammar actions can access the variable by casting it ! to the proper pointer type. */ #ifdef YYPARSE_PARAM # if defined (__STDC__) || defined (__cplusplus) ! # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM ! # define YYPARSE_PARAM_DECL # else ! # define YYPARSE_PARAM_ARG YYPARSE_PARAM ! # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; # endif ! #else /* !YYPARSE_PARAM */ ! # define YYPARSE_PARAM_ARG ! # define YYPARSE_PARAM_DECL ! #endif /* !YYPARSE_PARAM */ ! ! /* Prevent warning if -Wstrict-prototypes. */ ! #ifdef __GNUC__ ! # ifdef YYPARSE_PARAM ! int yyparse (void *); ! # else int yyparse (void); ! # endif #endif + /* YY_DECL_VARIABLES -- depending whether we use a pure parser, + variables are global, or local to YYPARSE. */ + #define YY_DECL_NON_LSP_VARIABLES \ + /* The lookahead symbol. */ \ + int yychar; \ + \ + /* The semantic value of the lookahead symbol. */ \ + YYSTYPE yylval; \ + \ + /* Number of parse errors so far. */ \ + int yynerrs; + #if YYLSP_NEEDED + # define YY_DECL_VARIABLES \ + YY_DECL_NON_LSP_VARIABLES \ + \ + /* Location data for the lookahead symbol. */ \ + YYLTYPE yylloc; + #else + # define YY_DECL_VARIABLES \ + YY_DECL_NON_LSP_VARIABLES + #endif + /* If nonreentrant, generate the variables here. */ ! #if !YYPURE ! YY_DECL_VARIABLES ! #endif /* !YYPURE */ int ! yyparse (YYPARSE_PARAM_ARG) ! YYPARSE_PARAM_DECL { ! /* If reentrant, generate the variables here. */ ! #if YYPURE ! YY_DECL_VARIABLES ! #endif /* !YYPURE */ register int yystate; register int yyn; *************** int yynerrs; *** 2210,2216 **** /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* Lookahead token as an internal (translated) token number. */ ! int yytoken = 0; /* Three stacks and their tools: `yyss': related to states, --- 1883,1889 ---- /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* Lookahead token as an internal (translated) token number. */ ! int yychar1 = 0; /* Three stacks and their tools: `yyss': related to states, *************** int yynerrs; *** 2220,2226 **** Refer to the stacks thru separate pointers, to allow yyoverflow to reallocate them elsewhere. */ ! /* The state stack. */ short yyssa[YYINITDEPTH]; short *yyss = yyssa; register short *yyssp; --- 1893,1899 ---- Refer to the stacks thru separate pointers, to allow yyoverflow to reallocate them elsewhere. */ ! /* The state stack. */ short yyssa[YYINITDEPTH]; short *yyss = yyssa; register short *yyssp; *************** int yynerrs; *** 2230,2248 **** YYSTYPE *yyvs = yyvsa; register YYSTYPE *yyvsp; ! ! #define YYPOPSTACK (yyvsp--, yyssp--) YYSIZE_T yystacksize = YYINITDEPTH; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; ! /* When reducing, the number of symbols on the RHS of the reduced ! rule. */ int yylen; YYDPRINTF ((stderr, "Starting parse\n")); --- 1903,1933 ---- YYSTYPE *yyvs = yyvsa; register YYSTYPE *yyvsp; + #if YYLSP_NEEDED + /* The location stack. */ + YYLTYPE yylsa[YYINITDEPTH]; + YYLTYPE *yyls = yylsa; + YYLTYPE *yylsp; + #endif ! #if YYLSP_NEEDED ! # define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) ! #else ! # define YYPOPSTACK (yyvsp--, yyssp--) ! #endif YYSIZE_T yystacksize = YYINITDEPTH; + /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; ! #if YYLSP_NEEDED ! YYLTYPE yyloc; ! #endif /* When reducing, the number of symbols on the RHS of the reduced ! rule. */ int yylen; YYDPRINTF ((stderr, "Starting parse\n")); *************** int yynerrs; *** 2259,2265 **** yyssp = yyss; yyvsp = yyvs; ! goto yysetstate; /*------------------------------------------------------------. --- 1944,1952 ---- yyssp = yyss; yyvsp = yyvs; ! #if YYLSP_NEEDED ! yylsp = yyls; ! #endif goto yysetstate; /*------------------------------------------------------------. *************** int yynerrs; *** 2274,2280 **** yysetstate: *yyssp = yystate; ! if (yyss + yystacksize - 1 <= yyssp) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; --- 1961,1967 ---- yysetstate: *yyssp = yystate; ! if (yyssp >= yyss + yystacksize - 1) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; *************** int yynerrs; *** 2287,2303 **** YYSTYPE *yyvs1 = yyvs; short *yyss1 = yyss; - /* Each stack pointer address is followed by the size of the ! data in use in that stack, in bytes. This used to be a ! conditional around just the two extra args, but that might ! be undefined if yyoverflow is a macro. */ yyoverflow ("parser stack overflow", &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), ! &yystacksize); ! yyss = yyss1; yyvs = yyvs1; } --- 1974,1997 ---- YYSTYPE *yyvs1 = yyvs; short *yyss1 = yyss; /* Each stack pointer address is followed by the size of the ! data in use in that stack, in bytes. */ ! # if YYLSP_NEEDED ! YYLTYPE *yyls1 = yyls; ! /* This used to be a conditional around just the two extra args, ! but that might be undefined if yyoverflow is a macro. */ yyoverflow ("parser stack overflow", &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), ! &yyls1, yysize * sizeof (*yylsp), &yystacksize); ! yyls = yyls1; ! # else ! yyoverflow ("parser stack overflow", ! &yyss1, yysize * sizeof (*yyssp), ! &yyvs1, yysize * sizeof (*yyvsp), ! &yystacksize); ! # endif yyss = yyss1; yyvs = yyvs1; } *************** int yynerrs; *** 2306,2315 **** goto yyoverflowlab; # else /* Extend the stack our own way. */ ! if (YYMAXDEPTH <= yystacksize) goto yyoverflowlab; yystacksize *= 2; ! if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { --- 2000,2009 ---- goto yyoverflowlab; # else /* Extend the stack our own way. */ ! if (yystacksize >= YYMAXDEPTH) goto yyoverflowlab; yystacksize *= 2; ! if (yystacksize > YYMAXDEPTH) yystacksize = YYMAXDEPTH; { *************** int yynerrs; *** 2320,2327 **** goto yyoverflowlab; YYSTACK_RELOCATE (yyss); YYSTACK_RELOCATE (yyvs); ! ! # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } --- 2014,2023 ---- goto yyoverflowlab; YYSTACK_RELOCATE (yyss); YYSTACK_RELOCATE (yyvs); ! # if YYLSP_NEEDED ! YYSTACK_RELOCATE (yyls); ! # endif ! # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } *************** int yynerrs; *** 2330,2341 **** yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; ! YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); ! if (yyss + yystacksize - 1 <= yyssp) YYABORT; } --- 2026,2039 ---- yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; ! #if YYLSP_NEEDED ! yylsp = yyls + yysize - 1; ! #endif YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); ! if (yyssp >= yyss + yystacksize - 1) YYABORT; } *************** int yynerrs; *** 2343,2348 **** --- 2041,2047 ---- goto yybackup; + /*-----------. | yybackup. | `-----------*/ *************** yybackup: *** 2355,2409 **** /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; ! if (yyn == YYPACT_NINF) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ ! /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } ! if (yychar <= YYEOF) { ! yychar = yytoken = YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } else { ! yytoken = YYTRANSLATE (yychar); ! YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc); } ! /* If the proper action on seeing token YYTOKEN is to reduce or to ! detect an error, take that action. */ ! yyn += yytoken; ! if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; ! if (yyn <= 0) { ! if (yyn == 0 || yyn == YYTABLE_NINF) goto yyerrlab; yyn = -yyn; goto yyreduce; } if (yyn == YYFINAL) YYACCEPT; /* Shift the lookahead token. */ ! YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken])); /* Discard the token being shifted unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; *++yyvsp = yylval; ! /* Count tokens shifted since error; after three, turn off error status. */ --- 2054,2141 ---- /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; ! if (yyn == YYFLAG) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ ! /* yychar is either YYEMPTY or YYEOF ! or a valid token in external form. */ ! if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } ! /* Convert token to internal form (in yychar1) for indexing tables with */ ! ! if (yychar <= 0) /* This means end of input. */ { ! yychar1 = 0; ! yychar = YYEOF; /* Don't call YYLEX any more */ ! YYDPRINTF ((stderr, "Now at end of input.\n")); } else { ! yychar1 = YYTRANSLATE (yychar); ! ! #if YYDEBUG ! /* We have to keep this `#if YYDEBUG', since we use variables ! which are defined only if `YYDEBUG' is set. */ ! if (yydebug) ! { ! YYFPRINTF (stderr, "Next token is %d (%s", ! yychar, yytname[yychar1]); ! /* Give the individual parser a way to print the precise ! meaning of a token, for further debugging info. */ ! # ifdef YYPRINT ! YYPRINT (stderr, yychar, yylval); ! # endif ! YYFPRINTF (stderr, ")\n"); ! } ! #endif } ! yyn += yychar1; ! if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) goto yydefault; + yyn = yytable[yyn]; ! ! /* yyn is what to do for this token type in this state. ! Negative => reduce, -yyn is rule number. ! Positive => shift, yyn is new state. ! New state is final state => don't bother to shift, ! just return success. ! 0, or most negative number => error. */ ! ! if (yyn < 0) { ! if (yyn == YYFLAG) goto yyerrlab; yyn = -yyn; goto yyreduce; } + else if (yyn == 0) + goto yyerrlab; if (yyn == YYFINAL) YYACCEPT; /* Shift the lookahead token. */ ! YYDPRINTF ((stderr, "Shifting token %d (%s), ", ! yychar, yytname[yychar1])); /* Discard the token being shifted unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; *++yyvsp = yylval; ! #if YYLSP_NEEDED ! *++yylsp = yylloc; ! #endif /* Count tokens shifted since error; after three, turn off error status. */ *************** yyreduce: *** 2434,2623 **** /* If YYLEN is nonzero, implement the default value of the action: `$$ = $1'. ! Otherwise, the following line sets YYVAL to garbage. ! This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; ! YY_REDUCE_PRINT (yyn); ! switch (yyn) ! { ! case 11: ! #line 211 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" { /* use preset global here. FIXME */ yyval.node = xstrdup ("int"); ! ;} ! break; ! ! case 12: ! #line 216 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { /* use preset global here. FIXME */ yyval.node = xstrdup ("double"); ! ;} ! break; ! ! case 13: ! #line 221 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { /* use preset global here. FIXME */ yyval.node = xstrdup ("boolean"); ! ;} ! break; ! ! case 19: ! #line 246 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { while (bracket_count-- > 0) yyval.node = concat ("[", yyvsp[-1].node, NULL); ! ;} ! break; ! ! case 20: ! #line 251 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { while (bracket_count-- > 0) yyval.node = concat ("[", yyvsp[-1].node, NULL); ! ;} ! break; ! ! case 24: ! #line 269 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { yyval.node = concat (yyvsp[-2].node, ".", yyvsp[0].node, NULL); ! ;} ! break; ! ! case 38: ! #line 301 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { package_name = yyvsp[-1].node; ;} ! break; ! ! case 46: ! #line 328 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { if (yyvsp[0].value == PUBLIC_TK) modifier_value++; if (yyvsp[0].value == STATIC_TK) modifier_value++; USE_ABSORBER; ! ;} ! break; ! ! case 47: ! #line 336 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { if (yyvsp[0].value == PUBLIC_TK) modifier_value++; if (yyvsp[0].value == STATIC_TK) modifier_value++; USE_ABSORBER; ! ;} ! break; ! ! case 48: ! #line 348 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { report_class_declaration(yyvsp[-2].node); modifier_value = 0; ! ;} ! break; ! ! case 50: ! #line 354 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { report_class_declaration(yyvsp[-2].node); ;} ! break; ! ! case 56: ! #line 368 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ;} ! break; ! ! case 57: ! #line 370 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ;} ! break; ! ! case 58: ! #line 375 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { pop_class_context (); ;} ! break; ! ! case 59: ! #line 377 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { pop_class_context (); ;} ! break; ! ! case 71: ! #line 403 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ;} ! break; ! ! case 72: ! #line 405 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { modifier_value = 0; ;} ! break; ! ! case 77: ! #line 421 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { bracket_count = 0; USE_ABSORBER; ;} ! break; ! ! case 78: ! #line 423 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { ++bracket_count; ;} ! break; ! ! case 82: ! #line 438 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ;} ! break; ! ! case 84: ! #line 441 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { modifier_value = 0; ;} ! break; ! ! case 85: ! #line 443 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { report_main_declaration (yyvsp[-1].declarator); modifier_value = 0; ! ;} ! break; ! ! case 86: ! #line 451 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { struct method_declarator *d; NEW_METHOD_DECLARATOR (d, yyvsp[-2].node, NULL); yyval.declarator = d; ! ;} ! break; ! ! case 87: ! #line 457 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { struct method_declarator *d; NEW_METHOD_DECLARATOR (d, yyvsp[-3].node, yyvsp[-1].node); yyval.declarator = d; ! ;} ! break; ! ! case 90: ! #line 468 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { yyval.node = concat (yyvsp[-2].node, ",", yyvsp[0].node, NULL); ! ;} ! break; ! ! case 91: ! #line 475 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; if (bracket_count) { --- 2166,2360 ---- /* If YYLEN is nonzero, implement the default value of the action: `$$ = $1'. ! Otherwise, the following line sets YYVAL to the semantic value of ! the lookahead token. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; + #if YYLSP_NEEDED + /* Similarly for the default location. Let the user run additional + commands if for instance locations are ranges. */ + yyloc = yylsp[1-yylen]; + YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); + #endif ! #if YYDEBUG ! /* We have to keep this `#if YYDEBUG', since we use variables which ! are defined only if `YYDEBUG' is set. */ ! if (yydebug) { + int yyi; + + YYFPRINTF (stderr, "Reducing via rule %d (line %d), ", + yyn, yyrline[yyn]); + + /* Print the symbols being reduced, and their result. */ + for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++) + YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); + YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]); + } + #endif + + switch (yyn) { + + case 10: + #line 232 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" + { /* use preset global here. FIXME */ yyval.node = xstrdup ("int"); ! ; ! break;} ! case 11: ! #line 237 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { /* use preset global here. FIXME */ yyval.node = xstrdup ("double"); ! ; ! break;} ! case 12: ! #line 242 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { /* use preset global here. FIXME */ yyval.node = xstrdup ("boolean"); ! ; ! break;} ! case 18: ! #line 267 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { while (bracket_count-- > 0) yyval.node = concat ("[", yyvsp[-1].node, NULL); ! ; ! break;} ! case 19: ! #line 272 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { while (bracket_count-- > 0) yyval.node = concat ("[", yyvsp[-1].node, NULL); ! ; ! break;} ! case 23: ! #line 290 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { yyval.node = concat (yyvsp[-2].node, ".", yyvsp[0].node, NULL); ! ; ! break;} ! case 37: ! #line 322 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { package_name = yyvsp[-1].node; ; ! break;} ! case 45: ! #line 349 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { if (yyvsp[0].value == PUBLIC_TK) modifier_value++; if (yyvsp[0].value == STATIC_TK) modifier_value++; USE_ABSORBER; ! ; ! break;} ! case 46: ! #line 357 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { if (yyvsp[0].value == PUBLIC_TK) modifier_value++; if (yyvsp[0].value == STATIC_TK) modifier_value++; USE_ABSORBER; ! ; ! break;} ! case 47: ! #line 369 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { report_class_declaration(yyvsp[-2].node); modifier_value = 0; ! ; ! break;} ! case 49: ! #line 375 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { report_class_declaration(yyvsp[-2].node); ; ! break;} ! case 55: ! #line 389 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ; ! break;} ! case 56: ! #line 391 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ; ! break;} ! case 57: ! #line 396 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { pop_class_context (); ; ! break;} ! case 58: ! #line 398 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { pop_class_context (); ; ! break;} ! case 70: ! #line 424 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ; ! break;} ! case 71: ! #line 426 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { modifier_value = 0; ; ! break;} ! case 76: ! #line 442 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { bracket_count = 0; USE_ABSORBER; ; ! break;} ! case 77: ! #line 444 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { ++bracket_count; ; ! break;} ! case 80: ! #line 455 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { ++method_depth; ; ! break;} ! case 81: ! #line 457 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { --method_depth; ; ! break;} ! case 82: ! #line 462 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ; ! break;} ! case 84: ! #line 465 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { modifier_value = 0; ; ! break;} ! case 85: ! #line 467 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { report_main_declaration (yyvsp[-1].declarator); modifier_value = 0; ! ; ! break;} ! case 86: ! #line 475 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { struct method_declarator *d; NEW_METHOD_DECLARATOR (d, yyvsp[-2].node, NULL); yyval.declarator = d; ! ; ! break;} ! case 87: ! #line 481 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { struct method_declarator *d; NEW_METHOD_DECLARATOR (d, yyvsp[-3].node, yyvsp[-1].node); yyval.declarator = d; ! ; ! break;} ! case 90: ! #line 492 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { yyval.node = concat (yyvsp[-2].node, ",", yyvsp[0].node, NULL); ! ; ! break;} ! case 91: ! #line 499 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; if (bracket_count) { *************** yyreduce: *** 2630,2641 **** } else yyval.node = yyvsp[-1].node; ! ;} ! break; ! ! case 92: ! #line 490 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { if (bracket_count) { int i; --- 2367,2377 ---- } else yyval.node = yyvsp[-1].node; ! ; ! break;} ! case 92: ! #line 514 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { if (bracket_count) { int i; *************** yyreduce: *** 2647,2929 **** } else yyval.node = yyvsp[-1].node; ! ;} ! break; ! ! case 95: ! #line 511 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ;} ! break; ! ! case 96: ! #line 513 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ;} ! break; ! ! case 100: ! #line 528 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ;} ! break; ! ! case 102: ! #line 539 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { modifier_value = 0; ;} ! break; ! ! case 104: ! #line 544 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { modifier_value = 0; ;} ! break; ! ! case 105: ! #line 551 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ;} ! break; ! ! case 106: ! #line 553 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ;} ! break; ! ! case 113: ! #line 570 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ;} ! break; ! ! case 114: ! #line 572 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ;} ! break; ! ! case 117: ! #line 584 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { report_class_declaration (yyvsp[0].node); modifier_value = 0; ;} ! break; ! ! case 119: ! #line 587 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { report_class_declaration (yyvsp[0].node); modifier_value = 0; ;} ! break; ! ! case 121: ! #line 590 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { report_class_declaration (yyvsp[-1].node); modifier_value = 0; ;} ! break; ! ! case 123: ! #line 593 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { report_class_declaration (yyvsp[-1].node); modifier_value = 0; ;} ! break; ! ! case 127: ! #line 604 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { pop_class_context (); ;} ! break; ! ! case 128: ! #line 606 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { pop_class_context (); ;} ! break; ! ! case 151: ! #line 665 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ;} ! break; ! ! case 152: ! #line 667 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { modifier_value = 0; ;} ! break; ! ! case 176: ! #line 707 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ;} ! break; ! ! case 187: ! #line 735 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { ++complexity; ;} ! break; ! ! case 188: ! #line 740 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { ++complexity; ;} ! break; ! ! case 189: ! #line 745 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { ++complexity; ;} ! break; ! ! case 197: ! #line 765 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { ++complexity; ;} ! break; ! ! case 202: ! #line 780 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { ++complexity; ;} ! break; ! ! case 206: ! #line 797 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { ++complexity; ;} ! break; ! ! case 212: ! #line 815 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { ++complexity; ;} ! break; ! ! case 223: ! #line 840 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { ++complexity; ;} ! break; ! ! case 226: ! #line 849 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { ++complexity; ;} ! break; ! ! case 229: ! #line 859 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ;} ! break; ! ! case 235: ! #line 874 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { ++complexity; ;} ! break; ! ! case 236: ! #line 878 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { ++complexity; ;} ! break; ! ! case 247: ! #line 900 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ;} ! break; ! ! case 248: ! #line 905 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ;} ! break; ! ! case 249: ! #line 907 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ;} ! break; ! ! case 250: ! #line 909 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ;} ! break; ! ! case 251: ! #line 911 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ;} ! break; ! ! case 259: ! #line 926 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { report_class_declaration (NULL); ;} ! break; ! ! case 261: ! #line 929 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { report_class_declaration (NULL); ;} ! break; ! ! case 263: ! #line 935 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ;} ! break; ! ! case 277: ! #line 967 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { bracket_count = 1; ;} ! break; ! ! case 278: ! #line 969 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { bracket_count++; ;} ! break; ! ! case 281: ! #line 982 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ++complexity; ;} ! break; ! ! case 282: ! #line 984 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ++complexity; ;} ! break; ! ! case 283: ! #line 985 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { ++complexity; ;} ! break; ! ! case 284: ! #line 986 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { ++complexity; ;} ! break; ! ! case 285: ! #line 987 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { ++complexity; ;} ! break; ! ! case 286: ! #line 988 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { ++complexity; ;} ! break; ! ! case 287: ! #line 993 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ;} ! break; ! ! case 290: ! #line 1000 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ;} ! break; ! ! case 337: ! #line 1096 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { ++complexity; ;} ! break; ! ! case 339: ! #line 1102 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { ++complexity; ;} ! break; ! ! case 341: ! #line 1108 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { ++complexity; ;} ! break; ! ! case 345: ! #line 1122 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ;} ! break; ! ! } - /* Line 991 of yacc.c. */ - #line 2917 "ps2505.c" yyvsp -= yylen; yyssp -= yylen; ! ! YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; ! /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule --- 2383,2632 ---- } else yyval.node = yyvsp[-1].node; ! ; ! break;} ! case 95: ! #line 535 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ; ! break;} ! case 96: ! #line 537 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ; ! break;} ! case 100: ! #line 552 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ; ! break;} ! case 102: ! #line 563 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { modifier_value = 0; ; ! break;} ! case 104: ! #line 568 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { modifier_value = 0; ; ! break;} ! case 105: ! #line 575 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ; ! break;} ! case 106: ! #line 577 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ; ! break;} ! case 113: ! #line 594 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ; ! break;} ! case 114: ! #line 596 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ; ! break;} ! case 117: ! #line 608 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { report_class_declaration (yyvsp[0].node); modifier_value = 0; ; ! break;} ! case 119: ! #line 611 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { report_class_declaration (yyvsp[0].node); modifier_value = 0; ; ! break;} ! case 121: ! #line 614 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { report_class_declaration (yyvsp[-1].node); modifier_value = 0; ; ! break;} ! case 123: ! #line 617 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { report_class_declaration (yyvsp[-1].node); modifier_value = 0; ; ! break;} ! case 127: ! #line 628 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { pop_class_context (); ; ! break;} ! case 128: ! #line 630 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { pop_class_context (); ; ! break;} ! case 151: ! #line 689 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ; ! break;} ! case 152: ! #line 691 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { modifier_value = 0; ; ! break;} ! case 177: ! #line 732 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ; ! break;} ! case 188: ! #line 760 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { ++complexity; ; ! break;} ! case 189: ! #line 765 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { ++complexity; ; ! break;} ! case 190: ! #line 770 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { ++complexity; ; ! break;} ! case 198: ! #line 790 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { ++complexity; ; ! break;} ! case 203: ! #line 805 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { ++complexity; ; ! break;} ! case 207: ! #line 822 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { ++complexity; ; ! break;} ! case 213: ! #line 840 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { ++complexity; ; ! break;} ! case 224: ! #line 865 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { ++complexity; ; ! break;} ! case 227: ! #line 874 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { ++complexity; ; ! break;} ! case 230: ! #line 881 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! {yyerror ("Missing term"); RECOVER;; ! break;} ! case 231: ! #line 883 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! {yyerror ("';' expected"); RECOVER;; ! break;} ! case 234: ! #line 892 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ; ! break;} ! case 240: ! #line 907 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { ++complexity; ; ! break;} ! case 241: ! #line 911 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { ++complexity; ; ! break;} ! case 252: ! #line 933 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ; ! break;} ! case 253: ! #line 938 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ; ! break;} ! case 254: ! #line 940 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ; ! break;} ! case 255: ! #line 942 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ; ! break;} ! case 256: ! #line 944 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ; ! break;} ! case 264: ! #line 959 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { report_class_declaration (anonymous_context); ; ! break;} ! case 266: ! #line 962 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { report_class_declaration (anonymous_context); ; ! break;} ! case 268: ! #line 968 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ; ! break;} ! case 282: ! #line 1000 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { bracket_count = 1; ; ! break;} ! case 283: ! #line 1002 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { bracket_count++; ; ! break;} ! case 286: ! #line 1015 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ++complexity; ; ! break;} ! case 287: ! #line 1017 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ++complexity; ; ! break;} ! case 288: ! #line 1018 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { ++complexity; ; ! break;} ! case 289: ! #line 1019 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { ++complexity; ; ! break;} ! case 290: ! #line 1020 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { ++complexity; ; ! break;} ! case 291: ! #line 1021 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { ++complexity; ; ! break;} ! case 292: ! #line 1026 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ; ! break;} ! case 295: ! #line 1033 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ; ! break;} ! case 342: ! #line 1129 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { ++complexity; ; ! break;} ! case 344: ! #line 1135 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { ++complexity; ; ! break;} ! case 346: ! #line 1141 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { ++complexity; ; ! break;} ! case 350: ! #line 1155 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" ! { USE_ABSORBER; ; ! break;} ! } ! #line 705 "/usr/share/bison/bison.simple" yyvsp -= yylen; yyssp -= yylen; + #if YYLSP_NEEDED + yylsp -= yylen; + #endif ! #if YYDEBUG ! if (yydebug) ! { ! short *yyssp1 = yyss - 1; ! YYFPRINTF (stderr, "state stack now"); ! while (yyssp1 != yyssp) ! YYFPRINTF (stderr, " %d", *++yyssp1); ! YYFPRINTF (stderr, "\n"); ! } ! #endif *++yyvsp = yyval; ! #if YYLSP_NEEDED ! *++yylsp = yyloc; ! #endif /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule *************** yyreduce: *** 2931,2941 **** yyn = yyr1[yyn]; ! yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; ! if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else ! yystate = yydefgoto[yyn - YYNTOKENS]; goto yynewstate; --- 2634,2644 ---- yyn = yyr1[yyn]; ! yystate = yypgoto[yyn - YYNTBASE] + *yyssp; ! if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else ! yystate = yydefgoto[yyn - YYNTBASE]; goto yynewstate; *************** yyerrlab: *** 2948,2960 **** if (!yyerrstatus) { ++yynerrs; ! #if YYERROR_VERBOSE yyn = yypact[yystate]; ! if (YYPACT_NINF < yyn && yyn < YYLAST) { YYSIZE_T yysize = 0; - int yytype = YYTRANSLATE (yychar); char *yymsg; int yyx, yycount; --- 2651,2663 ---- if (!yyerrstatus) { ++yynerrs; ! ! #ifdef YYERROR_VERBOSE yyn = yypact[yystate]; ! if (yyn > YYFLAG && yyn < YYLAST) { YYSIZE_T yysize = 0; char *yymsg; int yyx, yycount; *************** yyerrlab: *** 2963,2977 **** YYCHECK. */ for (yyx = yyn < 0 ? -yyn : 0; yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) ! if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) yysize += yystrlen (yytname[yyx]) + 15, yycount++; ! yysize += yystrlen ("syntax error, unexpected ") + 1; ! yysize += yystrlen (yytname[yytype]); yymsg = (char *) YYSTACK_ALLOC (yysize); if (yymsg != 0) { ! char *yyp = yystpcpy (yymsg, "syntax error, unexpected "); ! yyp = yystpcpy (yyp, yytname[yytype]); if (yycount < 5) { --- 2666,2680 ---- YYCHECK. */ for (yyx = yyn < 0 ? -yyn : 0; yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) ! if (yycheck[yyx + yyn] == yyx) yysize += yystrlen (yytname[yyx]) + 15, yycount++; ! yysize += yystrlen ("parse error, unexpected ") + 1; ! yysize += yystrlen (yytname[YYTRANSLATE (yychar)]); yymsg = (char *) YYSTACK_ALLOC (yysize); if (yymsg != 0) { ! char *yyp = yystpcpy (yymsg, "parse error, unexpected "); ! yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]); if (yycount < 5) { *************** yyerrlab: *** 2979,2985 **** for (yyx = yyn < 0 ? -yyn : 0; yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) ! if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) { const char *yyq = ! yycount ? ", expecting " : " or "; yyp = yystpcpy (yyp, yyq); --- 2682,2688 ---- for (yyx = yyn < 0 ? -yyn : 0; yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) ! if (yycheck[yyx + yyn] == yyx) { const char *yyq = ! yycount ? ", expecting " : " or "; yyp = yystpcpy (yyp, yyq); *************** yyerrlab: *** 2991,3082 **** YYSTACK_FREE (yymsg); } else ! yyerror ("syntax error; also virtual memory exhausted"); } else ! #endif /* YYERROR_VERBOSE */ ! yyerror ("syntax error"); } ! if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ ! /* Return failure if at end of input. */ if (yychar == YYEOF) ! { ! /* Pop the error token. */ ! YYPOPSTACK; ! /* Pop the rest of the stack. */ ! while (yyss < yyssp) ! { ! YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); ! yydestruct (yystos[*yyssp], yyvsp); ! YYPOPSTACK; ! } ! YYABORT; ! } ! ! YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc); ! yydestruct (yytoken, &yylval); yychar = YYEMPTY; - } /* Else will try to reuse lookahead token after shifting the error token. */ - goto yyerrlab2; ! /*----------------------------------------------------. ! | yyerrlab1 -- error raised explicitly by an action. | ! `----------------------------------------------------*/ ! yyerrlab1: - /* Suppress GCC warning that yyerrlab1 is unused when no action - invokes YYERROR. */ - #if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__) - __attribute__ ((__unused__)); - #endif ! goto yyerrlab2; /*---------------------------------------------------------------. ! | yyerrlab2 -- pop states until the error token can be shifted. | `---------------------------------------------------------------*/ ! yyerrlab2: ! yyerrstatus = 3; /* Each real token shifted decrements this. */ ! for (;;) { ! yyn = yypact[yystate]; ! if (yyn != YYPACT_NINF) ! { ! yyn += YYTERROR; ! if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) ! { ! yyn = yytable[yyn]; ! if (0 < yyn) ! break; ! } ! } ! /* Pop the current state because it cannot handle the error token. */ ! if (yyssp == yyss) ! YYABORT; ! YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); ! yydestruct (yystos[yystate], yyvsp); ! yyvsp--; ! yystate = *--yyssp; ! YY_STACK_PRINT (yyss, yyssp); } if (yyn == YYFINAL) YYACCEPT; --- 2694,2795 ---- YYSTACK_FREE (yymsg); } else ! yyerror ("parse error; also virtual memory exhausted"); } else ! #endif /* defined (YYERROR_VERBOSE) */ ! yyerror ("parse error"); } + goto yyerrlab1; ! /*--------------------------------------------------. ! | yyerrlab1 -- error raised explicitly by an action | ! `--------------------------------------------------*/ ! yyerrlab1: if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ ! /* return failure if at end of input */ if (yychar == YYEOF) ! YYABORT; ! YYDPRINTF ((stderr, "Discarding token %d (%s).\n", ! yychar, yytname[yychar1])); yychar = YYEMPTY; } /* Else will try to reuse lookahead token after shifting the error token. */ + yyerrstatus = 3; /* Each real token shifted decrements this */ ! goto yyerrhandle; + /*-------------------------------------------------------------------. + | yyerrdefault -- current state does not do anything special for the | + | error token. | + `-------------------------------------------------------------------*/ + yyerrdefault: + #if 0 + /* This is wrong; only states that explicitly want error tokens + should shift them. */ ! /* If its default is to accept any token, ok. Otherwise pop it. */ ! yyn = yydefact[yystate]; ! if (yyn) ! goto yydefault; ! #endif /*---------------------------------------------------------------. ! | yyerrpop -- pop the current state because it cannot handle the | ! | error token | `---------------------------------------------------------------*/ ! yyerrpop: ! if (yyssp == yyss) ! YYABORT; ! yyvsp--; ! yystate = *--yyssp; ! #if YYLSP_NEEDED ! yylsp--; ! #endif ! #if YYDEBUG ! if (yydebug) { ! short *yyssp1 = yyss - 1; ! YYFPRINTF (stderr, "Error: state stack now"); ! while (yyssp1 != yyssp) ! YYFPRINTF (stderr, " %d", *++yyssp1); ! YYFPRINTF (stderr, "\n"); ! } ! #endif ! /*--------------. ! | yyerrhandle. | ! `--------------*/ ! yyerrhandle: ! yyn = yypact[yystate]; ! if (yyn == YYFLAG) ! goto yyerrdefault; ! yyn += YYTERROR; ! if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) ! goto yyerrdefault; ! yyn = yytable[yyn]; ! if (yyn < 0) ! { ! if (yyn == YYFLAG) ! goto yyerrpop; ! yyn = -yyn; ! goto yyreduce; } + else if (yyn == 0) + goto yyerrpop; if (yyn == YYFINAL) YYACCEPT; *************** yyerrlab2: *** 3084,3090 **** YYDPRINTF ((stderr, "Shifting error token, ")); *++yyvsp = yylval; ! yystate = yyn; goto yynewstate; --- 2797,2805 ---- YYDPRINTF ((stderr, "Shifting error token, ")); *++yyvsp = yylval; ! #if YYLSP_NEEDED ! *++yylsp = yylloc; ! #endif yystate = yyn; goto yynewstate; *************** yyabortlab: *** 3104,3118 **** yyresult = 1; goto yyreturn; ! #ifndef yyoverflow ! /*----------------------------------------------. ! | yyoverflowlab -- parser overflow comes here. | ! `----------------------------------------------*/ yyoverflowlab: yyerror ("parser stack overflow"); yyresult = 2; /* Fall through. */ - #endif yyreturn: #ifndef yyoverflow --- 2819,2831 ---- yyresult = 1; goto yyreturn; ! /*---------------------------------------------. ! | yyoverflowab -- parser overflow comes here. | ! `---------------------------------------------*/ yyoverflowlab: yyerror ("parser stack overflow"); yyresult = 2; /* Fall through. */ yyreturn: #ifndef yyoverflow *************** yyreturn: *** 3121,3129 **** #endif return yyresult; } ! ! ! #line 1140 "/u/molotova/0/galaad/gdosreis/gcc-3.2.3/gcc-3.2.3/gcc/java/parse-scan.y" /* Create a new parser context */ --- 2834,2840 ---- #endif return yyresult; } ! #line 1173 "/home/mitchell/gcc-3.3/gcc-3.3/gcc/java/parse-scan.y" /* Create a new parser context */ *************** static void *** 3142,3199 **** push_class_context (name) const char *name; { ! /* If we already have CURRENT_CLASS set, we're in an inter ! class. Mangle its name. */ ! if (current_class) ! { ! const char *p; ! char anonymous [3]; ! int additional_length; ! ! /* NAME set to NULL indicates an anonymous class, which are named by ! numbering them. */ ! if (!name) ! { ! sprintf (anonymous, "%d", ++anonymous_count); ! p = anonymous; ! } ! else ! p = name; ! ! additional_length = strlen (p)+1; /* +1 for `$' */ ! current_class = xrealloc (current_class, ! current_class_length + additional_length + 1); ! current_class [current_class_length] = '$'; ! strcpy (¤t_class [current_class_length+1], p); ! current_class_length += additional_length; ! } ! else ! { ! if (!name) ! return; ! current_class_length = strlen (name); ! current_class = xmalloc (current_class_length+1); ! strcpy (current_class, name); ! } } static void pop_class_context () { ! /* Go back to the last `$' and cut. */ ! while (--current_class_length > 0 ! && current_class [current_class_length] != '$') ! ; ! if (current_class_length) { ! current_class = xrealloc (current_class, current_class_length+1); ! current_class [current_class_length] = '\0'; } ! else { ! current_class = NULL; ! anonymous_count = 0; } } /* Actions defined here */ --- 2853,2952 ---- push_class_context (name) const char *name; { ! struct class_context *ctx; ! ! ctx = (struct class_context *) xmalloc (sizeof (struct class_context)); ! ctx->name = (char *) name; ! ctx->next = current_class_context; ! current_class_context = ctx; } static void pop_class_context () { ! struct class_context *ctx; ! ! if (current_class_context == NULL) ! return; ! ! ctx = current_class_context->next; ! if (current_class_context->name != anonymous_context) ! free (current_class_context->name); ! free (current_class_context); ! ! current_class_context = ctx; ! if (current_class_context == NULL) ! anonymous_count = 0; ! } ! ! /* Recursively construct the class name. This is just a helper ! function for get_class_name(). */ ! static int ! make_class_name_recursive (stack, ctx) ! struct obstack *stack; ! struct class_context *ctx; ! { ! if (! ctx) ! return 0; ! ! make_class_name_recursive (stack, ctx->next); ! ! /* Replace an anonymous context with the appropriate counter value. */ ! if (ctx->name == anonymous_context) { ! char buf[50]; ! ++anonymous_count; ! sprintf (buf, "%d", anonymous_count); ! ctx->name = xstrdup (buf); } ! ! obstack_grow (stack, ctx->name, strlen (ctx->name)); ! obstack_1grow (stack, '$'); ! ! return ISDIGIT (ctx->name[0]); ! } ! ! /* Return a newly allocated string holding the name of the class. */ ! static char * ! get_class_name () ! { ! char *result; ! int last_was_digit; ! struct obstack name_stack; ! ! obstack_init (&name_stack); ! ! /* Duplicate the logic of parse.y:maybe_make_nested_class_name(). */ ! last_was_digit = make_class_name_recursive (&name_stack, ! current_class_context->next); ! ! if (! last_was_digit ! && method_depth ! && current_class_context->name != anonymous_context) { ! char buf[50]; ! ++anonymous_count; ! sprintf (buf, "%d", anonymous_count); ! obstack_grow (&name_stack, buf, strlen (buf)); ! obstack_1grow (&name_stack, '$'); ! } ! ! if (current_class_context->name == anonymous_context) ! { ! char buf[50]; ! ++anonymous_count; ! sprintf (buf, "%d", anonymous_count); ! current_class_context->name = xstrdup (buf); ! obstack_grow0 (&name_stack, buf, strlen (buf)); } + else + obstack_grow0 (&name_stack, current_class_context->name, + strlen (current_class_context->name)); + + result = xstrdup (obstack_finish (&name_stack)); + obstack_free (&name_stack, NULL); + + return result; } /* Actions defined here */ *************** report_class_declaration (name) *** 3207,3223 **** push_class_context (name); if (flag_dump_class) { if (!previous_output) { if (flag_list_filename) fprintf (out, "%s: ", input_filename); previous_output = 1; } ! if (package_name) ! fprintf (out, "%s.%s ", package_name, current_class); else ! fprintf (out, "%s ", current_class); } } --- 2960,2980 ---- push_class_context (name); if (flag_dump_class) { + char *name = get_class_name (); + if (!previous_output) { if (flag_list_filename) fprintf (out, "%s: ", input_filename); previous_output = 1; } ! if (package_name) ! fprintf (out, "%s.%s ", package_name, name); else ! fprintf (out, "%s ", name); ! ! free (name); } } *************** report_main_declaration (declarator) *** 3234,3247 **** && declarator->args [0] == '[' && (! strcmp (declarator->args+1, "String") || ! strcmp (declarator->args + 1, "java.lang.String")) ! && current_class) { if (!previous_output) { if (package_name) ! fprintf (out, "%s.%s ", package_name, current_class); else ! fprintf (out, "%s", current_class); previous_output = 1; } } --- 2991,3006 ---- && declarator->args [0] == '[' && (! strcmp (declarator->args+1, "String") || ! strcmp (declarator->args + 1, "java.lang.String")) ! && current_class_context) { if (!previous_output) { + char *name = get_class_name (); if (package_name) ! fprintf (out, "%s.%s ", package_name, name); else ! fprintf (out, "%s", name); ! free (name); previous_output = 1; } } *************** void reset_report () *** 3261,3267 **** { previous_output = 0; package_name = NULL; ! current_class = NULL; complexity = 0; } --- 3020,3026 ---- { previous_output = 0; package_name = NULL; ! current_class_context = NULL; complexity = 0; } *************** yyerror (msg) *** 3272,3276 **** fprintf (stderr, "%s: %d: %s\n", input_filename, lineno, msg); exit (1); } - - --- 3031,3033 ---- diff -Nrc3pad gcc-3.2.3/gcc/java/parse-scan.y gcc-3.3/gcc/java/parse-scan.y *** gcc-3.2.3/gcc/java/parse-scan.y 2001-04-04 17:56:25.000000000 +0000 --- gcc-3.3/gcc/java/parse-scan.y 2002-09-30 14:57:43.000000000 +0000 *************** *** 1,5 **** /* Parser grammar for quick source code scan of Java(TM) language programs. ! Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com) This file is part of GNU CC. --- 1,5 ---- /* Parser grammar for quick source code scan of Java(TM) language programs. ! Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc. Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com) This file is part of GNU CC. *************** definitions and other extensions. */ *** 43,48 **** --- 43,51 ---- #include "obstack.h" #include "toplev.h" + #define obstack_chunk_alloc xmalloc + #define obstack_chunk_free free + extern char *input_filename; extern FILE *finput, *out; *************** int lineno; *** 62,74 **** static int absorber; #define USE_ABSORBER absorber = 0 ! /* Keep track of the current class name and package name. */ ! static char *current_class; static const char *package_name; - /* Keep track of the current inner class qualifier. */ - static int current_class_length; - /* Keep track of whether things have be listed before. */ static int previous_output; --- 65,73 ---- static int absorber; #define USE_ABSORBER absorber = 0 ! /* Keep track of the current package name. */ static const char *package_name; /* Keep track of whether things have be listed before. */ static int previous_output; *************** static int bracket_count; *** 85,90 **** --- 84,105 ---- /* Numbers anonymous classes */ static int anonymous_count; + /* This is used to record the current class context. */ + struct class_context + { + char *name; + struct class_context *next; + }; + + /* The global class context. */ + static struct class_context *current_class_context; + + /* A special constant used to represent an anonymous context. */ + static const char *anonymous_context = "ANONYMOUS"; + + /* Count of method depth. */ + static int method_depth; + /* Record a method declaration */ struct method_declarator { const char *method_name; *************** struct method_declarator { *** 99,104 **** --- 114,122 ---- } /* Two actions for this grammar */ + static int make_class_name_recursive PARAMS ((struct obstack *stack, + struct class_context *ctx)); + static char *get_class_name PARAMS ((void)); static void report_class_declaration PARAMS ((const char *)); static void report_main_declaration PARAMS ((struct method_declarator *)); static void push_class_context PARAMS ((const char *)); *************** void report PARAMS ((void)); *** 117,122 **** --- 135,142 ---- } %{ + extern int flag_assert; + #include "lex.c" %} *************** void report PARAMS ((void)); *** 162,167 **** --- 182,188 ---- %token SWITCH_TK CONST_TK TRY_TK %token FOR_TK NEW_TK CONTINUE_TK %token GOTO_TK PACKAGE_TK THIS_TK + %token ASSERT_TK %token BYTE_TK SHORT_TK INT_TK LONG_TK %token CHAR_TK INTEGRAL_TK *************** variable_initializer: *** 430,436 **** /* 19.8.3 Productions from 8.4: Method Declarations */ method_declaration: ! method_header method_body ; method_header: --- 451,460 ---- /* 19.8.3 Productions from 8.4: Method Declarations */ method_declaration: ! method_header ! { ++method_depth; } ! method_body ! { --method_depth; } ; method_header: *************** statement_without_trailing_substatement: *** 696,701 **** --- 720,726 ---- | synchronized_statement | throw_statement | try_statement + | assert_statement ; empty_statement: *************** throw_statement: *** 849,854 **** --- 874,887 ---- THROW_TK expression SC_TK { ++complexity; } ; + assert_statement: + ASSERT_TK expression REL_CL_TK expression SC_TK + | ASSERT_TK expression SC_TK + | ASSERT_TK error + {yyerror ("Missing term"); RECOVER;} + | ASSERT_TK expression error + {yyerror ("';' expected"); RECOVER;} + ; synchronized_statement: synchronized OP_TK expression CP_TK block | synchronized OP_TK expression CP_TK error *************** class_instance_creation_expression: *** 923,932 **** anonymous_class_creation: NEW_TK class_type OP_TK CP_TK ! { report_class_declaration (NULL); } class_body | NEW_TK class_type OP_TK argument_list CP_TK ! { report_class_declaration (NULL); } class_body ; --- 956,965 ---- anonymous_class_creation: NEW_TK class_type OP_TK CP_TK ! { report_class_declaration (anonymous_context); } class_body | NEW_TK class_type OP_TK argument_list CP_TK ! { report_class_declaration (anonymous_context); } class_body ; *************** static void *** 1155,1212 **** push_class_context (name) const char *name; { ! /* If we already have CURRENT_CLASS set, we're in an inter ! class. Mangle its name. */ ! if (current_class) ! { ! const char *p; ! char anonymous [3]; ! int additional_length; ! ! /* NAME set to NULL indicates an anonymous class, which are named by ! numbering them. */ ! if (!name) ! { ! sprintf (anonymous, "%d", ++anonymous_count); ! p = anonymous; ! } ! else ! p = name; ! ! additional_length = strlen (p)+1; /* +1 for `$' */ ! current_class = xrealloc (current_class, ! current_class_length + additional_length + 1); ! current_class [current_class_length] = '$'; ! strcpy (¤t_class [current_class_length+1], p); ! current_class_length += additional_length; ! } ! else ! { ! if (!name) ! return; ! current_class_length = strlen (name); ! current_class = xmalloc (current_class_length+1); ! strcpy (current_class, name); ! } } static void pop_class_context () { ! /* Go back to the last `$' and cut. */ ! while (--current_class_length > 0 ! && current_class [current_class_length] != '$') ! ; ! if (current_class_length) { ! current_class = xrealloc (current_class, current_class_length+1); ! current_class [current_class_length] = '\0'; } ! else { ! current_class = NULL; ! anonymous_count = 0; } } /* Actions defined here */ --- 1188,1287 ---- push_class_context (name) const char *name; { ! struct class_context *ctx; ! ! ctx = (struct class_context *) xmalloc (sizeof (struct class_context)); ! ctx->name = (char *) name; ! ctx->next = current_class_context; ! current_class_context = ctx; } static void pop_class_context () { ! struct class_context *ctx; ! ! if (current_class_context == NULL) ! return; ! ! ctx = current_class_context->next; ! if (current_class_context->name != anonymous_context) ! free (current_class_context->name); ! free (current_class_context); ! ! current_class_context = ctx; ! if (current_class_context == NULL) ! anonymous_count = 0; ! } ! ! /* Recursively construct the class name. This is just a helper ! function for get_class_name(). */ ! static int ! make_class_name_recursive (stack, ctx) ! struct obstack *stack; ! struct class_context *ctx; ! { ! if (! ctx) ! return 0; ! ! make_class_name_recursive (stack, ctx->next); ! ! /* Replace an anonymous context with the appropriate counter value. */ ! if (ctx->name == anonymous_context) { ! char buf[50]; ! ++anonymous_count; ! sprintf (buf, "%d", anonymous_count); ! ctx->name = xstrdup (buf); } ! ! obstack_grow (stack, ctx->name, strlen (ctx->name)); ! obstack_1grow (stack, '$'); ! ! return ISDIGIT (ctx->name[0]); ! } ! ! /* Return a newly allocated string holding the name of the class. */ ! static char * ! get_class_name () ! { ! char *result; ! int last_was_digit; ! struct obstack name_stack; ! ! obstack_init (&name_stack); ! ! /* Duplicate the logic of parse.y:maybe_make_nested_class_name(). */ ! last_was_digit = make_class_name_recursive (&name_stack, ! current_class_context->next); ! ! if (! last_was_digit ! && method_depth ! && current_class_context->name != anonymous_context) { ! char buf[50]; ! ++anonymous_count; ! sprintf (buf, "%d", anonymous_count); ! obstack_grow (&name_stack, buf, strlen (buf)); ! obstack_1grow (&name_stack, '$'); } + + if (current_class_context->name == anonymous_context) + { + char buf[50]; + ++anonymous_count; + sprintf (buf, "%d", anonymous_count); + current_class_context->name = xstrdup (buf); + obstack_grow0 (&name_stack, buf, strlen (buf)); + } + else + obstack_grow0 (&name_stack, current_class_context->name, + strlen (current_class_context->name)); + + result = xstrdup (obstack_finish (&name_stack)); + obstack_free (&name_stack, NULL); + + return result; } /* Actions defined here */ *************** report_class_declaration (name) *** 1220,1236 **** push_class_context (name); if (flag_dump_class) { if (!previous_output) { if (flag_list_filename) fprintf (out, "%s: ", input_filename); previous_output = 1; } ! if (package_name) ! fprintf (out, "%s.%s ", package_name, current_class); else ! fprintf (out, "%s ", current_class); } } --- 1295,1315 ---- push_class_context (name); if (flag_dump_class) { + char *name = get_class_name (); + if (!previous_output) { if (flag_list_filename) fprintf (out, "%s: ", input_filename); previous_output = 1; } ! if (package_name) ! fprintf (out, "%s.%s ", package_name, name); else ! fprintf (out, "%s ", name); ! ! free (name); } } *************** report_main_declaration (declarator) *** 1247,1260 **** && declarator->args [0] == '[' && (! strcmp (declarator->args+1, "String") || ! strcmp (declarator->args + 1, "java.lang.String")) ! && current_class) { if (!previous_output) { if (package_name) ! fprintf (out, "%s.%s ", package_name, current_class); else ! fprintf (out, "%s", current_class); previous_output = 1; } } --- 1326,1341 ---- && declarator->args [0] == '[' && (! strcmp (declarator->args+1, "String") || ! strcmp (declarator->args + 1, "java.lang.String")) ! && current_class_context) { if (!previous_output) { + char *name = get_class_name (); if (package_name) ! fprintf (out, "%s.%s ", package_name, name); else ! fprintf (out, "%s", name); ! free (name); previous_output = 1; } } *************** void reset_report () *** 1274,1280 **** { previous_output = 0; package_name = NULL; ! current_class = NULL; complexity = 0; } --- 1355,1361 ---- { previous_output = 0; package_name = NULL; ! current_class_context = NULL; complexity = 0; } diff -Nrc3pad gcc-3.2.3/gcc/java/parse.y gcc-3.3/gcc/java/parse.y *** gcc-3.2.3/gcc/java/parse.y 2003-03-18 00:05:29.000000000 +0000 --- gcc-3.3/gcc/java/parse.y 2003-05-03 00:36:56.000000000 +0000 *************** *** 1,6 **** /* Source code parsing and tree node generation for the GNU compiler for the Java(TM) language. ! Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com) This file is part of GNU CC. --- 1,6 ---- /* Source code parsing and tree node generation for the GNU compiler for the Java(TM) language. ! Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com) This file is part of GNU CC. *************** Language Specification. J. Gosling, B. J *** 35,41 **** The following modifications were brought to the original grammar: method_body: added the rule '| block SC_TK' ! static_initializer: added the rule 'static block SC_TK'. Note: All the extra rules described above should go away when the empty_statement rule will work. --- 35,41 ---- The following modifications were brought to the original grammar: method_body: added the rule '| block SC_TK' ! static_initializer: added the rule 'static block SC_TK'. Note: All the extra rules described above should go away when the empty_statement rule will work. *************** definitions and other extensions. */ *** 51,56 **** --- 51,57 ---- #include #include "tree.h" #include "rtl.h" + #include "real.h" #include "obstack.h" #include "toplev.h" #include "flags.h" *************** definitions and other extensions. */ *** 65,74 **** #include "function.h" #include "except.h" #include "ggc.h" ! ! #ifndef DIR_SEPARATOR ! #define DIR_SEPARATOR '/' ! #endif /* Local function prototypes */ static char *java_accstring_lookup PARAMS ((int)); --- 66,73 ---- #include "function.h" #include "except.h" #include "ggc.h" ! #include "debug.h" ! #include "tree-inline.h" /* Local function prototypes */ static char *java_accstring_lookup PARAMS ((int)); *************** static void check_abstract_method_header *** 115,121 **** static tree lookup_java_interface_method2 PARAMS ((tree, tree)); static tree resolve_expression_name PARAMS ((tree, tree *)); static tree maybe_create_class_interface_decl PARAMS ((tree, tree, tree, tree)); ! static int check_class_interface_creation PARAMS ((int, int, tree, tree, tree, tree)); static tree patch_method_invocation PARAMS ((tree, tree, tree, int, int *, tree *)); --- 114,120 ---- static tree lookup_java_interface_method2 PARAMS ((tree, tree)); static tree resolve_expression_name PARAMS ((tree, tree *)); static tree maybe_create_class_interface_decl PARAMS ((tree, tree, tree, tree)); ! static int check_class_interface_creation PARAMS ((int, int, tree, tree, tree, tree)); static tree patch_method_invocation PARAMS ((tree, tree, tree, int, int *, tree *)); *************** static tree resolve_and_layout PARAMS (( *** 125,133 **** static tree qualify_and_find PARAMS ((tree, tree, tree)); static tree resolve_no_layout PARAMS ((tree, tree)); static int invocation_mode PARAMS ((tree, int)); ! static tree find_applicable_accessible_methods_list PARAMS ((int, tree, tree, tree)); ! static void search_applicable_methods_list PARAMS ((int, tree, tree, tree, tree *, tree *)); static tree find_most_specific_methods_list PARAMS ((tree)); static int argument_types_convertible PARAMS ((tree, tree)); --- 124,132 ---- static tree qualify_and_find PARAMS ((tree, tree, tree)); static tree resolve_no_layout PARAMS ((tree, tree)); static int invocation_mode PARAMS ((tree, int)); ! static tree find_applicable_accessible_methods_list PARAMS ((int, tree, tree, tree)); ! static void search_applicable_methods_list PARAMS ((int, tree, tree, tree, tree *, tree *)); static tree find_most_specific_methods_list PARAMS ((tree)); static int argument_types_convertible PARAMS ((tree, tree)); *************** static tree patch_array_ref PARAMS ((tre *** 179,185 **** static tree make_qualified_name PARAMS ((tree, tree, int)); static tree merge_qualified_name PARAMS ((tree, tree)); static tree make_qualified_primary PARAMS ((tree, tree, int)); ! static int resolve_qualified_expression_name PARAMS ((tree, tree *, tree *, tree *)); static void qualify_ambiguous_name PARAMS ((tree)); static tree resolve_field_access PARAMS ((tree, tree *, tree *)); --- 178,184 ---- static tree make_qualified_name PARAMS ((tree, tree, int)); static tree merge_qualified_name PARAMS ((tree, tree)); static tree make_qualified_primary PARAMS ((tree, tree, int)); ! static int resolve_qualified_expression_name PARAMS ((tree, tree *, tree *, tree *)); static void qualify_ambiguous_name PARAMS ((tree)); static tree resolve_field_access PARAMS ((tree, tree *, tree *)); *************** static tree build_return PARAMS ((int, t *** 192,198 **** static tree patch_return PARAMS ((tree)); static tree maybe_access_field PARAMS ((tree, tree, tree)); static int complete_function_arguments PARAMS ((tree)); ! static int check_for_static_method_reference PARAMS ((tree, tree, tree, tree, tree)); static int not_accessible_p PARAMS ((tree, tree, tree, int)); static void check_deprecation PARAMS ((tree, tree)); --- 191,197 ---- static tree patch_return PARAMS ((tree)); static tree maybe_access_field PARAMS ((tree, tree, tree)); static int complete_function_arguments PARAMS ((tree)); ! static int check_for_static_method_reference PARAMS ((tree, tree, tree, tree, tree)); static int not_accessible_p PARAMS ((tree, tree, tree, int)); static void check_deprecation PARAMS ((tree, tree)); *************** static tree build_string_concatenation P *** 218,223 **** --- 217,223 ---- static tree patch_string_cst PARAMS ((tree)); static tree patch_string PARAMS ((tree)); static tree encapsulate_with_try_catch PARAMS ((int, tree, tree, tree)); + static tree build_assertion PARAMS ((int, tree, tree)); static tree build_try_statement PARAMS ((int, tree, tree)); static tree build_try_finally_statement PARAMS ((int, tree, tree)); static tree patch_try_statement PARAMS ((tree)); *************** static int pop_current_osb PARAMS ((stru *** 294,304 **** /* JDK 1.1 work. FIXME */ static tree maybe_make_nested_class_name PARAMS ((tree)); ! static void make_nested_class_name PARAMS ((tree)); static void set_nested_class_simple_name_value PARAMS ((tree, int)); static void link_nested_class_to_enclosing PARAMS ((void)); ! static tree resolve_inner_class PARAMS ((struct hash_table *, tree, tree *, ! tree *, tree)); static tree find_as_inner_class PARAMS ((tree, tree, tree)); static tree find_as_inner_class_do PARAMS ((tree, tree)); static int check_inner_class_redefinition PARAMS ((tree, tree)); --- 294,303 ---- /* JDK 1.1 work. FIXME */ static tree maybe_make_nested_class_name PARAMS ((tree)); ! static int make_nested_class_name PARAMS ((tree)); static void set_nested_class_simple_name_value PARAMS ((tree, int)); static void link_nested_class_to_enclosing PARAMS ((void)); ! static tree resolve_inner_class PARAMS ((htab_t, tree, tree *, tree *, tree)); static tree find_as_inner_class PARAMS ((tree, tree, tree)); static tree find_as_inner_class_do PARAMS ((tree, tree)); static int check_inner_class_redefinition PARAMS ((tree, tree)); *************** static tree maybe_build_thisn_access_met *** 310,316 **** static tree build_outer_field_access PARAMS ((tree, tree)); static tree build_outer_field_access_methods PARAMS ((tree)); ! static tree build_outer_field_access_expr PARAMS ((int, tree, tree, tree, tree)); static tree build_outer_method_access_method PARAMS ((tree)); static tree build_new_access_id PARAMS ((void)); --- 309,315 ---- static tree build_outer_field_access PARAMS ((tree, tree)); static tree build_outer_field_access_methods PARAMS ((tree)); ! static tree build_outer_field_access_expr PARAMS ((int, tree, tree, tree, tree)); static tree build_outer_method_access_method PARAMS ((tree)); static tree build_new_access_id PARAMS ((void)); *************** static tree build_outer_field_access_met *** 318,324 **** tree, tree)); static int outer_field_access_p PARAMS ((tree, tree)); ! static int outer_field_expanded_access_p PARAMS ((tree, tree *, tree *, tree *)); static tree outer_field_access_fix PARAMS ((tree, tree, tree)); static tree build_incomplete_class_ref PARAMS ((int, tree)); --- 317,323 ---- tree, tree)); static int outer_field_access_p PARAMS ((tree, tree)); ! static int outer_field_expanded_access_p PARAMS ((tree, tree *, tree *, tree *)); static tree outer_field_access_fix PARAMS ((tree, tree, tree)); static tree build_incomplete_class_ref PARAMS ((int, tree)); *************** static void create_new_parser_context PA *** 333,351 **** static void mark_parser_ctxt PARAMS ((void *)); static tree maybe_build_class_init_for_field PARAMS ((tree, tree)); ! static bool attach_init_test_initialization_flags PARAMS ((struct hash_entry *, ! PTR)); ! static bool emit_test_initialization PARAMS ((struct hash_entry *, PTR)); /* Number of error found so far. */ ! int java_error_count; /* Number of warning found so far. */ int java_warning_count; /* Tell when not to fold, when doing xrefs */ int do_not_fold; /* Cyclic inheritance report, as it can be set by layout_class */ const char *cyclic_inheritance_report; ! /* The current parser context */ struct parser_ctxt *ctxp; --- 332,351 ---- static void mark_parser_ctxt PARAMS ((void *)); static tree maybe_build_class_init_for_field PARAMS ((tree, tree)); ! static int attach_init_test_initialization_flags PARAMS ((PTR *, PTR)); ! static int emit_test_initialization PARAMS ((PTR *, PTR)); ! ! static char *string_convert_int_cst PARAMS ((tree)); /* Number of error found so far. */ ! int java_error_count; /* Number of warning found so far. */ int java_warning_count; /* Tell when not to fold, when doing xrefs */ int do_not_fold; /* Cyclic inheritance report, as it can be set by layout_class */ const char *cyclic_inheritance_report; ! /* The current parser context */ struct parser_ctxt *ctxp; *************** struct parser_ctxt *ctxp_for_generation *** 357,366 **** covers both integral/floating point division. The code is changed once the type of both operator is worked out. */ ! static const enum tree_code binop_lookup[19] = ! { PLUS_EXPR, MINUS_EXPR, MULT_EXPR, RDIV_EXPR, TRUNC_MOD_EXPR, ! LSHIFT_EXPR, RSHIFT_EXPR, URSHIFT_EXPR, BIT_AND_EXPR, BIT_XOR_EXPR, BIT_IOR_EXPR, TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR, EQ_EXPR, NE_EXPR, GT_EXPR, GE_EXPR, LT_EXPR, LE_EXPR, --- 357,366 ---- covers both integral/floating point division. The code is changed once the type of both operator is worked out. */ ! static const enum tree_code binop_lookup[19] = ! { PLUS_EXPR, MINUS_EXPR, MULT_EXPR, RDIV_EXPR, TRUNC_MOD_EXPR, ! LSHIFT_EXPR, RSHIFT_EXPR, URSHIFT_EXPR, BIT_AND_EXPR, BIT_XOR_EXPR, BIT_IOR_EXPR, TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR, EQ_EXPR, NE_EXPR, GT_EXPR, GE_EXPR, LT_EXPR, LE_EXPR, *************** static const enum tree_code binop_lookup *** 373,426 **** #define BINOP_COMPOUND_CANDIDATES 11 /* The "$L" identifier we use to create labels. */ ! static tree label_id = NULL_TREE; /* The "StringBuffer" identifier used for the String `+' operator. */ ! static tree wfl_string_buffer = NULL_TREE; /* The "append" identifier used for String `+' operator. */ ! static tree wfl_append = NULL_TREE; /* The "toString" identifier used for String `+' operator. */ ! static tree wfl_to_string = NULL_TREE; /* The "java.lang" import qualified name. */ ! static tree java_lang_id = NULL_TREE; /* The generated `inst$' identifier used for generated enclosing instance/field access functions. */ ! static tree inst_id = NULL_TREE; ! ! /* The "java.lang.Cloneable" qualified name. */ ! static tree java_lang_cloneable = NULL_TREE; ! ! /* The "java.io.Serializable" qualified name. */ ! static tree java_io_serializable = NULL_TREE; /* Context and flag for static blocks */ ! static tree current_static_block = NULL_TREE; /* The generated `write_parm_value$' identifier. */ ! static tree wpv_id; /* The list of all packages we've seen so far */ ! static tree package_list = NULL_TREE; ! /* Hold THIS for the scope of the current method decl. */ ! static tree current_this; /* Hold a list of catch clauses list. The first element of this list is the list of the catch clauses of the currently analysed try block. */ ! static tree currently_caught_type_list; /* This holds a linked list of all the case labels for the current switch statement. It is only used when checking to see if there are duplicate labels. FIXME: probably this should just be attached to the switch itself; then it could be referenced via `ctxp->current_loop'. */ ! static tree case_label_list; ! static tree src_parse_roots[1]; /* All classes seen from source code */ #define gclass_list src_parse_roots[0] --- 373,424 ---- #define BINOP_COMPOUND_CANDIDATES 11 /* The "$L" identifier we use to create labels. */ ! static GTY(()) tree label_id; /* The "StringBuffer" identifier used for the String `+' operator. */ ! static GTY(()) tree wfl_string_buffer; /* The "append" identifier used for String `+' operator. */ ! static GTY(()) tree wfl_append; /* The "toString" identifier used for String `+' operator. */ ! static GTY(()) tree wfl_to_string; /* The "java.lang" import qualified name. */ ! static GTY(()) tree java_lang_id; /* The generated `inst$' identifier used for generated enclosing instance/field access functions. */ ! static GTY(()) tree inst_id; /* Context and flag for static blocks */ ! static GTY(()) tree current_static_block; /* The generated `write_parm_value$' identifier. */ ! static GTY(()) tree wpv_id; /* The list of all packages we've seen so far */ ! static GTY(()) tree package_list; ! /* Hold THIS for the scope of the current method decl. */ ! static GTY(()) tree current_this; /* Hold a list of catch clauses list. The first element of this list is the list of the catch clauses of the currently analysed try block. */ ! static GTY(()) tree currently_caught_type_list; /* This holds a linked list of all the case labels for the current switch statement. It is only used when checking to see if there are duplicate labels. FIXME: probably this should just be attached to the switch itself; then it could be referenced via `ctxp->current_loop'. */ ! static GTY(()) tree case_label_list; ! /* Anonymous class counter. Will be reset to 1 every time a non ! anonymous class gets created. */ ! static int anonymous_class_counter = 1; ! ! static GTY(()) tree src_parse_roots[1]; /* All classes seen from source code */ #define gclass_list src_parse_roots[0] *************** static tree src_parse_roots[1]; *** 433,440 **** #define check_modifiers(__message, __value, __mask) do { \ if ((__value) & ~(__mask)) \ { \ ! int i, remainder = (__value) & ~(__mask); \ ! for (i = 0; i <= 10; i++) \ if ((1 << i) & remainder) \ parse_error_context (ctxp->modifier_ctx [i], (__message), \ java_accstring_lookup (1 << i)); \ --- 431,438 ---- #define check_modifiers(__message, __value, __mask) do { \ if ((__value) & ~(__mask)) \ { \ ! size_t i, remainder = (__value) & ~(__mask); \ ! for (i = 0; i < ARRAY_SIZE (ctxp->modifier_ctx); i++) \ if ((1 << i) & remainder) \ parse_error_context (ctxp->modifier_ctx [i], (__message), \ java_accstring_lookup (1 << i)); \ *************** static tree src_parse_roots[1]; *** 465,477 **** %token PLUS_TK MINUS_TK MULT_TK DIV_TK REM_TK %token LS_TK SRS_TK ZRS_TK %token AND_TK XOR_TK OR_TK ! %token BOOL_AND_TK BOOL_OR_TK %token EQ_TK NEQ_TK GT_TK GTE_TK LT_TK LTE_TK /* This maps to the same binop_lookup entry than the token above */ %token PLUS_ASSIGN_TK MINUS_ASSIGN_TK MULT_ASSIGN_TK DIV_ASSIGN_TK ! %token REM_ASSIGN_TK %token LS_ASSIGN_TK SRS_ASSIGN_TK ZRS_ASSIGN_TK %token AND_ASSIGN_TK XOR_ASSIGN_TK OR_ASSIGN_TK --- 463,475 ---- %token PLUS_TK MINUS_TK MULT_TK DIV_TK REM_TK %token LS_TK SRS_TK ZRS_TK %token AND_TK XOR_TK OR_TK ! %token BOOL_AND_TK BOOL_OR_TK %token EQ_TK NEQ_TK GT_TK GTE_TK LT_TK LTE_TK /* This maps to the same binop_lookup entry than the token above */ %token PLUS_ASSIGN_TK MINUS_ASSIGN_TK MULT_ASSIGN_TK DIV_ASSIGN_TK ! %token REM_ASSIGN_TK %token LS_ASSIGN_TK SRS_ASSIGN_TK ZRS_ASSIGN_TK %token AND_ASSIGN_TK XOR_ASSIGN_TK OR_ASSIGN_TK *************** static tree src_parse_roots[1]; *** 491,497 **** %token DEFAULT_TK IF_TK THROW_TK %token BOOLEAN_TK DO_TK IMPLEMENTS_TK ! %token THROWS_TK BREAK_TK IMPORT_TK %token ELSE_TK INSTANCEOF_TK RETURN_TK %token VOID_TK CATCH_TK INTERFACE_TK %token CASE_TK EXTENDS_TK FINALLY_TK --- 489,495 ---- %token DEFAULT_TK IF_TK THROW_TK %token BOOLEAN_TK DO_TK IMPLEMENTS_TK ! %token THROWS_TK BREAK_TK IMPORT_TK %token ELSE_TK INSTANCEOF_TK RETURN_TK %token VOID_TK CATCH_TK INTERFACE_TK %token CASE_TK EXTENDS_TK FINALLY_TK *************** static tree src_parse_roots[1]; *** 499,504 **** --- 497,503 ---- %token SWITCH_TK CONST_TK TRY_TK %token FOR_TK NEW_TK CONTINUE_TK %token GOTO_TK PACKAGE_TK THIS_TK + %token ASSERT_TK %token BYTE_TK SHORT_TK INT_TK LONG_TK %token CHAR_TK INTEGRAL_TK *************** static tree src_parse_roots[1]; *** 522,528 **** %type type_declaration compilation_unit field_declaration method_declaration extends_interfaces interfaces interface_type_list ! import_declarations package_declaration type_declarations interface_body interface_member_declaration constant_declaration interface_member_declarations interface_type --- 521,527 ---- %type type_declaration compilation_unit field_declaration method_declaration extends_interfaces interfaces interface_type_list ! import_declarations package_declaration type_declarations interface_body interface_member_declaration constant_declaration interface_member_declarations interface_type *************** static tree src_parse_roots[1]; *** 551,591 **** array_creation_expression array_type class_instance_creation_expression field_access method_invocation array_access something_dot_new ! argument_list postfix_expression while_expression post_increment_expression post_decrement_expression unary_expression_not_plus_minus unary_expression pre_increment_expression pre_decrement_expression cast_expression multiplicative_expression additive_expression ! shift_expression relational_expression ! equality_expression and_expression exclusive_or_expression inclusive_or_expression conditional_and_expression conditional_or_expression conditional_expression assignment_expression left_hand_side assignment for_header for_begin constant_expression do_statement_begin empty_statement switch_statement synchronized_statement throw_statement ! try_statement switch_expression switch_block catches catch_clause catch_clause_parameter finally anonymous_class_creation trap_overflow_corner_case %type return_statement break_statement continue_statement ! %type ASSIGN_TK MULT_ASSIGN_TK DIV_ASSIGN_TK %type REM_ASSIGN_TK PLUS_ASSIGN_TK MINUS_ASSIGN_TK %type LS_ASSIGN_TK SRS_ASSIGN_TK ZRS_ASSIGN_TK %type AND_ASSIGN_TK XOR_ASSIGN_TK OR_ASSIGN_TK %type ASSIGN_ANY_TK assignment_operator ! %token EQ_TK GTE_TK ZRS_TK SRS_TK GT_TK LTE_TK LS_TK %token BOOL_AND_TK AND_TK BOOL_OR_TK OR_TK INCR_TK PLUS_TK %token DECR_TK MINUS_TK MULT_TK DIV_TK XOR_TK REM_TK NEQ_TK %token NEG_TK REL_QM_TK REL_CL_TK NOT_TK LT_TK OCB_TK CCB_TK %token OP_TK OSB_TK DOT_TK THROW_TK INSTANCEOF_TK ! %type THIS_TK SUPER_TK RETURN_TK BREAK_TK CONTINUE_TK %type CASE_TK DEFAULT_TK TRY_TK CATCH_TK SYNCHRONIZED_TK ! %type NEW_TK - %type method_body - %type literal INT_LIT_TK FP_LIT_TK BOOL_LIT_TK CHAR_LIT_TK STRING_LIT_TK NULL_TK VOID_TK --- 550,591 ---- array_creation_expression array_type class_instance_creation_expression field_access method_invocation array_access something_dot_new ! argument_list postfix_expression while_expression post_increment_expression post_decrement_expression unary_expression_not_plus_minus unary_expression pre_increment_expression pre_decrement_expression cast_expression multiplicative_expression additive_expression ! shift_expression relational_expression ! equality_expression and_expression exclusive_or_expression inclusive_or_expression conditional_and_expression conditional_or_expression conditional_expression assignment_expression left_hand_side assignment for_header for_begin constant_expression do_statement_begin empty_statement switch_statement synchronized_statement throw_statement ! try_statement assert_statement ! switch_expression switch_block catches catch_clause catch_clause_parameter finally anonymous_class_creation trap_overflow_corner_case %type return_statement break_statement continue_statement ! %type ASSIGN_TK MULT_ASSIGN_TK DIV_ASSIGN_TK %type REM_ASSIGN_TK PLUS_ASSIGN_TK MINUS_ASSIGN_TK %type LS_ASSIGN_TK SRS_ASSIGN_TK ZRS_ASSIGN_TK %type AND_ASSIGN_TK XOR_ASSIGN_TK OR_ASSIGN_TK %type ASSIGN_ANY_TK assignment_operator ! %token EQ_TK GTE_TK ZRS_TK SRS_TK GT_TK LTE_TK LS_TK %token BOOL_AND_TK AND_TK BOOL_OR_TK OR_TK INCR_TK PLUS_TK %token DECR_TK MINUS_TK MULT_TK DIV_TK XOR_TK REM_TK NEQ_TK %token NEG_TK REL_QM_TK REL_CL_TK NOT_TK LT_TK OCB_TK CCB_TK %token OP_TK OSB_TK DOT_TK THROW_TK INSTANCEOF_TK ! %type THIS_TK SUPER_TK RETURN_TK BREAK_TK CONTINUE_TK %type CASE_TK DEFAULT_TK TRY_TK CATCH_TK SYNCHRONIZED_TK ! %type NEW_TK ASSERT_TK ! ! %type method_body %type literal INT_LIT_TK FP_LIT_TK BOOL_LIT_TK CHAR_LIT_TK STRING_LIT_TK NULL_TK VOID_TK *************** static tree src_parse_roots[1]; *** 594,600 **** %type formal_parameter_list formal_parameter method_declarator method_header ! %type primitive_type reference_type type BOOLEAN_TK INTEGRAL_TK FP_TK /* Added or modified JDK 1.1 rule types */ --- 594,600 ---- %type formal_parameter_list formal_parameter method_declarator method_header ! %type primitive_type reference_type type BOOLEAN_TK INTEGRAL_TK FP_TK /* Added or modified JDK 1.1 rule types */ *************** goal: *** 606,629 **** { /* Register static variables with the garbage collector. */ ! ggc_add_tree_root (&label_id, 1); ! ggc_add_tree_root (&wfl_string_buffer, 1); ! ggc_add_tree_root (&wfl_append, 1); ! ggc_add_tree_root (&wfl_to_string, 1); ! ggc_add_tree_root (&java_lang_id, 1); ! ggc_add_tree_root (&inst_id, 1); ! ggc_add_tree_root (&java_lang_cloneable, 1); ! ggc_add_tree_root (&java_io_serializable, 1); ! ggc_add_tree_root (¤t_static_block, 1); ! ggc_add_tree_root (&wpv_id, 1); ! ggc_add_tree_root (&package_list, 1); ! ggc_add_tree_root (¤t_this, 1); ! ggc_add_tree_root (¤tly_caught_type_list, 1); ! ggc_add_tree_root (&case_label_list, 1); ! ggc_add_root (&ctxp, 1, sizeof (struct parser_ctxt *), mark_parser_ctxt); ! ggc_add_root (&ctxp_for_generation, 1, sizeof (struct parser_ctxt *), mark_parser_ctxt); } --- 606,615 ---- { /* Register static variables with the garbage collector. */ ! ggc_add_root (&ctxp, 1, sizeof (struct parser_ctxt *), mark_parser_ctxt); ! ggc_add_root (&ctxp_for_generation, 1, sizeof (struct parser_ctxt *), mark_parser_ctxt); } *************** interface_type: *** 672,678 **** array_type: primitive_type dims ! { int osb = pop_current_osb (ctxp); tree t = build_java_array_type (($1), -1); while (--osb) --- 658,664 ---- array_type: primitive_type dims ! { int osb = pop_current_osb (ctxp); tree t = build_java_array_type (($1), -1); while (--osb) *************** array_type: *** 680,686 **** $$ = t; } | name dims ! { int osb = pop_current_osb (ctxp); tree t = $1; while (osb--) --- 666,672 ---- $$ = t; } | name dims ! { int osb = pop_current_osb (ctxp); tree t = $1; while (osb--) *************** type_declarations: *** 738,744 **** package_declaration: PACKAGE_TK name SC_TK ! { ctxp->package = EXPR_WFL_NODE ($2); register_package (ctxp->package); } --- 724,730 ---- package_declaration: PACKAGE_TK name SC_TK ! { ctxp->package = EXPR_WFL_NODE ($2); register_package (ctxp->package); } *************** single_type_import_declaration: *** 772,778 **** if (err && err != name) parse_error_context ($2, "Ambiguous class: `%s' and `%s'", ! IDENTIFIER_POINTER (name), IDENTIFIER_POINTER (err)); else REGISTER_IMPORT ($2, last_name); --- 758,764 ---- if (err && err != name) parse_error_context ($2, "Ambiguous class: `%s' and `%s'", ! IDENTIFIER_POINTER (name), IDENTIFIER_POINTER (err)); else REGISTER_IMPORT ($2, last_name); *************** type_import_on_demand_declaration: *** 800,806 **** if (! it) { read_import_dir ($2); ! ctxp->import_demand_list = chainon (ctxp->import_demand_list, build_tree_list ($2, NULL_TREE)); } --- 786,792 ---- if (! it) { read_import_dir ($2); ! ctxp->import_demand_list = chainon (ctxp->import_demand_list, build_tree_list ($2, NULL_TREE)); } *************** modifiers: *** 836,842 **** { int acc = (1 << $2); if ($$ & acc) ! parse_error_context (ctxp->modifier_ctx [$2], "Modifier `%s' declared twice", java_accstring_lookup (acc)); else --- 822,828 ---- { int acc = (1 << $2); if ($$ & acc) ! parse_error_context (ctxp->modifier_ctx [$2], "Modifier `%s' declared twice", java_accstring_lookup (acc)); else *************** class_declaration: *** 852,872 **** { create_class ($1, $3, $4, $5); } class_body {;} ! | CLASS_TK identifier super interfaces { create_class (0, $2, $3, $4); } class_body {;} | modifiers CLASS_TK error ! {yyerror ("Missing class name"); RECOVER;} | CLASS_TK error ! {yyerror ("Missing class name"); RECOVER;} | CLASS_TK identifier error { ! if (!ctxp->class_err) yyerror ("'{' expected"); DRECOVER(class1); } | modifiers CLASS_TK identifier error ! {if (!ctxp->class_err) yyerror ("'{' expected"); RECOVER;} ; super: --- 838,858 ---- { create_class ($1, $3, $4, $5); } class_body {;} ! | CLASS_TK identifier super interfaces { create_class (0, $2, $3, $4); } class_body {;} | modifiers CLASS_TK error ! { yyerror ("Missing class name"); RECOVER; } | CLASS_TK error ! { yyerror ("Missing class name"); RECOVER; } | CLASS_TK identifier error { ! if (!ctxp->class_err) yyerror ("'{' expected"); DRECOVER(class1); } | modifiers CLASS_TK identifier error ! { if (!ctxp->class_err) yyerror ("'{' expected"); RECOVER; } ; super: *************** interfaces: *** 886,903 **** | IMPLEMENTS_TK error { ctxp->class_err=1; ! yyerror ("Missing interface name"); } ; interface_type_list: interface_type ! { ctxp->interface_number = 1; $$ = build_tree_list ($1, NULL_TREE); } | interface_type_list C_TK interface_type ! { ctxp->interface_number++; $$ = chainon ($1, build_tree_list ($3, NULL_TREE)); } --- 872,889 ---- | IMPLEMENTS_TK error { ctxp->class_err=1; ! yyerror ("Missing interface name"); } ; interface_type_list: interface_type ! { ctxp->interface_number = 1; $$ = build_tree_list ($1, NULL_TREE); } | interface_type_list C_TK interface_type ! { ctxp->interface_number++; $$ = chainon ($1, build_tree_list ($3, NULL_TREE)); } *************** interface_type_list: *** 907,924 **** class_body: OCB_TK CCB_TK ! { /* Store the location of the `}' when doing xrefs */ if (flag_emit_xref) ! DECL_END_SOURCE_LINE (GET_CPC ()) = EXPR_WFL_ADD_COL ($2.location, 1); $$ = GET_CPC (); } | OCB_TK class_body_declarations CCB_TK ! { /* Store the location of the `}' when doing xrefs */ if (flag_emit_xref) ! DECL_END_SOURCE_LINE (GET_CPC ()) = EXPR_WFL_ADD_COL ($3.location, 1); $$ = GET_CPC (); } --- 893,910 ---- class_body: OCB_TK CCB_TK ! { /* Store the location of the `}' when doing xrefs */ if (flag_emit_xref) ! DECL_END_SOURCE_LINE (GET_CPC ()) = EXPR_WFL_ADD_COL ($2.location, 1); $$ = GET_CPC (); } | OCB_TK class_body_declarations CCB_TK ! { /* Store the location of the `}' when doing xrefs */ if (flag_emit_xref) ! DECL_END_SOURCE_LINE (GET_CPC ()) = EXPR_WFL_ADD_COL ($3.location, 1); $$ = GET_CPC (); } *************** field_declaration: *** 959,965 **** { register_fields (0, $1, $2); } | modifiers type variable_declarators SC_TK { ! check_modifiers ("Illegal modifier `%s' for field declaration", $1, FIELD_MODIFIERS); check_modifiers_consistency ($1); --- 945,951 ---- { register_fields (0, $1, $2); } | modifiers type variable_declarators SC_TK { ! check_modifiers ("Illegal modifier `%s' for field declaration", $1, FIELD_MODIFIERS); check_modifiers_consistency ($1); *************** variable_declarator: *** 980,989 **** variable_declarator_id { $$ = build_tree_list ($1, NULL_TREE); } | variable_declarator_id ASSIGN_TK variable_initializer ! { if (java_error_count) $3 = NULL_TREE; ! $$ = build_tree_list ($1, build_assignment ($2.token, $2.location, $1, $3)); } | variable_declarator_id ASSIGN_TK error --- 966,975 ---- variable_declarator_id { $$ = build_tree_list ($1, NULL_TREE); } | variable_declarator_id ASSIGN_TK variable_initializer ! { if (java_error_count) $3 = NULL_TREE; ! $$ = build_tree_list ($1, build_assignment ($2.token, $2.location, $1, $3)); } | variable_declarator_id ASSIGN_TK error *************** variable_declarator_id: *** 1007,1019 **** | identifier error {yyerror ("Invalid declaration"); DRECOVER(vdi);} | variable_declarator_id OSB_TK error ! { ! tree node = java_lval.node; ! if (node && (TREE_CODE (node) == INTEGER_CST ! || TREE_CODE (node) == EXPR_WITH_FILE_LOCATION)) ! yyerror ("Can't specify array dimension in a declaration"); ! else ! yyerror ("']' expected"); DRECOVER(vdi); } | variable_declarator_id CSB_TK error --- 993,1000 ---- | identifier error {yyerror ("Invalid declaration"); DRECOVER(vdi);} | variable_declarator_id OSB_TK error ! { ! yyerror ("']' expected"); DRECOVER(vdi); } | variable_declarator_id CSB_TK error *************** variable_initializer: *** 1027,1033 **** /* 19.8.3 Productions from 8.4: Method Declarations */ method_declaration: ! method_header { current_function_decl = $1; if (current_function_decl --- 1008,1014 ---- /* 19.8.3 Productions from 8.4: Method Declarations */ method_declaration: ! method_header { current_function_decl = $1; if (current_function_decl *************** method_declaration: *** 1042,1048 **** {YYNOT_TWICE yyerror ("'{' expected"); RECOVER;} ; ! method_header: type method_declarator throws { $$ = method_header (0, $1, $2, $3); } | VOID_TK method_declarator throws --- 1023,1029 ---- {YYNOT_TWICE yyerror ("'{' expected"); RECOVER;} ; ! method_header: type method_declarator throws { $$ = method_header (0, $1, $2, $3); } | VOID_TK method_declarator throws *************** method_header: *** 1057,1067 **** RECOVER; } | modifiers type error ! {RECOVER;} | VOID_TK error ! {yyerror ("Identifier expected"); RECOVER;} | modifiers VOID_TK error ! {yyerror ("Identifier expected"); RECOVER;} | modifiers error { yyerror ("Invalid method declaration, return type required"); --- 1038,1057 ---- RECOVER; } | modifiers type error ! { ! yyerror ("Identifier expected"); ! RECOVER; ! } | VOID_TK error ! { ! yyerror ("Identifier expected"); ! RECOVER; ! } | modifiers VOID_TK error ! { ! yyerror ("Identifier expected"); ! RECOVER; ! } | modifiers error { yyerror ("Invalid method declaration, return type required"); *************** method_header: *** 1071,1077 **** method_declarator: identifier OP_TK CP_TK ! { ctxp->formal_parameter_number = 0; $$ = method_declarator ($1, NULL_TREE); } --- 1061,1067 ---- method_declarator: identifier OP_TK CP_TK ! { ctxp->formal_parameter_number = 0; $$ = method_declarator ($1, NULL_TREE); } *************** method_declarator: *** 1080,1089 **** | method_declarator OSB_TK CSB_TK { EXPR_WFL_LINECOL (wfl_operator) = $2.location; ! TREE_PURPOSE ($1) = build_unresolved_array_type (TREE_PURPOSE ($1)); ! parse_warning_context ! (wfl_operator, "Discouraged form of returned type specification"); } | identifier OP_TK error --- 1070,1079 ---- | method_declarator OSB_TK CSB_TK { EXPR_WFL_LINECOL (wfl_operator) = $2.location; ! TREE_PURPOSE ($1) = build_unresolved_array_type (TREE_PURPOSE ($1)); ! parse_warning_context ! (wfl_operator, "Discouraged form of returned type specification"); } | identifier OP_TK error *************** formal_parameter: *** 1112,1118 **** $$ = build_tree_list ($2, $1); } | final type variable_declarator_id /* Added, JDK1.1 final parms */ ! { $$ = build_tree_list ($3, $2); ARG_FINAL_P ($$) = 1; } --- 1102,1108 ---- $$ = build_tree_list ($2, $1); } | final type variable_declarator_id /* Added, JDK1.1 final parms */ ! { $$ = build_tree_list ($3, $2); ARG_FINAL_P ($$) = 1; } *************** static: /* Test lval.sub_token here * *** 1177,1183 **** /* Can't have a static initializer in an innerclass */ if ($1 | ACC_STATIC && GET_CPC_LIST () && !TOPLEVEL_CLASS_DECL_P (GET_CPC ())) ! parse_error_context (MODIFIER_WFL (STATIC_TK), "Can't define static initializer in class `%s'. Static initializer can only be defined in top-level classes", IDENTIFIER_POINTER (DECL_NAME (GET_CPC ()))); --- 1167,1173 ---- /* Can't have a static initializer in an innerclass */ if ($1 | ACC_STATIC && GET_CPC_LIST () && !TOPLEVEL_CLASS_DECL_P (GET_CPC ())) ! parse_error_context (MODIFIER_WFL (STATIC_TK), "Can't define static initializer in class `%s'. Static initializer can only be defined in top-level classes", IDENTIFIER_POINTER (DECL_NAME (GET_CPC ()))); *************** constructor_header: *** 1205,1212 **** constructor_declarator: simple_name OP_TK CP_TK ! { ! ctxp->formal_parameter_number = 0; $$ = method_declarator ($1, NULL_TREE); } | simple_name OP_TK formal_parameter_list CP_TK --- 1195,1202 ---- constructor_declarator: simple_name OP_TK CP_TK ! { ! ctxp->formal_parameter_number = 0; $$ = method_declarator ($1, NULL_TREE); } | simple_name OP_TK formal_parameter_list CP_TK *************** constructor_body: *** 1218,1224 **** body so we can safely perform all the required code addition (super invocation and field initialization) */ block_begin constructor_block_end ! { BLOCK_EXPR_BODY ($2) = empty_stmt_node; $$ = $2; } --- 1208,1214 ---- body so we can safely perform all the required code addition (super invocation and field initialization) */ block_begin constructor_block_end ! { BLOCK_EXPR_BODY ($2) = empty_stmt_node; $$ = $2; } *************** constructor_block_end: *** 1237,1250 **** /* Error recovery for that rule moved down expression_statement: rule. */ explicit_constructor_invocation: this_or_super OP_TK CP_TK SC_TK ! { ! $$ = build_method_invocation ($1, NULL_TREE); $$ = build_debugable_stmt (EXPR_WFL_LINECOL ($1), $$); $$ = java_method_add_stmt (current_function_decl, $$); } | this_or_super OP_TK argument_list CP_TK SC_TK ! { ! $$ = build_method_invocation ($1, $3); $$ = build_debugable_stmt (EXPR_WFL_LINECOL ($1), $$); $$ = java_method_add_stmt (current_function_decl, $$); } --- 1227,1240 ---- /* Error recovery for that rule moved down expression_statement: rule. */ explicit_constructor_invocation: this_or_super OP_TK CP_TK SC_TK ! { ! $$ = build_method_invocation ($1, NULL_TREE); $$ = build_debugable_stmt (EXPR_WFL_LINECOL ($1), $$); $$ = java_method_add_stmt (current_function_decl, $$); } | this_or_super OP_TK argument_list CP_TK SC_TK ! { ! $$ = build_method_invocation ($1, $3); $$ = build_debugable_stmt (EXPR_WFL_LINECOL ($1), $$); $$ = java_method_add_stmt (current_function_decl, $$); } *************** interface_declaration: *** 1291,1309 **** interface_body { ; } | INTERFACE_TK identifier error ! {yyerror ("'{' expected"); RECOVER;} | modifiers INTERFACE_TK identifier error ! {yyerror ("'{' expected"); RECOVER;} ; extends_interfaces: EXTENDS_TK interface_type ! { ctxp->interface_number = 1; $$ = build_tree_list ($2, NULL_TREE); } | extends_interfaces C_TK interface_type ! { ctxp->interface_number++; $$ = chainon ($1, build_tree_list ($3, NULL_TREE)); } --- 1281,1299 ---- interface_body { ; } | INTERFACE_TK identifier error ! { yyerror ("'{' expected"); RECOVER; } | modifiers INTERFACE_TK identifier error ! { yyerror ("'{' expected"); RECOVER; } ; extends_interfaces: EXTENDS_TK interface_type ! { ctxp->interface_number = 1; $$ = build_tree_list ($2, NULL_TREE); } | extends_interfaces C_TK interface_type ! { ctxp->interface_number++; $$ = chainon ($1, build_tree_list ($3, NULL_TREE)); } *************** constant_declaration: *** 1340,1346 **** abstract_method_declaration: method_header SC_TK ! { check_abstract_method_header ($1); current_function_decl = NULL_TREE; /* FIXME ? */ } --- 1330,1336 ---- abstract_method_declaration: method_header SC_TK ! { check_abstract_method_header ($1); current_function_decl = NULL_TREE; /* FIXME ? */ } *************** array_initializer: *** 1362,1369 **** variable_initializers: variable_initializer ! { ! $$ = tree_cons (maybe_build_array_element_wfl ($1), $1, NULL_TREE); } | variable_initializers C_TK variable_initializer --- 1352,1359 ---- variable_initializers: variable_initializer ! { ! $$ = tree_cons (maybe_build_array_element_wfl ($1), $1, NULL_TREE); } | variable_initializers C_TK variable_initializer *************** variable_initializers: *** 1377,1388 **** /* 19.11 Production from 14: Blocks and Statements */ block: OCB_TK CCB_TK ! { /* Store the location of the `}' when doing xrefs */ if (current_function_decl && flag_emit_xref) ! DECL_END_SOURCE_LINE (current_function_decl) = EXPR_WFL_ADD_COL ($2.location, 1); ! $$ = empty_stmt_node; } | block_begin block_statements block_end { $$ = $3; } --- 1367,1378 ---- /* 19.11 Production from 14: Blocks and Statements */ block: OCB_TK CCB_TK ! { /* Store the location of the `}' when doing xrefs */ if (current_function_decl && flag_emit_xref) ! DECL_END_SOURCE_LINE (current_function_decl) = EXPR_WFL_ADD_COL ($2.location, 1); ! $$ = empty_stmt_node; } | block_begin block_statements block_end { $$ = $3; } *************** block_begin: *** 1395,1406 **** block_end: CCB_TK ! { maybe_absorb_scoping_blocks (); /* Store the location of the `}' when doing xrefs */ if (current_function_decl && flag_emit_xref) ! DECL_END_SOURCE_LINE (current_function_decl) = ! EXPR_WFL_ADD_COL ($1.location, 1); $$ = exit_block (); if (!BLOCK_SUBBLOCKS ($$)) BLOCK_SUBBLOCKS ($$) = empty_stmt_node; --- 1385,1396 ---- block_end: CCB_TK ! { maybe_absorb_scoping_blocks (); /* Store the location of the `}' when doing xrefs */ if (current_function_decl && flag_emit_xref) ! DECL_END_SOURCE_LINE (current_function_decl) = ! EXPR_WFL_ADD_COL ($1.location, 1); $$ = exit_block (); if (!BLOCK_SUBBLOCKS ($$)) BLOCK_SUBBLOCKS ($$) = empty_stmt_node; *************** block_statement: *** 1417,1423 **** | statement { java_method_add_stmt (current_function_decl, $1); } | class_declaration /* Added, JDK1.1 local classes */ ! { LOCAL_CLASS_P (TREE_TYPE (GET_CPC ())) = 1; end_class_declaration (1); } --- 1407,1413 ---- | statement { java_method_add_stmt (current_function_decl, $1); } | class_declaration /* Added, JDK1.1 local classes */ ! { LOCAL_CLASS_P (TREE_TYPE (GET_CPC ())) = 1; end_class_declaration (1); } *************** statement_without_trailing_substatement: *** 1465,1482 **** | synchronized_statement | throw_statement | try_statement ; empty_statement: SC_TK ! { ! if (flag_extraneous_semicolon ! && ! current_static_block ! && (! current_function_decl || /* Verify we're not in a inner class declaration */ (GET_CPC () != TYPE_NAME (DECL_CONTEXT (current_function_decl))))) ! { EXPR_WFL_SET_LINECOL (wfl_operator, lineno, -1); parse_warning_context (wfl_operator, "An empty declaration is a deprecated feature that should not be used"); --- 1455,1473 ---- | synchronized_statement | throw_statement | try_statement + | assert_statement ; empty_statement: SC_TK ! { ! if (flag_extraneous_semicolon ! && ! current_static_block ! && (! current_function_decl || /* Verify we're not in a inner class declaration */ (GET_CPC () != TYPE_NAME (DECL_CONTEXT (current_function_decl))))) ! { EXPR_WFL_SET_LINECOL (wfl_operator, lineno, -1); parse_warning_context (wfl_operator, "An empty declaration is a deprecated feature that should not be used"); *************** empty_statement: *** 1488,1494 **** label_decl: identifier REL_CL_TK { ! $$ = build_labeled_block (EXPR_WFL_LINECOL ($1), EXPR_WFL_NODE ($1)); pushlevel (2); push_labeled_block ($$); --- 1479,1485 ---- label_decl: identifier REL_CL_TK { ! $$ = build_labeled_block (EXPR_WFL_LINECOL ($1), EXPR_WFL_NODE ($1)); pushlevel (2); push_labeled_block ($$); *************** expression_statement: *** 1520,1526 **** info to be eventually generate here. */ $$ = JAVA_MAYBE_GENERATE_DEBUG_INFO ($$); } ! | error SC_TK { YYNOT_TWICE yyerror ("Invalid expression statement"); DRECOVER (expr_stmt); --- 1511,1517 ---- info to be eventually generate here. */ $$ = JAVA_MAYBE_GENERATE_DEBUG_INFO ($$); } ! | error SC_TK { YYNOT_TWICE yyerror ("Invalid expression statement"); DRECOVER (expr_stmt); *************** expression_statement: *** 1561,1567 **** {yyerror ("';' expected"); RECOVER;} ; ! statement_expression: assignment | pre_increment_expression | pre_decrement_expression --- 1552,1558 ---- {yyerror ("';' expected"); RECOVER;} ; ! statement_expression: assignment | pre_increment_expression | pre_decrement_expression *************** statement_expression: *** 1573,1580 **** if_then_statement: IF_TK OP_TK expression CP_TK statement ! { ! $$ = build_if_else_statement ($2.location, $3, $5, NULL_TREE); } | IF_TK error --- 1564,1571 ---- if_then_statement: IF_TK OP_TK expression CP_TK statement ! { ! $$ = build_if_else_statement ($2.location, $3, $5, NULL_TREE); } | IF_TK error *************** switch_statement: *** 1601,1607 **** enter_block (); } switch_block ! { /* Make into "proper list" of COMPOUND_EXPRs. I.e. make the last statement also have its own COMPOUND_EXPR. */ --- 1592,1598 ---- enter_block (); } switch_block ! { /* Make into "proper list" of COMPOUND_EXPRs. I.e. make the last statement also have its own COMPOUND_EXPR. */ *************** switch_statement: *** 1613,1619 **** switch_expression: SWITCH_TK OP_TK expression CP_TK ! { $$ = build (SWITCH_EXPR, NULL_TREE, $3, NULL_TREE); EXPR_WFL_LINECOL ($$) = $2.location; } --- 1604,1610 ---- switch_expression: SWITCH_TK OP_TK expression CP_TK ! { $$ = build (SWITCH_EXPR, NULL_TREE, $3, NULL_TREE); EXPR_WFL_LINECOL ($$) = $2.location; } *************** switch_block: *** 1639,1645 **** { $$ = NULL_TREE; } ; ! switch_block_statement_groups: switch_block_statement_group | switch_block_statement_groups switch_block_statement_group ; --- 1630,1636 ---- { $$ = NULL_TREE; } ; ! switch_block_statement_groups: switch_block_statement_group | switch_block_statement_groups switch_block_statement_group ; *************** switch_labels: *** 1655,1667 **** switch_label: CASE_TK constant_expression REL_CL_TK ! { tree lab = build1 (CASE_EXPR, NULL_TREE, $2); EXPR_WFL_LINECOL (lab) = $1.location; java_method_add_stmt (current_function_decl, lab); } | DEFAULT_TK REL_CL_TK ! { tree lab = build (DEFAULT_EXPR, NULL_TREE, NULL_TREE); EXPR_WFL_LINECOL (lab) = $1.location; java_method_add_stmt (current_function_decl, lab); --- 1646,1658 ---- switch_label: CASE_TK constant_expression REL_CL_TK ! { tree lab = build1 (CASE_EXPR, NULL_TREE, $2); EXPR_WFL_LINECOL (lab) = $1.location; java_method_add_stmt (current_function_decl, lab); } | DEFAULT_TK REL_CL_TK ! { tree lab = build (DEFAULT_EXPR, NULL_TREE, NULL_TREE); EXPR_WFL_LINECOL (lab) = $1.location; java_method_add_stmt (current_function_decl, lab); *************** switch_label: *** 1676,1682 **** while_expression: WHILE_TK OP_TK expression CP_TK ! { tree body = build_loop_body ($2.location, $3, 0); $$ = build_new_loop (body); } --- 1667,1673 ---- while_expression: WHILE_TK OP_TK expression CP_TK ! { tree body = build_loop_body ($2.location, $3, 0); $$ = build_new_loop (body); } *************** while_statement_nsi: *** 1700,1713 **** do_statement_begin: DO_TK ! { tree body = build_loop_body (0, NULL_TREE, 1); $$ = build_new_loop (body); } /* Need error handing here. FIXME */ ; ! do_statement: do_statement_begin statement WHILE_TK OP_TK expression CP_TK SC_TK { $$ = finish_loop_body ($4.location, $5, $2, 1); } ; --- 1691,1704 ---- do_statement_begin: DO_TK ! { tree body = build_loop_body (0, NULL_TREE, 1); $$ = build_new_loop (body); } /* Need error handing here. FIXME */ ; ! do_statement: do_statement_begin statement WHILE_TK OP_TK expression CP_TK SC_TK { $$ = finish_loop_body ($4.location, $5, $2, 1); } ; *************** for_statement: *** 1720,1729 **** $$ = finish_for_loop (EXPR_WFL_LINECOL ($3), $3, $5, $7); } | for_begin SC_TK SC_TK for_update CP_TK statement ! { $$ = finish_for_loop (0, NULL_TREE, $4, $6); /* We have not condition, so we get rid of the EXIT_EXPR */ ! LOOP_EXPR_BODY_CONDITION_EXPR (LOOP_EXPR_BODY ($$), 0) = empty_stmt_node; } | for_begin SC_TK error --- 1711,1720 ---- $$ = finish_for_loop (EXPR_WFL_LINECOL ($3), $3, $5, $7); } | for_begin SC_TK SC_TK for_update CP_TK statement ! { $$ = finish_for_loop (0, NULL_TREE, $4, $6); /* We have not condition, so we get rid of the EXIT_EXPR */ ! LOOP_EXPR_BODY_CONDITION_EXPR (LOOP_EXPR_BODY ($$), 0) = empty_stmt_node; } | for_begin SC_TK error *************** for_statement_nsi: *** 1738,1757 **** for_begin SC_TK expression SC_TK for_update CP_TK statement_nsi { $$ = finish_for_loop (EXPR_WFL_LINECOL ($3), $3, $5, $7);} | for_begin SC_TK SC_TK for_update CP_TK statement_nsi ! { $$ = finish_for_loop (0, NULL_TREE, $4, $6); /* We have not condition, so we get rid of the EXIT_EXPR */ ! LOOP_EXPR_BODY_CONDITION_EXPR (LOOP_EXPR_BODY ($$), 0) = empty_stmt_node; } ; for_header: FOR_TK OP_TK ! { /* This scope defined for local variable that may be defined within the scope of the for loop */ ! enter_block (); } | FOR_TK error {yyerror ("'(' expected"); DRECOVER(for_1);} --- 1729,1748 ---- for_begin SC_TK expression SC_TK for_update CP_TK statement_nsi { $$ = finish_for_loop (EXPR_WFL_LINECOL ($3), $3, $5, $7);} | for_begin SC_TK SC_TK for_update CP_TK statement_nsi ! { $$ = finish_for_loop (0, NULL_TREE, $4, $6); /* We have not condition, so we get rid of the EXIT_EXPR */ ! LOOP_EXPR_BODY_CONDITION_EXPR (LOOP_EXPR_BODY ($$), 0) = empty_stmt_node; } ; for_header: FOR_TK OP_TK ! { /* This scope defined for local variable that may be defined within the scope of the for loop */ ! enter_block (); } | FOR_TK error {yyerror ("'(' expected"); DRECOVER(for_1);} *************** for_header: *** 1761,1767 **** for_begin: for_header for_init ! { /* We now declare the loop body. The loop is declared as a for loop. */ tree body = build_loop_body (0, NULL_TREE, 0); --- 1752,1758 ---- for_begin: for_header for_init ! { /* We now declare the loop body. The loop is declared as a for loop. */ tree body = build_loop_body (0, NULL_TREE, 0); *************** for_begin: *** 1775,1787 **** for_init: /* Can be empty */ { $$ = empty_stmt_node; } | statement_expression_list ! { /* Init statement recorded within the previously defined block scope */ $$ = java_method_add_stmt (current_function_decl, $1); } | local_variable_declaration ! { /* Local variable are recorded within the previously defined block scope */ $$ = NULL_TREE; --- 1766,1778 ---- for_init: /* Can be empty */ { $$ = empty_stmt_node; } | statement_expression_list ! { /* Init statement recorded within the previously defined block scope */ $$ = java_method_add_stmt (current_function_decl, $1); } | local_variable_declaration ! { /* Local variable are recorded within the previously defined block scope */ $$ = NULL_TREE; *************** return_statement: *** 1840,1846 **** throw_statement: THROW_TK expression SC_TK ! { $$ = build1 (THROW_EXPR, NULL_TREE, $2); EXPR_WFL_LINECOL ($$) = $1.location; } --- 1831,1837 ---- throw_statement: THROW_TK expression SC_TK ! { $$ = build1 (THROW_EXPR, NULL_TREE, $2); EXPR_WFL_LINECOL ($$) = $1.location; } *************** throw_statement: *** 1850,1860 **** {yyerror ("';' expected"); RECOVER;} ; synchronized_statement: synchronized OP_TK expression CP_TK block ! { $$ = build (SYNCHRONIZED_EXPR, NULL_TREE, $3, $5); ! EXPR_WFL_LINECOL ($$) = EXPR_WFL_LINECOL (MODIFIER_WFL (SYNCHRONIZED_TK)); } | synchronized OP_TK expression CP_TK error --- 1841,1866 ---- {yyerror ("';' expected"); RECOVER;} ; + assert_statement: + ASSERT_TK expression REL_CL_TK expression SC_TK + { + $$ = build_assertion ($1.location, $2, $4); + } + | ASSERT_TK expression SC_TK + { + $$ = build_assertion ($1.location, $2, NULL_TREE); + } + | ASSERT_TK error + {yyerror ("Missing term"); RECOVER;} + | ASSERT_TK expression error + {yyerror ("';' expected"); RECOVER;} + ; + synchronized_statement: synchronized OP_TK expression CP_TK block ! { $$ = build (SYNCHRONIZED_EXPR, NULL_TREE, $3, $5); ! EXPR_WFL_LINECOL ($$) = EXPR_WFL_LINECOL (MODIFIER_WFL (SYNCHRONIZED_TK)); } | synchronized OP_TK expression CP_TK error *************** synchronized: *** 1874,1880 **** "Illegal modifier `%s'. Only `synchronized' was expected here", $1, ACC_SYNCHRONIZED); if ($1 != ACC_SYNCHRONIZED) ! MODIFIER_WFL (SYNCHRONIZED_TK) = build_wfl_node (NULL_TREE); } ; --- 1880,1886 ---- "Illegal modifier `%s'. Only `synchronized' was expected here", $1, ACC_SYNCHRONIZED); if ($1 != ACC_SYNCHRONIZED) ! MODIFIER_WFL (SYNCHRONIZED_TK) = build_wfl_node (NULL_TREE); } ; *************** try_statement: *** 1885,1891 **** | TRY_TK block finally { $$ = build_try_finally_statement ($1.location, $2, $3); } | TRY_TK block catches finally ! { $$ = build_try_finally_statement ($1.location, build_try_statement ($1.location, $2, $3), $4); } --- 1891,1897 ---- | TRY_TK block finally { $$ = build_try_finally_statement ($1.location, $2, $3); } | TRY_TK block catches finally ! { $$ = build_try_finally_statement ($1.location, build_try_statement ($1.location, $2, $3), $4); } *************** try_statement: *** 1896,1902 **** catches: catch_clause | catches catch_clause ! { TREE_CHAIN ($2) = $1; $$ = $2; } --- 1902,1908 ---- catches: catch_clause | catches catch_clause ! { TREE_CHAIN ($2) = $1; $$ = $2; } *************** catches: *** 1904,1910 **** catch_clause: catch_clause_parameter block ! { java_method_add_stmt (current_function_decl, $2); exit_block (); $$ = $1; --- 1910,1916 ---- catch_clause: catch_clause_parameter block ! { java_method_add_stmt (current_function_decl, $2); exit_block (); $$ = $1; *************** catch_clause: *** 1913,1926 **** catch_clause_parameter: CATCH_TK OP_TK formal_parameter CP_TK ! { /* We add a block to define a scope for formal_parameter (CCBP). The formal parameter is declared initialized by the appropriate function call */ tree ccpb = enter_block (); tree init = build_assignment ! (ASSIGN_TK, $2.location, TREE_PURPOSE ($3), build (JAVA_EXC_OBJ_EXPR, ptr_type_node)); declare_local_variables (0, TREE_VALUE ($3), build_tree_list (TREE_PURPOSE ($3), --- 1919,1932 ---- catch_clause_parameter: CATCH_TK OP_TK formal_parameter CP_TK ! { /* We add a block to define a scope for formal_parameter (CCBP). The formal parameter is declared initialized by the appropriate function call */ tree ccpb = enter_block (); tree init = build_assignment ! (ASSIGN_TK, $2.location, TREE_PURPOSE ($3), build (JAVA_EXC_OBJ_EXPR, ptr_type_node)); declare_local_variables (0, TREE_VALUE ($3), build_tree_list (TREE_PURPOSE ($3), *************** catch_clause_parameter: *** 1930,1938 **** } | CATCH_TK error {yyerror ("'(' expected"); RECOVER; $$ = NULL_TREE;} ! | CATCH_TK OP_TK error { ! yyerror ("Missing term or ')' expected"); RECOVER; $$ = NULL_TREE; } | CATCH_TK OP_TK error CP_TK /* That's for () */ --- 1936,1944 ---- } | CATCH_TK error {yyerror ("'(' expected"); RECOVER; $$ = NULL_TREE;} ! | CATCH_TK OP_TK error { ! yyerror ("Missing term or ')' expected"); RECOVER; $$ = NULL_TREE; } | CATCH_TK OP_TK error CP_TK /* That's for () */ *************** primary_no_new_array: *** 1967,1977 **** refering to a 'ClassName' (class_name) rule that doesn't exist. Used name: instead. */ | name DOT_TK THIS_TK ! { tree wfl = build_wfl_node (this_identifier_node); $$ = make_qualified_primary ($1, wfl, EXPR_WFL_LINECOL ($1)); } ! | OP_TK expression error {yyerror ("')' expected"); RECOVER;} | name DOT_TK error {yyerror ("'class' or 'this' expected" ); RECOVER;} --- 1973,1983 ---- refering to a 'ClassName' (class_name) rule that doesn't exist. Used name: instead. */ | name DOT_TK THIS_TK ! { tree wfl = build_wfl_node (this_identifier_node); $$ = make_qualified_primary ($1, wfl, EXPR_WFL_LINECOL ($1)); } ! | OP_TK expression error {yyerror ("')' expected"); RECOVER;} | name DOT_TK error {yyerror ("'class' or 'this' expected" ); RECOVER;} *************** type_literals: *** 1989,1995 **** | primitive_type DOT_TK CLASS_TK { $$ = build_incomplete_class_ref ($2.location, $1); } | VOID_TK DOT_TK CLASS_TK ! { $$ = build_incomplete_class_ref ($2.location, void_type_node); } --- 1995,2001 ---- | primitive_type DOT_TK CLASS_TK { $$ = build_incomplete_class_ref ($2.location, $1); } | VOID_TK DOT_TK CLASS_TK ! { $$ = build_incomplete_class_ref ($2.location, void_type_node); } *************** class_instance_creation_expression: *** 2005,2024 **** primary instead of primary solely which couldn't work in all situations. */ | something_dot_new identifier OP_TK CP_TK ! { tree ctor = build_new_invocation ($2, NULL_TREE); ! $$ = make_qualified_primary ($1, ctor, EXPR_WFL_LINECOL ($1)); } | something_dot_new identifier OP_TK CP_TK class_body | something_dot_new identifier OP_TK argument_list CP_TK ! { tree ctor = build_new_invocation ($2, $4); ! $$ = make_qualified_primary ($1, ctor, EXPR_WFL_LINECOL ($1)); } | something_dot_new identifier OP_TK argument_list CP_TK class_body ! | NEW_TK error SC_TK {yyerror ("'(' expected"); DRECOVER(new_1);} | NEW_TK class_type error {yyerror ("'(' expected"); RECOVER;} --- 2011,2030 ---- primary instead of primary solely which couldn't work in all situations. */ | something_dot_new identifier OP_TK CP_TK ! { tree ctor = build_new_invocation ($2, NULL_TREE); ! $$ = make_qualified_primary ($1, ctor, EXPR_WFL_LINECOL ($1)); } | something_dot_new identifier OP_TK CP_TK class_body | something_dot_new identifier OP_TK argument_list CP_TK ! { tree ctor = build_new_invocation ($2, $4); ! $$ = make_qualified_primary ($1, ctor, EXPR_WFL_LINECOL ($1)); } | something_dot_new identifier OP_TK argument_list CP_TK class_body ! | NEW_TK error SC_TK {yyerror ("'(' expected"); DRECOVER(new_1);} | NEW_TK class_type error {yyerror ("'(' expected"); RECOVER;} *************** class_instance_creation_expression: *** 2038,2047 **** in the documentation but doesn't exist. */ anonymous_class_creation: ! NEW_TK class_type OP_TK argument_list CP_TK { create_anonymous_class ($1.location, $2); } class_body ! { tree id = build_wfl_node (DECL_NAME (GET_CPC ())); EXPR_WFL_LINECOL (id) = EXPR_WFL_LINECOL ($2); --- 2044,2053 ---- in the documentation but doesn't exist. */ anonymous_class_creation: ! NEW_TK class_type OP_TK argument_list CP_TK { create_anonymous_class ($1.location, $2); } class_body ! { tree id = build_wfl_node (DECL_NAME (GET_CPC ())); EXPR_WFL_LINECOL (id) = EXPR_WFL_LINECOL ($2); *************** anonymous_class_creation: *** 2063,2069 **** must be generated following the hints provided by the `new' expression. Whether a super constructor of that nature exists or not is to be verified ! later on in verify_constructor_super. It's during the expansion of a `new' statement refering to an anonymous class that a ctor will --- 2069,2075 ---- must be generated following the hints provided by the `new' expression. Whether a super constructor of that nature exists or not is to be verified ! later on in verify_constructor_super. It's during the expansion of a `new' statement refering to an anonymous class that a ctor will *************** anonymous_class_creation: *** 2071,2080 **** right arguments. */ } ! | NEW_TK class_type OP_TK CP_TK { create_anonymous_class ($1.location, $2); } ! class_body ! { tree id = build_wfl_node (DECL_NAME (GET_CPC ())); EXPR_WFL_LINECOL (id) = EXPR_WFL_LINECOL ($2); --- 2077,2086 ---- right arguments. */ } ! | NEW_TK class_type OP_TK CP_TK { create_anonymous_class ($1.location, $2); } ! class_body ! { tree id = build_wfl_node (DECL_NAME (GET_CPC ())); EXPR_WFL_LINECOL (id) = EXPR_WFL_LINECOL ($2); *************** something_dot_new: /* Added, not part o *** 2097,2105 **** argument_list: expression ! { $$ = tree_cons (NULL_TREE, $1, NULL_TREE); ! ctxp->formal_parameter_number = 1; } | argument_list C_TK expression { --- 2103,2111 ---- argument_list: expression ! { $$ = tree_cons (NULL_TREE, $1, NULL_TREE); ! ctxp->formal_parameter_number = 1; } | argument_list C_TK expression { *************** array_creation_expression: *** 2133,2144 **** $2, get_identifier (sig), $4); } | NEW_TK primitive_type dims array_initializer ! { int osb = pop_current_osb (ctxp); tree type = $2; while (osb--) type = build_java_array_type (type, -1); ! $$ = build (NEW_ANONYMOUS_ARRAY_EXPR, NULL_TREE, build_pointer_type (type), NULL_TREE, $4); } | NEW_TK error CSB_TK --- 2139,2150 ---- $2, get_identifier (sig), $4); } | NEW_TK primitive_type dims array_initializer ! { int osb = pop_current_osb (ctxp); tree type = $2; while (osb--) type = build_java_array_type (type, -1); ! $$ = build (NEW_ANONYMOUS_ARRAY_EXPR, NULL_TREE, build_pointer_type (type), NULL_TREE, $4); } | NEW_TK error CSB_TK *************** dim_exprs: *** 2156,2162 **** dim_expr: OSB_TK expression CSB_TK ! { if (JNUMERIC_TYPE_P (TREE_TYPE ($2))) { $2 = build_wfl_node ($2); --- 2162,2168 ---- dim_expr: OSB_TK expression CSB_TK ! { if (JNUMERIC_TYPE_P (TREE_TYPE ($2))) { $2 = build_wfl_node ($2); *************** dim_expr: *** 2175,2183 **** } ; ! dims: OSB_TK CSB_TK ! { int allocate = 0; /* If not initialized, allocate memory for the osb numbers stack */ --- 2181,2189 ---- } ; ! dims: OSB_TK CSB_TK ! { int allocate = 0; /* If not initialized, allocate memory for the osb numbers stack */ *************** dims: *** 2189,2195 **** /* If capacity overflown, reallocate a bigger chunk */ else if (ctxp->osb_depth+1 == ctxp->osb_limit) allocate = ctxp->osb_limit << 1; ! if (allocate) { allocate *= sizeof (int); --- 2195,2201 ---- /* If capacity overflown, reallocate a bigger chunk */ else if (ctxp->osb_depth+1 == ctxp->osb_limit) allocate = ctxp->osb_limit << 1; ! if (allocate) { allocate *= sizeof (int); *************** dims: *** 2211,2217 **** field_access: primary DOT_TK identifier { $$ = make_qualified_primary ($1, $3, $2.location); } ! /* FIXME - REWRITE TO: { $$ = build_binop (COMPONENT_REF, $2.location, $1, $3); } */ | SUPER_TK DOT_TK identifier { --- 2217,2223 ---- field_access: primary DOT_TK identifier { $$ = make_qualified_primary ($1, $3, $2.location); } ! /* FIXME - REWRITE TO: { $$ = build_binop (COMPONENT_REF, $2.location, $1, $3); } */ | SUPER_TK DOT_TK identifier { *************** method_invocation: *** 2229,2237 **** | name OP_TK argument_list CP_TK { $$ = build_method_invocation ($1, $3); } | primary DOT_TK identifier OP_TK CP_TK ! { if (TREE_CODE ($1) == THIS_EXPR) ! $$ = build_this_super_qualified_invocation (1, $3, NULL_TREE, 0, $2.location); else { --- 2235,2243 ---- | name OP_TK argument_list CP_TK { $$ = build_method_invocation ($1, $3); } | primary DOT_TK identifier OP_TK CP_TK ! { if (TREE_CODE ($1) == THIS_EXPR) ! $$ = build_this_super_qualified_invocation (1, $3, NULL_TREE, 0, $2.location); else { *************** method_invocation: *** 2240,2248 **** } } | primary DOT_TK identifier OP_TK argument_list CP_TK ! { if (TREE_CODE ($1) == THIS_EXPR) ! $$ = build_this_super_qualified_invocation (1, $3, $5, 0, $2.location); else { --- 2246,2254 ---- } } | primary DOT_TK identifier OP_TK argument_list CP_TK ! { if (TREE_CODE ($1) == THIS_EXPR) ! $$ = build_this_super_qualified_invocation (1, $3, $5, 0, $2.location); else { *************** method_invocation: *** 2251,2263 **** } } | SUPER_TK DOT_TK identifier OP_TK CP_TK ! { ! $$ = build_this_super_qualified_invocation (0, $3, NULL_TREE, $1.location, $2.location); } | SUPER_TK DOT_TK identifier OP_TK argument_list CP_TK { ! $$ = build_this_super_qualified_invocation (0, $3, $5, $1.location, $2.location); } /* Screws up thing. I let it here until I'm convinced it can --- 2257,2269 ---- } } | SUPER_TK DOT_TK identifier OP_TK CP_TK ! { ! $$ = build_this_super_qualified_invocation (0, $3, NULL_TREE, $1.location, $2.location); } | SUPER_TK DOT_TK identifier OP_TK argument_list CP_TK { ! $$ = build_this_super_qualified_invocation (0, $3, $5, $1.location, $2.location); } /* Screws up thing. I let it here until I'm convinced it can *************** unary_expression_not_plus_minus: *** 2365,2386 **** cast_expression: /* Error handling here is potentially weak */ OP_TK primitive_type dims CP_TK unary_expression ! { tree type = $2; int osb = pop_current_osb (ctxp); while (osb--) type = build_java_array_type (type, -1); ! $$ = build_cast ($1.location, type, $5); } | OP_TK primitive_type CP_TK unary_expression { $$ = build_cast ($1.location, $2, $4); } | OP_TK expression CP_TK unary_expression_not_plus_minus { $$ = build_cast ($1.location, $2, $4); } | OP_TK name dims CP_TK unary_expression_not_plus_minus ! { const char *ptr; ! int osb = pop_current_osb (ctxp); ! obstack_grow (&temporary_obstack, IDENTIFIER_POINTER (EXPR_WFL_NODE ($2)), IDENTIFIER_LENGTH (EXPR_WFL_NODE ($2))); while (osb--) --- 2371,2392 ---- cast_expression: /* Error handling here is potentially weak */ OP_TK primitive_type dims CP_TK unary_expression ! { tree type = $2; int osb = pop_current_osb (ctxp); while (osb--) type = build_java_array_type (type, -1); ! $$ = build_cast ($1.location, type, $5); } | OP_TK primitive_type CP_TK unary_expression { $$ = build_cast ($1.location, $2, $4); } | OP_TK expression CP_TK unary_expression_not_plus_minus { $$ = build_cast ($1.location, $2, $4); } | OP_TK name dims CP_TK unary_expression_not_plus_minus ! { const char *ptr; ! int osb = pop_current_osb (ctxp); ! obstack_grow (&temporary_obstack, IDENTIFIER_POINTER (EXPR_WFL_NODE ($2)), IDENTIFIER_LENGTH (EXPR_WFL_NODE ($2))); while (osb--) *************** cast_expression: /* Error handling here *** 2408,2426 **** multiplicative_expression: unary_expression | multiplicative_expression MULT_TK unary_expression ! { ! $$ = build_binop (BINOP_LOOKUP ($2.token), $2.location, $1, $3); } | multiplicative_expression DIV_TK unary_expression { $$ = build_binop (BINOP_LOOKUP ($2.token), $2.location, ! $1, $3); } | multiplicative_expression REM_TK unary_expression { $$ = build_binop (BINOP_LOOKUP ($2.token), $2.location, ! $1, $3); } | multiplicative_expression MULT_TK error {yyerror ("Missing term"); RECOVER;} --- 2414,2432 ---- multiplicative_expression: unary_expression | multiplicative_expression MULT_TK unary_expression ! { ! $$ = build_binop (BINOP_LOOKUP ($2.token), $2.location, $1, $3); } | multiplicative_expression DIV_TK unary_expression { $$ = build_binop (BINOP_LOOKUP ($2.token), $2.location, ! $1, $3); } | multiplicative_expression REM_TK unary_expression { $$ = build_binop (BINOP_LOOKUP ($2.token), $2.location, ! $1, $3); } | multiplicative_expression MULT_TK error {yyerror ("Missing term"); RECOVER;} *************** additive_expression: *** 2435,2446 **** | additive_expression PLUS_TK multiplicative_expression { $$ = build_binop (BINOP_LOOKUP ($2.token), $2.location, ! $1, $3); } | additive_expression MINUS_TK multiplicative_expression { $$ = build_binop (BINOP_LOOKUP ($2.token), $2.location, ! $1, $3); } | additive_expression PLUS_TK error {yyerror ("Missing term"); RECOVER;} --- 2441,2452 ---- | additive_expression PLUS_TK multiplicative_expression { $$ = build_binop (BINOP_LOOKUP ($2.token), $2.location, ! $1, $3); } | additive_expression MINUS_TK multiplicative_expression { $$ = build_binop (BINOP_LOOKUP ($2.token), $2.location, ! $1, $3); } | additive_expression PLUS_TK error {yyerror ("Missing term"); RECOVER;} *************** shift_expression: *** 2453,2469 **** | shift_expression LS_TK additive_expression { $$ = build_binop (BINOP_LOOKUP ($2.token), $2.location, ! $1, $3); } | shift_expression SRS_TK additive_expression { $$ = build_binop (BINOP_LOOKUP ($2.token), $2.location, ! $1, $3); } | shift_expression ZRS_TK additive_expression { $$ = build_binop (BINOP_LOOKUP ($2.token), $2.location, ! $1, $3); } | shift_expression LS_TK error {yyerror ("Missing term"); RECOVER;} --- 2459,2475 ---- | shift_expression LS_TK additive_expression { $$ = build_binop (BINOP_LOOKUP ($2.token), $2.location, ! $1, $3); } | shift_expression SRS_TK additive_expression { $$ = build_binop (BINOP_LOOKUP ($2.token), $2.location, ! $1, $3); } | shift_expression ZRS_TK additive_expression { $$ = build_binop (BINOP_LOOKUP ($2.token), $2.location, ! $1, $3); } | shift_expression LS_TK error {yyerror ("Missing term"); RECOVER;} *************** relational_expression: *** 2478,2499 **** | relational_expression LT_TK shift_expression { $$ = build_binop (BINOP_LOOKUP ($2.token), $2.location, ! $1, $3); } | relational_expression GT_TK shift_expression { $$ = build_binop (BINOP_LOOKUP ($2.token), $2.location, ! $1, $3); } | relational_expression LTE_TK shift_expression { $$ = build_binop (BINOP_LOOKUP ($2.token), $2.location, ! $1, $3); } | relational_expression GTE_TK shift_expression { $$ = build_binop (BINOP_LOOKUP ($2.token), $2.location, ! $1, $3); } | relational_expression INSTANCEOF_TK reference_type { $$ = build_binop (INSTANCEOF_EXPR, $2.location, $1, $3); } --- 2484,2505 ---- | relational_expression LT_TK shift_expression { $$ = build_binop (BINOP_LOOKUP ($2.token), $2.location, ! $1, $3); } | relational_expression GT_TK shift_expression { $$ = build_binop (BINOP_LOOKUP ($2.token), $2.location, ! $1, $3); } | relational_expression LTE_TK shift_expression { $$ = build_binop (BINOP_LOOKUP ($2.token), $2.location, ! $1, $3); } | relational_expression GTE_TK shift_expression { $$ = build_binop (BINOP_LOOKUP ($2.token), $2.location, ! $1, $3); } | relational_expression INSTANCEOF_TK reference_type { $$ = build_binop (INSTANCEOF_EXPR, $2.location, $1, $3); } *************** equality_expression: *** 2514,2525 **** | equality_expression EQ_TK relational_expression { $$ = build_binop (BINOP_LOOKUP ($2.token), $2.location, ! $1, $3); } | equality_expression NEQ_TK relational_expression { $$ = build_binop (BINOP_LOOKUP ($2.token), $2.location, ! $1, $3); } | equality_expression EQ_TK error {yyerror ("Missing term"); RECOVER;} --- 2520,2531 ---- | equality_expression EQ_TK relational_expression { $$ = build_binop (BINOP_LOOKUP ($2.token), $2.location, ! $1, $3); } | equality_expression NEQ_TK relational_expression { $$ = build_binop (BINOP_LOOKUP ($2.token), $2.location, ! $1, $3); } | equality_expression EQ_TK error {yyerror ("Missing term"); RECOVER;} *************** and_expression: *** 2532,2538 **** | and_expression AND_TK equality_expression { $$ = build_binop (BINOP_LOOKUP ($2.token), $2.location, ! $1, $3); } | and_expression AND_TK error {yyerror ("Missing term"); RECOVER;} --- 2538,2544 ---- | and_expression AND_TK equality_expression { $$ = build_binop (BINOP_LOOKUP ($2.token), $2.location, ! $1, $3); } | and_expression AND_TK error {yyerror ("Missing term"); RECOVER;} *************** exclusive_or_expression: *** 2543,2549 **** | exclusive_or_expression XOR_TK and_expression { $$ = build_binop (BINOP_LOOKUP ($2.token), $2.location, ! $1, $3); } | exclusive_or_expression XOR_TK error {yyerror ("Missing term"); RECOVER;} --- 2549,2555 ---- | exclusive_or_expression XOR_TK and_expression { $$ = build_binop (BINOP_LOOKUP ($2.token), $2.location, ! $1, $3); } | exclusive_or_expression XOR_TK error {yyerror ("Missing term"); RECOVER;} *************** inclusive_or_expression: *** 2554,2560 **** | inclusive_or_expression OR_TK exclusive_or_expression { $$ = build_binop (BINOP_LOOKUP ($2.token), $2.location, ! $1, $3); } | inclusive_or_expression OR_TK error {yyerror ("Missing term"); RECOVER;} --- 2560,2566 ---- | inclusive_or_expression OR_TK exclusive_or_expression { $$ = build_binop (BINOP_LOOKUP ($2.token), $2.location, ! $1, $3); } | inclusive_or_expression OR_TK error {yyerror ("Missing term"); RECOVER;} *************** conditional_and_expression: *** 2565,2571 **** | conditional_and_expression BOOL_AND_TK inclusive_or_expression { $$ = build_binop (BINOP_LOOKUP ($2.token), $2.location, ! $1, $3); } | conditional_and_expression BOOL_AND_TK error {yyerror ("Missing term"); RECOVER;} --- 2571,2577 ---- | conditional_and_expression BOOL_AND_TK inclusive_or_expression { $$ = build_binop (BINOP_LOOKUP ($2.token), $2.location, ! $1, $3); } | conditional_and_expression BOOL_AND_TK error {yyerror ("Missing term"); RECOVER;} *************** conditional_or_expression: *** 2576,2582 **** | conditional_or_expression BOOL_OR_TK conditional_and_expression { $$ = build_binop (BINOP_LOOKUP ($2.token), $2.location, ! $1, $3); } | conditional_or_expression BOOL_OR_TK error {yyerror ("Missing term"); RECOVER;} --- 2582,2588 ---- | conditional_or_expression BOOL_OR_TK conditional_and_expression { $$ = build_binop (BINOP_LOOKUP ($2.token), $2.location, ! $1, $3); } | conditional_or_expression BOOL_OR_TK error {yyerror ("Missing term"); RECOVER;} *************** pop_current_osb (ctxp) *** 2648,2657 **** if (ctxp->osb_depth < 0) abort (); ! to_return = CURRENT_OSB (ctxp); ctxp->osb_depth--; ! return to_return; } --- 2654,2663 ---- if (ctxp->osb_depth < 0) abort (); ! to_return = CURRENT_OSB (ctxp); ctxp->osb_depth--; ! return to_return; } *************** pop_current_osb (ctxp) *** 2661,2667 **** Add mode documentation here. FIXME */ /* Helper function. Create a new parser context. With ! COPY_FROM_PREVIOUS set to a non zero value, content of the previous context is copied, otherwise, the new context is zeroed. The newly created context becomes the current one. */ --- 2667,2673 ---- Add mode documentation here. FIXME */ /* Helper function. Create a new parser context. With ! COPY_FROM_PREVIOUS set to a nonzero value, content of the previous context is copied, otherwise, the new context is zeroed. The newly created context becomes the current one. */ *************** create_new_parser_context (copy_from_pre *** 2679,2685 **** } else memset ((PTR) new, 0, sizeof (struct parser_ctxt)); ! new->next = ctxp; ctxp = new; } --- 2685,2691 ---- } else memset ((PTR) new, 0, sizeof (struct parser_ctxt)); ! new->next = ctxp; ctxp = new; } *************** void *** 2690,2698 **** java_push_parser_context () { create_new_parser_context (0); ! } ! void java_pop_parser_context (generate) int generate; { --- 2696,2704 ---- java_push_parser_context () { create_new_parser_context (0); ! } ! void java_pop_parser_context (generate) int generate; { *************** java_pop_parser_context (generate) *** 2723,2729 **** if ((ctxp = next)) /* Assignment is really meant here */ for (current = ctxp->import_list; current; current = TREE_CHAIN (current)) IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P (TREE_VALUE (current)) = 1; ! /* If we pushed a context to parse a class intended to be generated, we keep it so we can remember the class. What we could actually do is to just update a list of class names. */ --- 2729,2735 ---- if ((ctxp = next)) /* Assignment is really meant here */ for (current = ctxp->import_list; current; current = TREE_CHAIN (current)) IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P (TREE_VALUE (current)) = 1; ! /* If we pushed a context to parse a class intended to be generated, we keep it so we can remember the class. What we could actually do is to just update a list of class names. */ *************** java_parser_context_resume () *** 2830,2836 **** ctxp = restored; /* Re-installed the data for the parsing to carry on */ ! memcpy (&ctxp->marker_begining, &old->marker_begining, (size_t)(&ctxp->marker_end - &ctxp->marker_begining)); /* Buffer context can now be discarded */ --- 2836,2842 ---- ctxp = restored; /* Re-installed the data for the parsing to carry on */ ! memcpy (&ctxp->marker_begining, &old->marker_begining, (size_t)(&ctxp->marker_end - &ctxp->marker_begining)); /* Buffer context can now be discarded */ *************** java_parser_context_pop_initialized_fiel *** 2881,2887 **** if (CPC_STATIC_INITIALIZER_LIST (ctxp)) { stmts = CPC_STATIC_INITIALIZER_STMT (ctxp); ! CPC_STATIC_INITIALIZER_LIST (ctxp) = TREE_CHAIN (CPC_STATIC_INITIALIZER_LIST (ctxp)); /* Keep initialization in order to enforce 8.5 */ if (stmts && !java_error_count) --- 2887,2893 ---- if (CPC_STATIC_INITIALIZER_LIST (ctxp)) { stmts = CPC_STATIC_INITIALIZER_STMT (ctxp); ! CPC_STATIC_INITIALIZER_LIST (ctxp) = TREE_CHAIN (CPC_STATIC_INITIALIZER_LIST (ctxp)); /* Keep initialization in order to enforce 8.5 */ if (stmts && !java_error_count) *************** java_parser_context_pop_initialized_fiel *** 2892,2898 **** if (CPC_INSTANCE_INITIALIZER_LIST (ctxp)) { stmts = CPC_INSTANCE_INITIALIZER_STMT (ctxp); ! CPC_INSTANCE_INITIALIZER_LIST (ctxp) = TREE_CHAIN (CPC_INSTANCE_INITIALIZER_LIST (ctxp)); if (stmts && !java_error_count) TYPE_II_STMT_LIST (class_type) = nreverse (stmts); --- 2898,2904 ---- if (CPC_INSTANCE_INITIALIZER_LIST (ctxp)) { stmts = CPC_INSTANCE_INITIALIZER_STMT (ctxp); ! CPC_INSTANCE_INITIALIZER_LIST (ctxp) = TREE_CHAIN (CPC_INSTANCE_INITIALIZER_LIST (ctxp)); if (stmts && !java_error_count) TYPE_II_STMT_LIST (class_type) = nreverse (stmts); *************** reorder_static_initialized (list) *** 2908,2917 **** keep them in lexical order. */ tree marker, previous = NULL_TREE; for (marker = list; marker; previous = marker, marker = TREE_CHAIN (marker)) ! if (TREE_CODE (marker) == TREE_LIST && !TREE_VALUE (marker) && !TREE_PURPOSE (marker)) break; ! /* No static initialized, the list is fine as is */ if (!previous) list = TREE_CHAIN (marker); --- 2914,2923 ---- keep them in lexical order. */ tree marker, previous = NULL_TREE; for (marker = list; marker; previous = marker, marker = TREE_CHAIN (marker)) ! if (TREE_CODE (marker) == TREE_LIST && !TREE_VALUE (marker) && !TREE_PURPOSE (marker)) break; ! /* No static initialized, the list is fine as is */ if (!previous) list = TREE_CHAIN (marker); *************** java_debug_context_do (tab) *** 2951,2957 **** fprintf (stderr, "lineno: %d\n", copy->lineno); TAB_CONTEXT (tab); fprintf (stderr, "package: %s\n", ! (copy->package ? IDENTIFIER_POINTER (copy->package) : "")); TAB_CONTEXT (tab); fprintf (stderr, "context for saving: %d\n", copy->saved_data_ctx); --- 2957,2963 ---- fprintf (stderr, "lineno: %d\n", copy->lineno); TAB_CONTEXT (tab); fprintf (stderr, "package: %s\n", ! (copy->package ? IDENTIFIER_POINTER (copy->package) : "")); TAB_CONTEXT (tab); fprintf (stderr, "context for saving: %d\n", copy->saved_data_ctx); *************** static void *** 2984,2990 **** parse_ctor_invocation_error () { if (DECL_CONSTRUCTOR_P (current_function_decl)) ! yyerror ("Constructor invocation must be first thing in a constructor"); else yyerror ("Only constructors can invoke constructors"); } --- 2990,2996 ---- parse_ctor_invocation_error () { if (DECL_CONSTRUCTOR_P (current_function_decl)) ! yyerror ("Constructor invocation must be first thing in a constructor"); else yyerror ("Only constructors can invoke constructors"); } *************** yyerror (msg) *** 3012,3018 **** int save_lineno; char *remainder, *code_from_source; ! if (!force_error && prev_lineno == lineno) return; --- 3018,3024 ---- int save_lineno; char *remainder, *code_from_source; ! if (!force_error && prev_lineno == lineno) return; *************** yyerror (msg) *** 3039,3045 **** java_warning_count++; else java_error_count++; ! if (elc.col == 0 && msg && msg[1] == ';') { elc.col = ctxp->p_line->char_col-1; --- 3045,3051 ---- java_warning_count++; else java_error_count++; ! if (elc.col == 0 && msg && msg[1] == ';') { elc.col = ctxp->p_line->char_col-1; *************** yyerror (msg) *** 3051,3057 **** prev_msg = msg; code_from_source = java_get_line_col (ctxp->filename, elc.line, elc.col); ! obstack_grow0 (&temporary_obstack, code_from_source, strlen (code_from_source)); remainder = obstack_finish (&temporary_obstack); if (do_warning) --- 3057,3063 ---- prev_msg = msg; code_from_source = java_get_line_col (ctxp->filename, elc.line, elc.col); ! obstack_grow0 (&temporary_obstack, code_from_source, strlen (code_from_source)); remainder = obstack_finish (&temporary_obstack); if (do_warning) *************** issue_warning_error_from_context (cl, ms *** 3079,3085 **** force_error = 1; ctxp->elc.line = EXPR_WFL_LINENO (cl); ! ctxp->elc.col = (EXPR_WFL_COLNO (cl) == 0xfff ? -1 : (EXPR_WFL_COLNO (cl) == 0xffe ? -2 : EXPR_WFL_COLNO (cl))); /* We have a CL, that's a good reason for using it if it contains data */ --- 3085,3091 ---- force_error = 1; ctxp->elc.line = EXPR_WFL_LINENO (cl); ! ctxp->elc.col = (EXPR_WFL_COLNO (cl) == 0xfff ? -1 : (EXPR_WFL_COLNO (cl) == 0xffe ? -2 : EXPR_WFL_COLNO (cl))); /* We have a CL, that's a good reason for using it if it contains data */ *************** find_expr_with_wfl (node) *** 3147,3153 **** case LOOP_EXPR: node = TREE_OPERAND (node, 0); continue; ! case LABELED_BLOCK_EXPR: node = TREE_OPERAND (node, 1); continue; --- 3153,3159 ---- case LOOP_EXPR: node = TREE_OPERAND (node, 0); continue; ! case LABELED_BLOCK_EXPR: node = TREE_OPERAND (node, 1); continue; *************** int *** 3200,3206 **** java_report_errors () { if (java_error_count) ! fprintf (stderr, "%d error%s", java_error_count, (java_error_count == 1 ? "" : "s")); if (java_warning_count) fprintf (stderr, "%s%d warning%s", (java_error_count ? ", " : ""), --- 3206,3212 ---- java_report_errors () { if (java_error_count) ! fprintf (stderr, "%d error%s", java_error_count, (java_error_count == 1 ? "" : "s")); if (java_warning_count) fprintf (stderr, "%s%d warning%s", (java_error_count ? ", " : ""), *************** classitf_redefinition_error (context, id *** 3244,3251 **** const char *context; tree id, decl, cl; { ! parse_error_context (cl, "%s `%s' already defined in %s:%d", ! context, IDENTIFIER_POINTER (id), DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl)); /* Here we should point out where its redefined. It's a unicode. FIXME */ } --- 3250,3257 ---- const char *context; tree id, decl, cl; { ! parse_error_context (cl, "%s `%s' already defined in %s:%d", ! context, IDENTIFIER_POINTER (id), DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl)); /* Here we should point out where its redefined. It's a unicode. FIXME */ } *************** variable_redefinition_error (context, na *** 3264,3270 **** type_name = lang_printable_name (type, 0); parse_error_context (context, ! "Variable `%s' is already defined in this method and was declared `%s %s' at line %d", IDENTIFIER_POINTER (name), type_name, IDENTIFIER_POINTER (name), line); } --- 3270,3276 ---- type_name = lang_printable_name (type, 0); parse_error_context (context, ! "Variable `%s' is already defined in this method and was declared `%s %s' at line %d", IDENTIFIER_POINTER (name), type_name, IDENTIFIER_POINTER (name), line); } *************** build_array_from_name (type, type_wfl, n *** 3299,3305 **** /* Eventually get more dims */ more_dims = build_type_name_from_array_name (name, &name); ! /* If we have, then craft a new type for this variable */ if (more_dims) { --- 3305,3311 ---- /* Eventually get more dims */ more_dims = build_type_name_from_array_name (name, &name); ! /* If we have, then craft a new type for this variable */ if (more_dims) { *************** check_class_interface_creation (is_inter *** 3394,3402 **** int uaaf = CLASS_MODIFIERS; /* Usually allowed access flags */ if (!quiet_flag) ! fprintf (stderr, " %s%s %s", (CPC_INNER_P () ? "inner" : ""), ! (is_interface ? "interface" : "class"), IDENTIFIER_POINTER (qualified_name)); /* Scope of an interface/class type name: --- 3400,3408 ---- int uaaf = CLASS_MODIFIERS; /* Usually allowed access flags */ if (!quiet_flag) ! fprintf (stderr, " %s%s %s", (CPC_INNER_P () ? "inner" : ""), ! (is_interface ? "interface" : "class"), IDENTIFIER_POINTER (qualified_name)); /* Scope of an interface/class type name: *************** check_class_interface_creation (is_inter *** 3406,3412 **** && (node = find_name_in_single_imports (raw_name)) && !CPC_INNER_P ()) { ! parse_error_context (cl, "%s name `%s' clashes with imported type `%s'", (is_interface ? "Interface" : "Class"), IDENTIFIER_POINTER (raw_name), IDENTIFIER_POINTER (node)); --- 3412,3418 ---- && (node = find_name_in_single_imports (raw_name)) && !CPC_INNER_P ()) { ! parse_error_context (cl, "%s name `%s' clashes with imported type `%s'", (is_interface ? "Interface" : "Class"), IDENTIFIER_POINTER (raw_name), IDENTIFIER_POINTER (node)); *************** check_class_interface_creation (is_inter *** 3414,3420 **** } if (decl && CLASS_COMPLETE_P (decl)) { ! classitf_redefinition_error ((is_interface ? "Interface" : "Class"), qualified_name, decl, cl); return 1; } --- 3420,3426 ---- } if (decl && CLASS_COMPLETE_P (decl)) { ! classitf_redefinition_error ((is_interface ? "Interface" : "Class"), qualified_name, decl, cl); return 1; } *************** check_class_interface_creation (is_inter *** 3428,3445 **** { const char *f; ! /* Contains OS dependent assumption on path separator. FIXME */ ! for (f = &input_filename [strlen (input_filename)]; ! f != input_filename && f[0] != '/' && f[0] != DIR_SEPARATOR; f--) ; ! if (f[0] == '/' || f[0] == DIR_SEPARATOR) f++; ! if (strncmp (IDENTIFIER_POINTER (raw_name), f , IDENTIFIER_LENGTH (raw_name)) || f [IDENTIFIER_LENGTH (raw_name)] != '.') parse_error_context ! (cl, "Public %s `%s' must be defined in a file called `%s.java'", (is_interface ? "interface" : "class"), IDENTIFIER_POINTER (qualified_name), IDENTIFIER_POINTER (raw_name)); --- 3434,3450 ---- { const char *f; ! for (f = &input_filename [strlen (input_filename)]; ! f != input_filename && ! IS_DIR_SEPARATOR (f[0]); f--) ; ! if (IS_DIR_SEPARATOR (f[0])) f++; ! if (strncmp (IDENTIFIER_POINTER (raw_name), f , IDENTIFIER_LENGTH (raw_name)) || f [IDENTIFIER_LENGTH (raw_name)] != '.') parse_error_context ! (cl, "Public %s `%s' must be defined in a file called `%s.java'", (is_interface ? "interface" : "class"), IDENTIFIER_POINTER (qualified_name), IDENTIFIER_POINTER (raw_name)); *************** check_class_interface_creation (is_inter *** 3454,3460 **** complaining a second time */ if (CPC_INNER_P () && !TOPLEVEL_CLASS_DECL_P (GET_CPC())) { ! parse_error_context (cl, "Inner class `%s' can't be static. Static classes can only occur in interfaces and top-level classes", IDENTIFIER_POINTER (qualified_name)); sca = ACC_STATIC; } --- 3459,3465 ---- complaining a second time */ if (CPC_INNER_P () && !TOPLEVEL_CLASS_DECL_P (GET_CPC())) { ! parse_error_context (cl, "Inner class `%s' can't be static. Static classes can only occur in interfaces and top-level classes", IDENTIFIER_POINTER (qualified_name)); sca = ACC_STATIC; } *************** check_class_interface_creation (is_inter *** 3482,3495 **** } } ! if (is_interface) { if (CPC_INNER_P ()) uaaf = INTERFACE_INNER_MODIFIERS; else uaaf = INTERFACE_MODIFIERS; ! ! check_modifiers ("Illegal modifier `%s' for interface declaration", flags, uaaf); } else --- 3487,3500 ---- } } ! if (is_interface) { if (CPC_INNER_P ()) uaaf = INTERFACE_INNER_MODIFIERS; else uaaf = INTERFACE_MODIFIERS; ! ! check_modifiers ("Illegal modifier `%s' for interface declaration", flags, uaaf); } else *************** check_class_interface_creation (is_inter *** 3500,3523 **** return 0; } ! static void make_nested_class_name (cpc_list) tree cpc_list; { tree name; if (!cpc_list) ! return; ! else ! make_nested_class_name (TREE_CHAIN (cpc_list)); /* Pick the qualified name when dealing with the first upmost enclosing class */ ! name = (TREE_CHAIN (cpc_list) ? ! TREE_PURPOSE (cpc_list) : DECL_NAME (TREE_VALUE (cpc_list))); obstack_grow (&temporary_obstack, IDENTIFIER_POINTER (name), IDENTIFIER_LENGTH (name)); obstack_1grow (&temporary_obstack, '$'); } /* Can't redefine a class already defined in an earlier scope. */ --- 3505,3532 ---- return 0; } ! /* Construct a nested class name. If the final component starts with ! a digit, return true. Otherwise return false. */ ! static int make_nested_class_name (cpc_list) tree cpc_list; { tree name; if (!cpc_list) ! return 0; ! ! make_nested_class_name (TREE_CHAIN (cpc_list)); /* Pick the qualified name when dealing with the first upmost enclosing class */ ! name = (TREE_CHAIN (cpc_list) ! ? TREE_PURPOSE (cpc_list) : DECL_NAME (TREE_VALUE (cpc_list))); obstack_grow (&temporary_obstack, IDENTIFIER_POINTER (name), IDENTIFIER_LENGTH (name)); obstack_1grow (&temporary_obstack, '$'); + + return ISDIGIT (IDENTIFIER_POINTER (name)[0]); } /* Can't redefine a class already defined in an earlier scope. */ *************** check_inner_class_redefinition (raw_name *** 3528,3538 **** { tree scope_list; ! for (scope_list = GET_CPC_LIST (); scope_list; scope_list = GET_NEXT_ENCLOSING_CPC (scope_list)) if (raw_name == GET_CPC_UN_NODE (scope_list)) { ! parse_error_context (cl, "The class name `%s' is already defined in this scope. An inner class may not have the same simple name as any of its enclosing classes", IDENTIFIER_POINTER (raw_name)); return 1; --- 3537,3547 ---- { tree scope_list; ! for (scope_list = GET_CPC_LIST (); scope_list; scope_list = GET_NEXT_ENCLOSING_CPC (scope_list)) if (raw_name == GET_CPC_UN_NODE (scope_list)) { ! parse_error_context (cl, "The class name `%s' is already defined in this scope. An inner class may not have the same simple name as any of its enclosing classes", IDENTIFIER_POINTER (raw_name)); return 1; *************** check_inner_class_redefinition (raw_name *** 3545,3551 **** static tree resolve_inner_class (circularity_hash, cl, enclosing, super, class_type) ! struct hash_table *circularity_hash; tree cl, *enclosing, *super, class_type; { tree local_enclosing = *enclosing; --- 3554,3560 ---- static tree resolve_inner_class (circularity_hash, cl, enclosing, super, class_type) ! htab_t circularity_hash; tree cl, *enclosing, *super, class_type; { tree local_enclosing = *enclosing; *************** resolve_inner_class (circularity_hash, c *** 3555,3562 **** { tree intermediate, decl; ! hash_lookup (circularity_hash, ! (const hash_table_key) local_enclosing, TRUE, NULL); if ((decl = find_as_inner_class (local_enclosing, class_type, cl))) return decl; --- 3564,3571 ---- { tree intermediate, decl; ! *htab_find_slot (circularity_hash, local_enclosing, INSERT) = ! local_enclosing; if ((decl = find_as_inner_class (local_enclosing, class_type, cl))) return decl; *************** resolve_inner_class (circularity_hash, c *** 3584,3595 **** /* We may not have checked for circular inheritance yet, so do so here to prevent an infinite loop. */ ! if (hash_lookup (circularity_hash, ! (const hash_table_key) local_super, FALSE, NULL)) { if (!cl) cl = lookup_cl (local_enclosing); ! parse_error_context (cl, "Cyclic inheritance involving %s", IDENTIFIER_POINTER (DECL_NAME (local_enclosing))); --- 3593,3603 ---- /* We may not have checked for circular inheritance yet, so do so here to prevent an infinite loop. */ ! if (htab_find (circularity_hash, local_super) != NULL) { if (!cl) cl = lookup_cl (local_enclosing); ! parse_error_context (cl, "Cyclic inheritance involving %s", IDENTIFIER_POINTER (DECL_NAME (local_enclosing))); *************** find_as_inner_class (enclosing, name, cl *** 3626,3632 **** qual = build_tree_list (cl, NULL_TREE); else qual = build_tree_list (build_expr_wfl (name, NULL, 0, 0), NULL_TREE); ! if ((to_return = find_as_inner_class_do (qual, enclosing))) return to_return; --- 3634,3640 ---- qual = build_tree_list (cl, NULL_TREE); else qual = build_tree_list (build_expr_wfl (name, NULL, 0, 0), NULL_TREE); ! if ((to_return = find_as_inner_class_do (qual, enclosing))) return to_return; *************** find_as_inner_class (enclosing, name, cl *** 3636,3645 **** { tree acc = NULL_TREE, decl = NULL_TREE, ptr; ! for (qual = EXPR_WFL_QUALIFICATION (cl); qual && !decl; qual = TREE_CHAIN (qual)) { ! acc = merge_qualified_name (acc, EXPR_WFL_NODE (TREE_PURPOSE (qual))); BUILD_PTR_FROM_NAME (ptr, acc); decl = do_resolve_class (NULL_TREE, ptr, NULL_TREE, cl); --- 3644,3653 ---- { tree acc = NULL_TREE, decl = NULL_TREE, ptr; ! for (qual = EXPR_WFL_QUALIFICATION (cl); qual && !decl; qual = TREE_CHAIN (qual)) { ! acc = merge_qualified_name (acc, EXPR_WFL_NODE (TREE_PURPOSE (qual))); BUILD_PTR_FROM_NAME (ptr, acc); decl = do_resolve_class (NULL_TREE, ptr, NULL_TREE, cl); *************** find_as_inner_class (enclosing, name, cl *** 3647,3653 **** /* A NULL qual and a decl means that the search ended successfully?!? We have to do something then. FIXME */ ! if (decl) enclosing = decl; else --- 3655,3661 ---- /* A NULL qual and a decl means that the search ended successfully?!? We have to do something then. FIXME */ ! if (decl) enclosing = decl; else *************** find_as_inner_class (enclosing, name, cl *** 3656,3662 **** /* Otherwise, create a qual for the other part of the resolution. */ else qual = build_tree_list (build_expr_wfl (name, NULL, 0, 0), NULL_TREE); ! return find_as_inner_class_do (qual, enclosing); } --- 3664,3670 ---- /* Otherwise, create a qual for the other part of the resolution. */ else qual = build_tree_list (build_expr_wfl (name, NULL, 0, 0), NULL_TREE); ! return find_as_inner_class_do (qual, enclosing); } *************** set_nested_class_simple_name_value (oute *** 3702,3708 **** tree l; for (l = DECL_INNER_CLASS_LIST (outer); l; l = TREE_CHAIN (l)) ! IDENTIFIER_GLOBAL_VALUE (TREE_VALUE (l)) = (set ? TREE_PURPOSE (l) : NULL_TREE); } --- 3710,3716 ---- tree l; for (l = DECL_INNER_CLASS_LIST (outer); l; l = TREE_CHAIN (l)) ! IDENTIFIER_GLOBAL_VALUE (TREE_VALUE (l)) = (set ? TREE_PURPOSE (l) : NULL_TREE); } *************** link_nested_class_to_enclosing () *** 3712,3718 **** if (GET_ENCLOSING_CPC ()) { tree enclosing = GET_ENCLOSING_CPC_CONTEXT (); ! DECL_INNER_CLASS_LIST (enclosing) = tree_cons (GET_CPC (), GET_CPC_UN (), DECL_INNER_CLASS_LIST (enclosing)); } --- 3720,3726 ---- if (GET_ENCLOSING_CPC ()) { tree enclosing = GET_ENCLOSING_CPC_CONTEXT (); ! DECL_INNER_CLASS_LIST (enclosing) = tree_cons (GET_CPC (), GET_CPC_UN (), DECL_INNER_CLASS_LIST (enclosing)); } *************** maybe_make_nested_class_name (name) *** 3726,3734 **** if (CPC_INNER_P ()) { ! make_nested_class_name (GET_CPC_LIST ()); obstack_grow0 (&temporary_obstack, ! IDENTIFIER_POINTER (name), IDENTIFIER_LENGTH (name)); id = get_identifier (obstack_finish (&temporary_obstack)); if (ctxp->package) --- 3734,3755 ---- if (CPC_INNER_P ()) { ! /* If we're in a function, we must append a number to create the ! nested class name. However, we don't do this if the class we ! are constructing is anonymous, because in that case we'll ! already have a number as the class name. */ ! if (! make_nested_class_name (GET_CPC_LIST ()) ! && current_function_decl != NULL_TREE ! && ! ISDIGIT (IDENTIFIER_POINTER (name)[0])) ! { ! char buf[10]; ! sprintf (buf, "%d", anonymous_class_counter); ! ++anonymous_class_counter; ! obstack_grow (&temporary_obstack, buf, strlen (buf)); ! obstack_1grow (&temporary_obstack, '$'); ! } obstack_grow0 (&temporary_obstack, ! IDENTIFIER_POINTER (name), IDENTIFIER_LENGTH (name)); id = get_identifier (obstack_finish (&temporary_obstack)); if (ctxp->package) *************** maybe_create_class_interface_decl (decl, *** 3773,3779 **** /* Install a new dependency list element */ create_jdep_list (ctxp); ! SOURCE_FRONTEND_DEBUG (("Defining class/interface %s", IDENTIFIER_POINTER (qualified_name))); return decl; } --- 3794,3800 ---- /* Install a new dependency list element */ create_jdep_list (ctxp); ! SOURCE_FRONTEND_DEBUG (("Defining class/interface %s", IDENTIFIER_POINTER (qualified_name))); return decl; } *************** create_interface (flags, id, super) *** 3824,3830 **** EXPR_WFL_NODE (id) = q_name; /* Keep source location, even if refined. */ ! /* Basic checks: scope, redefinition, modifiers */ if (check_class_interface_creation (1, flags, raw_name, q_name, decl, id)) { PUSH_ERROR (); --- 3845,3851 ---- EXPR_WFL_NODE (id) = q_name; /* Keep source location, even if refined. */ ! /* Basic checks: scope, redefinition, modifiers */ if (check_class_interface_creation (1, flags, raw_name, q_name, decl, id)) { PUSH_ERROR (); *************** create_interface (flags, id, super) *** 3849,3855 **** - abstract is obsolete (comes first, it's a warning, or should be) - Can't use twice the same (checked in the modifier rule) */ if ((flags & ACC_ABSTRACT) && flag_redundant) ! parse_warning_context (MODIFIER_WFL (ABSTRACT_TK), "Redundant use of `abstract' modifier. Interface `%s' is implicitly abstract", IDENTIFIER_POINTER (raw_name)); --- 3870,3876 ---- - abstract is obsolete (comes first, it's a warning, or should be) - Can't use twice the same (checked in the modifier rule) */ if ((flags & ACC_ABSTRACT) && flag_redundant) ! parse_warning_context (MODIFIER_WFL (ABSTRACT_TK), "Redundant use of `abstract' modifier. Interface `%s' is implicitly abstract", IDENTIFIER_POINTER (raw_name)); *************** create_interface (flags, id, super) *** 3857,3863 **** decl = maybe_create_class_interface_decl (decl, raw_name, q_name, id); /* Set super info and mark the class a complete */ ! set_super_info (ACC_INTERFACE | flags, TREE_TYPE (decl), object_type_node, ctxp->interface_number); ctxp->interface_number = 0; CLASS_COMPLETE_P (decl) = 1; --- 3878,3884 ---- decl = maybe_create_class_interface_decl (decl, raw_name, q_name, id); /* Set super info and mark the class a complete */ ! set_super_info (ACC_INTERFACE | flags, TREE_TYPE (decl), object_type_node, ctxp->interface_number); ctxp->interface_number = 0; CLASS_COMPLETE_P (decl) = 1; *************** create_interface (flags, id, super) *** 3866,3875 **** return decl; } - /* Anonymous class counter. Will be reset to 1 every time a non - anonymous class gets created. */ - static int anonymous_class_counter = 1; - /* Patch anonymous class CLASS, by either extending or implementing DEP. */ --- 3887,3892 ---- *************** create_class (flags, id, super, interfac *** 3974,3980 **** PUSH_ERROR (); return NULL_TREE; } ! /* Suspend the current parsing context if we're parsing an inner class or an anonymous class. */ if (CPC_INNER_P ()) --- 3991,3997 ---- PUSH_ERROR (); return NULL_TREE; } ! /* Suspend the current parsing context if we're parsing an inner class or an anonymous class. */ if (CPC_INNER_P ()) *************** create_class (flags, id, super, interfac *** 3984,3996 **** if (CLASS_INTERFACE (GET_CPC ())) flags |= ACC_PUBLIC; } ! /* Push a new context for (static) initialized upon declaration fields */ java_parser_context_push_initialized_field (); ! /* Class modifier check: - Allowed modifier (already done at that point) ! - abstract AND final forbidden - Public classes defined in the correct file */ if ((flags & ACC_ABSTRACT) && (flags & ACC_FINAL)) parse_error_context --- 4001,4013 ---- if (CLASS_INTERFACE (GET_CPC ())) flags |= ACC_PUBLIC; } ! /* Push a new context for (static) initialized upon declaration fields */ java_parser_context_push_initialized_field (); ! /* Class modifier check: - Allowed modifier (already done at that point) ! - abstract AND final forbidden - Public classes defined in the correct file */ if ((flags & ACC_ABSTRACT) && (flags & ACC_FINAL)) parse_error_context *************** create_class (flags, id, super, interfac *** 4010,4016 **** return NULL_TREE; } ! super_decl_type = register_incomplete_type (JDEP_SUPER, super, decl, NULL_TREE); } else if (TREE_TYPE (decl) != object_type_node) --- 4027,4033 ---- return NULL_TREE; } ! super_decl_type = register_incomplete_type (JDEP_SUPER, super, decl, NULL_TREE); } else if (TREE_TYPE (decl) != object_type_node) *************** create_class (flags, id, super, interfac *** 4027,4033 **** } /* Set super info and mark the class as complete. */ ! set_super_info (flags, TREE_TYPE (decl), super_decl_type, ctxp->interface_number); ctxp->interface_number = 0; CLASS_COMPLETE_P (decl) = 1; --- 4044,4050 ---- } /* Set super info and mark the class as complete. */ ! set_super_info (flags, TREE_TYPE (decl), super_decl_type, ctxp->interface_number); ctxp->interface_number = 0; CLASS_COMPLETE_P (decl) = 1; *************** add_inner_class_fields (class_decl, fct_ *** 4091,4104 **** f = add_field (TREE_TYPE (class_decl), build_current_thisn (TREE_TYPE (class_decl)), ! build_pointer_type (TREE_TYPE (DECL_CONTEXT (class_decl))), ACC_PRIVATE); FIELD_THISN (f) = 1; if (!fct_decl) return; ! ! for (block = GET_CURRENT_BLOCK (fct_decl); block && TREE_CODE (block) == BLOCK; block = BLOCK_SUPERCONTEXT (block)) { tree decl; --- 4108,4121 ---- f = add_field (TREE_TYPE (class_decl), build_current_thisn (TREE_TYPE (class_decl)), ! build_pointer_type (TREE_TYPE (DECL_CONTEXT (class_decl))), ACC_PRIVATE); FIELD_THISN (f) = 1; if (!fct_decl) return; ! ! for (block = GET_CURRENT_BLOCK (fct_decl); block && TREE_CODE (block) == BLOCK; block = BLOCK_SUPERCONTEXT (block)) { tree decl; *************** add_inner_class_fields (class_decl, fct_ *** 4106,4116 **** { tree name, pname; tree wfl, init, list; ! /* Avoid non final arguments. */ if (!LOCAL_FINAL_P (decl)) continue; ! MANGLE_OUTER_LOCAL_VARIABLE_NAME (name, DECL_NAME (decl)); MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID (pname, DECL_NAME (decl)); wfl = build_wfl_node (name); --- 4123,4133 ---- { tree name, pname; tree wfl, init, list; ! /* Avoid non final arguments. */ if (!LOCAL_FINAL_P (decl)) continue; ! MANGLE_OUTER_LOCAL_VARIABLE_NAME (name, DECL_NAME (decl)); MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID (pname, DECL_NAME (decl)); wfl = build_wfl_node (name); *************** add_inner_class_fields (class_decl, fct_ *** 4122,4128 **** invoking it (hence the constructor will also feature a hidden parameter, set to the value of the outer context local at the time the inner class is created.) ! Note: we take into account all possible locals that can be accessed by the inner class. It's actually not trivial to minimize these aliases down to the ones really --- 4139,4145 ---- invoking it (hence the constructor will also feature a hidden parameter, set to the value of the outer context local at the time the inner class is created.) ! Note: we take into account all possible locals that can be accessed by the inner class. It's actually not trivial to minimize these aliases down to the ones really *************** add_inner_class_fields (class_decl, fct_ *** 4137,4150 **** identify locals really used in the inner class. We leave the flag FIELD_LOCAL_ALIAS_USED around for that future use. ! On the other hand, it only affect local inner classes, whose constructors (and finit$ call) will be featuring unecessary arguments. It's easy for a developper to keep this number of parameter down by using the `final' keyword only when necessary. For the time being, we can issue a warning on unecessary finals. FIXME */ ! init = build_assignment (ASSIGN_TK, EXPR_WFL_LINECOL (wfl), wfl, init); /* Register the field. The TREE_LIST holding the part --- 4154,4167 ---- identify locals really used in the inner class. We leave the flag FIELD_LOCAL_ALIAS_USED around for that future use. ! On the other hand, it only affect local inner classes, whose constructors (and finit$ call) will be featuring unecessary arguments. It's easy for a developper to keep this number of parameter down by using the `final' keyword only when necessary. For the time being, we can issue a warning on unecessary finals. FIXME */ ! init = build_assignment (ASSIGN_TK, EXPR_WFL_LINECOL (wfl), wfl, init); /* Register the field. The TREE_LIST holding the part *************** duplicate_declaration_error_p (new_field *** 4238,4256 **** if (decl) { char *t1 = xstrdup (purify_type_name ! ((TREE_CODE (new_type) == POINTER_TYPE && TREE_TYPE (new_type) == NULL_TREE) ? IDENTIFIER_POINTER (TYPE_NAME (new_type)) : lang_printable_name (new_type, 1))); /* The type may not have been completed by the time we report the error */ char *t2 = xstrdup (purify_type_name ! ((TREE_CODE (TREE_TYPE (decl)) == POINTER_TYPE && TREE_TYPE (TREE_TYPE (decl)) == NULL_TREE) ? IDENTIFIER_POINTER (TYPE_NAME (TREE_TYPE (decl))) : lang_printable_name (TREE_TYPE (decl), 1))); ! parse_error_context ! (cl , "Duplicate variable declaration: `%s %s' was `%s %s' (%s:%d)", t1, IDENTIFIER_POINTER (new_field_name), t2, IDENTIFIER_POINTER (DECL_NAME (decl)), DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl)); --- 4255,4273 ---- if (decl) { char *t1 = xstrdup (purify_type_name ! ((TREE_CODE (new_type) == POINTER_TYPE && TREE_TYPE (new_type) == NULL_TREE) ? IDENTIFIER_POINTER (TYPE_NAME (new_type)) : lang_printable_name (new_type, 1))); /* The type may not have been completed by the time we report the error */ char *t2 = xstrdup (purify_type_name ! ((TREE_CODE (TREE_TYPE (decl)) == POINTER_TYPE && TREE_TYPE (TREE_TYPE (decl)) == NULL_TREE) ? IDENTIFIER_POINTER (TYPE_NAME (TREE_TYPE (decl))) : lang_printable_name (TREE_TYPE (decl), 1))); ! parse_error_context ! (cl , "Duplicate variable declaration: `%s %s' was `%s %s' (%s:%d)", t1, IDENTIFIER_POINTER (new_field_name), t2, IDENTIFIER_POINTER (DECL_NAME (decl)), DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl)); *************** register_fields (flags, type, variable_l *** 4303,4309 **** /* If TYPE is fully resolved and we don't have a reference, make one */ PROMOTE_RECORD_IF_COMPLETE (type, must_chain); ! for (current = variable_list, saved_type = type; current; current = TREE_CHAIN (current), type = saved_type) { tree real_type; --- 4320,4326 ---- /* If TYPE is fully resolved and we don't have a reference, make one */ PROMOTE_RECORD_IF_COMPLETE (type, must_chain); ! for (current = variable_list, saved_type = type; current; current = TREE_CHAIN (current), type = saved_type) { tree real_type; *************** register_fields (flags, type, variable_l *** 4315,4321 **** /* Can't declare non-final static fields in inner classes */ if ((flags & ACC_STATIC) && !TOPLEVEL_CLASS_TYPE_P (class_type) && !(flags & ACC_FINAL)) ! parse_error_context (cl, "Field `%s' can't be static in inner class `%s' unless it is final", IDENTIFIER_POINTER (EXPR_WFL_NODE (cl)), lang_printable_name (class_type, 0)); --- 4332,4338 ---- /* Can't declare non-final static fields in inner classes */ if ((flags & ACC_STATIC) && !TOPLEVEL_CLASS_TYPE_P (class_type) && !(flags & ACC_FINAL)) ! parse_error_context (cl, "Field `%s' can't be static in inner class `%s' unless it is final", IDENTIFIER_POINTER (EXPR_WFL_NODE (cl)), lang_printable_name (class_type, 0)); *************** register_fields (flags, type, variable_l *** 4369,4379 **** FIELD_LOCAL_ALIAS (field_decl) = 1; FIELD_FINAL (field_decl) = 0; } ! /* Check if we must chain. */ if (must_chain) register_incomplete_type (JDEP_FIELD, wfl, field_decl, type); ! /* If we have an initialization value tied to the field */ if (init) { --- 4386,4396 ---- FIELD_LOCAL_ALIAS (field_decl) = 1; FIELD_FINAL (field_decl) = 0; } ! /* Check if we must chain. */ if (must_chain) register_incomplete_type (JDEP_FIELD, wfl, field_decl, type); ! /* If we have an initialization value tied to the field */ if (init) { *************** register_fields (flags, type, variable_l *** 4388,4394 **** appropriately. */ TREE_CHAIN (init) = CPC_STATIC_INITIALIZER_STMT (ctxp); SET_CPC_STATIC_INITIALIZER_STMT (ctxp, init); ! if (TREE_OPERAND (init, 1) && TREE_CODE (TREE_OPERAND (init, 1)) == NEW_ARRAY_INIT) TREE_STATIC (TREE_OPERAND (init, 1)) = 1; } --- 4405,4411 ---- appropriately. */ TREE_CHAIN (init) = CPC_STATIC_INITIALIZER_STMT (ctxp); SET_CPC_STATIC_INITIALIZER_STMT (ctxp, init); ! if (TREE_OPERAND (init, 1) && TREE_CODE (TREE_OPERAND (init, 1)) == NEW_ARRAY_INIT) TREE_STATIC (TREE_OPERAND (init, 1)) = 1; } *************** generate_finit (class_type) *** 4420,4427 **** tree list = TYPE_FINIT_STMT_LIST (class_type); tree mdecl, current, parms; ! parms = build_alias_initializer_parameter_list (AIPL_FUNCTION_CREATION, ! class_type, NULL_TREE, &count); CRAFTED_PARAM_LIST_FIXUP (parms); mdecl = create_artificial_method (class_type, ACC_PRIVATE, void_type_node, --- 4437,4444 ---- tree list = TYPE_FINIT_STMT_LIST (class_type); tree mdecl, current, parms; ! parms = build_alias_initializer_parameter_list (AIPL_FUNCTION_CREATION, ! class_type, NULL_TREE, &count); CRAFTED_PARAM_LIST_FIXUP (parms); mdecl = create_artificial_method (class_type, ACC_PRIVATE, void_type_node, *************** generate_finit (class_type) *** 4433,4440 **** start_artificial_method_body (mdecl); for (current = list; current; current = TREE_CHAIN (current)) ! java_method_add_stmt (mdecl, ! build_debugable_stmt (EXPR_WFL_LINECOL (current), current)); end_artificial_method_body (mdecl); return mdecl; --- 4450,4457 ---- start_artificial_method_body (mdecl); for (current = list; current; current = TREE_CHAIN (current)) ! java_method_add_stmt (mdecl, ! build_debugable_stmt (EXPR_WFL_LINECOL (current), current)); end_artificial_method_body (mdecl); return mdecl; *************** generate_instinit (class_type) *** 4463,4469 **** mdecl, NULL_TREE); /* Gather all the statements in a compound */ ! for (current = TYPE_II_STMT_LIST (class_type); current; current = TREE_CHAIN (current)) compound = add_stmt_to_compound (compound, NULL_TREE, current); --- 4480,4486 ---- mdecl, NULL_TREE); /* Gather all the statements in a compound */ ! for (current = TYPE_II_STMT_LIST (class_type); current; current = TREE_CHAIN (current)) compound = add_stmt_to_compound (compound, NULL_TREE, current); *************** generate_instinit (class_type) *** 4472,4481 **** We do that only if all ctors of CLASS_TYPE are set to catch a checked exception. This doesn't apply to anonymous classes (since they don't have declared ctors.) */ ! if (!ANONYMOUS_CLASS_P (class_type) && ctors_unchecked_throws_clause_p (class_type)) { ! compound = encapsulate_with_try_catch (0, exception_type_node, compound, build1 (THROW_EXPR, NULL_TREE, build_wfl_node (wpv_id))); DECL_FUNCTION_THROWS (mdecl) = build_tree_list (NULL_TREE, --- 4489,4498 ---- We do that only if all ctors of CLASS_TYPE are set to catch a checked exception. This doesn't apply to anonymous classes (since they don't have declared ctors.) */ ! if (!ANONYMOUS_CLASS_P (class_type) && ctors_unchecked_throws_clause_p (class_type)) { ! compound = encapsulate_with_try_catch (0, exception_type_node, compound, build1 (THROW_EXPR, NULL_TREE, build_wfl_node (wpv_id))); DECL_FUNCTION_THROWS (mdecl) = build_tree_list (NULL_TREE, *************** method_header (flags, type, mdecl, throw *** 4538,4544 **** return error_mark_node; meth = TREE_VALUE (mdecl); id = TREE_PURPOSE (mdecl); ! check_modifiers_consistency (flags); if (GET_CPC ()) --- 4555,4561 ---- return error_mark_node; meth = TREE_VALUE (mdecl); id = TREE_PURPOSE (mdecl); ! check_modifiers_consistency (flags); if (GET_CPC ()) *************** method_header (flags, type, mdecl, throw *** 4546,4552 **** if (!this_class || this_class == error_mark_node) return NULL_TREE; ! /* There are some forbidden modifiers for an abstract method and its class must be abstract as well. */ if (type && (flags & ACC_ABSTRACT)) --- 4563,4569 ---- if (!this_class || this_class == error_mark_node) return NULL_TREE; ! /* There are some forbidden modifiers for an abstract method and its class must be abstract as well. */ if (type && (flags & ACC_ABSTRACT)) *************** method_header (flags, type, mdecl, throw *** 4559,4570 **** ABSTRACT_CHECK (flags, ACC_STRICT, id, "Strictfp"); if (!CLASS_ABSTRACT (TYPE_NAME (this_class)) && !CLASS_INTERFACE (TYPE_NAME (this_class))) ! parse_error_context ! (id, "Class `%s' must be declared abstract to define abstract method `%s'", IDENTIFIER_POINTER (DECL_NAME (GET_CPC ())), IDENTIFIER_POINTER (EXPR_WFL_NODE (id))); } /* Things to be checked when declaring a constructor */ if (!type) { --- 4576,4599 ---- ABSTRACT_CHECK (flags, ACC_STRICT, id, "Strictfp"); if (!CLASS_ABSTRACT (TYPE_NAME (this_class)) && !CLASS_INTERFACE (TYPE_NAME (this_class))) ! parse_error_context ! (id, "Class `%s' must be declared abstract to define abstract method `%s'", IDENTIFIER_POINTER (DECL_NAME (GET_CPC ())), IDENTIFIER_POINTER (EXPR_WFL_NODE (id))); } + /* A native method can't be strictfp. */ + if ((flags & ACC_NATIVE) && (flags & ACC_STRICT)) + parse_error_context (id, "native method `%s' can't be strictfp", + IDENTIFIER_POINTER (EXPR_WFL_NODE (id))); + /* No such thing as a transient or volatile method. */ + if ((flags & ACC_TRANSIENT)) + parse_error_context (id, "method `%s' can't be transient", + IDENTIFIER_POINTER (EXPR_WFL_NODE (id))); + if ((flags & ACC_VOLATILE)) + parse_error_context (id, "method `%s' can't be volatile", + IDENTIFIER_POINTER (EXPR_WFL_NODE (id))); + /* Things to be checked when declaring a constructor */ if (!type) { *************** method_header (flags, type, mdecl, throw *** 4572,4578 **** /* 8.6: Constructor declarations: we might be trying to define a method without specifying a return type. */ if (EXPR_WFL_NODE (id) != GET_CPC_UN ()) ! parse_error_context (id, "Invalid method declaration, return type required"); /* 8.6.3: Constructor modifiers */ else --- 4601,4607 ---- /* 8.6: Constructor declarations: we might be trying to define a method without specifying a return type. */ if (EXPR_WFL_NODE (id) != GET_CPC_UN ()) ! parse_error_context (id, "Invalid method declaration, return type required"); /* 8.6.3: Constructor modifiers */ else *************** method_header (flags, type, mdecl, throw *** 4611,4617 **** /* Inner class can't declare static methods */ if ((flags & ACC_STATIC) && !TOPLEVEL_CLASS_TYPE_P (this_class)) { ! parse_error_context (id, "Method `%s' can't be static in inner class `%s'. Only members of interfaces and top-level classes can be static", IDENTIFIER_POINTER (EXPR_WFL_NODE (id)), lang_printable_name (this_class, 0)); --- 4640,4646 ---- /* Inner class can't declare static methods */ if ((flags & ACC_STATIC) && !TOPLEVEL_CLASS_TYPE_P (this_class)) { ! parse_error_context (id, "Method `%s' can't be static in inner class `%s'. Only members of interfaces and top-level classes can be static", IDENTIFIER_POINTER (EXPR_WFL_NODE (id)), lang_printable_name (this_class, 0)); *************** method_header (flags, type, mdecl, throw *** 4653,4659 **** /* When defining an abstract or interface method, the curly bracket at level 1 doesn't exist because there is no function body */ ! lineno = (ctxp->first_ccb_indent1 ? ctxp->first_ccb_indent1 : EXPR_WFL_LINENO (id)); /* Remember the original argument list */ --- 4682,4688 ---- /* When defining an abstract or interface method, the curly bracket at level 1 doesn't exist because there is no function body */ ! lineno = (ctxp->first_ccb_indent1 ? ctxp->first_ccb_indent1 : EXPR_WFL_LINENO (id)); /* Remember the original argument list */ *************** method_header (flags, type, mdecl, throw *** 4674,4680 **** register_incomplete_type (JDEP_METHOD_END, NULL_TREE, meth, NULL_TREE); } else ! meth = add_method (this_class, flags, meth_name, build_java_signature (meth)); /* Remember final parameters */ --- 4703,4709 ---- register_incomplete_type (JDEP_METHOD_END, NULL_TREE, meth, NULL_TREE); } else ! meth = add_method (this_class, flags, meth_name, build_java_signature (meth)); /* Remember final parameters */ *************** method_header (flags, type, mdecl, throw *** 4700,4706 **** { register_incomplete_type (JDEP_EXCEPTION, TREE_VALUE (current), NULL_TREE, NULL_TREE); ! JDEP_GET_PATCH (CLASSD_LAST (ctxp->classd_list)) = &TREE_VALUE (current); } DECL_FUNCTION_THROWS (meth) = throws; --- 4729,4735 ---- { register_incomplete_type (JDEP_EXCEPTION, TREE_VALUE (current), NULL_TREE, NULL_TREE); ! JDEP_GET_PATCH (CLASSD_LAST (ctxp->classd_list)) = &TREE_VALUE (current); } DECL_FUNCTION_THROWS (meth) = throws; *************** method_header (flags, type, mdecl, throw *** 4715,4721 **** DECL_CONSTRUCTOR_P (meth) = 1; /* Compute and store the number of artificial parameters declared for this constructor */ ! for (count = 0, current = TYPE_FIELDS (this_class); current; current = TREE_CHAIN (current)) if (FIELD_LOCAL_ALIAS (current)) count++; --- 4744,4750 ---- DECL_CONSTRUCTOR_P (meth) = 1; /* Compute and store the number of artificial parameters declared for this constructor */ ! for (count = 0, current = TYPE_FIELDS (this_class); current; current = TREE_CHAIN (current)) if (FIELD_LOCAL_ALIAS (current)) count++; *************** finish_method_declaration (method_body) *** 4768,4774 **** if ((flags & ACC_ABSTRACT || flags & ACC_NATIVE) && method_body) { tree name = DECL_NAME (current_function_decl); ! parse_error_context (DECL_FUNCTION_WFL (current_function_decl), "%s method `%s' can't have a body defined", (METHOD_NATIVE (current_function_decl) ? "Native" : "Abstract"), --- 4797,4803 ---- if ((flags & ACC_ABSTRACT || flags & ACC_NATIVE) && method_body) { tree name = DECL_NAME (current_function_decl); ! parse_error_context (DECL_FUNCTION_WFL (current_function_decl), "%s method `%s' can't have a body defined", (METHOD_NATIVE (current_function_decl) ? "Native" : "Abstract"), *************** finish_method_declaration (method_body) *** 4779,4793 **** { tree name = DECL_NAME (current_function_decl); parse_error_context ! (DECL_FUNCTION_WFL (current_function_decl), "Non native and non abstract method `%s' must have a body defined", IDENTIFIER_POINTER (name)); method_body = NULL_TREE; } ! if (flag_emit_class_files && method_body ! && TREE_CODE (method_body) == NOP_EXPR ! && TREE_TYPE (current_function_decl) && TREE_TYPE (TREE_TYPE (current_function_decl)) == void_type_node) method_body = build1 (RETURN_EXPR, void_type_node, NULL); --- 4808,4822 ---- { tree name = DECL_NAME (current_function_decl); parse_error_context ! (DECL_FUNCTION_WFL (current_function_decl), "Non native and non abstract method `%s' must have a body defined", IDENTIFIER_POINTER (name)); method_body = NULL_TREE; } ! if (flag_emit_class_files && method_body ! && TREE_CODE (method_body) == NOP_EXPR ! && TREE_TYPE (current_function_decl) && TREE_TYPE (TREE_TYPE (current_function_decl)) == void_type_node) method_body = build1 (RETURN_EXPR, void_type_node, NULL); *************** finish_method_declaration (method_body) *** 4804,4810 **** ARG_FINAL_P parameter that might have been set on some of this function parameters. */ UNMARK_FINAL_PARMS (current_function_decl); ! /* So we don't have an irrelevant function declaration context for the next static block we'll see. */ current_function_decl = NULL_TREE; --- 4833,4839 ---- ARG_FINAL_P parameter that might have been set on some of this function parameters. */ UNMARK_FINAL_PARMS (current_function_decl); ! /* So we don't have an irrelevant function declaration context for the next static block we'll see. */ current_function_decl = NULL_TREE; *************** constructor_circularity_msg (from, to) *** 4826,4880 **** /* Verify a circular call to METH. Return 1 if an error is found, 0 otherwise. */ static int verify_constructor_circularity (meth, current) tree meth, current; { - static tree list = NULL_TREE; - static int initialized_p; tree c; - /* If we haven't already registered LIST with the garbage collector, - do so now. */ - if (!initialized_p) - { - ggc_add_tree_root (&list, 1); - initialized_p = 1; - } - for (c = DECL_CONSTRUCTOR_CALLS (current); c; c = TREE_CHAIN (c)) { if (TREE_VALUE (c) == meth) { char *t; ! if (list) { tree liste; ! list = nreverse (list); ! for (liste = list; liste; liste = TREE_CHAIN (liste)) { ! parse_error_context (TREE_PURPOSE (TREE_PURPOSE (liste)), "%s", constructor_circularity_msg ! (TREE_VALUE (liste), TREE_VALUE (TREE_PURPOSE (liste)))); java_error_count--; } } t = xstrdup (lang_printable_name (meth, 0)); ! parse_error_context (TREE_PURPOSE (c), "%s: recursive invocation of constructor `%s'", constructor_circularity_msg (current, meth), t); free (t); ! list = NULL_TREE; return 1; } } for (c = DECL_CONSTRUCTOR_CALLS (current); c; c = TREE_CHAIN (c)) { ! list = tree_cons (c, current, list); if (verify_constructor_circularity (meth, TREE_VALUE (c))) return 1; ! list = TREE_CHAIN (list); } return 0; } --- 4855,4900 ---- /* Verify a circular call to METH. Return 1 if an error is found, 0 otherwise. */ + static GTY(()) tree vcc_list; static int verify_constructor_circularity (meth, current) tree meth, current; { tree c; for (c = DECL_CONSTRUCTOR_CALLS (current); c; c = TREE_CHAIN (c)) { if (TREE_VALUE (c) == meth) { char *t; ! if (vcc_list) { tree liste; ! vcc_list = nreverse (vcc_list); ! for (liste = vcc_list; liste; liste = TREE_CHAIN (liste)) { ! parse_error_context (TREE_PURPOSE (TREE_PURPOSE (liste)), "%s", constructor_circularity_msg ! (TREE_VALUE (liste), TREE_VALUE (TREE_PURPOSE (liste)))); java_error_count--; } } t = xstrdup (lang_printable_name (meth, 0)); ! parse_error_context (TREE_PURPOSE (c), "%s: recursive invocation of constructor `%s'", constructor_circularity_msg (current, meth), t); free (t); ! vcc_list = NULL_TREE; return 1; } } for (c = DECL_CONSTRUCTOR_CALLS (current); c; c = TREE_CHAIN (c)) { ! vcc_list = tree_cons (c, current, vcc_list); if (verify_constructor_circularity (meth, TREE_VALUE (c))) return 1; ! vcc_list = TREE_CHAIN (vcc_list); } return 0; } *************** check_abstract_method_header (meth) *** 4915,4921 **** OBSOLETE_MODIFIER_WARNING2 (MODIFIER_WFL (ABSTRACT_TK), flags, ACC_ABSTRACT, "abstract method", IDENTIFIER_POINTER (DECL_NAME (meth))); ! OBSOLETE_MODIFIER_WARNING2 (MODIFIER_WFL (PUBLIC_TK), flags, ACC_PUBLIC, "abstract method", IDENTIFIER_POINTER (DECL_NAME (meth))); --- 4935,4941 ---- OBSOLETE_MODIFIER_WARNING2 (MODIFIER_WFL (ABSTRACT_TK), flags, ACC_ABSTRACT, "abstract method", IDENTIFIER_POINTER (DECL_NAME (meth))); ! OBSOLETE_MODIFIER_WARNING2 (MODIFIER_WFL (PUBLIC_TK), flags, ACC_PUBLIC, "abstract method", IDENTIFIER_POINTER (DECL_NAME (meth))); *************** method_declarator (id, list) *** 4945,4957 **** this$ decl in the name field of its parameter declaration. We also might have to hide the outer context local alias initializers. Not done when the class is a toplevel class. */ ! if (PURE_INNER_CLASS_DECL_P (GET_CPC ()) && EXPR_WFL_NODE (id) == GET_CPC_UN ()) { tree aliases_list, type, thisn; /* First the aliases, linked to the regular parameters */ aliases_list = ! build_alias_initializer_parameter_list (AIPL_FUNCTION_DECLARATION, TREE_TYPE (GET_CPC ()), NULL_TREE, NULL); list = chainon (nreverse (aliases_list), list); --- 4965,4977 ---- this$ decl in the name field of its parameter declaration. We also might have to hide the outer context local alias initializers. Not done when the class is a toplevel class. */ ! if (PURE_INNER_CLASS_DECL_P (GET_CPC ()) && EXPR_WFL_NODE (id) == GET_CPC_UN ()) { tree aliases_list, type, thisn; /* First the aliases, linked to the regular parameters */ aliases_list = ! build_alias_initializer_parameter_list (AIPL_FUNCTION_DECLARATION, TREE_TYPE (GET_CPC ()), NULL_TREE, NULL); list = chainon (nreverse (aliases_list), list); *************** method_declarator (id, list) *** 4962,4968 **** list = tree_cons (build_wfl_node (thisn), build_pointer_type (type), list); } ! for (current = list; current; current = TREE_CHAIN (current)) { int must_chain = 0; --- 4982,4988 ---- list = tree_cons (build_wfl_node (thisn), build_pointer_type (type), list); } ! for (current = list; current; current = TREE_CHAIN (current)) { int must_chain = 0; *************** method_declarator (id, list) *** 5005,5011 **** if (must_chain) { patch_stage = JDEP_METHOD; ! type = register_incomplete_type (patch_stage, type_wfl, wfl_name, type); jdep = CLASSD_LAST (ctxp->classd_list); JDEP_MISC (jdep) = id; --- 5025,5031 ---- if (must_chain) { patch_stage = JDEP_METHOD; ! type = register_incomplete_type (patch_stage, type_wfl, wfl_name, type); jdep = CLASSD_LAST (ctxp->classd_list); JDEP_MISC (jdep) = id; *************** method_declarator (id, list) *** 5015,5021 **** arg_node = build_tree_list (name, real_type); /* Remeber arguments declared final. */ ARG_FINAL_P (arg_node) = ARG_FINAL_P (current); ! if (jdep) JDEP_GET_PATCH (jdep) = &TREE_VALUE (arg_node); TREE_CHAIN (arg_node) = arg_types; --- 5035,5041 ---- arg_node = build_tree_list (name, real_type); /* Remeber arguments declared final. */ ARG_FINAL_P (arg_node) = ARG_FINAL_P (current); ! if (jdep) JDEP_GET_PATCH (jdep) = &TREE_VALUE (arg_node); TREE_CHAIN (arg_node) = arg_types; *************** static int *** 5030,5036 **** unresolved_type_p (wfl, returned) tree wfl; tree *returned; ! { if (TREE_CODE (wfl) == EXPR_WITH_FILE_LOCATION) { --- 5050,5056 ---- unresolved_type_p (wfl, returned) tree wfl; tree *returned; ! { if (TREE_CODE (wfl) == EXPR_WITH_FILE_LOCATION) { *************** parser_qualified_classname (name) *** 5065,5071 **** if (ctxp->package) return merge_qualified_name (ctxp->package, name); ! else return name; } --- 5085,5091 ---- if (ctxp->package) return merge_qualified_name (ctxp->package, name); ! else return name; } *************** parser_check_super_interface (super_decl *** 5081,5089 **** /* Has to be an interface */ if (!CLASS_INTERFACE (super_decl)) { ! parse_error_context (this_wfl, "%s `%s' can't implement/extend %s `%s'", ! (CLASS_INTERFACE (TYPE_NAME (TREE_TYPE (this_decl))) ? "Interface" : "Class"), IDENTIFIER_POINTER (DECL_NAME (this_decl)), (TYPE_ARRAY_P (super_type) ? "array" : "class"), --- 5101,5109 ---- /* Has to be an interface */ if (!CLASS_INTERFACE (super_decl)) { ! parse_error_context (this_wfl, "%s `%s' can't implement/extend %s `%s'", ! (CLASS_INTERFACE (TYPE_NAME (TREE_TYPE (this_decl))) ? "Interface" : "Class"), IDENTIFIER_POINTER (DECL_NAME (this_decl)), (TYPE_ARRAY_P (super_type) ? "array" : "class"), *************** parser_check_super_interface (super_decl *** 5091,5097 **** return 1; } ! /* Check top-level interface access. Inner classes are subject to member access rules (6.6.1). */ if (! INNER_CLASS_P (super_type) && check_pkg_class_access (DECL_NAME (super_decl), --- 5111,5117 ---- return 1; } ! /* Check top-level interface access. Inner classes are subject to member access rules (6.6.1). */ if (! INNER_CLASS_P (super_type) && check_pkg_class_access (DECL_NAME (super_decl), *************** parser_check_super (super_decl, this_dec *** 5116,5122 **** /* SUPER should be a CLASS (neither an array nor an interface) */ if (TYPE_ARRAY_P (super_type) || CLASS_INTERFACE (TYPE_NAME (super_type))) { ! parse_error_context (wfl, "Class `%s' can't subclass %s `%s'", IDENTIFIER_POINTER (DECL_NAME (this_decl)), (CLASS_INTERFACE (TYPE_NAME (super_type)) ? "interface" : "array"), --- 5136,5142 ---- /* SUPER should be a CLASS (neither an array nor an interface) */ if (TYPE_ARRAY_P (super_type) || CLASS_INTERFACE (TYPE_NAME (super_type))) { ! parse_error_context (wfl, "Class `%s' can't subclass %s `%s'", IDENTIFIER_POINTER (DECL_NAME (this_decl)), (CLASS_INTERFACE (TYPE_NAME (super_type)) ? "interface" : "array"), *************** parser_check_super (super_decl, this_dec *** 5136,5142 **** if (! INNER_CLASS_P (super_type) && (check_pkg_class_access (DECL_NAME (super_decl), wfl, true))) return 1; ! SOURCE_FRONTEND_DEBUG (("Completing class %s with %s", IDENTIFIER_POINTER (DECL_NAME (this_decl)), IDENTIFIER_POINTER (DECL_NAME (super_decl)))); --- 5156,5162 ---- if (! INNER_CLASS_P (super_type) && (check_pkg_class_access (DECL_NAME (super_decl), wfl, true))) return 1; ! SOURCE_FRONTEND_DEBUG (("Completing class %s with %s", IDENTIFIER_POINTER (DECL_NAME (this_decl)), IDENTIFIER_POINTER (DECL_NAME (super_decl)))); *************** static void *** 5150,5156 **** create_jdep_list (ctxp) struct parser_ctxt *ctxp; { ! jdeplist *new = (jdeplist *)xmalloc (sizeof (jdeplist)); new->first = new->last = NULL; new->next = ctxp->classd_list; ctxp->classd_list = new; --- 5170,5176 ---- create_jdep_list (ctxp) struct parser_ctxt *ctxp; { ! jdeplist *new = (jdeplist *)xmalloc (sizeof (jdeplist)); new->first = new->last = NULL; new->next = ctxp->classd_list; ctxp->classd_list = new; *************** register_incomplete_type (kind, wfl, dec *** 5220,5226 **** && GET_ENCLOSING_CPC ()) JDEP_ENCLOSING (new) = TREE_VALUE (GET_ENCLOSING_CPC ()); else if (kind == JDEP_SUPER) ! JDEP_ENCLOSING (new) = (GET_ENCLOSING_CPC () ? TREE_VALUE (GET_ENCLOSING_CPC ()) : NULL_TREE); else JDEP_ENCLOSING (new) = GET_CPC (); --- 5240,5246 ---- && GET_ENCLOSING_CPC ()) JDEP_ENCLOSING (new) = TREE_VALUE (GET_ENCLOSING_CPC ()); else if (kind == JDEP_SUPER) ! JDEP_ENCLOSING (new) = (GET_ENCLOSING_CPC () ? TREE_VALUE (GET_ENCLOSING_CPC ()) : NULL_TREE); else JDEP_ENCLOSING (new) = GET_CPC (); *************** check_circular_reference (type) *** 5303,5309 **** return lookup_cl (TYPE_NAME (type)); return NULL_TREE; } ! for (i = 0; i < TREE_VEC_LENGTH (basetype_vec); i++) { tree vec_elt = TREE_VEC_ELT (basetype_vec, i); --- 5323,5329 ---- return lookup_cl (TYPE_NAME (type)); return NULL_TREE; } ! for (i = 0; i < TREE_VEC_LENGTH (basetype_vec); i++) { tree vec_elt = TREE_VEC_ELT (basetype_vec, i); *************** build_alias_initializer_parameter_list ( *** 5359,5365 **** switch (mode) { case AIPL_FUNCTION_DECLARATION: ! MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR (mangled_id, &buffer [4]); purpose = build_wfl_node (mangled_id); if (TREE_CODE (TREE_TYPE (field)) == POINTER_TYPE) --- 5379,5385 ---- switch (mode) { case AIPL_FUNCTION_DECLARATION: ! MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR (mangled_id, &buffer [4]); purpose = build_wfl_node (mangled_id); if (TREE_CODE (TREE_TYPE (field)) == POINTER_TYPE) *************** build_alias_initializer_parameter_list ( *** 5375,5381 **** break; case AIPL_FUNCTION_FINIT_INVOCATION: ! MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR (mangled_id, &buffer [4]); /* Now, this is wrong. purpose should always be the NAME of something and value its matching value (decl, type, --- 5395,5401 ---- break; case AIPL_FUNCTION_FINIT_INVOCATION: ! MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR (mangled_id, &buffer [4]); /* Now, this is wrong. purpose should always be the NAME of something and value its matching value (decl, type, *************** build_alias_initializer_parameter_list ( *** 5408,5414 **** } if (additional_parms) { ! if (ANONYMOUS_CLASS_P (class_type) && mode == AIPL_FUNCTION_CTOR_INVOCATION) additional_parms = nreverse (additional_parms); parm = chainon (additional_parms, parm); --- 5428,5434 ---- } if (additional_parms) { ! if (ANONYMOUS_CLASS_P (class_type) && mode == AIPL_FUNCTION_CTOR_INVOCATION) additional_parms = nreverse (additional_parms); parm = chainon (additional_parms, parm); *************** craft_constructor (class_decl, args) *** 5432,5438 **** int i = 0, artificial = 0; tree decl, ctor_name; char buffer [80]; ! /* The constructor name is unless we're dealing with an anonymous class, in which case the name will be fixed after having be expanded. */ --- 5452,5458 ---- int i = 0, artificial = 0; tree decl, ctor_name; char buffer [80]; ! /* The constructor name is unless we're dealing with an anonymous class, in which case the name will be fixed after having be expanded. */ *************** craft_constructor (class_decl, args) *** 5452,5458 **** /* Some more arguments to be hidden here. The values of the local variables of the outer context that the inner class needs to see. */ parm = build_alias_initializer_parameter_list (AIPL_FUNCTION_CREATION, ! class_type, parm, &artificial); } --- 5472,5478 ---- /* Some more arguments to be hidden here. The values of the local variables of the outer context that the inner class needs to see. */ parm = build_alias_initializer_parameter_list (AIPL_FUNCTION_CREATION, ! class_type, parm, &artificial); } *************** craft_constructor (class_decl, args) *** 5464,5470 **** } CRAFTED_PARAM_LIST_FIXUP (parm); ! decl = create_artificial_method (class_type, flags, void_type_node, ctor_name, parm); fix_method_argument_names (parm, decl); /* Now, mark the artificial parameters. */ --- 5484,5490 ---- } CRAFTED_PARAM_LIST_FIXUP (parm); ! decl = create_artificial_method (class_type, flags, void_type_node, ctor_name, parm); fix_method_argument_names (parm, decl); /* Now, mark the artificial parameters. */ *************** jdep_resolve_class (dep) *** 5543,5549 **** JDEP_DECL (dep), JDEP_WFL (dep)); JDEP_RESOLVED (dep, decl); } ! if (!decl) complete_class_report_errors (dep); else if (PURE_INNER_CLASS_DECL_P (decl)) --- 5563,5569 ---- JDEP_DECL (dep), JDEP_WFL (dep)); JDEP_RESOLVED (dep, decl); } ! if (!decl) complete_class_report_errors (dep); else if (PURE_INNER_CLASS_DECL_P (decl)) *************** java_complete_class () *** 5573,5584 **** /* Process imports */ process_imports (); ! /* Rever things so we have the right order */ ctxp->class_list = nreverse (ctxp->class_list); ctxp->classd_list = reverse_jdep_list (ctxp); ! for (cclassd = ctxp->classd_list, cclass = ctxp->class_list; ! cclass && cclassd; cclass = TREE_CHAIN (cclass), cclassd = CLASSD_CHAIN (cclassd)) { jdep *dep; --- 5593,5604 ---- /* Process imports */ process_imports (); ! /* Reverse things so we have the right order */ ctxp->class_list = nreverse (ctxp->class_list); ctxp->classd_list = reverse_jdep_list (ctxp); ! for (cclassd = ctxp->classd_list, cclass = ctxp->class_list; ! cclass && cclassd; cclass = TREE_CHAIN (cclass), cclassd = CLASSD_CHAIN (cclassd)) { jdep *dep; *************** java_complete_class () *** 5602,5608 **** /* Simply patch super */ if (parser_check_super (decl, JDEP_DECL (dep), JDEP_WFL (dep))) continue; ! BINFO_TYPE (TREE_VEC_ELT (BINFO_BASETYPES (TYPE_BINFO (TREE_TYPE (JDEP_DECL (dep)))), 0)) = TREE_TYPE (decl); break; --- 5622,5628 ---- /* Simply patch super */ if (parser_check_super (decl, JDEP_DECL (dep), JDEP_WFL (dep))) continue; ! BINFO_TYPE (TREE_VEC_ELT (BINFO_BASETYPES (TYPE_BINFO (TREE_TYPE (JDEP_DECL (dep)))), 0)) = TREE_TYPE (decl); break; *************** java_complete_class () *** 5617,5623 **** DECL_ALIGN (field_decl) = 0; DECL_USER_ALIGN (field_decl) = 0; layout_decl (field_decl, 0); ! SOURCE_FRONTEND_DEBUG (("Completed field/var decl `%s' with `%s'", IDENTIFIER_POINTER (DECL_NAME (field_decl)), IDENTIFIER_POINTER (DECL_NAME (decl)))); --- 5637,5643 ---- DECL_ALIGN (field_decl) = 0; DECL_USER_ALIGN (field_decl) = 0; layout_decl (field_decl, 0); ! SOURCE_FRONTEND_DEBUG (("Completed field/var decl `%s' with `%s'", IDENTIFIER_POINTER (DECL_NAME (field_decl)), IDENTIFIER_POINTER (DECL_NAME (decl)))); *************** java_complete_class () *** 5634,5644 **** if (TREE_CODE (type) == RECORD_TYPE) type = promote_type (type); JDEP_APPLY_PATCH (dep, type); ! SOURCE_FRONTEND_DEBUG (((JDEP_KIND (dep) == JDEP_METHOD_RETURN ? "Completing fct `%s' with ret type `%s'": "Completing arg `%s' with type `%s'"), ! IDENTIFIER_POINTER (EXPR_WFL_NODE (JDEP_DECL_WFL (dep))), IDENTIFIER_POINTER (DECL_NAME (decl)))); } --- 5654,5664 ---- if (TREE_CODE (type) == RECORD_TYPE) type = promote_type (type); JDEP_APPLY_PATCH (dep, type); ! SOURCE_FRONTEND_DEBUG (((JDEP_KIND (dep) == JDEP_METHOD_RETURN ? "Completing fct `%s' with ret type `%s'": "Completing arg `%s' with type `%s'"), ! IDENTIFIER_POINTER (EXPR_WFL_NODE (JDEP_DECL_WFL (dep))), IDENTIFIER_POINTER (DECL_NAME (decl)))); } *************** java_complete_class () *** 5683,5696 **** case JDEP_TYPE: JDEP_APPLY_PATCH (dep, TREE_TYPE (decl)); ! SOURCE_FRONTEND_DEBUG (("Completing a random type dependency on a '%s' node", tree_code_name [TREE_CODE (JDEP_DECL (dep))])); break; case JDEP_EXCEPTION: JDEP_APPLY_PATCH (dep, TREE_TYPE (decl)); ! SOURCE_FRONTEND_DEBUG (("Completing `%s' `throws' argument node", IDENTIFIER_POINTER (EXPR_WFL_NODE (JDEP_WFL (dep))))); break; --- 5703,5716 ---- case JDEP_TYPE: JDEP_APPLY_PATCH (dep, TREE_TYPE (decl)); ! SOURCE_FRONTEND_DEBUG (("Completing a random type dependency on a '%s' node", tree_code_name [TREE_CODE (JDEP_DECL (dep))])); break; case JDEP_EXCEPTION: JDEP_APPLY_PATCH (dep, TREE_TYPE (decl)); ! SOURCE_FRONTEND_DEBUG (("Completing `%s' `throws' argument node", IDENTIFIER_POINTER (EXPR_WFL_NODE (JDEP_WFL (dep))))); break; *************** resolve_class (enclosing, class_type, de *** 5718,5724 **** tree resolved_type = TREE_TYPE (class_type); int array_dims = 0; tree resolved_type_decl; ! if (resolved_type != NULL_TREE) { tree resolved_type_decl = TYPE_NAME (resolved_type); --- 5738,5744 ---- tree resolved_type = TREE_TYPE (class_type); int array_dims = 0; tree resolved_type_decl; ! if (resolved_type != NULL_TREE) { tree resolved_type_decl = TYPE_NAME (resolved_type); *************** resolve_class (enclosing, class_type, de *** 5739,5750 **** WFL_STRIP_BRACKET (cl, cl); /* 2- Resolve the bare type */ ! if (!(resolved_type_decl = do_resolve_class (enclosing, class_type, decl, cl))) return NULL_TREE; resolved_type = TREE_TYPE (resolved_type_decl); ! /* 3- If we have and array, reconstruct the array down to its nesting */ if (array_dims) { for (; array_dims; array_dims--) --- 5759,5770 ---- WFL_STRIP_BRACKET (cl, cl); /* 2- Resolve the bare type */ ! if (!(resolved_type_decl = do_resolve_class (enclosing, class_type, decl, cl))) return NULL_TREE; resolved_type = TREE_TYPE (resolved_type_decl); ! /* 3- If we have an array, reconstruct the array down to its nesting */ if (array_dims) { for (; array_dims; array_dims--) *************** resolve_class (enclosing, class_type, de *** 5755,5765 **** return resolved_type_decl; } ! /* Effectively perform the resolution of class CLASS_TYPE. DECL or CL ! are used to report error messages. Do not try to replace TYPE_NAME ! (class_type) by a variable, since it is changed by ! find_in_imports{_on_demand} and (but it doesn't really matter) ! qualify_and_find. */ tree do_resolve_class (enclosing, class_type, decl, cl) --- 5775,5785 ---- return resolved_type_decl; } ! /* Effectively perform the resolution of class CLASS_TYPE. DECL or CL ! are used to report error messages; CL must either be NULL_TREE or a ! WFL wrapping a class. Do not try to replace TYPE_NAME (class_type) ! by a variable, since it is changed by find_in_imports{_on_demand} ! and (but it doesn't really matter) qualify_and_find. */ tree do_resolve_class (enclosing, class_type, decl, cl) *************** do_resolve_class (enclosing, class_type, *** 5768,5806 **** tree new_class_decl = NULL_TREE, super = NULL_TREE; tree saved_enclosing_type = enclosing ? TREE_TYPE (enclosing) : NULL_TREE; tree decl_result; ! struct hash_table _ht, *circularity_hash = &_ht; ! /* This hash table is used to register the classes we're going ! through when searching the current class as an inner class, in ! order to detect circular references. Remember to free it before ! returning the section 0- of this function. */ ! hash_table_init (circularity_hash, hash_newfunc, ! java_hash_hash_tree_node, java_hash_compare_tree_node); ! /* 0- Search in the current class as an inner class. ! Maybe some code here should be added to load the class or ! something, at least if the class isn't an inner class and ended ! being loaded from class file. FIXME. */ ! while (enclosing) { ! new_class_decl = resolve_inner_class (circularity_hash, cl, &enclosing, ! &super, class_type); ! if (new_class_decl) ! break; ! /* If we haven't found anything because SUPER reached Object and ! ENCLOSING happens to be an innerclass, try the enclosing context. */ ! if ((!super || super == object_type_node) && ! enclosing && INNER_CLASS_DECL_P (enclosing)) ! enclosing = DECL_CONTEXT (enclosing); ! else ! enclosing = NULL_TREE; ! } ! hash_table_free (circularity_hash); ! if (new_class_decl) ! return new_class_decl; /* 1- Check for the type in single imports. This will change TYPE_NAME() if something relevant is found */ --- 5788,5847 ---- tree new_class_decl = NULL_TREE, super = NULL_TREE; tree saved_enclosing_type = enclosing ? TREE_TYPE (enclosing) : NULL_TREE; tree decl_result; ! htab_t circularity_hash; ! if (QUALIFIED_P (TYPE_NAME (class_type))) ! { ! /* If the type name is of the form `Q . Id', then Q is either a ! package name or a class name. First we try to find Q as a ! class and then treat Id as a member type. If we can't find Q ! as a class then we fall through. */ ! tree q, left, left_type, right; ! breakdown_qualified (&left, &right, TYPE_NAME (class_type)); ! BUILD_PTR_FROM_NAME (left_type, left); ! q = do_resolve_class (enclosing, left_type, decl, cl); ! if (q) ! { ! enclosing = q; ! saved_enclosing_type = TREE_TYPE (q); ! BUILD_PTR_FROM_NAME (class_type, right); ! } ! } ! if (enclosing) { ! /* This hash table is used to register the classes we're going ! through when searching the current class as an inner class, in ! order to detect circular references. Remember to free it before ! returning the section 0- of this function. */ ! circularity_hash = htab_create (20, htab_hash_pointer, htab_eq_pointer, ! NULL); ! /* 0- Search in the current class as an inner class. ! Maybe some code here should be added to load the class or ! something, at least if the class isn't an inner class and ended ! being loaded from class file. FIXME. */ ! while (enclosing) ! { ! new_class_decl = resolve_inner_class (circularity_hash, cl, &enclosing, ! &super, class_type); ! if (new_class_decl) ! break; ! /* If we haven't found anything because SUPER reached Object and ! ENCLOSING happens to be an innerclass, try the enclosing context. */ ! if ((!super || super == object_type_node) && ! enclosing && INNER_CLASS_DECL_P (enclosing)) ! enclosing = DECL_CONTEXT (enclosing); ! else ! enclosing = NULL_TREE; ! } ! htab_delete (circularity_hash); ! ! if (new_class_decl) ! return new_class_decl; ! } /* 1- Check for the type in single imports. This will change TYPE_NAME() if something relevant is found */ *************** do_resolve_class (enclosing, class_type, *** 5829,5835 **** if (find_in_imports_on_demand (saved_enclosing_type, class_type)) return NULL_TREE; ! /* If found in find_in_imports_on_demant, the type has already been loaded. */ if ((new_class_decl = IDENTIFIER_CLASS_VALUE (TYPE_NAME (class_type)))) return new_class_decl; --- 5870,5876 ---- if (find_in_imports_on_demand (saved_enclosing_type, class_type)) return NULL_TREE; ! /* If found in find_in_imports_on_demand, the type has already been loaded. */ if ((new_class_decl = IDENTIFIER_CLASS_VALUE (TYPE_NAME (class_type)))) return new_class_decl; *************** do_resolve_class (enclosing, class_type, *** 5841,5862 **** /* If there is a current package (ctxp->package), it's the first element of package_list and we can skip it. */ ! for (package = (ctxp->package ? TREE_CHAIN (package_list) : package_list); package; package = TREE_CHAIN (package)) if ((new_class_decl = qualify_and_find (class_type, ! TREE_PURPOSE (package), TYPE_NAME (class_type)))) return new_class_decl; } ! /* 5- Check an other compilation unit that bears the name of type */ load_class (TYPE_NAME (class_type), 0); ! if (!cl) cl = lookup_cl (decl); ! ! /* If we don't have a value for CL, then we're being called recursively. We can't check package access just yet, but it will be taken care of by the caller. */ if (cl) --- 5882,5903 ---- /* If there is a current package (ctxp->package), it's the first element of package_list and we can skip it. */ ! for (package = (ctxp->package ? TREE_CHAIN (package_list) : package_list); package; package = TREE_CHAIN (package)) if ((new_class_decl = qualify_and_find (class_type, ! TREE_PURPOSE (package), TYPE_NAME (class_type)))) return new_class_decl; } ! /* 5- Check another compilation unit that bears the name of type */ load_class (TYPE_NAME (class_type), 0); ! if (!cl) cl = lookup_cl (decl); ! ! /* If we don't have a value for CL, then we're being called recursively. We can't check package access just yet, but it will be taken care of by the caller. */ if (cl) *************** resolve_and_layout (something, cl) *** 5971,5977 **** /* Check methods */ if (CLASS_FROM_SOURCE_P (decl_type)) java_check_methods (decl); ! /* Layout the type if necessary */ if (decl_type != current_class && !CLASS_LOADED_P (decl_type)) safe_layout_class (decl_type); --- 6012,6018 ---- /* Check methods */ if (CLASS_FROM_SOURCE_P (decl_type)) java_check_methods (decl); ! /* Layout the type if necessary */ if (decl_type != current_class && !CLASS_LOADED_P (decl_type)) safe_layout_class (decl_type); *************** resolve_no_layout (name, cl) *** 5990,5996 **** java_parser_context_save_global (); decl = resolve_class (TYPE_NAME (current_class), ptr, NULL_TREE, cl); java_parser_context_restore_global (); ! return decl; } --- 6031,6037 ---- java_parser_context_save_global (); decl = resolve_class (TYPE_NAME (current_class), ptr, NULL_TREE, cl); java_parser_context_restore_global (); ! return decl; } *************** complete_class_report_errors (dep) *** 6030,6036 **** switch (JDEP_KIND (dep)) { case JDEP_SUPER: ! parse_error_context (JDEP_WFL (dep), "Superclass `%s' of class `%s' not found", purify_type_name (name), IDENTIFIER_POINTER (DECL_NAME (JDEP_DECL (dep)))); --- 6071,6077 ---- switch (JDEP_KIND (dep)) { case JDEP_SUPER: ! parse_error_context (JDEP_WFL (dep), "Superclass `%s' of class `%s' not found", purify_type_name (name), IDENTIFIER_POINTER (DECL_NAME (JDEP_DECL (dep)))); *************** complete_class_report_errors (dep) *** 6050,6056 **** break; case JDEP_METHOD_RETURN: /* Covers return type */ parse_error_context ! (JDEP_WFL (dep), "Type `%s' not found in the declaration of the return type of method `%s'", purify_type_name (name), IDENTIFIER_POINTER (EXPR_WFL_NODE (JDEP_DECL_WFL (dep)))); break; --- 6091,6097 ---- break; case JDEP_METHOD_RETURN: /* Covers return type */ parse_error_context ! (JDEP_WFL (dep), "Type `%s' not found in the declaration of the return type of method `%s'", purify_type_name (name), IDENTIFIER_POINTER (EXPR_WFL_NODE (JDEP_DECL_WFL (dep)))); break; *************** complete_class_report_errors (dep) *** 6063,6075 **** break; case JDEP_VARIABLE: parse_error_context ! (JDEP_WFL (dep), "Type `%s' not found in the declaration of the local variable `%s'", ! purify_type_name (IDENTIFIER_POINTER (EXPR_WFL_NODE (JDEP_WFL (dep)))), IDENTIFIER_POINTER (DECL_NAME (JDEP_DECL (dep)))); break; case JDEP_EXCEPTION: /* As specified by `throws' */ ! parse_error_context (JDEP_WFL (dep), "Class `%s' not found in `throws'", IDENTIFIER_POINTER (EXPR_WFL_NODE (JDEP_WFL (dep)))); break; --- 6104,6116 ---- break; case JDEP_VARIABLE: parse_error_context ! (JDEP_WFL (dep), "Type `%s' not found in the declaration of the local variable `%s'", ! purify_type_name (IDENTIFIER_POINTER (EXPR_WFL_NODE (JDEP_WFL (dep)))), IDENTIFIER_POINTER (DECL_NAME (JDEP_DECL (dep)))); break; case JDEP_EXCEPTION: /* As specified by `throws' */ ! parse_error_context (JDEP_WFL (dep), "Class `%s' not found in `throws'", IDENTIFIER_POINTER (EXPR_WFL_NODE (JDEP_WFL (dep)))); break; *************** get_printable_method_name (decl) *** 6096,6106 **** name = DECL_NAME (decl); DECL_NAME (decl) = DECL_NAME (TYPE_NAME (DECL_CONTEXT (decl))); } ! to_return = lang_printable_name (decl, 0); if (DECL_CONSTRUCTOR_P (decl)) DECL_NAME (decl) = name; ! return to_return; } --- 6137,6147 ---- name = DECL_NAME (decl); DECL_NAME (decl) = DECL_NAME (TYPE_NAME (DECL_CONTEXT (decl))); } ! to_return = lang_printable_name (decl, 0); if (DECL_CONSTRUCTOR_P (decl)) DECL_NAME (decl) = name; ! return to_return; } *************** check_method_redefinition (class, method *** 6128,6134 **** && sig == TYPE_ARGUMENT_SIGNATURE (TREE_TYPE (redef)) && !DECL_ARTIFICIAL (method)) { ! parse_error_context (DECL_FUNCTION_WFL (method), "Duplicate %s declaration `%s'", (DECL_CONSTRUCTOR_P (redef) ? "constructor" : "method"), get_printable_method_name (redef)); --- 6169,6175 ---- && sig == TYPE_ARGUMENT_SIGNATURE (TREE_TYPE (redef)) && !DECL_ARTIFICIAL (method)) { ! parse_error_context (DECL_FUNCTION_WFL (method), "Duplicate %s declaration `%s'", (DECL_CONSTRUCTOR_P (redef) ? "constructor" : "method"), get_printable_method_name (redef)); *************** check_abstract_method_definitions (do_in *** 6154,6167 **** tree other_super, other_method, method_sig, method_name; int found = 0; int end_type_reached = 0; ! if (!METHOD_ABSTRACT (method) || METHOD_FINAL (method)) continue; ! /* Now verify that somewhere in between TYPE and CLASS, abstract method METHOD gets a non abstract definition that is inherited by CLASS. */ ! method_sig = build_java_signature (TREE_TYPE (method)); method_name = DECL_NAME (method); if (TREE_CODE (method_name) == EXPR_WITH_FILE_LOCATION) --- 6195,6208 ---- tree other_super, other_method, method_sig, method_name; int found = 0; int end_type_reached = 0; ! if (!METHOD_ABSTRACT (method) || METHOD_FINAL (method)) continue; ! /* Now verify that somewhere in between TYPE and CLASS, abstract method METHOD gets a non abstract definition that is inherited by CLASS. */ ! method_sig = build_java_signature (TREE_TYPE (method)); method_name = DECL_NAME (method); if (TREE_CODE (method_name) == EXPR_WITH_FILE_LOCATION) *************** check_abstract_method_definitions (do_in *** 6171,6184 **** do { if (other_super == end_type) end_type_reached = 1; ! /* Method search */ for (other_method = TYPE_METHODS (other_super); other_method; other_method = TREE_CHAIN (other_method)) { tree s = build_java_signature (TREE_TYPE (other_method)); tree other_name = DECL_NAME (other_method); ! if (TREE_CODE (other_name) == EXPR_WITH_FILE_LOCATION) other_name = EXPR_WFL_NODE (other_name); if (!DECL_CLINIT_P (other_method) --- 6212,6225 ---- do { if (other_super == end_type) end_type_reached = 1; ! /* Method search */ for (other_method = TYPE_METHODS (other_super); other_method; other_method = TREE_CHAIN (other_method)) { tree s = build_java_signature (TREE_TYPE (other_method)); tree other_name = DECL_NAME (other_method); ! if (TREE_CODE (other_name) == EXPR_WITH_FILE_LOCATION) other_name = EXPR_WFL_NODE (other_name); if (!DECL_CLINIT_P (other_method) *************** check_abstract_method_definitions (do_in *** 6193,6213 **** } other_super = CLASSTYPE_SUPER (other_super); } while (!end_type_reached); ! /* Report that abstract METHOD didn't find an implementation that CLASS can use. */ if (!found) { ! char *t = xstrdup (lang_printable_name (TREE_TYPE (TREE_TYPE (method)), 0)); tree ccn = DECL_NAME (TYPE_NAME (DECL_CONTEXT (method))); ! ! parse_error_context (lookup_cl (class_decl), "Class `%s' doesn't define the abstract method `%s %s' from %s `%s'. This method must be defined or %s `%s' must be declared abstract", IDENTIFIER_POINTER (DECL_NAME (class_decl)), ! t, lang_printable_name (method, 0), ! (CLASS_INTERFACE (TYPE_NAME (DECL_CONTEXT (method))) ? "interface" : "class"), IDENTIFIER_POINTER (ccn), (CLASS_INTERFACE (class_decl) ? "interface" : "class"), --- 6234,6254 ---- } other_super = CLASSTYPE_SUPER (other_super); } while (!end_type_reached); ! /* Report that abstract METHOD didn't find an implementation that CLASS can use. */ if (!found) { ! char *t = xstrdup (lang_printable_name (TREE_TYPE (TREE_TYPE (method)), 0)); tree ccn = DECL_NAME (TYPE_NAME (DECL_CONTEXT (method))); ! ! parse_error_context (lookup_cl (class_decl), "Class `%s' doesn't define the abstract method `%s %s' from %s `%s'. This method must be defined or %s `%s' must be declared abstract", IDENTIFIER_POINTER (DECL_NAME (class_decl)), ! t, lang_printable_name (method, 0), ! (CLASS_INTERFACE (TYPE_NAME (DECL_CONTEXT (method))) ? "interface" : "class"), IDENTIFIER_POINTER (ccn), (CLASS_INTERFACE (class_decl) ? "interface" : "class"), *************** check_method_types_complete (decl) *** 6275,6281 **** if (!INCOMPLETE_TYPE_P (TREE_TYPE (type))) return 0; ! args = TYPE_ARG_TYPES (type); if (TREE_CODE (type) == METHOD_TYPE) args = TREE_CHAIN (args); --- 6316,6322 ---- if (!INCOMPLETE_TYPE_P (TREE_TYPE (type))) return 0; ! args = TYPE_ARG_TYPES (type); if (TREE_CODE (type) == METHOD_TYPE) args = TREE_CHAIN (args); *************** java_check_methods (class_decl) *** 6299,6305 **** java_check_abstract_methods (class_decl); else java_check_regular_methods (class_decl); ! CLASS_METHOD_CHECKED_P (TREE_TYPE (class_decl)) = 1; } --- 6340,6346 ---- java_check_abstract_methods (class_decl); else java_check_regular_methods (class_decl); ! CLASS_METHOD_CHECKED_P (TREE_TYPE (class_decl)) = 1; } *************** java_check_regular_methods (class_decl) *** 6314,6320 **** { int saw_constructor = ANONYMOUS_CLASS_P (TREE_TYPE (class_decl)); tree method; ! tree class = CLASS_TO_HANDLE_TYPE (TREE_TYPE (class_decl)); tree found = NULL_TREE; tree mthrows; --- 6355,6361 ---- { int saw_constructor = ANONYMOUS_CLASS_P (TREE_TYPE (class_decl)); tree method; ! tree class = TREE_TYPE (class_decl); tree found = NULL_TREE; tree mthrows; *************** java_check_regular_methods (class_decl) *** 6336,6362 **** if (check_method_redefinition (class, method)) continue; ! /* If we see one constructor a mark so we don't generate the ! default one. Also skip other verifications: constructors ! can't be inherited hence hiden or overriden */ ! if (DECL_CONSTRUCTOR_P (method)) ! { ! saw_constructor = 1; ! continue; ! } ! ! /* We verify things thrown by the method. They must inherits from ! java.lang.Throwable */ for (mthrows = DECL_FUNCTION_THROWS (method); mthrows; mthrows = TREE_CHAIN (mthrows)) { if (!inherits_from_p (TREE_VALUE (mthrows), throwable_type_node)) ! parse_error_context (TREE_PURPOSE (mthrows), "Class `%s' in `throws' clause must be a subclass of class `java.lang.Throwable'", ! IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (TREE_VALUE (mthrows))))); } sig = build_java_argument_signature (TREE_TYPE (method)); found = lookup_argument_method2 (class, DECL_NAME (method), sig); --- 6377,6403 ---- if (check_method_redefinition (class, method)) continue; ! /* We verify things thrown by the method. They must inherit from ! java.lang.Throwable. */ for (mthrows = DECL_FUNCTION_THROWS (method); mthrows; mthrows = TREE_CHAIN (mthrows)) { if (!inherits_from_p (TREE_VALUE (mthrows), throwable_type_node)) ! parse_error_context (TREE_PURPOSE (mthrows), "Class `%s' in `throws' clause must be a subclass of class `java.lang.Throwable'", ! IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (TREE_VALUE (mthrows))))); } + /* If we see one constructor a mark so we don't generate the + default one. Also skip other verifications: constructors + can't be inherited hence hidden or overridden. */ + if (DECL_CONSTRUCTOR_P (method)) + { + saw_constructor = 1; + continue; + } + sig = build_java_argument_signature (TREE_TYPE (method)); found = lookup_argument_method2 (class, DECL_NAME (method), sig); *************** java_check_regular_methods (class_decl) *** 6364,6370 **** if (METHOD_STATIC (method) && !TOPLEVEL_CLASS_DECL_P (class_decl)) { char *t = xstrdup (lang_printable_name (class, 0)); ! parse_error_context (method_wfl, "Method `%s' can't be static in inner class `%s'. Only members of interfaces and top-level classes can be static", lang_printable_name (method, 0), t); free (t); --- 6405,6411 ---- if (METHOD_STATIC (method) && !TOPLEVEL_CLASS_DECL_P (class_decl)) { char *t = xstrdup (lang_printable_name (class, 0)); ! parse_error_context (method_wfl, "Method `%s' can't be static in inner class `%s'. Only members of interfaces and top-level classes can be static", lang_printable_name (method, 0), t); free (t); *************** java_check_regular_methods (class_decl) *** 6381,6387 **** /* If `found' is declared in an interface, make sure the modifier matches. */ ! if (CLASS_INTERFACE (TYPE_NAME (DECL_CONTEXT (found))) && clinit_identifier_node != DECL_NAME (found) && !METHOD_PUBLIC (method)) { --- 6422,6428 ---- /* If `found' is declared in an interface, make sure the modifier matches. */ ! if (CLASS_INTERFACE (TYPE_NAME (DECL_CONTEXT (found))) && clinit_identifier_node != DECL_NAME (found) && !METHOD_PUBLIC (method)) { *************** java_check_regular_methods (class_decl) *** 6396,6408 **** types. */ if (TREE_TYPE (TREE_TYPE (found)) != TREE_TYPE (TREE_TYPE (method))) { ! char *t = xstrdup (lang_printable_name (TREE_TYPE (TREE_TYPE (found)), 0)); ! parse_error_context (method_wfl, ! "Method `%s' was defined with return type `%s' in class `%s'", lang_printable_name (found, 0), t, ! IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found))))); free (t); } --- 6437,6449 ---- types. */ if (TREE_TYPE (TREE_TYPE (found)) != TREE_TYPE (TREE_TYPE (method))) { ! char *t = xstrdup (lang_printable_name (TREE_TYPE (TREE_TYPE (found)), 0)); ! parse_error_context (method_wfl, ! "Method `%s' was defined with return type `%s' in class `%s'", lang_printable_name (found, 0), t, ! IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found))))); free (t); } *************** java_check_regular_methods (class_decl) *** 6415,6421 **** /* Static *can* override static */ if (METHOD_STATIC (found) && METHOD_STATIC (method)) continue; ! parse_error_context (method_wfl, "%s methods can't be overriden. Method `%s' is %s in class `%s'", (METHOD_FINAL (found) ? "Final" : "Static"), --- 6456,6462 ---- /* Static *can* override static */ if (METHOD_STATIC (found) && METHOD_STATIC (method)) continue; ! parse_error_context (method_wfl, "%s methods can't be overriden. Method `%s' is %s in class `%s'", (METHOD_FINAL (found) ? "Final" : "Static"), *************** java_check_regular_methods (class_decl) *** 6429,6435 **** /* Static method can't override instance method. */ if (METHOD_STATIC (method)) { ! parse_error_context (method_wfl, "Instance methods can't be overriden by a static method. Method `%s' is an instance method in class `%s'", lang_printable_name (found, 0), --- 6470,6476 ---- /* Static method can't override instance method. */ if (METHOD_STATIC (method)) { ! parse_error_context (method_wfl, "Instance methods can't be overriden by a static method. Method `%s' is an instance method in class `%s'", lang_printable_name (found, 0), *************** java_check_regular_methods (class_decl) *** 6447,6463 **** taken care of. */ if (!CLASS_INTERFACE (TYPE_NAME (DECL_CONTEXT (found))) && ((METHOD_PUBLIC (found) && !METHOD_PUBLIC (method)) ! || (METHOD_PROTECTED (found) && !(METHOD_PUBLIC (method) || METHOD_PROTECTED (method))) || (!(aflags & (ACC_PUBLIC | ACC_PRIVATE | ACC_STATIC)) && METHOD_PRIVATE (method)))) { ! parse_error_context (method_wfl, "Methods can't be overridden to be more private. Method `%s' is not %s in class `%s'", lang_printable_name (method, 0), ! (METHOD_PUBLIC (method) ? "public" : (METHOD_PRIVATE (method) ? "private" : "protected")), ! IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found))))); continue; } --- 6488,6504 ---- taken care of. */ if (!CLASS_INTERFACE (TYPE_NAME (DECL_CONTEXT (found))) && ((METHOD_PUBLIC (found) && !METHOD_PUBLIC (method)) ! || (METHOD_PROTECTED (found) && !(METHOD_PUBLIC (method) || METHOD_PROTECTED (method))) || (!(aflags & (ACC_PUBLIC | ACC_PRIVATE | ACC_STATIC)) && METHOD_PRIVATE (method)))) { ! parse_error_context (method_wfl, "Methods can't be overridden to be more private. Method `%s' is not %s in class `%s'", lang_printable_name (method, 0), ! (METHOD_PUBLIC (method) ? "public" : (METHOD_PRIVATE (method) ? "private" : "protected")), ! IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found))))); continue; } *************** java_check_regular_methods (class_decl) *** 6468,6474 **** /* Inheriting multiple methods with the same signature. FIXME */ } ! if (!TYPE_NVIRTUALS (class)) TYPE_METHODS (class) = nreverse (TYPE_METHODS (class)); --- 6509,6515 ---- /* Inheriting multiple methods with the same signature. FIXME */ } ! if (!TYPE_NVIRTUALS (class)) TYPE_METHODS (class) = nreverse (TYPE_METHODS (class)); *************** java_check_regular_methods (class_decl) *** 6480,6486 **** abort (); } ! /* Return a non zero value if the `throws' clause of METHOD (if any) is incompatible with the `throws' clause of FOUND (if any). */ static void --- 6521,6527 ---- abort (); } ! /* Return a nonzero value if the `throws' clause of METHOD (if any) is incompatible with the `throws' clause of FOUND (if any). */ static void *************** check_throws_clauses (method, method_wfl *** 6500,6516 **** if (IS_UNCHECKED_EXCEPTION_P (TREE_VALUE (mthrows))) continue; /* Checked expression must be compatible */ ! for (fthrows = DECL_FUNCTION_THROWS (found); fthrows; fthrows = TREE_CHAIN (fthrows)) if (inherits_from_p (TREE_VALUE (mthrows), TREE_VALUE (fthrows))) break; if (!fthrows) { ! parse_error_context (method_wfl, "Invalid checked exception class `%s' in `throws' clause. The exception must be a subclass of an exception thrown by `%s' from class `%s'", IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (TREE_VALUE (mthrows)))), lang_printable_name (found, 0), ! IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found))))); } } --- 6541,6557 ---- if (IS_UNCHECKED_EXCEPTION_P (TREE_VALUE (mthrows))) continue; /* Checked expression must be compatible */ ! for (fthrows = DECL_FUNCTION_THROWS (found); fthrows; fthrows = TREE_CHAIN (fthrows)) if (inherits_from_p (TREE_VALUE (mthrows), TREE_VALUE (fthrows))) break; if (!fthrows) { ! parse_error_context (method_wfl, "Invalid checked exception class `%s' in `throws' clause. The exception must be a subclass of an exception thrown by `%s' from class `%s'", IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (TREE_VALUE (mthrows)))), lang_printable_name (found, 0), ! IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found))))); } } *************** java_check_abstract_methods (interface_d *** 6539,6549 **** { char *t; t = xstrdup (lang_printable_name (TREE_TYPE (TREE_TYPE (found)), 0)); ! parse_error_context (DECL_FUNCTION_WFL (found), "Method `%s' was defined with return type `%s' in class `%s'", lang_printable_name (found, 0), t, ! IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found))))); free (t); continue; --- 6580,6590 ---- { char *t; t = xstrdup (lang_printable_name (TREE_TYPE (TREE_TYPE (found)), 0)); ! parse_error_context (DECL_FUNCTION_WFL (found), "Method `%s' was defined with return type `%s' in class `%s'", lang_printable_name (found, 0), t, ! IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found))))); free (t); continue; *************** java_check_abstract_methods (interface_d *** 6561,6583 **** if (!vec_elt) continue; sub_interface = BINFO_TYPE (vec_elt); ! for (sub_interface_method = TYPE_METHODS (sub_interface); sub_interface_method; sub_interface_method = TREE_CHAIN (sub_interface_method)) { ! found = lookup_java_interface_method2 (interface, sub_interface_method); if (found && (found != sub_interface_method)) { ! parse_error_context (lookup_cl (sub_interface_method), "Interface `%s' inherits method `%s' from interface `%s'. This method is redefined with a different return type in interface `%s'", IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (interface))), lang_printable_name (found, 0), ! IDENTIFIER_POINTER ! (DECL_NAME (TYPE_NAME (DECL_CONTEXT (sub_interface_method)))), ! IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found))))); } } --- 6602,6624 ---- if (!vec_elt) continue; sub_interface = BINFO_TYPE (vec_elt); ! for (sub_interface_method = TYPE_METHODS (sub_interface); sub_interface_method; sub_interface_method = TREE_CHAIN (sub_interface_method)) { ! found = lookup_java_interface_method2 (interface, sub_interface_method); if (found && (found != sub_interface_method)) { ! parse_error_context (lookup_cl (sub_interface_method), "Interface `%s' inherits method `%s' from interface `%s'. This method is redefined with a different return type in interface `%s'", IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (interface))), lang_printable_name (found, 0), ! IDENTIFIER_POINTER ! (DECL_NAME (TYPE_NAME (DECL_CONTEXT (sub_interface_method)))), ! IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (DECL_CONTEXT (found))))); } } *************** lookup_java_interface_method2 (class, me *** 6602,6614 **** { tree vec_elt = TREE_VEC_ELT (basetype_vec, i), to_return; if ((BINFO_TYPE (vec_elt) != object_type_node) ! && (to_return = lookup_java_method2 (BINFO_TYPE (vec_elt), method_decl, 1))) return to_return; } for (i = 0; i < n; i++) { ! to_return = lookup_java_interface_method2 (BINFO_TYPE (TREE_VEC_ELT (basetype_vec, i)), method_decl); if (to_return) return to_return; --- 6643,6655 ---- { tree vec_elt = TREE_VEC_ELT (basetype_vec, i), to_return; if ((BINFO_TYPE (vec_elt) != object_type_node) ! && (to_return = lookup_java_method2 (BINFO_TYPE (vec_elt), method_decl, 1))) return to_return; } for (i = 0; i < n; i++) { ! to_return = lookup_java_interface_method2 (BINFO_TYPE (TREE_VEC_ELT (basetype_vec, i)), method_decl); if (to_return) return to_return; *************** lookup_java_method2 (clas, method_decl, *** 6629,6635 **** method_signature = build_java_argument_signature (TREE_TYPE (method_decl)); name = DECL_NAME (method_decl); ! method_name = (TREE_CODE (name) == EXPR_WITH_FILE_LOCATION ? EXPR_WFL_NODE (name) : name); method_type = TREE_TYPE (TREE_TYPE (method_decl)); --- 6670,6676 ---- method_signature = build_java_argument_signature (TREE_TYPE (method_decl)); name = DECL_NAME (method_decl); ! method_name = (TREE_CODE (name) == EXPR_WITH_FILE_LOCATION ? EXPR_WFL_NODE (name) : name); method_type = TREE_TYPE (TREE_TYPE (method_decl)); *************** lookup_java_method2 (clas, method_decl, *** 6642,6648 **** tree name = DECL_NAME (method); if ((TREE_CODE (name) == EXPR_WITH_FILE_LOCATION ? EXPR_WFL_NODE (name) : name) == method_name ! && method_sig == method_signature && TREE_TYPE (TREE_TYPE (method)) != method_type) return method; } --- 6683,6689 ---- tree name = DECL_NAME (method); if ((TREE_CODE (name) == EXPR_WITH_FILE_LOCATION ? EXPR_WFL_NODE (name) : name) == method_name ! && method_sig == method_signature && TREE_TYPE (TREE_TYPE (method)) != method_type) return method; } *************** lookup_java_method2 (clas, method_decl, *** 6654,6687 **** /* Return the line that matches DECL line number, and try its best to position the column number. Used during error reports. */ static tree lookup_cl (decl) tree decl; { - static tree cl = NULL_TREE; char *line, *found; ! if (!decl) return NULL_TREE; ! if (cl == NULL_TREE) { ! cl = build_expr_wfl (NULL_TREE, NULL, 0, 0); ! ggc_add_tree_root (&cl, 1); } ! EXPR_WFL_FILENAME_NODE (cl) = get_identifier (DECL_SOURCE_FILE (decl)); ! EXPR_WFL_SET_LINECOL (cl, DECL_SOURCE_LINE_FIRST (decl), -1); ! line = java_get_line_col (EXPR_WFL_FILENAME (cl), ! EXPR_WFL_LINENO (cl), EXPR_WFL_COLNO (cl)); ! found = strstr ((const char *)line, (const char *)IDENTIFIER_POINTER (DECL_NAME (decl))); if (found) ! EXPR_WFL_SET_LINECOL (cl, EXPR_WFL_LINENO (cl), found - line); ! return cl; } /* Look for a simple name in the single-type import list */ --- 6695,6727 ---- /* Return the line that matches DECL line number, and try its best to position the column number. Used during error reports. */ + static GTY(()) tree cl_v; static tree lookup_cl (decl) tree decl; { char *line, *found; ! if (!decl) return NULL_TREE; ! if (cl_v == NULL_TREE) { ! cl_v = build_expr_wfl (NULL_TREE, NULL, 0, 0); } ! EXPR_WFL_FILENAME_NODE (cl_v) = get_identifier (DECL_SOURCE_FILE (decl)); ! EXPR_WFL_SET_LINECOL (cl_v, DECL_SOURCE_LINE_FIRST (decl), -1); ! line = java_get_line_col (EXPR_WFL_FILENAME (cl_v), ! EXPR_WFL_LINENO (cl_v), EXPR_WFL_COLNO (cl_v)); ! found = strstr ((const char *)line, (const char *)IDENTIFIER_POINTER (DECL_NAME (decl))); if (found) ! EXPR_WFL_SET_LINECOL (cl_v, EXPR_WFL_LINENO (cl_v), found - line); ! return cl_v; } /* Look for a simple name in the single-type import list */ *************** process_imports () *** 6720,6726 **** /* Don't load twice something already defined. */ if (IDENTIFIER_CLASS_VALUE (to_be_found)) continue; ! while (1) { tree left; --- 6760,6766 ---- /* Don't load twice something already defined. */ if (IDENTIFIER_CLASS_VALUE (to_be_found)) continue; ! while (1) { tree left; *************** process_imports () *** 6729,6735 **** load_class (to_be_found, 0); error_found = check_pkg_class_access (to_be_found, TREE_PURPOSE (import), true); ! /* We found it, we can bail out */ if (IDENTIFIER_CLASS_VALUE (to_be_found)) break; --- 6769,6775 ---- load_class (to_be_found, 0); error_found = check_pkg_class_access (to_be_found, TREE_PURPOSE (import), true); ! /* We found it, we can bail out */ if (IDENTIFIER_CLASS_VALUE (to_be_found)) break; *************** find_in_imports (enclosing_type, class_t *** 6766,6772 **** tree enclosing_type; tree class_type; { ! tree import = (enclosing_type ? TYPE_IMPORT_LIST (enclosing_type) : ctxp->import_list); while (import) { --- 6806,6812 ---- tree enclosing_type; tree class_type; { ! tree import = (enclosing_type ? TYPE_IMPORT_LIST (enclosing_type) : ctxp->import_list); while (import) { *************** read_import_dir (wfl) *** 6854,6860 **** int current_entry_len = zipd->filename_length; if (current_entry_len >= BUFFER_LENGTH (filename) ! && strncmp (filename->data, current_entry, BUFFER_LENGTH (filename)) != 0) continue; found |= note_possible_classname (current_entry, --- 6894,6900 ---- int current_entry_len = zipd->filename_length; if (current_entry_len >= BUFFER_LENGTH (filename) ! && strncmp (filename->data, current_entry, BUFFER_LENGTH (filename)) != 0) continue; found |= note_possible_classname (current_entry, *************** read_import_dir (wfl) *** 6881,6887 **** *filename->ptr++ = '/'; for (;;) { ! int len; const char *d_name; struct dirent *direntp = readdir (dirp); if (!direntp) --- 6921,6927 ---- *filename->ptr++ = '/'; for (;;) { ! int len; const char *d_name; struct dirent *direntp = readdir (dirp); if (!direntp) *************** read_import_dir (wfl) *** 6923,6929 **** /* Possibly find a type in the import on demands specified types. Returns 1 if an error occurred, 0 otherwise. Run through the entire list, to detected potential double definitions. */ ! static int find_in_imports_on_demand (enclosing_type, class_type) tree enclosing_type; --- 6963,6969 ---- /* Possibly find a type in the import on demands specified types. Returns 1 if an error occurred, 0 otherwise. Run through the entire list, to detected potential double definitions. */ ! static int find_in_imports_on_demand (enclosing_type, class_type) tree enclosing_type; *************** find_in_imports_on_demand (enclosing_typ *** 6944,6958 **** const char *id_name; tree decl, type_name_copy; ! obstack_grow (&temporary_obstack, IDENTIFIER_POINTER (EXPR_WFL_NODE (TREE_PURPOSE (import))), IDENTIFIER_LENGTH (EXPR_WFL_NODE (TREE_PURPOSE (import)))); obstack_1grow (&temporary_obstack, '.'); ! obstack_grow0 (&temporary_obstack, IDENTIFIER_POINTER (class_type_name), IDENTIFIER_LENGTH (class_type_name)); id_name = obstack_finish (&temporary_obstack); ! if (! (node = maybe_get_identifier (id_name))) continue; --- 6984,6998 ---- const char *id_name; tree decl, type_name_copy; ! obstack_grow (&temporary_obstack, IDENTIFIER_POINTER (EXPR_WFL_NODE (TREE_PURPOSE (import))), IDENTIFIER_LENGTH (EXPR_WFL_NODE (TREE_PURPOSE (import)))); obstack_1grow (&temporary_obstack, '.'); ! obstack_grow0 (&temporary_obstack, IDENTIFIER_POINTER (class_type_name), IDENTIFIER_LENGTH (class_type_name)); id_name = obstack_finish (&temporary_obstack); ! if (! (node = maybe_get_identifier (id_name))) continue; *************** find_in_imports_on_demand (enclosing_typ *** 6990,6996 **** TYPE_NAME (class_type) = type_name_copy; continue; } ! /* If the loaded class is accessible, we keep a tab on it to detect and report multiple inclusions. */ if (IS_A_CLASSFILE_NAME (node)) --- 7030,7036 ---- TYPE_NAME (class_type) = type_name_copy; continue; } ! /* If the loaded class is accessible, we keep a tab on it to detect and report multiple inclusions. */ if (IS_A_CLASSFILE_NAME (node)) *************** find_in_imports_on_demand (enclosing_typ *** 7003,7015 **** else if (seen_once >= 0) { tree location = (cl ? cl : TREE_PURPOSE (import)); ! tree package = (cl ? EXPR_WFL_NODE (cl) : EXPR_WFL_NODE (TREE_PURPOSE (import))); seen_once++; ! parse_error_context (location, "Type `%s' also potentially defined in package `%s'", ! IDENTIFIER_POINTER (TYPE_NAME (class_type)), IDENTIFIER_POINTER (package)); } } --- 7043,7055 ---- else if (seen_once >= 0) { tree location = (cl ? cl : TREE_PURPOSE (import)); ! tree package = (cl ? EXPR_WFL_NODE (cl) : EXPR_WFL_NODE (TREE_PURPOSE (import))); seen_once++; ! parse_error_context (location, "Type `%s' also potentially defined in package `%s'", ! IDENTIFIER_POINTER (TYPE_NAME (class_type)), IDENTIFIER_POINTER (package)); } } *************** find_in_imports_on_demand (enclosing_typ *** 7022,7028 **** return (seen_once < 0 ? 0 : seen_once); /* It's ok not to have found */ } ! /* Add package NAME to the list of package encountered so far. To speed up class lookup in do_resolve_class, we make sure a particular package is added only once. */ --- 7062,7068 ---- return (seen_once < 0 ? 0 : seen_once); /* It's ok not to have found */ } ! /* Add package NAME to the list of packages encountered so far. To speed up class lookup in do_resolve_class, we make sure a particular package is added only once. */ *************** static void *** 7030,7048 **** register_package (name) tree name; { ! static struct hash_table _pht, *pht = NULL; ! if (!pht) ! { ! hash_table_init (&_pht, hash_newfunc, ! java_hash_hash_tree_node, java_hash_compare_tree_node); ! pht = &_pht; ! } ! ! if (!hash_lookup (pht, (const hash_table_key) name, FALSE, NULL)) { package_list = chainon (package_list, build_tree_list (name, NULL)); ! hash_lookup (pht, (const hash_table_key) name, TRUE, NULL); } } --- 7070,7086 ---- register_package (name) tree name; { ! static htab_t pht; ! PTR *e; ! if (pht == NULL) ! pht = htab_create (50, htab_hash_pointer, htab_eq_pointer, NULL); ! ! e = htab_find_slot (pht, name, INSERT); ! if (*e == NULL) { package_list = chainon (package_list, build_tree_list (name, NULL)); ! *e = name; } } *************** resolve_package (pkg, next, type_name) *** 7062,7075 **** /* Try to progressively construct a type name */ if (TREE_CODE (pkg) == EXPR_WITH_FILE_LOCATION) ! for (current = EXPR_WFL_QUALIFICATION (pkg); current; current = TREE_CHAIN (current)) { /* If we don't have what we're expecting, exit now. TYPE_NAME will be null and the error caught later. */ if (TREE_CODE (QUAL_WFL (current)) != EXPR_WITH_FILE_LOCATION) break; ! *type_name = merge_qualified_name (*type_name, EXPR_WFL_NODE (QUAL_WFL (current))); if ((decl = resolve_no_layout (*type_name, NULL_TREE))) { --- 7100,7113 ---- /* Try to progressively construct a type name */ if (TREE_CODE (pkg) == EXPR_WITH_FILE_LOCATION) ! for (current = EXPR_WFL_QUALIFICATION (pkg); current; current = TREE_CHAIN (current)) { /* If we don't have what we're expecting, exit now. TYPE_NAME will be null and the error caught later. */ if (TREE_CODE (QUAL_WFL (current)) != EXPR_WITH_FILE_LOCATION) break; ! *type_name = merge_qualified_name (*type_name, EXPR_WFL_NODE (QUAL_WFL (current))); if ((decl = resolve_no_layout (*type_name, NULL_TREE))) { *************** resolve_package (pkg, next, type_name) *** 7084,7090 **** } ! /* Check accessibility of inner classes according to member access rules. DECL is the inner class, ENCLOSING_DECL is the class from which the access is being attempted. */ --- 7122,7128 ---- } ! /* Check accessibility of inner classes according to member access rules. DECL is the inner class, ENCLOSING_DECL is the class from which the access is being attempted. */ *************** check_inner_class_access (decl, enclosin *** 7111,7121 **** class in which DECL is declared. */ tree top_level = decl; while (DECL_CONTEXT (top_level)) ! top_level = DECL_CONTEXT (top_level); while (DECL_CONTEXT (enclosing_decl)) enclosing_decl = DECL_CONTEXT (enclosing_decl); if (top_level == enclosing_decl) ! return; access = "private"; } else if (CLASS_PROTECTED (decl)) --- 7149,7159 ---- class in which DECL is declared. */ tree top_level = decl; while (DECL_CONTEXT (top_level)) ! top_level = DECL_CONTEXT (top_level); while (DECL_CONTEXT (enclosing_decl)) enclosing_decl = DECL_CONTEXT (enclosing_decl); if (top_level == enclosing_decl) ! return; access = "private"; } else if (CLASS_PROTECTED (decl)) *************** check_inner_class_access (decl, enclosin *** 7124,7130 **** /* Access is permitted from within the same package... */ if (in_same_package (decl, enclosing_decl)) return; ! /* ... or from within the body of a subtype of the context in which DECL is declared. */ decl_context = DECL_CONTEXT (decl); --- 7162,7168 ---- /* Access is permitted from within the same package... */ if (in_same_package (decl, enclosing_decl)) return; ! /* ... or from within the body of a subtype of the context in which DECL is declared. */ decl_context = DECL_CONTEXT (decl); *************** check_inner_class_access (decl, enclosin *** 7132,7150 **** { if (CLASS_INTERFACE (decl)) { ! if (interface_of_p (TREE_TYPE (decl_context), enclosing_decl_type)) return; } else { /* Eww. The order of the arguments is different!! */ ! if (inherits_from_p (enclosing_decl_type, TREE_TYPE (decl_context))) return; } enclosing_decl = DECL_CONTEXT (enclosing_decl); ! } access = "protected"; } else if (! CLASS_PUBLIC (decl)) --- 7170,7188 ---- { if (CLASS_INTERFACE (decl)) { ! if (interface_of_p (TREE_TYPE (decl_context), enclosing_decl_type)) return; } else { /* Eww. The order of the arguments is different!! */ ! if (inherits_from_p (enclosing_decl_type, TREE_TYPE (decl_context))) return; } enclosing_decl = DECL_CONTEXT (enclosing_decl); ! } access = "protected"; } else if (! CLASS_PUBLIC (decl)) *************** check_pkg_class_access (class_name, cl, *** 7196,7202 **** return 0; if (verbose) ! parse_error_context (cl, "Can't access %s `%s'. Only public classes and interfaces in other packages can be accessed", (CLASS_INTERFACE (TYPE_NAME (type)) ? "interface" : "class"), IDENTIFIER_POINTER (class_name)); --- 7234,7240 ---- return 0; if (verbose) ! parse_error_context (cl, "Can't access %s `%s'. Only public classes and interfaces in other packages can be accessed", (CLASS_INTERFACE (TYPE_NAME (type)) ? "interface" : "class"), IDENTIFIER_POINTER (class_name)); *************** declare_local_variables (modifier, type, *** 7228,7241 **** if (modifier) { ! int i; ! for (i = 0; i <= 10; i++) if (1 << i & modifier) break; if (modifier == ACC_FINAL) final_p = 1; ! else { ! parse_error_context ! (ctxp->modifier_ctx [i], "Only `final' is allowed as a local variables modifier"); return; } --- 7266,7281 ---- if (modifier) { ! size_t i; ! for (i = 0; i < ARRAY_SIZE (ctxp->modifier_ctx); i++) ! if (1 << i & modifier) ! break; if (modifier == ACC_FINAL) final_p = 1; ! else { ! parse_error_context ! (ctxp->modifier_ctx [i], "Only `final' is allowed as a local variables modifier"); return; } *************** declare_local_variables (modifier, type, *** 7281,7296 **** MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC (decl); DECL_FINAL (decl) = final_p; BLOCK_CHAIN_DECL (decl); ! /* If doing xreferencing, replace the line number with the WFL compound value */ if (flag_emit_xref) DECL_SOURCE_LINE (decl) = EXPR_WFL_LINECOL (wfl); ! /* Don't try to use an INIT statement when an error was found */ if (init && java_error_count) init = NULL_TREE; ! /* Add the initialization function to the current function's code */ if (init) { --- 7321,7336 ---- MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC (decl); DECL_FINAL (decl) = final_p; BLOCK_CHAIN_DECL (decl); ! /* If doing xreferencing, replace the line number with the WFL compound value */ if (flag_emit_xref) DECL_SOURCE_LINE (decl) = EXPR_WFL_LINECOL (wfl); ! /* Don't try to use an INIT statement when an error was found */ if (init && java_error_count) init = NULL_TREE; ! /* Add the initialization function to the current function's code */ if (init) { *************** declare_local_variables (modifier, type, *** 7301,7307 **** build_debugable_stmt (EXPR_WFL_LINECOL (init), init)); } ! /* Setup dependency the type of the decl */ if (must_chain) { --- 7341,7347 ---- build_debugable_stmt (EXPR_WFL_LINECOL (init), init)); } ! /* Setup dependency the type of the decl */ if (must_chain) { *************** source_start_java_method (fndecl) *** 7336,7342 **** { tree type = TREE_VALUE (tem); tree name = TREE_PURPOSE (tem); ! /* If type is incomplete. Create an incomplete decl and ask for the decl to be patched later */ if (INCOMPLETE_TYPE_P (type)) --- 7376,7382 ---- { tree type = TREE_VALUE (tem); tree name = TREE_PURPOSE (tem); ! /* If type is incomplete. Create an incomplete decl and ask for the decl to be patched later */ if (INCOMPLETE_TYPE_P (type)) *************** create_artificial_method (class, flags, *** 7381,7393 **** tree mdecl; java_parser_context_save_global (); ! lineno = 0; ! mdecl = make_node (FUNCTION_TYPE); TREE_TYPE (mdecl) = type; TYPE_ARG_TYPES (mdecl) = args; ! mdecl = add_method (class, flags, name, build_java_signature (mdecl)); java_parser_context_restore_global (); ! DECL_ARTIFICIAL (mdecl) = 1; return mdecl; } --- 7421,7433 ---- tree mdecl; java_parser_context_save_global (); ! lineno = 0; ! mdecl = make_node (FUNCTION_TYPE); TREE_TYPE (mdecl) = type; TYPE_ARG_TYPES (mdecl) = args; ! mdecl = add_method (class, flags, name, build_java_signature (mdecl)); java_parser_context_restore_global (); ! DECL_ARTIFICIAL (mdecl) = 1; return mdecl; } *************** dump_java_tree (phase, t) *** 7426,7431 **** --- 7466,7472 ---- int flags; stream = dump_begin (phase, &flags); + flags |= TDF_SLIM; if (stream) { dump_node (t, flags, stream); *************** source_end_java_method () *** 7456,7461 **** --- 7497,7504 ---- patched. Dump it to a file if the user requested it. */ dump_java_tree (TDI_original, fndecl); + java_optimize_inline (fndecl); + /* Generate function's code */ if (BLOCK_EXPR_BODY (DECL_FUNCTION_BODY (fndecl)) && ! flag_emit_class_files *************** add_stmt_to_block (b, type, stmt) *** 7500,7509 **** tree b, type, stmt; { tree body = BLOCK_EXPR_BODY (b), c; ! if (java_error_count) return body; ! if ((c = add_stmt_to_compound (body, type, stmt)) == body) return body; --- 7543,7552 ---- tree b, type, stmt; { tree body = BLOCK_EXPR_BODY (b), c; ! if (java_error_count) return body; ! if ((c = add_stmt_to_compound (body, type, stmt)) == body) return body; *************** static tree *** 7519,7524 **** --- 7562,7571 ---- add_stmt_to_compound (existing, type, stmt) tree existing, type, stmt; { + /* Keep track of this for inlining. */ + if (current_function_decl) + ++DECL_NUM_STMTS (current_function_decl); + if (existing) return build (COMPOUND_EXPR, type, existing, stmt); else *************** void java_layout_seen_class_methods () *** 7533,7542 **** while (1) { ! for (current = previous_list; current != end; current = TREE_CHAIN (current)) layout_class_methods (TREE_TYPE (TREE_VALUE (current))); ! if (previous_list != all_class_list) { end = previous_list; --- 7580,7589 ---- while (1) { ! for (current = previous_list; current != end; current = TREE_CHAIN (current)) layout_class_methods (TREE_TYPE (TREE_VALUE (current))); ! if (previous_list != all_class_list) { end = previous_list; *************** void java_layout_seen_class_methods () *** 7547,7566 **** } } void java_reorder_fields () { - static tree stop_reordering = NULL_TREE; - static int initialized_p; tree current; - /* Register STOP_REORDERING with the garbage collector. */ - if (!initialized_p) - { - ggc_add_tree_root (&stop_reordering, 1); - initialized_p = 1; - } - for (current = gclass_list; current; current = TREE_CHAIN (current)) { current_class = TREE_TYPE (TREE_VALUE (current)); --- 7594,7605 ---- } } + static GTY(()) tree stop_reordering; void java_reorder_fields () { tree current; for (current = gclass_list; current; current = TREE_CHAIN (current)) { current_class = TREE_TYPE (TREE_VALUE (current)); *************** java_reorder_fields () *** 7585,7591 **** after having reversed the fields */ else { ! TYPE_FIELDS (current_class) = nreverse (TYPE_FIELDS (current_class)); TYPE_SIZE (current_class) = NULL_TREE; } --- 7624,7630 ---- after having reversed the fields */ else { ! TYPE_FIELDS (current_class) = nreverse (TYPE_FIELDS (current_class)); TYPE_SIZE (current_class) = NULL_TREE; } *************** java_complete_expand_methods (class_decl *** 7715,7721 **** if (!DECL_CONSTRUCTOR_P (decl)) continue; ! no_body = !DECL_FUNCTION_BODY (decl); /* Don't generate debug info on line zero when expanding a generated constructor. */ --- 7754,7760 ---- if (!DECL_CONSTRUCTOR_P (decl)) continue; ! no_body = !DECL_FUNCTION_BODY (decl); /* Don't generate debug info on line zero when expanding a generated constructor. */ *************** java_complete_expand_methods (class_decl *** 7734,7740 **** /* Ctors aren't part of this batch. */ if (DECL_CONSTRUCTOR_P (decl) || DECL_CLINIT_P (decl)) continue; ! /* Skip abstract or native methods -- but do handle native methods when generating JNI stubs. */ if (METHOD_ABSTRACT (decl) || (! flag_jni && METHOD_NATIVE (decl))) --- 7773,7779 ---- /* Ctors aren't part of this batch. */ if (DECL_CONSTRUCTOR_P (decl) || DECL_CLINIT_P (decl)) continue; ! /* Skip abstract or native methods -- but do handle native methods when generating JNI stubs. */ if (METHOD_ABSTRACT (decl) || (! flag_jni && METHOD_NATIVE (decl))) *************** java_complete_expand_methods (class_decl *** 7762,7768 **** java_complete_expand_method (clinit); ctxp->explicit_constructor_p = 0; } ! /* We might have generated a class$ that we now want to expand */ if (TYPE_DOT_CLASS (current_class)) java_complete_expand_method (TYPE_DOT_CLASS (current_class)); --- 7801,7807 ---- java_complete_expand_method (clinit); ctxp->explicit_constructor_p = 0; } ! /* We might have generated a class$ that we now want to expand */ if (TYPE_DOT_CLASS (current_class)) java_complete_expand_method (TYPE_DOT_CLASS (current_class)); *************** java_complete_expand_methods (class_decl *** 7771,7777 **** prove wrong.) */ if (!CLASS_INTERFACE (class_decl)) for (decl = TYPE_METHODS (current_class); decl; decl = TREE_CHAIN (decl)) ! if (DECL_CONSTRUCTOR_P (decl) && verify_constructor_circularity (decl, decl)) break; --- 7810,7816 ---- prove wrong.) */ if (!CLASS_INTERFACE (class_decl)) for (decl = TYPE_METHODS (current_class); decl; decl = TREE_CHAIN (decl)) ! if (DECL_CONSTRUCTOR_P (decl) && verify_constructor_circularity (decl, decl)) break; *************** maybe_generate_pre_expand_clinit (class_ *** 7792,7798 **** return NULL_TREE; /* Go through all static fields and pre expand them */ ! for (current = TYPE_FIELDS (class_type); current; current = TREE_CHAIN (current)) if (FIELD_STATIC (current)) build_field_ref (NULL_TREE, class_type, DECL_NAME (current)); --- 7831,7837 ---- return NULL_TREE; /* Go through all static fields and pre expand them */ ! for (current = TYPE_FIELDS (class_type); current; current = TREE_CHAIN (current)) if (FIELD_STATIC (current)) build_field_ref (NULL_TREE, class_type, DECL_NAME (current)); *************** analyze_clinit_body (this_class, bbody) *** 7852,7868 **** case BLOCK: bbody = BLOCK_EXPR_BODY (bbody); break; ! case EXPR_WITH_FILE_LOCATION: bbody = EXPR_WFL_NODE (bbody); break; ! case COMPOUND_EXPR: if (analyze_clinit_body (this_class, TREE_OPERAND (bbody, 0))) return 1; bbody = TREE_OPERAND (bbody, 1); break; ! case MODIFY_EXPR: /* If we're generating to class file and we're dealing with an array initialization, we return 1 to keep */ --- 7891,7907 ---- case BLOCK: bbody = BLOCK_EXPR_BODY (bbody); break; ! case EXPR_WITH_FILE_LOCATION: bbody = EXPR_WFL_NODE (bbody); break; ! case COMPOUND_EXPR: if (analyze_clinit_body (this_class, TREE_OPERAND (bbody, 0))) return 1; bbody = TREE_OPERAND (bbody, 1); break; ! case MODIFY_EXPR: /* If we're generating to class file and we're dealing with an array initialization, we return 1 to keep */ *************** maybe_yank_clinit (mdecl) *** 7897,7903 **** { tree type, current; tree fbody, bbody; ! if (!DECL_CLINIT_P (mdecl)) return 0; --- 7936,7942 ---- { tree type, current; tree fbody, bbody; ! if (!DECL_CLINIT_P (mdecl)) return 0; *************** maybe_yank_clinit (mdecl) *** 7916,7922 **** type = DECL_CONTEXT (mdecl); current = TYPE_FIELDS (type); ! for (current = (current ? TREE_CHAIN (current) : current); current; current = TREE_CHAIN (current)) { tree f_init; --- 7955,7961 ---- type = DECL_CONTEXT (mdecl); current = TYPE_FIELDS (type); ! for (current = (current ? TREE_CHAIN (current) : current); current; current = TREE_CHAIN (current)) { tree f_init; *************** maybe_yank_clinit (mdecl) *** 7951,7957 **** if (TYPE_METHODS (type) == mdecl) TYPE_METHODS (type) = TREE_CHAIN (mdecl); else ! for (current = TYPE_METHODS (type); current; current = TREE_CHAIN (current)) if (TREE_CHAIN (current) == mdecl) { --- 7990,7996 ---- if (TYPE_METHODS (type) == mdecl) TYPE_METHODS (type) = TREE_CHAIN (mdecl); else ! for (current = TYPE_METHODS (type); current; current = TREE_CHAIN (current)) if (TREE_CHAIN (current) == mdecl) { *************** start_complete_expand_method (mdecl) *** 7977,7983 **** for (; tem; tem = TREE_CHAIN (tem)) { ! /* TREE_CHAIN (tem) will change after pushdecl. */ tree next = TREE_CHAIN (tem); tree type = TREE_TYPE (tem); if (PROMOTE_PROTOTYPES --- 8016,8022 ---- for (; tem; tem = TREE_CHAIN (tem)) { ! /* TREE_CHAIN (tem) will change after pushdecl. */ tree next = TREE_CHAIN (tem); tree type = TREE_TYPE (tem); if (PROMOTE_PROTOTYPES *************** java_complete_expand_method (mdecl) *** 8009,8015 **** /* Fix constructors before expanding them */ if (DECL_CONSTRUCTOR_P (mdecl)) fix_constructors (mdecl); ! /* Expand functions that have a body */ if (!DECL_FUNCTION_BODY (mdecl)) return; --- 8048,8054 ---- /* Fix constructors before expanding them */ if (DECL_CONSTRUCTOR_P (mdecl)) fix_constructors (mdecl); ! /* Expand functions that have a body */ if (!DECL_FUNCTION_BODY (mdecl)) return; *************** java_complete_expand_method (mdecl) *** 8026,8060 **** announce_function (mdecl); if (! quiet_flag) fprintf (stderr, "]"); ! /* Prepare the function for tree completion */ start_complete_expand_method (mdecl); /* Install the current this */ ! current_this = (!METHOD_STATIC (mdecl) ? BLOCK_EXPR_DECLS (DECL_FUNCTION_BODY (mdecl)) : NULL_TREE); /* Purge the `throws' list of unchecked exceptions (we save a copy of the list and re-install it later.) */ exception_copy = copy_list (DECL_FUNCTION_THROWS (mdecl)); purge_unchecked_exceptions (mdecl); ! /* Install exceptions thrown with `throws' */ PUSH_EXCEPTIONS (DECL_FUNCTION_THROWS (mdecl)); ! if (block_body != NULL_TREE) { block_body = java_complete_tree (block_body); ! /* Before we check initialization, attached all class initialization variable to the block_body */ ! hash_traverse (&DECL_FUNCTION_INIT_TEST_TABLE (mdecl), attach_init_test_initialization_flags, block_body); ! if (! flag_emit_xref && ! METHOD_NATIVE (mdecl)) { check_for_initialization (block_body, mdecl); ! /* Go through all the flags marking the initialization of static variables and see whether they're definitively assigned, in which case the type is remembered as --- 8065,8099 ---- announce_function (mdecl); if (! quiet_flag) fprintf (stderr, "]"); ! /* Prepare the function for tree completion */ start_complete_expand_method (mdecl); /* Install the current this */ ! current_this = (!METHOD_STATIC (mdecl) ? BLOCK_EXPR_DECLS (DECL_FUNCTION_BODY (mdecl)) : NULL_TREE); /* Purge the `throws' list of unchecked exceptions (we save a copy of the list and re-install it later.) */ exception_copy = copy_list (DECL_FUNCTION_THROWS (mdecl)); purge_unchecked_exceptions (mdecl); ! /* Install exceptions thrown with `throws' */ PUSH_EXCEPTIONS (DECL_FUNCTION_THROWS (mdecl)); ! if (block_body != NULL_TREE) { block_body = java_complete_tree (block_body); ! /* Before we check initialization, attached all class initialization variable to the block_body */ ! htab_traverse (DECL_FUNCTION_INIT_TEST_TABLE (mdecl), attach_init_test_initialization_flags, block_body); ! if (! flag_emit_xref && ! METHOD_NATIVE (mdecl)) { check_for_initialization (block_body, mdecl); ! /* Go through all the flags marking the initialization of static variables and see whether they're definitively assigned, in which case the type is remembered as *************** java_complete_expand_method (mdecl) *** 8065,8080 **** MDECL. This used with caution helps removing extra initialization of self. */ if (METHOD_STATIC (mdecl)) ! hash_lookup (&DECL_FUNCTION_INITIALIZED_CLASS_TABLE (mdecl), ! (hash_table_key) DECL_CONTEXT (mdecl), ! TRUE, NULL); } } ctxp->explicit_constructor_p = 0; } ! BLOCK_EXPR_BODY (fbody) = block_body; ! /* If we saw a return but couldn't evaluate it properly, we'll have an error_mark_node here. */ if (block_body != error_mark_node --- 8104,8121 ---- MDECL. This used with caution helps removing extra initialization of self. */ if (METHOD_STATIC (mdecl)) ! { ! *(htab_find_slot ! (DECL_FUNCTION_INITIALIZED_CLASS_TABLE (mdecl), ! DECL_CONTEXT (mdecl), INSERT)) = DECL_CONTEXT (mdecl); ! } } } ctxp->explicit_constructor_p = 0; } ! BLOCK_EXPR_BODY (fbody) = block_body; ! /* If we saw a return but couldn't evaluate it properly, we'll have an error_mark_node here. */ if (block_body != error_mark_node *************** java_expand_method_bodies (class) *** 8114,8119 **** --- 8155,8165 ---- current_function_decl = decl; + /* Save the function for inlining. */ + if (flag_inline_trees) + DECL_SAVED_TREE (decl) = + BLOCK_EXPR_BODY (DECL_FUNCTION_BODY (decl)); + /* It's time to assign the variable flagging static class initialization based on which classes invoked static methods are definitely initializing. This should be flagged. */ *************** java_expand_method_bodies (class) *** 8135,8141 **** /* For each class definitely initialized in CALLED_METHOD, fill ASSIGNMENT_COMPOUND with assignment to the class initialization flag. */ ! hash_traverse (&DECL_FUNCTION_INITIALIZED_CLASS_TABLE (called_method), emit_test_initialization, assignment_compound_list); --- 8181,8187 ---- /* For each class definitely initialized in CALLED_METHOD, fill ASSIGNMENT_COMPOUND with assignment to the class initialization flag. */ ! htab_traverse (DECL_FUNCTION_INITIALIZED_CLASS_TABLE (called_method), emit_test_initialization, assignment_compound_list); *************** java_expand_method_bodies (class) *** 8145,8151 **** } } ! /* Prepare the function for RTL expansion */ start_complete_expand_method (decl); /* Expand function start, generate initialization flag --- 8191,8197 ---- } } ! /* Prepare the function for RTL expansion */ start_complete_expand_method (decl); /* Expand function start, generate initialization flag *************** build_outer_field_access (id, decl) *** 8186,8192 **** && (!FIELD_PRIVATE (decl) || !flag_emit_class_files )) { tree thisn = build_current_thisn (current_class); ! access = make_qualified_primary (build_wfl_node (thisn), id, EXPR_WFL_LINECOL (id)); } /* Otherwise, generate access methods to outer this and access the --- 8232,8238 ---- && (!FIELD_PRIVATE (decl) || !flag_emit_class_files )) { tree thisn = build_current_thisn (current_class); ! access = make_qualified_primary (build_wfl_node (thisn), id, EXPR_WFL_LINECOL (id)); } /* Otherwise, generate access methods to outer this and access the *************** build_outer_field_access (id, decl) *** 8217,8234 **** return resolve_expression_name (access, NULL); } ! /* Return a non zero value if NODE describes an outer field inner access. */ static int outer_field_access_p (type, decl) tree type, decl; { ! if (!INNER_CLASS_TYPE_P (type) || TREE_CODE (decl) != FIELD_DECL || DECL_CONTEXT (decl) == type) return 0; ! /* If the inner class extends the declaration context of the field we're try to acces, then this isn't an outer field access */ if (inherits_from_p (type, DECL_CONTEXT (decl))) --- 8263,8280 ---- return resolve_expression_name (access, NULL); } ! /* Return a nonzero value if NODE describes an outer field inner access. */ static int outer_field_access_p (type, decl) tree type, decl; { ! if (!INNER_CLASS_TYPE_P (type) || TREE_CODE (decl) != FIELD_DECL || DECL_CONTEXT (decl) == type) return 0; ! /* If the inner class extends the declaration context of the field we're try to acces, then this isn't an outer field access */ if (inherits_from_p (type, DECL_CONTEXT (decl))) *************** outer_field_access_p (type, decl) *** 8253,8259 **** return 0; } ! /* Return a non zero value if NODE represents an outer field inner access that was been already expanded. As a side effect, it returns the name of the field being accessed and the argument passed to the access function, suitable for a regeneration of the access method --- 8299,8305 ---- return 0; } ! /* Return a nonzero value if NODE represents an outer field inner access that was been already expanded. As a side effect, it returns the name of the field being accessed and the argument passed to the access function, suitable for a regeneration of the access method *************** outer_field_expanded_access_p (node, nam *** 8271,8291 **** /* Well, gcj generates slightly different tree nodes when compiling to native or bytecodes. It's the case for function calls. */ ! if (flag_emit_class_files && TREE_CODE (node) == CALL_EXPR && OUTER_FIELD_ACCESS_IDENTIFIER_P (DECL_NAME (TREE_OPERAND (node, 0)))) identified = 1; else if (!flag_emit_class_files) { node = TREE_OPERAND (node, 0); ! if (node && TREE_OPERAND (node, 0) && TREE_CODE (TREE_OPERAND (node, 0)) == ADDR_EXPR) { node = TREE_OPERAND (node, 0); if (TREE_OPERAND (node, 0) && TREE_CODE (TREE_OPERAND (node, 0)) == FUNCTION_DECL ! && (OUTER_FIELD_ACCESS_IDENTIFIER_P (DECL_NAME (TREE_OPERAND (node, 0))))) identified = 1; } --- 8317,8337 ---- /* Well, gcj generates slightly different tree nodes when compiling to native or bytecodes. It's the case for function calls. */ ! if (flag_emit_class_files && TREE_CODE (node) == CALL_EXPR && OUTER_FIELD_ACCESS_IDENTIFIER_P (DECL_NAME (TREE_OPERAND (node, 0)))) identified = 1; else if (!flag_emit_class_files) { node = TREE_OPERAND (node, 0); ! if (node && TREE_OPERAND (node, 0) && TREE_CODE (TREE_OPERAND (node, 0)) == ADDR_EXPR) { node = TREE_OPERAND (node, 0); if (TREE_OPERAND (node, 0) && TREE_CODE (TREE_OPERAND (node, 0)) == FUNCTION_DECL ! && (OUTER_FIELD_ACCESS_IDENTIFIER_P (DECL_NAME (TREE_OPERAND (node, 0))))) identified = 1; } *************** outer_field_access_fix (wfl, node, rhs) *** 8311,8320 **** tree wfl, node, rhs; { tree name, arg_type, arg; ! if (outer_field_expanded_access_p (node, &name, &arg_type, &arg)) { ! node = build_outer_field_access_expr (EXPR_WFL_LINECOL (wfl), arg_type, name, arg, rhs); return java_complete_tree (node); } --- 8357,8366 ---- tree wfl, node, rhs; { tree name, arg_type, arg; ! if (outer_field_expanded_access_p (node, &name, &arg_type, &arg)) { ! node = build_outer_field_access_expr (EXPR_WFL_LINECOL (wfl), arg_type, name, arg, rhs); return java_complete_tree (node); } *************** outer_field_access_fix (wfl, node, rhs) *** 8322,8328 **** } /* Construct the expression that calls an access method: ! .access$( [, ]); ARG2 can be NULL and will be omitted in that case. It will denote a read access. */ --- 8368,8374 ---- } /* Construct the expression that calls an access method: ! .access$( [, ]); ARG2 can be NULL and will be omitted in that case. It will denote a read access. */ *************** build_outer_field_access_expr (lc, type, *** 8334,8340 **** { tree args, cn, access; ! args = arg1 ? arg1 : build_wfl_node (build_current_thisn (current_class)); args = build_tree_list (NULL_TREE, args); --- 8380,8386 ---- { tree args, cn, access; ! args = arg1 ? arg1 : build_wfl_node (build_current_thisn (current_class)); args = build_tree_list (NULL_TREE, args); *************** build_outer_field_access_methods (decl) *** 8375,8386 **** tree decl; { tree id, args, stmt, mdecl; ! if (FIELD_INNER_ACCESS_P (decl)) return FIELD_INNER_ACCESS (decl); MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC (decl); ! /* Create the identifier and a function named after it. */ id = build_new_access_id (); --- 8421,8432 ---- tree decl; { tree id, args, stmt, mdecl; ! if (FIELD_INNER_ACCESS_P (decl)) return FIELD_INNER_ACCESS (decl); MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC (decl); ! /* Create the identifier and a function named after it. */ id = build_new_access_id (); *************** build_outer_field_access_methods (decl) *** 8394,8407 **** stmt = make_qualified_primary (build_wfl_node (inst_id), build_wfl_node (DECL_NAME (decl)), 0); stmt = build_return (0, stmt); ! mdecl = build_outer_field_access_method (DECL_CONTEXT (decl), TREE_TYPE (decl), id, args, stmt); DECL_FUNCTION_ACCESS_DECL (mdecl) = decl; /* Create the write access method. No write access for final variable */ if (!FIELD_FINAL (decl)) { ! args = build_tree_list (inst_id, build_pointer_type (DECL_CONTEXT (decl))); TREE_CHAIN (args) = build_tree_list (wpv_id, TREE_TYPE (decl)); TREE_CHAIN (TREE_CHAIN (args)) = end_params_node; --- 8440,8453 ---- stmt = make_qualified_primary (build_wfl_node (inst_id), build_wfl_node (DECL_NAME (decl)), 0); stmt = build_return (0, stmt); ! mdecl = build_outer_field_access_method (DECL_CONTEXT (decl), TREE_TYPE (decl), id, args, stmt); DECL_FUNCTION_ACCESS_DECL (mdecl) = decl; /* Create the write access method. No write access for final variable */ if (!FIELD_FINAL (decl)) { ! args = build_tree_list (inst_id, build_pointer_type (DECL_CONTEXT (decl))); TREE_CHAIN (args) = build_tree_list (wpv_id, TREE_TYPE (decl)); TREE_CHAIN (TREE_CHAIN (args)) = end_params_node; *************** build_outer_field_access_methods (decl) *** 8409,8416 **** build_wfl_node (DECL_NAME (decl)), 0); stmt = build_return (0, build_assignment (ASSIGN_TK, 0, stmt, build_wfl_node (wpv_id))); ! mdecl = build_outer_field_access_method (DECL_CONTEXT (decl), ! TREE_TYPE (decl), id, args, stmt); } DECL_FUNCTION_ACCESS_DECL (mdecl) = decl; --- 8455,8462 ---- build_wfl_node (DECL_NAME (decl)), 0); stmt = build_return (0, build_assignment (ASSIGN_TK, 0, stmt, build_wfl_node (wpv_id))); ! mdecl = build_outer_field_access_method (DECL_CONTEXT (decl), ! TREE_TYPE (decl), id, args, stmt); } DECL_FUNCTION_ACCESS_DECL (mdecl) = decl; *************** build_outer_field_access_methods (decl) *** 8421,8427 **** /* Build an field access method NAME. */ ! static tree build_outer_field_access_method (class, type, name, args, body) tree class, type, name, args, body; { --- 8467,8473 ---- /* Build an field access method NAME. */ ! static tree build_outer_field_access_method (class, type, name, args, body) tree class, type, name, args, body; { *************** build_outer_method_access_method (decl) *** 8472,8488 **** carg = TYPE_ARG_TYPES (TREE_TYPE (decl)); /* Create the arguments, as much as the original */ ! for (; carg && carg != end_params_node; carg = TREE_CHAIN (carg)) { sprintf (buffer, "write_parm_value$%d", parm_id_count++); ! args = chainon (args, build_tree_list (get_identifier (buffer), TREE_VALUE (carg))); } args = chainon (args, end_params_node); /* Create the method */ ! mdecl = create_artificial_method (class, ACC_STATIC, TREE_TYPE (TREE_TYPE (decl)), id, args); layout_class_method (class, NULL_TREE, mdecl, NULL_TREE); /* There is a potential bug here. We should be able to use --- 8518,8534 ---- carg = TYPE_ARG_TYPES (TREE_TYPE (decl)); /* Create the arguments, as much as the original */ ! for (; carg && carg != end_params_node; carg = TREE_CHAIN (carg)) { sprintf (buffer, "write_parm_value$%d", parm_id_count++); ! args = chainon (args, build_tree_list (get_identifier (buffer), TREE_VALUE (carg))); } args = chainon (args, end_params_node); /* Create the method */ ! mdecl = create_artificial_method (class, ACC_STATIC, TREE_TYPE (TREE_TYPE (decl)), id, args); layout_class_method (class, NULL_TREE, mdecl, NULL_TREE); /* There is a potential bug here. We should be able to use *************** build_outer_method_access_method (decl) *** 8506,8515 **** call_args = tree_cons (NULL_TREE, build_wfl_node (TREE_PURPOSE (carg)), call_args); ! body = build_method_invocation (build_wfl_node (DECL_NAME (decl)), call_args); if (!METHOD_STATIC (decl)) ! body = make_qualified_primary (build_wfl_node (TREE_PURPOSE (args)), body, 0); if (TREE_TYPE (TREE_TYPE (decl)) != void_type_node) body = build_return (0, body); --- 8552,8561 ---- call_args = tree_cons (NULL_TREE, build_wfl_node (TREE_PURPOSE (carg)), call_args); ! body = build_method_invocation (build_wfl_node (DECL_NAME (decl)), call_args); if (!METHOD_STATIC (decl)) ! body = make_qualified_primary (build_wfl_node (TREE_PURPOSE (args)), body, 0); if (TREE_TYPE (TREE_TYPE (decl)) != void_type_node) body = build_return (0, body); *************** build_outer_method_access_method (decl) *** 8529,8535 **** the enclosing instance of an inner class. The enclosing instance is kept in a generated field called this$, with being the inner class nesting level (starting from 0.) */ ! /* Build an access to a given this$, always chaining access call to others. Access methods to this$ are build on the fly if necessary. This CAN'T be used to solely access this$ from --- 8575,8581 ---- the enclosing instance of an inner class. The enclosing instance is kept in a generated field called this$, with being the inner class nesting level (starting from 0.) */ ! /* Build an access to a given this$, always chaining access call to others. Access methods to this$ are build on the fly if necessary. This CAN'T be used to solely access this$ from *************** build_access_to_thisn (from, to, lc) *** 8575,8581 **** /* Build an access function to the this$ local to TYPE. NULL_TREE is returned if nothing needs to be generated. Otherwise, the method ! generated and a method decl is returned. NOTE: These generated methods should be declared in a class file attribute so that they can't be referred to directly. */ --- 8621,8627 ---- /* Build an access function to the this$ local to TYPE. NULL_TREE is returned if nothing needs to be generated. Otherwise, the method ! generated and a method decl is returned. NOTE: These generated methods should be declared in a class file attribute so that they can't be referred to directly. */ *************** maybe_build_thisn_access_method (type) *** 8603,8609 **** fix_method_argument_names (args, mdecl); layout_class_method (type, NULL_TREE, mdecl, NULL_TREE); stmt = build_current_thisn (type); ! stmt = make_qualified_primary (build_wfl_node (inst_id), build_wfl_node (stmt), 0); stmt = build_return (0, stmt); --- 8649,8655 ---- fix_method_argument_names (args, mdecl); layout_class_method (type, NULL_TREE, mdecl, NULL_TREE); stmt = build_current_thisn (type); ! stmt = make_qualified_primary (build_wfl_node (inst_id), build_wfl_node (stmt), 0); stmt = build_return (0, stmt); *************** maybe_build_thisn_access_method (type) *** 8623,8659 **** This function can be invoked with TYPE to NULL, available and then has to count the parser context. */ static tree build_current_thisn (type) tree type; { static int saved_i = -1; - static tree saved_thisn = NULL_TREE; - static tree saved_type = NULL_TREE; static int saved_type_i = 0; - static int initialized_p; tree decl; char buffer [24]; int i = 0; - /* Register SAVED_THISN and SAVED_TYPE with the garbage collector. */ - if (!initialized_p) - { - ggc_add_tree_root (&saved_thisn, 1); - ggc_add_tree_root (&saved_type, 1); - initialized_p = 1; - } - if (type) { if (type == saved_type) i = saved_type_i; else { ! for (i = -1, decl = DECL_CONTEXT (TYPE_NAME (type)); decl; decl = DECL_CONTEXT (decl), i++) ; ! saved_type = type; saved_type_i = i; } --- 8669,8697 ---- This function can be invoked with TYPE to NULL, available and then has to count the parser context. */ + static GTY(()) tree saved_thisn; + static GTY(()) tree saved_type; + static tree build_current_thisn (type) tree type; { static int saved_i = -1; static int saved_type_i = 0; tree decl; char buffer [24]; int i = 0; if (type) { if (type == saved_type) i = saved_type_i; else { ! for (i = -1, decl = DECL_CONTEXT (TYPE_NAME (type)); decl; decl = DECL_CONTEXT (decl), i++) ; ! saved_type = type; saved_type_i = i; } *************** build_current_thisn (type) *** 8663,8669 **** if (i == saved_i) return saved_thisn; ! sprintf (buffer, "this$%d", i); saved_i = i; saved_thisn = get_identifier (buffer); --- 8701,8707 ---- if (i == saved_i) return saved_thisn; ! sprintf (buffer, "this$%d", i); saved_i = i; saved_thisn = get_identifier (buffer); *************** build_thisn_assign () *** 8700,8705 **** --- 8738,8746 ---- throw new NoClassDefFoundError(e.getMessage());} } */ + static GTY(()) tree get_message_wfl; + static GTY(()) tree type_parm_wfl; + static tree build_dot_class_method (class) tree class; *************** build_dot_class_method (class) *** 8709,8722 **** tree args, tmp, saved_current_function_decl, mdecl; tree stmt, throw_stmt; - static tree get_message_wfl, type_parm_wfl; - if (!get_message_wfl) { get_message_wfl = build_wfl_node (get_identifier ("getMessage")); type_parm_wfl = build_wfl_node (get_identifier ("type$")); - ggc_add_tree_root (&get_message_wfl, 1); - ggc_add_tree_root (&type_parm_wfl, 1); } /* Build the arguments */ --- 8750,8759 ---- *************** build_dot_class_method (class) *** 8725,8756 **** TREE_CHAIN (args) = end_params_node; /* Build the qualified name java.lang.Class.forName */ ! tmp = MQN (MQN (MQN (BWF ("java"), BWF ("lang")), BWF ("Class")), BWF ("forName")); load_class (class_not_found_type_node, 1); load_class (no_class_def_found_type_node, 1); ! /* Create the "class$" function */ ! mdecl = create_artificial_method (class, ACC_STATIC, build_pointer_type (class_type_node), classdollar_identifier_node, args); ! DECL_FUNCTION_THROWS (mdecl) = build_tree_list (NULL_TREE, no_class_def_found_type_node); /* We start by building the try block. We need to build: return (java.lang.Class.forName (type)); */ ! stmt = build_method_invocation (tmp, build_tree_list (NULL_TREE, type_parm_wfl)); stmt = build_return (0, stmt); /* Now onto the catch block. We start by building the expression throwing a new exception: throw new NoClassDefFoundError (_.getMessage) */ ! throw_stmt = make_qualified_name (build_wfl_node (wpv_id), get_message_wfl, 0); throw_stmt = build_method_invocation (throw_stmt, NULL_TREE); ! /* Build new NoClassDefFoundError (_.getMessage) */ ! throw_stmt = build_new_invocation (build_wfl_node (get_identifier ("NoClassDefFoundError")), build_tree_list (build_pointer_type (string_type_node), throw_stmt)); --- 8762,8793 ---- TREE_CHAIN (args) = end_params_node; /* Build the qualified name java.lang.Class.forName */ ! tmp = MQN (MQN (MQN (BWF ("java"), BWF ("lang")), BWF ("Class")), BWF ("forName")); load_class (class_not_found_type_node, 1); load_class (no_class_def_found_type_node, 1); ! /* Create the "class$" function */ ! mdecl = create_artificial_method (class, ACC_STATIC, build_pointer_type (class_type_node), classdollar_identifier_node, args); ! DECL_FUNCTION_THROWS (mdecl) = build_tree_list (NULL_TREE, no_class_def_found_type_node); /* We start by building the try block. We need to build: return (java.lang.Class.forName (type)); */ ! stmt = build_method_invocation (tmp, build_tree_list (NULL_TREE, type_parm_wfl)); stmt = build_return (0, stmt); /* Now onto the catch block. We start by building the expression throwing a new exception: throw new NoClassDefFoundError (_.getMessage) */ ! throw_stmt = make_qualified_name (build_wfl_node (wpv_id), get_message_wfl, 0); throw_stmt = build_method_invocation (throw_stmt, NULL_TREE); ! /* Build new NoClassDefFoundError (_.getMessage) */ ! throw_stmt = build_new_invocation (build_wfl_node (get_identifier ("NoClassDefFoundError")), build_tree_list (build_pointer_type (string_type_node), throw_stmt)); *************** build_dot_class_method_invocation (type) *** 8788,8794 **** sig_id = unmangle_classname (IDENTIFIER_POINTER (sig_id), IDENTIFIER_LENGTH (sig_id)); ! s = build_string (IDENTIFIER_LENGTH (sig_id), IDENTIFIER_POINTER (sig_id)); return build_method_invocation (build_wfl_node (classdollar_identifier_node), build_tree_list (NULL_TREE, s)); --- 8825,8831 ---- sig_id = unmangle_classname (IDENTIFIER_POINTER (sig_id), IDENTIFIER_LENGTH (sig_id)); ! s = build_string (IDENTIFIER_LENGTH (sig_id), IDENTIFIER_POINTER (sig_id)); return build_method_invocation (build_wfl_node (classdollar_identifier_node), build_tree_list (NULL_TREE, s)); *************** fix_constructors (mdecl) *** 8825,8841 **** const char *n = IDENTIFIER_POINTER (DECL_NAME (sclass_decl)); DECL_NAME (mdecl) = DECL_NAME (sclass_decl); parse_error_context ! (lookup_cl (TYPE_NAME (class_type)), "No constructor matching `%s' found in class `%s'", lang_printable_name (mdecl, 0), n); DECL_NAME (mdecl) = save; } ! /* The constructor body must be crafted by hand. It's the constructor we defined when we realize we didn't have the CLASSNAME() constructor */ start_artificial_method_body (mdecl); ! /* Insert an assignment to the this$ hidden field, if necessary */ if ((thisn_assign = build_thisn_assign ())) --- 8862,8878 ---- const char *n = IDENTIFIER_POINTER (DECL_NAME (sclass_decl)); DECL_NAME (mdecl) = DECL_NAME (sclass_decl); parse_error_context ! (lookup_cl (TYPE_NAME (class_type)), "No constructor matching `%s' found in class `%s'", lang_printable_name (mdecl, 0), n); DECL_NAME (mdecl) = save; } ! /* The constructor body must be crafted by hand. It's the constructor we defined when we realize we didn't have the CLASSNAME() constructor */ start_artificial_method_body (mdecl); ! /* Insert an assignment to the this$ hidden field, if necessary */ if ((thisn_assign = build_thisn_assign ())) *************** fix_constructors (mdecl) *** 8853,8865 **** end_artificial_method_body (mdecl); } /* Search for an explicit constructor invocation */ ! else { int found = 0; int invokes_this = 0; tree found_call = NULL_TREE; tree main_block = BLOCK_EXPR_BODY (body); ! while (body) switch (TREE_CODE (body)) { --- 8890,8902 ---- end_artificial_method_body (mdecl); } /* Search for an explicit constructor invocation */ ! else { int found = 0; int invokes_this = 0; tree found_call = NULL_TREE; tree main_block = BLOCK_EXPR_BODY (body); ! while (body) switch (TREE_CODE (body)) { *************** fix_constructors (mdecl) *** 8899,8905 **** TREE_OPERAND (found_call, 0)); TREE_OPERAND (found_call, 0) = empty_stmt_node; } ! DECL_INIT_CALLS_THIS (mdecl) = invokes_this; /* Insert the instance initializer block right after. */ --- 8936,8942 ---- TREE_OPERAND (found_call, 0)); TREE_OPERAND (found_call, 0) = empty_stmt_node; } ! DECL_INIT_CALLS_THIS (mdecl) = invokes_this; /* Insert the instance initializer block right after. */ *************** verify_constructor_super (mdecl) *** 8943,8954 **** tree arg_type = TREE_CHAIN (TYPE_ARG_TYPES (TREE_TYPE (sdecl))); if (super_inner) arg_type = TREE_CHAIN (arg_type); ! for (m_arg_type = mdecl_arg_type; ! (arg_type != end_params_node && m_arg_type != end_params_node); ! arg_type = TREE_CHAIN (arg_type), m_arg_type = TREE_CHAIN (m_arg_type)) ! if (!valid_method_invocation_conversion_p (TREE_VALUE (arg_type), TREE_VALUE (m_arg_type))) break; --- 8980,8991 ---- tree arg_type = TREE_CHAIN (TYPE_ARG_TYPES (TREE_TYPE (sdecl))); if (super_inner) arg_type = TREE_CHAIN (arg_type); ! for (m_arg_type = mdecl_arg_type; ! (arg_type != end_params_node && m_arg_type != end_params_node); ! arg_type = TREE_CHAIN (arg_type), m_arg_type = TREE_CHAIN (m_arg_type)) ! if (!valid_method_invocation_conversion_p (TREE_VALUE (arg_type), TREE_VALUE (m_arg_type))) break; *************** verify_constructor_super (mdecl) *** 8973,8978 **** --- 9010,9016 ---- /* Generate code for all context remembered for code generation. */ + static GTY(()) tree reversed_class_list; void java_expand_classes () { *************** java_expand_classes () *** 9023,9033 **** } } /* If we've found error at that stage, don't try to generate anything, unless we're emitting xrefs or checking the syntax only (but not using -fsyntax-only for the purpose of generating bytecode. */ ! if (java_error_count && !flag_emit_xref && (!flag_syntax_only && !flag_emit_class_files)) return; --- 9061,9130 ---- } } + /* Expanding the constructors of anonymous classes generates access + methods. Scan all the methods looking for null DECL_RESULTs -- + this will be the case if a method hasn't been expanded. */ + for (cur_ctxp = ctxp_for_generation; cur_ctxp; cur_ctxp = cur_ctxp->next) + { + tree current; + ctxp = cur_ctxp; + for (current = ctxp->class_list; current; current = TREE_CHAIN (current)) + { + tree d; + current_class = TREE_TYPE (current); + for (d = TYPE_METHODS (current_class); d; d = TREE_CHAIN (d)) + { + if (DECL_RESULT (d) == NULL_TREE) + { + restore_line_number_status (1); + java_complete_expand_method (d); + restore_line_number_status (0); + } + } + } + } + + /* ??? Instead of all this we could iterate around the list of + classes until there were no more un-expanded methods. It would + take a little longer -- one pass over the whole list of methods + -- but it would be simpler. Like this: */ + #if 0 + { + int something_changed; + + do + { + something_changed = 0; + for (cur_ctxp = ctxp_for_generation; cur_ctxp; cur_ctxp = cur_ctxp->next) + { + tree current; + ctxp = cur_ctxp; + for (current = ctxp->class_list; current; current = TREE_CHAIN (current)) + { + tree d; + current_class = TREE_TYPE (current); + for (d = TYPE_METHODS (current_class); d; d = TREE_CHAIN (d)) + { + if (DECL_RESULT (d) == NULL_TREE) + { + something_changed = 1; + restore_line_number_status (1); + java_complete_expand_method (d); + restore_line_number_status (0); + } + } + } + } + } + while (something_changed); + } + #endif + /* If we've found error at that stage, don't try to generate anything, unless we're emitting xrefs or checking the syntax only (but not using -fsyntax-only for the purpose of generating bytecode. */ ! if (java_error_count && !flag_emit_xref && (!flag_syntax_only && !flag_emit_class_files)) return; *************** java_expand_classes () *** 9054,9060 **** for (cur_ctxp = ctxp_for_generation; cur_ctxp; cur_ctxp = cur_ctxp->next) { tree current; ! tree reversed_class_list = NULL; ctxp = cur_ctxp; --- 9151,9157 ---- for (cur_ctxp = ctxp_for_generation; cur_ctxp; cur_ctxp = cur_ctxp->next) { tree current; ! reversed_class_list = NULL; ctxp = cur_ctxp; *************** java_expand_classes () *** 9066,9080 **** situation, the compiler cannot fall back to the original source, having already read the outer class, so we must prevent that situation. */ ! for (current = ctxp->class_list; ! current; current = TREE_CHAIN (current)) reversed_class_list = tree_cons (NULL_TREE, current, reversed_class_list); - ggc_add_tree_root (&reversed_class_list, 1); ! for (current = reversed_class_list; ! current; current = TREE_CHAIN (current)) { current_class = TREE_TYPE (TREE_VALUE (current)); --- 9163,9176 ---- situation, the compiler cannot fall back to the original source, having already read the outer class, so we must prevent that situation. */ ! for (current = ctxp->class_list; ! current; current = TREE_CHAIN (current)) reversed_class_list = tree_cons (NULL_TREE, current, reversed_class_list); ! for (current = reversed_class_list; ! current; current = TREE_CHAIN (current)) { current_class = TREE_TYPE (TREE_VALUE (current)); *************** java_expand_classes () *** 9089,9096 **** finish_class (); } } - - ggc_del_root (&reversed_class_list); } } --- 9185,9190 ---- *************** make_qualified_name (left, right, locati *** 9177,9183 **** EXPR_WFL_LINECOL (wfl) = EXPR_WFL_LINECOL (left); EXPR_WFL_QUALIFICATION (left) = build_tree_list (wfl, NULL_TREE); } ! wfl = build_expr_wfl (right_id, ctxp->filename, 0, 0); EXPR_WFL_LINECOL (wfl) = location; chainon (EXPR_WFL_QUALIFICATION (left), build_tree_list (wfl, NULL_TREE)); --- 9271,9277 ---- EXPR_WFL_LINECOL (wfl) = EXPR_WFL_LINECOL (left); EXPR_WFL_QUALIFICATION (left) = build_tree_list (wfl, NULL_TREE); } ! wfl = build_expr_wfl (right_id, ctxp->filename, 0, 0); EXPR_WFL_LINECOL (wfl) = location; chainon (EXPR_WFL_QUALIFICATION (left), build_tree_list (wfl, NULL_TREE)); *************** resolve_expression_name (id, orig) *** 9227,9233 **** return decl; /* 15.13.1: NAME can appear within a class declaration */ ! else { decl = lookup_field_wrapper (current_class, name); if (decl) --- 9321,9327 ---- return decl; /* 15.13.1: NAME can appear within a class declaration */ ! else { decl = lookup_field_wrapper (current_class, name); if (decl) *************** resolve_expression_name (id, orig) *** 9302,9314 **** /* We've got an error here */ if (INNER_CLASS_TYPE_P (current_class)) ! parse_error_context (id, "Local variable `%s' can't be accessed from within the inner class `%s' unless it is declared final", IDENTIFIER_POINTER (name), IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (current_class)))); else ! parse_error_context (id, "Undefined variable `%s'", IDENTIFIER_POINTER (name)); return error_mark_node; --- 9396,9408 ---- /* We've got an error here */ if (INNER_CLASS_TYPE_P (current_class)) ! parse_error_context (id, "Local variable `%s' can't be accessed from within the inner class `%s' unless it is declared final", IDENTIFIER_POINTER (name), IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (current_class)))); else ! parse_error_context (id, "Undefined variable `%s'", IDENTIFIER_POINTER (name)); return error_mark_node; *************** static void *** 9318,9327 **** static_ref_err (wfl, field_id, class_type) tree wfl, field_id, class_type; { ! parse_error_context ! (wfl, "Can't make a static reference to nonstatic variable `%s' in class `%s'", ! IDENTIFIER_POINTER (field_id), IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (class_type)))); } --- 9412,9421 ---- static_ref_err (wfl, field_id, class_type) tree wfl, field_id, class_type; { ! parse_error_context ! (wfl, "Can't make a static reference to nonstatic variable `%s' in class `%s'", ! IDENTIFIER_POINTER (field_id), IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (class_type)))); } *************** resolve_field_access (qual_wfl, field_de *** 9344,9351 **** return error_mark_node; /* Resolve the LENGTH field of an array here */ ! if (DECL_P (decl) && DECL_NAME (decl) == length_identifier_node ! && type_found && TYPE_ARRAY_P (type_found) && ! flag_emit_class_files && ! flag_emit_xref) { tree length = build_java_array_length_access (where_found); --- 9438,9445 ---- return error_mark_node; /* Resolve the LENGTH field of an array here */ ! if (DECL_P (decl) && DECL_NAME (decl) == length_identifier_node ! && type_found && TYPE_ARRAY_P (type_found) && ! flag_emit_class_files && ! flag_emit_xref) { tree length = build_java_array_length_access (where_found); *************** resolve_field_access (qual_wfl, field_de *** 9372,9384 **** if (!type_found) type_found = DECL_CONTEXT (decl); is_static = FIELD_STATIC (decl); ! field_ref = build_field_ref ((is_static && !flag_emit_xref? ! NULL_TREE : where_found), type_found, DECL_NAME (decl)); if (field_ref == error_mark_node) return error_mark_node; if (is_static) field_ref = maybe_build_class_init_for_field (decl, field_ref); } else field_ref = decl; --- 9466,9491 ---- if (!type_found) type_found = DECL_CONTEXT (decl); is_static = FIELD_STATIC (decl); ! field_ref = build_field_ref ((is_static && !flag_emit_xref? ! NULL_TREE : where_found), type_found, DECL_NAME (decl)); if (field_ref == error_mark_node) return error_mark_node; if (is_static) field_ref = maybe_build_class_init_for_field (decl, field_ref); + + /* If we're looking at a static field, we may need to generate a + class initialization for it. This can happen when the access + looks like `field.ref', where `field' is a static field in an + interface we implement. */ + if (!flag_emit_class_files + && !flag_emit_xref + && TREE_CODE (where_found) == VAR_DECL + && FIELD_STATIC (where_found)) + { + build_static_field_ref (where_found); + field_ref = build_class_init (DECL_CONTEXT (where_found), field_ref); + } } else field_ref = decl; *************** resolve_field_access (qual_wfl, field_de *** 9386,9392 **** if (field_decl) *field_decl = decl; if (field_type) ! *field_type = (QUAL_DECL_TYPE (decl) ? QUAL_DECL_TYPE (decl) : TREE_TYPE (decl)); return field_ref; } --- 9493,9499 ---- if (field_decl) *field_decl = decl; if (field_type) ! *field_type = (QUAL_DECL_TYPE (decl) ? QUAL_DECL_TYPE (decl) : TREE_TYPE (decl)); return field_ref; } *************** resolve_qualified_expression_name (wfl, *** 9430,9436 **** int is_static; tree decl = NULL_TREE, type = NULL_TREE, q; /* For certain for of inner class instantiation */ ! tree saved_current, saved_this; #define RESTORE_THIS_AND_CURRENT_CLASS \ { current_class = saved_current; current_this = saved_this;} --- 9537,9543 ---- int is_static; tree decl = NULL_TREE, type = NULL_TREE, q; /* For certain for of inner class instantiation */ ! tree saved_current, saved_this; #define RESTORE_THIS_AND_CURRENT_CLASS \ { current_class = saved_current; current_this = saved_this;} *************** resolve_qualified_expression_name (wfl, *** 9451,9457 **** build the code to access it. */ if (JDECL_P (decl) && !FIELD_STATIC (decl)) { ! decl = maybe_access_field (decl, *where_found, DECL_CONTEXT (decl)); if (decl == error_mark_node) return 1; --- 9558,9564 ---- build the code to access it. */ if (JDECL_P (decl) && !FIELD_STATIC (decl)) { ! decl = maybe_access_field (decl, *where_found, DECL_CONTEXT (decl)); if (decl == error_mark_node) return 1; *************** resolve_qualified_expression_name (wfl, *** 9467,9473 **** saved and restored shortly after */ saved_current = current_class; saved_this = current_this; ! if (decl && (TREE_CODE (qual_wfl) == NEW_CLASS_EXPR || from_qualified_this)) { --- 9574,9580 ---- saved and restored shortly after */ saved_current = current_class; saved_this = current_this; ! if (decl && (TREE_CODE (qual_wfl) == NEW_CLASS_EXPR || from_qualified_this)) { *************** resolve_qualified_expression_name (wfl, *** 9499,9510 **** } *type_found = type = QUAL_DECL_TYPE (*where_found); /* If we're creating an inner class instance, check for that an enclosing instance is in scope */ if (TREE_CODE (qual_wfl) == NEW_CLASS_EXPR && INNER_ENCLOSING_SCOPE_CHECK (type)) { ! parse_error_context (qual_wfl, "No enclosing instance for inner class `%s' is in scope%s", lang_printable_name (type, 0), (!current_this ? "" : --- 9606,9619 ---- } *type_found = type = QUAL_DECL_TYPE (*where_found); + *where_found = force_evaluation_order (*where_found); + /* If we're creating an inner class instance, check for that an enclosing instance is in scope */ if (TREE_CODE (qual_wfl) == NEW_CLASS_EXPR && INNER_ENCLOSING_SCOPE_CHECK (type)) { ! parse_error_context (qual_wfl, "No enclosing instance for inner class `%s' is in scope%s", lang_printable_name (type, 0), (!current_this ? "" : *************** resolve_qualified_expression_name (wfl, *** 9518,9525 **** RESTORE_THIS_AND_CURRENT_CLASS; /* EH check. No check on access$ functions */ ! if (location ! && !OUTER_FIELD_ACCESS_IDENTIFIER_P (DECL_NAME (current_function_decl))) check_thrown_exceptions (location, ret_decl); --- 9627,9634 ---- RESTORE_THIS_AND_CURRENT_CLASS; /* EH check. No check on access$ functions */ ! if (location ! && !OUTER_FIELD_ACCESS_IDENTIFIER_P (DECL_NAME (current_function_decl))) check_thrown_exceptions (location, ret_decl); *************** resolve_qualified_expression_name (wfl, *** 9613,9619 **** { if (!current_this) { ! parse_error_context (wfl, "Keyword `this' used outside allowed context"); return 1; } --- 9722,9728 ---- { if (!current_this) { ! parse_error_context (wfl, "Keyword `this' used outside allowed context"); return 1; } *************** resolve_qualified_expression_name (wfl, *** 9636,9643 **** if (!enclosing_context_p (type, current_class)) { char *p = xstrdup (lang_printable_name (type, 0)); ! parse_error_context (qual_wfl, "Can't use variable `%s.this': type `%s' isn't an outer type of type `%s'", ! p, p, lang_printable_name (current_class, 0)); free (p); return 1; --- 9745,9752 ---- if (!enclosing_context_p (type, current_class)) { char *p = xstrdup (lang_printable_name (type, 0)); ! parse_error_context (qual_wfl, "Can't use variable `%s.this': type `%s' isn't an outer type of type `%s'", ! p, p, lang_printable_name (current_class, 0)); free (p); return 1; *************** resolve_qualified_expression_name (wfl, *** 9668,9679 **** if (METHOD_STATIC (current_function_decl) || current_class == object_type_node) { ! parse_error_context (wfl, "Keyword `super' used outside allowed context"); return 1; } /* Otherwise, treat SUPER as (SUPER_CLASS)THIS */ ! node = build_cast (EXPR_WFL_LINECOL (qual_wfl), CLASSTYPE_SUPER (current_class), build_this (EXPR_WFL_LINECOL (qual_wfl))); *where_found = decl = java_complete_tree (node); --- 9777,9788 ---- if (METHOD_STATIC (current_function_decl) || current_class == object_type_node) { ! parse_error_context (wfl, "Keyword `super' used outside allowed context"); return 1; } /* Otherwise, treat SUPER as (SUPER_CLASS)THIS */ ! node = build_cast (EXPR_WFL_LINECOL (qual_wfl), CLASSTYPE_SUPER (current_class), build_this (EXPR_WFL_LINECOL (qual_wfl))); *where_found = decl = java_complete_tree (node); *************** resolve_qualified_expression_name (wfl, *** 9715,9721 **** else { if (from_super || from_cast) ! parse_error_context ((from_cast ? qual_wfl : wfl), "No variable `%s' defined in class `%s'", IDENTIFIER_POINTER (EXPR_WFL_NODE (qual_wfl)), --- 9824,9830 ---- else { if (from_super || from_cast) ! parse_error_context ((from_cast ? qual_wfl : wfl), "No variable `%s' defined in class `%s'", IDENTIFIER_POINTER (EXPR_WFL_NODE (qual_wfl)), *************** resolve_qualified_expression_name (wfl, *** 9737,9743 **** /* Sneak preview. If next we see a `new', we're facing a qualification with resulted in a type being selected instead of a field. Report the error */ ! if(TREE_CHAIN (q) && TREE_CODE (TREE_PURPOSE (TREE_CHAIN (q))) == NEW_CLASS_EXPR) { parse_error_context (qual_wfl, "Undefined variable `%s'", --- 9846,9852 ---- /* Sneak preview. If next we see a `new', we're facing a qualification with resulted in a type being selected instead of a field. Report the error */ ! if(TREE_CHAIN (q) && TREE_CODE (TREE_PURPOSE (TREE_CHAIN (q))) == NEW_CLASS_EXPR) { parse_error_context (qual_wfl, "Undefined variable `%s'", *************** resolve_qualified_expression_name (wfl, *** 9747,9753 **** if (not_accessible_p (TREE_TYPE (decl), decl, type, 0)) { ! parse_error_context (qual_wfl, "Can't access %s field `%s.%s' from `%s'", java_accstring_lookup (get_access_flags_from_decl (decl)), GET_TYPE_NAME (type), --- 9856,9862 ---- if (not_accessible_p (TREE_TYPE (decl), decl, type, 0)) { ! parse_error_context (qual_wfl, "Can't access %s field `%s.%s' from `%s'", java_accstring_lookup (get_access_flags_from_decl (decl)), GET_TYPE_NAME (type), *************** resolve_qualified_expression_name (wfl, *** 9761,9767 **** from_type = 1; } /* We resolve an expression name */ ! else { tree field_decl = NULL_TREE; --- 9870,9876 ---- from_type = 1; } /* We resolve an expression name */ ! else { tree field_decl = NULL_TREE; *************** resolve_qualified_expression_name (wfl, *** 9819,9832 **** if (!from_type && !JREFERENCE_TYPE_P (type)) { ! parse_error_context (qual_wfl, "Attempt to reference field `%s' in `%s %s'", IDENTIFIER_POINTER (EXPR_WFL_NODE (qual_wfl)), lang_printable_name (type, 0), IDENTIFIER_POINTER (DECL_NAME (decl))); return 1; } ! field_decl = lookup_field_wrapper (type, EXPR_WFL_NODE (qual_wfl)); --- 9928,9941 ---- if (!from_type && !JREFERENCE_TYPE_P (type)) { ! parse_error_context (qual_wfl, "Attempt to reference field `%s' in `%s %s'", IDENTIFIER_POINTER (EXPR_WFL_NODE (qual_wfl)), lang_printable_name (type, 0), IDENTIFIER_POINTER (DECL_NAME (decl))); return 1; } ! field_decl = lookup_field_wrapper (type, EXPR_WFL_NODE (qual_wfl)); *************** resolve_qualified_expression_name (wfl, *** 9840,9846 **** inner_decl = resolve_class (decl, ptr, NULL_TREE, qual_wfl); if (inner_decl) { ! check_inner_class_access (inner_decl, decl, qual_wfl); type = TREE_TYPE (inner_decl); decl = inner_decl; from_type = 1; --- 9949,9955 ---- inner_decl = resolve_class (decl, ptr, NULL_TREE, qual_wfl); if (inner_decl) { ! check_inner_class_access (inner_decl, decl, qual_wfl); type = TREE_TYPE (inner_decl); decl = inner_decl; from_type = 1; *************** resolve_qualified_expression_name (wfl, *** 9850,9858 **** if (field_decl == NULL_TREE) { ! parse_error_context (qual_wfl, "No variable `%s' defined in type `%s'", ! IDENTIFIER_POINTER (EXPR_WFL_NODE (qual_wfl)), GET_TYPE_NAME (type)); return 1; } --- 9959,9967 ---- if (field_decl == NULL_TREE) { ! parse_error_context (qual_wfl, "No variable `%s' defined in type `%s'", ! IDENTIFIER_POINTER (EXPR_WFL_NODE (qual_wfl)), GET_TYPE_NAME (type)); return 1; } *************** resolve_qualified_expression_name (wfl, *** 9867,9903 **** field_decl_type = TREE_TYPE (TREE_TYPE (field_decl)); else field_decl_type = TREE_TYPE (field_decl); ! if (!JPRIMITIVE_TYPE_P (field_decl_type) && !CLASS_LOADED_P (field_decl_type) && !TYPE_ARRAY_P (field_decl_type)) resolve_and_layout (field_decl_type, NULL_TREE); ! /* Check on accessibility here */ if (not_accessible_p (current_class, field_decl, DECL_CONTEXT (field_decl), from_super)) { ! parse_error_context (qual_wfl, "Can't access %s field `%s.%s' from `%s'", ! java_accstring_lookup (get_access_flags_from_decl (field_decl)), GET_TYPE_NAME (type), IDENTIFIER_POINTER (DECL_NAME (field_decl)), ! IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (current_class)))); return 1; } check_deprecation (qual_wfl, field_decl); ! /* There are things to check when fields are accessed from type. There are no restrictions on a static declaration of the field when it is accessed from an interface */ is_static = FIELD_STATIC (field_decl); ! if (!from_super && from_type ! && !TYPE_INTERFACE_P (type) ! && !is_static ! && (current_function_decl && METHOD_STATIC (current_function_decl))) { static_ref_err (qual_wfl, EXPR_WFL_NODE (qual_wfl), type); --- 9976,10012 ---- field_decl_type = TREE_TYPE (TREE_TYPE (field_decl)); else field_decl_type = TREE_TYPE (field_decl); ! if (!JPRIMITIVE_TYPE_P (field_decl_type) && !CLASS_LOADED_P (field_decl_type) && !TYPE_ARRAY_P (field_decl_type)) resolve_and_layout (field_decl_type, NULL_TREE); ! /* Check on accessibility here */ if (not_accessible_p (current_class, field_decl, DECL_CONTEXT (field_decl), from_super)) { ! parse_error_context (qual_wfl, "Can't access %s field `%s.%s' from `%s'", ! java_accstring_lookup (get_access_flags_from_decl (field_decl)), GET_TYPE_NAME (type), IDENTIFIER_POINTER (DECL_NAME (field_decl)), ! IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (current_class)))); return 1; } check_deprecation (qual_wfl, field_decl); ! /* There are things to check when fields are accessed from type. There are no restrictions on a static declaration of the field when it is accessed from an interface */ is_static = FIELD_STATIC (field_decl); ! if (!from_super && from_type ! && !TYPE_INTERFACE_P (type) ! && !is_static ! && (current_function_decl && METHOD_STATIC (current_function_decl))) { static_ref_err (qual_wfl, EXPR_WFL_NODE (qual_wfl), type); *************** resolve_qualified_expression_name (wfl, *** 9942,9952 **** /* Sneak preview. If decl is qualified by a `new', report the error here to be accurate on the peculiar construct */ ! if (TREE_CHAIN (q) && TREE_CODE (TREE_PURPOSE (TREE_CHAIN (q))) == NEW_CLASS_EXPR && !JREFERENCE_TYPE_P (type)) { ! parse_error_context (qual_wfl, "Attempt to reference field `new' in a `%s'", lang_printable_name (type, 0)); return 1; } --- 10051,10061 ---- /* Sneak preview. If decl is qualified by a `new', report the error here to be accurate on the peculiar construct */ ! if (TREE_CHAIN (q) && TREE_CODE (TREE_PURPOSE (TREE_CHAIN (q))) == NEW_CLASS_EXPR && !JREFERENCE_TYPE_P (type)) { ! parse_error_context (qual_wfl, "Attempt to reference field `new' in a `%s'", lang_printable_name (type, 0)); return 1; } *************** not_accessible_p (reference, member, whe *** 9982,9988 **** /* Access always granted for members declared public */ if (access_flag & ACC_PUBLIC) return 0; ! /* Check access on protected members */ if (access_flag & ACC_PROTECTED) { --- 10091,10097 ---- /* Access always granted for members declared public */ if (access_flag & ACC_PUBLIC) return 0; ! /* Check access on protected members */ if (access_flag & ACC_PROTECTED) { *************** check_deprecation (wfl, decl) *** 10050,10056 **** /* Complain if the field is deprecated and the file it was defined in isn't compiled at the same time the file which contains its use is */ ! if (DECL_DEPRECATED (decl) && !IS_A_COMMAND_LINE_FILENAME_P (get_identifier (file))) { char the [20]; --- 10159,10165 ---- /* Complain if the field is deprecated and the file it was defined in isn't compiled at the same time the file which contains its use is */ ! if (DECL_DEPRECATED (decl) && !IS_A_COMMAND_LINE_FILENAME_P (get_identifier (file))) { char the [20]; *************** check_deprecation (wfl, decl) *** 10073,10080 **** /* Don't issue a message if the context as been deprecated as a whole. */ if (! CLASS_DEPRECATED (TYPE_NAME (DECL_CONTEXT (decl)))) ! parse_warning_context ! (wfl, "The %s `%s' in class `%s' has been deprecated", the, lang_printable_name (decl, 0), IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (DECL_CONTEXT (decl))))); } --- 10182,10189 ---- /* Don't issue a message if the context as been deprecated as a whole. */ if (! CLASS_DEPRECATED (TYPE_NAME (DECL_CONTEXT (decl)))) ! parse_warning_context ! (wfl, "The %s `%s' in class `%s' has been deprecated", the, lang_printable_name (decl, 0), IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (DECL_CONTEXT (decl))))); } *************** check_deprecation (wfl, decl) *** 10082,10096 **** /* Returns 1 if class was declared in the current package, 0 otherwise */ static int class_in_current_package (class) tree class; { - static tree cache = NULL_TREE; int qualified_flag; tree left; ! if (cache == class) return 1; qualified_flag = QUALIFIED_P (DECL_NAME (TYPE_NAME (class))); --- 10191,10205 ---- /* Returns 1 if class was declared in the current package, 0 otherwise */ + static GTY(()) tree cicp_cache; static int class_in_current_package (class) tree class; { int qualified_flag; tree left; ! if (cicp_cache == class) return 1; qualified_flag = QUALIFIED_P (DECL_NAME (TYPE_NAME (class))); *************** class_in_current_package (class) *** 10111,10125 **** breakdown_qualified (&left, NULL, DECL_NAME (TYPE_NAME (class))); if (ctxp->package == left) { ! static int initialized_p; ! /* Register CACHE with the garbage collector. */ ! if (!initialized_p) ! { ! ggc_add_tree_root (&cache, 1); ! initialized_p = 1; ! } ! ! cache = class; return 1; } return 0; --- 10220,10226 ---- breakdown_qualified (&left, NULL, DECL_NAME (TYPE_NAME (class))); if (ctxp->package == left) { ! cicp_cache = class; return 1; } return 0; *************** maybe_access_field (decl, where, type) *** 10134,10140 **** { if (TREE_CODE (decl) == FIELD_DECL && decl != current_this && !FIELD_STATIC (decl)) ! decl = build_field_ref (where ? where : current_this, (type ? type : DECL_CONTEXT (decl)), DECL_NAME (decl)); return decl; --- 10235,10241 ---- { if (TREE_CODE (decl) == FIELD_DECL && decl != current_this && !FIELD_STATIC (decl)) ! decl = build_field_ref (where ? where : current_this, (type ? type : DECL_CONTEXT (decl)), DECL_NAME (decl)); return decl; *************** patch_method_invocation (patch, primary, *** 10160,10166 **** int is_super_init = 0; tree this_arg = NULL_TREE; int is_array_clone_call = 0; ! /* Should be overriden if everything goes well. Otherwise, if something fails, it should keep this value. It stop the evaluation of a bogus assignment. See java_complete_tree, --- 10261,10267 ---- int is_super_init = 0; tree this_arg = NULL_TREE; int is_array_clone_call = 0; ! /* Should be overriden if everything goes well. Otherwise, if something fails, it should keep this value. It stop the evaluation of a bogus assignment. See java_complete_tree, *************** patch_method_invocation (patch, primary, *** 10183,10196 **** data during error report. */ identifier_wfl = cut_identifier_in_qualified (wfl); identifier = EXPR_WFL_NODE (identifier_wfl); ! /* Given the context, IDENTIFIER is syntactically qualified as a MethodName. We need to qualify what's before */ qualify_ambiguous_name (wfl); resolved = resolve_field_access (wfl, NULL, NULL); if (TREE_CODE (resolved) == VAR_DECL && FIELD_STATIC (resolved) ! && FIELD_FINAL (resolved) && !inherits_from_p (DECL_CONTEXT (resolved), current_class) && !flag_emit_class_files && !flag_emit_xref) resolved = build_class_init (DECL_CONTEXT (resolved), resolved); --- 10284,10297 ---- data during error report. */ identifier_wfl = cut_identifier_in_qualified (wfl); identifier = EXPR_WFL_NODE (identifier_wfl); ! /* Given the context, IDENTIFIER is syntactically qualified as a MethodName. We need to qualify what's before */ qualify_ambiguous_name (wfl); resolved = resolve_field_access (wfl, NULL, NULL); if (TREE_CODE (resolved) == VAR_DECL && FIELD_STATIC (resolved) ! && FIELD_FINAL (resolved) && !inherits_from_p (DECL_CONTEXT (resolved), current_class) && !flag_emit_class_files && !flag_emit_xref) resolved = build_class_init (DECL_CONTEXT (resolved), resolved); *************** patch_method_invocation (patch, primary, *** 10200,10213 **** type = GET_SKIP_TYPE (resolved); resolve_and_layout (type, NULL_TREE); ! if (JPRIMITIVE_TYPE_P (type)) { parse_error_context (identifier_wfl, "Can't invoke a method on primitive type `%s'", IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type)))); ! PATCH_METHOD_RETURN_ERROR (); } list = lookup_method_invoke (0, identifier_wfl, type, identifier, args); --- 10301,10314 ---- type = GET_SKIP_TYPE (resolved); resolve_and_layout (type, NULL_TREE); ! if (JPRIMITIVE_TYPE_P (type)) { parse_error_context (identifier_wfl, "Can't invoke a method on primitive type `%s'", IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type)))); ! PATCH_METHOD_RETURN_ERROR (); } list = lookup_method_invoke (0, identifier_wfl, type, identifier, args); *************** patch_method_invocation (patch, primary, *** 10221,10237 **** parse_error_context (identifier_wfl, "Can't make static reference to method `%s' in interface `%s'", ! IDENTIFIER_POINTER (identifier), IDENTIFIER_POINTER (name)); PATCH_METHOD_RETURN_ERROR (); } if (list && !METHOD_STATIC (list)) { char *fct_name = xstrdup (lang_printable_name (list, 0)); ! parse_error_context (identifier_wfl, "Can't make static reference to method `%s %s' in class `%s'", ! lang_printable_name (TREE_TYPE (TREE_TYPE (list)), 0), fct_name, IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type)))); free (fct_name); PATCH_METHOD_RETURN_ERROR (); --- 10322,10338 ---- parse_error_context (identifier_wfl, "Can't make static reference to method `%s' in interface `%s'", ! IDENTIFIER_POINTER (identifier), IDENTIFIER_POINTER (name)); PATCH_METHOD_RETURN_ERROR (); } if (list && !METHOD_STATIC (list)) { char *fct_name = xstrdup (lang_printable_name (list, 0)); ! parse_error_context (identifier_wfl, "Can't make static reference to method `%s %s' in class `%s'", ! lang_printable_name (TREE_TYPE (TREE_TYPE (list)), 0), fct_name, IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type)))); free (fct_name); PATCH_METHOD_RETURN_ERROR (); *************** patch_method_invocation (patch, primary, *** 10239,10248 **** } else this_arg = primary = resolved; ! if (TYPE_ARRAY_P (type) && identifier == get_identifier ("clone")) is_array_clone_call = 1; ! /* IDENTIFIER_WFL will be used to report any problem further */ wfl = identifier_wfl; } --- 10340,10349 ---- } else this_arg = primary = resolved; ! if (TYPE_ARRAY_P (type) && identifier == get_identifier ("clone")) is_array_clone_call = 1; ! /* IDENTIFIER_WFL will be used to report any problem further */ wfl = identifier_wfl; } *************** patch_method_invocation (patch, primary, *** 10252,10264 **** { tree class_to_search = NULL_TREE; int lc; /* Looking for Constructor */ ! /* We search constructor in their target class */ if (CALL_CONSTRUCTOR_P (patch)) { if (TREE_CODE (patch) == NEW_CLASS_EXPR) class_to_search = EXPR_WFL_NODE (wfl); ! else if (EXPR_WFL_NODE (TREE_OPERAND (patch, 0)) == this_identifier_node) class_to_search = NULL_TREE; else if (EXPR_WFL_NODE (TREE_OPERAND (patch, 0)) == --- 10353,10365 ---- { tree class_to_search = NULL_TREE; int lc; /* Looking for Constructor */ ! /* We search constructor in their target class */ if (CALL_CONSTRUCTOR_P (patch)) { if (TREE_CODE (patch) == NEW_CLASS_EXPR) class_to_search = EXPR_WFL_NODE (wfl); ! else if (EXPR_WFL_NODE (TREE_OPERAND (patch, 0)) == this_identifier_node) class_to_search = NULL_TREE; else if (EXPR_WFL_NODE (TREE_OPERAND (patch, 0)) == *************** patch_method_invocation (patch, primary, *** 10266,10272 **** { is_super_init = 1; if (CLASSTYPE_SUPER (current_class)) ! class_to_search = DECL_NAME (TYPE_NAME (CLASSTYPE_SUPER (current_class))); else { --- 10367,10373 ---- { is_super_init = 1; if (CLASSTYPE_SUPER (current_class)) ! class_to_search = DECL_NAME (TYPE_NAME (CLASSTYPE_SUPER (current_class))); else { *************** patch_method_invocation (patch, primary, *** 10282,10300 **** if (!class_to_search) { ! parse_error_context (wfl, "Class `%s' not found in type declaration", IDENTIFIER_POINTER (EXPR_WFL_NODE (wfl))); PATCH_METHOD_RETURN_ERROR (); } ! /* Can't instantiate an abstract class, but we can invoke it's constructor. It's use within the `new' context is denied here. */ ! if (CLASS_ABSTRACT (class_to_search) && TREE_CODE (patch) == NEW_CLASS_EXPR) { ! parse_error_context (wfl, "Class `%s' is an abstract class. It can't be instantiated", IDENTIFIER_POINTER (EXPR_WFL_NODE (wfl))); PATCH_METHOD_RETURN_ERROR (); --- 10383,10401 ---- if (!class_to_search) { ! parse_error_context (wfl, "Class `%s' not found in type declaration", IDENTIFIER_POINTER (EXPR_WFL_NODE (wfl))); PATCH_METHOD_RETURN_ERROR (); } ! /* Can't instantiate an abstract class, but we can invoke it's constructor. It's use within the `new' context is denied here. */ ! if (CLASS_ABSTRACT (class_to_search) && TREE_CODE (patch) == NEW_CLASS_EXPR) { ! parse_error_context (wfl, "Class `%s' is an abstract class. It can't be instantiated", IDENTIFIER_POINTER (EXPR_WFL_NODE (wfl))); PATCH_METHOD_RETURN_ERROR (); *************** patch_method_invocation (patch, primary, *** 10346,10358 **** can't be executed then. */ if (!list) PATCH_METHOD_RETURN_ERROR (); ! if (TYPE_ARRAY_P (class_to_search) && DECL_NAME (list) == get_identifier ("clone")) is_array_clone_call = 1; /* Check for static reference if non static methods */ ! if (check_for_static_method_reference (wfl, patch, list, class_to_search, primary)) PATCH_METHOD_RETURN_ERROR (); --- 10447,10459 ---- can't be executed then. */ if (!list) PATCH_METHOD_RETURN_ERROR (); ! if (TYPE_ARRAY_P (class_to_search) && DECL_NAME (list) == get_identifier ("clone")) is_array_clone_call = 1; /* Check for static reference if non static methods */ ! if (check_for_static_method_reference (wfl, patch, list, class_to_search, primary)) PATCH_METHOD_RETURN_ERROR (); *************** patch_method_invocation (patch, primary, *** 10362,10368 **** && INNER_ENCLOSING_SCOPE_CHECK (class_to_search) && !DECL_INIT_P (current_function_decl)) { ! parse_error_context (wfl, "No enclosing instance for inner class `%s' is in scope%s", lang_printable_name (class_to_search, 0), (!current_this ? "" : --- 10463,10469 ---- && INNER_ENCLOSING_SCOPE_CHECK (class_to_search) && !DECL_INIT_P (current_function_decl)) { ! parse_error_context (wfl, "No enclosing instance for inner class `%s' is in scope%s", lang_printable_name (class_to_search, 0), (!current_this ? "" : *************** patch_method_invocation (patch, primary, *** 10390,10406 **** x(a1,...,an) into TYPE_OF(this$).x(a1,....an) 2) We're generating bytecodes: ! - LIST is non static. It's invocation is transformed from x(a1,....,an) into access$(this$,a1,...,an). - LIST is static. It's invocation is transformed from x(a1,....,an) into TYPE_OF(this$).x(a1,....an). Of course, this$ can be abitrary complex, ranging from ! this$0 (the immediate outer context) to ! access$0(access$0(...(this$0))). ! ! maybe_use_access_method returns a non zero value if the this_arg has to be moved into the (then generated) stub argument list. In the meantime, the selected function might have be replaced by a generated stub. */ --- 10491,10507 ---- x(a1,...,an) into TYPE_OF(this$).x(a1,....an) 2) We're generating bytecodes: ! - LIST is non static. It's invocation is transformed from x(a1,....,an) into access$(this$,a1,...,an). - LIST is static. It's invocation is transformed from x(a1,....,an) into TYPE_OF(this$).x(a1,....an). Of course, this$ can be abitrary complex, ranging from ! this$0 (the immediate outer context) to ! access$0(access$0(...(this$0))). ! ! maybe_use_access_method returns a nonzero value if the this_arg has to be moved into the (then generated) stub argument list. In the meantime, the selected function might have be replaced by a generated stub. */ *************** patch_method_invocation (patch, primary, *** 10415,10427 **** /* Merge point of all resolution schemes. If we have nothing, this is an error, already signaled */ ! if (!list) PATCH_METHOD_RETURN_ERROR (); /* Check accessibility, position the is_static flag, build and return the call */ if (not_accessible_p (DECL_CONTEXT (current_function_decl), list, ! (primary ? TREE_TYPE (TREE_TYPE (primary)) : NULL_TREE), from_super) /* Calls to clone() on array types are permitted as a special-case. */ && !is_array_clone_call) --- 10516,10528 ---- /* Merge point of all resolution schemes. If we have nothing, this is an error, already signaled */ ! if (!list) PATCH_METHOD_RETURN_ERROR (); /* Check accessibility, position the is_static flag, build and return the call */ if (not_accessible_p (DECL_CONTEXT (current_function_decl), list, ! (primary ? TREE_TYPE (TREE_TYPE (primary)) : NULL_TREE), from_super) /* Calls to clone() on array types are permitted as a special-case. */ && !is_array_clone_call) *************** patch_method_invocation (patch, primary, *** 10452,10458 **** /* If invoking a innerclass constructor, there are hidden parameters to pass */ ! if (TREE_CODE (patch) == NEW_CLASS_EXPR && PURE_INNER_CLASS_TYPE_P (DECL_CONTEXT (list))) { /* And make sure we add the accessed local variables to be saved --- 10553,10559 ---- /* If invoking a innerclass constructor, there are hidden parameters to pass */ ! if (TREE_CODE (patch) == NEW_CLASS_EXPR && PURE_INNER_CLASS_TYPE_P (DECL_CONTEXT (list))) { /* And make sure we add the accessed local variables to be saved *************** patch_method_invocation (patch, primary, *** 10496,10507 **** /* This handles the situation where a constructor invocation needs to have an enclosing context passed as a second parameter (the constructor is one of an inner class). */ ! if ((is_super_init || (TREE_CODE (patch) == CALL_EXPR && name == this_identifier_node)) && PURE_INNER_CLASS_TYPE_P (DECL_CONTEXT (list))) { tree dest = TYPE_NAME (DECL_CONTEXT (list)); ! tree extra_arg = build_access_to_thisn (current_class, DECL_CONTEXT (dest), 0); extra_arg = java_complete_tree (extra_arg); args = tree_cons (NULL_TREE, extra_arg, args); --- 10597,10608 ---- /* This handles the situation where a constructor invocation needs to have an enclosing context passed as a second parameter (the constructor is one of an inner class). */ ! if ((is_super_init || (TREE_CODE (patch) == CALL_EXPR && name == this_identifier_node)) && PURE_INNER_CLASS_TYPE_P (DECL_CONTEXT (list))) { tree dest = TYPE_NAME (DECL_CONTEXT (list)); ! tree extra_arg = build_access_to_thisn (current_class, DECL_CONTEXT (dest), 0); extra_arg = java_complete_tree (extra_arg); args = tree_cons (NULL_TREE, extra_arg, args); *************** patch_method_invocation (patch, primary, *** 10515,10522 **** invoke any method relying on `this'. Exceptions are: we're invoking a static function, primary exists and is not the current this, we're creating a new object. */ ! if (ctxp->explicit_constructor_p ! && !is_static_flag && (!primary || primary == current_this) && (TREE_CODE (patch) != NEW_CLASS_EXPR)) { --- 10616,10623 ---- invoke any method relying on `this'. Exceptions are: we're invoking a static function, primary exists and is not the current this, we're creating a new object. */ ! if (ctxp->explicit_constructor_p ! && !is_static_flag && (!primary || primary == current_this) && (TREE_CODE (patch) != NEW_CLASS_EXPR)) { *************** patch_method_invocation (patch, primary, *** 10524,10530 **** PATCH_METHOD_RETURN_ERROR (); } java_parser_context_restore_global (); ! if (is_static) *is_static = is_static_flag; /* Sometimes, we want the decl of the selected method. Such as for EH checking */ --- 10625,10631 ---- PATCH_METHOD_RETURN_ERROR (); } java_parser_context_restore_global (); ! if (is_static) *is_static = is_static_flag; /* Sometimes, we want the decl of the selected method. Such as for EH checking */ *************** patch_method_invocation (patch, primary, *** 10536,10547 **** if (is_super_init && CLASS_HAS_FINIT_P (current_class)) { tree finit_parms, finit_call; ! /* Prepare to pass hidden parameters to finit$, if any. */ ! finit_parms = build_alias_initializer_parameter_list (AIPL_FUNCTION_FINIT_INVOCATION, current_class, NULL_TREE, NULL); ! ! finit_call = build_method_invocation (build_wfl_node (finit_identifier_node), finit_parms); --- 10637,10648 ---- if (is_super_init && CLASS_HAS_FINIT_P (current_class)) { tree finit_parms, finit_call; ! /* Prepare to pass hidden parameters to finit$, if any. */ ! finit_parms = build_alias_initializer_parameter_list (AIPL_FUNCTION_FINIT_INVOCATION, current_class, NULL_TREE, NULL); ! ! finit_call = build_method_invocation (build_wfl_node (finit_identifier_node), finit_parms); *************** static int *** 10562,10573 **** check_for_static_method_reference (wfl, node, method, where, primary) tree wfl, node, method, where, primary; { ! if (METHOD_STATIC (current_function_decl) && !METHOD_STATIC (method) && !primary && !CALL_CONSTRUCTOR_P (node)) { char *fct_name = xstrdup (lang_printable_name (method, 0)); ! parse_error_context ! (wfl, "Can't make static reference to method `%s %s' in class `%s'", lang_printable_name (TREE_TYPE (TREE_TYPE (method)), 0), fct_name, IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (where)))); free (fct_name); --- 10663,10674 ---- check_for_static_method_reference (wfl, node, method, where, primary) tree wfl, node, method, where, primary; { ! if (METHOD_STATIC (current_function_decl) && !METHOD_STATIC (method) && !primary && !CALL_CONSTRUCTOR_P (node)) { char *fct_name = xstrdup (lang_printable_name (method, 0)); ! parse_error_context ! (wfl, "Can't make static reference to method `%s %s' in class `%s'", lang_printable_name (TREE_TYPE (TREE_TYPE (method)), 0), fct_name, IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (where)))); free (fct_name); *************** maybe_use_access_method (is_super_init, *** 10591,10603 **** int to_return = 0; int non_static_context = !METHOD_STATIC (md); ! if (is_super_init || DECL_CONTEXT (md) == current_class ! || !PURE_INNER_CLASS_TYPE_P (current_class) || DECL_FINIT_P (md) || DECL_INSTINIT_P (md)) return 0; ! /* If we're calling a method found in an enclosing class, generate what it takes to retrieve the right this. Don't do that if we're invoking a static method. Note that if MD's type is unrelated to --- 10692,10704 ---- int to_return = 0; int non_static_context = !METHOD_STATIC (md); ! if (is_super_init || DECL_CONTEXT (md) == current_class ! || !PURE_INNER_CLASS_TYPE_P (current_class) || DECL_FINIT_P (md) || DECL_INSTINIT_P (md)) return 0; ! /* If we're calling a method found in an enclosing class, generate what it takes to retrieve the right this. Don't do that if we're invoking a static method. Note that if MD's type is unrelated to *************** maybe_use_access_method (is_super_init, *** 10622,10628 **** ta = build_access_to_thisn (ctx, type, 0); break; } ! type = (DECL_CONTEXT (TYPE_NAME (type)) ? TREE_TYPE (DECL_CONTEXT (TYPE_NAME (type))) : NULL_TREE); } } --- 10723,10729 ---- ta = build_access_to_thisn (ctx, type, 0); break; } ! type = (DECL_CONTEXT (TYPE_NAME (type)) ? TREE_TYPE (DECL_CONTEXT (TYPE_NAME (type))) : NULL_TREE); } } *************** maybe_use_access_method (is_super_init, *** 10641,10647 **** *mdecl = md; *this_arg = ta; ! /* Returnin a non zero value indicates we were doing a non static method invokation that is now a static invocation. It will have callee displace `this' to insert it in the regular argument list. */ --- 10742,10748 ---- *mdecl = md; *this_arg = ta; ! /* Returnin a nonzero value indicates we were doing a non static method invokation that is now a static invocation. It will have callee displace `this' to insert it in the regular argument list. */ *************** patch_invoke (patch, method, args) *** 10666,10672 **** t = TYPE_ARG_TYPES (TREE_TYPE (method)); if (TREE_CODE (patch) == NEW_CLASS_EXPR) t = TREE_CHAIN (t); ! for (ta = args; t != end_params_node && ta; t = TREE_CHAIN (t), ta = TREE_CHAIN (ta)) if (JPRIMITIVE_TYPE_P (TREE_TYPE (TREE_VALUE (ta))) && TREE_TYPE (TREE_VALUE (ta)) != TREE_VALUE (t)) --- 10767,10773 ---- t = TYPE_ARG_TYPES (TREE_TYPE (method)); if (TREE_CODE (patch) == NEW_CLASS_EXPR) t = TREE_CHAIN (t); ! for (ta = args; t != end_params_node && ta; t = TREE_CHAIN (t), ta = TREE_CHAIN (ta)) if (JPRIMITIVE_TYPE_P (TREE_TYPE (TREE_VALUE (ta))) && TREE_TYPE (TREE_VALUE (ta)) != TREE_VALUE (t)) *************** patch_invoke (patch, method, args) *** 10757,10763 **** new = build (CALL_EXPR, promote_type (class), build_address_of (alloc_node), tree_cons (NULL_TREE, build_class_ref (class), ! build_tree_list (NULL_TREE, size_in_bytes (class))), NULL_TREE); saved_new = save_expr (new); --- 10858,10864 ---- new = build (CALL_EXPR, promote_type (class), build_address_of (alloc_node), tree_cons (NULL_TREE, build_class_ref (class), ! build_tree_list (NULL_TREE, size_in_bytes (class))), NULL_TREE); saved_new = save_expr (new); *************** patch_invoke (patch, method, args) *** 10772,10778 **** is NULL. */ if (check != NULL_TREE) { ! patch = build (COMPOUND_EXPR, TREE_TYPE (patch), check, patch); TREE_SIDE_EFFECTS (patch) = 1; } --- 10873,10883 ---- is NULL. */ if (check != NULL_TREE) { ! /* We have to call force_evaluation_order now because creating a ! COMPOUND_EXPR wraps the arg list in a way that makes it ! unrecognizable by force_evaluation_order later. Yuk. */ ! patch = build (COMPOUND_EXPR, TREE_TYPE (patch), check, ! force_evaluation_order (patch)); TREE_SIDE_EFFECTS (patch) = 1; } *************** patch_invoke (patch, method, args) *** 10788,10794 **** { tree list; tree fndecl = current_function_decl; ! tree save = save_expr (patch); tree type = TREE_TYPE (patch); patch = build (COMPOUND_EXPR, type, save, empty_stmt_node); --- 10893,10902 ---- { tree list; tree fndecl = current_function_decl; ! /* We have to call force_evaluation_order now because creating a ! COMPOUND_EXPR wraps the arg list in a way that makes it ! unrecognizable by force_evaluation_order later. Yuk. */ ! tree save = save_expr (force_evaluation_order (patch)); tree type = TREE_TYPE (patch); patch = build (COMPOUND_EXPR, type, save, empty_stmt_node); *************** lookup_method_invoke (lc, cl, class, nam *** 10895,10901 **** char string [4096]; if (!cm || not_accessible_p (class, cm, NULL_TREE, 0)) continue; ! sprintf (string, " `%s' in `%s'%s", get_printable_method_name (cm), IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (DECL_CONTEXT (cm)))), --- 11003,11009 ---- char string [4096]; if (!cm || not_accessible_p (class, cm, NULL_TREE, 0)) continue; ! sprintf (string, " `%s' in `%s'%s", get_printable_method_name (cm), IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (DECL_CONTEXT (cm)))), *************** find_applicable_accessible_methods_list *** 10927,10954 **** int lc; tree class, name, arglist; { ! static struct hash_table t, *searched_classes = NULL; static int search_not_done = 0; tree list = NULL_TREE, all_list = NULL_TREE; ! /* Check the hash table to determine if this class has been searched already. */ if (searched_classes) { ! if (hash_lookup (searched_classes, ! (const hash_table_key) class, FALSE, NULL)) ! return NULL; } else { ! hash_table_init (&t, hash_newfunc, java_hash_hash_tree_node, ! java_hash_compare_tree_node); ! searched_classes = &t; } ! search_not_done++; ! hash_lookup (searched_classes, ! (const hash_table_key) class, TRUE, NULL); if (!CLASS_LOADED_P (class) && !CLASS_FROM_SOURCE_P (class)) { --- 11035,11059 ---- int lc; tree class, name, arglist; { ! static htab_t searched_classes; static int search_not_done = 0; tree list = NULL_TREE, all_list = NULL_TREE; ! /* Check the hash table to determine if this class has been searched already. */ if (searched_classes) { ! if (htab_find (searched_classes, class) != NULL) ! return NULL; } else { ! searched_classes = htab_create (10, htab_hash_pointer, ! htab_eq_pointer, NULL); } ! search_not_done++; ! *htab_find_slot (searched_classes, class, INSERT) = class; if (!CLASS_LOADED_P (class) && !CLASS_FROM_SOURCE_P (class)) { *************** find_applicable_accessible_methods_list *** 10957,10968 **** } /* Search interfaces */ ! if (TREE_CODE (TYPE_NAME (class)) == TYPE_DECL && CLASS_INTERFACE (TYPE_NAME (class))) { int i, n; tree basetype_vec = TYPE_BINFO_BASETYPES (class); ! search_applicable_methods_list (lc, TYPE_METHODS (class), name, arglist, &list, &all_list); n = TREE_VEC_LENGTH (basetype_vec); for (i = 1; i < n; i++) --- 11062,11073 ---- } /* Search interfaces */ ! if (TREE_CODE (TYPE_NAME (class)) == TYPE_DECL && CLASS_INTERFACE (TYPE_NAME (class))) { int i, n; tree basetype_vec = TYPE_BINFO_BASETYPES (class); ! search_applicable_methods_list (lc, TYPE_METHODS (class), name, arglist, &list, &all_list); n = TREE_VEC_LENGTH (basetype_vec); for (i = 1; i < n; i++) *************** find_applicable_accessible_methods_list *** 10970,10976 **** tree t = BINFO_TYPE (TREE_VEC_ELT (basetype_vec, i)); tree rlist; ! rlist = find_applicable_accessible_methods_list (lc, t, name, arglist); list = chainon (rlist, list); } --- 11075,11081 ---- tree t = BINFO_TYPE (TREE_VEC_ELT (basetype_vec, i)); tree rlist; ! rlist = find_applicable_accessible_methods_list (lc, t, name, arglist); list = chainon (rlist, list); } *************** find_applicable_accessible_methods_list *** 10978,10984 **** /* Search classes */ else { ! search_applicable_methods_list (lc, TYPE_METHODS (class), name, arglist, &list, &all_list); /* When looking finit$, class$ or instinit$, we turn LC to 1 so --- 11083,11089 ---- /* Search classes */ else { ! search_applicable_methods_list (lc, TYPE_METHODS (class), name, arglist, &list, &all_list); /* When looking finit$, class$ or instinit$, we turn LC to 1 so *************** find_applicable_accessible_methods_list *** 11014,11020 **** { tree rlist; class = CLASSTYPE_SUPER (class); ! rlist = find_applicable_accessible_methods_list (lc, class, name, arglist); list = chainon (rlist, list); } --- 11119,11125 ---- { tree rlist; class = CLASSTYPE_SUPER (class); ! rlist = find_applicable_accessible_methods_list (lc, class, name, arglist); list = chainon (rlist, list); } *************** find_applicable_accessible_methods_list *** 11028,11042 **** { if (!lc && TYPE_METHODS (object_type_node) ! && !hash_lookup (searched_classes, ! (const hash_table_key) object_type_node, ! FALSE, NULL)) { ! search_applicable_methods_list (lc, TYPE_METHODS (object_type_node), name, arglist, &list, &all_list); } ! hash_table_free (searched_classes); searched_classes = NULL; } --- 11133,11145 ---- { if (!lc && TYPE_METHODS (object_type_node) ! && htab_find (searched_classes, object_type_node) == NULL) { ! search_applicable_methods_list (lc, TYPE_METHODS (object_type_node), name, arglist, &list, &all_list); } ! htab_delete (searched_classes); searched_classes = NULL; } *************** find_applicable_accessible_methods_list *** 11047,11053 **** /* Effectively search for the appropriate method in method */ ! static void search_applicable_methods_list (lc, method, name, arglist, list, all_list) int lc; tree method, name, arglist; --- 11150,11156 ---- /* Effectively search for the appropriate method in method */ ! static void search_applicable_methods_list (lc, method, name, arglist, list, all_list) int lc; tree method, name, arglist; *************** search_applicable_methods_list (lc, meth *** 11059,11072 **** other classes */ if (lc && !DECL_CONSTRUCTOR_P (method)) continue; ! else if (!lc && (DECL_CONSTRUCTOR_P (method) || (DECL_NAME (method) != name))) continue; if (argument_types_convertible (method, arglist)) { /* Retain accessible methods only */ ! if (!not_accessible_p (DECL_CONTEXT (current_function_decl), method, NULL_TREE, 0)) *list = tree_cons (NULL_TREE, method, *list); else --- 11162,11175 ---- other classes */ if (lc && !DECL_CONSTRUCTOR_P (method)) continue; ! else if (!lc && (DECL_CONSTRUCTOR_P (method) || (DECL_NAME (method) != name))) continue; if (argument_types_convertible (method, arglist)) { /* Retain accessible methods only */ ! if (!not_accessible_p (DECL_CONTEXT (current_function_decl), method, NULL_TREE, 0)) *list = tree_cons (NULL_TREE, method, *list); else *************** find_most_specific_methods_list (list) *** 11103,11115 **** /* Compare arguments and location where methods where declared */ if (argument_types_convertible (method_v, current_v)) { ! if (valid_method_invocation_conversion_p (DECL_CONTEXT (method_v), DECL_CONTEXT (current_v)) || (INNER_CLASS_TYPE_P (DECL_CONTEXT (current_v)) && enclosing_context_p (DECL_CONTEXT (method_v), DECL_CONTEXT (current_v)))) { ! int v = (DECL_SPECIFIC_COUNT (current_v) += (INNER_CLASS_TYPE_P (DECL_CONTEXT (current_v)) ? 2 : 1)); max = (v > max ? v : max); } --- 11206,11218 ---- /* Compare arguments and location where methods where declared */ if (argument_types_convertible (method_v, current_v)) { ! if (valid_method_invocation_conversion_p (DECL_CONTEXT (method_v), DECL_CONTEXT (current_v)) || (INNER_CLASS_TYPE_P (DECL_CONTEXT (current_v)) && enclosing_context_p (DECL_CONTEXT (method_v), DECL_CONTEXT (current_v)))) { ! int v = (DECL_SPECIFIC_COUNT (current_v) += (INNER_CLASS_TYPE_P (DECL_CONTEXT (current_v)) ? 2 : 1)); max = (v > max ? v : max); } *************** find_most_specific_methods_list (list) *** 11166,11190 **** corresponding parameter of M1. Implementation expects M2_OR_ARGLIST to change less often than M1. */ static int argument_types_convertible (m1, m2_or_arglist) tree m1, m2_or_arglist; { - static tree m2_arg_value = NULL_TREE; - static tree m2_arg_cache = NULL_TREE; - static int initialized_p; - register tree m1_arg, m2_arg; - /* Register M2_ARG_VALUE and M2_ARG_CACHE with the garbage - collector. */ - if (!initialized_p) - { - ggc_add_tree_root (&m2_arg_value, 1); - ggc_add_tree_root (&m2_arg_cache, 1); - initialized_p = 1; - } - SKIP_THIS_AND_ARTIFICIAL_PARMS (m1_arg, m1) if (m2_arg_value == m2_or_arglist) --- 11269,11283 ---- corresponding parameter of M1. Implementation expects M2_OR_ARGLIST to change less often than M1. */ + static GTY(()) tree m2_arg_value; + static GTY(()) tree m2_arg_cache; + static int argument_types_convertible (m1, m2_or_arglist) tree m1, m2_or_arglist; { register tree m1_arg, m2_arg; SKIP_THIS_AND_ARTIFICIAL_PARMS (m1_arg, m1) if (m2_arg_value == m2_or_arglist) *************** qualify_ambiguous_name (id) *** 11313,11319 **** else if (code == TREE_LIST) name = EXPR_WFL_NODE (TREE_PURPOSE (qual_wfl)); ! else if (code == STRING_CST || code == CONDITIONAL_EXPR || code == PLUS_EXPR) { qual = TREE_CHAIN (qual); --- 11406,11412 ---- else if (code == TREE_LIST) name = EXPR_WFL_NODE (TREE_PURPOSE (qual_wfl)); ! else if (code == STRING_CST || code == CONDITIONAL_EXPR || code == PLUS_EXPR) { qual = TREE_CHAIN (qual); *************** qualify_ambiguous_name (id) *** 11338,11344 **** if (TREE_CODE (TREE_PURPOSE (qual)) == ARRAY_REF && TREE_CODE (TREE_OPERAND (TREE_PURPOSE (qual), 0)) == EXPR_WITH_FILE_LOCATION ! && EXPR_WFL_NODE (TREE_OPERAND (TREE_PURPOSE (qual), 0)) == this_identifier_node) { qual = TREE_OPERAND (TREE_PURPOSE (qual), 0); --- 11431,11437 ---- if (TREE_CODE (TREE_PURPOSE (qual)) == ARRAY_REF && TREE_CODE (TREE_OPERAND (TREE_PURPOSE (qual), 0)) == EXPR_WITH_FILE_LOCATION ! && EXPR_WFL_NODE (TREE_OPERAND (TREE_PURPOSE (qual), 0)) == this_identifier_node) { qual = TREE_OPERAND (TREE_PURPOSE (qual), 0); *************** qualify_ambiguous_name (id) *** 11371,11382 **** super_found = again = 1; } } while (again); ! /* If name appears within the scope of a local variable declaration or parameter declaration, then it is an expression name. We don't carry this test out if we're in the context of the use of SUPER or THIS */ ! if (!this_found && !super_found && TREE_CODE (name) != STRING_CST && TREE_CODE (name) != INTEGER_CST && (decl = IDENTIFIER_LOCAL_VALUE (name))) { --- 11464,11475 ---- super_found = again = 1; } } while (again); ! /* If name appears within the scope of a local variable declaration or parameter declaration, then it is an expression name. We don't carry this test out if we're in the context of the use of SUPER or THIS */ ! if (!this_found && !super_found && TREE_CODE (name) != STRING_CST && TREE_CODE (name) != INTEGER_CST && (decl = IDENTIFIER_LOCAL_VALUE (name))) { *************** qualify_ambiguous_name (id) *** 11402,11408 **** - NAME is declared in an another compilation unit of the package of the compilation unit containing NAME, - NAME is declared by exactly on type-import-on-demand declaration ! of the compilation unit containing NAME. - NAME is actually a STRING_CST. This can't happen if the expression was qualified by `this.' */ else if (! this_found && --- 11495,11501 ---- - NAME is declared in an another compilation unit of the package of the compilation unit containing NAME, - NAME is declared by exactly on type-import-on-demand declaration ! of the compilation unit containing NAME. - NAME is actually a STRING_CST. This can't happen if the expression was qualified by `this.' */ else if (! this_found && *************** qualify_ambiguous_name (id) *** 11426,11432 **** containing NAME. FIXME */ /* Otherwise, NAME is reclassified as a package name */ ! else RESOLVE_PACKAGE_NAME_P (qual_wfl) = 1; /* Propagate the qualification accross other components of the --- 11519,11525 ---- containing NAME. FIXME */ /* Otherwise, NAME is reclassified as a package name */ ! else RESOLVE_PACKAGE_NAME_P (qual_wfl) = 1; /* Propagate the qualification accross other components of the *************** qualify_ambiguous_name (id) *** 11436,11442 **** { if (RESOLVE_PACKAGE_NAME_P (qual_wfl)) RESOLVE_PACKAGE_NAME_P (QUAL_WFL (qual)) = 1; ! else RESOLVE_EXPRESSION_NAME_P (QUAL_WFL (qual)) = 1; } --- 11529,11535 ---- { if (RESOLVE_PACKAGE_NAME_P (qual_wfl)) RESOLVE_PACKAGE_NAME_P (QUAL_WFL (qual)) = 1; ! else RESOLVE_EXPRESSION_NAME_P (QUAL_WFL (qual)) = 1; } *************** breakdown_qualified (left, right, source *** 11458,11474 **** tree *left, *right, source; { char *p, *base; ! int l = IDENTIFIER_LENGTH (source); base = alloca (l + 1); memcpy (base, IDENTIFIER_POINTER (source), l + 1); ! /* Breakdown NAME into REMAINDER . IDENTIFIER */ p = base + l - 1; while (*p != '.' && p != base) p--; ! /* We didn't find a '.'. Return an error */ if (p == base) return 1; --- 11551,11567 ---- tree *left, *right, source; { char *p, *base; ! int l = IDENTIFIER_LENGTH (source); base = alloca (l + 1); memcpy (base, IDENTIFIER_POINTER (source), l + 1); ! /* Breakdown NAME into REMAINDER . IDENTIFIER. */ p = base + l - 1; while (*p != '.' && p != base) p--; ! /* We didn't find a '.'. Return an error. */ if (p == base) return 1; *************** breakdown_qualified (left, right, source *** 11476,11482 **** if (right) *right = get_identifier (p+1); *left = get_identifier (base); ! return 0; } --- 11569,11575 ---- if (right) *right = get_identifier (p+1); *left = get_identifier (base); ! return 0; } *************** in_same_package (name1, name2) *** 11489,11495 **** tree tmp; tree pkg1; tree pkg2; ! if (TREE_CODE (name1) == TYPE_DECL) name1 = DECL_NAME (name1); if (TREE_CODE (name2) == TYPE_DECL) --- 11582,11588 ---- tree tmp; tree pkg1; tree pkg2; ! if (TREE_CODE (name1) == TYPE_DECL) name1 = DECL_NAME (name1); if (TREE_CODE (name2) == TYPE_DECL) *************** in_same_package (name1, name2) *** 11505,11511 **** breakdown_qualified (&pkg1, &tmp, name1); breakdown_qualified (&pkg2, &tmp, name2); ! return (pkg1 == pkg2); } --- 11598,11604 ---- breakdown_qualified (&pkg1, &tmp, name1); breakdown_qualified (&pkg2, &tmp, name2); ! return (pkg1 == pkg2); } *************** java_complete_tree (node) *** 11522,11543 **** && DECL_INITIAL (node) != NULL_TREE && !flag_emit_xref) { ! tree value = DECL_INITIAL (node); ! DECL_INITIAL (node) = NULL_TREE; ! value = fold_constant_for_init (value, node); ! DECL_INITIAL (node) = value; if (value != NULL_TREE) ! { ! /* fold_constant_for_init sometimes widens the original type ! of the constant (i.e. byte to int). It's not desirable, ! especially if NODE is a function argument. */ ! if ((TREE_CODE (value) == INTEGER_CST ! || TREE_CODE (value) == REAL_CST) ! && TREE_TYPE (node) != TREE_TYPE (value)) ! return convert (TREE_TYPE (node), value); ! else ! return value; ! } } return node; } --- 11615,11623 ---- && DECL_INITIAL (node) != NULL_TREE && !flag_emit_xref) { ! tree value = fold_constant_for_init (node, node); if (value != NULL_TREE) ! return value; } return node; } *************** java_complete_lhs (node) *** 11598,11604 **** int error_seen = 0; if (TREE_CODE (stmt) == COMPOUND_EXPR) { ! /* Re-order from (((A; B); C); ...; Z) to (A; (B; (C ; (...; Z)))). This makes it easier to scan the statements left-to-right without using recursion (which might overflow the stack --- 11678,11684 ---- int error_seen = 0; if (TREE_CODE (stmt) == COMPOUND_EXPR) { ! /* Re-order from (((A; B); C); ...; Z) to (A; (B; (C ; (...; Z)))). This makes it easier to scan the statements left-to-right without using recursion (which might overflow the stack *************** java_complete_lhs (node) *** 11744,11754 **** nn = ctxp->current_loop; /* It must be assignable to the type of the switch expression. */ ! if (!try_builtin_assignconv (NULL_TREE, TREE_TYPE (TREE_OPERAND (nn, 0)), cn)) { EXPR_WFL_LINECOL (wfl_operator) = EXPR_WFL_LINECOL (node); ! parse_error_context (wfl_operator, "Incompatible type for case. Can't convert `%s' to `int'", lang_printable_name (TREE_TYPE (cn), 0)); --- 11824,11834 ---- nn = ctxp->current_loop; /* It must be assignable to the type of the switch expression. */ ! if (!try_builtin_assignconv (NULL_TREE, TREE_TYPE (TREE_OPERAND (nn, 0)), cn)) { EXPR_WFL_LINECOL (wfl_operator) = EXPR_WFL_LINECOL (node); ! parse_error_context (wfl_operator, "Incompatible type for case. Can't convert `%s' to `int'", lang_printable_name (TREE_TYPE (cn), 0)); *************** java_complete_lhs (node) *** 11779,11785 **** if (SWITCH_HAS_DEFAULT (nn)) { EXPR_WFL_LINECOL (wfl_operator) = EXPR_WFL_LINECOL (node); ! parse_error_context (wfl_operator, "Duplicate case label: `default'"); return error_mark_node; } --- 11859,11865 ---- if (SWITCH_HAS_DEFAULT (nn)) { EXPR_WFL_LINECOL (wfl_operator) = EXPR_WFL_LINECOL (node); ! parse_error_context (wfl_operator, "Duplicate case label: `default'"); return error_mark_node; } *************** java_complete_lhs (node) *** 11854,11860 **** /* 3- Expression section */ case COMPOUND_EXPR: wfl_op2 = TREE_OPERAND (node, 1); ! TREE_OPERAND (node, 0) = nn = java_complete_tree (TREE_OPERAND (node, 0)); if (wfl_op2 == empty_stmt_node) CAN_COMPLETE_NORMALLY (node) = CAN_COMPLETE_NORMALLY (nn); --- 11934,11940 ---- /* 3- Expression section */ case COMPOUND_EXPR: wfl_op2 = TREE_OPERAND (node, 1); ! TREE_OPERAND (node, 0) = nn = java_complete_tree (TREE_OPERAND (node, 0)); if (wfl_op2 == empty_stmt_node) CAN_COMPLETE_NORMALLY (node) = CAN_COMPLETE_NORMALLY (nn); *************** java_complete_lhs (node) *** 11867,11876 **** nn = wfl_op2; if (TREE_CODE (nn) == EXPR_WITH_FILE_LOCATION) nn = EXPR_WFL_NODE (nn); ! if (TREE_CODE (nn) != EXIT_EXPR) { SET_WFL_OPERATOR (wfl_operator, node, wfl_op2); ! parse_error_context (wfl_operator, "Unreachable statement"); } } TREE_OPERAND (node, 1) = java_complete_tree (TREE_OPERAND (node, 1)); --- 11947,11968 ---- nn = wfl_op2; if (TREE_CODE (nn) == EXPR_WITH_FILE_LOCATION) nn = EXPR_WFL_NODE (nn); ! /* NN can be NULL_TREE exactly when UPDATE is, in ! finish_for_loop. */ ! if (nn != NULL_TREE && TREE_CODE (nn) != EXIT_EXPR) { SET_WFL_OPERATOR (wfl_operator, node, wfl_op2); ! if (SUPPRESS_UNREACHABLE_ERROR (nn)) ! { ! /* Perhaps this warning should have an ! associated flag. The code being compiled is ! pedantically correct, but useless. */ ! parse_warning_context (wfl_operator, ! "Unreachable statement"); ! } ! else ! parse_error_context (wfl_operator, ! "Unreachable statement"); } } TREE_OPERAND (node, 1) = java_complete_tree (TREE_OPERAND (node, 1)); *************** java_complete_lhs (node) *** 11931,11937 **** } else TREE_TYPE (node) = TREE_TYPE (EXPR_WFL_NODE (node)); ! } break; --- 12023,12029 ---- } else TREE_TYPE (node) = TREE_TYPE (EXPR_WFL_NODE (node)); ! } break; *************** java_complete_lhs (node) *** 11941,11947 **** for (cn = TREE_OPERAND (node, 1); cn; cn = TREE_CHAIN (cn)) { int location = EXPR_WFL_LINECOL (TREE_VALUE (cn)); ! tree dim = convert (int_type_node, java_complete_tree (TREE_VALUE (cn))); if (dim == error_mark_node) { --- 12033,12039 ---- for (cn = TREE_OPERAND (node, 1); cn; cn = TREE_CHAIN (cn)) { int location = EXPR_WFL_LINECOL (TREE_VALUE (cn)); ! tree dim = convert (int_type_node, java_complete_tree (TREE_VALUE (cn))); if (dim == error_mark_node) { *************** java_complete_lhs (node) *** 11953,11959 **** TREE_VALUE (cn) = dim; /* Setup the location of the current dimension, for later error report. */ ! TREE_PURPOSE (cn) = build_expr_wfl (NULL_TREE, input_filename, 0, 0); EXPR_WFL_LINECOL (TREE_PURPOSE (cn)) = location; } --- 12045,12051 ---- TREE_VALUE (cn) = dim; /* Setup the location of the current dimension, for later error report. */ ! TREE_PURPOSE (cn) = build_expr_wfl (NULL_TREE, input_filename, 0, 0); EXPR_WFL_LINECOL (TREE_PURPOSE (cn)) = location; } *************** java_complete_lhs (node) *** 12002,12009 **** check_thrown_exceptions (EXPR_WFL_LINECOL (node), decl); /* If we call this(...), register signature and positions */ if (in_this) ! DECL_CONSTRUCTOR_CALLS (current_function_decl) = ! tree_cons (wfl, decl, DECL_CONSTRUCTOR_CALLS (current_function_decl)); CAN_COMPLETE_NORMALLY (node) = 1; return force_evaluation_order (node); --- 12094,12101 ---- check_thrown_exceptions (EXPR_WFL_LINECOL (node), decl); /* If we call this(...), register signature and positions */ if (in_this) ! DECL_CONSTRUCTOR_CALLS (current_function_decl) = ! tree_cons (wfl, decl, DECL_CONSTRUCTOR_CALLS (current_function_decl)); CAN_COMPLETE_NORMALLY (node) = 1; return force_evaluation_order (node); *************** java_complete_lhs (node) *** 12013,12032 **** /* Save potential wfls */ wfl_op1 = TREE_OPERAND (node, 0); TREE_OPERAND (node, 0) = nn = java_complete_lhs (wfl_op1); ! if (MODIFY_EXPR_FROM_INITIALIZATION_P (node) && TREE_CODE (nn) == VAR_DECL && TREE_STATIC (nn) && DECL_INITIAL (nn) != NULL_TREE) { tree value; ! value = fold_constant_for_init (nn, nn); /* When we have a primitype type, or a string and we're not emitting a class file, we actually don't want to generate anything for the assignment. */ if (value != NULL_TREE && ! (JPRIMITIVE_TYPE_P (TREE_TYPE (value)) || (TREE_TYPE (value) == string_ptr_type_node && ! flag_emit_class_files))) { --- 12105,12124 ---- /* Save potential wfls */ wfl_op1 = TREE_OPERAND (node, 0); TREE_OPERAND (node, 0) = nn = java_complete_lhs (wfl_op1); ! if (MODIFY_EXPR_FROM_INITIALIZATION_P (node) && TREE_CODE (nn) == VAR_DECL && TREE_STATIC (nn) && DECL_INITIAL (nn) != NULL_TREE) { tree value; ! value = fold_constant_for_init (nn, nn); /* When we have a primitype type, or a string and we're not emitting a class file, we actually don't want to generate anything for the assignment. */ if (value != NULL_TREE && ! (JPRIMITIVE_TYPE_P (TREE_TYPE (value)) || (TREE_TYPE (value) == string_ptr_type_node && ! flag_emit_class_files))) { *************** java_complete_lhs (node) *** 12062,12072 **** { /* This might break when accessing outer field from inner class. TESTME, FIXME */ ! tree lvalue = java_stabilize_reference (TREE_OPERAND (node, 0)); /* Hand stabilize the lhs on both places */ TREE_OPERAND (node, 0) = lvalue; ! TREE_OPERAND (TREE_OPERAND (node, 1), 0) = (flag_emit_class_files ? lvalue : save_expr (lvalue)); /* 15.25.2.a: Left hand is not an array access. FIXME */ --- 12154,12164 ---- { /* This might break when accessing outer field from inner class. TESTME, FIXME */ ! tree lvalue = java_stabilize_reference (TREE_OPERAND (node, 0)); /* Hand stabilize the lhs on both places */ TREE_OPERAND (node, 0) = lvalue; ! TREE_OPERAND (TREE_OPERAND (node, 1), 0) = (flag_emit_class_files ? lvalue : save_expr (lvalue)); /* 15.25.2.a: Left hand is not an array access. FIXME */ *************** java_complete_lhs (node) *** 12076,12084 **** if ((cn = patch_string (nn))) nn = cn; ! /* The last part of the rewrite for E1 op= E2 is to have E1 = (T)(E1 op E2), with T being the type of E1. */ ! nn = java_complete_tree (build_cast (EXPR_WFL_LINECOL (wfl_op2), TREE_TYPE (lvalue), nn)); /* If the assignment is compound and has reference type, --- 12168,12176 ---- if ((cn = patch_string (nn))) nn = cn; ! /* The last part of the rewrite for E1 op= E2 is to have E1 = (T)(E1 op E2), with T being the type of E1. */ ! nn = java_complete_tree (build_cast (EXPR_WFL_LINECOL (wfl_op2), TREE_TYPE (lvalue), nn)); /* If the assignment is compound and has reference type, *************** java_complete_lhs (node) *** 12132,12138 **** if (node == error_mark_node) return error_mark_node; /* Reorganize the tree if necessary. */ ! if (flag && (!JREFERENCE_TYPE_P (TREE_TYPE (node)) || JSTRING_P (TREE_TYPE (node)))) node = java_refold (node); } --- 12224,12230 ---- if (node == error_mark_node) return error_mark_node; /* Reorganize the tree if necessary. */ ! if (flag && (!JREFERENCE_TYPE_P (TREE_TYPE (node)) || JSTRING_P (TREE_TYPE (node)))) node = java_refold (node); } *************** java_complete_lhs (node) *** 12141,12149 **** undergone a conversion in patch_assignment. We do that only when it's necessary to have DECL_INITIAL properly set. */ nn = TREE_OPERAND (node, 0); ! if (TREE_CODE (nn) == VAR_DECL && DECL_INITIAL (nn) && CONSTANT_VALUE_P (DECL_INITIAL (nn)) ! && FIELD_STATIC (nn) && FIELD_FINAL (nn) && (JPRIMITIVE_TYPE_P (TREE_TYPE (nn)) || TREE_TYPE (nn) == string_ptr_type_node)) DECL_INITIAL (nn) = TREE_OPERAND (node, 1); --- 12233,12241 ---- undergone a conversion in patch_assignment. We do that only when it's necessary to have DECL_INITIAL properly set. */ nn = TREE_OPERAND (node, 0); ! if (TREE_CODE (nn) == VAR_DECL && DECL_INITIAL (nn) && CONSTANT_VALUE_P (DECL_INITIAL (nn)) ! && FIELD_STATIC (nn) && FIELD_FINAL (nn) && (JPRIMITIVE_TYPE_P (TREE_TYPE (nn)) || TREE_TYPE (nn) == string_ptr_type_node)) DECL_INITIAL (nn) = TREE_OPERAND (node, 1); *************** java_complete_lhs (node) *** 12165,12171 **** case RDIV_EXPR: case TRUTH_ANDIF_EXPR: case TRUTH_ORIF_EXPR: ! case EQ_EXPR: case NE_EXPR: case GT_EXPR: case GE_EXPR: --- 12257,12263 ---- case RDIV_EXPR: case TRUTH_ANDIF_EXPR: case TRUTH_ORIF_EXPR: ! case EQ_EXPR: case NE_EXPR: case GT_EXPR: case GE_EXPR: *************** java_complete_lhs (node) *** 12284,12296 **** if (ctxp->explicit_constructor_p) { EXPR_WFL_LINECOL (wfl_operator) = EXPR_WFL_LINECOL (node); ! parse_error_context (wfl_operator, "Can't reference `this' or `super' before the superclass constructor has been called"); TREE_TYPE (node) = error_mark_node; return error_mark_node; } return current_this; ! case CLASS_LITERAL: CAN_COMPLETE_NORMALLY (node) = 1; node = patch_incomplete_class_ref (node); --- 12376,12388 ---- if (ctxp->explicit_constructor_p) { EXPR_WFL_LINECOL (wfl_operator) = EXPR_WFL_LINECOL (node); ! parse_error_context (wfl_operator, "Can't reference `this' or `super' before the superclass constructor has been called"); TREE_TYPE (node) = error_mark_node; return error_mark_node; } return current_this; ! case CLASS_LITERAL: CAN_COMPLETE_NORMALLY (node) = 1; node = patch_incomplete_class_ref (node); *************** java_complete_lhs (node) *** 12310,12316 **** return node; } ! /* Complete function call's argument. Return a non zero value is an error was found. */ static int --- 12402,12408 ---- return node; } ! /* Complete function call's argument. Return a nonzero value is an error was found. */ static int *************** enter_block () *** 12387,12393 **** for the first time for a given function. The current function body (DECL_FUNCTION_BODY) is set to be block B. */ ! tree fndecl = current_function_decl; if (!fndecl) { BLOCK_SUPERCONTEXT (b) = current_static_block; --- 12479,12485 ---- for the first time for a given function. The current function body (DECL_FUNCTION_BODY) is set to be block B. */ ! tree fndecl = current_function_decl; if (!fndecl) { BLOCK_SUPERCONTEXT (b) = current_static_block; *************** lookup_name_in_blocks (name) *** 12449,12455 **** if (TREE_CODE (b) != BLOCK) abort (); ! for (current = BLOCK_EXPR_DECLS (b); current; current = TREE_CHAIN (current)) if (DECL_NAME (current) == name) return current; --- 12541,12547 ---- if (TREE_CODE (b) != BLOCK) abort (); ! for (current = BLOCK_EXPR_DECLS (b); current; current = TREE_CHAIN (current)) if (DECL_NAME (current) == name) return current; *************** build_wfl_wrap (node, location) *** 12482,12488 **** int location; { tree wfl, node_to_insert = node; ! /* We want to process THIS . xxx symbolicaly, to keep it consistent with the way we're processing SUPER. A THIS from a primary as a different form than a SUPER. Turn THIS into something symbolic */ --- 12574,12580 ---- int location; { tree wfl, node_to_insert = node; ! /* We want to process THIS . xxx symbolicaly, to keep it consistent with the way we're processing SUPER. A THIS from a primary as a different form than a SUPER. Turn THIS into something symbolic */ *************** build_this_super_qualified_invocation (u *** 12530,12536 **** int lloc, rloc; { tree invok; ! tree wfl = build_wfl_node (use_this ? this_identifier_node : super_identifier_node); EXPR_WFL_LINECOL (wfl) = lloc; invok = build_method_invocation (name, args); --- 12622,12628 ---- int lloc, rloc; { tree invok; ! tree wfl = build_wfl_node (use_this ? this_identifier_node : super_identifier_node); EXPR_WFL_LINECOL (wfl) = lloc; invok = build_method_invocation (name, args); *************** build_assignment (op, op_location, lhs, *** 12584,12591 **** return assignment; } ! /* Print an INTEGER_CST node in a static buffer, and return the buffer. */ char * print_int_node (node) tree node; --- 12676,12759 ---- return assignment; } ! /* Print an INTEGER_CST node as decimal in a static buffer, and return ! the buffer. This is used only for string conversion. */ ! static char * ! string_convert_int_cst (node) ! tree node; ! { ! /* Long.MIN_VALUE is -9223372036854775808, 20 characters. */ ! static char buffer[21]; ! ! unsigned HOST_WIDE_INT lo = TREE_INT_CST_LOW (node); ! unsigned HOST_WIDE_INT hi = TREE_INT_CST_HIGH (node); ! char *p = buffer + sizeof (buffer); ! int neg = 0; ! ! unsigned HOST_WIDE_INT hibit = (((unsigned HOST_WIDE_INT) 1) ! << (HOST_BITS_PER_WIDE_INT - 1)); ! ! *--p = '\0'; ! ! /* If negative, note the fact and negate the value. */ ! if ((hi & hibit)) ! { ! lo = ~lo; ! hi = ~hi; ! if (++lo == 0) ! ++hi; ! neg = 1; ! } ! ! /* Divide by 10 until there are no bits left. */ ! do ! { ! unsigned HOST_WIDE_INT acc = 0; ! unsigned HOST_WIDE_INT outhi = 0, outlo = 0; ! unsigned int i; ! ! /* Use long division to compute the result and the remainder. */ ! for (i = 0; i < 2 * HOST_BITS_PER_WIDE_INT; ++i) ! { ! /* Shift a bit into accumulator. */ ! acc <<= 1; ! if ((hi & hibit)) ! acc |= 1; ! ! /* Shift the value. */ ! hi <<= 1; ! if ((lo & hibit)) ! hi |= 1; ! lo <<= 1; ! ! /* Shift the correct bit into the result. */ ! outhi <<= 1; ! if ((outlo & hibit)) ! outhi |= 1; ! outlo <<= 1; ! if (acc >= 10) ! { ! acc -= 10; ! outlo |= 1; ! } ! } ! ! /* '0' == 060 in Java, but might not be here (think EBCDIC). */ ! *--p = '\060' + acc; ! ! hi = outhi; ! lo = outlo; ! } ! while (hi || lo); ! ! if (neg) ! *--p = '\055'; /* '-' == 055 in Java, but might not be here. */ + return p; + } + + /* Print an INTEGER_CST node in a static buffer, and return the + buffer. This is used only for error handling. */ char * print_int_node (node) tree node; *************** print_int_node (node) *** 12593,12599 **** static char buffer [80]; if (TREE_CONSTANT_OVERFLOW (node)) sprintf (buffer, ""); ! if (TREE_INT_CST_HIGH (node) == 0) sprintf (buffer, HOST_WIDE_INT_PRINT_UNSIGNED, TREE_INT_CST_LOW (node)); --- 12761,12767 ---- static char buffer [80]; if (TREE_CONSTANT_OVERFLOW (node)) sprintf (buffer, ""); ! if (TREE_INT_CST_HIGH (node) == 0) sprintf (buffer, HOST_WIDE_INT_PRINT_UNSIGNED, TREE_INT_CST_LOW (node)); *************** patch_assignment (node, wfl_op1) *** 12663,12669 **** { lhs_type = TREE_TYPE (lvalue); } ! else { parse_error_context (wfl_op1, "Invalid left hand side of assignment"); error_found = 1; --- 12831,12837 ---- { lhs_type = TREE_TYPE (lvalue); } ! else { parse_error_context (wfl_op1, "Invalid left hand side of assignment"); error_found = 1; *************** patch_assignment (node, wfl_op1) *** 12736,12747 **** /* 10.10: Array Store Exception runtime check */ if (!flag_emit_class_files && !flag_emit_xref ! && lvalue_from_array && JREFERENCE_TYPE_P (TYPE_ARRAY_ELEMENT (lhs_type))) { tree array, store_check, base, index_expr; ! ! /* Save RHS so that it doesn't get re-evaluated by the store check. */ new_rhs = save_expr (new_rhs); /* Get the INDIRECT_REF. */ --- 12904,12915 ---- /* 10.10: Array Store Exception runtime check */ if (!flag_emit_class_files && !flag_emit_xref ! && lvalue_from_array && JREFERENCE_TYPE_P (TYPE_ARRAY_ELEMENT (lhs_type))) { tree array, store_check, base, index_expr; ! ! /* Save RHS so that it doesn't get re-evaluated by the store check. */ new_rhs = save_expr (new_rhs); /* Get the INDIRECT_REF. */ *************** patch_assignment (node, wfl_op1) *** 12749,12775 **** /* Get the array pointer expr. */ array = TREE_OPERAND (array, 0); store_check = build_java_arraystore_check (array, new_rhs); ! index_expr = TREE_OPERAND (lvalue, 1); ! if (TREE_CODE (index_expr) == COMPOUND_EXPR) { ! /* A COMPOUND_EXPR here is a bounds check. The bounds check must happen before the store check, so prepare to insert the store check within the second operand of the existing COMPOUND_EXPR. */ base = index_expr; } else base = lvalue; ! index_expr = TREE_OPERAND (base, 1); ! TREE_OPERAND (base, 1) = build (COMPOUND_EXPR, TREE_TYPE (index_expr), store_check, index_expr); } /* Final locals can be used as case values in switch statement. Prepare them for this eventuality. */ ! if (TREE_CODE (lvalue) == VAR_DECL && DECL_FINAL (lvalue) && TREE_CONSTANT (new_rhs) && IDENTIFIER_LOCAL_VALUE (DECL_NAME (lvalue)) --- 12917,12943 ---- /* Get the array pointer expr. */ array = TREE_OPERAND (array, 0); store_check = build_java_arraystore_check (array, new_rhs); ! index_expr = TREE_OPERAND (lvalue, 1); ! if (TREE_CODE (index_expr) == COMPOUND_EXPR) { ! /* A COMPOUND_EXPR here is a bounds check. The bounds check must happen before the store check, so prepare to insert the store check within the second operand of the existing COMPOUND_EXPR. */ base = index_expr; } else base = lvalue; ! index_expr = TREE_OPERAND (base, 1); ! TREE_OPERAND (base, 1) = build (COMPOUND_EXPR, TREE_TYPE (index_expr), store_check, index_expr); } /* Final locals can be used as case values in switch statement. Prepare them for this eventuality. */ ! if (TREE_CODE (lvalue) == VAR_DECL && DECL_FINAL (lvalue) && TREE_CONSTANT (new_rhs) && IDENTIFIER_LOCAL_VALUE (DECL_NAME (lvalue)) *************** patch_assignment (node, wfl_op1) *** 12780,12785 **** --- 12948,12990 ---- DECL_INITIAL (lvalue) = new_rhs; } + /* Copy the rhs if it's a reference. */ + if (! flag_check_references && ! flag_emit_class_files && optimize > 0) + { + switch (TREE_CODE (new_rhs)) + { + case ARRAY_REF: + case INDIRECT_REF: + case COMPONENT_REF: + /* Transform a = foo.bar + into a = { int tmp; tmp = foo.bar; tmp; ). + We need to ensure that if a read from memory fails + because of a NullPointerException, a destination variable + will remain unchanged. An explicit temporary does what + we need. + + If flag_check_references is set, this is unnecessary + because we'll check each reference before doing any + reads. If optimize is not set the result will never be + written to a stack slot that contains the LHS. */ + { + tree tmp = build_decl (VAR_DECL, get_identifier (""), + TREE_TYPE (new_rhs)); + tree block = build (BLOCK, TREE_TYPE (new_rhs), NULL); + tree assignment + = build (MODIFY_EXPR, TREE_TYPE (new_rhs), tmp, fold (new_rhs)); + BLOCK_VARS (block) = tmp; + BLOCK_EXPR_BODY (block) + = build (COMPOUND_EXPR, TREE_TYPE (new_rhs), assignment, tmp); + TREE_SIDE_EFFECTS (block) = 1; + new_rhs = block; + } + break; + default: + break; + } + } + TREE_OPERAND (node, 0) = lvalue; TREE_OPERAND (node, 1) = new_rhs; TREE_TYPE (node) = lhs_type; *************** try_builtin_assignconv (wfl_op1, lhs_typ *** 12838,12857 **** else if (valid_builtin_assignconv_identity_widening_p (lhs_type, rhs_type)) new_rhs = convert (lhs_type, rhs); ! /* Try a narrowing primitive conversion (5.1.3): ! - expression is a constant expression of type int AND - variable is byte, short or char AND ! - The value of the expression is representable in the type of the variable */ ! else if (rhs_type == int_type_node && TREE_CONSTANT (rhs) && (lhs_type == byte_type_node || lhs_type == char_type_node || lhs_type == short_type_node)) { if (int_fits_type_p (rhs, lhs_type)) new_rhs = convert (lhs_type, rhs); else if (wfl_op1) /* Might be called with a NULL */ ! parse_warning_context ! (wfl_op1, "Constant expression `%s' too wide for narrowing primitive conversion to `%s'", print_int_node (rhs), lang_printable_name (lhs_type, 0)); /* Reported a warning that will turn into an error further down, so we don't return */ --- 13043,13065 ---- else if (valid_builtin_assignconv_identity_widening_p (lhs_type, rhs_type)) new_rhs = convert (lhs_type, rhs); ! /* Try a narrowing primitive conversion (5.1.3): ! - expression is a constant expression of type byte, short, char, ! or int, AND - variable is byte, short or char AND ! - The value of the expression is representable in the type of the variable */ ! else if ((rhs_type == byte_type_node || rhs_type == short_type_node ! || rhs_type == char_type_node || rhs_type == int_type_node) ! && TREE_CONSTANT (rhs) && (lhs_type == byte_type_node || lhs_type == char_type_node || lhs_type == short_type_node)) { if (int_fits_type_p (rhs, lhs_type)) new_rhs = convert (lhs_type, rhs); else if (wfl_op1) /* Might be called with a NULL */ ! parse_warning_context ! (wfl_op1, "Constant expression `%s' too wide for narrowing primitive conversion to `%s'", print_int_node (rhs), lang_printable_name (lhs_type, 0)); /* Reported a warning that will turn into an error further down, so we don't return */ *************** valid_builtin_assignconv_identity_wideni *** 12896,12902 **** /* From here, an integral is widened if its precision is smaller than the precision of the LHS or if the LHS is a floating point type, or the RHS is a float and the RHS a double. */ ! if ((JINTEGRAL_TYPE_P (rhs_type) && JINTEGRAL_TYPE_P (lhs_type) && (TYPE_PRECISION (rhs_type) < TYPE_PRECISION (lhs_type))) || (JINTEGRAL_TYPE_P (rhs_type) && JFLOAT_TYPE_P (lhs_type)) || (rhs_type == float_type_node && lhs_type == double_type_node)) --- 13104,13110 ---- /* From here, an integral is widened if its precision is smaller than the precision of the LHS or if the LHS is a floating point type, or the RHS is a float and the RHS a double. */ ! if ((JINTEGRAL_TYPE_P (rhs_type) && JINTEGRAL_TYPE_P (lhs_type) && (TYPE_PRECISION (rhs_type) < TYPE_PRECISION (lhs_type))) || (JINTEGRAL_TYPE_P (rhs_type) && JFLOAT_TYPE_P (lhs_type)) || (rhs_type == float_type_node && lhs_type == double_type_node)) *************** valid_ref_assignconv_cast_p (source, des *** 12944,12950 **** if (TYPE_CLASS_P (source)) { if (TYPE_CLASS_P (dest)) ! return (source == dest || inherits_from_p (source, dest) || (cast && inherits_from_p (dest, source))); if (TYPE_INTERFACE_P (dest)) --- 13152,13158 ---- if (TYPE_CLASS_P (source)) { if (TYPE_CLASS_P (dest)) ! return (source == dest || inherits_from_p (source, dest) || (cast && inherits_from_p (dest, source))); if (TYPE_INTERFACE_P (dest)) *************** valid_ref_assignconv_cast_p (source, des *** 12985,13000 **** tree source_type; tree source_sig; tree source_name; ! for (method_source = TYPE_METHODS (source); method_source; method_source = TREE_CHAIN (method_source)) { ! source_sig = build_java_argument_signature (TREE_TYPE (method_source)); source_type = TREE_TYPE (TREE_TYPE (method_source)); source_name = DECL_NAME (method_source); for (method_dest = TYPE_METHODS (dest); method_dest; method_dest = TREE_CHAIN (method_dest)) ! if (source_sig == build_java_argument_signature (TREE_TYPE (method_dest)) && source_name == DECL_NAME (method_dest) && source_type != TREE_TYPE (TREE_TYPE (method_dest))) --- 13193,13208 ---- tree source_type; tree source_sig; tree source_name; ! for (method_source = TYPE_METHODS (source); method_source; method_source = TREE_CHAIN (method_source)) { ! source_sig = build_java_argument_signature (TREE_TYPE (method_source)); source_type = TREE_TYPE (TREE_TYPE (method_source)); source_name = DECL_NAME (method_source); for (method_dest = TYPE_METHODS (dest); method_dest; method_dest = TREE_CHAIN (method_dest)) ! if (source_sig == build_java_argument_signature (TREE_TYPE (method_dest)) && source_name == DECL_NAME (method_dest) && source_type != TREE_TYPE (TREE_TYPE (method_dest))) *************** valid_ref_assignconv_cast_p (source, des *** 13009,13017 **** { /* Array */ return (cast ! && (DECL_NAME (TYPE_NAME (source)) == java_lang_cloneable || (DECL_NAME (TYPE_NAME (source)) ! == java_io_serializable))); } } if (TYPE_ARRAY_P (source)) --- 13217,13226 ---- { /* Array */ return (cast ! && (DECL_NAME (TYPE_NAME (source)) ! == java_lang_cloneable_identifier_node || (DECL_NAME (TYPE_NAME (source)) ! == java_io_serializable_identifier_node))); } } if (TYPE_ARRAY_P (source)) *************** valid_ref_assignconv_cast_p (source, des *** 13021,13033 **** /* Can't cast an array to an interface unless the interface is java.lang.Cloneable or java.io.Serializable. */ if (TYPE_INTERFACE_P (dest)) ! return (DECL_NAME (TYPE_NAME (dest)) == java_lang_cloneable ! || DECL_NAME (TYPE_NAME (dest)) == java_io_serializable); else /* Arrays */ { tree source_element_type = TYPE_ARRAY_ELEMENT (source); tree dest_element_type = TYPE_ARRAY_ELEMENT (dest); ! /* In case of severe errors, they turn out null */ if (!dest_element_type || !source_element_type) return 0; --- 13230,13244 ---- /* Can't cast an array to an interface unless the interface is java.lang.Cloneable or java.io.Serializable. */ if (TYPE_INTERFACE_P (dest)) ! return (DECL_NAME (TYPE_NAME (dest)) ! == java_lang_cloneable_identifier_node ! || (DECL_NAME (TYPE_NAME (dest)) ! == java_io_serializable_identifier_node)); else /* Arrays */ { tree source_element_type = TYPE_ARRAY_ELEMENT (source); tree dest_element_type = TYPE_ARRAY_ELEMENT (dest); ! /* In case of severe errors, they turn out null */ if (!dest_element_type || !source_element_type) return 0; *************** do_unary_numeric_promotion (arg) *** 13075,13081 **** return arg; } ! /* Return a non zero value if SOURCE can be converted into DEST using the method invocation conversion rule (5.3). */ static int valid_method_invocation_conversion_p (dest, source) --- 13286,13292 ---- return arg; } ! /* Return a nonzero value if SOURCE can be converted into DEST using the method invocation conversion rule (5.3). */ static int valid_method_invocation_conversion_p (dest, source) *************** operator_string (node) *** 13119,13125 **** sprintf (buffer, "%s%s", S, (COMPOUND_ASSIGN_P (node) ? "=" : "")); \ return buffer; \ } ! static char buffer [10]; switch (TREE_CODE (node)) { --- 13330,13336 ---- sprintf (buffer, "%s%s", S, (COMPOUND_ASSIGN_P (node) ? "=" : "")); \ return buffer; \ } ! static char buffer [10]; switch (TREE_CODE (node)) { *************** java_decl_equiv (var_acc1, var_acc2) *** 13166,13172 **** { if (JDECL_P (var_acc1)) return (var_acc1 == var_acc2); ! return (TREE_CODE (var_acc1) == COMPONENT_REF && TREE_CODE (var_acc2) == COMPONENT_REF && TREE_OPERAND (TREE_OPERAND (var_acc1, 0), 0) --- 13377,13383 ---- { if (JDECL_P (var_acc1)) return (var_acc1 == var_acc2); ! return (TREE_CODE (var_acc1) == COMPONENT_REF && TREE_CODE (var_acc2) == COMPONENT_REF && TREE_OPERAND (TREE_OPERAND (var_acc1, 0), 0) *************** java_decl_equiv (var_acc1, var_acc2) *** 13174,13180 **** && TREE_OPERAND (var_acc1, 1) == TREE_OPERAND (var_acc2, 1)); } ! /* Return a non zero value if CODE is one of the operators that can be used in conjunction with the `=' operator in a compound assignment. */ static int --- 13385,13391 ---- && TREE_OPERAND (var_acc1, 1) == TREE_OPERAND (var_acc2, 1)); } ! /* Return a nonzero value if CODE is one of the operators that can be used in conjunction with the `=' operator in a compound assignment. */ static int *************** java_refold (t) *** 13208,13214 **** /* Now the left branch of the binary operator. */ b = TREE_OPERAND (TREE_OPERAND (c, 1), 0); ! if (! (b && TREE_CODE (b) == NOP_EXPR && TREE_CODE (TREE_OPERAND (b, 0)) == SAVE_EXPR)) return t; --- 13419,13425 ---- /* Now the left branch of the binary operator. */ b = TREE_OPERAND (TREE_OPERAND (c, 1), 0); ! if (! (b && TREE_CODE (b) == NOP_EXPR && TREE_CODE (TREE_OPERAND (b, 0)) == SAVE_EXPR)) return t; *************** patch_binop (node, wfl_op1, wfl_op2) *** 13262,13268 **** error situation, unless it's too early to tell (in case we're handling a `+', `==', `!=' or `instanceof'.) We want to set op_type correctly so the error can be later on reported accurately. */ ! if (! (code == PLUS_EXPR || code == NE_EXPR || code == EQ_EXPR || code == INSTANCEOF_EXPR)) { tree n; --- 13473,13479 ---- error situation, unless it's too early to tell (in case we're handling a `+', `==', `!=' or `instanceof'.) We want to set op_type correctly so the error can be later on reported accurately. */ ! if (! (code == PLUS_EXPR || code == NE_EXPR || code == EQ_EXPR || code == INSTANCEOF_EXPR)) { tree n; *************** patch_binop (node, wfl_op1, wfl_op2) *** 13307,13313 **** parse_warning_context (wfl_operator, "Evaluating this expression will result in an arithmetic exception being thrown"); TREE_CONSTANT (node) = 0; } ! /* Change the division operator if necessary */ if (code == RDIV_EXPR && TREE_CODE (prom_type) == INTEGER_TYPE) TREE_SET_CODE (node, TRUNC_DIV_EXPR); --- 13518,13524 ---- parse_warning_context (wfl_operator, "Evaluating this expression will result in an arithmetic exception being thrown"); TREE_CONSTANT (node) = 0; } ! /* Change the division operator if necessary */ if (code == RDIV_EXPR && TREE_CODE (prom_type) == INTEGER_TYPE) TREE_SET_CODE (node, TRUNC_DIV_EXPR); *************** patch_binop (node, wfl_op1, wfl_op2) *** 13330,13336 **** && ! flag_emit_class_files && (code == RDIV_EXPR || code == TRUNC_MOD_EXPR)) return build_java_soft_divmod (TREE_CODE (node), prom_type, op1, op2); ! /* This one is more complicated. FLOATs are processed by a function call to soft_fmod. Duplicate the value of the COMPOUND_ASSIGN_P flag. */ --- 13541,13547 ---- && ! flag_emit_class_files && (code == RDIV_EXPR || code == TRUNC_MOD_EXPR)) return build_java_soft_divmod (TREE_CODE (node), prom_type, op1, op2); ! /* This one is more complicated. FLOATs are processed by a function call to soft_fmod. Duplicate the value of the COMPOUND_ASSIGN_P flag. */ *************** patch_binop (node, wfl_op1, wfl_op2) *** 13352,13358 **** purpose of the a previous usage of the String concatenation operator */ ! if (TREE_CODE (op1) == STRING_CST || TREE_CODE (op2) == STRING_CST || JSTRING_TYPE_P (op1_type) || JSTRING_TYPE_P (op2_type) --- 13563,13569 ---- purpose of the a previous usage of the String concatenation operator */ ! if (TREE_CODE (op1) == STRING_CST || TREE_CODE (op2) == STRING_CST || JSTRING_TYPE_P (op1_type) || JSTRING_TYPE_P (op2_type) *************** patch_binop (node, wfl_op1, wfl_op2) *** 13392,13398 **** lang_printable_name (op2_type, 0)); else parse_error_context (wfl_operator, ! "Incompatible type for `%s'. Can't convert shift distance from `%s' to integral", operator_string (node), lang_printable_name (op2_type, 0)); } --- 13603,13609 ---- lang_printable_name (op2_type, 0)); else parse_error_context (wfl_operator, ! "Incompatible type for `%s'. Can't convert shift distance from `%s' to integral", operator_string (node), lang_printable_name (op2_type, 0)); } *************** patch_binop (node, wfl_op1, wfl_op2) *** 13406,13428 **** op1 = do_unary_numeric_promotion (op1); op2 = do_unary_numeric_promotion (op2); /* The type of the shift expression is the type of the promoted type of the left-hand operand */ prom_type = TREE_TYPE (op1); /* Shift int only up to 0x1f and long up to 0x3f */ if (prom_type == int_type_node) ! op2 = fold (build (BIT_AND_EXPR, int_type_node, op2, build_int_2 (0x1f, 0))); else ! op2 = fold (build (BIT_AND_EXPR, int_type_node, op2, build_int_2 (0x3f, 0))); /* The >>> operator is a >> operating on unsigned quantities */ if (code == URSHIFT_EXPR && ! flag_emit_class_files) { tree to_return; ! tree utype = unsigned_type (prom_type); op1 = convert (utype, op1); TREE_SET_CODE (node, RSHIFT_EXPR); TREE_OPERAND (node, 0) = op1; --- 13617,13644 ---- op1 = do_unary_numeric_promotion (op1); op2 = do_unary_numeric_promotion (op2); + /* If the right hand side is of type `long', first cast it to + `int'. */ + if (TREE_TYPE (op2) == long_type_node) + op2 = build1 (CONVERT_EXPR, int_type_node, op2); + /* The type of the shift expression is the type of the promoted type of the left-hand operand */ prom_type = TREE_TYPE (op1); /* Shift int only up to 0x1f and long up to 0x3f */ if (prom_type == int_type_node) ! op2 = fold (build (BIT_AND_EXPR, int_type_node, op2, build_int_2 (0x1f, 0))); else ! op2 = fold (build (BIT_AND_EXPR, int_type_node, op2, build_int_2 (0x3f, 0))); /* The >>> operator is a >> operating on unsigned quantities */ if (code == URSHIFT_EXPR && ! flag_emit_class_files) { tree to_return; ! tree utype = java_unsigned_type (prom_type); op1 = convert (utype, op1); TREE_SET_CODE (node, RSHIFT_EXPR); TREE_OPERAND (node, 0) = op1; *************** patch_binop (node, wfl_op1, wfl_op2) *** 13442,13447 **** --- 13658,13672 ---- TREE_TYPE (node) = boolean_type_node; + /* OP1_TYPE might be NULL when OP1 is a string constant. */ + if ((cn = patch_string (op1))) + { + op1 = cn; + op1_type = TREE_TYPE (op1); + } + if (op1_type == NULL_TREE) + abort (); + if (!(op2_type = resolve_type_during_patch (op2))) return error_mark_node; *************** patch_binop (node, wfl_op1, wfl_op2) *** 13480,13492 **** { char *t1 = xstrdup (lang_printable_name (op1_type, 0)); SET_WFL_OPERATOR (wfl_operator, node, wfl_op1); ! parse_error_context (wfl_operator, "Impossible for `%s' to be instance of `%s'", t1, lang_printable_name (op2_type, 0)); free (t1); error_found = 1; } ! break; /* 15.21 Bitwise and Logical Operators */ --- 13705,13717 ---- { char *t1 = xstrdup (lang_printable_name (op1_type, 0)); SET_WFL_OPERATOR (wfl_operator, node, wfl_op1); ! parse_error_context (wfl_operator, "Impossible for `%s' to be instance of `%s'", t1, lang_printable_name (op2_type, 0)); free (t1); error_found = 1; } ! break; /* 15.21 Bitwise and Logical Operators */ *************** patch_binop (node, wfl_op1, wfl_op2) *** 13498,13504 **** expression retain that type */ prom_type = binary_numeric_promotion (op1_type, op2_type, &op1, &op2); ! else if (TREE_CODE (op1_type) == BOOLEAN_TYPE && TREE_CODE (op1_type) == BOOLEAN_TYPE) /* The type of the bitwise operator expression is BOOLEAN */ prom_type = boolean_type_node; --- 13723,13729 ---- expression retain that type */ prom_type = binary_numeric_promotion (op1_type, op2_type, &op1, &op2); ! else if (TREE_CODE (op1_type) == BOOLEAN_TYPE && TREE_CODE (op1_type) == BOOLEAN_TYPE) /* The type of the bitwise operator expression is BOOLEAN */ prom_type = boolean_type_node; *************** patch_binop (node, wfl_op1, wfl_op2) *** 13520,13526 **** /* 15.23 Conditional-Or Operator */ case TRUTH_ORIF_EXPR: /* Operands must be of BOOLEAN type */ ! if (TREE_CODE (op1_type) != BOOLEAN_TYPE || TREE_CODE (op2_type) != BOOLEAN_TYPE) { if (TREE_CODE (op1_type) != BOOLEAN_TYPE) --- 13745,13751 ---- /* 15.23 Conditional-Or Operator */ case TRUTH_ORIF_EXPR: /* Operands must be of BOOLEAN type */ ! if (TREE_CODE (op1_type) != BOOLEAN_TYPE || TREE_CODE (op2_type) != BOOLEAN_TYPE) { if (TREE_CODE (op1_type) != BOOLEAN_TYPE) *************** patch_binop (node, wfl_op1, wfl_op2) *** 13570,13617 **** case EQ_EXPR: case NE_EXPR: /* It's time for us to patch the strings. */ ! if ((cn = patch_string (op1))) { op1 = cn; op1_type = TREE_TYPE (op1); } ! if ((cn = patch_string (op2))) { op2 = cn; op2_type = TREE_TYPE (op2); } ! /* 15.20.1 Numerical Equality Operators == and != */ /* Binary numeric promotion is performed on the operands */ if (JNUMERIC_TYPE_P (op1_type) && JNUMERIC_TYPE_P (op2_type)) binary_numeric_promotion (op1_type, op2_type, &op1, &op2); ! /* 15.20.2 Boolean Equality Operators == and != */ else if (TREE_CODE (op1_type) == BOOLEAN_TYPE && TREE_CODE (op2_type) == BOOLEAN_TYPE) ; /* Nothing to do here */ ! /* 15.20.3 Reference Equality Operators == and != */ /* Types have to be either references or the null type. If they're references, it must be possible to convert either type to the other by casting conversion. */ ! else if (op1 == null_pointer_node || op2 == null_pointer_node || (JREFERENCE_TYPE_P (op1_type) && JREFERENCE_TYPE_P (op2_type) && (valid_ref_assignconv_cast_p (op1_type, op2_type, 1) ! || valid_ref_assignconv_cast_p (op2_type, op1_type, 1)))) ; /* Nothing to do here */ ! /* Else we have an error figure what can't be converted into what and report the error */ else { char *t1; t1 = xstrdup (lang_printable_name (op1_type, 0)); ! parse_error_context (wfl_operator, "Incompatible type for `%s'. Can't convert `%s' to `%s'", ! operator_string (node), t1, lang_printable_name (op2_type, 0)); free (t1); TREE_TYPE (node) = boolean_type_node; --- 13795,13842 ---- case EQ_EXPR: case NE_EXPR: /* It's time for us to patch the strings. */ ! if ((cn = patch_string (op1))) { op1 = cn; op1_type = TREE_TYPE (op1); } ! if ((cn = patch_string (op2))) { op2 = cn; op2_type = TREE_TYPE (op2); } ! /* 15.20.1 Numerical Equality Operators == and != */ /* Binary numeric promotion is performed on the operands */ if (JNUMERIC_TYPE_P (op1_type) && JNUMERIC_TYPE_P (op2_type)) binary_numeric_promotion (op1_type, op2_type, &op1, &op2); ! /* 15.20.2 Boolean Equality Operators == and != */ else if (TREE_CODE (op1_type) == BOOLEAN_TYPE && TREE_CODE (op2_type) == BOOLEAN_TYPE) ; /* Nothing to do here */ ! /* 15.20.3 Reference Equality Operators == and != */ /* Types have to be either references or the null type. If they're references, it must be possible to convert either type to the other by casting conversion. */ ! else if (op1 == null_pointer_node || op2 == null_pointer_node || (JREFERENCE_TYPE_P (op1_type) && JREFERENCE_TYPE_P (op2_type) && (valid_ref_assignconv_cast_p (op1_type, op2_type, 1) ! || valid_ref_assignconv_cast_p (op2_type, op1_type, 1)))) ; /* Nothing to do here */ ! /* Else we have an error figure what can't be converted into what and report the error */ else { char *t1; t1 = xstrdup (lang_printable_name (op1_type, 0)); ! parse_error_context (wfl_operator, "Incompatible type for `%s'. Can't convert `%s' to `%s'", ! operator_string (node), t1, lang_printable_name (op2_type, 0)); free (t1); TREE_TYPE (node) = boolean_type_node; *************** patch_binop (node, wfl_op1, wfl_op2) *** 13631,13637 **** TREE_OPERAND (node, 1) = op2; TREE_TYPE (node) = prom_type; TREE_SIDE_EFFECTS (node) = TREE_SIDE_EFFECTS (op1) | TREE_SIDE_EFFECTS (op2); ! if (flag_emit_xref) return node; --- 13856,13862 ---- TREE_OPERAND (node, 1) = op2; TREE_TYPE (node) = prom_type; TREE_SIDE_EFFECTS (node) = TREE_SIDE_EFFECTS (op1) | TREE_SIDE_EFFECTS (op2); ! if (flag_emit_xref) return node; *************** do_merge_string_cste (cste, string, stri *** 13674,13715 **** } /* Tries to merge OP1 (a STRING_CST) and OP2 (if suitable). Return a ! new STRING_CST on success, NULL_TREE on failure */ static tree merge_string_cste (op1, op2, after) tree op1, op2; int after; { ! /* Handle two string constants right away */ if (TREE_CODE (op2) == STRING_CST) ! return do_merge_string_cste (op1, TREE_STRING_POINTER (op2), TREE_STRING_LENGTH (op2), after); ! ! /* Reasonable integer constant can be treated right away */ if (TREE_CODE (op2) == INTEGER_CST && !TREE_CONSTANT_OVERFLOW (op2)) { static const char *const boolean_true = "true"; static const char *const boolean_false = "false"; static const char *const null_pointer = "null"; ! char ch[3]; const char *string; ! if (op2 == boolean_true_node) string = boolean_true; else if (op2 == boolean_false_node) string = boolean_false; else if (op2 == null_pointer_node) string = null_pointer; else if (TREE_TYPE (op2) == char_type_node) { ! ch[0] = (char )TREE_INT_CST_LOW (op2); ! ch[1] = '\0'; string = ch; } else ! string = print_int_node (op2); ! return do_merge_string_cste (op1, string, strlen (string), after); } return NULL_TREE; --- 13899,13959 ---- } /* Tries to merge OP1 (a STRING_CST) and OP2 (if suitable). Return a ! new STRING_CST on success, NULL_TREE on failure. */ static tree merge_string_cste (op1, op2, after) tree op1, op2; int after; { ! /* Handle two string constants right away. */ if (TREE_CODE (op2) == STRING_CST) ! return do_merge_string_cste (op1, TREE_STRING_POINTER (op2), TREE_STRING_LENGTH (op2), after); ! ! /* Reasonable integer constant can be treated right away. */ if (TREE_CODE (op2) == INTEGER_CST && !TREE_CONSTANT_OVERFLOW (op2)) { static const char *const boolean_true = "true"; static const char *const boolean_false = "false"; static const char *const null_pointer = "null"; ! char ch[4]; const char *string; ! if (op2 == boolean_true_node) string = boolean_true; else if (op2 == boolean_false_node) string = boolean_false; else if (op2 == null_pointer_node) + /* FIXME: null is not a compile-time constant, so it is only safe to + merge if the overall expression is non-constant. However, this + code always merges without checking the overall expression. */ string = null_pointer; else if (TREE_TYPE (op2) == char_type_node) { ! /* Convert the character into UTF-8. */ ! unsigned int c = (unsigned int) TREE_INT_CST_LOW (op2); ! unsigned char *p = (unsigned char *) ch; ! if (0x01 <= c && c <= 0x7f) ! *p++ = (unsigned char) c; ! else if (c < 0x7ff) ! { ! *p++ = (unsigned char) (c >> 6 | 0xc0); ! *p++ = (unsigned char) ((c & 0x3f) | 0x80); ! } ! else ! { ! *p++ = (unsigned char) (c >> 12 | 0xe0); ! *p++ = (unsigned char) (((c >> 6) & 0x3f) | 0x80); ! *p++ = (unsigned char) ((c & 0x3f) | 0x80); ! } ! *p = '\0'; ! string = ch; } else ! string = string_convert_int_cst (op2); ! return do_merge_string_cste (op1, string, strlen (string), after); } return NULL_TREE; *************** string_constant_concatenation (op1, op2) *** 13731,13741 **** { tree string, rest; int invert; ! string = (TREE_CODE (op1) == STRING_CST ? op1 : op2); rest = (string == op1 ? op2 : op1); invert = (string == op1 ? 0 : 1 ); ! /* Walk REST, only if it looks reasonable */ if (TREE_CODE (rest) != STRING_CST && !IS_CRAFTED_STRING_BUFFER_P (rest) --- 13975,13985 ---- { tree string, rest; int invert; ! string = (TREE_CODE (op1) == STRING_CST ? op1 : op2); rest = (string == op1 ? op2 : op1); invert = (string == op1 ? 0 : 1 ); ! /* Walk REST, only if it looks reasonable */ if (TREE_CODE (rest) != STRING_CST && !IS_CRAFTED_STRING_BUFFER_P (rest) *************** build_string_concatenation (op1, op2) *** 13767,13773 **** if (flag_emit_xref) return build (PLUS_EXPR, string_type_node, op1, op2); ! /* Try to do some static optimization */ if ((result = string_constant_concatenation (op1, op2))) return result; --- 14011,14017 ---- if (flag_emit_xref) return build (PLUS_EXPR, string_type_node, op1, op2); ! /* Try to do some static optimization */ if ((result = string_constant_concatenation (op1, op2))) return result; *************** build_string_concatenation (op1, op2) *** 13788,13802 **** op2 = patch_string_cst (op2); /* If either one of the constant is null and the other non null ! operand is a String object, return it. */ ! if (JSTRING_TYPE_P (TREE_TYPE (op1)) && !op2) return op1; /* If OP1 isn't already a StringBuffer, create and initialize a new one */ if (!IS_CRAFTED_STRING_BUFFER_P (op1)) { ! /* Two solutions here: 1) OP1 is a constant string reference, we call new StringBuffer(OP1) 2) OP1 is something else, we call new StringBuffer().append(OP1). */ if (TREE_CONSTANT (op1) && JSTRING_TYPE_P (TREE_TYPE (op1))) --- 14032,14046 ---- op2 = patch_string_cst (op2); /* If either one of the constant is null and the other non null ! operand is a String constant, return it. */ ! if ((TREE_CODE (op1) == STRING_CST) && !op2) return op1; /* If OP1 isn't already a StringBuffer, create and initialize a new one */ if (!IS_CRAFTED_STRING_BUFFER_P (op1)) { ! /* Two solutions here: 1) OP1 is a constant string reference, we call new StringBuffer(OP1) 2) OP1 is something else, we call new StringBuffer().append(OP1). */ if (TREE_CONSTANT (op1) && JSTRING_TYPE_P (TREE_TYPE (op1))) *************** build_incdec (op_token, op_location, op1 *** 13907,13925 **** tree op1; int is_post_p; { ! static const enum tree_code lookup [2][2] = { { PREDECREMENT_EXPR, PREINCREMENT_EXPR, }, { POSTDECREMENT_EXPR, POSTINCREMENT_EXPR, }, }; ! tree node = build (lookup [is_post_p][(op_token - DECR_TK)], NULL_TREE, op1, NULL_TREE); TREE_SIDE_EFFECTS (node) = 1; /* Store the location of the operator, for better error report. The string of the operator will be rebuild based on the OP value. */ EXPR_WFL_LINECOL (node) = op_location; return node; ! } /* Build an incomplete cast operator, based on the use of the CONVERT_EXPR. Note that TREE_TYPE of the constructed node is --- 14151,14169 ---- tree op1; int is_post_p; { ! static const enum tree_code lookup [2][2] = { { PREDECREMENT_EXPR, PREINCREMENT_EXPR, }, { POSTDECREMENT_EXPR, POSTINCREMENT_EXPR, }, }; ! tree node = build (lookup [is_post_p][(op_token - DECR_TK)], NULL_TREE, op1, NULL_TREE); TREE_SIDE_EFFECTS (node) = 1; /* Store the location of the operator, for better error report. The string of the operator will be rebuild based on the OP value. */ EXPR_WFL_LINECOL (node) = op_location; return node; ! } /* Build an incomplete cast operator, based on the use of the CONVERT_EXPR. Note that TREE_TYPE of the constructed node is *************** patch_incomplete_class_ref (node) *** 13958,13964 **** if (!(ref_type = resolve_type_during_patch (type))) return error_mark_node; ! if (!flag_emit_class_files || JPRIMITIVE_TYPE_P (ref_type)) { tree dot = build_class_ref (ref_type); /* A class referenced by `foo.class' is initialized. */ --- 14202,14209 ---- if (!(ref_type = resolve_type_during_patch (type))) return error_mark_node; ! if (!flag_emit_class_files || JPRIMITIVE_TYPE_P (ref_type) ! || TREE_CODE (ref_type) == VOID_TYPE) { tree dot = build_class_ref (ref_type); /* A class referenced by `foo.class' is initialized. */ *************** patch_unaryop (node, wfl_op) *** 14020,14026 **** decl = DECL_FUNCTION_ACCESS_DECL (decl); } /* We really should have a JAVA_ARRAY_EXPR to avoid this */ ! else if (!JDECL_P (decl) && TREE_CODE (decl) != COMPONENT_REF && !(flag_emit_class_files && TREE_CODE (decl) == ARRAY_REF) && TREE_CODE (decl) != INDIRECT_REF --- 14265,14271 ---- decl = DECL_FUNCTION_ACCESS_DECL (decl); } /* We really should have a JAVA_ARRAY_EXPR to avoid this */ ! else if (!JDECL_P (decl) && TREE_CODE (decl) != COMPONENT_REF && !(flag_emit_class_files && TREE_CODE (decl) == ARRAY_REF) && TREE_CODE (decl) != INDIRECT_REF *************** patch_unaryop (node, wfl_op) *** 14031,14037 **** TREE_TYPE (node) = error_mark_node; error_found = 1; } ! /* From now on, we know that op if a variable and that it has a valid wfl. We use wfl_op to locate errors related to the ++/-- operand. */ --- 14276,14282 ---- TREE_TYPE (node) = error_mark_node; error_found = 1; } ! /* From now on, we know that op if a variable and that it has a valid wfl. We use wfl_op to locate errors related to the ++/-- operand. */ *************** patch_unaryop (node, wfl_op) *** 14055,14062 **** else { value = build_int_2 (1, 0); ! TREE_TYPE (node) = ! binary_numeric_promotion (op_type, TREE_TYPE (value), &op, &value); } --- 14300,14307 ---- else { value = build_int_2 (1, 0); ! TREE_TYPE (node) = ! binary_numeric_promotion (op_type, TREE_TYPE (value), &op, &value); } *************** patch_unaryop (node, wfl_op) *** 14064,14073 **** if (outer_field_flag) { /* We re-generate an access to the field */ ! value = build (PLUS_EXPR, TREE_TYPE (op), build_outer_field_access (wfl_op, decl), value); ! ! /* And we patch the original access$() into a write with plus_op as a rhs */ return outer_field_access_fix (node, op, value); } --- 14309,14318 ---- if (outer_field_flag) { /* We re-generate an access to the field */ ! value = build (PLUS_EXPR, TREE_TYPE (op), build_outer_field_access (wfl_op, decl), value); ! ! /* And we patch the original access$() into a write with plus_op as a rhs */ return outer_field_access_fix (node, op, value); } *************** patch_unaryop (node, wfl_op) *** 14152,14158 **** } break; } ! if (error_found) return error_mark_node; --- 14397,14403 ---- } break; } ! if (error_found) return error_mark_node; *************** resolve_type_during_patch (type) *** 14178,14184 **** tree type_decl = resolve_and_layout (EXPR_WFL_NODE (type), type); if (!type_decl) { ! parse_error_context (type, "Class `%s' not found in type declaration", IDENTIFIER_POINTER (EXPR_WFL_NODE (type))); return NULL_TREE; --- 14423,14429 ---- tree type_decl = resolve_and_layout (EXPR_WFL_NODE (type), type); if (!type_decl) { ! parse_error_context (type, "Class `%s' not found in type declaration", IDENTIFIER_POINTER (EXPR_WFL_NODE (type))); return NULL_TREE; *************** patch_cast (node, wfl_op) *** 14237,14243 **** /* The remaining legal casts involve conversion between reference types. Check for their compile time correctness. */ ! if (JREFERENCE_TYPE_P (op_type) && JREFERENCE_TYPE_P (cast_type) && valid_ref_assignconv_cast_p (op_type, cast_type, 1)) { TREE_TYPE (node) = promote_type (cast_type); --- 14482,14488 ---- /* The remaining legal casts involve conversion between reference types. Check for their compile time correctness. */ ! if (JREFERENCE_TYPE_P (op_type) && JREFERENCE_TYPE_P (cast_type) && valid_ref_assignconv_cast_p (op_type, cast_type, 1)) { TREE_TYPE (node) = promote_type (cast_type); *************** patch_array_ref (node) *** 14316,14322 **** /* The array reference must be an array */ if (!TYPE_ARRAY_P (array_type)) { ! parse_error_context (wfl_operator, "`[]' can only be applied to arrays. It can't be applied to `%s'", lang_printable_name (array_type, 0)); --- 14561,14567 ---- /* The array reference must be an array */ if (!TYPE_ARRAY_P (array_type)) { ! parse_error_context (wfl_operator, "`[]' can only be applied to arrays. It can't be applied to `%s'", lang_printable_name (array_type, 0)); *************** build_newarray_node (type, dims, extra_d *** 14366,14372 **** int extra_dims; { tree node = ! build (NEW_ARRAY_EXPR, NULL_TREE, type, nreverse (dims), build_int_2 (extra_dims, 0)); return node; } --- 14611,14617 ---- int extra_dims; { tree node = ! build (NEW_ARRAY_EXPR, NULL_TREE, type, nreverse (dims), build_int_2 (extra_dims, 0)); return node; } *************** patch_newarray (node) *** 14408,14416 **** /* Report errors on types here */ if (dim_error) { ! parse_error_context ! (TREE_PURPOSE (cdim), ! "Incompatible type for dimension in array creation expression. %s convert `%s' to `int'", (valid_cast_to_p (TREE_TYPE (dim), int_type_node) ? "Explicit cast needed to" : "Can't"), lang_printable_name (TREE_TYPE (dim), 0)); --- 14653,14661 ---- /* Report errors on types here */ if (dim_error) { ! parse_error_context ! (TREE_PURPOSE (cdim), ! "Incompatible type for dimension in array creation expression. %s convert `%s' to `int'", (valid_cast_to_p (TREE_TYPE (dim), int_type_node) ? "Explicit cast needed to" : "Can't"), lang_printable_name (TREE_TYPE (dim), 0)); *************** patch_newarray (node) *** 14459,14471 **** (primitive or not) matters. */ if (ndims == 1) return build_new_array (type, TREE_VALUE (dims)); ! /* Can't reuse what's already written in expr.c because it uses the JVM stack representation. Provide a build_multianewarray. FIXME */ return build (CALL_EXPR, array_type, build_address_of (soft_multianewarray_node), tree_cons (NULL_TREE, build_class_ref (TREE_TYPE (array_type)), ! tree_cons (NULL_TREE, build_int_2 (ndims, 0), dims )), NULL_TREE); } --- 14704,14716 ---- (primitive or not) matters. */ if (ndims == 1) return build_new_array (type, TREE_VALUE (dims)); ! /* Can't reuse what's already written in expr.c because it uses the JVM stack representation. Provide a build_multianewarray. FIXME */ return build (CALL_EXPR, array_type, build_address_of (soft_multianewarray_node), tree_cons (NULL_TREE, build_class_ref (TREE_TYPE (array_type)), ! tree_cons (NULL_TREE, build_int_2 (ndims, 0), dims )), NULL_TREE); } *************** patch_new_array_init (type, node) *** 14546,14552 **** TREE_PURPOSE (current) = NULL_TREE; all_constant = 0; } ! if (elt && TREE_CODE (elt) == TREE_LIST && TREE_VALUE (elt) == error_mark_node) error_seen = 1; } --- 14791,14797 ---- TREE_PURPOSE (current) = NULL_TREE; all_constant = 0; } ! if (elt && TREE_CODE (elt) == TREE_LIST && TREE_VALUE (elt) == error_mark_node) error_seen = 1; } *************** array_constructor_check_entry (type, ent *** 14586,14594 **** value = patched; if (value == error_mark_node) return 1; ! type_value = TREE_TYPE (value); ! /* At anytime, try_builtin_assignconv can report a warning on constant overflow during narrowing. */ SET_WFL_OPERATOR (wfl_operator, TREE_PURPOSE (entry), wfl_value); --- 14831,14839 ---- value = patched; if (value == error_mark_node) return 1; ! type_value = TREE_TYPE (value); ! /* At anytime, try_builtin_assignconv can report a warning on constant overflow during narrowing. */ SET_WFL_OPERATOR (wfl_operator, TREE_PURPOSE (entry), wfl_value); *************** array_constructor_check_entry (type, ent *** 14603,14614 **** "Can't" : "Explicit cast needed to"); if (!array_type_string) array_type_string = xstrdup (lang_printable_name (type, 1)); ! parse_error_context (wfl_operator, "Incompatible type for array. %s convert `%s' to `%s'", msg, lang_printable_name (type_value, 1), array_type_string); error_seen = 1; } ! if (new_value) TREE_VALUE (entry) = new_value; --- 14848,14859 ---- "Can't" : "Explicit cast needed to"); if (!array_type_string) array_type_string = xstrdup (lang_printable_name (type, 1)); ! parse_error_context (wfl_operator, "Incompatible type for array. %s convert `%s' to `%s'", msg, lang_printable_name (type_value, 1), array_type_string); error_seen = 1; } ! if (new_value) TREE_VALUE (entry) = new_value; *************** patch_return (node) *** 14669,14675 **** isn't declared with the keyword `void' */ if (!return_exp && (mtype != void_type_node && !DECL_CONSTRUCTOR_P (meth))) error_found = 2; ! if (DECL_INSTINIT_P (current_function_decl)) error_found = 1; --- 14914,14920 ---- isn't declared with the keyword `void' */ if (!return_exp && (mtype != void_type_node && !DECL_CONSTRUCTOR_P (meth))) error_found = 2; ! if (DECL_INSTINIT_P (current_function_decl)) error_found = 1; *************** patch_return (node) *** 14678,14684 **** if (DECL_INSTINIT_P (current_function_decl)) parse_error_context (wfl_operator, "`return' inside instance initializer"); ! else if (DECL_CLINIT_P (current_function_decl)) parse_error_context (wfl_operator, "`return' inside static initializer"); --- 14923,14929 ---- if (DECL_INSTINIT_P (current_function_decl)) parse_error_context (wfl_operator, "`return' inside instance initializer"); ! else if (DECL_CLINIT_P (current_function_decl)) parse_error_context (wfl_operator, "`return' inside static initializer"); *************** patch_return (node) *** 14686,14699 **** else if (!DECL_CONSTRUCTOR_P (meth)) { char *t = xstrdup (lang_printable_name (mtype, 0)); ! parse_error_context (wfl_operator, "`return' with%s value from `%s %s'", ! (error_found == 1 ? "" : "out"), t, lang_printable_name (meth, 0)); free (t); } else ! parse_error_context (wfl_operator, "`return' with value from constructor `%s'", lang_printable_name (meth, 0)); return error_mark_node; --- 14931,14944 ---- else if (!DECL_CONSTRUCTOR_P (meth)) { char *t = xstrdup (lang_printable_name (mtype, 0)); ! parse_error_context (wfl_operator, "`return' with%s value from `%s %s'", ! (error_found == 1 ? "" : "out"), t, lang_printable_name (meth, 0)); free (t); } else ! parse_error_context (wfl_operator, "`return' with value from constructor `%s'", lang_printable_name (meth, 0)); return error_mark_node; *************** patch_return (node) *** 14709,14715 **** if ((patched = patch_string (exp))) exp = patched; ! modify = build (MODIFY_EXPR, NULL_TREE, DECL_RESULT (meth), exp); EXPR_WFL_LINECOL (modify) = EXPR_WFL_LINECOL (node); modify = java_complete_tree (modify); --- 14954,14960 ---- if ((patched = patch_string (exp))) exp = patched; ! modify = build (MODIFY_EXPR, NULL_TREE, DECL_RESULT (meth), exp); EXPR_WFL_LINECOL (modify) = EXPR_WFL_LINECOL (node); modify = java_complete_tree (modify); *************** patch_if_else_statement (node) *** 14759,14771 **** if (TREE_TYPE (expression) != boolean_type_node && TREE_TYPE (expression) != promoted_boolean_type_node) { ! parse_error_context ! (wfl_operator, ! "Incompatible type for `if'. Can't convert `%s' to `boolean'", lang_printable_name (TREE_TYPE (expression), 0)); return error_mark_node; } ! if (TREE_CODE (expression) == INTEGER_CST) { if (integer_zerop (expression)) --- 15004,15016 ---- if (TREE_TYPE (expression) != boolean_type_node && TREE_TYPE (expression) != promoted_boolean_type_node) { ! parse_error_context ! (wfl_operator, ! "Incompatible type for `if'. Can't convert `%s' to `boolean'", lang_printable_name (TREE_TYPE (expression), 0)); return error_mark_node; } ! if (TREE_CODE (expression) == INTEGER_CST) { if (integer_zerop (expression)) *************** build_labeled_block (location, label) *** 14811,14817 **** parse_error_context (wfl_operator, "Declaration of `%s' shadows a previous label declaration", IDENTIFIER_POINTER (label)); ! EXPR_WFL_LINECOL (wfl_operator) = EXPR_WFL_LINECOL (IDENTIFIER_LOCAL_VALUE (label_name)); parse_error_context (wfl_operator, "This is the location of the previous declaration of label `%s'", --- 15056,15062 ---- parse_error_context (wfl_operator, "Declaration of `%s' shadows a previous label declaration", IDENTIFIER_POINTER (label)); ! EXPR_WFL_LINECOL (wfl_operator) = EXPR_WFL_LINECOL (IDENTIFIER_LOCAL_VALUE (label_name)); parse_error_context (wfl_operator, "This is the location of the previous declaration of label `%s'", *************** build_new_loop (loop_body) *** 14861,14871 **** COMPOUND_EXPR (loop main body) EXIT_EXPR (this order is for while/for loops. LABELED_BLOCK_EXPR the order is reversed for do loops) ! LABEL_DECL (a continue occurring here branches at the BODY end of this labeled block) INCREMENT (if any) ! REVERSED, if non zero, tells that the loop condition expr comes after the body, like in the do-while loop. To obtain a loop, the loop body structure described above is --- 15106,15116 ---- COMPOUND_EXPR (loop main body) EXIT_EXPR (this order is for while/for loops. LABELED_BLOCK_EXPR the order is reversed for do loops) ! LABEL_DECL (a continue occurring here branches at the BODY end of this labeled block) INCREMENT (if any) ! REVERSED, if nonzero, tells that the loop condition expr comes after the body, like in the do-while loop. To obtain a loop, the loop body structure described above is *************** build_loop_body (location, condition, re *** 14892,14899 **** body = build_labeled_block (0, continue_identifier_node); first = (reversed ? body : condition); second = (reversed ? condition : body); ! return ! build (COMPOUND_EXPR, NULL_TREE, build (COMPOUND_EXPR, NULL_TREE, first, second), empty_stmt_node); } --- 15137,15144 ---- body = build_labeled_block (0, continue_identifier_node); first = (reversed ? body : condition); second = (reversed ? condition : body); ! return ! build (COMPOUND_EXPR, NULL_TREE, build (COMPOUND_EXPR, NULL_TREE, first, second), empty_stmt_node); } *************** finish_for_loop (location, condition, up *** 14935,14941 **** /* Put the condition and the loop body in place */ tree loop = finish_loop_body (location, condition, body, 0); /* LOOP is the current loop which has been now popped of the loop ! stack. Install the update block */ LOOP_EXPR_BODY_UPDATE_BLOCK (LOOP_EXPR_BODY (loop)) = update; return loop; } --- 15180,15206 ---- /* Put the condition and the loop body in place */ tree loop = finish_loop_body (location, condition, body, 0); /* LOOP is the current loop which has been now popped of the loop ! stack. Mark the update block as reachable and install it. We do ! this because the (current interpretation of the) JLS requires ! that the update expression be considered reachable even if the ! for loop's body doesn't complete normally. */ ! if (update != NULL_TREE && update != empty_stmt_node) ! { ! tree up2 = update; ! if (TREE_CODE (up2) == EXPR_WITH_FILE_LOCATION) ! up2 = EXPR_WFL_NODE (up2); ! /* It is possible for the update expression to be an ! EXPR_WFL_NODE wrapping nothing. */ ! if (up2 != NULL_TREE && up2 != empty_stmt_node) ! { ! /* Try to detect constraint violations. These would be ! programming errors somewhere. */ ! if (! IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (TREE_CODE (up2))) ! || TREE_CODE (up2) == LOOP_EXPR) ! abort (); ! SUPPRESS_UNREACHABLE_ERROR (up2) = 1; ! } ! } LOOP_EXPR_BODY_UPDATE_BLOCK (LOOP_EXPR_BODY (loop)) = update; return loop; } *************** build_bc_statement (location, is_break, *** 15022,15028 **** if (name) { ! if (!(label_block_expr = IDENTIFIER_LOCAL_VALUE (merge_qualified_name (label_id, EXPR_WFL_NODE (name))))) /* Null means that we don't have a target for this named break/continue. In this case, we make the target to be the --- 15287,15293 ---- if (name) { ! if (!(label_block_expr = IDENTIFIER_LOCAL_VALUE (merge_qualified_name (label_id, EXPR_WFL_NODE (name))))) /* Null means that we don't have a target for this named break/continue. In this case, we make the target to be the *************** build_bc_statement (location, is_break, *** 15032,15038 **** } /* Unlabeled break/continue will be handled during the break/continue patch operation */ ! break_continue = build (EXIT_BLOCK_EXPR, NULL_TREE, label_block_expr, NULL_TREE); IS_BREAK_STMT_P (break_continue) = is_break; --- 15297,15303 ---- } /* Unlabeled break/continue will be handled during the break/continue patch operation */ ! break_continue = build (EXIT_BLOCK_EXPR, NULL_TREE, label_block_expr, NULL_TREE); IS_BREAK_STMT_P (break_continue) = is_break; *************** patch_bc_statement (node) *** 15051,15057 **** tree bc_label = EXIT_BLOCK_LABELED_BLOCK (node), target_stmt; tree labeled_block = ctxp->current_labeled_block; EXPR_WFL_LINECOL (wfl_operator) = EXPR_WFL_LINECOL (node); ! /* Having an identifier here means that the target is unknown. */ if (bc_label != NULL_TREE && TREE_CODE (bc_label) == IDENTIFIER_NODE) { --- 15316,15322 ---- tree bc_label = EXIT_BLOCK_LABELED_BLOCK (node), target_stmt; tree labeled_block = ctxp->current_labeled_block; EXPR_WFL_LINECOL (wfl_operator) = EXPR_WFL_LINECOL (node); ! /* Having an identifier here means that the target is unknown. */ if (bc_label != NULL_TREE && TREE_CODE (bc_label) == IDENTIFIER_NODE) { *************** patch_bc_statement (node) *** 15070,15076 **** parse_error_context (wfl_operator, "`continue' must be in loop"); else ! parse_error_context (wfl_operator, "continue label `%s' does not name a loop", IDENTIFIER_POINTER (bc_label)); return error_mark_node; --- 15335,15341 ---- parse_error_context (wfl_operator, "`continue' must be in loop"); else ! parse_error_context (wfl_operator, "continue label `%s' does not name a loop", IDENTIFIER_POINTER (bc_label)); return error_mark_node; *************** patch_bc_statement (node) *** 15086,15092 **** } } else if (!bc_label) ! { for (;; labeled_block = TREE_CHAIN (labeled_block)) { if (labeled_block == NULL_TREE) --- 15351,15357 ---- } } else if (!bc_label) ! { for (;; labeled_block = TREE_CHAIN (labeled_block)) { if (labeled_block == NULL_TREE) *************** patch_exit_expr (node) *** 15132,15146 **** /* The type of expression must be boolean */ if (TREE_TYPE (expression) != boolean_type_node) { ! parse_error_context ! (wfl_operator, ! "Incompatible type for loop conditional. Can't convert `%s' to `boolean'", lang_printable_name (TREE_TYPE (expression), 0)); return error_mark_node; } /* Now we know things are allright, invert the condition, fold and return */ ! TREE_OPERAND (node, 0) = fold (build1 (TRUTH_NOT_EXPR, boolean_type_node, expression)); if (! integer_zerop (TREE_OPERAND (node, 0)) --- 15397,15411 ---- /* The type of expression must be boolean */ if (TREE_TYPE (expression) != boolean_type_node) { ! parse_error_context ! (wfl_operator, ! "Incompatible type for loop conditional. Can't convert `%s' to `boolean'", lang_printable_name (TREE_TYPE (expression), 0)); return error_mark_node; } /* Now we know things are allright, invert the condition, fold and return */ ! TREE_OPERAND (node, 0) = fold (build1 (TRUTH_NOT_EXPR, boolean_type_node, expression)); if (! integer_zerop (TREE_OPERAND (node, 0)) *************** patch_switch_statement (node) *** 15226,15236 **** TREE_TYPE (node) = void_type_node; TREE_SIDE_EFFECTS (node) = 1; CAN_COMPLETE_NORMALLY (node) ! = CAN_COMPLETE_NORMALLY (TREE_OPERAND (node, 1)) || ! SWITCH_HAS_DEFAULT (node); return node; } /* 14.18 The try/catch statements */ /* Encapsulate TRY_STMTS' in a try catch sequence. The catch clause --- 15491,15579 ---- TREE_TYPE (node) = void_type_node; TREE_SIDE_EFFECTS (node) = 1; CAN_COMPLETE_NORMALLY (node) ! = CAN_COMPLETE_NORMALLY (TREE_OPERAND (node, 1)) || ! SWITCH_HAS_DEFAULT (node); return node; } + /* Assertions. */ + + /* Build an assertion expression for `assert CONDITION : VALUE'; VALUE + might be NULL_TREE. */ + static tree + build_assertion (location, condition, value) + int location; + tree condition, value; + { + tree node; + tree klass = GET_CPC (); + + if (! CLASS_USES_ASSERTIONS (klass)) + { + tree field, classdollar, id, call; + tree class_type = TREE_TYPE (klass); + + field = add_field (class_type, + get_identifier ("$assertionsDisabled"), + boolean_type_node, + ACC_PRIVATE | ACC_STATIC | ACC_FINAL); + MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC (field); + FIELD_SYNTHETIC (field) = 1; + + if (!TYPE_DOT_CLASS (class_type)) + build_dot_class_method (class_type); + classdollar = build_dot_class_method_invocation (class_type); + + /* Call CLASS.desiredAssertionStatus(). */ + id = build_wfl_node (get_identifier ("desiredAssertionStatus")); + call = build (CALL_EXPR, NULL_TREE, id, NULL_TREE, NULL_TREE); + call = make_qualified_primary (classdollar, call, location); + TREE_SIDE_EFFECTS (call) = 1; + + /* Invert to obtain !CLASS.desiredAssertionStatus(). This may + seem odd, but we do it to generate code identical to that of + the JDK. */ + call = build1 (TRUTH_NOT_EXPR, NULL_TREE, call); + TREE_SIDE_EFFECTS (call) = 1; + DECL_INITIAL (field) = call; + + /* Record the initializer in the initializer statement list. */ + call = build (MODIFY_EXPR, NULL_TREE, field, call); + TREE_CHAIN (call) = CPC_STATIC_INITIALIZER_STMT (ctxp); + SET_CPC_STATIC_INITIALIZER_STMT (ctxp, call); + MODIFY_EXPR_FROM_INITIALIZATION_P (call) = 1; + + CLASS_USES_ASSERTIONS (klass) = 1; + } + + if (value != NULL_TREE) + value = tree_cons (NULL_TREE, value, NULL_TREE); + + node = build_wfl_node (get_identifier ("java")); + node = make_qualified_name (node, build_wfl_node (get_identifier ("lang")), + location); + node = make_qualified_name (node, build_wfl_node (get_identifier ("AssertionError")), + location); + + node = build (NEW_CLASS_EXPR, NULL_TREE, node, value, NULL_TREE); + TREE_SIDE_EFFECTS (node) = 1; + /* It is too early to use BUILD_THROW. */ + node = build1 (THROW_EXPR, NULL_TREE, node); + TREE_SIDE_EFFECTS (node) = 1; + + /* We invert the condition; if we just put NODE as the `else' part + then we generate weird-looking bytecode. */ + condition = build1 (TRUTH_NOT_EXPR, NULL_TREE, condition); + /* Check $assertionsDisabled. */ + condition + = build (TRUTH_ANDIF_EXPR, NULL_TREE, + build1 (TRUTH_NOT_EXPR, NULL_TREE, + build_wfl_node (get_identifier ("$assertionsDisabled"))), + condition); + node = build_if_else_statement (location, condition, node, NULL_TREE); + return node; + } + /* 14.18 The try/catch statements */ /* Encapsulate TRY_STMTS' in a try catch sequence. The catch clause *************** encapsulate_with_try_catch (location, ty *** 15247,15257 **** try_block = build_expr_block (try_stmts, NULL_TREE); /* Build a catch block: we need a catch clause parameter */ ! catch_clause_param = build_decl (VAR_DECL, wpv_id, build_pointer_type (type)); /* And a block */ catch_block = build_expr_block (NULL_TREE, catch_clause_param); ! /* Initialize the variable and store in the block */ catch = build (MODIFY_EXPR, NULL_TREE, catch_clause_param, build (JAVA_EXC_OBJ_EXPR, ptr_type_node)); --- 15590,15600 ---- try_block = build_expr_block (try_stmts, NULL_TREE); /* Build a catch block: we need a catch clause parameter */ ! catch_clause_param = build_decl (VAR_DECL, wpv_id, build_pointer_type (type)); /* And a block */ catch_block = build_expr_block (NULL_TREE, catch_clause_param); ! /* Initialize the variable and store in the block */ catch = build (MODIFY_EXPR, NULL_TREE, catch_clause_param, build (JAVA_EXC_OBJ_EXPR, ptr_type_node)); *************** patch_try_statement (node) *** 15322,15328 **** only parameter of the clause statement in of class Throwable or a subclass of Throwable, but that was done earlier. The catch clause parameter type has also been resolved. */ ! /* Just make sure that the catch clause parameter type inherits from java.lang.Throwable */ if (!inherits_from_p (carg_type, throwable_type_node)) --- 15665,15671 ---- only parameter of the clause statement in of class Throwable or a subclass of Throwable, but that was done earlier. The catch clause parameter type has also been resolved. */ ! /* Just make sure that the catch clause parameter type inherits from java.lang.Throwable */ if (!inherits_from_p (carg_type, throwable_type_node)) *************** patch_try_statement (node) *** 15334,15340 **** error_found = 1; continue; } ! /* Partial check for unreachable catch statement: The catch clause is reachable iff is no earlier catch block A in the try statement such that the type of the catch --- 15677,15683 ---- error_found = 1; continue; } ! /* Partial check for unreachable catch statement: The catch clause is reachable iff is no earlier catch block A in the try statement such that the type of the catch *************** patch_try_statement (node) *** 15351,15357 **** if (inherits_from_p (carg_type, TREE_TYPE (TREE_TYPE (decl)))) { EXPR_WFL_LINECOL (wfl_operator) = EXPR_WFL_LINECOL (current); ! parse_error_context (wfl_operator, "`catch' not reached because of the catch clause at line %d", EXPR_WFL_LINENO (sub_current)); --- 15694,15700 ---- if (inherits_from_p (carg_type, TREE_TYPE (TREE_TYPE (decl)))) { EXPR_WFL_LINECOL (wfl_operator) = EXPR_WFL_LINECOL (current); ! parse_error_context (wfl_operator, "`catch' not reached because of the catch clause at line %d", EXPR_WFL_LINENO (sub_current)); *************** patch_try_statement (node) *** 15387,15393 **** POP_EXCEPTIONS (); /* Verification ends here */ ! if (error_found) return error_mark_node; TREE_OPERAND (node, 0) = try; --- 15730,15736 ---- POP_EXCEPTIONS (); /* Verification ends here */ ! if (error_found) return error_mark_node; TREE_OPERAND (node, 0) = try; *************** patch_synchronized_statement (node, wfl_ *** 15438,15444 **** that the handler that catches all throw exception calls _Jv_MonitorExit and then rethrow the exception. The synchronized statement is then implemented as: ! TRY { _Jv_MonitorEnter (expression) synchronized_block --- 15781,15787 ---- that the handler that catches all throw exception calls _Jv_MonitorExit and then rethrow the exception. The synchronized statement is then implemented as: ! TRY { _Jv_MonitorEnter (expression) synchronized_block *************** patch_throw_statement (node, wfl_op1) *** 15500,15516 **** is explicitly declared in the `throws' clause of each constructor. This doesn't apply to anonymous classes, since they don't have declared constructors. */ ! if (!unchecked_ok && DECL_INSTINIT_P (current_function_decl) && !ANONYMOUS_CLASS_P (current_class)) { tree current; ! for (current = TYPE_METHODS (current_class); current; current = TREE_CHAIN (current)) ! if (DECL_CONSTRUCTOR_P (current) && !check_thrown_exceptions_do (TREE_TYPE (expr))) { ! parse_error_context (wfl_operator, "Checked exception `%s' can't be thrown in instance initializer (not all declared constructor are declaring it in their `throws' clause)", lang_printable_name (TREE_TYPE (expr), 0)); return error_mark_node; } --- 15843,15859 ---- is explicitly declared in the `throws' clause of each constructor. This doesn't apply to anonymous classes, since they don't have declared constructors. */ ! if (!unchecked_ok && DECL_INSTINIT_P (current_function_decl) && !ANONYMOUS_CLASS_P (current_class)) { tree current; ! for (current = TYPE_METHODS (current_class); current; current = TREE_CHAIN (current)) ! if (DECL_CONSTRUCTOR_P (current) && !check_thrown_exceptions_do (TREE_TYPE (expr))) { ! parse_error_context (wfl_operator, "Checked exception `%s' can't be thrown in instance initializer (not all declared constructor are declaring it in their `throws' clause)", lang_printable_name (TREE_TYPE (expr), 0)); return error_mark_node; } *************** patch_throw_statement (node, wfl_op1) *** 15539,15545 **** /* We report that the exception can't be throw from a try block in all circumstances but when the `throw' is inside a static block. */ ! else if (!EXCEPTIONS_P (currently_caught_type_list) && !tryblock_throws_ok) { if (DECL_CLINIT_P (current_function_decl)) --- 15882,15888 ---- /* We report that the exception can't be throw from a try block in all circumstances but when the `throw' is inside a static block. */ ! else if (!EXCEPTIONS_P (currently_caught_type_list) && !tryblock_throws_ok) { if (DECL_CLINIT_P (current_function_decl)) *************** patch_throw_statement (node, wfl_op1) *** 15548,15560 **** lang_printable_name (type, 0)); else parse_error_context (wfl_operator, ! "Checked exception `%s' isn't thrown from a `try' block", lang_printable_name (type, 0)); } /* Otherwise, the current method doesn't have the appropriate throws declaration */ else ! parse_error_context (wfl_operator, "Checked exception `%s' doesn't match any of current method's `throws' declaration(s)", lang_printable_name (type, 0)); return error_mark_node; } --- 15891,15903 ---- lang_printable_name (type, 0)); else parse_error_context (wfl_operator, ! "Checked exception `%s' isn't thrown from a `try' block", lang_printable_name (type, 0)); } /* Otherwise, the current method doesn't have the appropriate throws declaration */ else ! parse_error_context (wfl_operator, "Checked exception `%s' doesn't match any of current method's `throws' declaration(s)", lang_printable_name (type, 0)); return error_mark_node; } *************** check_thrown_exceptions (location, decl) *** 15578,15585 **** { tree throws; /* For all the unchecked exceptions thrown by DECL */ ! for (throws = DECL_FUNCTION_THROWS (decl); throws; ! throws = TREE_CHAIN (throws)) if (!check_thrown_exceptions_do (TREE_VALUE (throws))) { #if 1 --- 15921,15928 ---- { tree throws; /* For all the unchecked exceptions thrown by DECL */ ! for (throws = DECL_FUNCTION_THROWS (decl); throws; ! throws = TREE_CHAIN (throws)) if (!check_thrown_exceptions_do (TREE_VALUE (throws))) { #if 1 *************** check_thrown_exceptions (location, decl) *** 15592,15601 **** parse_error_context (wfl_operator, "Exception `%s' can't be thrown in initializer", lang_printable_name (TREE_VALUE (throws), 0)); ! else { ! parse_error_context ! (wfl_operator, "Exception `%s' must be caught, or it must be declared in the `throws' clause of `%s'", lang_printable_name (TREE_VALUE (throws), 0), (DECL_INIT_P (current_function_decl) ? IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (current_class))) : --- 15935,15944 ---- parse_error_context (wfl_operator, "Exception `%s' can't be thrown in initializer", lang_printable_name (TREE_VALUE (throws), 0)); ! else { ! parse_error_context ! (wfl_operator, "Exception `%s' must be caught, or it must be declared in the `throws' clause of `%s'", lang_printable_name (TREE_VALUE (throws), 0), (DECL_INIT_P (current_function_decl) ? IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (current_class))) : *************** patch_conditional_expr (node, wfl_cond, *** 15718,15724 **** /* Second and third can be numeric, boolean (i.e. primitive), references or null. Anything else results in an error */ if (!((JNUMERIC_TYPE_P (t1) && JNUMERIC_TYPE_P (t2)) ! || ((JREFERENCE_TYPE_P (t1) || op1 == null_pointer_node) && (JREFERENCE_TYPE_P (t2) || op2 == null_pointer_node)) || (t1 == boolean_type_node && t2 == boolean_type_node))) error_found = 1; --- 16061,16067 ---- /* Second and third can be numeric, boolean (i.e. primitive), references or null. Anything else results in an error */ if (!((JNUMERIC_TYPE_P (t1) && JNUMERIC_TYPE_P (t2)) ! || ((JREFERENCE_TYPE_P (t1) || op1 == null_pointer_node) && (JREFERENCE_TYPE_P (t2) || op2 == null_pointer_node)) || (t1 == boolean_type_node && t2 == boolean_type_node))) error_found = 1; *************** patch_conditional_expr (node, wfl_cond, *** 15750,15758 **** /* Otherwise, binary numeric promotion is applied and the resulting type is the promoted type of operand 1 and 2 */ ! else ! resulting_type = binary_numeric_promotion (t1, t2, ! &TREE_OPERAND (node, 1), &TREE_OPERAND (node, 2)); } --- 16093,16101 ---- /* Otherwise, binary numeric promotion is applied and the resulting type is the promoted type of operand 1 and 2 */ ! else ! resulting_type = binary_numeric_promotion (t1, t2, ! &TREE_OPERAND (node, 1), &TREE_OPERAND (node, 2)); } *************** fold_constant_for_init (node, context) *** 15833,15840 **** switch (code) { - case STRING_CST: case INTEGER_CST: case REAL_CST: return node; --- 16176,16185 ---- switch (code) { case INTEGER_CST: + if (node == null_pointer_node) + return NULL_TREE; + case STRING_CST: case REAL_CST: return node; *************** fold_constant_for_init (node, context) *** 15851,15857 **** case BIT_IOR_EXPR: case TRUTH_ANDIF_EXPR: case TRUTH_ORIF_EXPR: ! case EQ_EXPR: case NE_EXPR: case GT_EXPR: case GE_EXPR: --- 16196,16202 ---- case BIT_IOR_EXPR: case TRUTH_ANDIF_EXPR: case TRUTH_ORIF_EXPR: ! case EQ_EXPR: case NE_EXPR: case GT_EXPR: case GE_EXPR: *************** fold_constant_for_init (node, context) *** 15907,15912 **** --- 16252,16259 ---- /* Guard against infinite recursion. */ DECL_INITIAL (node) = NULL_TREE; val = fold_constant_for_init (val, node); + if (val != NULL_TREE && TREE_CODE (val) != STRING_CST) + val = try_builtin_assignconv (NULL_TREE, TREE_TYPE (node), val); DECL_INITIAL (node) = val; return val; *************** fold_constant_for_init (node, context) *** 15922,15928 **** else if (! QUALIFIED_P (name)) { decl = lookup_field_wrapper (DECL_CONTEXT (context), name); ! if (decl == NULL_TREE || (! FIELD_STATIC (decl) && ! FIELD_FINAL (decl))) return NULL_TREE; return fold_constant_for_init (decl, decl); --- 16269,16275 ---- else if (! QUALIFIED_P (name)) { decl = lookup_field_wrapper (DECL_CONTEXT (context), name); ! if (decl == NULL_TREE || (! FIELD_STATIC (decl) && ! FIELD_FINAL (decl))) return NULL_TREE; return fold_constant_for_init (decl, decl); *************** mark_parser_ctxt (p) *** 15990,16002 **** void *p; { struct parser_ctxt *pc = *((struct parser_ctxt **) p); ! int i; if (!pc) return; #ifndef JC1_LITE ! for (i = 0; i < 11; ++i) ggc_mark_tree (pc->modifier_ctx[i]); ggc_mark_tree (pc->class_type); ggc_mark_tree (pc->function_decl); --- 16337,16351 ---- void *p; { struct parser_ctxt *pc = *((struct parser_ctxt **) p); ! #ifndef JC1_LITE ! size_t i; ! #endif if (!pc) return; #ifndef JC1_LITE ! for (i = 0; i < ARRAY_SIZE (pc->modifier_ctx); ++i) ggc_mark_tree (pc->modifier_ctx[i]); ggc_mark_tree (pc->class_type); ggc_mark_tree (pc->function_decl); *************** mark_parser_ctxt (p) *** 16020,16031 **** void init_src_parse () { - /* Register roots with the garbage collector. */ - ggc_add_tree_root (src_parse_roots, sizeof (src_parse_roots) / sizeof(tree)); - /* Sanity check; we've been bit by this before. */ ! if (sizeof (ctxp->modifier_ctx) / sizeof (tree) != ! MODIFIER_TK - PUBLIC_TK) abort (); } --- 16369,16376 ---- void init_src_parse () { /* Sanity check; we've been bit by this before. */ ! if (ARRAY_SIZE (ctxp->modifier_ctx) != MODIFIER_TK - PUBLIC_TK) abort (); } *************** init_src_parse () *** 16036,16051 **** /* Attach to PTR (a block) the declaration found in ENTRY. */ ! static bool attach_init_test_initialization_flags (entry, ptr) ! struct hash_entry *entry; PTR ptr; { tree block = (tree)ptr; ! struct init_test_hash_entry *ite = (struct init_test_hash_entry *) entry; ! ! TREE_CHAIN (ite->init_test_decl) = BLOCK_EXPR_DECLS (block); ! BLOCK_EXPR_DECLS (block) = ite->init_test_decl; return true; } --- 16381,16399 ---- /* Attach to PTR (a block) the declaration found in ENTRY. */ ! static int attach_init_test_initialization_flags (entry, ptr) ! PTR *entry; PTR ptr; { tree block = (tree)ptr; ! struct treetreehash_entry *ite = (struct treetreehash_entry *) *entry; ! ! if (block != error_mark_node) ! { ! TREE_CHAIN (ite->value) = BLOCK_EXPR_DECLS (block); ! BLOCK_EXPR_DECLS (block) = ite->value; ! } return true; } *************** attach_init_test_initialization_flags (e *** 16055,16085 **** initialized static class flags if a flag already existed, otherwise a new one is created. */ ! static bool ! emit_test_initialization (entry, info) ! struct hash_entry *entry; PTR info; { tree l = (tree) info; tree decl, init; ! ! struct init_test_hash_entry *ite = (struct init_test_hash_entry *) ! hash_lookup (&DECL_FUNCTION_INIT_TEST_TABLE (current_function_decl), ! entry->key, ! current_function_decl != TREE_PURPOSE (l), NULL); /* If we haven't found a flag and we're dealing with self registered with current_function_decl, then don't do anything. Self is always added as definitely initialized but this information is valid only if used outside the current function. */ ! if (! ite) return true; /* If we don't have a variable, create one and install it. */ ! if (! ite->init_test_decl) { tree block; ! decl = build_decl (VAR_DECL, NULL_TREE, boolean_type_node); MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC (decl); LOCAL_CLASS_INITIALIZATION_FLAG (decl) = 1; --- 16403,16434 ---- initialized static class flags if a flag already existed, otherwise a new one is created. */ ! static int ! emit_test_initialization (entry_p, info) ! PTR *entry_p; PTR info; { tree l = (tree) info; tree decl, init; ! tree key = (tree) *entry_p; ! tree *ite; ! htab_t cf_ht = DECL_FUNCTION_INIT_TEST_TABLE (current_function_decl); /* If we haven't found a flag and we're dealing with self registered with current_function_decl, then don't do anything. Self is always added as definitely initialized but this information is valid only if used outside the current function. */ ! if (current_function_decl == TREE_PURPOSE (l) ! && java_treetreehash_find (cf_ht, key) == NULL) return true; + ite = java_treetreehash_new (cf_ht, key); + /* If we don't have a variable, create one and install it. */ ! if (*ite == NULL) { tree block; ! decl = build_decl (VAR_DECL, NULL_TREE, boolean_type_node); MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC (decl); LOCAL_CLASS_INITIALIZATION_FLAG (decl) = 1; *************** emit_test_initialization (entry, info) *** 16090,16099 **** block = BLOCK_SUBBLOCKS (GET_CURRENT_BLOCK (current_function_decl)); TREE_CHAIN (decl) = BLOCK_EXPR_DECLS (block); BLOCK_EXPR_DECLS (block) = decl; ! ite->init_test_decl = decl; } else ! decl = ite->init_test_decl; /* Now simply augment the compound that holds all the assignments pertaining to this method invocation. */ --- 16439,16448 ---- block = BLOCK_SUBBLOCKS (GET_CURRENT_BLOCK (current_function_decl)); TREE_CHAIN (decl) = BLOCK_EXPR_DECLS (block); BLOCK_EXPR_DECLS (block) = decl; ! *ite = decl; } else ! decl = *ite; /* Now simply augment the compound that holds all the assignments pertaining to this method invocation. */ *************** emit_test_initialization (entry, info) *** 16104,16106 **** --- 16453,16458 ---- return true; } + + #include "gt-java-parse.h" + #include "gtype-java.h" diff -Nrc3pad gcc-3.2.3/gcc/java/rmic.1 gcc-3.3/gcc/java/rmic.1 *** gcc-3.2.3/gcc/java/rmic.1 2003-04-22 07:07:38.000000000 +0000 --- gcc-3.3/gcc/java/rmic.1 2003-05-14 00:32:12.000000000 +0000 *************** *** 1,8 **** ! .\" Automatically generated by Pod::Man version 1.15 ! .\" Tue Apr 22 07:07:38 2003 .\" .\" Standard preamble: ! .\" ====================================================================== .de Sh \" Subsection heading .br .if t .Sp --- 1,7 ---- ! .\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13 .\" .\" Standard preamble: ! .\" ======================================================================== .de Sh \" Subsection heading .br .if t .Sp *************** *** 15,26 **** .if t .sp .5v .if n .sp .. - .de Ip \" List item - .br - .ie \\n(.$>=3 .ne \\$3 - .el .ne 3 - .IP "\\$1" \\$2 - .. .de Vb \" Begin verbatim text .ft CW .nf --- 14,19 ---- *************** *** 28,42 **** .. .de Ve \" End verbatim text .ft R - .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a ! .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used ! .\" to do unbreakable dashes and therefore won't be available. \*(C` and ! .\" \*(C' expand to `' in nroff, nothing in troff, for use with C<> .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ --- 21,34 ---- .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a ! .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to ! .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' ! .\" expand to `' in nroff, nothing in troff, for use with C<>. .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ *************** *** 56,65 **** . ds R" '' 'br\} .\" ! .\" If the F register is turned on, we'll generate index entries on stderr ! .\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and ! .\" index entries marked with X<> in POD. Of course, you'll have to process ! .\" the output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" --- 48,57 ---- . ds R" '' 'br\} .\" ! .\" If the F register is turned on, we'll generate index entries on stderr for ! .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index ! .\" entries marked with X<> in POD. Of course, you'll have to process the ! .\" output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" *************** *** 68,81 **** . rr F .\} .\" ! .\" For nroff, turn off justification. Always turn off hyphenation; it ! .\" makes way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. - .bd B 3 . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 --- 60,72 ---- . rr F .\} .\" ! .\" For nroff, turn off justification. Always turn off hyphenation; it makes ! .\" way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 *************** *** 135,145 **** . ds Ae AE .\} .rm #[ #] #H #V #F C ! .\" ====================================================================== .\" .IX Title "RMIC 1" ! .TH RMIC 1 "gcc-3.2.3" "2003-04-22" "GNU" ! .UC .SH "NAME" rmic \- Generate stubs for Remote Method Invocation .SH "SYNOPSIS" --- 126,135 ---- . ds Ae AE .\} .rm #[ #] #H #V #F C ! .\" ======================================================================== .\" .IX Title "RMIC 1" ! .TH RMIC 1 "2003-05-14" "gcc-3.3" "GNU" .SH "NAME" rmic \- Generate stubs for Remote Method Invocation .SH "SYNOPSIS" *************** Note that this program isn't yet fully c *** 155,210 **** recognized but currently ignored. We have left these options undocumented for now. .PP ! Long options can also be given with a GNU-style leading \fB\--\fR. For ! instance, \fB\*(--help\fR is accepted. .SH "OPTIONS" .IX Header "OPTIONS" ! .Ip "\fB\-keep\fR" 4 .IX Item "-keep" .PD 0 ! .Ip "\fB\-keepgenerated\fR" 4 .IX Item "-keepgenerated" .PD By default, \fBrmic\fR deletes intermediate files. Either of these options causes it not to delete such files. ! .Ip "\fB\-v1.1\fR" 4 .IX Item "-v1.1" Cause \fBrmic\fR to create stubs and skeletons for the 1.1 protocol version. ! .Ip "\fB\-vcompat\fR" 4 .IX Item "-vcompat" Cause \fBrmic\fR to create stubs and skeletons compatible with both the 1.1 and 1.2 protocol versions. This is the default. ! .Ip "\fB\-v1.2\fR" 4 .IX Item "-v1.2" Cause \fBrmic\fR to create stubs and skeletons for the 1.2 protocol version. ! .Ip "\fB\-nocompile\fR" 4 .IX Item "-nocompile" Don't compile the generated files. ! .Ip "\fB\-verbose\fR" 4 .IX Item "-verbose" Print information about what \fBrmic\fR is doing. ! .Ip "\fB\-d\fR \fIdirectory\fR" 4 .IX Item "-d directory" Put output files in \fIdirectory\fR. By default the files are put in the current working directory. ! .Ip "\fB\-help\fR" 4 .IX Item "-help" Print a help message, then exit. ! .Ip "\fB\-version\fR" 4 .IX Item "-version" Print version information, then exit. .SH "SEE ALSO" .IX Header "SEE ALSO" .SH "COPYRIGHT" .IX Header "COPYRIGHT" ! Copyright (C) 2001, 2002 Free Software Foundation, Inc. .PP Permission is granted to copy, distribute and/or modify this document ! under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the Invariant Sections being ``\s-1GNU\s0 General Public License'', the Front-Cover texts being (a) (see below), and with the Back-Cover Texts being (b) (see below). A copy of the license is included in the man page \fIgfdl\fR\|(7). --- 145,214 ---- recognized but currently ignored. We have left these options undocumented for now. .PP ! Long options can also be given with a GNU-style leading \fB\-\-\fR. For ! instance, \fB\-\-help\fR is accepted. .SH "OPTIONS" .IX Header "OPTIONS" ! .IP "\fB\-keep\fR" 4 .IX Item "-keep" .PD 0 ! .IP "\fB\-keepgenerated\fR" 4 .IX Item "-keepgenerated" .PD By default, \fBrmic\fR deletes intermediate files. Either of these options causes it not to delete such files. ! .IP "\fB\-v1.1\fR" 4 .IX Item "-v1.1" Cause \fBrmic\fR to create stubs and skeletons for the 1.1 protocol version. ! .IP "\fB\-vcompat\fR" 4 .IX Item "-vcompat" Cause \fBrmic\fR to create stubs and skeletons compatible with both the 1.1 and 1.2 protocol versions. This is the default. ! .IP "\fB\-v1.2\fR" 4 .IX Item "-v1.2" Cause \fBrmic\fR to create stubs and skeletons for the 1.2 protocol version. ! .IP "\fB\-nocompile\fR" 4 .IX Item "-nocompile" Don't compile the generated files. ! .IP "\fB\-verbose\fR" 4 .IX Item "-verbose" Print information about what \fBrmic\fR is doing. ! .IP "\fB\-d\fR \fIdirectory\fR" 4 .IX Item "-d directory" Put output files in \fIdirectory\fR. By default the files are put in the current working directory. ! .IP "\fB\-help\fR" 4 .IX Item "-help" Print a help message, then exit. ! .IP "\fB\-version\fR" 4 .IX Item "-version" Print version information, then exit. .SH "SEE ALSO" .IX Header "SEE ALSO" .SH "COPYRIGHT" .IX Header "COPYRIGHT" ! Copyright (c) 2001, 2002 Free Software Foundation, Inc. .PP Permission is granted to copy, distribute and/or modify this document ! under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with the Invariant Sections being ``\s-1GNU\s0 General Public License'', the Front-Cover texts being (a) (see below), and with the Back-Cover Texts being (b) (see below). A copy of the license is included in the man page \fIgfdl\fR\|(7). + .PP + (a) The \s-1FSF\s0's Front-Cover Text is: + .PP + .Vb 1 + \& A GNU Manual + .Ve + .PP + (b) The \s-1FSF\s0's Back-Cover Text is: + .PP + .Vb 3 + \& You have freedom to copy and modify this GNU Manual, like GNU + \& software. Copies published by the Free Software Foundation raise + \& funds for GNU development. + .Ve diff -Nrc3pad gcc-3.2.3/gcc/java/rmiregistry.1 gcc-3.3/gcc/java/rmiregistry.1 *** gcc-3.2.3/gcc/java/rmiregistry.1 2003-04-22 07:07:39.000000000 +0000 --- gcc-3.3/gcc/java/rmiregistry.1 2003-05-14 00:32:13.000000000 +0000 *************** *** 1,8 **** ! .\" Automatically generated by Pod::Man version 1.15 ! .\" Tue Apr 22 07:07:39 2003 .\" .\" Standard preamble: ! .\" ====================================================================== .de Sh \" Subsection heading .br .if t .Sp --- 1,7 ---- ! .\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13 .\" .\" Standard preamble: ! .\" ======================================================================== .de Sh \" Subsection heading .br .if t .Sp *************** *** 15,26 **** .if t .sp .5v .if n .sp .. - .de Ip \" List item - .br - .ie \\n(.$>=3 .ne \\$3 - .el .ne 3 - .IP "\\$1" \\$2 - .. .de Vb \" Begin verbatim text .ft CW .nf --- 14,19 ---- *************** *** 28,42 **** .. .de Ve \" End verbatim text .ft R - .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a ! .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used ! .\" to do unbreakable dashes and therefore won't be available. \*(C` and ! .\" \*(C' expand to `' in nroff, nothing in troff, for use with C<> .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ --- 21,34 ---- .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a ! .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to ! .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' ! .\" expand to `' in nroff, nothing in troff, for use with C<>. .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ *************** *** 56,65 **** . ds R" '' 'br\} .\" ! .\" If the F register is turned on, we'll generate index entries on stderr ! .\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and ! .\" index entries marked with X<> in POD. Of course, you'll have to process ! .\" the output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" --- 48,57 ---- . ds R" '' 'br\} .\" ! .\" If the F register is turned on, we'll generate index entries on stderr for ! .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index ! .\" entries marked with X<> in POD. Of course, you'll have to process the ! .\" output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" *************** *** 68,81 **** . rr F .\} .\" ! .\" For nroff, turn off justification. Always turn off hyphenation; it ! .\" makes way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. - .bd B 3 . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 --- 60,72 ---- . rr F .\} .\" ! .\" For nroff, turn off justification. Always turn off hyphenation; it makes ! .\" way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 *************** *** 135,172 **** . ds Ae AE .\} .rm #[ #] #H #V #F C ! .\" ====================================================================== .\" .IX Title "RMIREGISTRY 1" ! .TH RMIREGISTRY 1 "gcc-3.2.3" "2003-04-22" "GNU" ! .UC .SH "NAME" rmiregistry \- Remote object registry .SH "SYNOPSIS" .IX Header "SYNOPSIS" ! \&\fBrmiregistry\fR [\fB\s-1OPTION\s0\fR] ... [\fIport\fR] .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\fBrmiregistry\fR starts a remote object registry on the current host. If no port number is specified, then port 1099 is used. .SH "OPTIONS" .IX Header "OPTIONS" ! .Ip "\fB\*(--help\fR" 4 ! .IX Item "help" Print a help message, then exit. ! .Ip "\fB\*(--version\fR" 4 ! .IX Item "version" Print version information, then exit. .SH "SEE ALSO" .IX Header "SEE ALSO" .SH "COPYRIGHT" .IX Header "COPYRIGHT" ! Copyright (C) 2001, 2002 Free Software Foundation, Inc. .PP Permission is granted to copy, distribute and/or modify this document ! under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the Invariant Sections being ``\s-1GNU\s0 General Public License'', the Front-Cover texts being (a) (see below), and with the Back-Cover Texts being (b) (see below). A copy of the license is included in the man page \fIgfdl\fR\|(7). --- 126,176 ---- . ds Ae AE .\} .rm #[ #] #H #V #F C ! .\" ======================================================================== .\" .IX Title "RMIREGISTRY 1" ! .TH RMIREGISTRY 1 "2003-05-14" "gcc-3.3" "GNU" .SH "NAME" rmiregistry \- Remote object registry .SH "SYNOPSIS" .IX Header "SYNOPSIS" ! \&\fBrmic\fR [\fB\s-1OPTION\s0\fR] ... [\fIport\fR] .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\fBrmiregistry\fR starts a remote object registry on the current host. If no port number is specified, then port 1099 is used. .SH "OPTIONS" .IX Header "OPTIONS" ! .IP "\fB\-\-help\fR" 4 ! .IX Item "--help" Print a help message, then exit. ! .IP "\fB\-\-version\fR" 4 ! .IX Item "--version" Print version information, then exit. .SH "SEE ALSO" .IX Header "SEE ALSO" .SH "COPYRIGHT" .IX Header "COPYRIGHT" ! Copyright (c) 2001, 2002 Free Software Foundation, Inc. .PP Permission is granted to copy, distribute and/or modify this document ! under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with the Invariant Sections being ``\s-1GNU\s0 General Public License'', the Front-Cover texts being (a) (see below), and with the Back-Cover Texts being (b) (see below). A copy of the license is included in the man page \fIgfdl\fR\|(7). + .PP + (a) The \s-1FSF\s0's Front-Cover Text is: + .PP + .Vb 1 + \& A GNU Manual + .Ve + .PP + (b) The \s-1FSF\s0's Back-Cover Text is: + .PP + .Vb 3 + \& You have freedom to copy and modify this GNU Manual, like GNU + \& software. Copies published by the Free Software Foundation raise + \& funds for GNU development. + .Ve diff -Nrc3pad gcc-3.2.3/gcc/java/typeck.c gcc-3.3/gcc/java/typeck.c *** gcc-3.2.3/gcc/java/typeck.c 2001-12-03 23:09:42.000000000 +0000 --- gcc-3.3/gcc/java/typeck.c 2002-08-04 22:45:31.000000000 +0000 *************** The Free Software Foundation is independ *** 28,33 **** --- 28,34 ---- #include "config.h" #include "system.h" #include "tree.h" + #include "real.h" #include "obstack.h" #include "flags.h" #include "java-tree.h" *************** static tree lookup_do PARAMS ((tree, tre *** 43,49 **** static tree build_null_signature PARAMS ((tree)); tree * type_map; - extern struct obstack permanent_obstack; /* Set the type of the local variable with index SLOT to TYPE. */ --- 44,49 ---- *************** convert_to_boolean (type, expr) *** 166,189 **** return build1 (NOP_EXPR, type, expr); } - /* Print an error message for invalid use of an incomplete type. - VALUE is the expression that was used (or 0 if that isn't known) - and TYPE is the type that was invalid. */ - - void - incomplete_type_error (value, type) - tree value ATTRIBUTE_UNUSED; - tree type ATTRIBUTE_UNUSED; - { - error ("internal error - use of undefined type"); - } - /* Return a data type that has machine mode MODE. If the mode is an integer, then UNSIGNEDP selects between signed and unsigned types. */ tree ! type_for_mode (mode, unsignedp) enum machine_mode mode; int unsignedp; { --- 166,177 ---- return build1 (NOP_EXPR, type, expr); } /* Return a data type that has machine mode MODE. If the mode is an integer, then UNSIGNEDP selects between signed and unsigned types. */ tree ! java_type_for_mode (mode, unsignedp) enum machine_mode mode; int unsignedp; { *************** type_for_mode (mode, unsignedp) *** 207,213 **** that is unsigned if UNSIGNEDP is nonzero, otherwise signed. */ tree ! type_for_size (bits, unsignedp) unsigned bits; int unsignedp; { --- 195,201 ---- that is unsigned if UNSIGNEDP is nonzero, otherwise signed. */ tree ! java_type_for_size (bits, unsignedp) unsigned bits; int unsignedp; { *************** type_for_size (bits, unsignedp) *** 226,232 **** signed according to UNSIGNEDP. */ tree ! signed_or_unsigned_type (unsignedp, type) int unsignedp; tree type; { --- 214,220 ---- signed according to UNSIGNEDP. */ tree ! java_signed_or_unsigned_type (unsignedp, type) int unsignedp; tree type; { *************** signed_or_unsigned_type (unsignedp, type *** 246,273 **** /* Return a signed type the same as TYPE in other respects. */ tree ! signed_type (type) tree type; { ! return signed_or_unsigned_type (0, type); } /* Return an unsigned type the same as TYPE in other respects. */ tree ! unsigned_type (type) tree type; { ! return signed_or_unsigned_type (1, type); ! } /* Mark EXP saying that we need to be able to take the address of it; it should not be allocated in a register. ! Value is 1 if successful. */ ! int ! mark_addressable (exp) tree exp; { register tree x = exp; --- 234,260 ---- /* Return a signed type the same as TYPE in other respects. */ tree ! java_signed_type (type) tree type; { ! return java_signed_or_unsigned_type (0, type); } /* Return an unsigned type the same as TYPE in other respects. */ tree ! java_unsigned_type (type) tree type; { ! return java_signed_or_unsigned_type (1, type); } /* Mark EXP saying that we need to be able to take the address of it; it should not be allocated in a register. ! Value is true if successful. */ ! bool ! java_mark_addressable (exp) tree exp; { register tree x = exp; *************** mark_addressable (exp) *** 289,300 **** break; case COND_EXPR: ! return mark_addressable (TREE_OPERAND (x, 1)) ! & mark_addressable (TREE_OPERAND (x, 2)); case CONSTRUCTOR: TREE_ADDRESSABLE (x) = 1; ! return 1; case INDIRECT_REF: /* We sometimes add a cast *(TYPE*)&FOO to handle type and mode --- 276,287 ---- break; case COND_EXPR: ! return java_mark_addressable (TREE_OPERAND (x, 1)) ! && java_mark_addressable (TREE_OPERAND (x, 2)); case CONSTRUCTOR: TREE_ADDRESSABLE (x) = 1; ! return true; case INDIRECT_REF: /* We sometimes add a cast *(TYPE*)&FOO to handle type and mode *************** mark_addressable (exp) *** 310,316 **** x = TREE_OPERAND (x, 0); break; } ! return 1; case VAR_DECL: case CONST_DECL: --- 297,303 ---- x = TREE_OPERAND (x, 0); break; } ! return true; case VAR_DECL: case CONST_DECL: *************** mark_addressable (exp) *** 324,330 **** #endif /* drops through */ default: ! return 1; } } --- 311,317 ---- #endif /* drops through */ default: ! return true; } } *************** promote_type (type) *** 458,464 **** switch (TREE_CODE (type)) { case RECORD_TYPE: ! return build_pointer_type (CLASS_TO_HANDLE_TYPE (type)); case BOOLEAN_TYPE: if (type == boolean_type_node) return promoted_boolean_type_node; --- 445,451 ---- switch (TREE_CODE (type)) { case RECORD_TYPE: ! return build_pointer_type (type); case BOOLEAN_TYPE: if (type == boolean_type_node) return promoted_boolean_type_node; diff -Nrc3pad gcc-3.2.3/gcc/java/verify.c gcc-3.3/gcc/java/verify.c *** gcc-3.2.3/gcc/java/verify.c 2001-12-16 16:23:50.000000000 +0000 --- gcc-3.3/gcc/java/verify.c 2002-11-18 15:46:34.000000000 +0000 *************** *** 1,6 **** /* Handle verification of bytecoded methods for the GNU compiler for the Java(TM) language. ! Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,6 ---- /* Handle verification of bytecoded methods for the GNU compiler for the Java(TM) language. ! Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** merge_types (type1, type2) *** 145,152 **** if (type2 == ptr_type_node || type1 == object_ptr_type_node) return type1; ! tt1 = HANDLE_TO_CLASS_TYPE (TREE_TYPE (type1)); ! tt2 = HANDLE_TO_CLASS_TYPE (TREE_TYPE (type2)); /* If tt{1,2} haven't been properly loaded, now is a good time to do it. */ --- 145,152 ---- if (type2 == ptr_type_node || type1 == object_ptr_type_node) return type1; ! tt1 = TREE_TYPE (type1); ! tt2 = TREE_TYPE (type2); /* If tt{1,2} haven't been properly loaded, now is a good time to do it. */ *************** verify_jvm_instructions (jcf, byte_ops, *** 449,455 **** /* We read the exception handlers in order of increasing start PC. To do this we first read and sort the start PCs. */ ! starts = (struct pc_index *) xmalloc (eh_count * sizeof (struct pc_index)); for (i = 0; i < eh_count; ++i) { starts[i].start_pc = GET_u2 (jcf->read_ptr + 8 * i); --- 449,455 ---- /* We read the exception handlers in order of increasing start PC. To do this we first read and sort the start PCs. */ ! starts = xmalloc (eh_count * sizeof (struct pc_index)); for (i = 0; i < eh_count; ++i) { starts[i].start_pc = GET_u2 (jcf->read_ptr + 8 * i); *************** verify_jvm_instructions (jcf, byte_ops, *** 471,477 **** if (start_pc < 0 || start_pc >= length || end_pc < 0 || end_pc > length || start_pc >= end_pc || handler_pc < 0 || handler_pc >= length - || (handler_pc >= start_pc && handler_pc < end_pc) || ! (instruction_bits [start_pc] & BCODE_INSTRUCTION_START) || (end_pc < length && ! (instruction_bits [end_pc] & BCODE_INSTRUCTION_START)) --- 471,476 ---- *************** verify_jvm_instructions (jcf, byte_ops, *** 482,487 **** --- 481,489 ---- return 0; } + if (handler_pc >= start_pc && handler_pc < end_pc) + warning ("exception handler inside code that is being protected"); + add_handler (start_pc, end_pc, lookup_label (handler_pc), catch_type == 0 ? NULL_TREE *************** verify_jvm_instructions (jcf, byte_ops, *** 1324,1330 **** type_map[len] = TREE_VEC_ELT (return_map, len); } current_subr = LABEL_SUBR_CONTEXT (target); ! PUSH_PENDING (return_label); } INVALIDATE_PC; --- 1326,1333 ---- type_map[len] = TREE_VEC_ELT (return_map, len); } current_subr = LABEL_SUBR_CONTEXT (target); ! if (RETURN_MAP_ADJUSTED (return_map)) ! PUSH_PENDING (return_label); } INVALIDATE_PC; diff -Nrc3pad gcc-3.2.3/gcc/java/win32-host.c gcc-3.3/gcc/java/win32-host.c *** gcc-3.2.3/gcc/java/win32-host.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/gcc/java/win32-host.c 2003-04-10 14:54:08.000000000 +0000 *************** *** 0 **** --- 1,85 ---- + /* Platform-Specific Win32 Functions + Copyright (C) 2003 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + + Java and all Java-based marks are trademarks or registered trademarks + of Sun Microsystems, Inc. in the United States and other countries. + The Free Software Foundation is independent of Sun Microsystems, Inc. */ + + /* Written by Mohan Embar , March 2003. */ + + #ifdef WIN32 + + #include "config.h" + #include "system.h" + + #include "jcf.h" + + #define WIN32_LEAN_AND_MEAN + #include + #undef WIN32_LEAN_AND_MEAN + + /* Simulate an open() failure with ENOENT */ + static int + file_not_found (void); + + static int + file_not_found (void) + { + errno = ENOENT; + return -1; + } + + int + jcf_open_exact_case (const char *filename, int oflag) + { + int filename_len = strlen (filename); + int found_file_len; + HANDLE found_file_handle; + WIN32_FIND_DATA fd; + + /* See if we can find this file. */ + found_file_handle = FindFirstFile (filename, &fd); + if (found_file_handle == INVALID_HANDLE_VALUE) + return file_not_found (); + FindClose (found_file_handle); + + found_file_len = strlen (fd.cFileName); + + /* This should never happen. */ + if (found_file_len > filename_len) + return file_not_found (); + + /* Here, we're only actually comparing the filename and not + checking the case of any containing directory components. + Although we're not fully obeying our contract, checking + all directory components would be tedious and time-consuming + and it's a pretty safe assumption that mixed-case package + names are a fringe case.... */ + if (strcmp (filename + filename_len - found_file_len, fd.cFileName)) + { + /* Reject this because it is not a perfect-case match. */ + /* printf("************\nRejected:\n%s\n%s\n************\n\n", filename, fd.cFileName); */ + return file_not_found (); + } + else + { + return open (filename, oflag); + } + } + + #endif /* WIN32 */ diff -Nrc3pad gcc-3.2.3/gcc/java/xref.c gcc-3.3/gcc/java/xref.c *** gcc-3.2.3/gcc/java/xref.c 2000-01-21 20:57:00.000000000 +0000 --- gcc-3.3/gcc/java/xref.c 2002-08-05 18:46:37.000000000 +0000 *************** The Free Software Foundation is independ *** 31,38 **** #include "xref.h" #include "jcf.h" #include "parse.h" - #include "obstack.h" - static xref_flag_table xref_table [] = { {NULL, NULL, NULL, NULL}, --- 31,36 ---- diff -Nrc3pad gcc-3.2.3/libffi/ChangeLog gcc-3.3/libffi/ChangeLog *** gcc-3.2.3/libffi/ChangeLog 2003-04-22 06:15:28.000000000 +0000 --- gcc-3.3/libffi/ChangeLog 2003-05-14 00:10:48.000000000 +0000 *************** *** 1,62 **** ! 2003-04-22 Release Manager ! * GCC 3.2.3 Released. - 2003-02-08 Andreas Tobler - * libffi/src/powerpc/darwin_closure.S: ! Fix alignement bug, allocate 8 bytes for the result. ! * libffi/src/powerpc/aix_closure.S: ! Likewise. ! * libffi/src/powerpc/ffi_darwin.c: ! Update stackframe description for aix/darwin_closure.S. ! 2003-02-07 Andreas Tobler * libffi/src/ffitest.c add closure testcases ! 2003-02-07 Kevin B. Hendricks * libffi/src/powerpc/ffi.c fix alignment bug for float (4 byte aligned iso 8 byte) ! 2003-02-05 Release Manager ! * GCC 3.2.2 Released. ! 2003-01-29 Franz Sirl ! * src/powerpc/ppc_closure.S: Recode to fit shared libs. ! 2002-11-19 Release Manager ! * GCC 3.2.1 Released. ! 2002-11-19 Release Manager ! * GCC 3.2.1 Released. ! 2002-11-18 Release Manager ! * GCC 3.2.1 Released. ! 2002-10-07 Kaveh R. Ghazi * Makefile.am (all-multi): Fix multilib parallel build. ! 2002-08-14 Release Manager ! * GCC 3.2 Released. ! 2002-07-25 Release Manager ! * GCC 3.1.1 Released. ! 2002-05-28 Bo Thorsen ! * src/x86/ffi.c (ffi_prep_incoming_args_SYSV): Remove avn ! here too. 2002-05-27 Roger Sayle --- 1,262 ---- ! 2003-05-13 Release Manager ! * GCC 3.3 Released. ! ! 2003-05-13 Release Manager ! ! * GCC 3.3 Released. ! ! 2003-05-13 Release Manager ! ! * GCC 3.3 Released. ! ! 2003-05-07 Jeff Sturm ! ! Fixes PR bootstrap/10656 ! * configure.in (HAVE_AS_REGISTER_PSEUDO_OP): Test assembler ! support for .register pseudo-op. ! * src/sparc/v8.S: Use it. ! * fficonfig.h.in: Rebuilt. ! * configure: Rebuilt. ! ! 2003-04-04 Loren J. Rittle ! ! * include/Makefile.in: Regenerate. ! ! 2003-03-22 Zdenek Dvorak ! ! * libffi/include/ffi.h.in: Define X86 instead of X86_64 in 32 ! bit mode. ! * libffi/src/x86/ffi.c (ffi_closure_SYSV, ffi_closure_raw_SYSV): ! Receive closure pointer through parameter, read args using ! __builtin_dwarf_cfa. ! (FFI_INIT_TRAMPOLINE): Send closure reference through eax. ! ! 2003-02-06 Andreas Tobler * libffi/src/powerpc/darwin_closure.S: ! Fix alignement bug, allocate 8 bytes for the result. ! * libffi/src/powerpc/aix_closure.S: ! Likewise. ! * libffi/src/powerpc/ffi_darwin.c: ! Update stackframe description for aix/darwin_closure.S. ! 2003-01-31 Christian Cornelssen , ! Andreas Schwab ! ! * configure.in: Adjust command to source config-ml.in to account ! for changes to the libffi_basedir definition. ! (libffi_basedir): Remove ${srcdir} from value and include trailing ! slash if nonempty. ! ! * configure: Regenerate. ! ! 2003-01-29 Franz Sirl ! ! * src/powerpc/ppc_closure.S: Recode to fit shared libs. ! ! 2003-01-28 Andrew Haley ! ! * include/ffi.h.in: Enable FFI_CLOSURES for x86_64. ! * src/x86/ffi64.c (ffi_prep_closure): New. ! (ffi_closure_UNIX64_inner): New. ! * src/x86/unix64.S (ffi_closure_UNIX64): New. ! ! 2003-01-22 Andrew Haley ! ! * src/powerpc/darwin.S (_ffi_call_AIX): Add Augmentation size to ! unwind info. ! ! 2003-01-21 Andreas Tobler ! ! * src/powerpc/darwin.S: Add unwind info. ! * src/powerpc/darwin_closure.S: Likewise. ! ! 2003-01-14 Andrew Haley ! ! * src/x86/ffi64.c (ffi_prep_args): Check for void retval. ! (ffi_prep_cif_machdep): Likewise. ! * src/x86/unix64.S: Add unwind info. ! ! 2003-01-14 Andreas Jaeger ! ! * src/ffitest.c (main): Only use ffi_closures if those are ! supported. ! ! 2003-01-13 Andreas Tobler * libffi/src/ffitest.c add closure testcases ! 2003-01-13 Kevin B. Hendricks * libffi/src/powerpc/ffi.c fix alignment bug for float (4 byte aligned iso 8 byte) ! 2003-01-03 Jeff Sturm ! * include/ffi.h.in: Add closure defines for SPARC, SPARC64. ! * src/ffitest.c (main): Use static storage for closure. ! * src/sparc/ffi.c (ffi_prep_closure, ffi_closure_sparc_inner): New. ! * src/sparc/v8.S (ffi_closure_v8): New. ! * src/sparc/v9.S (ffi_closure_v9): New. ! 2002-11-10 Ranjit Mathew ! * include/ffi.h.in: Added FFI_STDCALL ffi_type ! enumeration for X86_WIN32. ! * src/x86/win32.S: Added ffi_call_STDCALL function ! definition. ! * src/x86/ffi.c (ffi_call/ffi_raw_call): Added ! switch cases for recognising FFI_STDCALL and ! calling ffi_call_STDCALL if target is X86_WIN32. ! * src/ffitest.c (my_stdcall_strlen/stdcall_many): ! stdcall versions of the "my_strlen" and "many" ! test functions (for X86_WIN32). ! Added test cases to test stdcall invocation using ! these functions. ! 2002-11-27 Ulrich Weigand ! * src/s390/sysv.S (.eh_frame section): Make section read-only. ! 2002-11-26 Jim Wilson ! * src/types.c (FFI_TYPE_POINTER): Has size 8 on IA64. ! 2002-11-15 Ulrich Weigand ! * src/s390/sysv.S (.eh_frame section): Adapt to pcrel FDE encoding. ! 2002-11-11 DJ Delorie ! ! * configure.in: Look for common files in the right place. ! ! 2002-10-08 Ulrich Weigand ! ! * src/java_raw_api.c (ffi_java_raw_to_ptrarray): Interpret ! raw data as _Jv_word values, not ffi_raw. ! (ffi_java_ptrarray_to_raw): Likewise. ! (ffi_java_rvalue_to_raw): New function. ! (ffi_java_raw_call): Call it. ! (ffi_java_raw_to_rvalue): New function. ! (ffi_java_translate_args): Call it. ! * src/ffitest.c (closure_test_fn): Interpret return value ! as ffi_arg, not int. ! * src/s390/ffi.c (ffi_prep_cif_machdep): Add missing ! FFI_TYPE_POINTER case. ! (ffi_closure_helper_SYSV): Likewise. Also, assume return ! values extended to word size. ! ! 2002-10-02 Andreas Jaeger ! ! * src/x86/ffi64.c (ffi_prep_cif_machdep): Remove debug output. ! ! 2002-10-01 Bo Thorsen ! ! * include/ffi.h.in: Fix i386 win32 compilation. ! ! 2002-09-30 Ulrich Weigand ! ! * configure.in: Add s390x-*-linux-* target. ! * configure: Regenerate. ! * include/ffi.h.in: Define S390X for s390x targets. ! (FFI_CLOSURES): Define for s390/s390x. ! (FFI_TRAMPOLINE_SIZE): Likewise. ! (FFI_NATIVE_RAW_API): Likewise. ! * src/prep_cif.c (ffi_prep_cif): Do not compute stack space for s390. ! * src/types.c (FFI_TYPE_POINTER): Use 8-byte pointers on s390x. ! * src/s390/ffi.c: Major rework of existing code. Add support for ! s390x targets. Add closure support. ! * src/s390/sysv.S: Likewise. ! ! 2002-09-29 Richard Earnshaw ! ! * src/arm/sysv.S: Fix typo. ! ! 2002-09-28 Richard Earnshaw ! ! * src/arm/sysv.S: If we don't have machine/asm.h and the pre-processor ! has defined __USER_LABEL_PREFIX__, then use it in CNAME. ! (ffi_call_SYSV): Handle soft-float. ! ! 2002-09-27 Bo Thorsen ! ! * include/ffi.h.in: Fix multilib x86-64 support. ! ! 2002-09-22 Kaveh R. Ghazi * Makefile.am (all-multi): Fix multilib parallel build. ! 2002-07-19 Kaz Kojima ! * configure.in (sh[34]*-*-linux*): Add brackets. ! * configure: Regenerate. ! 2002-07-18 Kaz Kojima ! * Makefile.am: Add SH support. ! * Makefile.in: Regenerate. ! * configure.in (sh-*-linux*, sh[34]*-*-linux*): Add target. ! * configure: Regenerate. ! * include/ffi.h.in: Add SH support. ! * src/sh/ffi.c: New file. ! * src/sh/sysv.S: New file. ! * src/types.c: Add SH support. ! 2002-07-16 Bo Thorsen ! * src/x86/ffi64.c: New file that adds x86-64 support. ! * src/x86/unix64.S: New file that handles argument setup for ! x86-64. ! * src/x86/sysv.S: Don't use this on x86-64. ! * src/x86/ffi.c: Don't use this on x86-64. ! Remove unused vars. ! * src/prep_cif.c (ffi_prep_cif): Don't do stack size calculation ! for x86-64. ! * src/ffitest.c (struct6): New test that tests a special case in ! the x86-64 ABI. ! (struct7): Likewise. ! (struct8): Likewise. ! (struct9): Likewise. ! (closure_test_fn): Silence warning about this when it's not used. ! (main): Add the new tests. ! (main): Fix a couple of wrong casts and silence some compiler warnings. ! * include/ffi.h.in: Add x86-64 ABI definition. ! * fficonfig.h.in: Regenerate. ! * Makefile.am: Add x86-64 support. ! * configure.in: Likewise. ! * Makefile.in: Regenerate. ! * configure: Likewise. ! ! 2002-06-24 Bo Thorsen ! ! * src/types.c: Merge settings for similar architectures. ! Add x86-64 sizes and alignments. ! ! 2002-06-23 Bo Thorsen ! ! * src/arm/ffi.c (ffi_prep_args): Remove unused vars. ! * src/sparc/ffi.c (ffi_prep_args_v8): Likewise. ! * src/mips/ffi.c (ffi_prep_args): Likewise. ! * src/m68k/ffi.c (ffi_prep_args): Likewise. ! ! 2002-07-18 H.J. Lu (hjl@gnu.org) ! ! * Makefile.am (TARGET_SRC_MIPS_LINUX): New. ! (libffi_la_SOURCES): Support MIPS_LINUX. ! (libffi_convenience_la_SOURCES): Likewise. ! * Makefile.in: Regenerated. ! ! * configure.in (mips64*-*): Skip. ! (mips*-*-linux*): New. ! * configure: Regenerated. ! ! * src/mips/ffi.c: Include . ! ! 2002-06-06 Ulrich Weigand ! ! * src/s390/sysv.S: Save/restore %r6. Add DWARF-2 unwind info. 2002-05-27 Roger Sayle *************** *** 67,79 **** * src/x86/ffi.c (ffi_prep_args): Remove unused variable and fix formatting. ! 2002-05-14 Release Manager ! ! * GCC 3.1 Released. ! ! 2002-05-14 Release Manager ! * GCC 3.1 Released. 2002-05-08 Alexandre Oliva --- 267,276 ---- * src/x86/ffi.c (ffi_prep_args): Remove unused variable and fix formatting. ! 2002-05-13 Andreas Tobler ! * src/powerpc/ffi_darwin.c (ffi_prep_closure): Declare fd at ! beginning of function (for older apple cc). 2002-05-08 Alexandre Oliva *************** *** 81,90 **** --- 278,303 ---- script entry, and set LD to it when configuring multilibs. * configure: Rebuilt. + 2002-05-05 Jason Thorpe + + * configure.in (sparc64-*-netbsd*): Add target. + (sparc-*-netbsdelf*): Likewise. + * configure: Regenerate. + 2002-04-28 David S. Miller * configure.in, configure: Fix SPARC test in previous change. + 2002-04-29 Gerhard Tonn + + * Makefile.am: Add Linux for S/390 support. + * Makefile.in: Regenerate. + * configure.in: Add Linux for S/390 support. + * configure: Regenerate. + * include/ffi.h.in: Add Linux for S/390 support. + * src/s390/ffi.c: New file from libffi CVS tree. + * src/s390/sysv.S: New file from libffi CVS tree. + 2002-04-28 Jakub Jelinek * configure.in (HAVE_AS_SPARC_UA_PCREL): Check for working *************** *** 107,122 **** * src/sparc/v8.S: Make .eh_frame dependent on target word size. 2002-04-04 Jeff Sturm * src/sparc/v8.S: Add unwind info. * src/sparc/v9.S: Likewise. - 2002-04-01 Loren J. Rittle - - * configure.in: Enable alpha*-*-freebsd*. - * configure: Rebuilt. - 2002-03-30 Krister Walfridsson * configure.in: Enable i*86-*-netbsdelf*. --- 320,335 ---- * src/sparc/v8.S: Make .eh_frame dependent on target word size. + 2002-04-06 Jason Thorpe + + * configure.in (alpha*-*-netbsd*): Add target. + * configure: Regenerate. + 2002-04-04 Jeff Sturm * src/sparc/v8.S: Add unwind info. * src/sparc/v9.S: Likewise. 2002-03-30 Krister Walfridsson * configure.in: Enable i*86-*-netbsdelf*. *************** *** 128,133 **** --- 341,351 ---- * src/mips/n32.s: Delete * src/mips/o32.s: Delete + 2002-03-21 Loren J. Rittle + + * configure.in: Enable alpha*-*-freebsd*. + * configure: Rebuilt. + 2002-03-17 Bryce McKinlay * Makefile.am: libfficonvenience -> libffi_convenience. *************** *** 224,236 **** 2001-06-06 Andrew Haley ! * src/alpha/osf.S (__FRAME_BEGIN__): Conditionalize for ELF. 2001-06-03 Andrew Haley ! * src/alpha/osf.S: Add unwind info. ! * src/powerpc/sysv.S: Add unwind info. ! * src/powerpc/ppc_closure.S: Likewise. 2000-05-31 Jeff Sturm --- 442,454 ---- 2001-06-06 Andrew Haley ! * src/alpha/osf.S (__FRAME_BEGIN__): Conditionalize for ELF. 2001-06-03 Andrew Haley ! * src/alpha/osf.S: Add unwind info. ! * src/powerpc/sysv.S: Add unwind info. ! * src/powerpc/ppc_closure.S: Likewise. 2000-05-31 Jeff Sturm *************** *** 389,402 **** (Multilib support.): Add section. * Makefile.in: Rebuilt. * ltconfig (extra_compiler_flags, extra_compiler_flags_value): ! New variables. Set for gcc using -print-multi-lib. Export them ! to libtool. ! (sparc64-*-linux-gnu*): Use libsuff 64 for search paths. ! * ltmain.sh (B|b|V): Don't throw away gcc's -B, -b and -V options ! for -shared links. ! (extra_compiler_flags_value, extra_compiler_flags): Check these ! for extra compiler options which need to be passed down in ! compiler_flags. 2000-04-16 Anthony Green --- 607,620 ---- (Multilib support.): Add section. * Makefile.in: Rebuilt. * ltconfig (extra_compiler_flags, extra_compiler_flags_value): ! New variables. Set for gcc using -print-multi-lib. Export them ! to libtool. ! (sparc64-*-linux-gnu*): Use libsuff 64 for search paths. ! * ltmain.sh (B|b|V): Don't throw away gcc's -B, -b and -V options ! for -shared links. ! (extra_compiler_flags_value, extra_compiler_flags): Check these ! for extra compiler options which need to be passed down in ! compiler_flags. 2000-04-16 Anthony Green *************** *** 405,411 **** 2000-04-14 Jakub Jelinek ! * include/ffi.h.in (SPARC64): Define for 64bit SPARC builds. Set SPARC FFI_DEFAULT_ABI based on SPARC64 define. * src/sparc/ffi.c (ffi_prep_args_v8): Renamed from ffi_prep_args. Replace all void * sizeofs with sizeof(int). --- 623,629 ---- 2000-04-14 Jakub Jelinek ! * include/ffi.h.in (SPARC64): Define for 64bit SPARC builds. Set SPARC FFI_DEFAULT_ABI based on SPARC64 define. * src/sparc/ffi.c (ffi_prep_args_v8): Renamed from ffi_prep_args. Replace all void * sizeofs with sizeof(int). *************** *** 515,521 **** * configure: Rebuilt. * configure.in: Change version to 2.00-beta. ! * fficonfig.h.in: Rebuilt. * acconfig.h (FFI_NO_STRUCTS, FFI_NO_RAW_API): Define. * src/x86/ffi.c (ffi_raw_call): Rename. --- 733,739 ---- * configure: Rebuilt. * configure.in: Change version to 2.00-beta. ! * fficonfig.h.in: Rebuilt. * acconfig.h (FFI_NO_STRUCTS, FFI_NO_RAW_API): Define. * src/x86/ffi.c (ffi_raw_call): Rename. diff -Nrc3pad gcc-3.2.3/libffi/ChangeLog.libgcj gcc-3.3/libffi/ChangeLog.libgcj *** gcc-3.2.3/libffi/ChangeLog.libgcj 2003-01-28 01:43:56.000000000 +0000 --- gcc-3.3/libffi/ChangeLog.libgcj 2003-02-20 09:12:03.000000000 +0000 *************** *** 1,3 **** --- 1,9 ---- + 2003-02-20 Alexandre Oliva + + * configure.in: Propagate ORIGINAL_LD_FOR_MULTILIBS to + config.status. + * configure: Rebuilt. + 2002-01-27 Alexandre Oliva * configure.in (toolexecdir, toolexeclibdir): Set and AC_SUBST. diff -Nrc3pad gcc-3.2.3/libffi/configure gcc-3.3/libffi/configure *** gcc-3.2.3/libffi/configure 2003-01-28 22:59:05.000000000 +0000 --- gcc-3.3/libffi/configure 2003-05-08 20:37:56.000000000 +0000 *************** fi *** 633,649 **** if test "${srcdir}" = "."; then if test "${with_target_subdir}" != "."; then ! libffi_basedir="${srcdir}/${with_multisrctop}.." else ! libffi_basedir="${srcdir}/${with_multisrctop}" fi else ! libffi_basedir="${srcdir}" fi - ac_aux_dir= ! for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" --- 633,648 ---- if test "${srcdir}" = "."; then if test "${with_target_subdir}" != "."; then ! libffi_basedir="${with_multisrctop}../" else ! libffi_basedir="${with_multisrctop}" fi else ! libffi_basedir= fi ac_aux_dir= ! for ac_dir in ${libffi_basedir}.. $srcdir/${libffi_basedir}..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" *************** for ac_dir in $srcdir $srcdir/.. $srcdir *** 655,667 **** fi done if test -z "$ac_aux_dir"; then ! { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } fi ac_config_guess=$ac_aux_dir/config.guess ac_config_sub=$ac_aux_dir/config.sub ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # Make sure we can run config.sub. if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } --- 654,667 ---- fi done if test -z "$ac_aux_dir"; then ! { echo "configure: error: can not find install-sh or install.sh in ${libffi_basedir}.. $srcdir/${libffi_basedir}.." 1>&2; exit 1; } fi ac_config_guess=$ac_aux_dir/config.guess ac_config_sub=$ac_aux_dir/config.sub ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. + # Make sure we can run config.sub. if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } *************** gnu*) *** 1238,1246 **** ;; hpux10.20*|hpux11*) ! lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' ! lt_cv_file_magic_cmd=/usr/bin/file ! lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; irix5* | irix6*) --- 1238,1255 ---- ;; hpux10.20*|hpux11*) ! case $host_cpu in ! hppa*) ! lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' ! lt_cv_file_magic_cmd=/usr/bin/file ! lt_cv_file_magic_test_file=/usr/lib/libc.sl ! ;; ! ia64*) ! lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' ! lt_cv_file_magic_cmd=/usr/bin/file ! lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ! ;; ! esac ;; irix5* | irix6*) *************** file_magic_cmd=$lt_cv_file_magic_cmd *** 1330,1342 **** deplibs_check_method=$lt_cv_deplibs_check_method echo $ac_n "checking for object suffix""... $ac_c" 1>&6 ! echo "configure:1334: checking for object suffix" >&5 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftest* echo 'int i = 1;' > conftest.$ac_ext ! if { (eval echo configure:1340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; --- 1339,1351 ---- deplibs_check_method=$lt_cv_deplibs_check_method echo $ac_n "checking for object suffix""... $ac_c" 1>&6 ! echo "configure:1343: checking for object suffix" >&5 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftest* echo 'int i = 1;' > conftest.$ac_ext ! if { (eval echo configure:1349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; *************** ac_objext=$ac_cv_objext *** 1356,1362 **** echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 ! echo "configure:1360: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1365,1371 ---- echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 ! echo "configure:1369: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 1366,1372 **** rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= ! if { (eval echo configure:1370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj) ;; --- 1375,1381 ---- rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= ! if { (eval echo configure:1379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj) ;; *************** case $deplibs_check_method in *** 1399,1405 **** file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 ! echo "configure:1403: checking for ${ac_tool_prefix}file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1408,1414 ---- file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 ! echo "configure:1412: checking for ${ac_tool_prefix}file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 1461,1467 **** if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo $ac_n "checking for file""... $ac_c" 1>&6 ! echo "configure:1465: checking for file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1470,1476 ---- if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo $ac_n "checking for file""... $ac_c" 1>&6 ! echo "configure:1474: checking for file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** esac *** 1532,1538 **** # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1536: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1541,1547 ---- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1545: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** if test -n "$ac_tool_prefix"; then *** 1564,1570 **** # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1568: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1573,1579 ---- # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1577: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 1599,1605 **** # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1603: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1608,1614 ---- # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1612: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** if test -n "$ac_tool_prefix"; then *** 1631,1637 **** # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1635: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1640,1646 ---- # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1644: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** test x"$pic_mode" = xno && libtool_flags *** 1698,1705 **** case $host in *-*-irix6*) # Find out which ABI we are using. ! echo '#line 1702 "configure"' > conftest.$ac_ext ! if { (eval echo configure:1703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" --- 1707,1727 ---- case $host in *-*-irix6*) # Find out which ABI we are using. ! echo '#line 1711 "configure"' > conftest.$ac_ext ! if { (eval echo configure:1712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! if test "$lt_cv_prog_gnu_ld" = yes; then ! case `/usr/bin/file conftest.$ac_objext` in ! *32-bit*) ! LD="${LD-ld} -melf32bsmip" ! ;; ! *N32*) ! LD="${LD-ld} -melf32bmipn32" ! ;; ! *64-bit*) ! LD="${LD-ld} -melf64bmip" ! ;; ! esac ! else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" *************** case $host in *** 1711,1716 **** --- 1733,1797 ---- LD="${LD-ld} -64" ;; esac + fi + fi + rm -rf conftest* + ;; + + ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo configure:1745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + case "`/usr/bin/file conftest.o`" in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; + + x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo configure:1761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + case "`/usr/bin/file conftest.o`" in + *32-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac fi rm -rf conftest* ;; *************** case $host in *** 1720,1726 **** SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 ! echo "configure:1724: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1801,1807 ---- SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 ! echo "configure:1805: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** ac_link='${CC-cc} -o conftest${ac_exeext *** 1733,1746 **** cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else --- 1814,1827 ---- cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else *************** exec 5>>./config.log *** 1868,1874 **** # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 ! echo "configure:1872: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 1949,1955 ---- # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 ! echo "configure:1953: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** test -z "$INSTALL_SCRIPT" && INSTALL_SCR *** 1921,1927 **** test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 ! echo "configure:1925: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile --- 2002,2008 ---- test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 ! echo "configure:2006: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile *************** test "$program_suffix" != NONE && *** 1978,1984 **** test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 ! echo "configure:1982: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2059,2065 ---- test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 ! echo "configure:2063: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** fi *** 2017,2023 **** missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 ! echo "configure:2021: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. --- 2098,2104 ---- missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 ! echo "configure:2102: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. *************** else *** 2030,2036 **** fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 ! echo "configure:2034: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. --- 2111,2117 ---- fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 ! echo "configure:2115: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. *************** else *** 2043,2049 **** fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 ! echo "configure:2047: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. --- 2124,2130 ---- fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 ! echo "configure:2128: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. *************** else *** 2056,2062 **** fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 ! echo "configure:2060: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. --- 2137,2143 ---- fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 ! echo "configure:2141: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. *************** else *** 2069,2075 **** fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 ! echo "configure:2073: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. --- 2150,2156 ---- fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 ! echo "configure:2154: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. *************** fi *** 2086,2092 **** echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 ! echo "configure:2090: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2167,2173 ---- echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 ! echo "configure:2171: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 2096,2102 **** rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= ! if { (eval echo configure:2100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj) ;; --- 2177,2183 ---- rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= ! if { (eval echo configure:2181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj) ;; *************** echo "$ac_t""${ac_cv_exeext}" 1>&6 *** 2117,2123 **** ac_exeext=$EXEEXT echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 ! echo "configure:2121: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" --- 2198,2204 ---- ac_exeext=$EXEEXT echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 ! echo "configure:2202: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" *************** fi *** 2143,2149 **** # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2147: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2224,2230 ---- # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2228: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** if test -z "$CC"; then *** 2173,2179 **** # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2177: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2254,2260 ---- # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2258: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 2224,2230 **** # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2228: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2305,2311 ---- # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2309: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 2256,2262 **** fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 ! echo "configure:2260: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. --- 2337,2343 ---- fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 ! echo "configure:2341: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. *************** cross_compiling=$ac_cv_prog_cc_cross *** 2267,2278 **** cat > conftest.$ac_ext << EOF ! #line 2271 "configure" #include "confdefs.h" main(){return(0);} EOF ! if { (eval echo configure:2276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then --- 2348,2359 ---- cat > conftest.$ac_ext << EOF ! #line 2352 "configure" #include "confdefs.h" main(){return(0);} EOF ! if { (eval echo configure:2357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then *************** if test $ac_cv_prog_cc_works = no; then *** 2298,2309 **** { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 ! echo "configure:2302: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 ! echo "configure:2307: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2379,2390 ---- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 ! echo "configure:2383: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 ! echo "configure:2388: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 2312,2318 **** yes; #endif EOF ! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no --- 2393,2399 ---- yes; #endif EOF ! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2397: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no *************** ac_test_CFLAGS="${CFLAGS+set}" *** 2331,2337 **** ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 ! echo "configure:2335: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2412,2418 ---- ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 ! echo "configure:2416: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** i*86-*-cygwin*) TARGET=X86_WIN32; TARGET *** 2381,2397 **** i*86-*-mingw*) TARGET=X86_WIN32; TARGETDIR=x86;; sparc-sun-4*) TARGET=SPARC; TARGETDIR=sparc;; sparc*-sun-*) TARGET=SPARC; TARGETDIR=sparc;; ! sparc-*-linux*) TARGET=SPARC; TARGETDIR=sparc;; ! sparc64-*-linux*) TARGET=SPARC; TARGETDIR=sparc;; ! alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd*) TARGET=ALPHA; TARGETDIR=alpha;; ia64*-*-*) TARGET=IA64; TARGETDIR=ia64;; m68k-*-linux*) TARGET=M68K; TARGETDIR=m68k;; powerpc-*-linux* | powerpc-*-sysv*) TARGET=POWERPC; TARGETDIR=powerpc;; powerpc-*-beos*) TARGET=POWERPC; TARGETDIR=powerpc;; powerpc-*-darwin*) TARGET=POWERPC_DARWIN; TARGETDIR=powerpc;; powerpc-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;; rs6000-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;; arm*-*-linux-*) TARGET=ARM; TARGETDIR=arm;; esac if test $TARGETDIR = unknown; then --- 2462,2484 ---- i*86-*-mingw*) TARGET=X86_WIN32; TARGETDIR=x86;; sparc-sun-4*) TARGET=SPARC; TARGETDIR=sparc;; sparc*-sun-*) TARGET=SPARC; TARGETDIR=sparc;; ! sparc-*-linux* | sparc-*-netbsdelf*) TARGET=SPARC; TARGETDIR=sparc;; ! sparc64-*-linux* | sparc64-*-netbsd*) TARGET=SPARC; TARGETDIR=sparc;; ! alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd* | alpha*-*-netbsd*) TARGET=ALPHA; TARGETDIR=alpha;; ia64*-*-*) TARGET=IA64; TARGETDIR=ia64;; m68k-*-linux*) TARGET=M68K; TARGETDIR=m68k;; + mips64*-*);; + mips*-*-linux*) TARGET=MIPS_LINUX; TARGETDIR=mips;; powerpc-*-linux* | powerpc-*-sysv*) TARGET=POWERPC; TARGETDIR=powerpc;; powerpc-*-beos*) TARGET=POWERPC; TARGETDIR=powerpc;; powerpc-*-darwin*) TARGET=POWERPC_DARWIN; TARGETDIR=powerpc;; powerpc-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;; rs6000-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;; arm*-*-linux-*) TARGET=ARM; TARGETDIR=arm;; + s390-*-linux-*) TARGET=S390; TARGETDIR=s390;; + s390x-*-linux-*) TARGET=S390; TARGETDIR=s390;; + x86_64-*-linux*) TARGET=X86_64; TARGETDIR=x86;; + sh-*-linux* | sh[34]*-*-linux*) TARGET=SH; TARGETDIR=sh;; esac if test $TARGETDIR = unknown; then *************** else *** 2418,2423 **** --- 2505,2519 ---- fi + if test x$TARGET = xMIPS_LINUX; then + MIPS_LINUX_TRUE= + MIPS_LINUX_FALSE='#' + else + MIPS_LINUX_TRUE='#' + MIPS_LINUX_FALSE= + fi + + if test x$TARGET = xSPARC; then SPARC_TRUE= SPARC_FALSE='#' *************** else *** 2507,2514 **** ARM_FALSE= fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 ! echo "configure:2512: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= --- 2603,2641 ---- ARM_FALSE= fi + + if test x$TARGET = xS390; then + S390_TRUE= + S390_FALSE='#' + else + S390_TRUE='#' + S390_FALSE= + fi + + + if test x$TARGET = xX86_64; then + X86_64_TRUE= + X86_64_FALSE='#' + else + X86_64_TRUE='#' + X86_64_FALSE= + fi + + + if test x$TARGET = xSH; then + SH_TRUE= + SH_FALSE='#' + else + SH_TRUE='#' + SH_FALSE= + fi + + if test x$TARGET = xMIPS_LINUX; then + TARGET=MIPS + fi + echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 ! echo "configure:2639: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= *************** else *** 2523,2535 **** # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : --- 2650,2662 ---- # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2660: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : *************** else *** 2540,2552 **** rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : --- 2667,2679 ---- rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2677: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : *************** else *** 2557,2569 **** rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : --- 2684,2696 ---- rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2694: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : *************** fi *** 2588,2599 **** echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 ! echo "configure:2592: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include --- 2715,2726 ---- echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 ! echo "configure:2719: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include *************** else *** 2601,2607 **** #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* --- 2728,2734 ---- #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2732: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* *************** rm -f conftest* *** 2618,2624 **** if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF --- 2745,2751 ---- if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF *************** fi *** 2636,2642 **** if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF --- 2763,2769 ---- if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF *************** if test "$cross_compiling" = yes; then *** 2657,2663 **** : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') --- 2784,2790 ---- : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') *************** if (XOR (islower (i), ISLOWER (i)) || to *** 2668,2674 **** exit (0); } EOF ! if { (eval echo configure:2672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else --- 2795,2801 ---- exit (0); } EOF ! if { (eval echo configure:2799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else *************** fi *** 2694,2705 **** for ac_func in memcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:2698: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:2825: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else --- 2849,2855 ---- ; return 0; } EOF ! if { (eval echo configure:2853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else *************** done *** 2749,2767 **** # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 ! echo "configure:2753: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF ! if { (eval echo configure:2765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else --- 2876,2894 ---- # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 ! echo "configure:2880: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF ! if { (eval echo configure:2892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else *************** EOF *** 2782,2793 **** fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 ! echo "configure:2786: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:2913: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else --- 2942,2948 ---- char *p = (char *) alloca(1); ; return 0; } EOF ! if { (eval echo configure:2946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else *************** EOF *** 2847,2858 **** echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 ! echo "configure:2851: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:2978: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 *** 2877,2888 **** if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:2881: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:3008: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else --- 3032,3038 ---- ; return 0; } EOF ! if { (eval echo configure:3036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else *************** done *** 2932,2938 **** fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 ! echo "configure:2936: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 3059,3065 ---- fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 ! echo "configure:3063: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 2940,2946 **** ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else --- 3086,3092 ---- exit (find_stack_direction() < 0); } EOF ! if { (eval echo configure:3090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else *************** fi *** 2982,2994 **** echo $ac_n "checking size of short""... $ac_c" 1>&6 ! echo "configure:2986: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < --- 3109,3121 ---- echo $ac_n "checking size of short""... $ac_c" 1>&6 ! echo "configure:3113: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < *************** int main() { *** 2998,3004 **** switch (0) case 0: case (sizeof (short) == $ac_size):; ; return 0; } EOF ! if { (eval echo configure:3002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_short=$ac_size else --- 3125,3131 ---- switch (0) case 0: case (sizeof (short) == $ac_size):; ; return 0; } EOF ! if { (eval echo configure:3129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_short=$ac_size else *************** EOF *** 3021,3033 **** echo $ac_n "checking size of int""... $ac_c" 1>&6 ! echo "configure:3025: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < --- 3148,3160 ---- echo $ac_n "checking size of int""... $ac_c" 1>&6 ! echo "configure:3152: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < *************** int main() { *** 3037,3043 **** switch (0) case 0: case (sizeof (int) == $ac_size):; ; return 0; } EOF ! if { (eval echo configure:3041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_int=$ac_size else --- 3164,3170 ---- switch (0) case 0: case (sizeof (int) == $ac_size):; ; return 0; } EOF ! if { (eval echo configure:3168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_int=$ac_size else *************** EOF *** 3060,3072 **** echo $ac_n "checking size of long""... $ac_c" 1>&6 ! echo "configure:3064: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < --- 3187,3199 ---- echo $ac_n "checking size of long""... $ac_c" 1>&6 ! echo "configure:3191: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < *************** int main() { *** 3076,3082 **** switch (0) case 0: case (sizeof (long) == $ac_size):; ; return 0; } EOF ! if { (eval echo configure:3080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_long=$ac_size else --- 3203,3209 ---- switch (0) case 0: case (sizeof (long) == $ac_size):; ; return 0; } EOF ! if { (eval echo configure:3207: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_long=$ac_size else *************** EOF *** 3099,3111 **** echo $ac_n "checking size of long long""... $ac_c" 1>&6 ! echo "configure:3103: checking size of long long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < --- 3226,3238 ---- echo $ac_n "checking size of long long""... $ac_c" 1>&6 ! echo "configure:3230: checking size of long long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < *************** int main() { *** 3115,3121 **** switch (0) case 0: case (sizeof (long long) == $ac_size):; ; return 0; } EOF ! if { (eval echo configure:3119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_long_long=$ac_size else --- 3242,3248 ---- switch (0) case 0: case (sizeof (long long) == $ac_size):; ; return 0; } EOF ! if { (eval echo configure:3246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_long_long=$ac_size else *************** EOF *** 3138,3150 **** echo $ac_n "checking size of float""... $ac_c" 1>&6 ! echo "configure:3142: checking size of float" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < --- 3265,3277 ---- echo $ac_n "checking size of float""... $ac_c" 1>&6 ! echo "configure:3269: checking size of float" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < *************** int main() { *** 3154,3160 **** switch (0) case 0: case (sizeof (float) == $ac_size):; ; return 0; } EOF ! if { (eval echo configure:3158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_float=$ac_size else --- 3281,3287 ---- switch (0) case 0: case (sizeof (float) == $ac_size):; ; return 0; } EOF ! if { (eval echo configure:3285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_float=$ac_size else *************** EOF *** 3177,3189 **** echo $ac_n "checking size of double""... $ac_c" 1>&6 ! echo "configure:3181: checking size of double" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < --- 3304,3316 ---- echo $ac_n "checking size of double""... $ac_c" 1>&6 ! echo "configure:3308: checking size of double" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < *************** int main() { *** 3193,3199 **** switch (0) case 0: case (sizeof (double) == $ac_size):; ; return 0; } EOF ! if { (eval echo configure:3197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_double=$ac_size else --- 3320,3326 ---- switch (0) case 0: case (sizeof (double) == $ac_size):; ; return 0; } EOF ! if { (eval echo configure:3324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_double=$ac_size else *************** EOF *** 3216,3228 **** echo $ac_n "checking size of long double""... $ac_c" 1>&6 ! echo "configure:3220: checking size of long double" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < --- 3343,3355 ---- echo $ac_n "checking size of long double""... $ac_c" 1>&6 ! echo "configure:3347: checking size of long double" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < *************** int main() { *** 3232,3238 **** switch (0) case 0: case (sizeof (long double) == $ac_size):; ; return 0; } EOF ! if { (eval echo configure:3236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_long_double=$ac_size else --- 3359,3365 ---- switch (0) case 0: case (sizeof (long double) == $ac_size):; ; return 0; } EOF ! if { (eval echo configure:3363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_long_double=$ac_size else *************** EOF *** 3256,3268 **** echo $ac_n "checking size of void *""... $ac_c" 1>&6 ! echo "configure:3260: checking size of void *" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < --- 3383,3395 ---- echo $ac_n "checking size of void *""... $ac_c" 1>&6 ! echo "configure:3387: checking size of void *" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < *************** int main() { *** 3272,3278 **** switch (0) case 0: case (sizeof (void *) == $ac_size):; ; return 0; } EOF ! if { (eval echo configure:3276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_void_p=$ac_size else --- 3399,3405 ---- switch (0) case 0: case (sizeof (void *) == $ac_size):; ; return 0; } EOF ! if { (eval echo configure:3403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_void_p=$ac_size else *************** EOF *** 3295,3308 **** echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 ! echo "configure:3299: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include --- 3422,3435 ---- echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 ! echo "configure:3426: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include *************** int main() { *** 3313,3323 **** #endif ; return 0; } EOF ! if { (eval echo configure:3317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include --- 3440,3450 ---- #endif ; return 0; } EOF ! if { (eval echo configure:3444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include *************** int main() { *** 3328,3334 **** #endif ; return 0; } EOF ! if { (eval echo configure:3332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else --- 3455,3461 ---- #endif ; return 0; } EOF ! if { (eval echo configure:3459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else *************** if test "$cross_compiling" = yes; then *** 3348,3354 **** echo $ac_n "cross-compiling... " 2>&6 else cat > conftest.$ac_ext <&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else --- 3488,3494 ---- exit (u.c[sizeof (long) - 1] == 1); } EOF ! if { (eval echo configure:3492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else *************** fi *** 3379,3385 **** echo "$ac_t""$ac_cv_c_bigendian" 1>&6 if test $ac_cv_c_bigendian = unknown; then echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6 ! echo "configure:3383: checking to probe for byte ordering" >&5 cat >conftest.c <&6 if test $ac_cv_c_bigendian = unknown; then echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6 ! echo "configure:3510: checking to probe for byte ordering" >&5 cat >conftest.c <&6 ! echo "configure:3433: checking assembler and linker support unaligned pc related relocs" >&5 if eval "test \"`echo '$''{'libffi_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 3556,3562 ---- if test x$TARGET = xSPARC; then echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6 ! echo "configure:3560: checking assembler and linker support unaligned pc related relocs" >&5 if eval "test \"`echo '$''{'libffi_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** else *** 3439,3452 **** CFLAGS="$CFLAGS -fpic" LDFLAGS="$LDFLAGS -shared" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* libffi_cv_as_sparc_ua_pcrel=yes else --- 3566,3579 ---- CFLAGS="$CFLAGS -fpic" LDFLAGS="$LDFLAGS -shared" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* libffi_cv_as_sparc_ua_pcrel=yes else *************** echo "$ac_t""$libffi_cv_as_sparc_ua_pcre *** 3467,3472 **** --- 3594,3636 ---- EOF fi + + echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6 + echo "configure:3600: checking assembler .register pseudo-op support" >&5 + if eval "test \"`echo '$''{'libffi_cv_as_register_pseudo_op'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + libffi_cv_as_register_pseudo_op=unknown + # Check if we have .register + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + libffi_cv_as_register_pseudo_op=yes + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + libffi_cv_as_register_pseudo_op=no + fi + rm -f conftest* + + fi + + echo "$ac_t""$libffi_cv_as_register_pseudo_op" 1>&6 + if test "x$libffi_cv_as_register_pseudo_op" = xyes; then + cat >> confdefs.h <<\EOF + #define HAVE_AS_REGISTER_PSEUDO_OP 1 + EOF + + fi fi *************** s%@MIPS_GCC_TRUE@%$MIPS_GCC_TRUE%g *** 3709,3714 **** --- 3873,3880 ---- s%@MIPS_GCC_FALSE@%$MIPS_GCC_FALSE%g s%@MIPS_SGI_TRUE@%$MIPS_SGI_TRUE%g s%@MIPS_SGI_FALSE@%$MIPS_SGI_FALSE%g + s%@MIPS_LINUX_TRUE@%$MIPS_LINUX_TRUE%g + s%@MIPS_LINUX_FALSE@%$MIPS_LINUX_FALSE%g s%@SPARC_TRUE@%$SPARC_TRUE%g s%@SPARC_FALSE@%$SPARC_FALSE%g s%@X86_TRUE@%$X86_TRUE%g *************** s%@POWERPC_DARWIN_TRUE@%$POWERPC_DARWIN_ *** 3729,3734 **** --- 3895,3906 ---- s%@POWERPC_DARWIN_FALSE@%$POWERPC_DARWIN_FALSE%g s%@ARM_TRUE@%$ARM_TRUE%g s%@ARM_FALSE@%$ARM_FALSE%g + s%@S390_TRUE@%$S390_TRUE%g + s%@S390_FALSE@%$S390_FALSE%g + s%@X86_64_TRUE@%$X86_64_TRUE%g + s%@X86_64_FALSE@%$X86_64_FALSE%g + s%@SH_TRUE@%$SH_TRUE%g + s%@SH_FALSE@%$SH_FALSE%g s%@CPP@%$CPP%g s%@ALLOCA@%$ALLOCA%g s%@TARGET@%$TARGET%g *************** CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} *** 3954,3959 **** --- 4126,4132 ---- libffi_basedir=${libffi_basedir} CC="${CC}" DEFS="$DEFS" + ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}" test ! -d include && mkdir include test ! -f include/fficonfig.h && cp fficonfig.h include/fficonfig.h if cmp -s fficonfig.h include/fficonfig.h 2>/dev/null; then *************** test -z "$CONFIG_HEADERS" || echo timest *** 3969,3975 **** if test -n "$CONFIG_FILES"; then LD="${ORIGINAL_LD_FOR_MULTILIBS}" ! ac_file=Makefile . ${libffi_basedir}/../config-ml.in fi exit 0 --- 4142,4148 ---- if test -n "$CONFIG_FILES"; then LD="${ORIGINAL_LD_FOR_MULTILIBS}" ! ac_file=Makefile . ${srcdir}/${libffi_basedir}../config-ml.in fi exit 0 diff -Nrc3pad gcc-3.2.3/libffi/configure.in gcc-3.3/libffi/configure.in *** gcc-3.2.3/libffi/configure.in 2003-01-28 01:43:56.000000000 +0000 --- gcc-3.3/libffi/configure.in 2003-05-08 20:37:56.000000000 +0000 *************** dnl --with-target-subdir, --with-multisr *** 22,35 **** if test "${srcdir}" = "."; then if test "${with_target_subdir}" != "."; then ! libffi_basedir="${srcdir}/${with_multisrctop}.." else ! libffi_basedir="${srcdir}/${with_multisrctop}" fi else ! libffi_basedir="${srcdir}" fi AC_SUBST(libffi_basedir) AC_CANONICAL_HOST --- 22,36 ---- if test "${srcdir}" = "."; then if test "${with_target_subdir}" != "."; then ! libffi_basedir="${with_multisrctop}../" else ! libffi_basedir="${with_multisrctop}" fi else ! libffi_basedir= fi AC_SUBST(libffi_basedir) + AC_CONFIG_AUX_DIR(${libffi_basedir}..) AC_CANONICAL_HOST *************** i*86-*-cygwin*) TARGET=X86_WIN32; TARGET *** 56,72 **** i*86-*-mingw*) TARGET=X86_WIN32; TARGETDIR=x86;; sparc-sun-4*) TARGET=SPARC; TARGETDIR=sparc;; sparc*-sun-*) TARGET=SPARC; TARGETDIR=sparc;; ! sparc-*-linux*) TARGET=SPARC; TARGETDIR=sparc;; ! sparc64-*-linux*) TARGET=SPARC; TARGETDIR=sparc;; ! alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd*) TARGET=ALPHA; TARGETDIR=alpha;; ia64*-*-*) TARGET=IA64; TARGETDIR=ia64;; m68k-*-linux*) TARGET=M68K; TARGETDIR=m68k;; powerpc-*-linux* | powerpc-*-sysv*) TARGET=POWERPC; TARGETDIR=powerpc;; powerpc-*-beos*) TARGET=POWERPC; TARGETDIR=powerpc;; powerpc-*-darwin*) TARGET=POWERPC_DARWIN; TARGETDIR=powerpc;; powerpc-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;; rs6000-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;; arm*-*-linux-*) TARGET=ARM; TARGETDIR=arm;; esac if test $TARGETDIR = unknown; then --- 57,79 ---- i*86-*-mingw*) TARGET=X86_WIN32; TARGETDIR=x86;; sparc-sun-4*) TARGET=SPARC; TARGETDIR=sparc;; sparc*-sun-*) TARGET=SPARC; TARGETDIR=sparc;; ! sparc-*-linux* | sparc-*-netbsdelf*) TARGET=SPARC; TARGETDIR=sparc;; ! sparc64-*-linux* | sparc64-*-netbsd*) TARGET=SPARC; TARGETDIR=sparc;; ! alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd* | alpha*-*-netbsd*) TARGET=ALPHA; TARGETDIR=alpha;; ia64*-*-*) TARGET=IA64; TARGETDIR=ia64;; m68k-*-linux*) TARGET=M68K; TARGETDIR=m68k;; + mips64*-*);; + mips*-*-linux*) TARGET=MIPS_LINUX; TARGETDIR=mips;; powerpc-*-linux* | powerpc-*-sysv*) TARGET=POWERPC; TARGETDIR=powerpc;; powerpc-*-beos*) TARGET=POWERPC; TARGETDIR=powerpc;; powerpc-*-darwin*) TARGET=POWERPC_DARWIN; TARGETDIR=powerpc;; powerpc-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;; rs6000-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;; arm*-*-linux-*) TARGET=ARM; TARGETDIR=arm;; + s390-*-linux-*) TARGET=S390; TARGETDIR=s390;; + s390x-*-linux-*) TARGET=S390; TARGETDIR=s390;; + x86_64-*-linux*) TARGET=X86_64; TARGETDIR=x86;; + sh-*-linux* | sh[[34]]*-*-linux*) TARGET=SH; TARGETDIR=sh;; esac if test $TARGETDIR = unknown; then *************** fi *** 75,80 **** --- 82,88 ---- AM_CONDITIONAL(MIPS_GCC, test ${TARGET}${ac_cv_prog_gcc} = MIPSyes) AM_CONDITIONAL(MIPS_SGI, test ${TARGET}${ac_cv_prog_gcc} = MIPSno) + AM_CONDITIONAL(MIPS_LINUX, test x$TARGET = xMIPS_LINUX) AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC) AM_CONDITIONAL(X86, test x$TARGET = xX86) AM_CONDITIONAL(X86_WIN32, test x$TARGET = xX86_WIN32) *************** AM_CONDITIONAL(POWERPC, test x$TARGET = *** 85,90 **** --- 93,105 ---- AM_CONDITIONAL(POWERPC_AIX, test x$TARGET = xPOWERPC_AIX) AM_CONDITIONAL(POWERPC_DARWIN, test x$TARGET = xPOWERPC_DARWIN) AM_CONDITIONAL(ARM, test x$TARGET = xARM) + AM_CONDITIONAL(S390, test x$TARGET = xS390) + AM_CONDITIONAL(X86_64, test x$TARGET = xX86_64) + AM_CONDITIONAL(SH, test x$TARGET = xSH) + + if test x$TARGET = xMIPS_LINUX; then + TARGET=MIPS + fi AC_HEADER_STDC AC_CHECK_FUNCS(memcpy) *************** if test x$TARGET = xSPARC; then *** 118,123 **** --- 133,151 ---- AC_DEFINE(HAVE_AS_SPARC_UA_PCREL, 1, [Define if your assembler and linker support unaligned PC relative relocs.]) fi + + AC_CACHE_CHECK([assembler .register pseudo-op support], + libffi_cv_as_register_pseudo_op, [ + libffi_cv_as_register_pseudo_op=unknown + # Check if we have .register + AC_TRY_COMPILE([asm (".register %g2, #scratch");],, + [libffi_cv_as_register_pseudo_op=yes], + [libffi_cv_as_register_pseudo_op=no]) + ]) + if test "x$libffi_cv_as_register_pseudo_op" = xyes; then + AC_DEFINE(HAVE_AS_REGISTER_PSEUDO_OP, 1, + [Define if your assembler supports .register.]) + fi fi AC_SUBST(TARGET) *************** AC_OUTPUT(include/Makefile include/ffi.h *** 171,177 **** [ if test -n "$CONFIG_FILES"; then LD="${ORIGINAL_LD_FOR_MULTILIBS}" ! ac_file=Makefile . ${libffi_basedir}/../config-ml.in fi ], srcdir=${srcdir} --- 199,205 ---- [ if test -n "$CONFIG_FILES"; then LD="${ORIGINAL_LD_FOR_MULTILIBS}" ! ac_file=Makefile . ${srcdir}/${libffi_basedir}../config-ml.in fi ], srcdir=${srcdir} *************** CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} *** 183,188 **** --- 211,217 ---- libffi_basedir=${libffi_basedir} CC="${CC}" DEFS="$DEFS" + ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}" test ! -d include && mkdir include test ! -f include/fficonfig.h && cp fficonfig.h include/fficonfig.h if cmp -s fficonfig.h include/fficonfig.h 2>/dev/null; then diff -Nrc3pad gcc-3.2.3/libffi/fficonfig.h.in gcc-3.3/libffi/fficonfig.h.in *** gcc-3.2.3/libffi/fficonfig.h.in 2002-04-28 20:12:04.000000000 +0000 --- gcc-3.3/libffi/fficonfig.h.in 2003-05-08 20:37:57.000000000 +0000 *************** *** 25,34 **** /* Define if you have the ANSI C header files. */ #undef STDC_HEADERS - /* Define if your processor stores words with the most significant - byte first (like Motorola and SPARC, unlike Intel and VAX). */ - #undef WORDS_BIGENDIAN - /* Define this if you want extra debugging */ #undef FFI_DEBUG --- 25,30 ---- *************** *** 42,73 **** /* Define this is you do not want support for the raw API. */ #undef FFI_NO_RAW_API ! /* The number of bytes in a double. */ ! #undef SIZEOF_DOUBLE ! /* The number of bytes in a float. */ ! #undef SIZEOF_FLOAT ! /* The number of bytes in a int. */ #undef SIZEOF_INT ! /* The number of bytes in a long. */ #undef SIZEOF_LONG ! /* The number of bytes in a long double. */ ! #undef SIZEOF_LONG_DOUBLE ! ! /* The number of bytes in a long long. */ #undef SIZEOF_LONG_LONG ! /* The number of bytes in a short. */ ! #undef SIZEOF_SHORT ! /* The number of bytes in a void *. */ #undef SIZEOF_VOID_P ! /* Define if you have the memcpy function. */ ! #undef HAVE_MEMCPY ! /* Define if your assembler and linker support unaligned PC relative relocs. */ #undef HAVE_AS_SPARC_UA_PCREL --- 38,79 ---- /* Define this is you do not want support for the raw API. */ #undef FFI_NO_RAW_API ! /* Define if you have the memcpy function. */ ! #undef HAVE_MEMCPY ! /* The number of bytes in type short */ ! #undef SIZEOF_SHORT ! /* The number of bytes in type int */ #undef SIZEOF_INT ! /* The number of bytes in type long */ #undef SIZEOF_LONG ! /* The number of bytes in type long long */ #undef SIZEOF_LONG_LONG ! /* The number of bytes in type float */ ! #undef SIZEOF_FLOAT ! /* The number of bytes in type double */ ! #undef SIZEOF_DOUBLE ! ! /* The number of bytes in type long double */ ! #undef SIZEOF_LONG_DOUBLE ! ! /* The number of bytes in type void * */ #undef SIZEOF_VOID_P ! /* whether byteorder is bigendian */ ! #undef WORDS_BIGENDIAN ! /* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */ ! #undef BYTEORDER ! ! /* Define if your assembler and linker support unaligned PC relative relocs. */ #undef HAVE_AS_SPARC_UA_PCREL + + /* Define if your assembler supports .register. */ + #undef HAVE_AS_REGISTER_PSEUDO_OP + diff -Nrc3pad gcc-3.2.3/libffi/include/ffi.h.in gcc-3.3/libffi/include/ffi.h.in *** gcc-3.2.3/libffi/include/ffi.h.in 2002-03-12 22:35:56.000000000 +0000 --- gcc-3.3/libffi/include/ffi.h.in 2003-03-22 11:57:33.000000000 +0000 *************** *** 1,5 **** /* -----------------------------------------------------------------*-C-*- ! libffi @VERSION@ - Copyright (c) 1996-2002 Cygnus Solutions Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the --- 1,5 ---- /* -----------------------------------------------------------------*-C-*- ! libffi @VERSION@ - Copyright (c) 1996-2003 Cygnus Solutions Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the *************** extern "C" { *** 164,169 **** --- 164,182 ---- #endif #endif + #ifdef S390 + #if defined (__s390x__) + #define S390X + #endif + #endif + + #ifdef X86_64 + #if defined (__i386__) + #undef X86_64 + #define X86 + #endif + #endif + #ifndef LIBFFI_ASM /* ---- Generic type definitions ----------------------------------------- */ *************** typedef enum ffi_abi { *** 189,204 **** #endif #endif ! /* ---- Intel x86 ---------------- */ ! #ifdef X86 FFI_SYSV, FFI_DEFAULT_ABI = FFI_SYSV, #endif ! /* ---- Intel x86 Win32 ---------- */ ! #ifdef X86_WIN32 FFI_SYSV, FFI_DEFAULT_ABI = FFI_SYSV, #endif /* ---- Intel ia64 ---------------- */ --- 202,224 ---- #endif #endif ! /* ---- Intel x86 Win32 ---------- */ ! #ifdef X86_WIN32 FFI_SYSV, + FFI_STDCALL, + /* TODO: Add fastcall support for the sake of completeness */ FFI_DEFAULT_ABI = FFI_SYSV, #endif ! /* ---- Intel x86 and AMD x86-64 - */ ! #if !defined(X86_WIN32) && (defined(__i386__) || defined(__x86_64__)) FFI_SYSV, + FFI_UNIX64, /* Unix variants all use the same ABI for x86-64 */ + #ifdef __i386__ FFI_DEFAULT_ABI = FFI_SYSV, + #else + FFI_DEFAULT_ABI = FFI_UNIX64, + #endif #endif /* ---- Intel ia64 ---------------- */ *************** typedef enum ffi_abi { *** 251,256 **** --- 271,288 ---- FFI_DEFAULT_ABI = FFI_SYSV, #endif + /* ---- S390 --------------------- */ + #ifdef S390 + FFI_SYSV, + FFI_DEFAULT_ABI = FFI_SYSV, + #endif + + /* ---- SuperH ------------------- */ + #ifdef SH + FFI_SYSV, + FFI_DEFAULT_ABI = FFI_SYSV, + #endif + /* Leave this for debugging purposes */ FFI_LAST_ABI *************** typedef struct _ffi_type *** 264,270 **** /*@null@*/ struct _ffi_type **elements; } ffi_type; ! /* These are defined in ffi.c */ extern ffi_type ffi_type_void; extern ffi_type ffi_type_uint8; extern ffi_type ffi_type_sint8; --- 296,302 ---- /*@null@*/ struct _ffi_type **elements; } ffi_type; ! /* These are defined in types.c */ extern ffi_type ffi_type_void; extern ffi_type ffi_type_uint8; extern ffi_type ffi_type_sint8; *************** size_t ffi_java_raw_size (ffi_cif *cif); *** 373,385 **** /* ---- Definitions for closures ----------------------------------------- */ ! #ifdef X86 ! ! #define FFI_CLOSURES 1 /* x86 supports closures */ ! #define FFI_TRAMPOLINE_SIZE 10 ! #define FFI_NATIVE_RAW_API 1 /* and has native raw api support */ ! ! #elif defined(X86_WIN32) #define FFI_CLOSURES 1 /* x86 supports closures */ #define FFI_TRAMPOLINE_SIZE 10 --- 405,411 ---- /* ---- Definitions for closures ----------------------------------------- */ ! #ifdef __i386__ #define FFI_CLOSURES 1 /* x86 supports closures */ #define FFI_TRAMPOLINE_SIZE 10 *************** struct ffi_ia64_trampoline_struct { *** 424,429 **** --- 450,489 ---- #define FFI_TRAMPOLINE_SIZE 24 /* see struct below */ #define FFI_NATIVE_RAW_API 0 + #elif defined(SPARC64) + + #define FFI_CLOSURES 1 + #define FFI_TRAMPOLINE_SIZE 24 + #define FFI_NATIVE_RAW_API 0 + + #elif defined(SPARC) + + #define FFI_CLOSURES 1 + #define FFI_TRAMPOLINE_SIZE 16 + #define FFI_NATIVE_RAW_API 0 + + #elif defined(S390) + + #define FFI_CLOSURES 1 + #ifdef S390X + #define FFI_TRAMPOLINE_SIZE 32 + #else + #define FFI_TRAMPOLINE_SIZE 16 + #endif + #define FFI_NATIVE_RAW_API 0 + + #elif defined(SH) + + #define FFI_CLOSURES 1 + #define FFI_TRAMPOLINE_SIZE 16 + #define FFI_NATIVE_RAW_API 0 + + #elif defined(__x86_64__) + + #define FFI_CLOSURES 1 + #define FFI_TRAMPOLINE_SIZE 24 + #define FFI_NATIVE_RAW_API 0 + #else #define FFI_CLOSURES 0 diff -Nrc3pad gcc-3.2.3/libffi/include/Makefile.in gcc-3.3/libffi/include/Makefile.in *** gcc-3.2.3/libffi/include/Makefile.in 2001-10-09 05:32:16.000000000 +0000 --- gcc-3.3/libffi/include/Makefile.in 2003-04-05 01:46:50.000000000 +0000 *************** *** 1,6 **** ! # Makefile.in generated automatically by automake 1.4 from Makefile.am ! # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. --- 1,6 ---- ! # Makefile.in generated automatically by automake 1.4-p5 from Makefile.am ! # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. *************** TARGET = @TARGET@ *** 81,86 **** --- 81,88 ---- TARGETDIR = @TARGETDIR@ VERSION = @VERSION@ libffi_basedir = @libffi_basedir@ + toolexecdir = @toolexecdir@ + toolexeclibdir = @toolexeclibdir@ AUTOMAKE_OPTIONS = foreign *************** EXTRA_DIST = ffi.h.in ffi_common.h ffi_m *** 89,95 **** hackdir = $(includedir) hack_DATA = fficonfig.h ffi.h ffi_mips.h ! mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs CONFIG_HEADER = ../fficonfig.h CONFIG_CLEAN_FILES = ffi.h DATA = $(hack_DATA) --- 91,97 ---- hackdir = $(includedir) hack_DATA = fficonfig.h ffi.h ffi_mips.h ! mkinstalldirs = $(SHELL) $(top_srcdir)/${libffi_basedir}../mkinstalldirs CONFIG_HEADER = ../fficonfig.h CONFIG_CLEAN_FILES = ffi.h DATA = $(hack_DATA) *************** DIST_COMMON = Makefile.am Makefile.in f *** 99,105 **** DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) ! TAR = gnutar GZIP_ENV = --best all: all-redirect .SUFFIXES: --- 101,107 ---- DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) ! TAR = gtar GZIP_ENV = --best all: all-redirect .SUFFIXES: diff -Nrc3pad gcc-3.2.3/libffi/Makefile.am gcc-3.3/libffi/Makefile.am *** gcc-3.2.3/libffi/Makefile.am 2003-01-28 01:43:56.000000000 +0000 --- gcc-3.3/libffi/Makefile.am 2003-01-28 01:44:57.000000000 +0000 *************** EXTRA_DIST = LICENSE ChangeLog.v1 src/mi *** 8,13 **** --- 8,14 ---- src/mips/n32.s src/mips/o32.S src/mips/o32.s \ src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S \ src/x86/ffi.c src/x86/sysv.S src/x86/win32.S \ + src/x86/ffi64.c src/x86/unix64.S \ src/alpha/ffi.c src/alpha/osf.S \ src/m68k/ffi.c src/m68k/sysv.S \ src/powerpc/ffi.c src/powerpc/sysv.S \ *************** EXTRA_DIST = LICENSE ChangeLog.v1 src/mi *** 15,21 **** src/powerpc/ffi_darwin.c \ src/powerpc/darwin.S src/powerpc/aix.S \ src/powerpc/darwin_closure.S src/powerpc/aix_closures.S \ ! src/arm/ffi.c src/arm/sysv.S VPATH = @srcdir@:@srcdir@/src:@srcdir@/src/@TARGETDIR@ --- 16,24 ---- src/powerpc/ffi_darwin.c \ src/powerpc/darwin.S src/powerpc/aix.S \ src/powerpc/darwin_closure.S src/powerpc/aix_closures.S \ ! src/arm/ffi.c src/arm/sysv.S \ ! src/s390/ffi.c src/s390/sysv.S \ ! src/sh/ffi.c src/sh/sysv.S VPATH = @srcdir@:@srcdir@/src:@srcdir@/src/@TARGETDIR@ *************** ffitest_LDADD = libffi.la *** 83,88 **** --- 86,92 ---- ffitest_LDFLAGS = -shared-libgcc TARGET_SRC_MIPS_GCC = src/mips/ffi.c src/mips/o32.S src/mips/n32.S + TARGET_SRC_MIPS_LINUX = src/mips/ffi.c src/mips/o32.S TARGET_SRC_MIPS_SGI = src/mips/ffi.c src/mips/o32.s src/mips/n32.s TARGET_SRC_X86 = src/x86/ffi.c src/x86/sysv.S TARGET_SRC_X86_WIN32 = src/x86/ffi.c src/x86/win32.S *************** TARGET_SRC_POWERPC = src/powerpc/ffi.c s *** 94,99 **** --- 98,106 ---- TARGET_SRC_POWERPC_AIX = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closures.S TARGET_SRC_POWERPC_DARWIN = src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S TARGET_SRC_ARM = src/arm/sysv.S src/arm/ffi.c + TARGET_SRC_S390 = src/s390/sysv.S src/s390/ffi.c + TARGET_SRC_X86_64 = src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S + TARGET_SRC_SH = src/sh/sysv.S src/sh/ffi.c ##libffi_la_SOURCES = src/debug.c src/prep_cif.c src/types.c $(TARGET_SRC_@TARGET@) ## Work around automake deficiency *************** if MIPS_GCC *** 103,108 **** --- 110,119 ---- libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC) libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC) endif + if MIPS_LINUX + libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX) + libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX) + endif if MIPS_SGI libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI) libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI) *************** if ARM *** 147,152 **** --- 158,175 ---- libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ARM) libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ARM) endif + if S390 + libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_S390) + libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_S390) + endif + if X86_64 + libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86_64) + libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86_64) + endif + if SH + libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SH) + libfficonvenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SH) + endif AM_CFLAGS = -fexceptions diff -Nrc3pad gcc-3.2.3/libffi/Makefile.in gcc-3.3/libffi/Makefile.in *** gcc-3.2.3/libffi/Makefile.in 2003-01-28 22:59:05.000000000 +0000 --- gcc-3.3/libffi/Makefile.in 2003-01-28 01:44:57.000000000 +0000 *************** EXTRA_DIST = LICENSE ChangeLog.v1 src/mi *** 91,96 **** --- 91,97 ---- src/mips/n32.s src/mips/o32.S src/mips/o32.s \ src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S \ src/x86/ffi.c src/x86/sysv.S src/x86/win32.S \ + src/x86/ffi64.c src/x86/unix64.S \ src/alpha/ffi.c src/alpha/osf.S \ src/m68k/ffi.c src/m68k/sysv.S \ src/powerpc/ffi.c src/powerpc/sysv.S \ *************** EXTRA_DIST = LICENSE ChangeLog.v1 src/mi *** 98,104 **** src/powerpc/ffi_darwin.c \ src/powerpc/darwin.S src/powerpc/aix.S \ src/powerpc/darwin_closure.S src/powerpc/aix_closures.S \ ! src/arm/ffi.c src/arm/sysv.S VPATH = @srcdir@:@srcdir@/src:@srcdir@/src/@TARGETDIR@ --- 99,107 ---- src/powerpc/ffi_darwin.c \ src/powerpc/darwin.S src/powerpc/aix.S \ src/powerpc/darwin_closure.S src/powerpc/aix_closures.S \ ! src/arm/ffi.c src/arm/sysv.S \ ! src/s390/ffi.c src/s390/sysv.S \ ! src/sh/ffi.c src/sh/sysv.S VPATH = @srcdir@:@srcdir@/src:@srcdir@/src/@TARGETDIR@ *************** ffitest_LDADD = libffi.la *** 162,167 **** --- 165,171 ---- ffitest_LDFLAGS = -shared-libgcc TARGET_SRC_MIPS_GCC = src/mips/ffi.c src/mips/o32.S src/mips/n32.S + TARGET_SRC_MIPS_LINUX = src/mips/ffi.c src/mips/o32.S TARGET_SRC_MIPS_SGI = src/mips/ffi.c src/mips/o32.s src/mips/n32.s TARGET_SRC_X86 = src/x86/ffi.c src/x86/sysv.S TARGET_SRC_X86_WIN32 = src/x86/ffi.c src/x86/win32.S *************** TARGET_SRC_POWERPC = src/powerpc/ffi.c s *** 173,183 **** --- 177,191 ---- TARGET_SRC_POWERPC_AIX = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closures.S TARGET_SRC_POWERPC_DARWIN = src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S TARGET_SRC_ARM = src/arm/sysv.S src/arm/ffi.c + TARGET_SRC_S390 = src/s390/sysv.S src/s390/ffi.c + TARGET_SRC_X86_64 = src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S + TARGET_SRC_SH = src/sh/sysv.S src/sh/ffi.c libffi_la_common_SOURCES = src/debug.c src/prep_cif.c src/types.c \ src/raw_api.c src/java_raw_api.c @MIPS_GCC_TRUE@libffi_la_SOURCES = @MIPS_GCC_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC) + @MIPS_LINUX_TRUE@libffi_la_SOURCES = @MIPS_LINUX_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX) @MIPS_SGI_TRUE@libffi_la_SOURCES = @MIPS_SGI_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI) @X86_TRUE@libffi_la_SOURCES = @X86_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86) @X86_WIN32_TRUE@libffi_la_SOURCES = @X86_WIN32_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86_WIN32) *************** libffi_la_common_SOURCES = src/debug.c s *** 189,195 **** --- 197,207 ---- @POWERPC_AIX_TRUE@libffi_la_SOURCES = @POWERPC_AIX_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_AIX) @POWERPC_DARWIN_TRUE@libffi_la_SOURCES = @POWERPC_DARWIN_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_DARWIN) @ARM_TRUE@libffi_la_SOURCES = @ARM_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_ARM) + @S390_TRUE@libffi_la_SOURCES = @S390_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_S390) + @X86_64_TRUE@libffi_la_SOURCES = @X86_64_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86_64) + @SH_TRUE@libffi_la_SOURCES = @SH_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_SH) @MIPS_GCC_TRUE@libffi_convenience_la_SOURCES = @MIPS_GCC_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC) + @MIPS_LINUX_TRUE@libffi_convenience_la_SOURCES = @MIPS_LINUX_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX) @MIPS_SGI_TRUE@libffi_convenience_la_SOURCES = @MIPS_SGI_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI) @X86_TRUE@libffi_convenience_la_SOURCES = @X86_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86) @X86_WIN32_TRUE@libffi_convenience_la_SOURCES = @X86_WIN32_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86_WIN32) *************** libffi_la_common_SOURCES = src/debug.c s *** 201,206 **** --- 213,221 ---- @POWERPC_AIX_TRUE@libffi_convenience_la_SOURCES = @POWERPC_AIX_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_AIX) @POWERPC_DARWIN_TRUE@libffi_convenience_la_SOURCES = @POWERPC_DARWIN_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_DARWIN) @ARM_TRUE@libffi_convenience_la_SOURCES = @ARM_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_ARM) + @S390_TRUE@libffi_convenience_la_SOURCES = @S390_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_S390) + @X86_64_TRUE@libffi_convenience_la_SOURCES = @X86_64_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86_64) + @SH_TRUE@libfficonvenience_la_SOURCES = @SH_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_SH) AM_CFLAGS = -fexceptions *************** libffi_la_LDFLAGS = -release $(VERSION) *** 208,214 **** INCLUDES = -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ! mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs CONFIG_HEADER = fficonfig.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) $(toolexeclib_LTLIBRARIES) --- 223,229 ---- INCLUDES = -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ! mkinstalldirs = $(SHELL) $(top_srcdir)/${libffi_basedir}/../mkinstalldirs CONFIG_HEADER = fficonfig.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) $(toolexeclib_LTLIBRARIES) *************** LDFLAGS = @LDFLAGS@ *** 220,229 **** LIBS = @LIBS@ libffi_convenience_la_LDFLAGS = libffi_convenience_la_LIBADD = - @POWERPC_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \ - @POWERPC_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ - @POWERPC_TRUE@src/java_raw_api.lo src/powerpc/ffi.lo \ - @POWERPC_TRUE@src/powerpc/sysv.lo src/powerpc/ppc_closure.lo @ALPHA_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \ @ALPHA_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ @ALPHA_TRUE@src/java_raw_api.lo src/alpha/ffi.lo src/alpha/osf.lo --- 235,240 ---- *************** libffi_convenience_la_LIBADD = *** 234,245 **** @MIPS_GCC_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ @MIPS_GCC_TRUE@src/java_raw_api.lo src/mips/ffi.lo src/mips/o32.lo \ @MIPS_GCC_TRUE@src/mips/n32.lo ! @X86_WIN32_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \ ! @X86_WIN32_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ ! @X86_WIN32_TRUE@src/java_raw_api.lo src/x86/ffi.lo src/x86/win32.lo @M68K_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \ @M68K_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ @M68K_TRUE@src/m68k/ffi.lo src/m68k/sysv.lo @SPARC_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \ @SPARC_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ @SPARC_TRUE@src/java_raw_api.lo src/sparc/ffi.lo src/sparc/v8.lo \ --- 245,273 ---- @MIPS_GCC_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ @MIPS_GCC_TRUE@src/java_raw_api.lo src/mips/ffi.lo src/mips/o32.lo \ @MIPS_GCC_TRUE@src/mips/n32.lo ! @S390_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \ ! @S390_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ ! @S390_TRUE@src/s390/sysv.lo src/s390/ffi.lo @M68K_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \ @M68K_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ @M68K_TRUE@src/m68k/ffi.lo src/m68k/sysv.lo + @X86_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \ + @X86_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ + @X86_TRUE@src/x86/ffi.lo src/x86/sysv.lo + @POWERPC_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \ + @POWERPC_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ + @POWERPC_TRUE@src/java_raw_api.lo src/powerpc/ffi.lo \ + @POWERPC_TRUE@src/powerpc/sysv.lo src/powerpc/ppc_closure.lo + @MIPS_LINUX_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \ + @MIPS_LINUX_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ + @MIPS_LINUX_TRUE@src/java_raw_api.lo src/mips/ffi.lo src/mips/o32.lo + @X86_WIN32_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \ + @X86_WIN32_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ + @X86_WIN32_TRUE@src/java_raw_api.lo src/x86/ffi.lo src/x86/win32.lo + @X86_64_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \ + @X86_64_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ + @X86_64_TRUE@src/java_raw_api.lo src/x86/ffi64.lo src/x86/unix64.lo \ + @X86_64_TRUE@src/x86/ffi.lo src/x86/sysv.lo @SPARC_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \ @SPARC_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ @SPARC_TRUE@src/java_raw_api.lo src/sparc/ffi.lo src/sparc/v8.lo \ *************** libffi_convenience_la_LIBADD = *** 248,288 **** @POWERPC_AIX_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ @POWERPC_AIX_TRUE@src/java_raw_api.lo src/powerpc/ffi_darwin.lo \ @POWERPC_AIX_TRUE@src/powerpc/aix.lo src/powerpc/aix_closures.lo ! @X86_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \ ! @X86_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ ! @X86_TRUE@src/x86/ffi.lo src/x86/sysv.lo ! @ARM_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \ ! @ARM_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ ! @ARM_TRUE@src/arm/sysv.lo src/arm/ffi.lo @POWERPC_DARWIN_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \ @POWERPC_DARWIN_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ @POWERPC_DARWIN_TRUE@src/java_raw_api.lo src/powerpc/ffi_darwin.lo \ @POWERPC_DARWIN_TRUE@src/powerpc/darwin.lo \ @POWERPC_DARWIN_TRUE@src/powerpc/darwin_closure.lo ! @MIPS_SGI_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \ ! @MIPS_SGI_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ ! @MIPS_SGI_TRUE@src/java_raw_api.lo src/mips/ffi.lo src/mips/o32.lo \ ! @MIPS_SGI_TRUE@src/mips/n32.lo libffi_la_LIBADD = @POWERPC_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ @POWERPC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ @POWERPC_TRUE@src/powerpc/ffi.lo src/powerpc/sysv.lo \ @POWERPC_TRUE@src/powerpc/ppc_closure.lo ! @ALPHA_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ ! @ALPHA_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ ! @ALPHA_TRUE@src/alpha/ffi.lo src/alpha/osf.lo ! @IA64_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ ! @IA64_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ ! @IA64_TRUE@src/ia64/ffi.lo src/ia64/unix.lo ! @MIPS_GCC_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ ! @MIPS_GCC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ ! @MIPS_GCC_TRUE@src/mips/ffi.lo src/mips/o32.lo src/mips/n32.lo ! @X86_WIN32_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ ! @X86_WIN32_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ ! @X86_WIN32_TRUE@src/x86/ffi.lo src/x86/win32.lo ! @M68K_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ ! @M68K_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ ! @M68K_TRUE@src/m68k/ffi.lo src/m68k/sysv.lo @SPARC_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ @SPARC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ @SPARC_TRUE@src/sparc/ffi.lo src/sparc/v8.lo src/sparc/v9.lo --- 276,310 ---- @POWERPC_AIX_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ @POWERPC_AIX_TRUE@src/java_raw_api.lo src/powerpc/ffi_darwin.lo \ @POWERPC_AIX_TRUE@src/powerpc/aix.lo src/powerpc/aix_closures.lo ! @MIPS_SGI_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \ ! @MIPS_SGI_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ ! @MIPS_SGI_TRUE@src/java_raw_api.lo src/mips/ffi.lo src/mips/o32.lo \ ! @MIPS_SGI_TRUE@src/mips/n32.lo @POWERPC_DARWIN_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \ @POWERPC_DARWIN_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ @POWERPC_DARWIN_TRUE@src/java_raw_api.lo src/powerpc/ffi_darwin.lo \ @POWERPC_DARWIN_TRUE@src/powerpc/darwin.lo \ @POWERPC_DARWIN_TRUE@src/powerpc/darwin_closure.lo ! @ARM_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \ ! @ARM_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ ! @ARM_TRUE@src/arm/sysv.lo src/arm/ffi.lo libffi_la_LIBADD = + @SH_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo src/types.lo \ + @SH_TRUE@src/raw_api.lo src/java_raw_api.lo src/sh/sysv.lo \ + @SH_TRUE@src/sh/ffi.lo + @IA64_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ + @IA64_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ + @IA64_TRUE@src/ia64/ffi.lo src/ia64/unix.lo + @X86_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo src/types.lo \ + @X86_TRUE@src/raw_api.lo src/java_raw_api.lo src/x86/ffi.lo \ + @X86_TRUE@src/x86/sysv.lo @POWERPC_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ @POWERPC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ @POWERPC_TRUE@src/powerpc/ffi.lo src/powerpc/sysv.lo \ @POWERPC_TRUE@src/powerpc/ppc_closure.lo ! @MIPS_LINUX_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ ! @MIPS_LINUX_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ ! @MIPS_LINUX_TRUE@src/mips/ffi.lo src/mips/o32.lo @SPARC_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ @SPARC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ @SPARC_TRUE@src/sparc/ffi.lo src/sparc/v8.lo src/sparc/v9.lo *************** libffi_la_LIBADD = *** 290,308 **** @POWERPC_AIX_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ @POWERPC_AIX_TRUE@src/powerpc/ffi_darwin.lo src/powerpc/aix.lo \ @POWERPC_AIX_TRUE@src/powerpc/aix_closures.lo ! @X86_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo src/types.lo \ ! @X86_TRUE@src/raw_api.lo src/java_raw_api.lo src/x86/ffi.lo \ ! @X86_TRUE@src/x86/sysv.lo @ARM_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo src/types.lo \ @ARM_TRUE@src/raw_api.lo src/java_raw_api.lo src/arm/sysv.lo \ @ARM_TRUE@src/arm/ffi.lo @POWERPC_DARWIN_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ @POWERPC_DARWIN_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ @POWERPC_DARWIN_TRUE@src/powerpc/ffi_darwin.lo src/powerpc/darwin.lo \ @POWERPC_DARWIN_TRUE@src/powerpc/darwin_closure.lo - @MIPS_SGI_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ - @MIPS_SGI_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ - @MIPS_SGI_TRUE@src/mips/ffi.lo src/mips/o32.lo src/mips/n32.lo noinst_PROGRAMS = ffitest$(EXEEXT) PROGRAMS = $(noinst_PROGRAMS) --- 312,346 ---- @POWERPC_AIX_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ @POWERPC_AIX_TRUE@src/powerpc/ffi_darwin.lo src/powerpc/aix.lo \ @POWERPC_AIX_TRUE@src/powerpc/aix_closures.lo ! @MIPS_SGI_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ ! @MIPS_SGI_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ ! @MIPS_SGI_TRUE@src/mips/ffi.lo src/mips/o32.lo src/mips/n32.lo @ARM_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo src/types.lo \ @ARM_TRUE@src/raw_api.lo src/java_raw_api.lo src/arm/sysv.lo \ @ARM_TRUE@src/arm/ffi.lo + @ALPHA_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ + @ALPHA_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ + @ALPHA_TRUE@src/alpha/ffi.lo src/alpha/osf.lo + @MIPS_GCC_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ + @MIPS_GCC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ + @MIPS_GCC_TRUE@src/mips/ffi.lo src/mips/o32.lo src/mips/n32.lo + @S390_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ + @S390_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ + @S390_TRUE@src/s390/sysv.lo src/s390/ffi.lo + @M68K_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ + @M68K_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ + @M68K_TRUE@src/m68k/ffi.lo src/m68k/sysv.lo + @X86_WIN32_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ + @X86_WIN32_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ + @X86_WIN32_TRUE@src/x86/ffi.lo src/x86/win32.lo + @X86_64_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ + @X86_64_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ + @X86_64_TRUE@src/x86/ffi64.lo src/x86/unix64.lo src/x86/ffi.lo \ + @X86_64_TRUE@src/x86/sysv.lo @POWERPC_DARWIN_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ @POWERPC_DARWIN_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ @POWERPC_DARWIN_TRUE@src/powerpc/ffi_darwin.lo src/powerpc/darwin.lo \ @POWERPC_DARWIN_TRUE@src/powerpc/darwin_closure.lo noinst_PROGRAMS = ffitest$(EXEEXT) PROGRAMS = $(noinst_PROGRAMS) *************** distdir: $(DISTFILES) *** 578,585 **** -chmod 777 $(distdir) $(mkinstalldirs) $(distdir)/src/alpha $(distdir)/src/arm \ $(distdir)/src/m68k $(distdir)/src/mips \ ! $(distdir)/src/powerpc $(distdir)/src/sparc \ ! $(distdir)/src/x86 @for file in $(DISTFILES); do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ --- 616,623 ---- -chmod 777 $(distdir) $(mkinstalldirs) $(distdir)/src/alpha $(distdir)/src/arm \ $(distdir)/src/m68k $(distdir)/src/mips \ ! $(distdir)/src/powerpc $(distdir)/src/s390 $(distdir)/src/sh \ ! $(distdir)/src/sparc $(distdir)/src/x86 @for file in $(DISTFILES); do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ diff -Nrc3pad gcc-3.2.3/libffi/src/arm/ffi.c gcc-3.3/libffi/src/arm/ffi.c *** gcc-3.2.3/libffi/src/arm/ffi.c 2001-03-02 22:21:23.000000000 +0000 --- gcc-3.3/libffi/src/arm/ffi.c 2002-07-18 23:08:30.000000000 +0000 *************** void ffi_prep_args(char *stack, extended *** 36,48 **** /*@=exportheader@*/ { register unsigned int i; - register int tmp; - register unsigned int avn; register void **p_argv; register char *argp; register ffi_type **p_arg; - tmp = 0; argp = stack; if ( ecif->cif->rtype->type == FFI_TYPE_STRUCT ) { --- 36,45 ---- *************** void ffi_prep_args(char *stack, extended *** 50,60 **** argp += 4; } - avn = ecif->cif->nargs; p_argv = ecif->avalue; for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types; ! (i != 0) && (avn != 0); i--, p_arg++) { size_t z; --- 47,56 ---- argp += 4; } p_argv = ecif->avalue; for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types; ! (i != 0); i--, p_arg++) { size_t z; *************** void ffi_prep_args(char *stack, extended *** 64,72 **** argp = (char *) ALIGN(argp, (*p_arg)->alignment); } - if (avn != 0) - { - avn--; z = (*p_arg)->size; if (z < sizeof(int)) { --- 60,65 ---- *************** void ffi_prep_args(char *stack, extended *** 107,113 **** } p_argv++; argp += z; - } } return; --- 100,105 ---- diff -Nrc3pad gcc-3.2.3/libffi/src/arm/sysv.S gcc-3.3/libffi/src/arm/sysv.S *** gcc-3.2.3/libffi/src/arm/sysv.S 2001-03-02 22:21:23.000000000 +0000 --- gcc-3.3/libffi/src/arm/sysv.S 2002-09-29 18:08:58.000000000 +0000 *************** *** 28,35 **** #ifdef HAVE_MACHINE_ASM_H #include #else ! /* XXX these lose for some platforms, I'm sure. */ #define CNAME(x) x #define ENTRY(x) .globl CNAME(x); .type CNAME(x),%function; CNAME(x): #endif --- 28,42 ---- #ifdef HAVE_MACHINE_ASM_H #include #else ! #ifdef __USER_LABEL_PREFIX__ ! #define CONCAT1(a, b) CONCAT2(a, b) ! #define CONCAT2(a, b) a ## b ! ! /* Use the right prefix for global labels. */ ! #define CNAME(x) CONCAT1 (__USER_LABEL_PREFIX__, x) ! #else #define CNAME(x) x + #endif #define ENTRY(x) .globl CNAME(x); .type CNAME(x),%function; CNAME(x): #endif *************** ENTRY(ffi_call_SYSV) *** 96,107 **** --- 103,122 ---- # return FLOAT cmp a4, #FFI_TYPE_FLOAT + #ifdef __SOFTFP__ + streq a1, [a3] + #else stfeqs f0, [a3] + #endif beq epilogue # return DOUBLE or LONGDOUBLE cmp a4, #FFI_TYPE_DOUBLE + #ifdef __SOFTFP__ + stmeqia a3, {a1, a2} + #else stfeqd f0, [a3] + #endif epilogue: ldmfd sp!, {a1-a4, fp, pc} diff -Nrc3pad gcc-3.2.3/libffi/src/ffitest.c gcc-3.3/libffi/src/ffitest.c *** gcc-3.2.3/libffi/src/ffitest.c 2003-02-08 07:54:39.000000000 +0000 --- gcc-3.3/libffi/src/ffitest.c 2003-01-14 11:11:35.000000000 +0000 *************** static size_t my_strlen(char *s) *** 49,54 **** --- 49,61 ---- return (strlen(s)); } + #ifdef X86_WIN32 + static size_t __attribute__((stdcall)) my_stdcall_strlen(char *s) + { + return (strlen(s)); + } + #endif /* X86_WIN32 */ + static int promotion(signed char sc, signed short ss, unsigned char uc, unsigned short us) { *************** static float many(float f1, *** 112,117 **** --- 119,143 ---- return ((f1/f2+f3/f4+f5/f6+f7/f8+f9/f10+f11/f12) * f13); } + #ifdef X86_WIN32 + static float __attribute__((stdcall)) stdcall_many(float f1, + float f2, + float f3, + float f4, + float f5, + float f6, + float f7, + float f8, + float f9, + float f10, + float f11, + float f12, + float f13) + { + return ((f1/f2+f3/f4+f5/f6+f7/f8+f9/f10+f11/f12) * f13); + } + #endif /* X86_WIN32 */ + static double dblit(float f) { return f/3.0; *************** typedef struct *** 153,158 **** --- 179,211 ---- char c2; } test_structure_5; + typedef struct + { + float f; + double d; + } test_structure_6; + + typedef struct + { + float f1; + float f2; + double d; + } test_structure_7; + + typedef struct + { + float f1; + float f2; + float f3; + float f4; + } test_structure_8; + + typedef struct + { + float f; + int i; + } test_structure_9; + static test_structure_1 struct1(test_structure_1 ts) { /*@-type@*/ *************** static test_structure_5 struct5(test_str *** 194,199 **** --- 247,287 ---- return ts1; } + static test_structure_6 struct6 (test_structure_6 ts) + { + ts.f += 1; + ts.d += 1; + + return ts; + } + + static test_structure_7 struct7 (test_structure_7 ts) + { + ts.f1 += 1; + ts.f2 += 1; + ts.d += 1; + + return ts; + } + + static test_structure_8 struct8 (test_structure_8 ts) + { + ts.f1 += 1; + ts.f2 += 1; + ts.f3 += 1; + ts.f4 += 1; + + return ts; + } + + static test_structure_9 struct9 (test_structure_9 ts) + { + ts.f += 1; + ts.i += 1; + + return ts; + } + /* Take an int and a float argument, together with int userdata, and */ /* return the sum. */ #if FFI_CLOSURES *************** typedef int (*closure_test_type3)(float, *** 316,321 **** --- 404,410 ---- float, float, double, int, float, float, int, float, float, int); #endif + int main(/*@unused@*/ int argc, /*@unused@*/ char *argv[]) { ffi_cif cif; *************** int main(/*@unused@*/ int argc, /*@unuse *** 350,360 **** --- 439,457 ---- ffi_type ts3_type; ffi_type ts4_type; ffi_type ts5_type; + ffi_type ts6_type; + ffi_type ts7_type; + ffi_type ts8_type; + ffi_type ts9_type; ffi_type *ts1_type_elements[4]; ffi_type *ts2_type_elements[3]; ffi_type *ts3_type_elements[2]; ffi_type *ts4_type_elements[4]; ffi_type *ts5_type_elements[3]; + ffi_type *ts6_type_elements[3]; + ffi_type *ts7_type_elements[4]; + ffi_type *ts8_type_elements[5]; + ffi_type *ts9_type_elements[3]; ts1_type.size = 0; ts1_type.alignment = 0; *************** int main(/*@unused@*/ int argc, /*@unuse *** 376,387 **** --- 473,504 ---- ts5_type.alignment = 0; ts5_type.type = FFI_TYPE_STRUCT; + ts6_type.size = 0; + ts6_type.alignment = 0; + ts6_type.type = FFI_TYPE_STRUCT; + + ts7_type.size = 0; + ts7_type.alignment = 0; + ts7_type.type = FFI_TYPE_STRUCT; + + ts8_type.size = 0; + ts8_type.alignment = 0; + ts8_type.type = FFI_TYPE_STRUCT; + + ts9_type.size = 0; + ts9_type.alignment = 0; + ts9_type.type = FFI_TYPE_STRUCT; + /*@-immediatetrans@*/ ts1_type.elements = ts1_type_elements; ts2_type.elements = ts2_type_elements; ts3_type.elements = ts3_type_elements; ts4_type.elements = ts4_type_elements; ts5_type.elements = ts5_type_elements; + ts6_type.elements = ts6_type_elements; + ts7_type.elements = ts7_type_elements; + ts8_type.elements = ts8_type_elements; + ts9_type.elements = ts9_type_elements; /*@=immediatetrans@*/ ts1_type_elements[0] = &ffi_type_uchar; *************** int main(/*@unused@*/ int argc, /*@unuse *** 405,410 **** --- 522,546 ---- ts5_type_elements[1] = &ffi_type_schar; ts5_type_elements[2] = NULL; + ts6_type_elements[0] = &ffi_type_float; + ts6_type_elements[1] = &ffi_type_double; + ts6_type_elements[2] = NULL; + + ts7_type_elements[0] = &ffi_type_float; + ts7_type_elements[1] = &ffi_type_float; + ts7_type_elements[2] = &ffi_type_double; + ts7_type_elements[3] = NULL; + + ts8_type_elements[0] = &ffi_type_float; + ts8_type_elements[1] = &ffi_type_float; + ts8_type_elements[2] = &ffi_type_float; + ts8_type_elements[3] = &ffi_type_float; + ts8_type_elements[4] = NULL; + + ts9_type_elements[0] = &ffi_type_float; + ts9_type_elements[1] = &ffi_type_sint; + ts9_type_elements[2] = NULL; + ul = 0; /* return value tests */ *************** int main(/*@unused@*/ int argc, /*@unuse *** 446,452 **** { ul++; ffi_call(&cif, FFI_FN(return_sc), &rint, values); ! CHECK(rint == (int) sc); } args[0] = &ffi_type_uchar; --- 582,588 ---- { ul++; ffi_call(&cif, FFI_FN(return_sc), &rint, values); ! CHECK(rint == (ffi_arg) sc); } args[0] = &ffi_type_uchar; *************** int main(/*@unused@*/ int argc, /*@unuse *** 533,539 **** ffi_call(&cif, FFI_FN(floating), &rint, values); ! printf ("%d vs %d\n", rint, floating (si1, f, d, ld, si2)); CHECK(rint == floating(si1, f, d, ld, si2)); --- 669,675 ---- ffi_call(&cif, FFI_FN(floating), &rint, values); ! printf ("%d vs %d\n", (int)rint, floating (si1, f, d, ld, si2)); CHECK(rint == floating(si1, f, d, ld, si2)); *************** int main(/*@unused@*/ int argc, /*@unuse *** 603,609 **** &ffi_type_float, args) == FFI_OK); /*@-usedef@*/ ! ff = many(fa[0], fa[1], fa[2], fa[3], fa[4], fa[5], fa[6], fa[7], --- 739,745 ---- &ffi_type_float, args) == FFI_OK); /*@-usedef@*/ ! ff = many (fa[0], fa[1], fa[2], fa[3], fa[4], fa[5], fa[6], fa[7], *************** int main(/*@unused@*/ int argc, /*@unuse *** 652,658 **** { ul++; ffi_call(&cif, FFI_FN(promotion), &rint, values); ! CHECK(rint == (int) sc + (int) ss + (int) uc + (int) us); } printf("%lu promotion tests run\n", ul); } --- 788,795 ---- { ul++; ffi_call(&cif, FFI_FN(promotion), &rint, values); ! CHECK((int)rint == (signed char) sc + (signed short) ss + ! (unsigned char) uc + (unsigned short) us); } printf("%lu promotion tests run\n", ul); } *************** int main(/*@unused@*/ int argc, /*@unuse *** 699,706 **** values[0] = &ts2_arg; /* Initialize the cif */ ! CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, ! &ts2_type, args) == FFI_OK); ts2_arg.d1 = 5.55; ts2_arg.d2 = 6.66; --- 836,842 ---- values[0] = &ts2_arg; /* Initialize the cif */ ! CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, &ts2_type, args) == FFI_OK); ts2_arg.d1 = 5.55; ts2_arg.d2 = 6.66; *************** int main(/*@unused@*/ int argc, /*@unuse *** 767,774 **** values[0] = &ts4_arg; /* Initialize the cif */ ! CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, ! &ts4_type, args) == FFI_OK); ts4_arg.ui1 = 2; ts4_arg.ui2 = 3; --- 903,909 ---- values[0] = &ts4_arg; /* Initialize the cif */ ! CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, &ts4_type, args) == FFI_OK); ts4_arg.ui1 = 2; ts4_arg.ui2 = 3; *************** int main(/*@unused@*/ int argc, /*@unuse *** 798,805 **** values[1] = &ts5_arg2; /* Initialize the cif */ ! CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, ! &ts5_type, args) == FFI_OK); ts5_arg1.c1 = 2; ts5_arg1.c2 = 6; --- 933,939 ---- values[1] = &ts5_arg2; /* Initialize the cif */ ! CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &ts5_type, args) == FFI_OK); ts5_arg1.c1 = 2; ts5_arg1.c2 = 6; *************** int main(/*@unused@*/ int argc, /*@unuse *** 817,826 **** --- 951,1165 ---- free (ts5_result); } + /* struct tests */ + { + test_structure_6 ts6_arg; + + /* This is a hack to get a properly aligned result buffer */ + test_structure_6 *ts6_result = + (test_structure_6 *) malloc (sizeof(test_structure_6)); + + args[0] = &ts6_type; + values[0] = &ts6_arg; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, &ts6_type, args) == FFI_OK); + + ts6_arg.f = 5.55f; + ts6_arg.d = 6.66; + + printf ("%g\n", ts6_arg.f); + printf ("%g\n", ts6_arg.d); + + ffi_call(&cif, FFI_FN(struct6), ts6_result, values); + + printf ("%g\n", ts6_result->f); + printf ("%g\n", ts6_result->d); + + CHECK(ts6_result->f == 5.55f + 1); + CHECK(ts6_result->d == 6.66 + 1); + + printf("structure test 6 ok!\n"); + + free (ts6_result); + } + + /* struct tests */ + { + test_structure_7 ts7_arg; + + /* This is a hack to get a properly aligned result buffer */ + test_structure_7 *ts7_result = + (test_structure_7 *) malloc (sizeof(test_structure_7)); + + args[0] = &ts7_type; + values[0] = &ts7_arg; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, &ts7_type, args) == FFI_OK); + + ts7_arg.f1 = 5.55f; + ts7_arg.f2 = 55.5f; + ts7_arg.d = 6.66; + + printf ("%g\n", ts7_arg.f1); + printf ("%g\n", ts7_arg.f2); + printf ("%g\n", ts7_arg.d); + + ffi_call(&cif, FFI_FN(struct7), ts7_result, values); + + printf ("%g\n", ts7_result->f1); + printf ("%g\n", ts7_result->f2); + printf ("%g\n", ts7_result->d); + + CHECK(ts7_result->f1 == 5.55f + 1); + CHECK(ts7_result->f2 == 55.5f + 1); + CHECK(ts7_result->d == 6.66 + 1); + + printf("structure test 7 ok!\n"); + + free (ts7_result); + } + + /* struct tests */ + { + test_structure_8 ts8_arg; + + /* This is a hack to get a properly aligned result buffer */ + test_structure_8 *ts8_result = + (test_structure_8 *) malloc (sizeof(test_structure_8)); + + args[0] = &ts8_type; + values[0] = &ts8_arg; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, &ts8_type, args) == FFI_OK); + + ts8_arg.f1 = 5.55f; + ts8_arg.f2 = 55.5f; + ts8_arg.f3 = -5.55f; + ts8_arg.f4 = -55.5f; + + printf ("%g\n", ts8_arg.f1); + printf ("%g\n", ts8_arg.f2); + printf ("%g\n", ts8_arg.f3); + printf ("%g\n", ts8_arg.f4); + + ffi_call(&cif, FFI_FN(struct8), ts8_result, values); + + printf ("%g\n", ts8_result->f1); + printf ("%g\n", ts8_result->f2); + printf ("%g\n", ts8_result->f3); + printf ("%g\n", ts8_result->f4); + + CHECK(ts8_result->f1 == 5.55f + 1); + CHECK(ts8_result->f2 == 55.5f + 1); + CHECK(ts8_result->f3 == -5.55f + 1); + CHECK(ts8_result->f4 == -55.5f + 1); + + printf("structure test 8 ok!\n"); + + free (ts8_result); + } + + /* struct tests */ + { + test_structure_9 ts9_arg; + + /* This is a hack to get a properly aligned result buffer */ + test_structure_9 *ts9_result = + (test_structure_9 *) malloc (sizeof(test_structure_9)); + + args[0] = &ts9_type; + values[0] = &ts9_arg; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, &ts9_type, args) == FFI_OK); + + ts9_arg.f = 5.55f; + ts9_arg.i = 5; + + printf ("%g\n", ts9_arg.f); + printf ("%d\n", ts9_arg.i); + + ffi_call(&cif, FFI_FN(struct9), ts9_result, values); + + printf ("%g\n", ts9_result->f); + printf ("%d\n", ts9_result->i); + + CHECK(ts9_result->f == 5.55f + 1); + CHECK(ts9_result->i == 5 + 1); + + printf("structure test 9 ok!\n"); + + free (ts9_result); + } + #else printf("Structure passing doesn't work on Win32.\n"); #endif /* X86_WIN32 */ + #ifdef X86_WIN32 + /* stdcall strlen tests */ + { + args[0] = &ffi_type_pointer; + values[0] = (void*) &s; + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_STDCALL, 1, + &ffi_type_sint, args) == FFI_OK); + + s = "a"; + ffi_call(&cif, FFI_FN(my_stdcall_strlen), &rint, values); + CHECK(rint == 1); + + s = "1234567"; + ffi_call(&cif, FFI_FN(my_stdcall_strlen), &rint, values); + CHECK(rint == 7); + + s = "1234567890123456789012345"; + ffi_call(&cif, FFI_FN(my_stdcall_strlen), &rint, values); + CHECK(rint == 25); + + printf("stdcall strlen tests passed\n"); + } + + /* stdcall many arg tests */ + { + float ff; + float fa[13]; + + for (ul = 0; ul < 13; ul++) + { + args[ul] = &ffi_type_float; + values[ul] = &fa[ul]; + fa[ul] = (float) ul; + } + + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, FFI_STDCALL, 13, + &ffi_type_float, args) == FFI_OK); + + /*@-usedef@*/ + ff = stdcall_many(fa[0], fa[1], + fa[2], fa[3], + fa[4], fa[5], + fa[6], fa[7], + fa[8], fa[9], + fa[10],fa[11],fa[12]); + /*@=usedef@*/ + + ffi_call(&cif, FFI_FN(stdcall_many), &f, values); + + /*@-realcompare@*/ + if (f - ff < FLT_EPSILON) + /*@=realcompare@*/ + printf("stdcall many arg tests ok!\n"); + else + CHECK(0); + } + #endif /* X86_WIN32 */ + # if FFI_CLOSURES /* A simple closure test */ { *************** int main(/*@unused@*/ int argc, /*@unuse *** 956,961 **** --- 1295,1301 ---- (void) puts("\nFinished FFI_CLOSURES\n"); # endif + /* If we arrived here, all is good */ (void) puts("\nLooks good. No surprises.\n"); diff -Nrc3pad gcc-3.2.3/libffi/src/java_raw_api.c gcc-3.3/libffi/src/java_raw_api.c *** gcc-3.2.3/libffi/src/java_raw_api.c 2002-04-08 22:31:14.000000000 +0000 --- gcc-3.3/libffi/src/java_raw_api.c 2002-10-08 14:55:02.000000000 +0000 *************** ffi_java_raw_to_ptrarray (ffi_cif *cif, *** 81,101 **** { case FFI_TYPE_UINT8: case FFI_TYPE_SINT8: ! *args = (void*) ((char*)(raw++) + SIZEOF_ARG - 1); break; case FFI_TYPE_UINT16: case FFI_TYPE_SINT16: ! *args = (void*) ((char*)(raw++) + SIZEOF_ARG - 2); break; - #if SIZEOF_ARG >= 4 - case FFI_TYPE_UINT32: - case FFI_TYPE_SINT32: - *args = (void*) ((char*)(raw++) + SIZEOF_ARG - 4); - break; - #endif - #if SIZEOF_ARG == 8 case FFI_TYPE_UINT64: case FFI_TYPE_SINT64: --- 81,94 ---- { case FFI_TYPE_UINT8: case FFI_TYPE_SINT8: ! *args = (void*) ((char*)(raw++) + 3); break; case FFI_TYPE_UINT16: case FFI_TYPE_SINT16: ! *args = (void*) ((char*)(raw++) + 2); break; #if SIZEOF_ARG == 8 case FFI_TYPE_UINT64: case FFI_TYPE_SINT64: *************** ffi_java_ptrarray_to_raw (ffi_cif *cif, *** 157,187 **** switch ((*tp)->type) { case FFI_TYPE_UINT8: (raw++)->uint = *(UINT8*) (*args); break; case FFI_TYPE_SINT8: (raw++)->sint = *(SINT8*) (*args); break; case FFI_TYPE_UINT16: (raw++)->uint = *(UINT16*) (*args); break; case FFI_TYPE_SINT16: (raw++)->sint = *(SINT16*) (*args); break; - #if SIZEOF_ARG >= 4 case FFI_TYPE_UINT32: (raw++)->uint = *(UINT32*) (*args); break; case FFI_TYPE_SINT32: (raw++)->sint = *(SINT32*) (*args); - break; #endif ! case FFI_TYPE_FLOAT: (raw++)->flt = *(FLOAT32*) (*args); break; --- 150,203 ---- switch ((*tp)->type) { case FFI_TYPE_UINT8: + #if WORDS_BIGENDIAN + *(UINT32*)(raw++) = *(UINT8*) (*args); + #else (raw++)->uint = *(UINT8*) (*args); + #endif break; case FFI_TYPE_SINT8: + #if WORDS_BIGENDIAN + *(SINT32*)(raw++) = *(SINT8*) (*args); + #else (raw++)->sint = *(SINT8*) (*args); + #endif break; case FFI_TYPE_UINT16: + #if WORDS_BIGENDIAN + *(UINT32*)(raw++) = *(UINT16*) (*args); + #else (raw++)->uint = *(UINT16*) (*args); + #endif break; case FFI_TYPE_SINT16: + #if WORDS_BIGENDIAN + *(SINT32*)(raw++) = *(SINT16*) (*args); + #else (raw++)->sint = *(SINT16*) (*args); + #endif break; case FFI_TYPE_UINT32: + #if WORDS_BIGENDIAN + *(UINT32*)(raw++) = *(UINT32*) (*args); + #else (raw++)->uint = *(UINT32*) (*args); + #endif break; case FFI_TYPE_SINT32: + #if WORDS_BIGENDIAN + *(SINT32*)(raw++) = *(SINT32*) (*args); + #else (raw++)->sint = *(SINT32*) (*args); #endif ! break; ! ! case FFI_TYPE_FLOAT: (raw++)->flt = *(FLOAT32*) (*args); break; *************** ffi_java_ptrarray_to_raw (ffi_cif *cif, *** 211,216 **** --- 227,281 ---- #if !FFI_NATIVE_RAW_API + static void + ffi_java_rvalue_to_raw (ffi_cif *cif, void *rvalue) + { + #if WORDS_BIGENDIAN && SIZEOF_ARG == 8 + switch (cif->rtype->type) + { + case FFI_TYPE_UINT8: + case FFI_TYPE_UINT16: + case FFI_TYPE_UINT32: + *(UINT64 *)rvalue <<= 32; + break; + + case FFI_TYPE_SINT8: + case FFI_TYPE_SINT16: + case FFI_TYPE_SINT32: + case FFI_TYPE_INT: + *(SINT64 *)rvalue <<= 32; + break; + + default: + break; + } + #endif + } + + static void + ffi_java_raw_to_rvalue (ffi_cif *cif, void *rvalue) + { + #if WORDS_BIGENDIAN && SIZEOF_ARG == 8 + switch (cif->rtype->type) + { + case FFI_TYPE_UINT8: + case FFI_TYPE_UINT16: + case FFI_TYPE_UINT32: + *(UINT64 *)rvalue >>= 32; + break; + + case FFI_TYPE_SINT8: + case FFI_TYPE_SINT16: + case FFI_TYPE_SINT32: + case FFI_TYPE_INT: + *(SINT64 *)rvalue >>= 32; + break; + + default: + break; + } + #endif + } /* This is a generic definition of ffi_raw_call, to be used if the * native system does not provide a machine-specific implementation. *************** void ffi_java_raw_call (/*@dependent@*/ *** 227,232 **** --- 292,298 ---- void **avalue = (void**) alloca (cif->nargs * sizeof (void*)); ffi_java_raw_to_ptrarray (cif, raw, avalue); ffi_call (cif, fn, rvalue, avalue); + ffi_java_rvalue_to_raw (cif, rvalue); } #if FFI_CLOSURES /* base system provides closures */ *************** ffi_java_translate_args (ffi_cif *cif, v *** 240,245 **** --- 306,312 ---- ffi_java_ptrarray_to_raw (cif, avalue, raw); (*cl->fun) (cif, rvalue, raw, cl->user_data); + ffi_java_raw_to_rvalue (cif, rvalue); } /* Again, here is the generic version of ffi_prep_raw_closure, which diff -Nrc3pad gcc-3.2.3/libffi/src/m68k/ffi.c gcc-3.3/libffi/src/m68k/ffi.c *** gcc-3.2.3/libffi/src/m68k/ffi.c 1999-08-08 13:27:19.000000000 +0000 --- gcc-3.3/libffi/src/m68k/ffi.c 2002-07-18 23:08:30.000000000 +0000 *************** static void * *** 16,29 **** ffi_prep_args (void *stack, extended_cif *ecif) { unsigned int i; - int tmp; - unsigned int avn; void **p_argv; char *argp; ffi_type **p_arg; void *struct_value_ptr; - tmp = 0; argp = stack; if (ecif->cif->rtype->type == FFI_TYPE_STRUCT --- 16,26 ---- *************** ffi_prep_args (void *stack, extended_cif *** 32,42 **** else struct_value_ptr = NULL; - avn = ecif->cif->nargs; p_argv = ecif->avalue; for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types; ! i != 0 && avn != 0; i--, p_arg++) { size_t z; --- 29,38 ---- else struct_value_ptr = NULL; p_argv = ecif->avalue; for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types; ! i != 0; i--, p_arg++) { size_t z; *************** ffi_prep_args (void *stack, extended_cif *** 45,53 **** if (((*p_arg)->alignment - 1) & (unsigned) argp) argp = (char *) ALIGN (argp, (*p_arg)->alignment); - if (avn != 0) - { - avn--; z = (*p_arg)->size; if (z < sizeof (int)) { --- 41,46 ---- *************** ffi_prep_args (void *stack, extended_cif *** 82,88 **** memcpy (argp, *p_argv, z); p_argv++; argp += z; - } } return struct_value_ptr; --- 75,80 ---- diff -Nrc3pad gcc-3.2.3/libffi/src/mips/ffi.c gcc-3.3/libffi/src/mips/ffi.c *** gcc-3.2.3/libffi/src/mips/ffi.c 2001-03-02 22:21:23.000000000 +0000 --- gcc-3.3/libffi/src/mips/ffi.c 2002-07-18 23:08:31.000000000 +0000 *************** *** 23,28 **** --- 23,29 ---- OTHER DEALINGS IN THE SOFTWARE. ----------------------------------------------------------------------- */ + #include #include #include *************** static void ffi_prep_args(char *stack, *** 50,56 **** int flags) { register int i; - register int avn; register void **p_argv; register char *argp; register ffi_type **p_arg; --- 51,56 ---- *************** static void ffi_prep_args(char *stack, *** 80,91 **** FIX_ARGP; } - avn = ecif->cif->nargs; p_argv = ecif->avalue; ! for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types; ! i && avn; ! i--, p_arg++) { size_t z; --- 80,88 ---- FIX_ARGP; } p_argv = ecif->avalue; ! for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types; i; i--, p_arg++) { size_t z; *************** static void ffi_prep_args(char *stack, *** 101,109 **** #define OFFSET sizeof(int) #endif - if (avn) - { - avn--; z = (*p_arg)->size; if (z < sizeof(SLOT_TYPE_UNSIGNED)) { --- 98,103 ---- *************** static void ffi_prep_args(char *stack, *** 179,185 **** p_argv++; argp += z; FIX_ARGP; - } } return; --- 173,178 ---- diff -Nrc3pad gcc-3.2.3/libffi/src/powerpc/darwin_closure.S gcc-3.3/libffi/src/powerpc/darwin_closure.S *** gcc-3.2.3/libffi/src/powerpc/darwin_closure.S 2003-02-08 08:04:17.000000000 +0000 --- gcc-3.3/libffi/src/powerpc/darwin_closure.S 2003-02-07 04:33:43.000000000 +0000 *************** LFE1: *** 189,191 **** --- 189,236 ---- blr /* END(ffi_closure_ASM) */ + + .data + .section __TEXT,__eh_frame + Lframe1: + .set L$set$0,LECIE1-LSCIE1 + .long L$set$0 ; Length of Common Information Entry + LSCIE1: + .long 0x0 ; CIE Identifier Tag + .byte 0x1 ; CIE Version + .ascii "zR\0" ; CIE Augmentation + .byte 0x1 ; uleb128 0x1; CIE Code Alignment Factor + .byte 0x7c ; sleb128 -4; CIE Data Alignment Factor + .byte 0x41 ; CIE RA Column + .byte 0x1 ; uleb128 0x1; Augmentation size + .byte 0x10 ; FDE Encoding (pcrel) + .byte 0xc ; DW_CFA_def_cfa + .byte 0x1 ; uleb128 0x1 + .byte 0x0 ; uleb128 0x0 + .align 2 + LECIE1: + LSFDE1: + .set L$set$1,LEFDE1-LASFDE1 + .long L$set$1 ; FDE Length + + LASFDE1: + .set L$set$2,LASFDE1-Lframe1 + .long L$set$2 ; FDE CIE offset + .long LFB1-. ; FDE initial location + .set L$set$3,LFE1-LFB1 + .long L$set$3 ; FDE address range + .byte 0x0 ; uleb128 0x0; Augmentation size + .byte 0x4 ; DW_CFA_advance_loc4 + .set L$set$3,LCFI1-LCFI0 + .long L$set$3 + .byte 0xe ; DW_CFA_def_cfa_offset + .byte 176,1 ; uleb128 176 + .byte 0x4 ; DW_CFA_advance_loc4 + .set L$set$4,LCFI0-LFB1 + .long L$set$4 + .byte 0x11 ; DW_CFA_offset_extended_sf + .byte 0x41 ; uleb128 0x41 + .byte 0x7e ; sleb128 -2 + .align 2 + LEFDE1: + diff -Nrc3pad gcc-3.2.3/libffi/src/powerpc/darwin.S gcc-3.3/libffi/src/powerpc/darwin.S *** gcc-3.2.3/libffi/src/powerpc/darwin.S 2002-01-18 16:22:34.000000000 +0000 --- gcc-3.3/libffi/src/powerpc/darwin.S 2003-01-22 20:17:49.000000000 +0000 *************** *** 3,10 **** PowerPC Assembly glue. - $Id: darwin.S,v 1.2 2002/01/18 16:22:34 dje Exp $ - Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ``Software''), to deal in the Software without restriction, including --- 3,8 ---- *************** *** 39,68 **** .text .align 2 _ffi_call_DARWIN: ! mr r12,r8 // We only need r12 until the call, so it doesn't have to be saved... /* Save the old stack pointer as AP. */ mr r8,r1 ! /* Allocate the stack space we need. */ stwux r1,r1,r4 /* Save registers we use. */ mflr r9 ! stw r28,-16(r8) stw r29,-12(r8) stw r30, -8(r8) stw r31, -4(r8) ! ! stw r9, 8(r8) stw r2, 20(r1) /* Save arguments over call... */ ! mr r31,r5 /* flags, */ ! mr r30,r6 /* rvalue, */ ! mr r29,r7 /* function address, */ ! mr r28,r8 /* our AP. */ ! /* Call ffi_prep_args. */ mr r4,r1 li r9,0 --- 37,70 ---- .text .align 2 _ffi_call_DARWIN: ! LFB0: ! mr r12,r8 /* We only need r12 until the call, ! so it doesn't have to be saved... */ ! LFB1: /* Save the old stack pointer as AP. */ mr r8,r1 ! LCFI0: /* Allocate the stack space we need. */ stwux r1,r1,r4 /* Save registers we use. */ mflr r9 ! stw r28,-16(r8) stw r29,-12(r8) stw r30, -8(r8) stw r31, -4(r8) ! ! stw r9, 8(r8) stw r2, 20(r1) + LCFI1: /* Save arguments over call... */ ! mr r31,r5 /* flags, */ ! mr r30,r6 /* rvalue, */ ! mr r29,r7 /* function address, */ ! mr r28,r8 /* our AP. */ ! LCFI2: /* Call ffi_prep_args. */ mr r4,r1 li r9,0 *************** L(fp_return_value): *** 145,151 **** L(float_return_value): stfs f1,0(r30) b L(done_return_value) ! //END(_ffi_call_DARWIN) /* Provide a null definition of _ffi_call_AIX. */ .text --- 147,154 ---- L(float_return_value): stfs f1,0(r30) b L(done_return_value) ! LFE1: ! /* END(_ffi_call_DARWIN) */ /* Provide a null definition of _ffi_call_AIX. */ .text *************** L(float_return_value): *** 155,159 **** .align 2 _ffi_call_AIX: blr ! //END(_ffi_call_AIX) --- 158,218 ---- .align 2 _ffi_call_AIX: blr ! /* END(_ffi_call_AIX) */ + .data + .section __TEXT,__eh_frame + Lframe1: + .set L$set$0,LECIE1-LSCIE1 + .long L$set$0 ; Length of Common Information Entry + LSCIE1: + .long 0x0 ; CIE Identifier Tag + .byte 0x1 ; CIE Version + .ascii "zR\0" ; CIE Augmentation + .byte 0x1 ; uleb128 0x1; CIE Code Alignment Factor + .byte 0x7c ; sleb128 -4; CIE Data Alignment Factor + .byte 0x41 ; CIE RA Column + .byte 0x1 ; uleb128 0x1; Augmentation size + .byte 0x10 ; FDE Encoding (pcrel) + .byte 0xc ; DW_CFA_def_cfa + .byte 0x1 ; uleb128 0x1 + .byte 0x0 ; uleb128 0x0 + .align 2 + LECIE1: + LSFDE1: + .set L$set$1,LEFDE1-LASFDE1 + .long L$set$1 ; FDE Length + LASFDE1: + .set L$set$2,LASFDE1-Lframe1 + .long L$set$2 ; FDE CIE offset + .long LFB0-. ; FDE initial location + .set L$set$3,LFE1-LFB0 + .long L$set$3 ; FDE address range + .byte 0x0 ; uleb128 0x0; Augmentation size + .byte 0x4 ; DW_CFA_advance_loc4 + .set L$set$4,LCFI0-LFB1 + .long L$set$4 + .byte 0xd ; DW_CFA_def_cfa_register + .byte 0x08 ; uleb128 0x08 + .byte 0x4 ; DW_CFA_advance_loc4 + .set L$set$5,LCFI1-LCFI0 + .long L$set$5 + .byte 0x11 ; DW_CFA_offset_extended_sf + .byte 0x41 ; uleb128 0x41 + .byte 0x7e ; sleb128 -2 + .byte 0x9f ; DW_CFA_offset, column 0x1f + .byte 0x1 ; uleb128 0x1 + .byte 0x9e ; DW_CFA_offset, column 0x1e + .byte 0x2 ; uleb128 0x2 + .byte 0x9d ; DW_CFA_offset, column 0x1d + .byte 0x3 ; uleb128 0x3 + .byte 0x9c ; DW_CFA_offset, column 0x1c + .byte 0x4 ; uleb128 0x4 + .byte 0x4 ; DW_CFA_advance_loc4 + .set L$set$6,LCFI2-LCFI1 + .long L$set$6 + .byte 0xd ; DW_CFA_def_cfa_register + .byte 0x1c ; uleb128 0x1c + .align 2 + LEFDE1: + diff -Nrc3pad gcc-3.2.3/libffi/src/prep_cif.c gcc-3.3/libffi/src/prep_cif.c *** gcc-3.2.3/libffi/src/prep_cif.c 2001-03-02 22:21:22.000000000 +0000 --- gcc-3.3/libffi/src/prep_cif.c 2002-09-30 11:59:42.000000000 +0000 *************** ffi_status ffi_prep_cif(/*@out@*/ /*@par *** 103,109 **** /* Perform a sanity check on the return type */ FFI_ASSERT(ffi_type_test(cif->rtype)); ! #ifndef M68K /* Make space for the return structure pointer */ if (cif->rtype->type == FFI_TYPE_STRUCT #ifdef SPARC --- 103,110 ---- /* Perform a sanity check on the return type */ FFI_ASSERT(ffi_type_test(cif->rtype)); ! /* x86-64 and s390 stack space allocation is handled in prep_machdep. */ ! #if !defined M68K && !defined __x86_64__ && !defined S390 /* Make space for the return structure pointer */ if (cif->rtype->type == FFI_TYPE_STRUCT #ifdef SPARC *************** ffi_status ffi_prep_cif(/*@out@*/ /*@par *** 122,127 **** --- 123,129 ---- if (((*ptr)->size == 0) && (initialize_aggregate((*ptr)) != FFI_OK)) return FFI_BAD_TYPEDEF; + #if !defined __x86_64__ && !defined S390 #ifdef SPARC if (((*ptr)->type == FFI_TYPE_STRUCT && ((*ptr)->size > 16 || cif->abi != FFI_V9)) *************** ffi_status ffi_prep_cif(/*@out@*/ /*@par *** 137,142 **** --- 139,145 ---- bytes += STACK_ARG_SIZE((*ptr)->size); } + #endif } cif->bytes = bytes; diff -Nrc3pad gcc-3.2.3/libffi/src/s390/ffi.c gcc-3.3/libffi/src/s390/ffi.c *** gcc-3.2.3/libffi/src/s390/ffi.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/libffi/src/s390/ffi.c 2002-10-08 14:55:03.000000000 +0000 *************** *** 0 **** --- 1,749 ---- + /* ----------------------------------------------------------------------- + ffi.c - Copyright (c) 2000 Software AG + + S390 Foreign Function Interface + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + ``Software''), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + ----------------------------------------------------------------------- */ + /*====================================================================*/ + /* Includes */ + /* -------- */ + /*====================================================================*/ + + #include + #include + + #include + #include + + /*====================== End of Includes =============================*/ + + /*====================================================================*/ + /* Defines */ + /* ------- */ + /*====================================================================*/ + + /* Maximum number of GPRs available for argument passing. */ + #define MAX_GPRARGS 5 + + /* Maximum number of FPRs available for argument passing. */ + #ifdef __s390x__ + #define MAX_FPRARGS 4 + #else + #define MAX_FPRARGS 2 + #endif + + /* Round to multiple of 16. */ + #define ROUND_SIZE(size) (((size) + 15) & ~15) + + /* If these values change, sysv.S must be adapted! */ + #define FFI390_RET_VOID 0 + #define FFI390_RET_STRUCT 1 + #define FFI390_RET_FLOAT 2 + #define FFI390_RET_DOUBLE 3 + #define FFI390_RET_INT32 4 + #define FFI390_RET_INT64 5 + + /*===================== End of Defines ===============================*/ + + /*====================================================================*/ + /* Prototypes */ + /* ---------- */ + /*====================================================================*/ + + static void ffi_prep_args (unsigned char *, extended_cif *); + static int ffi_check_float_struct (ffi_type *); + void ffi_closure_helper_SYSV (ffi_closure *, unsigned long *, + unsigned long long *, unsigned long *); + + /*====================== End of Prototypes ===========================*/ + + /*====================================================================*/ + /* Externals */ + /* --------- */ + /*====================================================================*/ + + extern void ffi_call_SYSV(unsigned, + extended_cif *, + void (*)(unsigned char *, extended_cif *), + unsigned, + void *, + void (*fn)()); + + extern void ffi_closure_SYSV(void); + + /*====================== End of Externals ============================*/ + + /*====================================================================*/ + /* */ + /* Name - ffi_check_struct_type. */ + /* */ + /* Function - Determine if a structure can be passed within a */ + /* general purpose or floating point register. */ + /* */ + /*====================================================================*/ + + static int + ffi_check_struct_type (ffi_type *arg) + { + size_t size = arg->size; + + /* If the struct has just one element, look at that element + to find out whether to consider the struct as floating point. */ + while (arg->type == FFI_TYPE_STRUCT + && arg->elements[0] && !arg->elements[1]) + arg = arg->elements[0]; + + /* Structs of size 1, 2, 4, and 8 are passed in registers, + just like the corresponding int/float types. */ + switch (size) + { + case 1: + return FFI_TYPE_UINT8; + + case 2: + return FFI_TYPE_UINT16; + + case 4: + if (arg->type == FFI_TYPE_FLOAT) + return FFI_TYPE_FLOAT; + else + return FFI_TYPE_UINT32; + + case 8: + if (arg->type == FFI_TYPE_DOUBLE) + return FFI_TYPE_DOUBLE; + else + return FFI_TYPE_UINT64; + + default: + break; + } + + /* Other structs are passed via a pointer to the data. */ + return FFI_TYPE_POINTER; + } + + /*======================== End of Routine ============================*/ + + /*====================================================================*/ + /* */ + /* Name - ffi_prep_args. */ + /* */ + /* Function - Prepare parameters for call to function. */ + /* */ + /* ffi_prep_args is called by the assembly routine once stack space */ + /* has been allocated for the function's arguments. */ + /* */ + /*====================================================================*/ + + static void + ffi_prep_args (unsigned char *stack, extended_cif *ecif) + { + /* The stack space will be filled with those areas: + + FPR argument register save area (highest addresses) + GPR argument register save area + temporary struct copies + overflow argument area (lowest addresses) + + We set up the following pointers: + + p_fpr: bottom of the FPR area (growing upwards) + p_gpr: bottom of the GPR area (growing upwards) + p_ov: bottom of the overflow area (growing upwards) + p_struct: top of the struct copy area (growing downwards) + + All areas are kept aligned to twice the word size. */ + + int gpr_off = ecif->cif->bytes; + int fpr_off = gpr_off + ROUND_SIZE (MAX_GPRARGS * sizeof (long)); + + unsigned long long *p_fpr = (unsigned long long *)(stack + fpr_off); + unsigned long *p_gpr = (unsigned long *)(stack + gpr_off); + unsigned char *p_struct = (unsigned char *)p_gpr; + unsigned long *p_ov = (unsigned long *)stack; + + int n_fpr = 0; + int n_gpr = 0; + int n_ov = 0; + + ffi_type **ptr; + void **p_argv = ecif->avalue; + int i; + + /* If we returning a structure then we set the first parameter register + to the address of where we are returning this structure. */ + + if (ecif->cif->flags == FFI390_RET_STRUCT) + p_gpr[n_gpr++] = (unsigned long) ecif->rvalue; + + /* Now for the arguments. */ + + for (ptr = ecif->cif->arg_types, i = ecif->cif->nargs; + i > 0; + i--, ptr++, p_argv++) + { + void *arg = *p_argv; + int type = (*ptr)->type; + + /* Check how a structure type is passed. */ + if (type == FFI_TYPE_STRUCT) + { + type = ffi_check_struct_type (*ptr); + + /* If we pass the struct via pointer, copy the data. */ + if (type == FFI_TYPE_POINTER) + { + p_struct -= ROUND_SIZE ((*ptr)->size); + memcpy (p_struct, (char *)arg, (*ptr)->size); + arg = &p_struct; + } + } + + /* Pointers are passed like UINTs of the same size. */ + if (type == FFI_TYPE_POINTER) + #ifdef __s390x__ + type = FFI_TYPE_UINT64; + #else + type = FFI_TYPE_UINT32; + #endif + + /* Now handle all primitive int/float data types. */ + switch (type) + { + case FFI_TYPE_DOUBLE: + if (n_fpr < MAX_FPRARGS) + p_fpr[n_fpr++] = *(unsigned long long *) arg; + else + #ifdef __s390x__ + p_ov[n_ov++] = *(unsigned long *) arg; + #else + p_ov[n_ov++] = ((unsigned long *) arg)[0], + p_ov[n_ov++] = ((unsigned long *) arg)[1]; + #endif + break; + + case FFI_TYPE_FLOAT: + if (n_fpr < MAX_FPRARGS) + p_fpr[n_fpr++] = (long long) *(unsigned int *) arg << 32; + else + p_ov[n_ov++] = *(unsigned int *) arg; + break; + + case FFI_TYPE_UINT64: + case FFI_TYPE_SINT64: + #ifdef __s390x__ + if (n_gpr < MAX_GPRARGS) + p_gpr[n_gpr++] = *(unsigned long *) arg; + else + p_ov[n_ov++] = *(unsigned long *) arg; + #else + if (n_gpr == MAX_GPRARGS-1) + n_gpr = MAX_GPRARGS; + if (n_gpr < MAX_GPRARGS) + p_gpr[n_gpr++] = ((unsigned long *) arg)[0], + p_gpr[n_gpr++] = ((unsigned long *) arg)[1]; + else + p_ov[n_ov++] = ((unsigned long *) arg)[0], + p_ov[n_ov++] = ((unsigned long *) arg)[1]; + #endif + break; + + case FFI_TYPE_UINT32: + if (n_gpr < MAX_GPRARGS) + p_gpr[n_gpr++] = *(unsigned int *) arg; + else + p_ov[n_ov++] = *(unsigned int *) arg; + break; + + case FFI_TYPE_INT: + case FFI_TYPE_SINT32: + if (n_gpr < MAX_GPRARGS) + p_gpr[n_gpr++] = *(signed int *) arg; + else + p_ov[n_ov++] = *(signed int *) arg; + break; + + case FFI_TYPE_UINT16: + if (n_gpr < MAX_GPRARGS) + p_gpr[n_gpr++] = *(unsigned short *) arg; + else + p_ov[n_ov++] = *(unsigned short *) arg; + break; + + case FFI_TYPE_SINT16: + if (n_gpr < MAX_GPRARGS) + p_gpr[n_gpr++] = *(signed short *) arg; + else + p_ov[n_ov++] = *(signed short *) arg; + break; + + case FFI_TYPE_UINT8: + if (n_gpr < MAX_GPRARGS) + p_gpr[n_gpr++] = *(unsigned char *) arg; + else + p_ov[n_ov++] = *(unsigned char *) arg; + break; + + case FFI_TYPE_SINT8: + if (n_gpr < MAX_GPRARGS) + p_gpr[n_gpr++] = *(signed char *) arg; + else + p_ov[n_ov++] = *(signed char *) arg; + break; + + default: + FFI_ASSERT (0); + break; + } + } + } + + /*======================== End of Routine ============================*/ + + /*====================================================================*/ + /* */ + /* Name - ffi_prep_cif_machdep. */ + /* */ + /* Function - Perform machine dependent CIF processing. */ + /* */ + /*====================================================================*/ + + ffi_status + ffi_prep_cif_machdep(ffi_cif *cif) + { + size_t struct_size = 0; + int n_gpr = 0; + int n_fpr = 0; + int n_ov = 0; + + ffi_type **ptr; + int i; + + /* Determine return value handling. */ + + switch (cif->rtype->type) + { + /* Void is easy. */ + case FFI_TYPE_VOID: + cif->flags = FFI390_RET_VOID; + break; + + /* Structures are returned via a hidden pointer. */ + case FFI_TYPE_STRUCT: + cif->flags = FFI390_RET_STRUCT; + n_gpr++; /* We need one GPR to pass the pointer. */ + break; + + /* Floating point values are returned in fpr 0. */ + case FFI_TYPE_FLOAT: + cif->flags = FFI390_RET_FLOAT; + break; + + case FFI_TYPE_DOUBLE: + cif->flags = FFI390_RET_DOUBLE; + break; + + /* Integer values are returned in gpr 2 (and gpr 3 + for 64-bit values on 31-bit machines). */ + case FFI_TYPE_UINT64: + case FFI_TYPE_SINT64: + cif->flags = FFI390_RET_INT64; + break; + + case FFI_TYPE_POINTER: + case FFI_TYPE_INT: + case FFI_TYPE_UINT32: + case FFI_TYPE_SINT32: + case FFI_TYPE_UINT16: + case FFI_TYPE_SINT16: + case FFI_TYPE_UINT8: + case FFI_TYPE_SINT8: + /* These are to be extended to word size. */ + #ifdef __s390x__ + cif->flags = FFI390_RET_INT64; + #else + cif->flags = FFI390_RET_INT32; + #endif + break; + + default: + FFI_ASSERT (0); + break; + } + + /* Now for the arguments. */ + + for (ptr = cif->arg_types, i = cif->nargs; + i > 0; + i--, ptr++) + { + int type = (*ptr)->type; + + /* Check how a structure type is passed. */ + if (type == FFI_TYPE_STRUCT) + { + type = ffi_check_struct_type (*ptr); + + /* If we pass the struct via pointer, we must reserve space + to copy its data for proper call-by-value semantics. */ + if (type == FFI_TYPE_POINTER) + struct_size += ROUND_SIZE ((*ptr)->size); + } + + /* Now handle all primitive int/float data types. */ + switch (type) + { + /* The first MAX_FPRARGS floating point arguments + go in FPRs, the rest overflow to the stack. */ + + case FFI_TYPE_DOUBLE: + if (n_fpr < MAX_FPRARGS) + n_fpr++; + else + n_ov += sizeof (double) / sizeof (long); + break; + + case FFI_TYPE_FLOAT: + if (n_fpr < MAX_FPRARGS) + n_fpr++; + else + n_ov++; + break; + + /* On 31-bit machines, 64-bit integers are passed in GPR pairs, + if one is still available, or else on the stack. If only one + register is free, skip the register (it won't be used for any + subsequent argument either). */ + + #ifndef __s390x__ + case FFI_TYPE_UINT64: + case FFI_TYPE_SINT64: + if (n_gpr == MAX_GPRARGS-1) + n_gpr = MAX_GPRARGS; + if (n_gpr < MAX_GPRARGS) + n_gpr += 2; + else + n_ov += 2; + break; + #endif + + /* Everything else is passed in GPRs (until MAX_GPRARGS + have been used) or overflows to the stack. */ + + default: + if (n_gpr < MAX_GPRARGS) + n_gpr++; + else + n_ov++; + break; + } + } + + /* Total stack space as required for overflow arguments + and temporary structure copies. */ + + cif->bytes = ROUND_SIZE (n_ov * sizeof (long)) + struct_size; + + return FFI_OK; + } + + /*======================== End of Routine ============================*/ + + /*====================================================================*/ + /* */ + /* Name - ffi_call. */ + /* */ + /* Function - Call the FFI routine. */ + /* */ + /*====================================================================*/ + + void + ffi_call(ffi_cif *cif, + void (*fn)(), + void *rvalue, + void **avalue) + { + int ret_type = cif->flags; + extended_cif ecif; + + ecif.cif = cif; + ecif.avalue = avalue; + ecif.rvalue = rvalue; + + /* If we don't have a return value, we need to fake one. */ + if (rvalue == NULL) + { + if (ret_type == FFI390_RET_STRUCT) + ecif.rvalue = alloca (cif->rtype->size); + else + ret_type = FFI390_RET_VOID; + } + + switch (cif->abi) + { + case FFI_SYSV: + ffi_call_SYSV (cif->bytes, &ecif, ffi_prep_args, + ret_type, ecif.rvalue, fn); + break; + + default: + FFI_ASSERT (0); + break; + } + } + + /*======================== End of Routine ============================*/ + + /*====================================================================*/ + /* */ + /* Name - ffi_closure_helper_SYSV. */ + /* */ + /* Function - Call a FFI closure target function. */ + /* */ + /*====================================================================*/ + + void + ffi_closure_helper_SYSV (ffi_closure *closure, + unsigned long *p_gpr, + unsigned long long *p_fpr, + unsigned long *p_ov) + { + unsigned long long ret_buffer; + + void *rvalue = &ret_buffer; + void **avalue; + void **p_arg; + + int n_gpr = 0; + int n_fpr = 0; + int n_ov = 0; + + ffi_type **ptr; + int i; + + /* Allocate buffer for argument list pointers. */ + + p_arg = avalue = alloca (closure->cif->nargs * sizeof (void *)); + + /* If we returning a structure, pass the structure address + directly to the target function. Otherwise, have the target + function store the return value to the GPR save area. */ + + if (closure->cif->flags == FFI390_RET_STRUCT) + rvalue = (void *) p_gpr[n_gpr++]; + + /* Now for the arguments. */ + + for (ptr = closure->cif->arg_types, i = closure->cif->nargs; + i > 0; + i--, p_arg++, ptr++) + { + int deref_struct_pointer = 0; + int type = (*ptr)->type; + + /* Check how a structure type is passed. */ + if (type == FFI_TYPE_STRUCT) + { + type = ffi_check_struct_type (*ptr); + + /* If we pass the struct via pointer, remember to + retrieve the pointer later. */ + if (type == FFI_TYPE_POINTER) + deref_struct_pointer = 1; + } + + /* Pointers are passed like UINTs of the same size. */ + if (type == FFI_TYPE_POINTER) + #ifdef __s390x__ + type = FFI_TYPE_UINT64; + #else + type = FFI_TYPE_UINT32; + #endif + + /* Now handle all primitive int/float data types. */ + switch (type) + { + case FFI_TYPE_DOUBLE: + if (n_fpr < MAX_FPRARGS) + *p_arg = &p_fpr[n_fpr++]; + else + *p_arg = &p_ov[n_ov], + n_ov += sizeof (double) / sizeof (long); + break; + + case FFI_TYPE_FLOAT: + if (n_fpr < MAX_FPRARGS) + *p_arg = &p_fpr[n_fpr++]; + else + *p_arg = (char *)&p_ov[n_ov++] + sizeof (long) - 4; + break; + + case FFI_TYPE_UINT64: + case FFI_TYPE_SINT64: + #ifdef __s390x__ + if (n_gpr < MAX_GPRARGS) + *p_arg = &p_gpr[n_gpr++]; + else + *p_arg = &p_ov[n_ov++]; + #else + if (n_gpr == MAX_GPRARGS-1) + n_gpr = MAX_GPRARGS; + if (n_gpr < MAX_GPRARGS) + *p_arg = &p_gpr[n_gpr], n_gpr += 2; + else + *p_arg = &p_ov[n_ov], n_ov += 2; + #endif + break; + + case FFI_TYPE_INT: + case FFI_TYPE_UINT32: + case FFI_TYPE_SINT32: + if (n_gpr < MAX_GPRARGS) + *p_arg = (char *)&p_gpr[n_gpr++] + sizeof (long) - 4; + else + *p_arg = (char *)&p_ov[n_ov++] + sizeof (long) - 4; + break; + + case FFI_TYPE_UINT16: + case FFI_TYPE_SINT16: + if (n_gpr < MAX_GPRARGS) + *p_arg = (char *)&p_gpr[n_gpr++] + sizeof (long) - 2; + else + *p_arg = (char *)&p_ov[n_ov++] + sizeof (long) - 2; + break; + + case FFI_TYPE_UINT8: + case FFI_TYPE_SINT8: + if (n_gpr < MAX_GPRARGS) + *p_arg = (char *)&p_gpr[n_gpr++] + sizeof (long) - 1; + else + *p_arg = (char *)&p_ov[n_ov++] + sizeof (long) - 1; + break; + + default: + FFI_ASSERT (0); + break; + } + + /* If this is a struct passed via pointer, we need to + actually retrieve that pointer. */ + if (deref_struct_pointer) + *p_arg = *(void **)*p_arg; + } + + + /* Call the target function. */ + (closure->fun) (closure->cif, rvalue, avalue, closure->user_data); + + /* Convert the return value. */ + switch (closure->cif->rtype->type) + { + /* Void is easy, and so is struct. */ + case FFI_TYPE_VOID: + case FFI_TYPE_STRUCT: + break; + + /* Floating point values are returned in fpr 0. */ + case FFI_TYPE_FLOAT: + p_fpr[0] = (long long) *(unsigned int *) rvalue << 32; + break; + + case FFI_TYPE_DOUBLE: + p_fpr[0] = *(unsigned long long *) rvalue; + break; + + /* Integer values are returned in gpr 2 (and gpr 3 + for 64-bit values on 31-bit machines). */ + case FFI_TYPE_UINT64: + case FFI_TYPE_SINT64: + #ifdef __s390x__ + p_gpr[0] = *(unsigned long *) rvalue; + #else + p_gpr[0] = ((unsigned long *) rvalue)[0], + p_gpr[1] = ((unsigned long *) rvalue)[1]; + #endif + break; + + case FFI_TYPE_POINTER: + case FFI_TYPE_UINT32: + case FFI_TYPE_UINT16: + case FFI_TYPE_UINT8: + p_gpr[0] = *(unsigned long *) rvalue; + break; + + case FFI_TYPE_INT: + case FFI_TYPE_SINT32: + case FFI_TYPE_SINT16: + case FFI_TYPE_SINT8: + p_gpr[0] = *(signed long *) rvalue; + break; + + default: + FFI_ASSERT (0); + break; + } + } + + /*======================== End of Routine ============================*/ + + /*====================================================================*/ + /* */ + /* Name - ffi_prep_closure. */ + /* */ + /* Function - Prepare a FFI closure. */ + /* */ + /*====================================================================*/ + + ffi_status + ffi_prep_closure (ffi_closure *closure, + ffi_cif *cif, + void (*fun) (ffi_cif *, void *, void **, void *), + void *user_data) + { + FFI_ASSERT (cif->abi == FFI_SYSV); + + #ifndef __s390x__ + *(short *)&closure->tramp [0] = 0x0d10; /* basr %r1,0 */ + *(short *)&closure->tramp [2] = 0x9801; /* lm %r0,%r1,6(%r1) */ + *(short *)&closure->tramp [4] = 0x1006; + *(short *)&closure->tramp [6] = 0x07f1; /* br %r1 */ + *(long *)&closure->tramp [8] = (long)closure; + *(long *)&closure->tramp[12] = (long)&ffi_closure_SYSV; + #else + *(short *)&closure->tramp [0] = 0x0d10; /* basr %r1,0 */ + *(short *)&closure->tramp [2] = 0xeb01; /* lmg %r0,%r1,14(%r1) */ + *(short *)&closure->tramp [4] = 0x100e; + *(short *)&closure->tramp [6] = 0x0004; + *(short *)&closure->tramp [8] = 0x07f1; /* br %r1 */ + *(long *)&closure->tramp[16] = (long)closure; + *(long *)&closure->tramp[24] = (long)&ffi_closure_SYSV; + #endif + + closure->cif = cif; + closure->user_data = user_data; + closure->fun = fun; + + return FFI_OK; + } + + /*======================== End of Routine ============================*/ + diff -Nrc3pad gcc-3.2.3/libffi/src/s390/sysv.S gcc-3.3/libffi/src/s390/sysv.S *** gcc-3.2.3/libffi/src/s390/sysv.S 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/libffi/src/s390/sysv.S 2002-11-27 16:44:35.000000000 +0000 *************** *** 0 **** --- 1,425 ---- + /* ----------------------------------------------------------------------- + sysv.S - Copyright (c) 2000 Software AG + + S390 Foreign Function Interface + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + ``Software''), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + ----------------------------------------------------------------------- */ + + #ifndef __s390x__ + + .text + + # r2: cif->bytes + # r3: &ecif + # r4: ffi_prep_args + # r5: ret_type + # r6: ecif.rvalue + # ov: fn + + # This assumes we are using gas. + .globl ffi_call_SYSV + .type ffi_call_SYSV,%function + ffi_call_SYSV: + .LFB1: + stm %r6,%r15,24(%r15) # Save registers + .LCFI0: + basr %r13,0 # Set up base register + .Lbase: + lr %r11,%r15 # Set up frame pointer + .LCFI1: + sr %r15,%r2 + ahi %r15,-96-48 # Allocate stack + lr %r8,%r6 # Save ecif.rvalue + sr %r9,%r9 + ic %r9,.Ltable-.Lbase(%r13,%r5) # Load epilog address + l %r7,96(%r11) # Load function address + st %r11,0(%r15) # Set up back chain + ahi %r11,-48 # Register save area + .LCFI2: + + la %r2,96(%r15) # Save area + # r3 already holds &ecif + basr %r14,%r4 # Call ffi_prep_args + + lm %r2,%r6,0(%r11) # Load arguments + ld %f0,32(%r11) + ld %f2,40(%r11) + la %r14,0(%r13,%r9) # Set return address + br %r7 # ... and call function + + .LretNone: # Return void + l %r4,48+56(%r11) + lm %r6,%r15,48+24(%r11) + br %r4 + + .LretFloat: + l %r4,48+56(%r11) + ste %f0,0(%r8) # Return float + lm %r6,%r15,48+24(%r11) + br %r4 + + .LretDouble: + l %r4,48+56(%r11) + std %f0,0(%r8) # Return double + lm %r6,%r15,48+24(%r11) + br %r4 + + .LretInt32: + l %r4,48+56(%r11) + st %r2,0(%r8) # Return int + lm %r6,%r15,48+24(%r11) + br %r4 + + .LretInt64: + l %r4,48+56(%r11) + stm %r2,%r3,0(%r8) # Return long long + lm %r6,%r15,48+24(%r11) + br %r4 + + .Ltable: + .byte .LretNone-.Lbase # FFI390_RET_VOID + .byte .LretNone-.Lbase # FFI390_RET_STRUCT + .byte .LretFloat-.Lbase # FFI390_RET_FLOAT + .byte .LretDouble-.Lbase # FFI390_RET_DOUBLE + .byte .LretInt32-.Lbase # FFI390_RET_INT32 + .byte .LretInt64-.Lbase # FFI390_RET_INT64 + + .LFE1: + .ffi_call_SYSV_end: + .size ffi_call_SYSV,.ffi_call_SYSV_end-ffi_call_SYSV + + + .globl ffi_closure_SYSV + .type ffi_closure_SYSV,%function + ffi_closure_SYSV: + .LFB2: + stm %r12,%r15,48(%r15) # Save registers + .LCFI10: + basr %r13,0 # Set up base register + .Lcbase: + stm %r2,%r6,8(%r15) # Save arguments + std %f0,64(%r15) + std %f2,72(%r15) + lr %r1,%r15 # Set up stack frame + ahi %r15,-96 + .LCFI11: + l %r12,.Lchelper-.Lcbase(%r13) # Get helper function + lr %r2,%r0 # Closure + la %r3,8(%r1) # GPRs + la %r4,64(%r1) # FPRs + la %r5,96(%r1) # Overflow + st %r1,0(%r15) # Set up back chain + + bas %r14,0(%r12,%r13) # Call helper + + l %r4,96+56(%r15) + ld %f0,96+64(%r15) # Load return registers + lm %r2,%r3,96+8(%r15) + lm %r12,%r15,96+48(%r15) + br %r4 + + .align 4 + .Lchelper: + .long ffi_closure_helper_SYSV-.Lcbase + + .LFE2: + + .ffi_closure_SYSV_end: + .size ffi_closure_SYSV,.ffi_closure_SYSV_end-ffi_closure_SYSV + + + .section .eh_frame,"a",@progbits + .Lframe1: + .4byte .LECIE1-.LSCIE1 # Length of Common Information Entry + .LSCIE1: + .4byte 0x0 # CIE Identifier Tag + .byte 0x1 # CIE Version + .ascii "zR\0" # CIE Augmentation + .uleb128 0x1 # CIE Code Alignment Factor + .sleb128 -4 # CIE Data Alignment Factor + .byte 0xe # CIE RA Column + .uleb128 0x1 # Augmentation size + .byte 0x1b # FDE Encoding (pcrel sdata4) + .byte 0xc # DW_CFA_def_cfa + .uleb128 0xf + .uleb128 0x60 + .align 4 + .LECIE1: + .LSFDE1: + .4byte .LEFDE1-.LASFDE1 # FDE Length + .LASFDE1: + .4byte .LASFDE1-.Lframe1 # FDE CIE offset + .4byte .LFB1-. # FDE initial location + .4byte .LFE1-.LFB1 # FDE address range + .uleb128 0x0 # Augmentation size + .byte 0x4 # DW_CFA_advance_loc4 + .4byte .LCFI0-.LFB1 + .byte 0x8f # DW_CFA_offset, column 0xf + .uleb128 0x9 + .byte 0x8e # DW_CFA_offset, column 0xe + .uleb128 0xa + .byte 0x8d # DW_CFA_offset, column 0xd + .uleb128 0xb + .byte 0x8c # DW_CFA_offset, column 0xc + .uleb128 0xc + .byte 0x8b # DW_CFA_offset, column 0xb + .uleb128 0xd + .byte 0x8a # DW_CFA_offset, column 0xa + .uleb128 0xe + .byte 0x89 # DW_CFA_offset, column 0x9 + .uleb128 0xf + .byte 0x88 # DW_CFA_offset, column 0x8 + .uleb128 0x10 + .byte 0x87 # DW_CFA_offset, column 0x7 + .uleb128 0x11 + .byte 0x86 # DW_CFA_offset, column 0x6 + .uleb128 0x12 + .byte 0x4 # DW_CFA_advance_loc4 + .4byte .LCFI1-.LCFI0 + .byte 0xd # DW_CFA_def_cfa_register + .uleb128 0xb + .byte 0x4 # DW_CFA_advance_loc4 + .4byte .LCFI2-.LCFI1 + .byte 0xe # DW_CFA_def_cfa_offset + .uleb128 0x90 + .align 4 + .LEFDE1: + .LSFDE2: + .4byte .LEFDE2-.LASFDE2 # FDE Length + .LASFDE2: + .4byte .LASFDE2-.Lframe1 # FDE CIE offset + .4byte .LFB2-. # FDE initial location + .4byte .LFE2-.LFB2 # FDE address range + .uleb128 0x0 # Augmentation size + .byte 0x4 # DW_CFA_advance_loc4 + .4byte .LCFI10-.LFB2 + .byte 0x8f # DW_CFA_offset, column 0xf + .uleb128 0x9 + .byte 0x8e # DW_CFA_offset, column 0xe + .uleb128 0xa + .byte 0x8d # DW_CFA_offset, column 0xd + .uleb128 0xb + .byte 0x8c # DW_CFA_offset, column 0xc + .uleb128 0xc + .byte 0x4 # DW_CFA_advance_loc4 + .4byte .LCFI11-.LCFI10 + .byte 0xe # DW_CFA_def_cfa_offset + .uleb128 0xc0 + .align 4 + .LEFDE2: + + #else + + .text + + # r2: cif->bytes + # r3: &ecif + # r4: ffi_prep_args + # r5: ret_type + # r6: ecif.rvalue + # ov: fn + + # This assumes we are using gas. + .globl ffi_call_SYSV + .type ffi_call_SYSV,%function + ffi_call_SYSV: + .LFB1: + stmg %r6,%r15,48(%r15) # Save registers + .LCFI0: + larl %r13,.Lbase # Set up base register + lgr %r11,%r15 # Set up frame pointer + .LCFI1: + sgr %r15,%r2 + aghi %r15,-160-80 # Allocate stack + lgr %r8,%r6 # Save ecif.rvalue + llgc %r9,.Ltable-.Lbase(%r13,%r5) # Load epilog address + lg %r7,160(%r11) # Load function address + stg %r11,0(%r15) # Set up back chain + aghi %r11,-80 # Register save area + .LCFI2: + + la %r2,160(%r15) # Save area + # r3 already holds &ecif + basr %r14,%r4 # Call ffi_prep_args + + lmg %r2,%r6,0(%r11) # Load arguments + ld %f0,48(%r11) + ld %f2,56(%r11) + ld %f4,64(%r11) + ld %f6,72(%r11) + la %r14,0(%r13,%r9) # Set return address + br %r7 # ... and call function + + .Lbase: + .LretNone: # Return void + lg %r4,80+112(%r11) + lmg %r6,%r15,80+48(%r11) + br %r4 + + .LretFloat: + lg %r4,80+112(%r11) + ste %f0,0(%r8) # Return float + lmg %r6,%r15,80+48(%r11) + br %r4 + + .LretDouble: + lg %r4,80+112(%r11) + std %f0,0(%r8) # Return double + lmg %r6,%r15,80+48(%r11) + br %r4 + + .LretInt32: + lg %r4,80+112(%r11) + st %r2,0(%r8) # Return int + lmg %r6,%r15,80+48(%r11) + br %r4 + + .LretInt64: + lg %r4,80+112(%r11) + stg %r2,0(%r8) # Return long + lmg %r6,%r15,80+48(%r11) + br %r4 + + .Ltable: + .byte .LretNone-.Lbase # FFI390_RET_VOID + .byte .LretNone-.Lbase # FFI390_RET_STRUCT + .byte .LretFloat-.Lbase # FFI390_RET_FLOAT + .byte .LretDouble-.Lbase # FFI390_RET_DOUBLE + .byte .LretInt32-.Lbase # FFI390_RET_INT32 + .byte .LretInt64-.Lbase # FFI390_RET_INT64 + + .LFE1: + .ffi_call_SYSV_end: + .size ffi_call_SYSV,.ffi_call_SYSV_end-ffi_call_SYSV + + + .globl ffi_closure_SYSV + .type ffi_closure_SYSV,%function + ffi_closure_SYSV: + .LFB2: + stmg %r14,%r15,112(%r15) # Save registers + .LCFI10: + stmg %r2,%r6,16(%r15) # Save arguments + std %f0,128(%r15) + std %f2,136(%r15) + std %f4,144(%r15) + std %f6,152(%r15) + lgr %r1,%r15 # Set up stack frame + aghi %r15,-160 + .LCFI11: + lgr %r2,%r0 # Closure + la %r3,16(%r1) # GPRs + la %r4,128(%r1) # FPRs + la %r5,160(%r1) # Overflow + stg %r1,0(%r15) # Set up back chain + + brasl %r14,ffi_closure_helper_SYSV # Call helper + + lg %r14,160+112(%r15) + ld %f0,160+128(%r15) # Load return registers + lg %r2,160+16(%r15) + la %r15,160(%r15) + br %r14 + .LFE2: + + .ffi_closure_SYSV_end: + .size ffi_closure_SYSV,.ffi_closure_SYSV_end-ffi_closure_SYSV + + + + .section .eh_frame,"a",@progbits + .Lframe1: + .4byte .LECIE1-.LSCIE1 # Length of Common Information Entry + .LSCIE1: + .4byte 0x0 # CIE Identifier Tag + .byte 0x1 # CIE Version + .ascii "zR\0" # CIE Augmentation + .uleb128 0x1 # CIE Code Alignment Factor + .sleb128 -8 # CIE Data Alignment Factor + .byte 0xe # CIE RA Column + .uleb128 0x1 # Augmentation size + .byte 0x1b # FDE Encoding (pcrel sdata4) + .byte 0xc # DW_CFA_def_cfa + .uleb128 0xf + .uleb128 0xa0 + .align 8 + .LECIE1: + .LSFDE1: + .4byte .LEFDE1-.LASFDE1 # FDE Length + .LASFDE1: + .4byte .LASFDE1-.Lframe1 # FDE CIE offset + .4byte .LFB1-. # FDE initial location + .4byte .LFE1-.LFB1 # FDE address range + .uleb128 0x0 # Augmentation size + .byte 0x4 # DW_CFA_advance_loc4 + .4byte .LCFI0-.LFB1 + .byte 0x8f # DW_CFA_offset, column 0xf + .uleb128 0x5 + .byte 0x8e # DW_CFA_offset, column 0xe + .uleb128 0x6 + .byte 0x8d # DW_CFA_offset, column 0xd + .uleb128 0x7 + .byte 0x8c # DW_CFA_offset, column 0xc + .uleb128 0x8 + .byte 0x8b # DW_CFA_offset, column 0xb + .uleb128 0x9 + .byte 0x8a # DW_CFA_offset, column 0xa + .uleb128 0xa + .byte 0x89 # DW_CFA_offset, column 0x9 + .uleb128 0xb + .byte 0x88 # DW_CFA_offset, column 0x8 + .uleb128 0xc + .byte 0x87 # DW_CFA_offset, column 0x7 + .uleb128 0xd + .byte 0x86 # DW_CFA_offset, column 0x6 + .uleb128 0xe + .byte 0x4 # DW_CFA_advance_loc4 + .4byte .LCFI1-.LCFI0 + .byte 0xd # DW_CFA_def_cfa_register + .uleb128 0xb + .byte 0x4 # DW_CFA_advance_loc4 + .4byte .LCFI2-.LCFI1 + .byte 0xe # DW_CFA_def_cfa_offset + .uleb128 0xf0 + .align 8 + .LEFDE1: + .LSFDE2: + .4byte .LEFDE2-.LASFDE2 # FDE Length + .LASFDE2: + .4byte .LASFDE2-.Lframe1 # FDE CIE offset + .4byte .LFB2-. # FDE initial location + .4byte .LFE2-.LFB2 # FDE address range + .uleb128 0x0 # Augmentation size + .byte 0x4 # DW_CFA_advance_loc4 + .4byte .LCFI10-.LFB2 + .byte 0x8f # DW_CFA_offset, column 0xf + .uleb128 0x5 + .byte 0x8e # DW_CFA_offset, column 0xe + .uleb128 0x6 + .byte 0x4 # DW_CFA_advance_loc4 + .4byte .LCFI11-.LCFI10 + .byte 0xe # DW_CFA_def_cfa_offset + .uleb128 0x140 + .align 8 + .LEFDE2: + + #endif + diff -Nrc3pad gcc-3.2.3/libffi/src/sh/ffi.c gcc-3.3/libffi/src/sh/ffi.c *** gcc-3.2.3/libffi/src/sh/ffi.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/libffi/src/sh/ffi.c 2002-07-19 01:08:43.000000000 +0000 *************** *** 0 **** --- 1,722 ---- + /* ----------------------------------------------------------------------- + ffi.c - Copyright (c) 2002 Kaz Kojima + + SuperH Foreign Function Interface + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + ``Software''), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + ----------------------------------------------------------------------- */ + + #include + #include + + #include + + #define NGREGARG 4 + #if defined(__SH4__) + #define NFREGARG 8 + #endif + + #if defined(__HITACHI__) + #define STRUCT_VALUE_ADDRESS_WITH_ARG 1 + #else + #define STRUCT_VALUE_ADDRESS_WITH_ARG 0 + #endif + + /* If the structure has essentialy an unique element, return its type. */ + static int + simple_type (ffi_type *arg) + { + if (arg->type != FFI_TYPE_STRUCT) + return arg->type; + else if (arg->elements[1]) + return FFI_TYPE_STRUCT; + + return simple_type (arg->elements[0]); + } + + static int + return_type (ffi_type *arg) + { + unsigned short type; + + if (arg->type != FFI_TYPE_STRUCT) + return arg->type; + + type = simple_type (arg->elements[0]); + if (! arg->elements[1]) + { + switch (type) + { + case FFI_TYPE_SINT8: + case FFI_TYPE_UINT8: + case FFI_TYPE_SINT16: + case FFI_TYPE_UINT16: + case FFI_TYPE_SINT32: + case FFI_TYPE_UINT32: + return FFI_TYPE_INT; + + default: + return type; + } + } + + /* gcc uses r0/r1 pair for some kind of structures. */ + if (arg->size <= 2 * sizeof (int)) + { + int i = 0; + ffi_type *e; + + while ((e = arg->elements[i++])) + { + type = simple_type (e); + switch (type) + { + case FFI_TYPE_SINT32: + case FFI_TYPE_UINT32: + case FFI_TYPE_INT: + case FFI_TYPE_FLOAT: + return FFI_TYPE_UINT64; + + default: + break; + } + } + } + + return FFI_TYPE_STRUCT; + } + + /* ffi_prep_args is called by the assembly routine once stack space + has been allocated for the function's arguments */ + + /*@-exportheader@*/ + void ffi_prep_args(char *stack, extended_cif *ecif) + /*@=exportheader@*/ + { + register unsigned int i; + register int tmp; + register unsigned int avn; + register void **p_argv; + register char *argp; + register ffi_type **p_arg; + int greg, ireg; + #if defined(__SH4__) + int freg = 0; + #endif + + tmp = 0; + argp = stack; + + if (return_type (ecif->cif->rtype) == FFI_TYPE_STRUCT) + { + *(void **) argp = ecif->rvalue; + argp += 4; + ireg = STRUCT_VALUE_ADDRESS_WITH_ARG ? 1 : 0; + } + else + ireg = 0; + + /* Set arguments for registers. */ + greg = ireg; + avn = ecif->cif->nargs; + p_argv = ecif->avalue; + + for (i = 0, p_arg = ecif->cif->arg_types; i < avn; i++, p_arg++, p_argv++) + { + size_t z; + + z = (*p_arg)->size; + if (z < sizeof(int)) + { + if (greg++ >= NGREGARG) + continue; + + z = sizeof(int); + switch ((*p_arg)->type) + { + case FFI_TYPE_SINT8: + *(signed int *) argp = (signed int)*(SINT8 *)(* p_argv); + break; + + case FFI_TYPE_UINT8: + *(unsigned int *) argp = (unsigned int)*(UINT8 *)(* p_argv); + break; + + case FFI_TYPE_SINT16: + *(signed int *) argp = (signed int)*(SINT16 *)(* p_argv); + break; + + case FFI_TYPE_UINT16: + *(unsigned int *) argp = (unsigned int)*(UINT16 *)(* p_argv); + break; + + case FFI_TYPE_STRUCT: + *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv); + break; + + default: + FFI_ASSERT(0); + } + argp += z; + } + else if (z == sizeof(int)) + { + #if defined(__SH4__) + if ((*p_arg)->type == FFI_TYPE_FLOAT) + { + if (freg++ >= NFREGARG) + continue; + } + else + #endif + { + if (greg++ >= NGREGARG) + continue; + } + *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv); + argp += z; + } + #if defined(__SH4__) + else if ((*p_arg)->type == FFI_TYPE_DOUBLE) + { + if (freg + 1 >= NFREGARG) + continue; + freg = (freg + 1) & ~1; + freg += 2; + memcpy (argp, *p_argv, z); + argp += z; + } + #endif + else + { + int n = (z + sizeof (int) - 1) / sizeof (int); + #if defined(__SH4__) + if (greg + n - 1 >= NGREGARG) + continue; + greg += n; + #else + if (greg >= NGREGARG) + continue; + else if (greg + n - 1 >= NGREGARG) + greg = NGREGARG; + else + greg += n; + #endif + memcpy (argp, *p_argv, z); + argp += z; + } + } + + /* Set arguments on stack. */ + greg = ireg; + #if defined(__SH4__) + freg = 0; + #endif + p_argv = ecif->avalue; + + for (i = 0, p_arg = ecif->cif->arg_types; i < avn; i++, p_arg++, p_argv++) + { + size_t z; + + z = (*p_arg)->size; + if (z < sizeof(int)) + { + if (greg++ < NGREGARG) + continue; + + z = sizeof(int); + switch ((*p_arg)->type) + { + case FFI_TYPE_SINT8: + *(signed int *) argp = (signed int)*(SINT8 *)(* p_argv); + break; + + case FFI_TYPE_UINT8: + *(unsigned int *) argp = (unsigned int)*(UINT8 *)(* p_argv); + break; + + case FFI_TYPE_SINT16: + *(signed int *) argp = (signed int)*(SINT16 *)(* p_argv); + break; + + case FFI_TYPE_UINT16: + *(unsigned int *) argp = (unsigned int)*(UINT16 *)(* p_argv); + break; + + case FFI_TYPE_STRUCT: + *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv); + break; + + default: + FFI_ASSERT(0); + } + argp += z; + } + else if (z == sizeof(int)) + { + #if defined(__SH4__) + if ((*p_arg)->type == FFI_TYPE_FLOAT) + { + if (freg++ < NFREGARG) + continue; + } + else + #endif + { + if (greg++ < NGREGARG) + continue; + } + *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv); + argp += z; + } + #if defined(__SH4__) + else if ((*p_arg)->type == FFI_TYPE_DOUBLE) + { + if (freg + 1 < NFREGARG) + { + freg = (freg + 1) & ~1; + freg += 2; + continue; + } + memcpy (argp, *p_argv, z); + argp += z; + } + #endif + else + { + int n = (z + sizeof (int) - 1) / sizeof (int); + if (greg + n - 1 < NGREGARG) + { + greg += n; + continue; + } + #if (! defined(__SH4__)) + else if (greg < NGREGARG) + { + greg = NGREGARG; + continue; + } + #endif + memcpy (argp, *p_argv, z); + argp += z; + } + } + + return; + } + + /* Perform machine dependent cif processing */ + ffi_status ffi_prep_cif_machdep(ffi_cif *cif) + { + int i, j; + int size, type; + int n, m; + int greg; + #if defined(__SH4__) + int freg = 0; + #endif + + cif->flags = 0; + + greg = ((return_type (cif->rtype) == FFI_TYPE_STRUCT) && + STRUCT_VALUE_ADDRESS_WITH_ARG) ? 1 : 0; + + #if defined(__SH4__) + for (i = j = 0; i < cif->nargs && j < 12; i++) + { + type = (cif->arg_types)[i]->type; + switch (type) + { + case FFI_TYPE_FLOAT: + if (freg >= NFREGARG) + continue; + freg++; + cif->flags += ((cif->arg_types)[i]->type) << (2 * j); + j++; + break; + + case FFI_TYPE_DOUBLE: + if ((freg + 1) >= NFREGARG) + continue; + freg = (freg + 1) & ~1; + freg += 2; + cif->flags += ((cif->arg_types)[i]->type) << (2 * j); + j++; + break; + + default: + size = (cif->arg_types)[i]->size; + n = (size + sizeof (int) - 1) / sizeof (int); + if (greg + n - 1 >= NGREGARG) + continue; + greg += n; + for (m = 0; m < n; m++) + cif->flags += FFI_TYPE_INT << (2 * j++); + break; + } + } + #else + for (i = j = 0; i < cif->nargs && j < 4; i++) + { + size = (cif->arg_types)[i]->size; + n = (size + sizeof (int) - 1) / sizeof (int); + if (greg >= NGREGARG) + continue; + else if (greg + n - 1 >= NGREGARG) + greg = NGREGARG; + else + greg += n; + for (m = 0; m < n; m++) + cif->flags += FFI_TYPE_INT << (2 * j++); + } + #endif + + /* Set the return type flag */ + switch (cif->rtype->type) + { + case FFI_TYPE_STRUCT: + cif->flags += (unsigned) (return_type (cif->rtype)) << 24; + break; + + case FFI_TYPE_VOID: + case FFI_TYPE_FLOAT: + case FFI_TYPE_DOUBLE: + case FFI_TYPE_SINT64: + case FFI_TYPE_UINT64: + cif->flags += (unsigned) cif->rtype->type << 24; + break; + + default: + cif->flags += FFI_TYPE_INT << 24; + break; + } + + return FFI_OK; + } + + /*@-declundef@*/ + /*@-exportheader@*/ + extern void ffi_call_SYSV(void (*)(char *, extended_cif *), + /*@out@*/ extended_cif *, + unsigned, unsigned, + /*@out@*/ unsigned *, + void (*fn)()); + /*@=declundef@*/ + /*@=exportheader@*/ + + void ffi_call(/*@dependent@*/ ffi_cif *cif, + void (*fn)(), + /*@out@*/ void *rvalue, + /*@dependent@*/ void **avalue) + { + extended_cif ecif; + + ecif.cif = cif; + ecif.avalue = avalue; + + /* If the return value is a struct and we don't have a return */ + /* value address then we need to make one */ + + if ((rvalue == NULL) && + (cif->rtype->type == FFI_TYPE_STRUCT)) + { + /*@-sysunrecog@*/ + ecif.rvalue = alloca(cif->rtype->size); + /*@=sysunrecog@*/ + } + else + ecif.rvalue = rvalue; + + + switch (cif->abi) + { + case FFI_SYSV: + /*@-usedef@*/ + ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes, + cif->flags, ecif.rvalue, fn); + /*@=usedef@*/ + break; + default: + FFI_ASSERT(0); + break; + } + } + + extern void ffi_closure_SYSV (void); + #if defined(__SH4__) + extern void __ic_invalidate (void *line); + #endif + + ffi_status + ffi_prep_closure (ffi_closure* closure, + ffi_cif* cif, + void (*fun)(ffi_cif*, void*, void**, void*), + void *user_data) + { + unsigned int *tramp; + + FFI_ASSERT (cif->abi == FFI_GCC_SYSV); + + tramp = (unsigned int *) &closure->tramp[0]; + #ifdef __LITTLE_ENDIAN__ + tramp[0] = 0xd301d202; + tramp[1] = 0x0009422b; + #else + tramp[0] = 0xd202d301; + tramp[1] = 0x422b0009; + #endif + *(void **) &tramp[2] = (void *)closure; /* ctx */ + *(void **) &tramp[3] = (void *)ffi_closure_SYSV; /* funaddr */ + + closure->cif = cif; + closure->fun = fun; + closure->user_data = user_data; + + #if defined(__SH4__) + /* Flush the icache. */ + __ic_invalidate(&closure->tramp[0]); + #endif + + return FFI_OK; + } + + /* Basically the trampoline invokes ffi_closure_SYSV, and on + * entry, r3 holds the address of the closure. + * After storing the registers that could possibly contain + * parameters to be passed into the stack frame and setting + * up space for a return value, ffi_closure_SYSV invokes the + * following helper function to do most of the work. + */ + + #ifdef __LITTLE_ENDIAN__ + #define OFS_INT8 0 + #define OFS_INT16 2 + #else + #define OFS_INT8 3 + #define OFS_INT16 2 + #endif + + int + ffi_closure_helper_SYSV (ffi_closure *closure, void *rvalue, + unsigned long *pgr, unsigned long *pfr, + unsigned long *pst) + { + void **avalue; + ffi_type **p_arg; + int i, avn; + int ireg, greg = 0; + #if defined(__SH4__) + int freg = 0; + #endif + ffi_cif *cif; + double temp; + + cif = closure->cif; + avalue = alloca(cif->nargs * sizeof(void *)); + + /* Copy the caller's structure return value address so that the closure + returns the data directly to the caller. */ + if (cif->rtype->type == FFI_TYPE_STRUCT) + { + rvalue = *pgr++; + ireg = STRUCT_VALUE_ADDRESS_WITH_ARG ? 1 : 0; + } + else + ireg = 0; + + cif = closure->cif; + greg = ireg; + avn = cif->nargs; + + /* Grab the addresses of the arguments from the stack frame. */ + for (i = 0, p_arg = cif->arg_types; i < avn; i++, p_arg++) + { + size_t z; + + z = (*p_arg)->size; + if (z < sizeof(int)) + { + if (greg++ >= NGREGARG) + continue; + + z = sizeof(int); + switch ((*p_arg)->type) + { + case FFI_TYPE_SINT8: + case FFI_TYPE_UINT8: + avalue[i] = (((char *)pgr) + OFS_INT8); + break; + + case FFI_TYPE_SINT16: + case FFI_TYPE_UINT16: + avalue[i] = (((char *)pgr) + OFS_INT16); + break; + + case FFI_TYPE_STRUCT: + avalue[i] = pgr; + break; + + default: + FFI_ASSERT(0); + } + pgr++; + } + else if (z == sizeof(int)) + { + #if defined(__SH4__) + if ((*p_arg)->type == FFI_TYPE_FLOAT) + { + if (freg++ >= NFREGARG) + continue; + avalue[i] = pfr; + pfr++; + } + else + #endif + { + if (greg++ >= NGREGARG) + continue; + avalue[i] = pgr; + pgr++; + } + } + #if defined(__SH4__) + else if ((*p_arg)->type == FFI_TYPE_DOUBLE) + { + if (freg + 1 >= NFREGARG) + continue; + freg = (freg + 1) & ~1; + freg += 2; + avalue[i] = pfr; + pfr += 2; + } + #endif + else + { + int n = (z + sizeof (int) - 1) / sizeof (int); + #if defined(__SH4__) + if (greg + n - 1 >= NGREGARG) + continue; + greg += n; + #else + if (greg >= NGREGARG) + continue; + else if (greg + n - 1 >= NGREGARG) + greg = NGREGARG; + else + greg += n; + #endif + avalue[i] = pgr; + pgr += n; + } + } + + greg = ireg; + #if defined(__SH4__) + freg = 0; + #endif + + for (i = 0, p_arg = cif->arg_types; i < avn; i++, p_arg++) + { + size_t z; + + z = (*p_arg)->size; + if (z < sizeof(int)) + { + if (greg++ < NGREGARG) + continue; + + z = sizeof(int); + switch ((*p_arg)->type) + { + case FFI_TYPE_SINT8: + case FFI_TYPE_UINT8: + avalue[i] = (((char *)pst) + OFS_INT8); + break; + + case FFI_TYPE_SINT16: + case FFI_TYPE_UINT16: + avalue[i] = (((char *)pst) + OFS_INT16); + break; + + case FFI_TYPE_STRUCT: + avalue[i] = pst; + break; + + default: + FFI_ASSERT(0); + } + pst++; + } + else if (z == sizeof(int)) + { + #if defined(__SH4__) + if ((*p_arg)->type == FFI_TYPE_FLOAT) + { + if (freg++ < NFREGARG) + continue; + } + else + #endif + { + if (greg++ < NGREGARG) + continue; + } + avalue[i] = pst; + pst++; + } + #if defined(__SH4__) + else if ((*p_arg)->type == FFI_TYPE_DOUBLE) + { + if (freg + 1 < NFREGARG) + { + freg = (freg + 1) & ~1; + freg += 2; + continue; + } + avalue[i] = pst; + pst += 2; + } + #endif + else + { + int n = (z + sizeof (int) - 1) / sizeof (int); + if (greg + n - 1 < NGREGARG) + { + greg += n; + continue; + } + #if (! defined(__SH4__)) + else if (greg < NGREGARG) + { + greg = NGREGARG; + continue; + } + #endif + avalue[i] = pst; + pst += n; + } + } + + (closure->fun) (cif, rvalue, avalue, closure->user_data); + + /* Tell ffi_closure_osf how to perform return type promotions. */ + return cif->rtype->type; + } diff -Nrc3pad gcc-3.2.3/libffi/src/sh/sysv.S gcc-3.3/libffi/src/sh/sysv.S *** gcc-3.2.3/libffi/src/sh/sysv.S 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/libffi/src/sh/sysv.S 2002-07-19 01:08:43.000000000 +0000 *************** *** 0 **** --- 1,674 ---- + /* ----------------------------------------------------------------------- + sysv.S - Copyright (c) 2002 Kaz Kojima + + SuperH Foreign Function Interface + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + ``Software''), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + ----------------------------------------------------------------------- */ + + #define LIBFFI_ASM + #include + #ifdef HAVE_MACHINE_ASM_H + #include + #else + /* XXX these lose for some platforms, I'm sure. */ + #define CNAME(x) x + #define ENTRY(x) .globl CNAME(x); .type CNAME(x),%function; CNAME(x): + #endif + + #if defined(__HITACHI__) + #define STRUCT_VALUE_ADDRESS_WITH_ARG 1 + #else + #define STRUCT_VALUE_ADDRESS_WITH_ARG 0 + #endif + + .text + + # r4: ffi_prep_args + # r5: &ecif + # r6: bytes + # r7: flags + # sp+0: rvalue + # sp+4: fn + + # This assumes we are using gas. + ENTRY(ffi_call_SYSV) + #if defined(__SH4__) + # Save registers + mov.l r8,@-r15 + mov.l r9,@-r15 + mov.l r10,@-r15 + mov.l r12,@-r15 + mov.l r14,@-r15 + sts.l pr,@-r15 + mov r15,r14 + + mov r6,r8 + mov r7,r9 + + sub r6,r15 + add #-16,r15 + mov #~7,r0 + and r0,r15 + + mov r4,r0 + jsr @r0 + mov r15,r4 + + mov r9,r1 + shlr8 r9 + shlr8 r9 + shlr8 r9 + + mov #FFI_TYPE_STRUCT,r2 + cmp/eq r2,r9 + bf 1f + #if STRUCT_VALUE_ADDRESS_WITH_ARG + mov.l @r15+,r4 + bra 2f + mov #5,r2 + #else + mov.l @r15+,r10 + #endif + 1: + mov #4,r2 + 2: + mov #4,r3 + + L_pass: + cmp/pl r8 + bf L_call_it + + mov r1,r0 + and #3,r0 + + L_pass_d: + cmp/eq #FFI_TYPE_DOUBLE,r0 + bf L_pass_f + + mov r3,r0 + and #1,r0 + tst r0,r0 + bt 1f + add #1,r3 + 1: + mov r15,r0 + and #7,r0 + tst r0,r0 + bt 2f + add #4,r15 + 2: + mov #12,r0 + cmp/hs r0,r3 + bt/s 3f + shlr2 r1 + bsr L_pop_d + nop + 3: + add #2,r3 + bra L_pass + add #-8,r8 + + L_pop_d: + mov r3,r0 + add r0,r0 + add r3,r0 + add #-12,r0 + braf r0 + nop + #ifdef __LITTLE_ENDIAN__ + fmov.s @r15+,fr5 + rts + fmov.s @r15+,fr4 + fmov.s @r15+,fr7 + rts + fmov.s @r15+,fr6 + fmov.s @r15+,fr9 + rts + fmov.s @r15+,fr8 + fmov.s @r15+,fr11 + rts + fmov.s @r15+,fr10 + #else + fmov.s @r15+,fr4 + rts + fmov.s @r15+,fr5 + fmov.s @r15+,fr6 + rts + fmov.s @r15+,fr7 + fmov.s @r15+,fr8 + rts + fmov.s @r15+,fr9 + fmov.s @r15+,fr10 + rts + fmov.s @r15+,fr11 + #endif + + L_pass_f: + cmp/eq #FFI_TYPE_FLOAT,r0 + bf L_pass_i + + mov #12,r0 + cmp/hs r0,r3 + bt/s 2f + shlr2 r1 + bsr L_pop_f + nop + 2: + add #1,r3 + bra L_pass + add #-4,r8 + + L_pop_f: + mov r3,r0 + shll2 r0 + add #-16,r0 + braf r0 + nop + #ifdef __LITTLE_ENDIAN__ + rts + fmov.s @r15+,fr5 + rts + fmov.s @r15+,fr4 + rts + fmov.s @r15+,fr7 + rts + fmov.s @r15+,fr6 + rts + fmov.s @r15+,fr9 + rts + fmov.s @r15+,fr8 + rts + fmov.s @r15+,fr11 + rts + fmov.s @r15+,fr10 + #else + rts + fmov.s @r15+,fr4 + rts + fmov.s @r15+,fr5 + rts + fmov.s @r15+,fr6 + rts + fmov.s @r15+,fr7 + rts + fmov.s @r15+,fr8 + rts + fmov.s @r15+,fr9 + rts + fmov.s @r15+,fr10 + rts + fmov.s @r15+,fr11 + #endif + + L_pass_i: + cmp/eq #FFI_TYPE_INT,r0 + bf L_call_it + + mov #8,r0 + cmp/hs r0,r2 + bt/s 2f + shlr2 r1 + bsr L_pop_i + nop + 2: + add #1,r2 + bra L_pass + add #-4,r8 + + L_pop_i: + mov r2,r0 + shll2 r0 + add #-16,r0 + braf r0 + nop + rts + mov.l @r15+,r4 + rts + mov.l @r15+,r5 + rts + mov.l @r15+,r6 + rts + mov.l @r15+,r7 + + L_call_it: + # call function + #if (! STRUCT_VALUE_ADDRESS_WITH_ARG) + mov r10, r2 + #endif + mov.l @(28,r14),r1 + jsr @r1 + nop + + L_ret_d: + mov #FFI_TYPE_DOUBLE,r2 + cmp/eq r2,r9 + bf L_ret_ll + + mov.l @(24,r14),r1 + #ifdef __LITTLE_ENDIAN__ + fmov.s fr1,@r1 + add #4,r1 + bra L_epilogue + fmov.s fr0,@r1 + #else + fmov.s fr0,@r1 + add #4,r1 + bra L_epilogue + fmov.s fr1,@r1 + #endif + + L_ret_ll: + mov #FFI_TYPE_SINT64,r2 + cmp/eq r2,r9 + bt/s 1f + mov #FFI_TYPE_UINT64,r2 + cmp/eq r2,r9 + bf L_ret_f + + 1: + mov.l @(24,r14),r2 + mov.l r0,@r2 + bra L_epilogue + mov.l r1,@(4,r2) + + L_ret_f: + mov #FFI_TYPE_FLOAT,r2 + cmp/eq r2,r9 + bf L_ret_i + + mov.l @(24,r14),r1 + bra L_epilogue + fmov.s fr0,@r1 + + L_ret_i: + mov #FFI_TYPE_INT,r2 + cmp/eq r2,r9 + bf L_epilogue + + mov.l @(24,r14),r1 + bra L_epilogue + mov.l r0,@r1 + + L_epilogue: + # Remove the space we pushed for the args + mov r14,r15 + + lds.l @r15+,pr + mov.l @r15+,r14 + mov.l @r15+,r12 + mov.l @r15+,r10 + mov.l @r15+,r9 + rts + mov.l @r15+,r8 + #else + # Save registers + mov.l r8,@-r15 + mov.l r9,@-r15 + mov.l r10,@-r15 + mov.l r12,@-r15 + mov.l r14,@-r15 + sts.l pr,@-r15 + mov r15,r14 + + mov r6,r8 + mov r7,r9 + + sub r6,r15 + add #-16,r15 + mov #~7,r0 + and r0,r15 + + mov r4,r0 + jsr @r0 + mov r15,r4 + + mov r9,r3 + shlr8 r9 + shlr8 r9 + shlr8 r9 + + mov #FFI_TYPE_STRUCT,r2 + cmp/eq r2,r9 + bf 1f + #if STRUCT_VALUE_ADDRESS_WITH_ARG + mov.l @r15+,r4 + bra 2f + mov #5,r2 + #else + mov.l @r15+,r10 + #endif + 1: + mov #4,r2 + 2: + + L_pass: + cmp/pl r8 + bf L_call_it + + mov r3,r0 + and #3,r0 + + L_pass_d: + cmp/eq #FFI_TYPE_DOUBLE,r0 + bf L_pass_i + + mov r15,r0 + and #7,r0 + tst r0,r0 + bt 1f + add #4,r15 + 1: + mov #8,r0 + cmp/hs r0,r2 + bt/s 2f + shlr2 r3 + bsr L_pop_d + nop + 2: + add #2,r2 + bra L_pass + add #-8,r8 + + L_pop_d: + mov r2,r0 + add r0,r0 + add r2,r0 + add #-12,r0 + add r0,r0 + braf r0 + nop + mov.l @r15+,r4 + rts + mov.l @r15+,r5 + mov.l @r15+,r5 + rts + mov.l @r15+,r6 + mov.l @r15+,r6 + rts + mov.l @r15+,r7 + rts + mov.l @r15+,r7 + + L_pass_i: + mov #8,r0 + cmp/hs r0,r2 + bt/s 2f + shlr2 r3 + bsr L_pop_i + nop + 2: + add #1,r2 + bra L_pass + add #-4,r8 + + L_pop_i: + mov r2,r0 + shll2 r0 + add #-16,r0 + braf r0 + nop + rts + mov.l @r15+,r4 + rts + mov.l @r15+,r5 + rts + mov.l @r15+,r6 + rts + mov.l @r15+,r7 + + L_call_it: + # call function + #if (! STRUCT_VALUE_ADDRESS_WITH_ARG) + mov r10, r2 + #endif + mov.l @(28,r14),r1 + jsr @r1 + nop + + L_ret_d: + mov #FFI_TYPE_DOUBLE,r2 + cmp/eq r2,r9 + bf L_ret_ll + + mov.l @(24,r14),r2 + mov.l r0,@r2 + bra L_epilogue + mov.l r1,@(4,r2) + + L_ret_ll: + mov #FFI_TYPE_SINT64,r2 + cmp/eq r2,r9 + bt/s 1f + mov #FFI_TYPE_UINT64,r2 + cmp/eq r2,r9 + bf L_ret_i + + 1: + mov.l @(24,r14),r2 + mov.l r0,@r2 + bra L_epilogue + mov.l r1,@(4,r2) + + L_ret_i: + mov #FFI_TYPE_FLOAT,r2 + cmp/eq r2,r9 + bt 1f + mov #FFI_TYPE_INT,r2 + cmp/eq r2,r9 + bf L_epilogue + 1: + mov.l @(24,r14),r1 + bra L_epilogue + mov.l r0,@r1 + + L_epilogue: + # Remove the space we pushed for the args + mov r14,r15 + + lds.l @r15+,pr + mov.l @r15+,r14 + mov.l @r15+,r12 + mov.l @r15+,r10 + mov.l @r15+,r9 + rts + mov.l @r15+,r8 + #endif + + .ffi_call_SYSV_end: + .size CNAME(ffi_call_SYSV),.ffi_call_SYSV_end-CNAME(ffi_call_SYSV) + + .globl ffi_closure_helper_SYSV + + ENTRY(ffi_closure_SYSV) + mov.l r14,@-r15 + sts.l pr,@-r15 + + /* Stack layout: + ... + 32 bytes (floating register parameters, SH-4 only) + 16 bytes (register parameters) + 4 bytes (result) + 4 bytes (5th arg) + <- new stack pointer + */ + #if defined(__SH4__) + add #-56,r15 + #else + add #-24,r15 + #endif + mov r15,r14 + + mov r14,r1 + add #24,r1 + mov.l r7,@-r1 + mov.l r6,@-r1 + mov.l r5,@-r1 + mov.l r4,@-r1 + mov r1,r6 + + #if defined(__SH4__) + mov r14,r1 + add #56,r1 + #ifdef __LITTLE_ENDIAN__ + fmov.s fr10,@-r1 + fmov.s fr11,@-r1 + fmov.s fr8,@-r1 + fmov.s fr9,@-r1 + fmov.s fr6,@-r1 + fmov.s fr7,@-r1 + fmov.s fr4,@-r1 + fmov.s fr5,@-r1 + #else + fmov.s fr11,@-r1 + fmov.s fr10,@-r1 + fmov.s fr9,@-r1 + fmov.s fr8,@-r1 + fmov.s fr7,@-r1 + fmov.s fr6,@-r1 + fmov.s fr5,@-r1 + fmov.s fr4,@-r1 + #endif + mov r1,r7 + #endif + + mov r14,r1 + add #4,r1 + mov r1,r5 + + mov r14,r1 + #if defined(__SH4__) + add #64,r1 + #else + add #32,r1 + #endif + mov.l r1,@r14 + + mov.l L_helper,r0 + jsr @r0 + mov r3,r4 + + shll r0 + mov r0,r1 + mova L_table,r0 + add r1,r0 + mov.w @r0,r0 + mov r14,r2 + braf r0 + add #4,r2 + 0: + .align 2 + L_helper: + .long ffi_closure_helper_SYSV + L_table: + .short L_case_v - 0b /* FFI_TYPE_VOID */ + .short L_case_i - 0b /* FFI_TYPE_INT */ + #if defined(__SH4__) + .short L_case_f - 0b /* FFI_TYPE_FLOAT */ + .short L_case_d - 0b /* FFI_TYPE_DOUBLE */ + .short L_case_d - 0b /* FFI_TYPE_LONGDOUBLE */ + #else + .short L_case_i - 0b /* FFI_TYPE_FLOAT */ + .short L_case_ll - 0b /* FFI_TYPE_DOUBLE */ + .short L_case_ll - 0b /* FFI_TYPE_LONGDOUBLE */ + #endif + .short L_case_uq - 0b /* FFI_TYPE_UINT8 */ + .short L_case_q - 0b /* FFI_TYPE_SINT8 */ + .short L_case_uh - 0b /* FFI_TYPE_UINT16 */ + .short L_case_h - 0b /* FFI_TYPE_SINT16 */ + .short L_case_i - 0b /* FFI_TYPE_UINT32 */ + .short L_case_i - 0b /* FFI_TYPE_SINT32 */ + .short L_case_ll - 0b /* FFI_TYPE_UINT64 */ + .short L_case_ll - 0b /* FFI_TYPE_SINT64 */ + .short L_case_v - 0b /* FFI_TYPE_STRUCT */ + .short L_case_i - 0b /* FFI_TYPE_POINTER */ + + #if defined(__SH4__) + L_case_d: + #ifdef __LITTLE_ENDIAN__ + fmov.s @r2+,fr1 + bra L_case_v + fmov.s @r2,fr0 + #else + fmov.s @r2+,fr0 + bra L_case_v + fmov.s @r2,fr1 + #endif + + L_case_f: + bra L_case_v + fmov.s @r2,fr0 + #endif + + L_case_ll: + mov.l @r2+,r0 + bra L_case_v + mov.l @r2,r1 + + L_case_i: + bra L_case_v + mov.l @r2,r0 + + L_case_q: + #ifdef __LITTLE_ENDIAN__ + #else + add #3,r2 + #endif + bra L_case_v + mov.b @r2,r0 + + L_case_uq: + #ifdef __LITTLE_ENDIAN__ + #else + add #3,r2 + #endif + mov.b @r2,r0 + bra L_case_v + extu.b r0,r0 + + L_case_h: + #ifdef __LITTLE_ENDIAN__ + #else + add #2,r2 + #endif + bra L_case_v + mov.w @r2,r0 + + L_case_uh: + #ifdef __LITTLE_ENDIAN__ + #else + add #2,r2 + #endif + mov.w @r2,r0 + extu.w r0,r0 + /* fall through */ + + L_case_v: + #if defined(__SH4__) + add #56,r15 + #else + add #24,r15 + #endif + lds.l @r15+,pr + rts + mov.l @r15+,r14 + + .ffi_closure_SYSV_end: + .size CNAME(ffi_closure_SYSV),.ffi_closure_SYSV_end-CNAME(ffi_closure_SYSV) diff -Nrc3pad gcc-3.2.3/libffi/src/sparc/ffi.c gcc-3.3/libffi/src/sparc/ffi.c *** gcc-3.2.3/libffi/src/sparc/ffi.c 2001-03-02 22:21:23.000000000 +0000 --- gcc-3.3/libffi/src/sparc/ffi.c 2003-01-04 03:13:28.000000000 +0000 *************** *** 1,5 **** /* ----------------------------------------------------------------------- ! ffi.c - Copyright (c) 1996 Cygnus Solutions Sparc Foreign Function Interface --- 1,5 ---- /* ----------------------------------------------------------------------- ! ffi.c - Copyright (c) 1996, 2003 Cygnus Solutions Sparc Foreign Function Interface *************** *** 28,47 **** #include /* ffi_prep_args is called by the assembly routine once stack space has been allocated for the function's arguments */ void ffi_prep_args_v8(char *stack, extended_cif *ecif) { int i; - int tmp; - int avn; void **p_argv; char *argp; ffi_type **p_arg; - tmp = 0; - /* Skip 16 words for the window save area */ argp = stack + 16*sizeof(int); --- 28,49 ---- #include + #ifdef SPARC64 + extern void ffi_closure_v9(void); + #else + extern void ffi_closure_v8(void); + #endif + /* ffi_prep_args is called by the assembly routine once stack space has been allocated for the function's arguments */ void ffi_prep_args_v8(char *stack, extended_cif *ecif) { int i; void **p_argv; char *argp; ffi_type **p_arg; /* Skip 16 words for the window save area */ argp = stack + 16*sizeof(int); *************** void ffi_prep_args_v8(char *stack, exten *** 66,83 **** ((int*)argp)[5] = 0; #endif - avn = ecif->cif->nargs; p_argv = ecif->avalue; ! for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types; ! i && avn; ! i--, p_arg++) { size_t z; - if (avn) - { - avn--; if ((*p_arg)->type == FFI_TYPE_STRUCT #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE || (*p_arg)->type == FFI_TYPE_LONGDOUBLE --- 68,79 ---- ((int*)argp)[5] = 0; #endif p_argv = ecif->avalue; ! for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types; i; i--, p_arg++) { size_t z; if ((*p_arg)->type == FFI_TYPE_STRUCT #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE || (*p_arg)->type == FFI_TYPE_LONGDOUBLE *************** void ffi_prep_args_v8(char *stack, exten *** 122,128 **** } p_argv++; argp += z; - } } return; --- 118,123 ---- *************** void ffi_call(ffi_cif *cif, void (*fn)() *** 420,422 **** --- 415,515 ---- } } + + ffi_status + ffi_prep_closure (ffi_closure* closure, + ffi_cif* cif, + void (*fun)(ffi_cif*, void*, void**, void*), + void *user_data) + { + unsigned int *tramp = (unsigned int *) &closure->tramp[0]; + unsigned long fn; + unsigned long ctx = (unsigned long) closure; + + #ifdef SPARC64 + /* Trampoline address is equal to the closure address. We take advantage + of that to reduce the trampoline size by 8 bytes. */ + FFI_ASSERT (cif->abi == FFI_V9); + fn = (unsigned long) ffi_closure_v9; + tramp[0] = 0x83414000; /* rd %pc, %g1 */ + tramp[1] = 0xca586010; /* ldx [%g1+16], %g5 */ + tramp[2] = 0x81c14000; /* jmp %g5 */ + tramp[3] = 0x01000000; /* nop */ + *((unsigned long *) &tramp[4]) = fn; + #else + FFI_ASSERT (cif->abi == FFI_V8); + fn = (unsigned long) ffi_closure_v8; + tramp[0] = 0x03000000 | fn >> 10; /* sethi %hi(fn), %g1 */ + tramp[1] = 0x05000000 | ctx >> 10; /* sethi %hi(ctx), %g2 */ + tramp[2] = 0x81c06000 | (fn & 0x3ff); /* jmp %g1+%lo(fn) */ + tramp[3] = 0x8410a000 | (ctx & 0x3ff);/* or %g2, %lo(ctx) */ + #endif + + closure->cif = cif; + closure->fun = fun; + closure->user_data = user_data; + + /* Flush the Icache. FIXME: alignment isn't certain, assume 8 bytes */ + #ifdef SPARC64 + asm volatile ("flush %0" : : "r" (closure) : "memory"); + asm volatile ("flush %0" : : "r" (((char *) closure) + 8) : "memory"); + #else + asm volatile ("iflush %0" : : "r" (closure) : "memory"); + asm volatile ("iflush %0" : : "r" (((char *) closure) + 8) : "memory"); + #endif + + return FFI_OK; + } + + int + ffi_closure_sparc_inner(ffi_closure *closure, + void *rvalue, unsigned long *gpr, double *fpr) + { + ffi_cif *cif; + void **avalue; + ffi_type **arg_types; + int i, avn, argn; + + cif = closure->cif; + avalue = alloca(cif->nargs * sizeof(void *)); + + argn = 0; + + /* Copy the caller's structure return address to that the closure + returns the data directly to the caller. */ + if (cif->flags == FFI_TYPE_STRUCT) + { + rvalue = (void *) gpr[0]; + argn = 1; + } + + i = 0; + avn = cif->nargs; + arg_types = cif->arg_types; + + /* Grab the addresses of the arguments from the stack frame. */ + while (i < avn) + { + /* Assume big-endian. FIXME */ + argn += ALIGN(arg_types[i]->size, SIZEOF_ARG) / SIZEOF_ARG; + + #ifdef SPARC64 + if (i < 6 && (arg_types[i]->type == FFI_TYPE_FLOAT + || arg_types[i]->type == FFI_TYPE_DOUBLE + #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE + || arg_types[i]->type == FFI_TYPE_LONGDOUBLE + #endif + )) + avalue[i] = ((char *) &fpr[argn]) - arg_types[i]->size; + else + #endif + avalue[i] = ((char *) &gpr[argn]) - arg_types[i]->size; + i++; + } + + /* Invoke the closure. */ + (closure->fun) (cif, rvalue, avalue, closure->user_data); + + /* Tell ffi_closure_sparc how to perform return type promotions. */ + return cif->rtype->type; + } diff -Nrc3pad gcc-3.2.3/libffi/src/sparc/v8.S gcc-3.3/libffi/src/sparc/v8.S *** gcc-3.2.3/libffi/src/sparc/v8.S 2002-04-28 20:12:04.000000000 +0000 --- gcc-3.3/libffi/src/sparc/v8.S 2003-05-08 20:37:57.000000000 +0000 *************** *** 1,5 **** /* ----------------------------------------------------------------------- ! v8.S - Copyright (c) 1996, 1997 Cygnus Solutions Sparc Foreign Function Interface --- 1,5 ---- /* ----------------------------------------------------------------------- ! v8.S - Copyright (c) 1996, 1997, 2003 Cygnus Solutions Sparc Foreign Function Interface *************** longlong: *** 94,99 **** --- 94,167 ---- .ffi_call_V8_end: .size ffi_call_V8,.ffi_call_V8_end-ffi_call_V8 + + #define STACKFRAME 104 /* 16*4 register window + + 1*4 struct return + + 6*4 args backing store + + 3*4 locals */ + + /* ffi_closure_v8(...) + + Receives the closure argument in %g2. */ + + .text + .align 8 + .globl ffi_closure_v8 + + ffi_closure_v8: + #ifdef HAVE_AS_REGISTER_PSEUDO_OP + .register %g2, #scratch + #endif + .LLFB2: + save %sp, -STACKFRAME, %sp + .LLCFI1: + + ! Store all of the potential argument registers in va_list format. + st %i0, [%fp+68+0] + st %i1, [%fp+68+4] + st %i2, [%fp+68+8] + st %i3, [%fp+68+12] + st %i4, [%fp+68+16] + st %i5, [%fp+68+20] + + ! Call ffi_closure_sparc_inner to do the bulk of the work. + mov %g2, %o0 + add %fp, -8, %o1 + add %fp, 68, %o2 + call ffi_closure_sparc_inner + mov 0, %o3 + + ! Load up the return value in the proper type. + cmp %o0, FFI_TYPE_VOID + be done1 + + cmp %o0, FFI_TYPE_FLOAT + be,a done1 + ld [%fp-8], %f0 + + cmp %o0, FFI_TYPE_DOUBLE + be,a done1 + ldd [%fp-8], %f0 + + cmp %o0, FFI_TYPE_SINT64 + be,a integer + ld [%fp-4], %i1 + + cmp %o0, FFI_TYPE_UINT64 + be,a integer + ld [%fp-4], %i1 + + integer: + ld [%fp-8], %i0 + + done1: + ret + restore + .LLFE2: + + .ffi_closure_v8_end: + .size ffi_closure_v8,.ffi_closure_v8_end-ffi_closure_v8 + #ifdef SPARC64 #define WS 8 #define nword xword *************** longlong: *** 148,150 **** --- 216,241 ---- .byte 0x1f ! uleb128 0x1f .align WS .LLEFDE1: + .LLSFDE2: + .uaword .LLEFDE2-.LLASFDE2 ! FDE Length + .LLASFDE2: + .uaword .LLASFDE2-.LLframe1 ! FDE CIE offset + #ifdef HAVE_AS_SPARC_UA_PCREL + .uaword %r_disp32(.LLFB2) + .uaword .LLFE2-.LLFB2 ! FDE address range + #else + .align WS + .nword .LLFB2 + .uanword .LLFE2-.LLFB2 ! FDE address range + #endif + .byte 0x0 ! uleb128 0x0; Augmentation size + .byte 0x4 ! DW_CFA_advance_loc4 + .uaword .LLCFI1-.LLFB2 + .byte 0xd ! DW_CFA_def_cfa_register + .byte 0x1e ! uleb128 0x1e + .byte 0x2d ! DW_CFA_GNU_window_save + .byte 0x9 ! DW_CFA_register + .byte 0xf ! uleb128 0xf + .byte 0x1f ! uleb128 0x1f + .align WS + .LLEFDE2: diff -Nrc3pad gcc-3.2.3/libffi/src/sparc/v9.S gcc-3.3/libffi/src/sparc/v9.S *** gcc-3.2.3/libffi/src/sparc/v9.S 2002-04-28 20:12:04.000000000 +0000 --- gcc-3.3/libffi/src/sparc/v9.S 2003-01-04 03:13:28.000000000 +0000 *************** *** 1,5 **** /* ----------------------------------------------------------------------- ! v9.S - Copyright (c) 2000 Cygnus Solutions Sparc 64bit Foreign Function Interface --- 1,5 ---- /* ----------------------------------------------------------------------- ! v9.S - Copyright (c) 2000, 2003 Cygnus Solutions Sparc 64bit Foreign Function Interface *************** _ffi_call_V9: *** 99,105 **** cmp %i3, FFI_TYPE_STRUCT be,pn %icc, dostruct ! cmp %i3, FFI_TYPE_LONGDOUBLE bne,pt %icc, done nop std %f0, [%i4+0] --- 99,105 ---- cmp %i3, FFI_TYPE_STRUCT be,pn %icc, dostruct ! cmp %i3, FFI_TYPE_LONGDOUBLE bne,pt %icc, done nop std %f0, [%i4+0] *************** dostruct: *** 125,130 **** --- 125,212 ---- .ffi_call_V9_end: .size ffi_call_V9,.ffi_call_V9_end-ffi_call_V9 + + #define STACKFRAME 240 /* 16*8 register window + + 6*8 args backing store + + 8*8 locals */ + #define FP %fp+STACK_BIAS + + /* ffi_closure_v9(...) + + Receives the closure argument in %g1. */ + + .text + .align 8 + .globl ffi_closure_v9 + + ffi_closure_v9: + .LLFB2: + save %sp, -STACKFRAME, %sp + .LLCFI1: + + ! Store all of the potential argument registers in va_list format. + stx %i0, [FP+128+0] + stx %i1, [FP+128+8] + stx %i2, [FP+128+16] + stx %i3, [FP+128+24] + stx %i4, [FP+128+32] + stx %i5, [FP+128+40] + + ! Store possible floating point argument registers too. + std %f0, [FP-48] + std %f2, [FP-40] + std %f4, [FP-32] + std %f6, [FP-24] + std %f8, [FP-16] + std %f10, [FP-8] + + ! Call ffi_closure_sparc_inner to do the bulk of the work. + mov %g1, %o0 + add %fp, STACK_BIAS-64, %o1 + add %fp, STACK_BIAS+128, %o2 + call ffi_closure_sparc_inner + add %fp, STACK_BIAS-48, %o3 + + ! Load up the return value in the proper type. + cmp %o0, FFI_TYPE_VOID + be,pn %icc, done1 + + cmp %o0, FFI_TYPE_FLOAT + be,a,pn %icc, done1 + ld [FP-64], %f0 + + cmp %o0, FFI_TYPE_DOUBLE + be,a,pn %icc, done1 + ldd [FP-64], %f0 + + cmp %o0, FFI_TYPE_LONGDOUBLE + be,a,pn %icc, longdouble1 + ldd [FP-64], %f0 + + cmp %o0, FFI_TYPE_STRUCT + be,pn %icc, struct1 + + ! FFI_TYPE_UINT64 | FFI_TYPE_SINT64 | FFI_TYPE_POINTER + ldx [FP-64], %i0 + + done1: + ret + restore + + struct1: + ldx [FP-56], %i2 + ret + restore + + longdouble1: + ldd [FP-56], %f2 + ret + restore + .LLFE2: + + .ffi_closure_v9_end: + .size ffi_closure_v9,.ffi_closure_v9_end-ffi_closure_v9 + .section ".eh_frame",#alloc,#write .LLframe1: .uaword .LLECIE1-.LLSCIE1 ! Length of Common Information Entry *************** dostruct: *** 169,173 **** .byte 0x1f ! uleb128 0x1f .align 8 .LLEFDE1: ! #endif --- 251,277 ---- .byte 0x1f ! uleb128 0x1f .align 8 .LLEFDE1: ! .LLSFDE2: ! .uaword .LLEFDE2-.LLASFDE2 ! FDE Length ! .LLASFDE2: ! .uaword .LLASFDE2-.LLframe1 ! FDE CIE offset ! #ifdef HAVE_AS_SPARC_UA_PCREL ! .uaword %r_disp32(.LLFB2) ! .uaword .LLFE2-.LLFB2 ! FDE address range ! #else ! .align 8 ! .xword .LLFB2 ! .uaxword .LLFE2-.LLFB2 ! FDE address range ! #endif ! .byte 0x0 ! uleb128 0x0; Augmentation size ! .byte 0x4 ! DW_CFA_advance_loc4 ! .uaword .LLCFI1-.LLFB2 ! .byte 0xd ! DW_CFA_def_cfa_register ! .byte 0x1e ! uleb128 0x1e ! .byte 0x2d ! DW_CFA_GNU_window_save ! .byte 0x9 ! DW_CFA_register ! .byte 0xf ! uleb128 0xf ! .byte 0x1f ! uleb128 0x1f ! .align 8 ! .LLEFDE2: #endif diff -Nrc3pad gcc-3.2.3/libffi/src/types.c gcc-3.3/libffi/src/types.c *** gcc-3.2.3/libffi/src/types.c 2001-03-27 02:39:16.000000000 +0000 --- gcc-3.3/libffi/src/types.c 2002-11-26 22:24:05.000000000 +0000 *************** FFI_INTEGRAL_TYPEDEF(uint32, 4, 4, FFI_T *** 42,48 **** FFI_INTEGRAL_TYPEDEF(sint32, 4, 4, FFI_TYPE_SINT32); FFI_INTEGRAL_TYPEDEF(float, 4, 4, FFI_TYPE_FLOAT); ! #if defined ALPHA || defined SPARC64 FFI_INTEGRAL_TYPEDEF(pointer, 8, 8, FFI_TYPE_POINTER); --- 42,49 ---- FFI_INTEGRAL_TYPEDEF(sint32, 4, 4, FFI_TYPE_SINT32); FFI_INTEGRAL_TYPEDEF(float, 4, 4, FFI_TYPE_FLOAT); ! #if defined ALPHA || defined SPARC64 || defined X86_64 || defined S390X \ ! || defined IA64 FFI_INTEGRAL_TYPEDEF(pointer, 8, 8, FFI_TYPE_POINTER); *************** FFI_INTEGRAL_TYPEDEF(pointer, 4, 4, FFI_ *** 52,73 **** #endif ! #ifdef X86 ! ! FFI_INTEGRAL_TYPEDEF(uint64, 8, 4, FFI_TYPE_UINT64); ! FFI_INTEGRAL_TYPEDEF(sint64, 8, 4, FFI_TYPE_SINT64); ! ! #elif defined X86_WIN32 ! ! FFI_INTEGRAL_TYPEDEF(uint64, 8, 4, FFI_TYPE_UINT64); ! FFI_INTEGRAL_TYPEDEF(sint64, 8, 4, FFI_TYPE_SINT64); ! ! #elif defined ARM FFI_INTEGRAL_TYPEDEF(uint64, 8, 4, FFI_TYPE_UINT64); FFI_INTEGRAL_TYPEDEF(sint64, 8, 4, FFI_TYPE_SINT64); ! #elif defined M68K FFI_INTEGRAL_TYPEDEF(uint64, 8, 4, FFI_TYPE_UINT64); FFI_INTEGRAL_TYPEDEF(sint64, 8, 4, FFI_TYPE_SINT64); --- 53,64 ---- #endif ! #if defined X86 || defined X86_WIN32 || defined ARM || defined M68K FFI_INTEGRAL_TYPEDEF(uint64, 8, 4, FFI_TYPE_UINT64); FFI_INTEGRAL_TYPEDEF(sint64, 8, 4, FFI_TYPE_SINT64); ! #elif defined SH FFI_INTEGRAL_TYPEDEF(uint64, 8, 4, FFI_TYPE_UINT64); FFI_INTEGRAL_TYPEDEF(sint64, 8, 4, FFI_TYPE_SINT64); *************** FFI_INTEGRAL_TYPEDEF(sint64, 8, 8, FFI_T *** 80,91 **** #endif ! #ifdef X86 ! ! FFI_INTEGRAL_TYPEDEF(double, 8, 4, FFI_TYPE_DOUBLE); ! FFI_INTEGRAL_TYPEDEF(longdouble, 12, 4, FFI_TYPE_LONGDOUBLE); ! ! #elif defined X86_WIN32 FFI_INTEGRAL_TYPEDEF(double, 8, 4, FFI_TYPE_DOUBLE); FFI_INTEGRAL_TYPEDEF(longdouble, 12, 4, FFI_TYPE_LONGDOUBLE); --- 71,77 ---- #endif ! #if defined X86 || defined X86_WIN32 || defined M68K FFI_INTEGRAL_TYPEDEF(double, 8, 4, FFI_TYPE_DOUBLE); FFI_INTEGRAL_TYPEDEF(longdouble, 12, 4, FFI_TYPE_LONGDOUBLE); *************** FFI_INTEGRAL_TYPEDEF(longdouble, 12, 4, *** 95,119 **** FFI_INTEGRAL_TYPEDEF(double, 8, 4, FFI_TYPE_DOUBLE); FFI_INTEGRAL_TYPEDEF(longdouble, 8, 4, FFI_TYPE_LONGDOUBLE); ! #elif defined M68K FFI_INTEGRAL_TYPEDEF(double, 8, 4, FFI_TYPE_DOUBLE); ! FFI_INTEGRAL_TYPEDEF(longdouble, 12, 4, FFI_TYPE_LONGDOUBLE); #elif defined SPARC FFI_INTEGRAL_TYPEDEF(double, 8, 8, FFI_TYPE_DOUBLE); - #ifdef SPARC64 - FFI_INTEGRAL_TYPEDEF(longdouble, 16, 16, FFI_TYPE_LONGDOUBLE); - #else - FFI_INTEGRAL_TYPEDEF(longdouble, 16, 8, FFI_TYPE_LONGDOUBLE); - #endif #else FFI_INTEGRAL_TYPEDEF(double, 8, 8, FFI_TYPE_DOUBLE); --- 81,105 ---- FFI_INTEGRAL_TYPEDEF(double, 8, 4, FFI_TYPE_DOUBLE); FFI_INTEGRAL_TYPEDEF(longdouble, 8, 4, FFI_TYPE_LONGDOUBLE); ! #elif defined SH FFI_INTEGRAL_TYPEDEF(double, 8, 4, FFI_TYPE_DOUBLE); ! FFI_INTEGRAL_TYPEDEF(longdouble, 8, 4, FFI_TYPE_LONGDOUBLE); #elif defined SPARC FFI_INTEGRAL_TYPEDEF(double, 8, 8, FFI_TYPE_DOUBLE); #ifdef SPARC64 FFI_INTEGRAL_TYPEDEF(longdouble, 16, 16, FFI_TYPE_LONGDOUBLE); #else FFI_INTEGRAL_TYPEDEF(longdouble, 16, 8, FFI_TYPE_LONGDOUBLE); #endif + #elif defined X86_64 + + FFI_INTEGRAL_TYPEDEF(double, 8, 8, FFI_TYPE_DOUBLE); + FFI_INTEGRAL_TYPEDEF(longdouble, 16, 16, FFI_TYPE_LONGDOUBLE); + #else FFI_INTEGRAL_TYPEDEF(double, 8, 8, FFI_TYPE_DOUBLE); diff -Nrc3pad gcc-3.2.3/libffi/src/x86/ffi64.c gcc-3.3/libffi/src/x86/ffi64.c *** gcc-3.2.3/libffi/src/x86/ffi64.c 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.3/libffi/src/x86/ffi64.c 2003-01-28 16:39:05.000000000 +0000 *************** *** 0 **** --- 1,706 ---- + /* ----------------------------------------------------------------------- + ffi.c - Copyright (c) 2002 Bo Thorsen + + x86-64 Foreign Function Interface + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + ``Software''), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + ----------------------------------------------------------------------- */ + + #include + #include + + #include + #include + + /* ffi_prep_args is called by the assembly routine once stack space + has been allocated for the function's arguments */ + + #ifdef __x86_64__ + + #define MAX_GPR_REGS 6 + #define MAX_SSE_REGS 8 + typedef struct + { + /* Registers for argument passing. */ + long gpr[MAX_GPR_REGS]; + __int128_t sse[MAX_SSE_REGS]; + + /* Stack space for arguments. */ + char argspace[0]; + } stackLayout; + + /* All reference to register classes here is identical to the code in + gcc/config/i386/i386.c. Do *not* change one without the other. */ + + /* Register class used for passing given 64bit part of the argument. + These represent classes as documented by the PS ABI, with the exception + of SSESF, SSEDF classes, that are basically SSE class, just gcc will + use SF or DFmode move instead of DImode to avoid reformating penalties. + + Similary we play games with INTEGERSI_CLASS to use cheaper SImode moves + whenever possible (upper half does contain padding). + */ + enum x86_64_reg_class + { + X86_64_NO_CLASS, + X86_64_INTEGER_CLASS, + X86_64_INTEGERSI_CLASS, + X86_64_SSE_CLASS, + X86_64_SSESF_CLASS, + X86_64_SSEDF_CLASS, + X86_64_SSEUP_CLASS, + X86_64_X87_CLASS, + X86_64_X87UP_CLASS, + X86_64_MEMORY_CLASS + }; + + #define MAX_CLASSES 4 + + /* x86-64 register passing implementation. See x86-64 ABI for details. Goal + of this code is to classify each 8bytes of incoming argument by the register + class and assign registers accordingly. */ + + /* Return the union class of CLASS1 and CLASS2. + See the x86-64 PS ABI for details. */ + + static enum x86_64_reg_class + merge_classes (enum x86_64_reg_class class1, enum x86_64_reg_class class2) + { + /* Rule #1: If both classes are equal, this is the resulting class. */ + if (class1 == class2) + return class1; + + /* Rule #2: If one of the classes is NO_CLASS, the resulting class is + the other class. */ + if (class1 == X86_64_NO_CLASS) + return class2; + if (class2 == X86_64_NO_CLASS) + return class1; + + /* Rule #3: If one of the classes is MEMORY, the result is MEMORY. */ + if (class1 == X86_64_MEMORY_CLASS || class2 == X86_64_MEMORY_CLASS) + return X86_64_MEMORY_CLASS; + + /* Rule #4: If one of the classes is INTEGER, the result is INTEGER. */ + if ((class1 == X86_64_INTEGERSI_CLASS && class2 == X86_64_SSESF_CLASS) + || (class2 == X86_64_INTEGERSI_CLASS && class1 == X86_64_SSESF_CLASS)) + return X86_64_INTEGERSI_CLASS; + if (class1 == X86_64_INTEGER_CLASS || class1 == X86_64_INTEGERSI_CLASS + || class2 == X86_64_INTEGER_CLASS || class2 == X86_64_INTEGERSI_CLASS) + return X86_64_INTEGER_CLASS; + + /* Rule #5: If one of the classes is X87 or X87UP class, MEMORY is used. */ + if (class1 == X86_64_X87_CLASS || class1 == X86_64_X87UP_CLASS + || class2 == X86_64_X87_CLASS || class2 == X86_64_X87UP_CLASS) + return X86_64_MEMORY_CLASS; + + /* Rule #6: Otherwise class SSE is used. */ + return X86_64_SSE_CLASS; + } + + /* Classify the argument of type TYPE and mode MODE. + CLASSES will be filled by the register class used to pass each word + of the operand. The number of words is returned. In case the parameter + should be passed in memory, 0 is returned. As a special case for zero + sized containers, classes[0] will be NO_CLASS and 1 is returned. + + See the x86-64 PS ABI for details. + */ + static int + classify_argument (ffi_type *type, enum x86_64_reg_class classes[], + int *byte_offset) + { + /* First, align to the right place. */ + *byte_offset = ALIGN(*byte_offset, type->alignment); + + switch (type->type) + { + case FFI_TYPE_UINT8: + case FFI_TYPE_SINT8: + case FFI_TYPE_UINT16: + case FFI_TYPE_SINT16: + case FFI_TYPE_UINT32: + case FFI_TYPE_SINT32: + case FFI_TYPE_UINT64: + case FFI_TYPE_SINT64: + case FFI_TYPE_POINTER: + if (((*byte_offset) % 8 + type->size) <= 4) + classes[0] = X86_64_INTEGERSI_CLASS; + else + classes[0] = X86_64_INTEGER_CLASS; + return 1; + case FFI_TYPE_FLOAT: + if (((*byte_offset) % 8) == 0) + classes[0] = X86_64_SSESF_CLASS; + else + classes[0] = X86_64_SSE_CLASS; + return 1; + case FFI_TYPE_DOUBLE: + classes[0] = X86_64_SSEDF_CLASS; + return 1; + case FFI_TYPE_LONGDOUBLE: + classes[0] = X86_64_X87_CLASS; + classes[1] = X86_64_X87UP_CLASS; + return 2; + case FFI_TYPE_STRUCT: + { + const int UNITS_PER_WORD = 8; + int words = (type->size + UNITS_PER_WORD - 1) / UNITS_PER_WORD; + ffi_type **ptr; + int i; + enum x86_64_reg_class subclasses[MAX_CLASSES]; + + /* If the struct is larger than 16 bytes, pass it on the stack. */ + if (type->size > 16) + return 0; + + for (i = 0; i < words; i++) + classes[i] = X86_64_NO_CLASS; + + /* Merge the fields of structure. */ + for (ptr=type->elements; (*ptr)!=NULL; ptr++) + { + int num; + + num = classify_argument (*ptr, subclasses, byte_offset); + if (num == 0) + return 0; + for (i = 0; i < num; i++) + { + int pos = *byte_offset / 8; + classes[i + pos] = + merge_classes (subclasses[i], classes[i + pos]); + } + + if ((*ptr)->type != FFI_TYPE_STRUCT) + *byte_offset += (*ptr)->size; + } + + /* Final merger cleanup. */ + for (i = 0; i < words; i++) + { + /* If one class is MEMORY, everything should be passed in + memory. */ + if (classes[i] == X86_64_MEMORY_CLASS) + return 0; + + /* The X86_64_SSEUP_CLASS should be always preceded by + X86_64_SSE_CLASS. */ + if (classes[i] == X86_64_SSEUP_CLASS + && (i == 0 || classes[i - 1] != X86_64_SSE_CLASS)) + classes[i] = X86_64_SSE_CLASS; + + /* X86_64_X87UP_CLASS should be preceded by X86_64_X87_CLASS. */ + if (classes[i] == X86_64_X87UP_CLASS + && (i == 0 || classes[i - 1] != X86_64_X87_CLASS)) + classes[i] = X86_64_SSE_CLASS; + } + return words; + } + + default: + FFI_ASSERT(0); + } + return 0; /* Never reached. */ + } + + /* Examine the argument and return set number of register required in each + class. Return 0 iff parameter should be passed in memory. */ + static int + examine_argument (ffi_type *type, int in_return, int *int_nregs,int *sse_nregs) + { + enum x86_64_reg_class class[MAX_CLASSES]; + int offset = 0; + int n; + + n = classify_argument (type, class, &offset); + + if (n == 0) + return 0; + + *int_nregs = 0; + *sse_nregs = 0; + for (n--; n>=0; n--) + switch (class[n]) + { + case X86_64_INTEGER_CLASS: + case X86_64_INTEGERSI_CLASS: + (*int_nregs)++; + break; + case X86_64_SSE_CLASS: + case X86_64_SSESF_CLASS: + case X86_64_SSEDF_CLASS: + (*sse_nregs)++; + break; + case X86_64_NO_CLASS: + case X86_64_SSEUP_CLASS: + break; + case X86_64_X87_CLASS: + case X86_64_X87UP_CLASS: + if (!in_return) + return 0; + break; + default: + abort (); + } + return 1; + } + + /* Functions to load floats and double to an SSE register placeholder. */ + extern void float2sse (float, __int128_t *); + extern void double2sse (double, __int128_t *); + extern void floatfloat2sse (void *, __int128_t *); + + /* Functions to put the floats and doubles back. */ + extern float sse2float (__int128_t *); + extern double sse2double (__int128_t *); + extern void sse2floatfloat(__int128_t *, void *); + + /*@-exportheader@*/ + void + ffi_prep_args (stackLayout *stack, extended_cif *ecif) + /*@=exportheader@*/ + { + int gprcount, ssecount, i, g, s; + void **p_argv; + void *argp = &stack->argspace; + ffi_type **p_arg; + + /* First check if the return value should be passed in memory. If so, + pass the pointer as the first argument. */ + gprcount = ssecount = 0; + if (ecif->cif->rtype->type != FFI_TYPE_VOID + && examine_argument (ecif->cif->rtype, 1, &g, &s) == 0) + (void *)stack->gpr[gprcount++] = ecif->rvalue; + + for (i=ecif->cif->nargs, p_arg=ecif->cif->arg_types, p_argv = ecif->avalue; + i!=0; i--, p_arg++, p_argv++) + { + int in_register = 0; + + switch ((*p_arg)->type) + { + case FFI_TYPE_SINT8: + case FFI_TYPE_SINT16: + case FFI_TYPE_SINT32: + case FFI_TYPE_SINT64: + case FFI_TYPE_UINT8: + case FFI_TYPE_UINT16: + case FFI_TYPE_UINT32: + case FFI_TYPE_UINT64: + case FFI_TYPE_POINTER: + if (gprcount < MAX_GPR_REGS) + { + stack->gpr[gprcount] = 0; + stack->gpr[gprcount++] = *(long long *)(*p_argv); + in_register = 1; + } + break; + + case FFI_TYPE_FLOAT: + if (ssecount < MAX_SSE_REGS) + { + float2sse (*(float *)(*p_argv), &stack->sse[ssecount++]); + in_register = 1; + } + break; + + case FFI_TYPE_DOUBLE: + if (ssecount < MAX_SSE_REGS) + { + double2sse (*(double *)(*p_argv), &stack->sse[ssecount++]); + in_register = 1; + } + break; + } + + if (in_register) + continue; + + /* Either all places in registers where filled, or this is a + type that potentially goes into a memory slot. */ + if (examine_argument (*p_arg, 0, &g, &s) == 0 + || gprcount + g > MAX_GPR_REGS || ssecount + s > MAX_SSE_REGS) + { + /* Pass this argument in memory. */ + argp = (void *)ALIGN(argp, (*p_arg)->alignment); + memcpy (argp, *p_argv, (*p_arg)->size); + argp += (*p_arg)->size; + } + else + { + /* All easy cases are eliminated. Now fire the big guns. */ + + enum x86_64_reg_class classes[MAX_CLASSES]; + int offset = 0, j, num; + void *a; + + num = classify_argument (*p_arg, classes, &offset); + for (j=0, a=*p_argv; jgpr[gprcount++] = *(long long *)a; + break; + case X86_64_SSE_CLASS: + floatfloat2sse (a, &stack->sse[ssecount++]); + break; + case X86_64_SSESF_CLASS: + float2sse (*(float *)a, &stack->sse[ssecount++]); + break; + case X86_64_SSEDF_CLASS: + double2sse (*(double *)a, &stack->sse[ssecount++]); + break; + default: + abort(); + } + } + } + } + } + + /* Perform machine dependent cif processing. */ + ffi_status + ffi_prep_cif_machdep (ffi_cif *cif) + { + int gprcount, ssecount, i, g, s; + + gprcount = ssecount = 0; + + /* Reset the byte count. We handle this size estimation here. */ + cif->bytes = 0; + + /* If the return value should be passed in memory, pass the pointer + as the first argument. The actual memory isn't allocated here. */ + if (cif->rtype->type != FFI_TYPE_VOID + && examine_argument (cif->rtype, 1, &g, &s) == 0) + gprcount = 1; + + /* Go over all arguments and determine the way they should be passed. + If it's in a register and there is space for it, let that be so. If + not, add it's size to the stack byte count. */ + for (i=0; inargs; i++) + { + if (examine_argument (cif->arg_types[i], 0, &g, &s) == 0 + || gprcount + g > MAX_GPR_REGS || ssecount + s > MAX_SSE_REGS) + { + /* This is passed in memory. First align to the basic type. */ + cif->bytes = ALIGN(cif->bytes, cif->arg_types[i]->alignment); + + /* Stack arguments are *always* at least 8 byte aligned. */ + cif->bytes = ALIGN(cif->bytes, 8); + + /* Now add the size of this argument. */ + cif->bytes += cif->arg_types[i]->size; + } + else + { + gprcount += g; + ssecount += s; + } + } + + /* Set the flag for the closures return. */ + switch (cif->rtype->type) + { + case FFI_TYPE_VOID: + case FFI_TYPE_STRUCT: + case FFI_TYPE_SINT64: + case FFI_TYPE_FLOAT: + case FFI_TYPE_DOUBLE: + case FFI_TYPE_LONGDOUBLE: + cif->flags = (unsigned) cif->rtype->type; + break; + + case FFI_TYPE_UINT64: + cif->flags = FFI_TYPE_SINT64; + break; + + default: + cif->flags = FFI_TYPE_INT; + break; + } + + return FFI_OK; + } + + typedef struct + { + long gpr[2]; + __int128_t sse[2]; + long double st0; + } return_value; + + void + ffi_fill_return_value (return_value *rv, extended_cif *ecif) + { + enum x86_64_reg_class classes[MAX_CLASSES]; + int i = 0, num; + long *gpr = rv->gpr; + __int128_t *sse = rv->sse; + signed char sc; + signed short ss; + + /* This is needed because of the way x86-64 handles signed short + integers. */ + switch (ecif->cif->rtype->type) + { + case FFI_TYPE_SINT8: + sc = *(signed char *)gpr; + *(long long *)ecif->rvalue = (long long)sc; + return; + case FFI_TYPE_SINT16: + ss = *(signed short *)gpr; + *(long long *)ecif->rvalue = (long long)ss; + return; + default: + /* Just continue. */ + ; + } + + num = classify_argument (ecif->cif->rtype, classes, &i); + + if (num == 0) + /* Return in memory. */ + ecif->rvalue = (void *) rv->gpr[0]; + else if (num == 2 && classes[0] == X86_64_X87_CLASS && + classes[1] == X86_64_X87UP_CLASS) + /* This is a long double (this is easiest to handle this way instead + of an eightbyte at a time as in the loop below. */ + *((long double *)ecif->rvalue) = rv->st0; + else + { + void *a; + + for (i=0, a=ecif->rvalue; irtype, 1, &dummy, &dummy) == 0)) + { + /*@-sysunrecog@*/ + ecif.rvalue = alloca(cif->rtype->size); + /*@=sysunrecog@*/ + } + else + ecif.rvalue = rvalue; + + /* Stack must always be 16byte aligned. Make it so. */ + cif->bytes = ALIGN(cif->bytes, 16); + + switch (cif->abi) + { + case FFI_SYSV: + /* Calling 32bit code from 64bit is not possible */ + FFI_ASSERT(0); + break; + + case FFI_UNIX64: + /*@-usedef@*/ + ffi_call_UNIX64 (ffi_prep_args, ffi_fill_return_value, &ecif, + cif->bytes, ecif.rvalue, fn); + /*@=usedef@*/ + break; + + default: + FFI_ASSERT(0); + break; + } + } + + extern void ffi_closure_UNIX64(void); + + ffi_status + ffi_prep_closure (ffi_closure* closure, + ffi_cif* cif, + void (*fun)(ffi_cif*, void*, void**, void*), + void *user_data) + { + volatile unsigned short *tramp; + + /* FFI_ASSERT (cif->abi == FFI_OSF); */ + + tramp = (volatile unsigned short *) &closure->tramp[0]; + tramp[0] = 0xbb49; /* mov , %r11 */ + tramp[5] = 0xba49; /* mov , %r10 */ + tramp[10] = 0xff49; /* jmp *%r11 */ + tramp[11] = 0x00e3; + *(void * volatile *) &tramp[1] = ffi_closure_UNIX64; + *(void * volatile *) &tramp[6] = closure; + + closure->cif = cif; + closure->fun = fun; + closure->user_data = user_data; + + return FFI_OK; + } + + int + ffi_closure_UNIX64_inner(ffi_closure *closure, va_list l, void *rp) + { + ffi_cif *cif; + void **avalue; + ffi_type **arg_types; + long i, avn, argn; + + cif = closure->cif; + avalue = alloca(cif->nargs * sizeof(void *)); + + argn = 0; + + i = 0; + avn = cif->nargs; + arg_types = cif->arg_types; + + /* Grab the addresses of the arguments from the stack frame. */ + while (i < avn) + { + switch (arg_types[i]->type) + { + case FFI_TYPE_SINT8: + case FFI_TYPE_UINT8: + case FFI_TYPE_SINT16: + case FFI_TYPE_UINT16: + case FFI_TYPE_SINT32: + case FFI_TYPE_UINT32: + case FFI_TYPE_SINT64: + case FFI_TYPE_UINT64: + case FFI_TYPE_POINTER: + { + if (l->gp_offset > 48-8) + { + avalue[i] = l->overflow_arg_area; + l->overflow_arg_area = (char *)l->overflow_arg_area + 8; + } + else + { + avalue[i] = (char *)l->reg_save_area + l->gp_offset; + l->gp_offset += 8; + } + } + break; + + case FFI_TYPE_STRUCT: + /* FIXME */ + FFI_ASSERT(0); + break; + + case FFI_TYPE_DOUBLE: + { + if (l->fp_offset > 176-16) + { + avalue[i] = l->overflow_arg_area; + l->overflow_arg_area = (char *)l->overflow_arg_area + 8; + } + else + { + avalue[i] = (char *)l->reg_save_area + l->fp_offset; + l->fp_offset += 16; + } + } + #if DEBUG_FFI + fprintf (stderr, "double arg %d = %g\n", i, *(double *)avalue[i]); + #endif + break; + + case FFI_TYPE_FLOAT: + { + if (l->fp_offset > 176-16) + { + avalue[i] = l->overflow_arg_area; + l->overflow_arg_area = (char *)l->overflow_arg_area + 8; + } + else + { + avalue[i] = (char *)l->reg_save_area + l->fp_offset; + l->fp_offset += 16; + } + } + #if DEBUG_FFI + fprintf (stderr, "float arg %d = %g\n", i, *(float *)avalue[i]); + #endif + break; + + default: + FFI_ASSERT(0); + } + + argn += ALIGN(arg_types[i]->size, SIZEOF_ARG) / SIZEOF_ARG; + i++; + } + + /* Invoke the closure. */ + (closure->fun) (cif, rp, avalue, closure->user_data); + + /* FIXME: Structs not supported. */ + FFI_ASSERT(cif->rtype->type != FFI_TYPE_STRUCT); + + /* Tell ffi_closure_UNIX64 how to perform return type promotions. */ + + return cif->rtype->type; + } + #endif /* ifndef __x86_64__ */ diff -Nrc3pad gcc-3.2.3/libffi/src/x86/ffi.c gcc-3.3/libffi/src/x86/ffi.c *** gcc-3.2.3/libffi/src/x86/ffi.c 2002-05-28 09:22:08.000000000 +0000 --- gcc-3.3/libffi/src/x86/ffi.c 2003-03-22 11:57:33.000000000 +0000 *************** *** 1,5 **** /* ----------------------------------------------------------------------- ! ffi.c - Copyright (c) 1996, 1998, 1999 Cygnus Solutions x86 Foreign Function Interface --- 1,8 ---- /* ----------------------------------------------------------------------- ! ffi.c - Copyright (c) 1996, 1998, 1999, 2001 Red Hat, Inc. ! Copyright (c) 2002 Ranjit Mathew ! Copyright (c) 2002 Bo Thorsen ! Copyright (c) 2002 Roger Sayle x86 Foreign Function Interface *************** *** 23,28 **** --- 26,33 ---- OTHER DEALINGS IN THE SOFTWARE. ----------------------------------------------------------------------- */ + #ifndef __x86_64__ + #include #include *************** void ffi_prep_args(char *stack, extended *** 36,47 **** /*@=exportheader@*/ { register unsigned int i; - register int tmp; register void **p_argv; register char *argp; register ffi_type **p_arg; - tmp = 0; argp = stack; if (ecif->cif->rtype->type == FFI_TYPE_STRUCT) --- 41,50 ---- *************** extern void ffi_call_SYSV(void (*)(char *** 148,153 **** --- 151,168 ---- /*@=declundef@*/ /*@=exportheader@*/ + #ifdef X86_WIN32 + /*@-declundef@*/ + /*@-exportheader@*/ + extern void ffi_call_STDCALL(void (*)(char *, extended_cif *), + /*@out@*/ extended_cif *, + unsigned, unsigned, + /*@out@*/ unsigned *, + void (*fn)()); + /*@=declundef@*/ + /*@=exportheader@*/ + #endif /* X86_WIN32 */ + void ffi_call(/*@dependent@*/ ffi_cif *cif, void (*fn)(), /*@out@*/ void *rvalue, *************** void ffi_call(/*@dependent@*/ ffi_cif *c *** 180,185 **** --- 195,208 ---- cif->flags, ecif.rvalue, fn); /*@=usedef@*/ break; + #ifdef X86_WIN32 + case FFI_STDCALL: + /*@-usedef@*/ + ffi_call_STDCALL(ffi_prep_args, &ecif, cif->bytes, + cif->flags, ecif.rvalue, fn); + /*@=usedef@*/ + break; + #endif /* X86_WIN32 */ default: FFI_ASSERT(0); break; *************** void ffi_call(/*@dependent@*/ ffi_cif *c *** 191,225 **** static void ffi_prep_incoming_args_SYSV (char *stack, void **ret, void** args, ffi_cif* cif); ! static void ffi_closure_SYSV (); ! static void ffi_closure_raw_SYSV (); ! /* This function is jumped to by the trampoline, on entry, %ecx (a ! * caller-save register) holds the address of the closure. ! * Clearly, this requires __GNUC__, so perhaps we should translate this ! * into an assembly file if this is to be distributed with ffi. ! */ static void ! ffi_closure_SYSV () { // this is our return value storage long double res;