* java/lang/natRuntime.cc: Don't include sys/time.h and time.h.
* java/util/natTimeZone.cc: Include sys/time.h and time.h here.
Include platform.h.
From-SVN: r53443
Fixes PR libgcj/6389:
* Makefile.in: Rebuilt.
* Makefile.am (nat_source_files): Added natTimeZone.cc.
* java/util/natTimeZone.cc: New file.
* java/util/TimeZone.java (getDefaultTimeZoneId): New method.
* java/lang/System.java: Merged with Classpath.
* java/lang/Runtime.java: Merged with Classpath.
* java/lang/natSystem.cc (setErr0): Renamed from setErr; don't run
security check.
(setIn0): Renamed from setIn; don't run security check.
(setOut0): Renamed from setOut; don't run security check.
(file_encoding, getpwuid_adaptor, getSystemTimeZone,
init_properties): Moved to natRuntime.cc.
Moved many includes to natRuntime.cc.
(isWordsBigEndian): New method.
* java/lang/natRuntime.cc: Include Long.h, also other includes
previously in natSystem.cc.
(maxMemory): New function.
(exitInternal): Renamed from `_exit'.
(exit): Removed.
(init): Don't set finalize_on_exit.
(exitInternal): Use `finalizeOnExit'.
(file_encoding, getpwuid_adaptor): New functions from
natSystem.cc.
(insertSystemProperties): New method, renamed from
System::init_properties. Don't set user.timezone.
(_load): Don't call checkLink.
(execInternal): New method.
(availableProcessors): Likewise.
(nativeGetLibname): Likewise.
From-SVN: r53429
* java/jcf-write.c (write_classfile): Write the file to a
temporary file and then rename it.
* libjava/Makefile.am (all_java_source_files): New variable.
(all_java_class_files): Likewise.
.java.class: New rule.
(CLEANFILES): Remove tmp-list.
* libjava/Makefile.in: Regenerated.
From-SVN: r53298
* configure.in (ORIGINAL_LD_FOR_MULTILIBS): Preserve LD at
script entry, and set LD to it when configuring multilibs.
* configure: Rebuilt.
From-SVN: r53278
2002-05-06 David.Billinghurst <David.Billinghurst@riotinto.com>
* testsuite/lib/libjava.exp (libjava_arguments): Don't link
with -no-install on *-*-cygwin*.
From-SVN: r53210
2002-05-04 David Billinghurst <David.Billinghurst@riotinto.com>
* testsuite/lib/libjava.exp (test_libjava_from_source):
Append .exe to executable names. If no suffix is present,
then ".exe" is added by default on win32. Harmless
elsewhere so always do it.
From-SVN: r53143
2002-05-03 David Billinghurst <David.Billinghurst@riotinto.com>
Tom Tromey <tromey@redhat.com>
* java/lang/natSystem.cc (getSystemTimeZone): Use
HAVE_UNDERSCORE_TIMEZONE.
* include/config.h.in: Rebuilt.
* acconfig.h (HAVE_UNDERSCORE_TIMEZONE, HAVE_BACKTRACE): Undef.
* aclocal.m4, configure: Rebuilt.
* acinclude.m4: Run AC_EXEEXT.
* configure.in: Adjust test for `timezone' so it fails on Cygwin.
Add test for `_timezone'.
Co-Authored-By: Tom Tromey <tromey@redhat.com>
From-SVN: r53117
* testsuite/lib/libjava.exp (libjava_find_spec): New function.
(libjava_init): Use it to find libgcj.spec.
(libjava_arguments): Likewise.
From-SVN: r53057
2002-05-02 David S. Miller <davem@redhat.com>
PR bootstrap/6525
* include/dwarf2-signal.h (INIT_SEGV, INIT_FPE): Don't use
__libc_sigaction on Sparc.
From-SVN: r53055
2002-04-29 Adam King <aking@dreammechanics.com>
* java/io/natFileDescriptorWin32.cc (open): Move file pointer to end
of file in APPEND mode.
From-SVN: r52869
2002-04-25 David S. Miller <davem@redhat.com>
PR target/6422
* include/dwarf2-signal.h (MAKE_THROW_FRAME for sparc*): Set
program counter to next program counter minus 8. Update
comments in this macro to explain why.
From-SVN: r52820
* gnu/gcj/natCore.cc (create): Use __builtin_alloca, and compute
correct length of UTF-8 encoded name. Strip leading `/'.
(_Jv_RegisterResource): Use _Jv_Malloc.
From-SVN: r52744
* mauve-libgcj: Don't run java.lang.ref tests since they are buggy.
* libjava.mauve/xfail: Expect failures for PR java/6391 and
libgcj/6389.
From-SVN: r52577
2002-04-19 David S. Miller <davem@redhat.com>
* include/dwarf2-signal.h (SIGNAL_HANDLER): Name siginfo_t pointer
arg.
(MAKE_THROW_FRAME): Define for 32-bit and 64-bit sparc.
(INIT_SEGV, INIT_FPE): Use direct __libc_sigaction installation
on Sparc too.
* include/sparc-signal.h (FLUSH_REGISTER_WINDOWS): Define properly
for 64-bit sparc.
(MAKE_THROW_FRAME): Use long for sp/retaddr so 64-bit works.
* sysdeps/sparc/locks.h: New file.
* configure.in (SIGNAL_HANDLER): Set to include/sparc-signal.h
on all sparc Solaris configurations. Set to
include/dwarf2-signal.h on sparc Linux.
* configure: Regenerate
* configure.host (can_unwind_signal): sparc*-linux* can do it now.
From-SVN: r52575
2002-04-16 Adam King <aking@dreammechanics.com>
Tom Tromey <tromey@redhat.com>
* java/io/natFileWin32.cc (performList): Return the correct array
type. Don't duplicate the creation of a File since it's already
done earlier in the method and the existing code would cause a
ArrayStoreException. Don't use fixed-size array.
(_access, _stat, attr, getCanonicalPath, performMkdir,
performRenameTo): Don't use fixed-size array.
(getCanonicalPath): Use throw, not _Jv_Throw.
Co-Authored-By: Tom Tromey <tromey@redhat.com>
From-SVN: r52369
2002-04-13 Adam King <aking@dreammechanics.com>
* java/lang/natDouble.cc (parseDouble): Allow a number to end with
the f/F/d/D modifiers.
From-SVN: r52308
* configure.host: Set can_unwind_signal on hosts which support it.
Don't set CHECKREFSPEC and DIVIDESPEC for FreeBSD.
* configure.in: Set CHECKREFSPEC and DIVIDESPEC if not using SJLJ
exceptions and can_unwind_signal isn't set.
* configure: Rebuilt.
From-SVN: r52193
2002-04-11 Adam King <aking@dreammechanics.com>
Tom Tromey <tromey@redhat.com>
* include/jvm.h (_Jv_ThrowBadArrayIndex,
_Jv_ThrowNullPointerException): Mark as noreturn.
* win32.cc (_Jv_platform_initProperties): Use _Jv_MallocUnchecked
and _Jv_free. Correctly invoke GetTempPath(). Indentation
fixes.
Co-Authored-By: Tom Tromey <tromey@redhat.com>
From-SVN: r52164
2002-04-07 Adam King <aking@dreammechanics.com>
* java/lang/natSystem.cc (init_properties): Call new function
_Jv_platform_initProperties.
* win32 (_Jv_platform_initProperties): New function that adds Win32
support for the System properties os.name, os.arch, os.version,
user.name, user.home, and user.dir.
* include/posix.h, include/win32.h, posix.cc: New function
_Jv_platform_initProperties.
From-SVN: r51989
* java/util/ArrayList.java (addAll(int,Collection)): System.arraycopy
all of the remaining elements.
* java/util/Vector.java (addAll(int,Collection)): Likewise.
(removeRange): If toIndex == fromIndex do
nothing, if toIndex < fromIndex throw IndexOutIfBoundsException.
(removeAll): Always throw NullPointerException when collection is
null.
(retrainAll): Likewise.
From-SVN: r51979
* mauve-libgcj: Add JLS1.0 and JLS1.1 tags, ignore Character.unicode
test.
* testsuite/libjava.mauve/xfails: Remove working tests DoubleTest,
FloatTest and ObjectStreamClass. Add FAIL for Introspector.jdk11 tests
that depend on awt code and BufferedByteOutputStream.interrupt.
From-SVN: r51893
* mauve-libgcj: Add JDK1.3, JDK1.4, JLS1.2 tests, remove ignored tests
that can be compiled now and add testsuite crashers to ignore list.
From-SVN: r51693
2002-03-25 Andrew Haley <aph@cambridge.redhat.com>, Hans Boehm <Hans_Boehm@hp.com>
* include/dwarf2-signal.h (MAKE_THROW_FRAME): Add for IA-64.
(INIT_SEGV, INIT_FPE): Add versions that use __libc_sigaction
instead of syscall on IA-64.
Add FIXME comment.
From-SVN: r51459
* java/io/PushbackInputStream.java (available): Calculate correct
number of bytes in buffer.
(read): Remove redundant bound check. Return bytes from both the
buffer and the stream.
From-SVN: r51296
* java/awt/MenuItem.java (eventMask): No longer private.
* java/awt/Button.java (dispatchEventImpl): Only dispatch to
superclass if we didn't handle event.
* java/awt/Checkbox.java (dispatchEventImpl): New method.
* java/awt/CheckboxMenuItem.java (dispatchEventImpl): New method.
* java/awt/Choice.java (dispatchEventImpl): New method.
* java/awt/List.java (dispatchEventImpl): New method.
* java/awt/Scrollbar.java (dispatchEventImpl): New method.
* java/awt/TextComponent.java (dispatchEventImpl): New method.
* java/awt/TextField.java (dispatchEventImpl): New method.
From-SVN: r51277
2002-03-24 Eric Blake <ebb9@email.byu.edu>
* java/beans/IntrospectionException.java: Update to 1.4.
* java/beans/PropertyVetoException.java: Ditto.
2002-03-24 Eric Blake <ebb9@email.byu.edu>
* gnu/java/beans/BeanInfoEmbryo.java (hasMethod): Use
Arrays.equals instead of ArrayHelper.equalsArray.
2002-03-24 C. Brian Jones <cbj@gnu.org>
* java/beans/Introspector.java: added new static final fields
introduced in 1.2, lots of other updates remain to be done
2002-03-24 C. Brian Jones <cbj@gnu.org>
* java/beans/Introspector.java: reformatting
2002-03-24 C. Brian Jones <cbj@gnu.org>
* java/beans/Introspector.java: default beanInfoSearchPath will
not include sun.beans.infos given we provide no such package and
the API doesn't really require it; gnu.java.beans.info is the
default.
2002-03-24 Mark Wielaard <mark@klomp.org>
Thanks to Orp developers
* gnu/java/beans/editors/NativeBooleanEditor.java (setAsText(String)):
switch TRUE and FALSE return values.
From-SVN: r51273
* posix-threads.cc (_Jv_ThreadSelf_out_of_line): Use write_barrier,
not release_set.
* sysdep/powerpc/locks.h (write_barrier): New function.
* sysdep/i386/locks.h (write_barrier): New function.
From-SVN: r51101
zlib:
* Makefile.am: Make target library a convenience library.
* Makefile.in: Rebuilt.
libffi:
* Makefile.am: libfficonvenience -> libffi_convenience.
* Makefile.in: Rebuilt.
boehm-gc:
* Makefile.am: Make a convenience library.
* Makefile.in: Rebuilt.
libjava:
Build a single libgcj.so, without separate gc and zlib libraries.
* configure.in: Use convenience libraries for boehm-gc and zlib. Set
SYS_ZLIBS if system zlib is used.
* configure: Rebuilt.
* Makefile.am: Use boehm-gc and zlib convenience libraries.
* Makefile.in: Rebuilt.
* libtool-version: Increment .so version number.
From-SVN: r50900
* Makefile.am (jv_convert_LDADD): Don't list libraries that are
already implicitly brought in from libgcj.la.
(gij_LDADD, rmic_LDADD, rmiregistry_LDADD): Likewise.
* Makefile.in: Rebuilt.
From-SVN: r50853
* verify.cc (state::NO_STACK): New constant.
(state::is_unmerged_ret_state): Handle case where stacktop is
NO_STACK.
(state::merge): Handle NO_STACK merges.
(handle_jsr_insn): Invalidate PC, and use special NO_STACK state
for instruction following jsr.
(stacktop, stackdepth): Removed unused variables.
(pop_jump): Ignore case where all remaining states are skipped.
From-SVN: r50526
libjava:
Hashtable synchronization for PowerPC.
* configure.in: Define SLOW_PTHREAD_SELF if configure.host set
slow_pthread_self. Set up symlink for sysdeps directory.
* configure: Rebuild.
* configure.host: Document more shell variables. Set sysdeps_dir
for most platforms. Set slow_pthread_self for i686. Set
enable_hash_synchronization_default and slow_pthread_self for PowerPC.
* posix-threads.cc (_Jv_ThreadSelf_out_of_line): Use release_set so
that memory barrier is emitted where required.
* prims.cc: 64-bit align static primitive class instances.
* include/posix-threads.h (_Jv_ThreadSelf for SLOW_PTHREAD_SELF): Add
read_barrier() to enforce ordering of reads.
* sysdep/powerpc/locks.h: New file. Implementation of synchronization
primitives for PowerPC.
* sysdep/i386/locks.h: New file. Synchronization primitives for i386
moved from natObject.cc.
* sysdep/alpha/locks.h: Likewise.
* sysdep/ia64/locks.h: Likewise.
* sysdep/generic/locks.h: Likewise.
* java/lang/natObject.cc: Move thread synchronization primitives to
system-dependent headers.
gcc/java:
* decl.c (java_init_decl_processing): Make sure class_type_node
alignment is not less than 64 bits if hash synchronization isenabled.
boehm-gc:
* include/gc_priv.h: Define ALIGN_DOUBLE on 32 bit targets if GCJ
support is enabled, for hash synchronization.
From-SVN: r50523
2002-03-09 Adam Megacz <adam@xwt.org>
* java/io/natFileDescriptorWin32.cc (read): Return -1 if zero
bytes read and no failure code returned.
From-SVN: r50519
2002-03-09 Adam Megacz <adam@xwt.org>
* java/lang/Win32Process.java (ConcreteProcess): Now throws an
IOException so that Throwable.printStackTrace fails correctly.
From-SVN: r50488
* java/io/natFileDescriptorEcos.cc (init): Don't use
GetStdHandle.
* java/io/natFileDescriptorPosix.cc (valid): Don't call stat if FD
is negative.
(init): Don't use GetStdHandle.
From-SVN: r50383
2002-03-04 Eric Blake <ebb9@email.byu.edu>
* scripts/unicode-decomp.pl: Move from chartables.pl, and remove
the code for generating include/java-chartables.h.
* scripts/unicode-blocks.pl: Move from scripts/blocks.pl, and
merge with Classpath.
* scripts/unicode-muncher.pl: Copy from Classpath.
* scritps/MakeCharTables.java: New file.
* gnu/gcj/convert/Blocks-3.txt: New file.
* gnu/gcj/convert/UnicodeData-3.0.0.txt: New file.
* gnu/gcj/convert/UnicodeCharacterDatabase-3.0.0.html: New file.
* gnu/java/lang/CharData.java: Copy from Classpath.
* Makefile.am (ordinary_java_source_files): Add
gnu/java/lang/CharData.java.
* configure.in: Remove --enable-fast-character option.
* java/lang/Character.java: Merge algorithms and Javadoc with
Classpath.
* java/lang/natCharacter.cc: Implement Unicode lookup table more
efficiently.
* include/java-chardecomp.h: Regenerate.
* include/java-chartables.h: Regenerate.
From-SVN: r50368
2002-02-26 Andreas Schwab <schwab@suse.de>
* acinclude.m4 (LIB_AC_PROG_CXX): Use glibjava_CXX instead of
glibcpp_CXX, since libjava uses even another CXX.
* aclocal.m4, configure: Regenerated.
From-SVN: r50084
2002-02-24 Adam Megacz <adam@xwt.org>
* java/net/natPlainDatagramSocketImpl.cc: Updated #includes
for Win32, changed #ifdefs to check WIN32 instead of the
(now-obsolete) USE_WINSOCK, and removed support for socket
timeouts on Win32 pending further discussion.
From-SVN: r50017
2002-02-24 Adam Megacz <adam@xwt.org>
* win32-threads.cc (_Jv_ThreadInitData): _Jv_Malloc instead of new
* win32-threads.cc (_Jv_ThreadDestroyData): _Jv_Free instead of
delete
From-SVN: r50014
2002-02-24 Adam Megacz <adam@xwt.org>
* java/lang/Win32Process.java: Created a dummy class to allow
build process to run to completion.
From-SVN: r50013
* java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA):
Define ffi_result union for ffi_call result. Cast
ffi_result members to jvalue.
From-SVN: r50007
* java/net/URL.java (getPath): New JDK 1.3 method.
* java/net/URLStreamHandler.java (parseURL):
It is wrong to prepend '/' to the file part of a relative url.
* java/net/URLStreamHandler.java (parseURL):
Minor optizations - append '/' rather than "/".
* java/net/URLStreamHandler.java (parseURL):
Don't canonicalize "xx/.." or "./" URLs - JDK doesn't.
We probably should canonicalize for a context-relative url, though.
* java/net/URL.java (sameFile): Delegate to URLStreamHandler.
* java/net/URLStreamHandler.java (canonicalizeFilename): New helper.
(sameFile): New method. Uses canonicalizeFilename.
From-SVN: r49980
* gnu/gcj/protocol/file/Connection.java (conect): Open the input
and/or output streams immediately here, instead of using File.exists.
(inputStream, outputStream): New fields to save open streams.
(getInputStream, getOutputStream): Use already-opened streams.
From-SVN: r49965
* acinclude.m4 (LIB_AC_PROG_CXX): Copied from libstdc++-v3.
Use it.
* Makefile.am (LIBLINK): Use CXX (and its tag) for linking.
* aclocal.m4, configure, Makefile.in: Rebuilt.
From-SVN: r49954
Fix for PR libgcj/5696:
* verify.cc (is_assignable_from_slow): Never call
_Jv_IsAssignableFrom.
(verify_instructions_0): Added new debug statement.
(state::print): Print information about whether local has
changed.
(state::merge): Don't call note_variable when merging locals.
(state::set_exception): Removed old FIXME comment.
From-SVN: r49886
Fix for PR libgcj/5695:
* verify.cc (is_assignable_from_slow): Check to see if target is
an Object before checking to see if source is an interface.
(verify_instructions_0) [op_invokeinterface]: Handle case where
we're making an interface call on Object.
From-SVN: r49783
2002-02-14 Mark Wielaard <mark@klomp.org>
* java/math/BigInteger.java: import gnu.java.math.MPN not the whole
package as a workaround for gcj 3.0.x
2002-02-14 Mark Wielaard <mark@klomp.org>
* java/security/BasicPermission.java: extends with fully qualified
classname as workaround for gcj 3.0.4.
2002-02-14 Eric Blake <ebb9@email.byu.edu>
* java/net/DatagramSocketImpl.java (setOption, getOption): Work
around gcj bug of wrong emitted qualifier for inherited method.
* java/net/SocketImpl.java (setOption, getOption): Ditto.
* java/util/WeakHashMap.java (WeakEntrySet): Add non-private
constructor to reduce amount of emitted bytecode. While this
happens to work around a jikes 1.15 bug, it is still a useful
patch even for correct compilers.
* java/rmi/server/RMIClassLoader.java (MyClassLoader): Ditto.
* gnu/java/rmi/server/UnicastRemoteCall.java
(DummyObjectOutputStream, DummyObjectInputStream): Ditto.
2002-02-14 Eric Blake <ebb9@email.byu.edu>
* java/net/DatagramSocketImpl.java: Reformat (no code changes).
* java/net/SocketImpl.java: Ditto.
* java/rmi/server/RMIClassLoader.java: Ditto.
* gnu/java/rmi/server/UnicastRemoteCall.java: Ditto.
2002-02-14 Mark Wielaard <mark@klomp.org>
Thanks to Takashi Okamoto
* java/util/Arrays.java (ArrayList.indexOf()): this.equals().
* java/util/Arrays.java (ArrayList.lastIndexOf()): Likewise.
* java/util/WeakHashMap.java (WeakEntry.getEntry()): this.get().
From-SVN: r49778
2002-02-13 Todd Stock <toddastock@yahoo.com>
Fix for PR libgcj/5670:
* verify.cc (is_assignable_from_slow): If `source' is interface,
recursively look for merge with `target'.
From-SVN: r49769
2002-02-13 Todd Stock <toddastock@yahoo.com>
Fix for PR libgcj/5671:
* verify.cc (state::merge): Handle case where we're merging
against an interface.
From-SVN: r49735
2002-02-12 Adam Megacz <adam@xwt.org>
* java/io/natFilePosix.cc: Copied this from natFile.cc.
* java/io/natFile.cc: Removed from repository.
* configure.in: Added AC_LINK_FILES for natFile${PLATFORM}.
From-SVN: r49700
* boehm.cc (initialized, obj_kind_x, obj_free_list): Removed unused
declarations.
(_Jv_InitGC): Don't bother locking, as this is always called from a
single-thread. Turn off GC_all_interior_pointers. Remove dead code.
From-SVN: r49695
2002-02-11 Adam Megacz <adam@xwt.org>
* java/io/natFileWin32.cc, java/io/natFileDescriptorWin32.cc:
Added #undef STRICT to make windows.h and
java/lang/reflect/Modifier.h cooperate.
From-SVN: r49692
2002-02-11 Adam Megacz <adam@xwt.org>
* exception.cc (_Jv_Throw, PERSONALITY_FUNCTION): Changed
std::abort() to simply abort(). Also added "fake" std::abort() so
we can #include unwind-pe.h without having to link against
libstdc++-v3.
From-SVN: r49685
2002-02-08 Martin Kahlert <martin.kahlert@infineon.com>
* jni.cc (_Jv_JNI_NewLocalRef): Make sure, that NULL frame is not
dereferenced.
(_Jv_JNI_AttachCurrentThread): Produce full featured env->locals
frame.
From-SVN: r49615
2002-02-06 Adam Megacz <adam@xwt.org>
* configure.in: Changed mingw) to *mingw*).
* win32.cc: Created this file.
* win32.h: Created this file.
* win32.cc, prims.cc, win32.h (win32_exception_handler): Moved
win32_exception_handler from prims.cc to win32.cc, added
header in win32.h.
* prims.cc: removed some #ifdef-WIN32'd headers which are no
longer needed now that we have platform.h
From-SVN: r49566
* verify.cc (type::isnull): New method.
(require_array_type): Handle case where array is null.
(verify_instructions_0) [op_arraylength]: Likewise.
From-SVN: r49555
2002-02-04 Adam Megacz <adam@xwt.org>
* win32.cc: Created it.
configure.in: Added PLATFORM_SPECIFIC_SOURCES,
which is set to posix.cc or win32.cc.
Makefile.am: Updated it to use $(PLATFORM_SPECIFIC_SOURCES).
From-SVN: r49509
* prims.cc
(_Jv_CreateJavaVM): We now use WIN32 instead of
USE_WIN32_SIGNALLING and USE_WINSOCK.
(win32_exception_handler): Now throws an exception out of
the signal handler; assumes SJLJ
From-SVN: r49429
* win32-threads.cc:
(_Jv_CondWait, _Jv_CondNotify, _Jv_CondNotifyAll): Corrected
wait() algorithm to make it safe.
(ensure_condvar_initialized, _Jv_CondInit, _Jv_CondDestroy):
Added lazy creation of Win32 Events for better performance
(really_start): This now uses GC_CreateThread so boehm-gc
knows about new threads even when statically linked.
From-SVN: r49428
2002-02-01 Adam Megacz <adam@xwt.org>
* include/win32-threads.h (_Jv_ConditionVariable_t): Now a struct, to
enable safer wait() algorithm.
(_Jv_CondWait, _Jv_CondInit, _Jv_CondDestroy, _Jv_CondNotify,
_Jv_CondNotifyAll): Implementations moved to win32-threads.cc.
(_Jv_MutexInit, _Jv_HaveMutexDestroy, _Jv_MutexUnlock,
_Jv_MutexLock, _Jv_ThreadYield): Reimplement using CRITICAL_SECTIONs
instead of mutex.
(_Jv_ThreadYield): Don't call Sleep(), because it crashes win98.
From-SVN: r49427
2002-02-01 Adam Megacz <adam@xwt.org>
* configure.in: Added support for mingw.
* java/lang/Win32Process.java: Created as empty file.
* java/lang/natWin32Process.cc: Created as empty file.
From-SVN: r49425
* verify.cc (state::enter_subroutine): New method.
(handle_jsr_insn): Use it.
(state::merge): When processing a `ret', correctly use
subroutine's state to determine which local variables have
changed.
(push_exception_jump): Don't let stack overflow.
From-SVN: r49388
gcc:
* gccbug.in: Follow GNU Coding Standards for --version. Use GCC
version rather than GNATS version in --version output.
gcc/f:
* g77spec.c (lang_specific_driver): Follow GNU Coding Standards
for --version.
gcc/java:
* gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
Follow GNU Coding Standards for --version.
libjava:
* gnu/gcj/convert/Convert.java: Only include one copyright year in
--version output.
From-SVN: r49372
* java/awt/GridLayout.java (layoutContainer): Use number of rows
to compute height of each cell, and number of columns to compute
width of each cell.
* java/awt/Window.java (getOwnedWindows): Don't return null.
* java/awt/FlowLayout.java (layoutContainer): Set width and height
of component. Increment x using horizontal gap, not vertical
gap.
From-SVN: r49320
* verify.cc (class _Jv_BytecodeVerifier): Removed `FIXME' comment
and to-do list.
(state::merge): Use current class' class loader.
(state::print): Print subroutine.
(state::merge): Don't look at subroutine of unmerged `ret'.
From-SVN: r49274
* java/awt/image/PixelGrabber.java (grabPixels()): Call grabPixels(0).
* java/awt/image/PixelGrabber.java (grabPixels(long)): Wait to be
notified that the ImageProducer has completed.
From-SVN: r49201
* Makefile.in: Rebuilt.
* Makefile.am (awt_java_source_files): Added new files.
* java/awt/Toolkit.java: Merged with Classpath.
* java/awt/PrintGraphics.java: New file from Classpath.
* java/awt/PrintJob.java: New file from Classpath.
* java/awt/datatransfer/Clipboard.java: New file from Classpath.
* java/awt/datatransfer/ClipboardOwner.java: New file from
Classpath.
* java/awt/datatransfer/DataFlavor.java: New file from Classpath.
* java/awt/datatransfer/FlavorMap.java: New file from Classpath.
* java/awt/datatransfer/MimeTypeParseException.java: New file from
Classpath.
* java/awt/datatransfer/StringSelection.java: New file from
Classpath.
* java/awt/datatransfer/SystemFlavorMap.java: New file from
Classpath.
* java/awt/datatransfer/Transferable.java: New file from
Classpath.
* java/awt/datatransfer/UnsupportedFlavorException.java: New file
from Classpath.
From-SVN: r49171
* Makefile.in: Rebuilt.
* Makefile.am (awt_java_source_files): Added new files.
* java/awt/image/AreaAveragingScaleFilter.java: New file from
Classpath.
* java/awt/image/CropImageFilter.java: New file from Classpath.
* java/awt/image/FilteredImageSource.java: New file from
Classpath.
* java/awt/image/ImageFilter.java: New file from Classpath.
* java/awt/image/MemoryImageSource.java: New file from Classpath.
* java/awt/image/PixelGrabber.java: New file from Classpath.
* java/awt/image/RGBImageFilter.java: New file from Classpath.
* java/awt/image/ReplicateScaleFilter.java: New file from
Classpath.
* java/awt/image/ImageProducer.java: Replaced with Classpath
version.
* java/awt/image/ImageObserver.java: Replaced with Classpath
version.
* java/awt/image/ImageConsumer.java: Replaced with Classpath
version.
* java/awt/GridBagConstraints.java (clone): Catch
CloneNotSupportedException.
From-SVN: r49157
* java/lang/reflect/natField.cc (setAddr): New function.
Calls getAddr and then checks that the field isn't final.
(setBoolean. setChar, setByte, setShort, setInt, setLong, setFloat,
setDouble, set): Use setAddr instead of getAddr, to check for FINAL.
(set): Call setAddr before check that new value has right type,
to better match specified semantics.
From-SVN: r49153
* java/net/natPlainSocketImpl.cc (_Jv_recv): Change return type of
function and of parameter recv_func to ssize_t, as specified by
POSIX.
From-SVN: r49020
* java/net/natPlainSocketImpl.cc: Include
IllegalArgumentException.h.
(_Jv_recv): New template function.
(BooleanClass): Removed.
(read): Use _Jv_recv.
(setOption): Use Boolean::class$. Throw exception if object is
not Boolean or Integer.
From-SVN: r48992
* java/awt/LayoutManager2.java: Merged with Classpath.
* java/awt/LayoutManager.java: Merged with Classpath.
* java/awt/GridLayout.java: Updated copyright and javadoc.
(getSize): Use `parent.ncomponents'. Handle insets.
(layoutContainer): Use `parent.ncomponents'. Handle case where
there are fewer children than columns. Correctly compute size of
each cell in the grid. Handle case where there isn't enough
space.
* java/awt/CardLayout.java (tab): Renamed from `map'. Updated
all users.
(gotoComponent): Use parent.ncomponents. Ensure child exists
before calling setVisible() on it. Last item is `num - 1', not
`num'.
(layoutContainer): Hoist invariants out of loop.
From-SVN: r48898
* gnu/java/rmi/rmic/RMIC.java (parseOptions): Handle --help and
--version. Recognize GNU-style long options. Print GNU-style
error messages.
(usage): Print GNU-style help. Exit with status 0.
(error): New method.
(run): Print error message if no class names found.
(main): Don't print usage on error.
From-SVN: r48740
* gnu/gcj/convert/Convert.java (error): Program is called
`jv-convert'. Print GNU-style message. Exit with status 1, not
-1.
(main): Handle --help and --version.
(help): New method.
(version): Likewise.
From-SVN: r48703
* Makefile.in: Rebuilt.
* Makefile.am (ordinary_java_source_files): Added new files.
* gnu/java/locale/LocaleInformation.java: Extend
LocaleInformation_en.
* gnu/java/locale/LocaleInformation_en.java: Added zone strings
and time/date formats.
* gnu/java/locale/LocaleInformation_en_US.java: Now automatically
generated.
* gnu/java/locale/LocaleInformation_af_ZA.java: New file.
* gnu/java/locale/LocaleInformation_ar_AE.java: New file.
* gnu/java/locale/LocaleInformation_ar_BH.java: New file.
* gnu/java/locale/LocaleInformation_ar_DZ.java: New file.
* gnu/java/locale/LocaleInformation_ar_EG.java: New file.
* gnu/java/locale/LocaleInformation_ar_IN.java: New file.
* gnu/java/locale/LocaleInformation_ar_IQ.java: New file.
* gnu/java/locale/LocaleInformation_ar_JO.java: New file.
* gnu/java/locale/LocaleInformation_ar_KW.java: New file.
* gnu/java/locale/LocaleInformation_ar_LB.java: New file.
* gnu/java/locale/LocaleInformation_ar_LY.java: New file.
* gnu/java/locale/LocaleInformation_ar_MA.java: New file.
* gnu/java/locale/LocaleInformation_ar_OM.java: New file.
* gnu/java/locale/LocaleInformation_ar_QA.java: New file.
* gnu/java/locale/LocaleInformation_ar_SD.java: New file.
* gnu/java/locale/LocaleInformation_ar_SY.java: New file.
* gnu/java/locale/LocaleInformation_ar_TN.java: New file.
* gnu/java/locale/LocaleInformation_ar_YE.java: New file.
* gnu/java/locale/LocaleInformation_be_BY.java: New file.
* gnu/java/locale/LocaleInformation_bn_IN.java: New file.
* gnu/java/locale/LocaleInformation_br_FR.java: New file.
* gnu/java/locale/LocaleInformation_bs_BA.java: New file.
* gnu/java/locale/LocaleInformation_ca_ES.java: New file.
* gnu/java/locale/LocaleInformation_cs_CZ.java: New file.
* gnu/java/locale/LocaleInformation_cy_GB.java: New file.
* gnu/java/locale/LocaleInformation_da_DK.java: New file.
* gnu/java/locale/LocaleInformation_de_AT.java: New file.
* gnu/java/locale/LocaleInformation_de_BE.java: New file.
* gnu/java/locale/LocaleInformation_de_CH.java: New file.
* gnu/java/locale/LocaleInformation_de_DE.java: New file.
* gnu/java/locale/LocaleInformation_de_LU.java: New file.
* gnu/java/locale/LocaleInformation_el_GR.java: New file.
* gnu/java/locale/LocaleInformation_en_AU.java: New file.
* gnu/java/locale/LocaleInformation_en_BW.java: New file.
* gnu/java/locale/LocaleInformation_en_CA.java: New file.
* gnu/java/locale/LocaleInformation_en_DK.java: New file.
* gnu/java/locale/LocaleInformation_en_GB.java: New file.
* gnu/java/locale/LocaleInformation_en_HK.java: New file.
* gnu/java/locale/LocaleInformation_en_IE.java: New file.
* gnu/java/locale/LocaleInformation_en_IN.java: New file.
* gnu/java/locale/LocaleInformation_en_NZ.java: New file.
* gnu/java/locale/LocaleInformation_en_PH.java: New file.
* gnu/java/locale/LocaleInformation_en_SG.java: New file.
* gnu/java/locale/LocaleInformation_en_ZA.java: New file.
* gnu/java/locale/LocaleInformation_en_ZW.java: New file.
* gnu/java/locale/LocaleInformation_es_AR.java: New file.
* gnu/java/locale/LocaleInformation_es_BO.java: New file.
* gnu/java/locale/LocaleInformation_es_CL.java: New file.
* gnu/java/locale/LocaleInformation_es_CO.java: New file.
* gnu/java/locale/LocaleInformation_es_CR.java: New file.
* gnu/java/locale/LocaleInformation_es_DO.java: New file.
* gnu/java/locale/LocaleInformation_es_EC.java: New file.
* gnu/java/locale/LocaleInformation_es_ES.java: New file.
* gnu/java/locale/LocaleInformation_es_GT.java: New file.
* gnu/java/locale/LocaleInformation_es_HN.java: New file.
* gnu/java/locale/LocaleInformation_es_MX.java: New file.
* gnu/java/locale/LocaleInformation_es_NI.java: New file.
* gnu/java/locale/LocaleInformation_es_PA.java: New file.
* gnu/java/locale/LocaleInformation_es_PE.java: New file.
* gnu/java/locale/LocaleInformation_es_PR.java: New file.
* gnu/java/locale/LocaleInformation_es_PY.java: New file.
* gnu/java/locale/LocaleInformation_es_SV.java: New file.
* gnu/java/locale/LocaleInformation_es_US.java: New file.
* gnu/java/locale/LocaleInformation_es_UY.java: New file.
* gnu/java/locale/LocaleInformation_es_VE.java: New file.
* gnu/java/locale/LocaleInformation_et_EE.java: New file.
* gnu/java/locale/LocaleInformation_eu_ES.java: New file.
* gnu/java/locale/LocaleInformation_fa_IR.java: New file.
* gnu/java/locale/LocaleInformation_fi_FI.java: New file.
* gnu/java/locale/LocaleInformation_fo_FO.java: New file.
* gnu/java/locale/LocaleInformation_fr_BE.java: New file.
* gnu/java/locale/LocaleInformation_fr_CA.java: New file.
* gnu/java/locale/LocaleInformation_fr_CH.java: New file.
* gnu/java/locale/LocaleInformation_fr_FR.java: New file.
* gnu/java/locale/LocaleInformation_fr_LU.java: New file.
* gnu/java/locale/LocaleInformation_ga_IE.java: New file.
* gnu/java/locale/LocaleInformation_gd_GB.java: New file.
* gnu/java/locale/LocaleInformation_gl_ES.java: New file.
* gnu/java/locale/LocaleInformation_gv_GB.java: New file.
* gnu/java/locale/LocaleInformation_he_IL.java: New file.
* gnu/java/locale/LocaleInformation_hi_IN.java: New file.
* gnu/java/locale/LocaleInformation_hr_HR.java: New file.
* gnu/java/locale/LocaleInformation_hu_HU.java: New file.
* gnu/java/locale/LocaleInformation_id_ID.java: New file.
* gnu/java/locale/LocaleInformation_it_CH.java: New file.
* gnu/java/locale/LocaleInformation_it_IT.java: New file.
* gnu/java/locale/LocaleInformation_iw_IL.java: New file.
* gnu/java/locale/LocaleInformation_ja_JP.java: New file.
* gnu/java/locale/LocaleInformation_ka_GE.java: New file.
* gnu/java/locale/LocaleInformation_kl_GL.java: New file.
* gnu/java/locale/LocaleInformation_ko_KR.java: New file.
* gnu/java/locale/LocaleInformation_kw_GB.java: New file.
* gnu/java/locale/LocaleInformation_lt_LT.java: New file.
* gnu/java/locale/LocaleInformation_lv_LV.java: New file.
* gnu/java/locale/LocaleInformation_mi_NZ.java: New file.
* gnu/java/locale/LocaleInformation_mk_MK.java: New file.
* gnu/java/locale/LocaleInformation_mr_IN.java: New file.
* gnu/java/locale/LocaleInformation_mt_MT.java: New file.
* gnu/java/locale/LocaleInformation_nl_BE.java: New file.
* gnu/java/locale/LocaleInformation_nl_NL.java: New file.
* gnu/java/locale/LocaleInformation_nn_NO.java: New file.
* gnu/java/locale/LocaleInformation_no_NO.java: New file.
* gnu/java/locale/LocaleInformation_oc_FR.java: New file.
* gnu/java/locale/LocaleInformation_pl_PL.java: New file.
* gnu/java/locale/LocaleInformation_pt_BR.java: New file.
* gnu/java/locale/LocaleInformation_pt_PT.java: New file.
* gnu/java/locale/LocaleInformation_ro_RO.java: New file.
* gnu/java/locale/LocaleInformation_ru_RU.java: New file.
* gnu/java/locale/LocaleInformation_ru_UA.java: New file.
* gnu/java/locale/LocaleInformation_se_NO.java: New file.
* gnu/java/locale/LocaleInformation_sk_SK.java: New file.
* gnu/java/locale/LocaleInformation_sl_SI.java: New file.
* gnu/java/locale/LocaleInformation_sq_AL.java: New file.
* gnu/java/locale/LocaleInformation_sr_YU.java: New file.
* gnu/java/locale/LocaleInformation_sv_FI.java: New file.
* gnu/java/locale/LocaleInformation_sv_SE.java: New file.
* gnu/java/locale/LocaleInformation_ta_IN.java: New file.
* gnu/java/locale/LocaleInformation_te_IN.java: New file.
* gnu/java/locale/LocaleInformation_tg_TJ.java: New file.
* gnu/java/locale/LocaleInformation_tl_PH.java: New file.
* gnu/java/locale/LocaleInformation_tr_TR.java: New file.
* gnu/java/locale/LocaleInformation_uk_UA.java: New file.
* gnu/java/locale/LocaleInformation_ur_PK.java: New file.
* gnu/java/locale/LocaleInformation_uz_UZ.java: New file.
* gnu/java/locale/LocaleInformation_vi_VN.java: New file.
* gnu/java/locale/LocaleInformation_yi_US.java: New file.
* gnu/java/locale/LocaleInformation_zh_CN.java: New file.
* gnu/java/locale/LocaleInformation_zh_HK.java: New file.
* gnu/java/locale/LocaleInformation_zh_SG.java: New file.
* gnu/java/locale/LocaleInformation_zh_TW.java: New file.
From-SVN: r48668
2002-01-08 Nic Ferrier <nferrier@tf1.tapsellferrier.co.uk>
* java/net/natPlainSocketImpl.cc: Added timeout handling for
sockets.
(close): New function closes the socket.
(write): New functions for output to socket.
(read): New functions for reading from socket.
* java/net/PlainSocketImpl.java: Glue for new timeout
implementation.
(write): Call the native impl.
(read): Likewise.
(getInputStream): Get a stream to read from the socket.
(getOutputStream): Get a stream to write to the socket.
From-SVN: r48662
Fix for PR java/5165:
* java/lang/natClassLoader.cc (_Jv_PrepareCompiledClass):
Convert any constant string field to a String; not just final
fields.
From-SVN: r48255
* java/awt/FlowLayout.java (FlowLayout(), FlowLayout(int)): Set
gaps to 5.
(FlowLayout(int,int,int)): Use methods to set fields.
(getSize): Skip invisible components.
(layoutContainer): Skip invisible components.
From-SVN: r48182
* include/jvm.h (__GCJ_JNI_IMPL__): Define.
* include/config.h.in: Rebuilt.
* configure: Rebuilt.
* configure.in: Define JV_HAVE_INTTYPES_H if inttypes.h found.
Added comment for HAVE_DLOPEN to avoid autoheader error.
* gcj/libgcj-config.h.in (JV_HAVE_INTTYPES_H): Added.
* include/jni.h: Include <gcj/libgcj-config.h>. Don't include
CNI-specific headers if we are compiling ordinary JNI code with a
C++ compiler. Include <inttypes.h> and JNIWeakRef.h when
appropriate.
* jni.cc: Don't include JNIWeakRef.h.
From-SVN: r48082
* java/lang/natClassLoader.cc (_Jv_InitNewClassFields): New
function.
(_Jv_NewClass): Use it.
(defineClass0): Use it.
* prims.cc (_Jv_InitPrimClass): Adjust vtable here.
(_Jv_InitPrimClass): Use _Jv_InitNewClassFields.
(_Jv_NewArray): Don't abort; just throw exception.
Include InternalError.h.
* java/lang/Class.h (Class::Class): Declare, don't define.
(Class): Declare _Jv_InitNewClassFields as a friend.
(union _Jv_Self): Removed.
From-SVN: r48081
gcc/java:
* java-tree.h (otable_methods, otable_decl, otable_syms_decl,
otable_type, otable_ptr_type, method_symbol_type,
method_symbols_array_type, method_symbols_array_ptr_type): New
field/global tree definitions.
(flag_indirect_dispatch): New flag.
* decl.c (java_init_decl_processing): Initialize new otable and
otable_syms type nodes and decls. Add new field "index" to
method_type_node.
* class.c (build_method_symbols_entry): New function.
(make_method_value): Set "index" to to method's vtable index for
virtual methods when indirect-dispatch is not used.
(make_class_data): For indirect-dispatch, dont emit the dtable_decl,
and set vtable_method_count to -1. Set otable and otable_syms field
if indirect-dispatch is used and there was something to put in them.
(build_method_symbols_entry): New function.
(emit_offset_symbol_table): New function.
* expr.c (get_offset_table_index): New function.
(build_invokevirtual): Build array reference to otable at the index
returned by get_offset_table_index, and use the result as the vtable
offset.
(build_invokeinterface): Similar.
* jcf-parse.c (yyparse): If indirect-dispatch, call
emit_offset_symbol_table at the end of compilation, after all classes
have been generated.
* jvspec.c: Don't pass findirect-dispatch to jvgenmain.
* lang.c (flag_indirect_dispatch): Define.
(lang_f_options): Add indirect-dispatch flag.
libjava:
* include/jvm.h (_Jv_VTable::idx_to_offset): New method.
* java/lang/natClassLoader.cc (_Jv_PrepareCompiledClass): Call
_Jv_MakeVTable and _Jv_LinkOffsetTable if needed.
* java/lang/Class.h (_Jv_Method): Add "index" field.
(_Jv_MethodSymbol): New struct type.
(_Jv_LinkOffsetTable, _Jv_LayoutVTableMethods, _Jv_SetVTableEntries,
_Jv_MakeVTable): Friends.
(otable, otable_syms): New Class fields.
* java/lang/natClass.cc (_Jv_LinkOffsetTable): New function.
(isVirtualMethod): New static function.
(_Jv_LayoutVTableMethods): New function.
(_Jv_SetVTableEntries): New function.
(_Jv_MakeVTable): New function.
From-SVN: r48038
2001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* java/util/BitSet.java (and): Fix off-by-one bug, don't skip part of
the bitset.
(andNot): Likewise.
(xor): Likewise.
2001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* java/util/LinkedList.java (LinkedListItr.add): Don't skip the next
entry.
2001-12-15 Eric Blake <ebb9@email.byu.edu>
* java/util/TreeMap.java (removeNode): Fix bug in node removal.
2001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* java/util/AbstractCollection.java (containsAll): Use size of the
correct collection for loop bound.
* java/util/AbstractList.java (iterator.next): Increment pos after
calling get on backing list.
(listIterator.next): Likewise.
* java/util/LinkedList.java (addLastEntry): Don't increment size before
checking for size == 0.
(addFirstEntry): Rearrange to match addLastEntry.
(add): Do not increment size before inserting the new entry.
* java/util/AbstractCollection.java (addAll): Use size of the
correct collection for loop bound.
2001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* java/util/AbstractSet.java (removeAll): Fix scoping thinko.
* java/util/HashMap.java (putAllInternal): Set size here.
* java/util/Hashtable.java (putAllInternal): New method. Copy contents
of a map efficiently without calling put() or putAll().
(Hashtable (map)): Use putAllInternal.
(clone): Likewise.
2001-12-15 Eric Blake <ebb9@email.byu.edu>
* java/util/Collections.java:
* java/util/Vector.java:
* java/util/WeakHashMap.java: Fix spelling errors.
2001-12-15 Eric Blake <ebb9@email.byu.edu>
* java/util/AbstractCollection.java (removeAllInternal),
(retainAllInternal): Add hooks for use by ArrayList.
* java/util/AbstractList.java: Minor code updates. Fix some
scoping.
* java/util/AbstractMap.java: ditto
* java/util/ArrayList.java (readObject, writeObject): ditto
(removeAllInternal, retainAllInternal): Optimize.
* java/util/Arrays.java: ditto
* java/util/Collections.java: ditto. Change order of parameters
to equals(Object, Object) to match specs.
* java/util/Dictionary.java: Improve javadoc.
(Dictionary): Add explicit constructor.
* java/util/HashMap.java: Improve javadoc. Rearrange methods to
follow order in JDK. Cleanups related to recent code migration to
AbstractMap. Fix some scoping.
(entrySet): Cache the result.
(modCount): Ensure that this is updated correctly.
* java/util/HashSet.java: Improve javadoc. Fix some scoping.
(init): Add hooks for LinkedHashSet.
(map): Use "" instead of Boolean.TRUE in backing map. Use
package-private API where possible for less overhead.
(readObject, writeObject): Fix serialization.
* java/util/Hashtable.java: Improve javadoc. Fix some scoping.
(entrySet, keySet, values): Cache the result.
(modCount): Ensure that this is updated correctly.
(contains, remove): Fix NullPointer checking to match specs.
(class Enumeration): Make more like HashIterator.
* java/util/IdentityHashMap.java: Minor code updates.
(modCount): Ensure that this is updated correctly.
(readObject, writeObject): Fix serialization.
* java/util/LinkedHashMap.java: Minor code updates. Cleanups
related to recent code migration to AbstractMap.
* java/util/LinkedHashSet.java: New file.
* java/util/LinkedList.java:
(readObject, writeObject): Fix serialization.
* java/util/Makefile.am: List recently added files.
* java/util/Stack.java: Minor code updates.
* java/util/TreeMap.java: Improve javadoc. Overhaul the class to
be more efficient. Fix some scoping. Rearrange the methods.
(nil): Ensure that this can be thread-safe, and make it a static
final. Initialize it to be more useful as a sentinal node.
(Node): Specify color in constructor.
(deleteFixup, insertFixup): Improve comments and algorithm.
(fabricateTree): Redesign with less overhead.
(lowestGreaterThan): Add parameter first to make SubMap easier.
(removeNode): Patch hole where nil was being modified. Choose
predecessor instead of successor so in-place swap works.
(class VerifyResult, verifyTree, verifySub, verifyError): Remove
this dead code after verifying the class works.
(class SubMap): Rewrite several algorithms to avoid problems with
comparing nil.
* java/util/TreeSet.java: Improve javadoc. Fix some scoping.
(clone): Fix ClassCastException when cloning subSet().
(readObject, writeObject): Fix serialization.
* java/util/WeakHashMap.java: Improve javadoc. Fix some scoping.
(NULL_KEY): Make it compare as null, for ease elsewhere.
(Class WeakEntry): Rename from Entry, to avoid shadowing
Map.Entry. Add missing toString.
(modCount): Ensure that this is updated correctly.
(clear, containsValue, keySet, putAll, values, WeakHashMap(Map)):
Add missing methods and constructor.
2001-12-15 Eric Blake <ebb9@email.byu.edu>
* java/util/ArrayList.java (checkBoundExclusive),
(checkBoundInclusive): Rename from range??clusive, to match
AbstractList.
* java/util/LinkedList.java (checkBoundsExclusive),
(checkBoundsInclusive): ditto
* java/util/Vector.java (checkBoundExclusive),
(checkBoundInclusive): Move bounds checking into common methods.
2001-12-15 Eric Blake <ebb9@email.byu.edu>
* java/util/AbstractList.java:
(modCount): Make sure it is updated in all needed places.
* java/util/ArrayList.java: Improve javadoc. Implements
RandomAccess. Add serialVersionUID. Reorder methods.
(modCount): Make sure it is updated in all needed places.
(rangeExclusive, rangeInclusive): Add common methods for bounds
check.
(isEmpty): Add missing method.
* java/util/Collections.java: (class SynchronizedList): Make
package visible.
* java/util/ConcurrentModificationException.java: Improve
javadoc.
* java/util/EmptyStackException.java: Improve javadoc.
* java/util/LinkedList.java: Improve javadoc.
(modCount): Make sure it is updated in all needed places.
(rangeExclusive, rangeInclusive): Add common methods for bounds
check.
* java/util/NoSuchElementException.java: Improve javadoc.
* java/util/Stack.java: Improve javadoc. Fix synchronization
issues.
(modCount): Make sure it is updated in all needed places.
* java/util/Vector.java: Improve javadoc. Fix synchronization
issues. Implements RandomAccess. Reorder methods.
(modCount): Make sure it is updated in all needed places.
(setSize): Fix according to specifications: this does not dictate
the backing array size.
(removeAll, retainAll): Faster implementations.
2001-12-15 Eric Blake <ebb9@email.byu.edu>
* java/util/BitSet.java: Improve javadoc.
(cardinality(), clear(), clear(int, int), flip(int)),
(flip(int, int), get(int, int), intersects(BitSet), isEmpty()),
(nextClearBit(int), nextSetBit(int), set(int, boolean)),
(set(int, int), set(int, int, boolean)): Add new JDK 1.4 methods.
(clone): Fix so subclasses clone correctly.
2001-12-15 Eric Blake <ebb9@email.byu.edu>
* java/util/AbstractCollection.java: Improve javadoc.
(AbstractCollection()): Make constructor protected.
(equals(Object, Object), hashCode(Object)): Add utility methods.
* java/util/AbstractList.java: Improve javadoc.
(AbstractList()): Make constructor protected.
(indexOf(Object)): Call listIterator(), not listIterator(int).
(iterator()): Follow Sun's requirement to not use listIterator(0).
(listIterator(int)): Make AbstractListItr anonymous.
(subList(int, int)): Add support for RandomAccess.
(SubList.add(int, Object), SubList.remove(Object)): Fix bug with
modCount tracking.
(SubList.addAll(Collection)): Add missing method.
(SubList.listIterator(int)): Fix bugs in indexing, modCount
tracking.
(class RandomAccessSubList): Add new class.
* java/util/AbstractMap.java: Improve javadoc.
(keys, values, KEYS, VALUES, ENTRIES): Consolidate common map
fields.
(AbstractMap()): Make constructor protected.
(equals(Object, Object), hashCode(Object)): Add utility methods.
(equals(Object)): Change algorithm to
entrySet().equals(m.entrySet()), as documented by Sun.
(keySet(), values()): Cache the collections.
* java/util/AbstractSequentialList.java: Improve javadoc.
(AbstractSequentialList()): Make constructor protected.
* java/util/AbstractSet.java: Improve javadoc.
(AbstractSet()): Make constructor protected.
(removeAll(Collection)): Add missing method.
* java/util/Arrays.java: Improve javadoc, rearrange method orders.
(defaultComparator): Remove, in favor of
Collections.compare(Object, Object, Comparator).
(binarySearch, equals, sort): Fix natural order comparison of
floats and doubles. Also improve Object comparison - when
comparator is null, use natural order.
(fill, sort): Add missing checks for IllegalArgumentException.
(sort, qsort): Fix sorting bugs, rework the code for more
legibility.
(mergeSort): Inline into sort(Object[], int, int, Comparator).
(class ArrayList): Rename from ListImpl, and make compatible with
JDK serialization. Add methods which more efficiently override
those of AbstractList.
* java/util/Collections: Improve javadoc.
(isSequential(List)): Add and use a method for deciding between
RandomAccess and sequential algorithms on lists.
(class Empty*, class Synchronized*, class Unmodifiable*): Make
compliant with JDK serializability.
(class Singleton*, class CopiesList, class RevereseComparator),
(class UnmodifiableMap.UnmodifiableEntrySet),
(class *RandomAccessList): New classes for serial compatibility.
(class Empty*, class Singleton*, class CopiesList): Add methods
which more efficiently override those of Abstract*.
(search): Inline into binarySearch(List, Object, Comparator).
(binarySearch): Make sequential search only do log(n) comparisons,
instead of n.
(copy(List, List)): Do bounds checking before starting.
(indexOfSubList, lastIndexOfSubList, list, replaceAll, rotate),
(swap): Add new JDK 1.4 methods.
(binarySearch, max, min, sort): Allow null comparator to represent
natural ordering.
(reverse(List)): Avoid unnecessary swap.
(shuffle(List, Random)): Do shuffle in-place for RandomAccess
lists.
(SingletonList.get): Fix logic bug.
(SingletonMap.entrySet): Make the entry immutable, and cache the
returned set.
(SynchronizedCollection, SynchronizedMap, UnmodifiableCollection),
(UnmodifiableMap): Detect null pointer in construction.
(SynchronizedMap, UnmodifiableMap): Cache collection views.
* java/util/BasicMapEntry: Improve javadoc.
From-SVN: r48035
* libjava/prims.cc: Some old cleanups. The collector now
handles test for out of memory.
* libjava/prims.cc, libjava/gcj/javaprims.h:
(_Jv_AllocObjectNoInitNoFinalizer, _Jv_AllocObjectNoFinalizer):
New functions for finalizer-free allocation.
(jvmpi_notify_alloc): Became separate function.
* libjava/java/lang/Object.h, libjava/include/jvm.h: Adjust for
revised vtable layout on IA64. With TARGET_VTABLE_USES_DESCRIPTORS,
there is only one extra descriptor.
From-SVN: r48002
* resolve.cc (_Jv_PrepareClass): Verify method here...
* defineclass.cc (handleMethodsEnd): ... not here.
* verify.cc (_Jv_BytecodeVerifier::initialize_stack): New method.
(_Jv_BytecodeVerifier::verify_instructions_0) [op_return]: Ensure
there are no uninitialized objects.
(_Jv_BytecodeVerifier::state::this_type): New field.
(_Jv_BytecodeVerifier::state::state): Initialize this_type.
(_Jv_BytecodeVerifier::state::copy): Copy this_type.
(_Jv_BytecodeVerifier::state::merge): Merge this_type.
(_Jv_BytecodeVerifier::state::check_no_uninitialized_objects):
Handle this_type.
(_Jv_BytecodeVerifier::state::check_this_initialized): New
method.
(_Jv_BytecodeVerifier::state::set_initialized): Handle this_type.
(_Jv_BytecodeVerifier::state::set_this_type): New method.
(_Jv_BytecodeVerifier::verify_instructions_0) [op_putfield]: Allow
assignment to fields of `this' before another initializer is run.
From-SVN: r47826
* Makefile.in: Rebuilt.
* Makefile.am (java/lang/reflect/Method.h): ObjectInputStream now
a friend.
* java/lang/natClass.cc (getSignature): Only look at elements of
non-null parameters.
(getPrivateMethod): Removed old FIXME comment.
* java/io/natObjectInputStream.cc (allocateObject): Removed old
FIXME comment.
(callConstructor): Simply use `NULL' for value of parameters.
(ObjectClass): Removed.
(ClassClass): Likewise.
* java/io/ObjectInputStream.java (readObject): Fixed typo.
From-SVN: r47800
* verify.cc (_Jv_BytecodeVerifier::type_val): Added
unused_by_subroutine_type.
(_Jv_BytecodeVerifier::type::merge): Handle
unused_by_subroutine_type.
(_Jv_BytecodeVerifier::state::state): Added `ret_semantics'
argument.
(_Jv_BytecodeVerifier::state::copy): Likewise.
(_Jv_BytecodeVerifier::push_jump_merge): Pass `ret_semantics' to
state constructor.
(_Jv_BytecodeVerifier::state::is_unmerged_ret_state): New method.
(_Jv_BytecodeVerifier::pop_jump): Don't accept a jump which is
from an unmerged ret.
(_Jv_BytecodeVerifier::verify_instructions_0): Don't let an
unmerged ret state skip verification in the fall-through case.
(debug_print): New function.
(_Jv_BytecodeVerifier::type::print): New method.
(_Jv_BytecodeVerifier::state::print): New method.
(_Jv_BytecodeVerifier::push_jump_merge): Print state.
(_Jv_BytecodeVerifier::verify_instructions_0): Likewise.
(_Jv_BytecodeVerifier::get_variable): Don't call note_variable.
(_Jv_BytecodeVerifier::_Jv_BytecodeVerifier): Print debug
information.
From-SVN: r47734
* verify.cc (_Jv_BytecodeVerifier::linked_utf8): New structure.
(_Jv_BytecodeVerifier::utf8_list): New field.
(_Jv_BytecodeVerifier::_Jv_BytecodeVerifier): Initialize it.
(_Jv_BytecodeVerifier::~_Jv_BytecodeVerifier): Free it.
(_Jv_BytecodeVerifier::make_utf8_const): New method.
(_Jv_BytecodeVerifier::get_one_type): Use it.
(_Jv_BytecodeVerifier::type::merge): When using local semantics,
if the destination type is already unsuitable then we didn't
change.
From-SVN: r47634
* defineclass.cc (read_one_method_attribute): `end_pc' for an
exception can be equal to code length.
* verify.cc (_Jv_BytecodeVerifier::verify_instructions_0): Removed
`start_PC' from error invocation where it didn't make sense, and
updated error message. Use `copy' to copy a state. Only try to
merge current state with saved state when we've fallen through
from the previous instruction.
(_Jv_BytecodeVerifier::pop_ref_or_return): New method.
(_Jv_BytecodeVerifier::verify_instructions_0) [op_astore_0]: Use
pop_ref_or_return.
(_Jv_BytecodeVerifier::verify_instructions_0) [op_astore]:
Likewise.
(_Jv_BytecodeVerifier::push_jump_merge): Pass max_locals, not
max_stack, to merge.
(_Jv_BytecodeVerifier::verify_instructions_0): Likewise.
(_Jv_BytecodeVerifier::push_jump_merge): Merge from new state into
state at branch target, not vice versa.
(_Jv_BytecodeVerifier::branch_prepass): Allow end of exception to
be equal to code length. Removed redundant test to see if
exception start is after exception end.
(_Jv_BytecodeVerifier::verify_instructions_0): Type of argument to
`finally' is Throwable.
From-SVN: r47623
* Makefile.am (nat_headers, x_nat_headers): Depend on .class files, not
libgcj.jar.
(nat_files, x_nat_files): Build native files in subdirectories using
the same dependency options as the java files.
(gnu/gcj/runtime/FirstThread.h): Remove explicit rule and friend
declarations.
* configure.in: Put dependencies for .cc files in deps.mak.
* Makefile.in: Rebuilt.
* configure: Rebuilt.
From-SVN: r47471
* verify.cc (_Jv_BytecodeVerifier::branch_prepass): Use
java_opcode as type for switch.
[op_wide]: Likewise.
(_Jv_BytecodeVerifier::verify_instructions_0): Likewise.
[op_invokevirtual]: Likewise.
* include/java-insns.h (java_opcode): Give enum a name.
From-SVN: r47330
* verify.cc (_Jv_BytecodeVerifier::branch_prepass) [op_iinc]:
Uses two operand bytes, not one.
[op_arraylength]: Has no operands in bytecode.
(_Jv_BytecodeVerifier::push_jump): Fixed call to
check_no_uninitialized_objects.
(_Jv_BytecodeVerifier::push_exception_jump): Likewise.
(_Jv_BytecodeVerifier::handle_ret_insn): Likewise.
(_Jv_BytecodeVerifier::handle_jsr_insn): Likewise.
From-SVN: r47202
* verify.cc (_Jv_BytecodeVerifier::require_array_type): Special
case for boolean arrays.
* verify.cc (_Jv_BytecodeVerifier::compute_jump): Put PC into
error message.
From-SVN: r47190
* verify.cc: Include StringBuffer.h.
(verify_fail): Added pc argument. Use StringBuffer to construct
exception message.
(_Jv_BytecodeVerifier::verify_instructions_0): Put PC into error
message.
(_Jv_BytecodeVerifier::check_return_type): Likewise.
(_Jv_BytecodeVerifier::handle_field_or_method): Likewise.
(_Jv_BytecodeVerifier::check_constant): Likewise.
(_Jv_BytecodeVerifier::check_class_constant): Likewise.
(_Jv_BytecodeVerifier::check_pool_index): Likewise.
(_Jv_BytecodeVerifier::get_variable): Likewise.
(_Jv_BytecodeVerifier::branch_prepass): Likewise. Also, correctly
check exception handler endpoint.
(_Jv_BytecodeVerifier::verify_instructions_0): Correctly handle
wide arguments to current method.
(_Jv_BytecodeVerifier::check_wide_constant): New method.
(_Jv_BytecodeVerifier::verify_instructions_0) [op_ldc2_w]: Use
it.
From-SVN: r47155
* verify.cc (_Jv_BytecodeVerifier::is_assignable_from_slow): New
method.
(type::compatible): Use it.
(type::merge): Likewise.
(type::promote): Return a `type&'.
(get_one_type): Promote return value.
From-SVN: r47097
* java/lang/Integer.java (getInteger): Attempt to decode the value
of the system property instead of the name of the system property.
(parseInt): Throw NumberFormatException explicitly in the case of
a null argument in keeping with JDK 1.3.
From-SVN: r47095
* java/util/Timer.java (TaskQueue.isStopped): Remove method.
(Scheduler.run): Try to re-schedule task and ignore exception if
queue has been stopped.
From-SVN: r47093
* java/lang/reflect/Modifier.java: Reindented.
(toString): Only trim trailing space if text was added to
StringBuffer.
* java/lang/reflect/ReflectPermission: Reindented.
From-SVN: r47028
* java/lang/Double.java (parseDouble): Fixed ordering of
modifiers.
* java/lang/reflect/AccessibleObject.java: Javadoc, reindented.
* java/lang/reflect/Member.java: Reindented.
* java/lang/reflect/Modifier.java: Reindented.
(toString): Only trim trailing space if text was added to
StringBuffer.
* java/util/ConcurrentModificationException.java: Javadoc
updates.
* java/util/EmptyStackException.java: Likewise.
* java/util/NoSuchElementException.java: Likewise.
From-SVN: r47018
Fix for PR libgcj/4859:
* java/util/Timer.java (TaskQueue.isStopped): New method.
(Scheduler.run): Don't re-schedule task if queue has been
stopped.
From-SVN: r46994
2001-11-02 Hans Boehm <Hans_Boehm@hp.com>
* java/util/natResourceBundle.cc:getClassContext: return
array of Class instead of array of ClassLoader.
From-SVN: r46727