Commit Graph

807 Commits

Author SHA1 Message Date
Bryce McKinlay f24dbacf85 Vector.java (ensureCapacity): Don't increment modCount.
2000-11-27  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/util/Vector.java (ensureCapacity): Don't increment modCount.
	(addElement): Don't increment elementCount twice. Doh.
	* java/util/ArrayList.java (add): Only call ensureCapacity if the
	array needs to be expanded.
	(addAll): Ditto.
	* java/util/Collections.java (UnmodifiableCollection): Implement
	toString().
	(UnmodifiableList): Throw UnsupportedOperationException from
	modification methods. Set `l' from the one-parameter constructor.
	(UnmodifiableMap): Implement toString().
	(SynchronizedCollection): Ditto.
	(SynchronizedList): Set `l' from the one-parameter constructor.
	(SynchronizedSortedSet): Set `ss' from the one-parameter constructor.
	(SynchronizedMap): Implement toString().

From-SVN: r37785
2000-11-27 08:30:26 +00:00
Anthony Green ea8136058d Replace stubs with actual implementation
From-SVN: r37782
2000-11-27 06:50:18 +00:00
Anthony Green e36b9711fb More JNDI changes.
From-SVN: r37779
2000-11-27 05:57:58 +00:00
Bryce McKinlay 68d8c9e3bd Forgot to commit these ChangeLog entries.
From-SVN: r37773
2000-11-27 04:09:54 +00:00
Tom Tromey 0cf17a8051 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (core_java_source_files): Added
	RuntimePermission.java.
	* java/lang/RuntimePermission.java: Imported from Classpath.
	* java/lang/Thread.java (getContextClassLoader): Now
	synchronized.  Added security code.
	(setContextClassLoader): Likewise.

From-SVN: r37772
2000-11-27 04:07:48 +00:00
Tom Tromey 2721806e98 prims.cc (_Jv_NewObjectArray): Use const_cast to initialize length field of array.
* prims.cc (_Jv_NewObjectArray): Use const_cast to initialize
	length field of array.
	(_Jv_NewPrimArray): Likewise.
	* gcj/array.h (__JArray): `length' field now const.  Added
	constructor.

From-SVN: r37771
2000-11-27 04:05:23 +00:00
Anthony Green 18205ca3b6 Initial jndi check-in
From-SVN: r37770
2000-11-27 03:16:14 +00:00
Anthony Green 33c9e2c228 Forgot to commit this ChangeLog
From-SVN: r37752
2000-11-26 07:53:15 +00:00
Tom Tromey ad86a903a2 prims.cc (_Jv_NewObjectArray): Use palcement new to create array.
* prims.cc (_Jv_NewObjectArray): Use palcement new to create
	array.
	(_Jv_NewPrimArray): Likewise.
	Include <new>.
	* gcj/array.h (__JArray): `length' field now const.  Added
	constructor.
	(class JArray): Added constructor.

From-SVN: r37718
2000-11-24 21:02:36 +00:00
Mark Wielaard abb32cf595 name-finder.cc (lookup): Check for a NULL _Jv_argv before attempting lookup.
2000-11-23  Mark Wielaard  <mark@klomp.org>

	* name-finder.cc (lookup): Check for a NULL _Jv_argv before
	attempting lookup.

From-SVN: r37687
2000-11-23 05:45:47 +00:00
Bryce McKinlay ebb66eb5fa Vector.java: Improve exception messages.
2000-11-23  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/util/Vector.java: Improve exception messages.
	(Vector): Check initialCapacity for IllegalArgumentException.
	(tromToSize): Don't check for elementCount == elementData.length
	case.
	(toArray): Don't try to set null marker if target array is the same
	length as the vector.

From-SVN: r37685
2000-11-23 05:18:41 +00:00
Bryce McKinlay 79af883cd4 Makefile.in: Rebuilt.
2000-11-22  Bryce McKinlay  <bryce@albatross.co.nz>

	* Makefile.in: Rebuilt.
	* Makefile.am (core_java_source_files): Added Collections.java.
	* java/util/List.java: Merged from classpath.
	* java/util/Vector.java: Ditto.
	* java/util/Collections.java: From classpath.
	* java/util/ArrayList.java (addAll(Collection)): Call
	addAll(int,Collection) instead of duplicating code.
	(indexOf): Clean up int initialization.
	(clear): Set cleared array entries to null, to allow garbage
	collection.
	* java/util/List.java: Minor formatting fixes.
	* java/util/SimpleTimeZone.java: ditto.

From-SVN: r37652
2000-11-22 11:59:59 +00:00
Tom Tromey 4de5a4d99a Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (core_java_source_files): Added new files.
	* java/lang/reflect/ReflectPermission.java: New class.
	* java/io/FileFilter.java: From Classpath
	* java/io/FilePermission.java: From Classpath.

From-SVN: r37586
2000-11-20 18:25:41 +00:00
Tom Tromey f967de33d7 AccessibleObject.java (isAccessible, [...]): Now public.
* java/lang/reflect/AccessibleObject.java (isAccessible,
	setAccessible): Now public.

From-SVN: r37540
2000-11-18 02:30:29 +00:00
Tom Tromey 9839499072 natString.cc: Include Locale.h.
* java/lang/natString.cc: Include Locale.h.
	(toUpperCase): Added `locale' argument.  Handle locale
	sensitivity.
	(toLowerCase): Added `locale' argument.  Handle locale
	sensitivity.
	(ESSET, CAPITAL_S, SMALL_I, CAPITAL_I_WITH_DOT, SMALL_DOTLESS_I,
	CAPITAL_I): New defines.
	* java/lang/String.java (CASE_INSENSITIVE_ORDER): Now public and
	final.
	Import Locale.
	(toUpperCase, toLowerCase): New methods.  Variants which accept
	locale now native.

	* java/lang/ExceptionInInitializerError.java (printStackTrace):
	New methods.

	* java/util/PropertyPermission.java: Re-merged from Classpath.

	* java/text/RuleBasedCollator.java (getCollationElementIterator):
	New method.
	* java/text/StringCharacterIterator.java: Reindented.
	(setText): New method.

From-SVN: r37539
2000-11-18 02:29:13 +00:00
Mark Wielaard c5f651bf3f backport: *.java: Reformat all to unofficial standard coding style.
Merge with Classpath (changes by Bryce McKinlay)
	* java/util/jar/*.java: Reformat all to unofficial standard coding
	style. No changes of substance.

From-SVN: r37538
2000-11-18 02:00:06 +00:00
Mark Wielaard 4f21aedbf4 * java/util/zip/*.java: Javadoc and copyright updates.
From-SVN: r37526
2000-11-17 21:42:28 +00:00
Tom Tromey 4cdfd292e3 CollationKey.java: Implement Comparable.
* java/text/CollationKey.java: Implement Comparable.
	(compareTo(Object)): New method.
	* java/text/Collator.java (compare(Object,Object)): New method.
	Implement Comparator.

	* java/util/zip/InflaterInputStream.java (available): New method.
	(close): New method.
	(read, available, skip, fill): Throw exception if stream closed.
	* java/util/zip/ZipInputStream.java (read, skip, readFully, fill,
	getNextEntry): Throw exception if closed.

From-SVN: r37525
2000-11-17 20:44:03 +00:00
Warren Levy 3cd22508eb PropertyChangeSupport.java (propertyListeners): Made transient.
* java/beans/PropertyChangeSupport.java (propertyListeners): Made
	transient.
	(listeners): Made transient.
	(source): Renamed from 'bean'.
	(children): New field for serialization.
	(propertyChangeSupportSerializedDataVersion): Ditto.
	(serialVersionUID): Ditto.
	(writeObject): New serialization method.
	(readObject): New serialization method.
	* java/beans/VetoableChangeSupport.java (propertyListeners): Made
	transient.
	(listeners): Made transient.
	(source): Renamed from 'bean'.
	(children): New field for serialization.
	(vetoableChangeSupportSerializedDataVersion): Ditto.
	(serialVersionUID): Ditto.
	(writeObject): New serialization method.
	(readObject): New serialization method.
	* java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Fixed assert
	to allow constructor to have a return type (i.e. the class that the
	constructor constructs).

Serialization mods.

From-SVN: r37506
2000-11-16 21:34:48 +00:00
Tom Tromey 09ad474947 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (libgcj.zip): Fail immediately if compilation fails
	and -k not given.

From-SVN: r37464
2000-11-14 18:59:10 +00:00
Warren Levy a53785f90e ObjectInputStream.java (readObject): Added code to conditionally dump out the serialized data.
* java/io/ObjectInputStream.java (readObject): Added code to
	conditionally dump out the serialized data.
	Handle ENDBLOCKDATA case a bit more gracefully since the current
	behavior doesn't seem to work as expected.
	(readStreamHeader): Added code for serialized data dumper.
	(readNextBlock): Ditto.
	(readFields): Ditto.
	(dump): New private static field for turning on/off dumper.
	(setDump): New native method.
	(dumpElement): New native method.
	(dumpElementln): New native method.
	* java/io/natObjectInputStream.cc (setDump): New method.
	(dumpElement): New method.
	(dumpElementln): New method.

Serialization dumper.  Enable by configuring with --enable-libgcj-debug
and calling java.io.ObjectInputStream.setDump(true) in your test program.
The output will be generated as the object is deserialized (i.e. the
readObject() method is executed).

From-SVN: r37223
2000-11-03 08:04:33 +00:00
Warren Levy 6678181b3c InetAddress.java (addr): Renamed from 'address'.
* java/net/InetAddress.java (addr): Renamed from 'address'.
	(address): New field to match Serialized Form doc.
	(hostName): Renamed from 'hostname' to match Serialized Form doc.
	(family): New serialization field.
	(serialVersionUID): New field.
	(readObject): New method.
	(writeObject): New method.
	(getFamily): New native method.
	(InetAddress): Set family.
	* java/net/natInetAddress.cc (getFamily): New method.
	(addr): Renamed from 'address'.
	(hostName): Renamed from 'hostname' to match Serialized Form doc.
	* java/net/natPlainDatagramSocketImpl.cc (addr): Renamed from 'address'.
	* java/net/natPlainSocketImpl.cc (addr): Renamed from 'address'.

Serialization mod.

From-SVN: r37222
2000-11-03 07:43:06 +00:00
Bryce McKinlay 8d218b6742 AbstractList.java (SubList): Make it a top-level private class.
2000-11-03  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/util/AbstractList.java (SubList): Make it a top-level private
	class.
	* java/util/LinkedList.java (remove): Do update modCount and
	knownMod.
	(add): Ditto.
	* Makefile.am (ordinary_java_source_files): Add LinkedList.java.
	* Makefile.in: Rebuilt.

From-SVN: r37218
2000-11-03 03:58:05 +00:00
Tom Tromey aca46e2a90 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (install-exec-hook): Make `.la' link, not `.so'
	link.

From-SVN: r37210
2000-11-02 20:33:05 +00:00
Bryce McKinlay 0ad35392f4 AbstractList.java (remove): Comment out modCount increment to work around compiler bug.
2000-11-02  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/util/AbstractList.java (remove): Comment out modCount
	increment to work around compiler bug.
	(add): Ditto.

From-SVN: r37204
2000-11-02 10:17:15 +00:00
Bryce McKinlay 7177dab5c9 AbstractList.java: Throw messages with IndexOutOfBoundsExceptions.
2000-11-02  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/util/AbstractList.java: Throw messages with
	IndexOutOfBoundsExceptions.
	 (listIterator()): Call listIterator(0).
	(size): New field. Initialize to size().
	(hasNext): Test position against size, not size().
	(remove): Increment knownMod by one instead of resetting it from
	modCount.
	(add): Ditto.
	(SubList.upMod): Removed.
	(SubList.set): Don't call upMod() or update knownMod.
	(SubList.add(int,Object)): Increment modCount instead of calling
	upMod().
	(SubList.remove): Ditto.
	(SubList.addAll): Don't call backingList.size(). Increment size from
	c.size().
	(SubList.iterator): New method. Call listIterator(0).
	(SubList.listIterator): New method. Restore code to return an
	anonymous listIterator implementation (with some changes).
	* java/util/AbstractSequentialList.java: Throw messages with
	IndexOutOfBoundsExceptions.
	(addAll): Add a specnote.
	* java/util/ArrayList.java (removeRange): Get the math right.
	(addAll): Increment modCount _before_ creating iterator.
	* java/util/LinkedList.java: Rewritten, mostly.

From-SVN: r37203
2000-11-02 10:08:03 +00:00
Tom Tromey f92351d76e encodings.pl: Added `ASCII' alias.
* scripts/encodings.pl: Added `ASCII' alias.
	* Makefile.in: Rebuilt.
	* Makefile.am (convert_source_files): Added new files.
	* gnu/gcj/convert/Input_ASCII.java: New file.
	* gnu/gcj/convert/Output_ASCII.java: New file.
	* gnu/gcj/convert/Output_8859_1.java (write): Use `?' to represent
	out-of-range characters.
	* gnu/gcj/convert/natIconv.cc (iconv_init): New method.
	(read): Swap bytes if required.  Treat `count' as character count,
	not byte count.
	(write): Likewise.  Also, handle case where iconv fails on a given
	character.
	(init): Put encoding into exception.
	* gnu/gcj/convert/IOConverter.java (iconv_byte_swap): New global.
	(static): Call iconv_init.  Rebuilt alias list.
	(iconv_init): New private method.

From-SVN: r37190
2000-11-01 17:00:02 +00:00
Tom Tromey 347b93640a Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (install-exec-hook): Only make a single symlink, and
	remove the destination before making the link.
	* configure: Rebuilt.
	* configure.in: Call AC_PROG_LN_S.

From-SVN: r37189
2000-11-01 16:47:06 +00:00
Warren Levy 4547105f64 jni.cc: Added include of java/lang/ThreadGroup.h.
* jni.cc: Added include of java/lang/ThreadGroup.h.
	* gcj/javaprims.h: Removed Replaceable and Resolvable from namespace
	per change of 2000-10-05.

From-SVN: r37173
2000-11-01 00:18:03 +00:00
Bryce McKinlay 67f279dfeb Reader.java: Merge docs from classpath.
* java/io/Reader.java: Merge docs from classpath.
	(skip): Synchronize on `lock'.
	* java/io/FileReader.java: Import correct implementation from
	classpath.
	* java/io/StringReader.java: Merge docs from classpath.
	(ready): Throw IOException if stream is closed.

From-SVN: r37143
2000-10-30 09:20:47 +00:00
Bryce McKinlay 661a98d17a BitSet.java: Updated @specnote.
2000-10-30  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/util/BitSet.java: Updated @specnote.

From-SVN: r37138
2000-10-30 01:51:34 +00:00
Bryce McKinlay 3a73757880 AbstractCollection.java (addAll): Use size() instead of hasNext() in iterator loop.
2000-10-29  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/util/AbstractCollection.java (addAll): Use size() instead of
	hasNext() in iterator loop.
	(clear): Ditto.
	(contains): Ditto. Simplify loop.
	(containsAll): Ditto.
	(remove): Ditto.
	(removeAll): Ditto.
	(retainAll): Ditto.
	(toArray): Ditto.
	(toString): Ditto. Use string concatenation operators, not
	StringBuffer.
	* java/util/AbstractList.java (addAll): Use size() instead of
	hasNext() in iterator loop.
	(equals): Ditto.
	(hashCode): Ditto.
	(indexOf): Ditto. Don't take null check outside of the loop.
	(iterator): Return an AbstractListItr instead of anonymous class.
	(lastIndexOf): Use a for loop bounded by size() instead of
	hasPrevious() in iterator loop.
	(listIterator): Return an AbstractListItr.
	(removeRange): Remove bounds checking code and docs.
	(AbstractListItr): New inner class. Code moved here from
	listIterator().
	(SubList.iterator): Removed. Use default implementation from
	AbstractList instead.
	(SubList.listIterator): As above.
	* java/util/AbstractMap.java (clear): Use a for loop bounded by size()
	instead of hasNext() in iterator loop.
	(containsValue): Ditto.
	(equals): Ditto.
	(get): Ditto.
	(put): Ditto.
	(putAll): Ditto.
	(remove): Ditto.
	(toString): Ditto. Use string concatenation operators, not
	StringBuffer.
	* java/util/AbstractSequentialList.java (addAll): Use a for loop
	bounded by size() instead of hasNext() in iterator loop.
	* java/util/AbstractSet.java (hashCode): Don't catch exception as
	part of normal execution flow. Do an explicit null check instead.
	* java/util/ArrayList.java (_iSize): Rename to `size'.
	(_arData): Rename to `data'.
	(get): Check lower bounds also. Simplify IndexOutOfBoundsException
	message.
	(remove): Ditto.
	(removeRange): Make protected. Don't check bounds.
	(add): Check lower bounds also. Simplify IndexOutOfBoundsException
	message.
	(addAll (Collection)): Use a size-bounded for loop instead of hasNext()
	check.
	(addAll (int, Collection)): Check lower bounds. Simplify exception
	string.
	(clone): Clone the data array too.
	(indexOf): Inline doesEqual().
	(lastIndexOf): Ditto.
	(clear): Don't set array data to null.
	(set): Check lower bounds. Simplify exception string.
	(toArray): Correct comment.
	(trimToSize): Don't update modCount, this is not a structural change.
	Add comment.

	* java/util/BitSet.java: Merged with classpath, new JDK 1.2 methods
	implemented.
	(toString): Declare `bit' as long, not int.
	(data): Made package-private, not private.

From-SVN: r37116
2000-10-29 05:06:10 +00:00
Warren Levy 128e977c58 natGregorianCalendar.cc (computeFields): Set the isSet__ array elements to true.
* java/util/natGregorianCalendar.cc (computeFields): Set the isSet__
	array elements to true.

From-SVN: r37081
2000-10-27 11:53:53 +00:00
Warren Levy df98a50bb0 Makefile.am: Added locale files from Classpath.
* Makefile.am: Added locale files from Classpath.
	* Makefile.in: Rebuilt.
	* gnu/java/locale/Calendar.java: New file.
	* gnu/java/locale/Calendar_de.java: New file.
	* gnu/java/locale/Calendar_en.java: New file.
	* gnu/java/locale/Calendar_nl.java: New file.
	* java/lang/ClassNotFoundException.java: Replaced with Classpath file.
	* java/math/BigDecimal.java (intVal): Renamed from 'num' for
	serialization compatibility.
	(scale): Made private.
	(serialVersionUID): New field.
	* java/math/BigInteger.java (ival): Made transient.
	(words): Made transient.
	(bitCount): New serialization field.
	(bitLength): Ditto.
	(firstNonzeroByteNum): Ditto.
	(lowestSetBit): Ditto.
	(magnitude): Ditto.
	(signum): Ditto.
	(serialVersionUID): New field.
	(readObject): New method.
	(writeObject): New method.
	* java/util/BitSet.java (serialVersionUID): New field.
	* java/util/Calendar.java: Replaced with Classpath file.
	* java/util/GregorianCalendar.java (GregorianCalendar): Pass result
	of getDefault() for TimeZone or Locale instead of passing nulls.
	* java/util/Locale.java (serialVersionUID): New field.
	(writeObject): New method.
	(readObject): New method.
	* java/util/SimpleTimeZone.java: Replaced with Classpath file.

Serialization mods.

From-SVN: r37080
2000-10-27 10:33:46 +00:00
Bryce McKinlay 47a53f53a8 Makefile.am (GCJCOMPILE): Pass --tag=GCJ to libtool.
2000-10-25  Bryce McKinlay  <bryce@albatross.co.nz>

	* Makefile.am (GCJCOMPILE): Pass --tag=GCJ to libtool.
	(core_java_source_files): Put java.lang, java.io, and java.util here.
	(ordinary_java_source_files): Order so that core_java_source_files are
	built first.
	(java_source_files): Reorder so that special_java_source_files are
	built first.
	* configure.in: Don't pass -I flag to gcj.
	* Makefile.in: Rebuilt.
	* configure: Rebuilt.

From-SVN: r37060
2000-10-25 23:11:38 +01:00
Tom Tromey a697c5f753 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (install-exec-hook): New target.

From-SVN: r37057
2000-10-25 17:56:17 +00:00
Bryce McKinlay ce2ab205ae ThreadGroup.java (uncaughtException): Print thread name with stack dump.
* java/lang/ThreadGroup.java (uncaughtException): Print thread name
        with stack dump.

From-SVN: r37047
2000-10-25 09:11:47 +01:00
Bryce McKinlay 85d0c8b46e EventObject.java: Merged from classpath.
2000-10-24  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/util/EventObject.java: Merged from classpath.

From-SVN: r37032
2000-10-24 11:53:56 +01:00
Alexandre Petit-Bianco eade41de2a AbstractSet.java (equals): Re-installed original code.
2000-10-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	* java/util/AbstractSet.java (equals): Re-installed original code.

(http://sources.redhat.com/ml/java-patches/2000-q4/msg00054.html)

From-SVN: r37021
2000-10-23 12:52:45 -07:00
Rolf W. Rasmussen 2622c79d2d Makefile.am: Added rules for libgcjx library.
* Makefile.am: Added rules for libgcjx library.
	* Makefile.in: Rebuilt.
	* configure.in: Added check for X.
	* configure: Rebuilt.
	* gnu/awt/LightweightRedirector.java: New file.
	* gnu/awt/j2d/AbstractGraphicsState.java: New file.
	* gnu/awt/j2d/DirectRasterGraphics.java: New file.
	* gnu/awt/j2d/Graphics2DImpl.java: New file.
	* gnu/awt/j2d/IntegerGraphicsState.java: New file.
	* gnu/awt/j2d/MappedRaster.java: New file.
	* gnu/awt/xlib/XCanvasPeer.java: New file.
	* gnu/awt/xlib/XEventLoop.java: New file.
	* gnu/awt/xlib/XEventQueue.java: New file.
	* gnu/awt/xlib/XFontMetrics.java: New file.
	* gnu/awt/xlib/XFramePeer.java: New file.
	* gnu/awt/xlib/XGraphics.java: New file.
	* gnu/awt/xlib/XGraphicsConfiguration.java: New file.
	* gnu/awt/xlib/XPanelPeer.java: New file.
	* gnu/awt/xlib/XToolkit.java: New file.
	* gnu/gcj/xlib/Clip.java: New file.
	* gnu/gcj/xlib/Colormap.java: New file.
	* gnu/gcj/xlib/Display.java: New file.
	* gnu/gcj/xlib/Drawable.java: New file.
	* gnu/gcj/xlib/Font.java: New file.
	* gnu/gcj/xlib/GC.java: New file.
	* gnu/gcj/xlib/Pixmap.java: New file.
	* gnu/gcj/xlib/Screen.java: New file.
	* gnu/gcj/xlib/Visual.java: New file.
	* gnu/gcj/xlib/WMSizeHints.java: New file.
	* gnu/gcj/xlib/Window.java: New file.
	* gnu/gcj/xlib/WindowAttributes.java: New file.
	* gnu/gcj/xlib/XAnyEvent.java: New file.
	* gnu/gcj/xlib/XButtonEvent.java: New file.
	* gnu/gcj/xlib/XColor.java: New file.
	* gnu/gcj/xlib/XConfigureEvent.java: New file.
	* gnu/gcj/xlib/XConnectException.java: New file.
	* gnu/gcj/xlib/XEvent.java: New file.
	* gnu/gcj/xlib/XException.java: New file.
	* gnu/gcj/xlib/XExposeEvent.java: New file.
	* gnu/gcj/xlib/XID.java: New file.
	* gnu/gcj/xlib/XImage.java: New file.
	* gnu/gcj/xlib/XUnmapEvent.java: New file.
	* gnu/gcj/xlib/natClip.cc: New file.
	* gnu/gcj/xlib/natColormap.cc: New file.
	* gnu/gcj/xlib/natDisplay.cc: New file.
	* gnu/gcj/xlib/natDrawable.cc: New file.
	* gnu/gcj/xlib/natFont.cc: New file.
	* gnu/gcj/xlib/natGC.cc: New file.
	* gnu/gcj/xlib/natPixmap.cc: New file.
	* gnu/gcj/xlib/natScreen.cc: New file.
	* gnu/gcj/xlib/natVisual.cc: New file.
	* gnu/gcj/xlib/natWMSizeHints.cc: New file.
	* gnu/gcj/xlib/natWindow.cc: New file.
	* gnu/gcj/xlib/natWindowAttributes.cc: New file.
	* gnu/gcj/xlib/natXAnyEvent.cc: New file.
	* gnu/gcj/xlib/natXButtonEvent.cc: New file.
	* gnu/gcj/xlib/natXColor.cc: New file.
	* gnu/gcj/xlib/natXConfigureEvent.cc: New file.
	* gnu/gcj/xlib/natXException.cc: New file.
	* gnu/gcj/xlib/natXExposeEvent.cc: New file.
	* gnu/gcj/xlib/natXImage.cc: New file.
	* gnu/gcj/xlib/natXUnmapEvent.cc: New file.
	* java/awt/EventDispatchThread.java: Start thead on creation.

From-SVN: r37005
2000-10-22 17:46:09 +00:00
Tom Tromey a9770f9a91 From Arno J. Klaassen:
* interpret.cc: Include <stdlib.h> for alloca.
	* defineclass.cc: Include <stdlib.h> for alloca.

From-SVN: r36986
2000-10-20 23:25:57 +00:00
Tom Tromey 480222b54f Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am: Include deps.mk.
	(GCJCOMPILE): Added -MD, -MT, and -MF.
	($(javao_files)): Don't depend on libgcj.zip.
	(all-recursive): New target.
	(%.lo:%.cc): Do dependency tracking.
	($(nat_headers)): Don't depend on libgcj.zip.
	* configure: Rebuilt.
	* configure.in: Make .d files and deps.mk.

From-SVN: r36982
2000-10-20 21:21:37 +00:00
Bryce McKinlay c26f7a3165 exception.cc: Don't #include "exception".
2000-10-13  Bryce McKinlay  <bryce@albatross.co.nz>

	* exception.cc: Don't #include "exception".
	(_Jv_eh_alloc): Call abort (), not terminate (), if malloc fails.

	* Makefile.am (libgcj_la_LDFLAGS): Link in libsupc++.
	* Makefile.in: Updated.

From-SVN: r36855
2000-10-13 05:45:57 +01:00
Bryce McKinlay 18a61d1cb2 ChoicePeer.java (addItem): Removed.
2000-10-11  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/awt/peer/ChoicePeer.java (addItem): Removed.
	* java/awt/peer/ComponentPeer.java (disable): Removed.
	(enable): Removed.
	(hide): Removed.
	(minimumSize): Removed.
	(preferredSize): Removed.
	(reshape): Removed.
	(show): Removed.
	* java/awt/peer/ListPeer.java (addItem): Removed.
	(clear): Removed.
	(minimumSize): Removed.
	(preferredSize): Removed.
	(setMultipleSelections): Removed.
	* java/awt/peer/MenuBarPeer.java (add): Renamed from addMenu.
	(remove): Renamed from removeMenu.
	* java/awt/peer/MenuItemPeer.java (disable): Removed.
	(enable): Removed.
	* java/awt/peer/MenuPeer.java (add): Renamed from addItem.
	(remove): Renamed from removeItem.
	* java/awt/peer/TextAreaPeer.java (insertText): Removed.
	(getMinimumSize): Removed.
	(getPreferredSize): Removed.
	(minimumSize): Removed.
	(preferredSize): Removed.
	(replaceText): Removed.
	* java/awt/peer/TextFieldPeer.java (minimumSize): Removed.
	(preferredSize): Removed.
	(getMinimumSize): Removed.
	(getPreferredSize): Removed.
	(setEchoCharacter): Removed.

From-SVN: r36836
2000-10-11 10:47:25 +01:00
Warren Levy 01ce962b94 LocaleData_en.java (monetarySeparator): Added.
* gnu/gcj/text/LocaleData_en.java (monetarySeparator): Added.
	* java/sql/Date.java (serialVersionUID): New field.
	* java/sql/Time.java (serialVersionUID): New field.
	* java/sql/Timestamp.java (serialVersionUID): New field.
	* java/text/ChoiceFormat.java (serialVersionUID): New field.
	* java/text/DateFormat.java (getDateTimeInstance (int)): Removed.
	* java/text/DateFormatSymbols.java (serialVersionUID): New field.
	* java/text/DecimalFormat.java (serialVersionOnStream): New field.
	(readObject): New serialization method.
	* java/text/DecimalFormatSymbols.java (monetarySeparator): New field.
	(serialVersionOnStream): New field.
	(readObject): New serialization method.
	(getMonetaryDecimalSeparator): New method.
	(setMonetaryDecimalSeparator): New method.
	* java/text/NumberFormat.java (maxFractionDigits): New field.
	(maxIntegerDigits): New field.
	(minFractionDigits): New field.
	(minIntegerDigits): New field.
	(serialVersionOnStream): New field.
	(serialVersionUID): New field.
	(readObject): New serialization method.
	(writeObject): New serialization method.
	* java/text/SimpleDateFormat.java (defaultCenturyStart): Initialized.
	(serialVersionOnStream): New field.
	(serialVersionUID): New field.
	(readObject): New serialization method.

Serialization mods.

From-SVN: r36831
2000-10-10 23:09:08 +00:00
Tom Tromey 9121d9b1a2 [multiple changes]
2000-10-09  Alexandre Oliva  <aoliva@redhat.com>

	* configure.in (GCJ): Avoid bogus error message when looking for
	(and not finding) gcj in the build tree.
	* configure: Rebuilt.

2000-10-09  Tom Tromey  <tromey@cygnus.com>

	* configure: Rebuilt.
	* configure.in: Include sys/types.h when checking for socklen_t.
	From Arno J. Klaassen.

From-SVN: r36811
2000-10-09 17:19:49 +00:00
Bryce McKinlay f01c1eb384 update
From-SVN: r36795
2000-10-09 02:55:35 +01:00
Bryce McKinlay 6a3bad7d98 re GNATS libgcj/341 (Throwable.printStackTrace() isn't working)
2000-10-09  Bryce McKinlay  <bryce@albatross.co.nz>

	* include/jvm.h: Enable __builtin_expect().

	* name-finder.cc (lookup): Don't trust dladdr() if the address is from
	the main program. Fix for PR libgcj/341.

From-SVN: r36794
2000-10-09 02:54:50 +01:00
Tom Tromey 43f8e39002 * java/util/Properties.java: Merged with Classpath version.
From-SVN: r36775
2000-10-07 18:13:11 +00:00
Tom Tromey 1d336a099d natField.cc (BooleanClass): Don't define.
* java/lang/reflect/natField.cc (BooleanClass): Don't define.
	* java/lang/reflect/natArray.cc (BooleanClass): Don't define.
	* java/lang/Class.h (Object): Added `class$' field.
	* java/lang/Object.h (Object): Added `class$' field.
	* defineclass.cc (ClassClass): Use `class$' form.
	(ClassObject): Likewise.
	* resolve.cc (ClassObject): Use `class$' form.
	(ObjectClass): Likewise.
	* interpret.cc (ClassError): Removed.
	* java/net/natPlainDatagramSocketImpl.cc (BooleanClass): Use
	`class$' form.
	(IntegerClass): Likewise.
	* java/net/natPlainSocketImpl.cc (BooleanClass): Use `class$'
	form.
	* java/lang/natClassLoader.cc (CloneableClass): Use `class$' form.
	(ObjectClass, ClassClass, VMClassLoaderClass, ClassLoaderClass,
	SerializableClass): Likewise.
	Include Serializable.h, Cloneable.h.
	* java/lang/natSystem.cc (SystemClass): Removed.
	(init_properties): Use `class$' form.
	* java/lang/natObject.cc (CloneableClass): Removed.
	(clone): Use `class$' form.
	* java/lang/natClass.cc (CloneableClass): Use `class$' form.
	(ObjectClass, ErrorClass, ClassClass, MethodClass, FieldClass,
	ConstructorClass): Likewise.
	* java/lang/reflect/natMethod.cc (ObjectClass): Use `class$' form.
	(ClassClass, VoidClass, ByteClass, ShortClass, CharacterClass,
	IntegerClass, LongClass, FloatClass, DoubleClass): Likewise.
	* java/io/natObjectInputStream.cc (ObjectClass): Use `class$'
	form.
	(ClassClass): Likewise.
	* include/jvm.h (StringClass): Use `class$' form.
	* prims.cc (ObjectClass): Removed.
	(_Jv_RunMain): Use `class$' form.
	(_Jv_AllocObject): Likewise.
	* jni.cc (ClassClass): Use `class$' form.
	(ThrowableClass): Likewise.
	(ObjectClass): Likewise.
	(MethodClass): Likewise.
	(ThreadGroupClass): Likewise.
	(NativeThreadClass): Likewise.
	* boehm.cc (ObjectClass): Removed.
	(ClassClass): Removed.
	(_Jv_MarkObj): Use `class$' form.
	* gcj/field.h (JvFieldIsRef): Use `class$' form.
	Include RawData.h.

From-SVN: r36740
2000-10-06 01:49:32 +00:00
Warren Levy bf3478059d Makefile.am: Removed java/io/Replaceable.java and java/io/Resolvable.java.
* Makefile.am: Removed java/io/Replaceable.java and
	java/io/Resolvable.java.
	* Makefile.in: Rebuilt.
	* gcj/javaprims.h: Removed Replaceable and Resolvable from java.io
	namespace.
	* java/io/ObjectInputStream.java (processResolution): Fixed typo
	in method name.
	(processResolution): Handle readResolve method via reflection with
	removal of Resolvable interface.
	* java/io/ObjectOutputStream.java (writeObject): Handle writeReplace
	method via reflection with removal of Replaceable interface.
	* java/io/Replaceable.java: Removed.
	* java/io/Resolvable.java: Removed.
	* java/security/Key.java (serialVersionUID): New field.
	* java/security/Provider.java (serialVersionUID): New field.
	* java/security/interfaces/DSAPrivateKey.java (serialVersionUID):
	New field.
	* java/security/interfaces/DSAPublicKey.java (serialVersionUID):
        New field.
	* java/sql/DataTruncation.java (serialVersionUID): New field.
	* java/sql/SQLException.java (serialVersionUID): New field.
	* java/sql/SQLWarning.java (serialVersionUID): New field.
	* java/util/Date.java (serialVersionUID): New field.
	(millis): Made transient.
	(readObject): New method.
	(writeObject): New method.

Serialization mods.
Note:  The interfaces java.io.Replaceable and java.io.Resolvable were only
temporary additions to JDK 1.2 beta versions and were not included
in the JDK 1.2 final.  The Serialization spec instructs how to deal
with their methods (via reflection).

From-SVN: r36736
2000-10-05 23:57:16 +00:00
Tom Tromey cfa82f4d03 * gnu/gcj/convert/natIconv.cc (init): Terminate buffer.
From-SVN: r36733
2000-10-05 21:32:09 +00:00
Tom Tromey 11908bbe42 Updated ChangeLog to reflect patch credit
From-SVN: r36702
2000-10-03 18:57:21 +00:00
Bryce McKinlay 88ce64ace5 update
From-SVN: r36689
2000-10-02 06:14:52 +01:00
Tom Tromey 304daac5d9 posix-threads.cc (_Jv_CondWait): Check to see if we are interrupted before modifying the cv's wait set.
2000-09-30  Tom Tromey  <tromey@cygnus.com>

        * posix-threads.cc (_Jv_CondWait): Check to see if we are
        interrupted before modifying the cv's wait set.

From-SVN: r36680
2000-09-30 11:01:04 +01:00
Hans Boehm bf3b8e42e2 Implement bitmap descriptor based marking for Boehm GC.
2000-09-30  Hans Boehm  <boehm@acm.org>
	    Bryce McKinlay  <bryce@albatross.co.nz>

	Implement bitmap descriptor based marking for Boehm GC.

	* configure.in: Define JC1GCSPEC. Set it if boehm-gc is used.
	* configure: Rebuilt.
	* libgcj.spec.in: Pass JC1GCSPEC to jc1.
	* include/jvm.h (struct _Jv_VTable): New field `gc_descr'. New inline
	method get_finalizer().
	(struct _Jv_ArrayVTable): Ditto. Declare method array with
	NUM_OBJECT_METHODS elements instead of NUM_OBJECT_METHODS + 1.
	(_Jv_AllocObj): Add new jclass parameter.
	(_Jv_AllocArray): Ditto.
	(_Jv_BuildGCDescr): New prototype.
	* prims.cc (_Jv_AllocObject): Rename parameter `c' to `klass'. Pass
	`klass' to _Jv_AllocObj. Don't set the new object's vtable. Use
	get_finalizer() instead of direct finalizer vtable offset.
	(_Jv_NewObjectArray): Rename parameter `clas' to `klass'. Pass
	`klass' to _Jv_AllocArray. Don't set the new array's vtable.
	(_Jv_NewPrimArray): Call _Jv_FindArrayClass before _Jv_AllocObj.
	Pass `klass' to _Jv_AllocObj. Don't set the new array's vtable.
	* resolve.cc (METHOD_NOT_THERE, METHOD_INACCESSIBLE): New #defines.
	(_Jv_ResolvePoolEntry): Use METHOD_NOT_THERE and METHOD_INACCESSIBLE.
	(_Jv_DetermineVTableIndex): Ditto.
	(_Jv_PrepareClass): Ditto. Remove offset-by-one adjustments from vtable
	calculations to account for new gc_descr field.
	* boehm.cc: #include gc_gcj.h.
	(obj_kind_x, obj_free_list): `#if 0'-ed away.
	(_Jv_MarkObj): Check that vtable doesn't point to a cleared object.
	New commentary from HB. Mark the classes vtable.
	(_Jv_MarkArray): Check that vtable doesn't point to a cleared object.
	(GC_DEFAULT_DESCR): New #define.
	(_Jv_BuildGCDescr): New function. Use GC_DEFAULT_DESCR, for now.
	(_Jv_AllocObj): New parameter `klass'. Use GC_GCJ_MALLOC ().
	(_Jv_AllocArray): New parameter `klass'. Allocate with GC_MALLOC and
	scan conservativly if size is less than min_heap_addr. Set vtable
	pointer of new object before returning.
	(_Jv_AllocBytes): Use GC_MALLOC_ATOMIC, not GC_GENERIC_MALLOC.
	(_Jv_InitGC): Call GC_init_gcj_malloc(). Don't set up marking and
	allocation for obj_kind_x.
	* nogc.cc (_Jv_BuildGCDescr): New function. Return 0.
	(_Jv_AllocObj): Set vtable on returned object.
	(_Jv_AllocArray): Ditto.
	* java/lang/Class.h (_Jv_NewObjectArray): No longer a friend.
	(_Jv_NewPrimArray): Ditto.
	(_Jv_AllocObj): Declare as a friend.
	(_Jv_AllocArray): Ditto.
	* java/lang/natClassLoader.cc (_Jv_FindArrayClass): Copy gc_descr
	from &ObjectClass into new array class. Remove offset-by-one
	adjustments from `method' size calculations to account for gc_descr
	field.

Co-Authored-By: Bryce McKinlay <bryce@albatross.co.nz>

From-SVN: r36679
2000-09-30 10:56:58 +01:00
Tom Tromey a3f7444bf2 Scrollbar.java (removeAdjustmentListener): Use `remove', not `add'.
* java/awt/Scrollbar.java (removeAdjustmentListener): Use
	`remove', not `add'.

From-SVN: r36650
2000-09-26 23:46:09 +00:00
Alexandre Petit-Bianco aca8c6e8a3 natSystem.cc (file_encoding): Added return statement.
2000-09-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	* java/lang/natSystem.cc (file_encoding): Added return statement.

From-SVN: r36647
2000-09-26 12:00:28 -07:00
Alexandre Oliva 3c71084a53 Makefile.am: Re-work shell commands that exceeded command-line length limits.
* Makefile.am: Re-work shell commands that exceeded command-line
length limits.
* Makefile.in: Rebuilt.

From-SVN: r36416
2000-09-14 19:24:08 +00:00
Alexandre Oliva 064a791cf5 * java/lang/natRuntime.cc (lt_preloaded_symbols): Define as `extern'.
From-SVN: r36405
2000-09-14 07:56:28 +00:00
Alexandre Oliva e7e18a21d2 defineclass.cc: Include alloca.h only if HAVE_ALLOCA_H.
* defineclass.cc: Include alloca.h only if HAVE_ALLOCA_H.
* java/lang/natDouble.cc: Likewise.
* java/lang/reflect/natMethod.cc: Likewise.
* interpret.cc: Likewise.  Fix NULLCHECKs that tested a _Jv_word.

From-SVN: r36404
2000-09-14 07:51:56 +00:00
Alexandre Oliva 58d2986d00 configure.in (LIBDATASTARTSPEC): Use `%s' to search for libgcjdata.a.
2000-09-13  Alexandre Oliva  <aoliva@redhat.com>

	* configure.in (LIBDATASTARTSPEC): Use `%s' to search for
	libgcjdata.a.
	(GCJ): Support single-tree builds.  Add -B`pwd`/ and -I$srcdir.
	* acinclude.m4: Arrange for automake to not bring in a new
	libtool.m4 for LT_AC_PROG_GCJ.  AC_SUBST GCJ.
	* Makefile.am: Leave it up to automake to subst GCJ.
	* aclocal.m4, configure, Makefile.in: Rebuilt.

From-SVN: r36392
2000-09-13 19:01:20 +00:00
Tom Tromey 96fa18eb49 natArray.cc (BooleanClass): New define.
* java/lang/reflect/natArray.cc (BooleanClass): New define.
	(get): Ensure Boolean class is initialized.
	* java/lang/reflect/natField.cc (BooleanClass): New define.
	(get): Ensure Boolean class is initialized.

From-SVN: r36391
2000-09-13 18:15:42 +00:00
Bryce McKinlay 0f94c029e9 String.java (CASE_INSENSITIVE_ORDER): New static field.
2000-09-13  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/lang/String.java (CASE_INSENSITIVE_ORDER): New static field.
	Initialize with anonymous class.
	(compareToIgnoreCase): New method.

	* java/lang/ThreadGroup.java (had_uncaught_exception): New field.
	(uncaughtException): Set had_uncaught_exception.
	* prims.cc (JvRunMain): Check value of had_uncaught_exception and
	exit with error status if set.
	(_Jv_RunMain): Ditto.

From-SVN: r36385
2000-09-13 07:36:25 +01:00
Alexandre Oliva b4f3dc58b1 * configure: Rebuilt with new ../libtool.m4.
From-SVN: r36351
2000-09-12 06:51:02 +00:00
Tom Tromey 14203c9cac Field.java (toString): Don't rely on Class.toString.
* java/lang/reflect/Field.java (toString): Don't rely on
	Class.toString.

From-SVN: r36341
2000-09-11 22:49:29 +00:00
Tom Tromey fe5e3b9714 BytesToUnicode.java (getDefaultDecoder): Let default decoder use iconv.
* gnu/gcj/convert/BytesToUnicode.java (getDefaultDecoder): Let
	default decoder use iconv.
	* gnu/gcj/convert/UnicodeToBytes.java (getDefaultEncoder):
	Let default encoder use iconv.
	* configure: Rebuilt.
	* configure.in: Check for nl_langinfo and <langinfo.h>.
	* java/lang/natSystem.cc (file_encoding): New function.
	(DEFAULT_FILE_ENCODING): Define to file_encoding() if possible.

From-SVN: r36306
2000-09-11 00:35:51 +00:00
Alexandre Oliva 158a8e6b90 acinclude.m4: Simplify the tests for CC and CXX.
* acinclude.m4: Simplify the tests for CC and CXX.
* aclocal.m4, configure: Rebuilt.

From-SVN: r36297
2000-09-10 09:26:50 +00:00
Alexandre Oliva 6d0860ee89 acinclude.m4: Include libtool macros from the source tree.
* acinclude.m4: Include libtool macros from the source tree.
* aclocal.m4, configure: Rebuilt.

From-SVN: r36296
2000-09-10 08:12:11 +00:00
Warren Levy bc6ccd3316 PropertyChangeEvent.java (serialVersionUID): Added.
* java/beans/PropertyChangeEvent.java (serialVersionUID): Added.
	* java/beans/PropertyVetoException.java (serialVersionUID): Added.
	* java/io/File.java (writeObject): Added.
	(readObject): Added.
	(serialVersionUID): Added.
	* java/io/ObjectOutputStream.java (writeObject): Initialized
	fieldsAlreadyWritten before recursion rather than after.
	* java/io/ObjectStreamClass.java (serialVersionUID): Added.
	* java/io/OptionalDataException.java (serialVersionUID): Added.
	(OptionalDataException): Made package private.
	* java/io/SyncFailedException.java (SyncFailedException): Removed
	default constructor to match spec.
	* java/lang/Boolean.java (serialVersionUID): Added.
	* java/lang/Byte.java (serialVersionUID): Added.
	* java/lang/Character.java (serialVersionUID): Added.
	* java/lang/Double.java (serialVersionUID): Added.
	* java/lang/Float.java (serialVersionUID): Added.
	* java/lang/Integer.java (serialVersionUID): Added.
	* java/lang/Long.java (serialVersionUID): Added.
	* java/lang/Number.java (serialVersionUID): Added.
	* java/lang/Short.java (serialVersionUID): Added.
	* java/lang/String.java (serialVersionUID): Added.
	* java/lang/ThreadDeath.java (ThreadDeath): Removed constructor
	to match spec.
	* java/lang/reflect/InvocationTargetException.java
	(serialVersionUID): Added.
	* java/net/URL.java (handler): Made transient.
	(hashCode): Added field for serialization, per spec. and use
	cached value if available.
	(serialVersionUID): Added.
	(URL): Initialize hashCode.
	(set): Adjust hashCode.
	(readObject): New Method to initialize the protocol handler when
	deserializing.
	(writeObject): New method.
	* java/text/BreakIterator.java: Removed 'implements Serializable'.
	* java/text/Collator.java: Removed 'implements Serializable'.
	* java/util/GregorianCalendar.java (serialVersionUID): Added.
	* java/util/Properties.java (serialVersionUID): Added.
	* java/util/Random.java (serialVersionUID): Added.
	(seed): Made private.
	(nextNextGaussian): Made private.
	(haveNextNextGaussian): Made private.
	* java/util/Stack.java (serialVersionUID): Added.
	* java/util/TimeZone.java (serialVersionUID): Added.
	* java/util/Vector.java (serialVersionUID): Added.

Serialization mods.

From-SVN: r36272
2000-09-08 19:37:09 +00:00
Bryce McKinlay f52c723967 Makefile.am (Thread.h): Don't be friends with native threads functions.
2000-09-07  Bryce McKinlay  <bryce@albatross.co.nz>

	* Makefile.am (Thread.h): Don't be friends with native threads
	functions.
	* Makefile.in: Rebuilt.
	* java/lang/Thread.java (interrupt_flag): Make package-private.

From-SVN: r36234
2000-09-07 13:09:41 +01:00
Jeff Sturm 26aa75bef9 jvm.h (_Jv_HashCode): Cast object ptr to `unsigned long' to avoid long long division.
2000-09-06  Jeff Sturm  <jeff.sturm@appnet.com>

	* include/jvm.h (_Jv_HashCode): Cast object ptr to `unsigned long'
	to avoid long long division.

From-SVN: r36215
2000-09-06 22:25:56 +00:00
Tom Tromey 9579ea7efd Constructor.java (toString): Use `getName' for parameter types.
* java/lang/reflect/Constructor.java (toString): Use `getName' for
	parameter types.
	* java/lang/reflect/Method.java (toString): Use `getName' for
	return type.

From-SVN: r36214
2000-09-06 22:24:34 +00:00
Tom Tromey bcf98e48ef natMethod.cc (_Jv_CallAnyMethodA): Accept null `args' if method takes no parameters.
* java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Accept null
	`args' if method takes no parameters.

From-SVN: r36209
2000-09-06 21:20:45 +00:00
Tom Tromey 8ee4db6f3a Fix for PR java.lang/339:
* java/lang/natPosixProcess.cc (fail): New function.
	(cleanup): New function.
	(startProcess): Use them.  Create pipe so child can communicate
	exec failure back to parent.

From-SVN: r36202
2000-09-06 18:14:15 +00:00
Bryce McKinlay 56042127de * java/net/natPlainDatagramSocketImpl.cc (mcastGrp): Fix typo.
From-SVN: r36170
2000-09-06 00:04:46 +01:00
Bryce McKinlay a3bcdaf9e9 natPlainDatagramSocketImpl.cc: Change various `JvThrow' calls to `throw'.
2000-09-05  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/net/natPlainDatagramSocketImpl.cc: Change various `JvThrow'
	calls to `throw'.
	(send): Undo last patch.
	Remove the label only.
	(mcastGrp): Ditto.
	* java/net/natPlainSocketImpl.cc: Change various `JvThrow' calls to
	`throw'.
	* java/net/natInetAdress.cc: Ditto.

From-SVN: r36165
2000-09-05 22:57:23 +01:00
Tom Tromey 0bb06853c3 * doc/cni.sgml: Updated from master copy.
From-SVN: r36162
2000-09-05 17:48:57 +00:00
Bryce McKinlay 820112852a natIconv.cc (read): Remove unused local.
2000-09-05  Bryce McKinlay  <bryce@albatross.co.nz>

	* gnu/gcj/convert/natIconv.cc (read): Remove unused local.
	(write): Ditto.
	* gnu/gcj/runtime/FileDeleter.java (deleteOnExitNow): Check for null
	stack. Synchronize.
	* java/lang/fdlibm.h: #undef __P if previously defined.
	* java/lang/natSystem.cc (currentTimeMillis): Remove unused local.
	* java/net/natPlainDatagramSocketImpl.cc (send): Remove unreachable
	block.
	(mcastGrp): Ditto.

From-SVN: r36158
2000-09-05 12:05:59 +01:00
Tom Tromey 23e9541117 ZipFile.java (ZipFile): Delete file when opened in DELETE mode.
* java/util/zip/ZipFile.java (ZipFile): Delete file when opened in
	DELETE mode.

From-SVN: r36144
2000-09-04 21:20:27 +00:00
Anthony Green a1fa0b27e7 re GNATS java.io/203 (File.createTempFile doesn't close descriptor)
Fix for PR java.io/203:
        * java/io/File.java (createTempFile): Obey directory argument.
        Use java.io.tmpdir if needed.  Don't leave FileDescripators open.
        * java/lang/natSystem.cc (init_properties): Use TMPDIR environment
        variable to set java.io.tmpdir on non-WIN32 systems.

From-SVN: r36143
2000-09-04 20:57:18 +00:00
Anthony Green 40255aaf54 Forgot to add this from last commit.
From-SVN: r36142
2000-09-04 18:15:30 +00:00
Tom Tromey aec19650a4 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (GCJCOMPILE): Use -fclasspath, not the CLASSPATH
	environment variable.

From-SVN: r36126
2000-09-04 05:34:59 +00:00
Andrew Haley ad17a40dce StreamTokenizer.java: Don't throw a NumberFormatException if a field is numeric as far as the...
2000-09-01  Andrew Haley  <aph@redhat.com>

        * java/io/StreamTokenizer.java: Don't throw a
        NumberFormatException if a field is numeric as far as the
        StreamTokenizer is concerned but not as far as Double.valueOf() is
        concerned: return a zero instead.

	For gcj/141.

From-SVN: r36100
2000-09-01 15:00:59 +00:00
Tom Tromey cdd3612a55 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (AM_CXXFLAGS): Added -fdollars-in-identifiers.

From-SVN: r36069
2000-08-30 20:43:48 +00:00
Tom Tromey 2ed885df76 BitMaskExtent.java, [...]: Removed Latin-1 copyright symbols.
* gnu/gcj/awt/BitMaskExtent.java, gnu/gcj/awt/Buffers.java,
	gnu/gcj/awt/ComponentDataBlitOp.java,
	gnu/gcj/awt/GLightweightPeer.java, java/awt/Graphics2D.java,
	java/awt/RenderingHints.java, java/awt/color/ColorSpace.java,
	java/awt/color/ICC_ColorSpace.java,
	java/awt/color/ICC_Profile.java,
	java/awt/image/BufferedImage.java, java/awt/image/ColorModel.java,
	java/awt/image/ComponentColorModel.java,
	java/awt/image/ComponentSampleModel.java,
	java/awt/image/DataBuffer.java,
	java/awt/image/DataBufferByte.java,
	java/awt/image/DataBufferInt.java,
	java/awt/image/DataBufferUShort.java,
	java/awt/image/DirectColorModel.java,
	java/awt/image/IndexColorModel.java,
	java/awt/image/PackedColorModel.java, java/awt/image/Raster.java,
	java/awt/image/RasterOp.java, java/awt/image/SampleModel.java,
	java/awt/image/SinglePixelPackedSampleModel.java,
	java/awt/image/WritableRaster.java, java/util/zip/ZipFile.java:
	Removed Latin-1 copyright symbols.
	* java/util/zip/ZipFile.java: Indentation fixes.

From-SVN: r36027
2000-08-29 03:23:57 +00:00
Mark Wielaard 9ac96ca1f4 ZipFile.java: Implement OPEN_DELETE mode...
* java/util/zip/ZipFile.java: Implement OPEN_DELETE mode, new constructor,
    close can delete the file, finalize calls close.
    * java/util/jar/JarFile.java: Constructor that takes mode now calls super.

From-SVN: r36007
2000-08-27 22:26:27 +00:00
Anthony Green 6f09c30717 ArrayList.java, [...]: Imported from GNU Classpath.
2000-08-27  Anthony Green  <green@redhat.com>

	* java/util/ArrayList.java, java/util/Timer.java,
	java/util/LinkedList.java, java/util/TimerTask.java,
	java/util/HashMap.java, java/util/AbstractMap.java,
	java/util/SortedMap.java, java/util/AbstractSequentialList.java,
	java/util/SortedSet.java: Imported from GNU Classpath.
	* Makefile.in: Rebuilt.
	* Makefile.am: Added new files.

From-SVN: r36006
2000-08-27 22:06:44 +00:00
Anthony Green 6aaeb97551 Makefile.in: Rebuilt.
2000-08-26  Anthony Green  <green@redhat.com>

        * Makefile.in: Rebuilt.
        * Makefile.am (java/lang/ClassLoader.h): Make _Jv_RunMain a
        friend.

        * prims.cc: Include ClassLoader.h.
        (_Jv_RunMain): When executing jar files, classpath must be the jar
        file only.  Lose our reference to the system ClassLoader in order
        to get a new one with the correct classpath.
        * java/lang/natSystem.cc (init_properties): When executing a jar
        file, only use the jar file for java.class.path.

        * gnu/gcj/runtime/VMClassLoader.java: Use the canonical file name
        for bytecode archives.

        * gnu/gcj/runtime/FirstThread.java: Handle case where manifest
        exists, but not Main-Class.

From-SVN: r35999
2000-08-26 19:25:13 +00:00
Mark Wielaard 309bf2960a InflaterInputStream.java (read(byte[],int,int)): return -1 when fill() has no more data for the Inflater.
* java/util/zip/InflaterInputStream.java (read(byte[],int,int)):
	return -1 when fill() has no more data for the Inflater.

From-SVN: r35963
2000-08-24 22:48:12 +00:00
Mark Wielaard fb034e9464 PrintWriter.java (print(String)): Don't catch IOException, write(String) already does.
* java/io/PrintWriter.java (print(String)): Don't catch IOException,
	write(String) already does.

From-SVN: r35937
2000-08-24 06:56:38 +00:00
Alexandre Petit-Bianco 6d958acf09 NativeThread.java (NativeThread): Removed assignment to `alive_flag', call `init'.
2000-08-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	* gnu/gcj/jni/NativeThread.java (NativeThread): Removed assignment
	to `alive_flag', call `init'.
	(init): New native method.
	* gnu/gcj/jni/natNativeThread.cc (init): New native method
	implementation.

(http://sources.redhat.com/ml/java-patches/2000-q3/msg00142.html)

From-SVN: r35931
2000-08-23 19:16:57 -07:00
Mark Wielaard 9adfd95980 Makefile.in: Rebuilt.
2000-08-21  Mark Wielaard  <mark@klomp.org>

	* Makefile.in: Rebuilt.
	* Makefile.am (java/lang/reflect/Constructor.h): Declare Class as
	a `friend class'.
	(java/lang/reflect/Field.h): Likewise.
	(java/lang/reflect/Method.h): Likewise.
	(gnu/gcj/runtime/VMClassLoader.h): Declare ClassLoader as a
	`friend class'.

From-SVN: r35863
2000-08-22 04:46:51 +00:00
Tom Tromey 6c531b0556 ResourceBundle.java (trySomeGetBundle): Removed debugging prints.
* java/util/ResourceBundle.java (trySomeGetBundle): Removed
	debugging prints.

From-SVN: r35859
2000-08-21 21:25:55 +00:00
Anthony Green d832fd8147 Fixed typo in ChangeLog
From-SVN: r35830
2000-08-21 06:07:51 +00:00
Anthony Green 1a558147d1 natSystem.cc (init_properties): Change sourceware reference to sources.redhat.com.
Sun Aug 20 21:02:48 2000  Anthony Green  <green@redhat.com>

	* java/lang/natSystem.cc (init_properties): Change sourceware
	reference to sources.redhat.com.

	* include/java-props.h: Add _Jv_Jar_Class_Path.
	* prims.cc: Ditto.  Set it from	`gij -jar file' option.

	* java/lang/natSystem.cc (init_properties): Set java.class.path
	from
	{gij -jar file}:{CLASSPATH variable}:{-Djava.class.path= or .}

	* java/util/PropertyPermission.java: Import from GNU Classpath.
	* Makefile.in: Rebuilt.
	* Makefile.am: Add java/util/PropertyPermission.java.
	* java/lang/System.java: Add setProperty method.

	* gij.cc (main): Add -jar option to execute jar files.
	(help): Describe -jar option.
	* prims.cc (_Jv_RunMain): Add support for jar execution mode.
	* gnu/gcj/tools/Gij.java: New file.
	* include/jvm.h: Add is_jar argument to _Jv_RunMain.
	* gnu/gcj/runtime/FirstThread.java (main): New method.

	* java/util/jar/Attributes.java: Correct comment spelling.

From-SVN: r35829
2000-08-21 06:05:20 +00:00
Mark Wielaard 8559f9bb2f Adler32.java: Make private variables really private
2000-08-20  Mark Wielaard  <mark@klomp.org>

    * java/util/zip/Adler32.java: Make private variables really private
    * java/util/zip/CRC32.java: Make private variables really private
    * java/util/zip/CheckedInputStream.java: skip() could skip to much bytes
    * java/util/zip/InflaterInputStream.java: skip() could skip to much bytes
    * java/util/zip/ZipEntry.java: setCompressedSize() didn't check input
    * java/util/zip/ZipFile.java: size() new 1.2 method
    * java/util/zip/ZipInputStream.java: Use createZipEntry not new ZipEntry.
    since 1.2 available() always returns just 1 or 0 when closed

From-SVN: r35826
2000-08-20 21:51:19 +00:00
Anthony Green 53e687fabb JarFile.java: Don't call java.util.zip.ZipFile.getEntry twice.
* java/util/jar/JarFile.java: Don't call
        java.util.zip.ZipFile.getEntry twice.  From Mark Wielaard
        <mark@klomp.org>.

From-SVN: r35824
2000-08-20 19:40:25 +00:00
Anthony Green 48da46cca8 Oops. Forgot some notes.
From-SVN: r35822
2000-08-20 17:54:56 +00:00
Anthony Green f2e541ce26 URLClassLoader.java: Find the JarEntry via the JarFile.
Sun Aug 20 09:51:48 2000  Anthony Green  <green@redhat.com>

        * java/net/URLClassLoader.java: Find the JarEntry via the JarFile.

        * java/net/JarURLConnection.java: getEntry doesn't take any
        arguments.  Return null if element is null.

        * java/util/zip/ZipFile.java (getInputStream): Read the compressed
        size from the archive, not the inflated size.

        * java/util/jar/JarFile.java (getEntry): Don't recurse.  Call
        java.util.zip.ZipFile.getEntry.

        * gij.cc (help): Change sourceware reference to
        sources.redhat.com.

From-SVN: r35821
2000-08-20 17:49:12 +00:00
Tom Tromey ea70900954 ZipInputStream.java (createZipEntry): Implemented.
* java/util/zip/ZipInputStream.java (createZipEntry):
	Implemented.

From-SVN: r35810
2000-08-19 19:54:36 +00:00
Anthony Green a729a4e9ab Attributes.java, [...]: Imported from Classpath.
Sat Aug 19 11:00:53 2000  Anthony Green  <green@redhat.com>

	* java/util/jar/Attributes.java, java/util/jar/JarEntry.java,
	java/util/jar/JarException.java, java/util/jar/JarFile.java,
	java/util/jar/JarInputStream.java,
	java/util/jar/JarOutputStream.java, java/util/jar/Manifest.java,
	java/util/Set.java, java/util/Map.java, java/util/Bucket.java,
	java/util/AbstractSet.java, java/util/BasicMapEntry.java,
	java/security/cert/CRL.java, java/security/cert/CRLException.java,
	java/security/cert/Certificate.java,
	java/security/cert/CertificateEncodingException.java,
	java/security/cert/CertificateException.java,
	java/security/cert/CertificateExpiredException.java,
	java/security/cert/CertificateFactory.java,
	java/security/cert/CertificateFactorySpi.java,
	java/security/cert/CertificateNotYetValidException.java,
	java/security/cert/CertificateParsingException.java,
	java/security/cert/X509CRL.java,
	java/security/cert/X509CRLEntry.java,
	java/security/cert/X509Certificate.java,
	java/security/cert/X509Extension.java: Imported from Classpath.
	* java/util/Hashtable.java: Imported from Classpath.

	* java/util/zip/ZipInputStream.java: Create stub for
	createZipEntry.

	* gcj/javaprims.h: Updated class list.

	* Makefile.in, gcj/Makefile.in: Rebuilt.
	* Makefile.am (ordinary_java_source_files): Add these new classes.

From-SVN: r35809
2000-08-19 18:19:42 +00:00
Alexandre Petit-Bianco 0fcbfa82cf natClass.cc (finit_name): Initialized with `finit$'.
2000-08-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>

        * java/lang/natClass.cc (finit_name): Initialized with `finit$'.
        (finit_leg_name): New global.
        (java::lang::Class::getDeclaredMethods): Test for `finit$' or
        `$finit$'. This is a backward compatibility hack.
        (java::lang::Class::_getMethods): Likewise.

(http://sources.redhat.com/ml/java-discuss/2000-08/msg00031.html
 See also the matching compiler patch:
 http://gcc.gnu.org/ml/gcc-patches/2000-08/msg00664.html)

From-SVN: r35769
2000-08-17 14:56:29 -07:00
Rolf W. Rasmussen 777e6d799a ComponentDataBlitOp.java: New file.
* gnu/gcj/awt/ComponentDataBlitOp.java: New file.
	* gnu/gcj/awt/GLightweightPeer.java: New file.
	* java/awt/BorderLayout.java: Implemented all methods.
	* java/awt/Button.java (actionListener, actionCommand): Renamed
	and modifier change.
	(addNotify): Call super.
	(dispatchEventImpl): New method.
	(getListeners): New method.
	(label): Made package-private, not private.
	* java/awt/Canvas.java: Implemented class body.
	* java/awt/Color.java (brighter): New method.
	(darker): New method.
	(hashCode): New method.
	* java/awt/Component.java (visible, enabled, eventMask): Set defaults.
	(getGraphicsConfiguration): Delegate to
	getGraphicsConfigurationImpl().
	(getGraphicsConfigurationImpl): New method.
	(getToolkit): Only return value from peer if not null.
	(isDisplayable): Check with parent.
	(isShowing): No parent implies not showing.
	(getForeground): Check parent property if local is null.
	(getBackground): Likewise.
	(getFont): Likewise.
	(setForeground): Inform peer.
	(setBackground): Likewise
	(setLocale): Invalidate component.
	(getColorModel): Implemented.
	(setLocation): Invalidate, or ignore if no change.
	(setSize): Invalidate, or ignore if no change.
	(setBounds): Invalidate, or ignore if no change.
	(isOpaque): By default, heavyweight implies opaque.
	(isLightweight): Implemented.
	(getMaximumSize): Implemented.
	(doLayout): Implemented, NOP.
	(validate): Implemented, NOP.
	(invalidate): Only propagate to parent if parent was valid.
	(getGraphics): Implemented.
	(getFontMetrics): Implemented.
	(update): Implemented.
	(paintAll): Implemented.
	(repaint): Implemented all repaint methods.
	(print): Implemented.
	(printAll): Implemented.
	(createImage): Implemented.
	(dispatchEvent): Give the peer a chance to handle the event.
	(dispatchEventImpl): Dispatch paint events.
	(enableEvents): Lightweights enable events on parent component.
	(coalesceEvents): Coalesce paint events, and select event type
	using a switch.
	(coalescePaintEvents): New method.
	(processEvent): Fix unfortunate ordering of statements, and call
	correct method for MOUSE_CLICKED.
	(processPaintEvent): New method.
	(addNotify): Allow container to notify children before event
	mask is set in peer.
	(addNotifyContainerChildren): New method.
	(removeNotify): Visibility should not change on removeNotify.
	(paramString): Implemented.
	(list): Implemented two of the list methods.
	* Container (myInsets): Removed, insets are managed by peer.
	(getInsets): Query peer.
	(addImpl): Fix reparenting, enable events for lightweights,
	initialize component array.
	(validate): Call doLayout in validateTree() instead.
	(validateTree): Do nothing if already valid. Call beginValidate(),
	endValidate() on peer. Call validateTree() instead of validate()
	for children that are containers. Mark valid after validation of
	children.
	(setFont): Partial implementation.
	(paint): Implemented.
	(visitChildren): New method.
	(visitChild): New method.
	(update): Implemented.
	(print): Implemented.
	(paintComponents): Implemented.
	(printComponents): Consider translation and clipping.
	(getComponentAt): Ignore invisible children. Return this if no
	child match.
	(addNotify): Call super.
	(addNotifyContainerChildren): New method.
	(paramString): Implemented.
	(list): Implemented.
	* java/awt/EventQueue (invokeAndWait): Get system event queue the
	right way.
	(invokeLater): Likewise.
	(isDispatchThread): Likewise.
	* java/awt/FontMetrics (getLeading): Formula change.
	(getDescent): Consider leading also.
	(getMaxAscent): Default to getAscent().
	(getMaxDescent): Default to getDescent.
	(getMaxAdvance): Return value signifying unknown.
	(charWidth): Both methods implemented.
	(charsWidth): Implemented.
	(bytesWidth): Implemented.
	(getWidths): Implemented.
	* java/awt/Frame.java (NORMAL, ICONIFIED, iconImage, isResizable,
	state): New fields.
	(Frame): Rearragend constuctor chaining to disallow null being
	passed as a graphics configuration.
	(getTitle): Return empty string if null.
	(dispose): Removed.
	(getIconImage): New method.
	(setIconImage): New method.
	(finalize): New method.
	(setMenuBar): Notify peer.
	(isResizable): New method.
	(setResizable): New method.
	(getState): New method.
	(getFont): Removed.
	(remove): Implemented.
	(removeNotify): New method.
	(getFrames): New method.
	* java/awt/Graphics.java: Implemented body of class.
	* java/awt/Graphics2D.java: New file.
	* java/awt/GraphicsConfiguration.java: Enabled part of the API.
	* java/awt/Image.java: Implemented body of class.
	* java/awt/Panel.java (Panel): Call correct super constructor.
	(addNotify): Implemented.
	* java/awt/Rectangle.java (isEmpty): Fixed reversed logic.
	* java/awt/RenderingHints.java: New file.
	* java/awt/Toolkit.java (createComponent): Implemented.
	(getSystemEventQueue): Delegate to getSystemEventQueueImpl().
	* java/awt/Window.java (Window): Two new constructors. Reordered
	constructor chaining.
	(getGraphicsConfigurationImpl): New method.
	(finalize): Call super.
	(addNotify): Call super.
	(pack): Do layout stuff.
	(show): Ensure that peer exists and that component is valid.
	(dispose): Dispose owned children.
	(getOwner): Simplify code, casting null pointers is valid.
	(getGraphicsConfiguration): Ask peer if local value is null.
	* java/awt/event/ActionEvent.java (getActionCommand): Renamed from
	getcmd().
	* java/awt/image/BufferedImage.java: New file.
	* java/awt/image/RasterOp.java: New file.
	* java/awt/peer/ComponentPeer.java (getGraphicsConfiguration):
	More powerfull replacement for getColorModel().
	(getColorModel) Removed.
	(setEventMask) New method.
	* Makefile.am: Added new files.
	* Makefile.in: Rebuilt.

From-SVN: r35748
2000-08-16 18:03:48 +00:00
Andrew Haley 3a593d5fb0 jvm.h (_Jv_HashCode): New hash code.
2000-08-15  Andrew Haley  <aph@cygnus.com>

	* include/jvm.h (_Jv_HashCode): New hash code.

From-SVN: r35744
2000-08-16 15:30:02 +00:00
Tom Tromey fec1ce0a00 * java/io/ByteArrayOutputStream.java: Merged with Classpath.
From-SVN: r35736
2000-08-16 01:43:42 +00:00
Anthony Green c0d63866c4 More thanks.
From-SVN: r35668
2000-08-14 03:02:50 +00:00
Tom Tromey 366a0fd804 natPlainSocketImpl.cc (bind): Don't go to error case when errno not set.
* java/net/natPlainSocketImpl.cc (bind): Don't go to error case
	when errno not set.
	(connect): Likewise.
	(accept): Likewise.
	(getOption): Likewise.
	* java/net/natPlainDatagramSocketImpl.cc (bind): Don't go to error
	case when errno not set.
	(peek): Likewise.
	(send): Likewise.
	(receive): Likewise.
	(mcastGrp): Likewise.
	(setOption): Likewise.
	(getOption): Likewise.

From-SVN: r35617
2000-08-11 03:07:59 +00:00
Bryce McKinlay af65739581 cvs commit ChangeLog
From-SVN: r35604
2000-08-10 10:10:58 +01:00
Bryce McKinlay e8244abeda Makefile.am: Move beans and applet classes to awt_java_source_files.
2000-08-09  Bryce McKinlay  <bryce@albatross.co.nz>

	* Makefile.am: Move beans and applet classes to
	awt_java_source_files.
	* Makefile.in: Rebuilt.

From-SVN: r35590
2000-08-09 14:03:26 +01:00
Tom Tromey 6dd1b06886 Input_UTF8.java (read): Fixed handling of surrogate characters.
* gnu/gcj/convert/Input_UTF8.java (read): Fixed handling of
	surrogate characters.
	* gnu/gcj/convert/Output_UTF8.java (standardUTF8): Default to
	true.
	(write): Correct handling of surrogate characters.

From-SVN: r35569
2000-08-08 17:35:32 +00:00
Tom Tromey d7ec12ae74 Method.java (hashCode): Use getName().
* java/lang/reflect/Method.java (hashCode): Use getName().
	(toString): Likewise.
	* java/lang/reflect/natMethod.cc (getType): Initialize
	exception_types.

From-SVN: r35561
2000-08-08 03:34:51 +00:00
Tom Tromey 273cea54e0 Method.java (toString): Use Class.getName, not Class.toString.
* java/lang/reflect/Method.java (toString): Use Class.getName, not
	Class.toString.
	* java/lang/reflect/Field.java (toString): Correct formatting.
	From Corey Minyard.

From-SVN: r35557
2000-08-07 20:03:40 +00:00
Tom Tromey 8ac80386ca PipedInputStream.java (read(byte[],int,int)): Mostly rewrote.
* java/io/PipedInputStream.java (read(byte[],int,int)): Mostly
	rewrote.
	(receive): Streamlined.

From-SVN: r35556
2000-08-07 19:59:48 +00:00
Tom Tromey 26dfad441d PrintWriter.java: Merged comments from Classpath.
* java/io/PrintWriter.java: Merged comments from Classpath.
	(printlnUnsynchronized): Removed.
	(println()): Print the separator.
	(println): Call println(), not printlnUnsynchronized.
	(out): Now protected, to match spec.

From-SVN: r35512
2000-08-06 01:54:07 +00:00
Tom Tromey 1ed67a71e4 StreamTokenizer.java (TT_NONE): Now private.
* java/io/StreamTokenizer.java (TT_NONE): Now private.
	(nextToken): Handle backslashed newline.  From Oskar Liljeblad.
	For PR java.io/301.

From-SVN: r35511
2000-08-06 00:49:29 +00:00
Bryce McKinlay d31772ca70 Missing changelog entry
From-SVN: r35469
2000-08-04 02:15:51 +01:00
Warren Levy 9b4773cbba ObjectInputStream.java (readFields): Turn off readDataFromBlock while reading via GetField.
* java/io/ObjectInputStream.java (readFields): Turn off
	readDataFromBlock while reading via GetField.
	(GetField$1.get(String, Object)): Pass Class of default value to
	getField.
	(getField): Allow for null default values.

	* java/io/ObjectOutputStream.java: Fixed typo in comment.
	(PutField$1.put): Fixed calls of checkType in most of the put
	methods to pass the correct parameter.
	(PutField$1.put(String, Object)): Allow for null value arg.
	(PutField$1.write): Turn off writeDataAsBlocks while writing via
	PutField.

	* java/io/ObjectStreamClass.java (serialPersistentFields): Fixed
	typo in spec'ed field name.
	(getSerialPersistentFields): Changed spelling of method to match
	the correct spelling of the spec'ed field name.

More serialization fixes per Mauve errors.

From-SVN: r35468
2000-08-04 00:42:20 +00:00
Tom Tromey 57b59acb05 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (awt_java_source_files): Added new files.

From-SVN: r35457
2000-08-03 17:56:02 +00:00
Bryce McKinlay af6ca671a6 Makefile.am: Make inner class CNI headers depend on libgcj.zip only.
2000-08-03  Bryce McKinlay  <bryce@albatross.co.nz>

	* Makefile.am: Make inner class CNI headers depend on libgcj.zip
	only.
	Fixes "make -j" builds.
	* Makefile.in: Rebuild.

From-SVN: r35441
2000-08-03 07:48:34 +01:00
Tom Tromey f536cd95fb Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (libgcj_la_SOURCES): Added posix.cc.
	* java/net/natPlainSocketImpl.cc: Include posix.h.
	(accept): Use _Jv_select.
	* java/net/natPlainDatagramSocketImpl.cc: Include posix.h.
	(receive): Use _Jv_select.
	* java/io/natFileDescriptorPosix.cc: Include posix.h.
	(available): Use _Jv_select.
	* java/lang/natSystem.cc: Include posix.h.
	(currentTimeMillis): Use _Jv_gettimeofday.
	* include/posix.h: New file.
	* posix.cc: New file.

From-SVN: r35435
2000-08-02 21:54:04 +00:00
Tom Tromey f9427d1704 encodings.pl: New file.
* scripts/encodings.pl: New file.
	* Makefile.in: Rebuilt.
	* Makefile.am (convert_source_files): Added IOConverter.java.
	* gnu/gcj/convert/UnicodeToBytes.java (UnicodeToBytes): Extend
	IOConverter.
	(getDefaultDecodingClass): Canonicalize default encoding name.
	(getEncoder): Likewise.
	* gnu/gcj/convert/BytesToUnicode.java (BytesToUnicode): Extend
	IOConverter.
	(getDefaultDecodingClass): Canonicalize default encoding name.
	(getDecoder): Likewise.
	* gnu/gcj/convert/IOConverter.java: New file.

From-SVN: r35432
2000-08-02 19:56:53 +00:00
Bryce McKinlay 79c2c6da2c [multiple changes]
2000-08-02  Bryce McKinlay  <bryce@albatross.co.nz>

        * interpret.cc (_Jv_InterpMethod::continue1): Type of `fun' changed
	to match C declaration in ffi.h.
	* Makefile.am: Add java/awt/Button.java.
	* Makefile.in: Rebuilt.

2000-07-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>

        * java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Type of the
        cast of the second argument to `ffi_raw_call' changed to match
        prototype.

2000-07-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>

        * jni.cc (_Jv_JNIMethod::call): Type of the cast of the second
        argument to `ffi_raw_call' changed to match prototype.

From-SVN: r35418
2000-08-02 04:25:13 +01:00
Bryce McKinlay aa18e0c184 Component.java (toString): Implemented.
* java/awt/Component.java (toString): Implemented.
	* java/awt/Container.java (addImpl): Remove FIXME. Only call
	dispatchEvent() to dispatch the event.
	(removeImpl): Ditto.

From-SVN: r35363
2000-07-31 05:11:49 +01:00
Anthony Green b708c42c7a Component.java: Add treeLock object.
2000-07-30  Anthony Green  <green@redhat.com>

        * java/awt/Component.java: Add treeLock object.
        (getTreeLock): Implement.
        (isShowing): Implement.

From-SVN: r35362
2000-07-31 02:33:12 +00:00
Tom Tromey e0a339f785 BorderLayout.java (BorderLayout()): New constructor.
* java/awt/BorderLayout.java (BorderLayout()): New constructor.

	* java/awt/Frame.java (Frame): Pass `null' to Window constructor.

	* java/awt/Window.java (addNotify): Wrote.
	(addWindowListener): Wrote.
	(getLocale): Wrote.
	(getWarningString): Wrote.
	(processEvent): Wrote.
	(processWindowEvent): Wrote.
	(removeWindowListener): Wrote.
	(show): Call validate(), setVisible().
	(toBack): Wrote.
	(toFront): Wrote.

	* java/awt/Toolkit.java (createWindow): Declare.

	* java/awt/Frame.java (addNotify): Use getToolkit to find
	toolkit.

	* java/awt/Component.java (invalidate): Wrote.
	(isValid): Wrote.
	(getToolkit): Wrote.

	* java/awt/Container.java (addContainerListener): Removed
	unnecessary cast.
	(removeContainerListener): Likewise.
	(addImpl): Wrote.
	(add(Component)): Use it.
	(add(String,Component)): Likewise.
	(add(Component,int)): Likewise.
	(add(Component,Object)): Likewise.
	(add(Component,Object,int)): Likewise.
	(doLayout): Wrote.
	(getAlignmentX): Wrote.
	(getAlignmentY): Wrote.
	(getComponentAt): Wrote.
	(getMaximumSize): Wrote.
	(invalidate): Wrote.
	(list(PrintStream,int)): Wrote.
	(list(PrintWriter,int)): Wrote.
	(getMinimumSize): Wrote.
	(getPreferredSize): Wrote.
	(printComponents): Wrote.
	(processContainerEvent): Look at containerListener, not
	componentListener.
	(remove): Added event processing and peer destruction.
	(removeAll): Use remove.
	(removeNotify): Wrote.
	(validate): Wrote.
	(validateTree): Wrote.

	* java/awt/Scrollbar.java (addNotify): Do nothing if peer exists.
	* java/awt/Label.java (addNotify): Do nothing if peer exists.
	* java/awt/Container.java (addNotify): Don't create Container
	peer.
	* java/awt/Button.java (addNotify): Do nothing if peer exists.

From-SVN: r35361
2000-07-31 02:03:51 +00:00
Tom Tromey 4e07a9eadb Container.java (remove(int)): Wrote.
* java/awt/Container.java (remove(int)): Wrote.
	(remove(Component)): Wrote.
	(add(Component)): Wrote.
	(add(Component,int)): Wrote.
	(removeAll): Wrote.
	(addNotify): Set our own peer.
	* java/awt/Scrollbar.java (listeners): Changed type.
	(Scrollbar): Don't initialize listeners.
	(addNotify): Wrote.
	(setValue): Call setValues.
	(setMinimum): Likewise.
	(setMaxPriority): Likewise.
	(setVisibleAmount): Likewise.
	(setValues): Wrote.
	(setUnitIncrement): Forward to peer.
	(setLineIncrement): Call setUnitIncrement.
	(setPageIncrement): Call setBlockIncrement.
	(setBlockIncrement): Forward to peer.
	(addAdjustmentListener): Rewrote.
	(removeAdjustmentListener): Rewrote.
	(processAdjustmentEvent): Rewrote.
	(paramString): Wrote.
	* Makefile.in: Rebuilt.
	* Makefile.am (awt_java_source_files): Added Button.java.
	* java/awt/Button.java: New file.
	* java/awt/Toolkit.java (createLabel): Declare.
	(createButton): Likewise.
	(createScrollbar): Likewise.
	(createContainer): Likewise.
	* java/awt/Label.java (addNotify): Wrote.
	(setAlignment): Call setAlignment in the peer.
	(setText): Call setText in the peer.

From-SVN: r35354
2000-07-30 23:19:57 +00:00
Warren Levy 2dacb3e9ce ObjectOutputStream.java (writeObject): Per spec, call NotSerializableException with just the class name.
* java/io/ObjectOutputStream.java (writeObject): Per spec, call
	NotSerializableException with just the class name.

From-SVN: r35325
2000-07-28 23:48:19 +00:00
Andrew Haley 99f7658d7c interpret.cc (continue1): Insert missing break into switch.
2000-07-26  Andrew Haley  <aph@cygnus.com>

        * interpret.cc (continue1): Insert missing break into switch.

From-SVN: r35316
2000-07-28 13:11:45 +00:00
Warren Levy 614ee7902b ObjectStreamException.java: Made constructors protected.
* java/io/ObjectStreamException.java: Made constructors protected.

Adjusts serialVersionUID.

From-SVN: r35315
2000-07-28 11:58:03 +00:00
Tom Tromey 8fec62b138 OutputStreamWriter.java (close): Only flush if not closed.
* java/io/OutputStreamWriter.java (close): Only flush if not
	closed.

From-SVN: r35309
2000-07-28 02:54:16 +00:00
Warren Levy 7db51521a0 mauve-libgcj: Activated serialization tests.
* mauve-libgcj: Activated serialization tests.
	* gcj/field.h (getModifiers): Mask off unknown flags.
	* gnu/java/security/provider/SHA.java (munch): Reset buffer to 0 so
	spurious bits don't cause discrepancies.
	* java/io/ObjectOutputStream.java: Fixed typo in comment.
	* java/io/ObjectStreamClass.java: Fixed typos in comments.
	(lookup): Applied patch from Brian Jones <cbj@gnu.org> to optimize.
	(hasClassInitializer): Call getDeclaredMethod instead of getMethod.
	* java/lang/Throwable.java (serialVersionUID): New field.
	* java/lang/reflect/Modifier.java (ALL_FLAGS): Preserve STRICT if used.
	* java/lang/reflect/natConstructor.cc (getModifiers): Mask off
	unknown flags.
	* java/lang/reflect/natMethod.cc: Ditto.
	* java/security/Key.java (serialVersionUID): Removed field for now.
	* java/security/interfaces/DSAPrivateKey.java (serialVersionUID): Ditto.
	* java/security/interfaces/DSAPublicKey.java (serialVersionUID): Ditto.

Serialization mods.

From-SVN: r35302
2000-07-27 23:57:07 +00:00
Tom Tromey 2d97a71922 RectangularShape.java (getPathIterator): Wrote.
* java/awt/geom/RectangularShape.java (getPathIterator):
	Wrote.

From-SVN: r35295
2000-07-27 16:27:42 +00:00
Rolf W. Rasmussen 69b1b29156 ColorModel.java: New file...
2000-07-23  Rolf W. Rasmussen  <rolfwr@ii.uib.no>

	* libjava/java/awt/image/ColorModel.java: New file, replaces the
	stub libjava/java/awt/ColorModel.java which was located in the
	wrong package.
	* libjava/java/awt/image/ComponentColorModel.java: New file.
	* libjava/java/awt/image/ComponentSampleModel.java: New file.
	* libjava/java/awt/image/DataBuffer.java: New file.
	* libjava/java/awt/image/DataBufferByte.java: New file.
	* libjava/java/awt/image/DataBufferInt.java: New file.
	* libjava/java/awt/image/DataBufferUShort.java: New file.
	* libjava/java/awt/image/DirectColorModel.java: New file.
	* libjava/java/awt/image/PackedColorModel.java: New file.
	* libjava/java/awt/image/Raster.java: New file.
	* libjava/java/awt/image/SampleModel.java: New file.
	* libjava/java/awt/image/SinglePixelPackedSampleModel.java: New
	file.
	* libjava/java/awt/image/IndexColorModel.java: New file.
	* libjava/java/awt/image/ImageConsumer.java: Removed import of
	java.awt.ColorModel stub.

	* gnu/gcj/util/BitMaskExtent.java: New file, utility class.
	* gnu/gcj/util/Buffers.java: New file, utility class.

	* libjava/Makefile.am: Updated to include new files.
	* libjava/Makefile.in: Rebuilt.

From-SVN: r35245
2000-07-25 17:53:30 +00:00
Oskar Liljeblad 05ae1c31cf StreamTokenizer.java: Merged with classpath.
2000-07-23  Oskar Liljeblad <osk@hem.passagen.se>

	* java/io/StreamTokenizer.java: Merged with classpath.

From-SVN: r35208
2000-07-23 17:52:13 +00:00
Tom Tromey 8039a4ea73 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (awt_java_source_files): Updated for new files.
	* java/awt/Adjustable.java (HORIZONTAL, VERTICAL): Set values.
	* java/awt/Label.java: New file.
	* java/awt/Rectangle.java (Rectangle): Extend Rectangle2D.
	(createIntersection, createUnion, getBounds2D): New methods.
	* java/awt/Scrollbar.java: New file.
	* java/awt/Shape.java: Updated to 1.2.
	* java/awt/geom/AffineTransform.java: New file.
	* java/awt/geom/Ellipse2D.java: New file.
	* java/awt/geom/NoninvertibleTransformException.java: New file.
	* java/awt/geom/PathIterator.java: New file.
	* java/awt/geom/Rectangle2D.java: New file.
	* java/awt/geom/RectangularShape.java: New file.
	* java/awt/geom/Point2D.java (Double, Float): New inner classes.
	* java/awt/geom/IllegalPathStateException.java: New file.

From-SVN: r35195
2000-07-23 00:24:14 +00:00
Tom Tromey 266a442034 * scripts/showval.java: New file.
From-SVN: r35152
2000-07-20 19:35:43 +00:00
Tom Tromey 7f8a07dbea classes.pl (scan): Print inner classes properly.
* scripts/classes.pl (scan): Print inner classes properly.
	* gcj/javaprims.h: Updated class list.

From-SVN: r35151
2000-07-20 19:34:29 +00:00
Tom Tromey 5e5c1371d3 natClassLoader.cc (_Jv_PrepareCompiledClass): Only initialize String fields for interpreted classes.
* java/lang/natClassLoader.cc (_Jv_PrepareCompiledClass): Only
	initialize String fields for interpreted classes.  Fixes bug
	reported by Hans Boehm.

From-SVN: r35150
2000-07-20 19:31:16 +00:00
Tom Tromey 373d3b1863 File.java (getParentFile): New method, from Classpath via Oskar Liljeblad.
* java/io/File.java (getParentFile): New method, from Classpath
	via Oskar Liljeblad.

From-SVN: r35149
2000-07-20 19:29:14 +00:00
Tom Tromey 75723df4d3 * java/util/Vector.java (remove(Object)): Implemented.
From-SVN: r35148
2000-07-20 19:27:57 +00:00
Jeff Sturm 5cc80caa27 natThrowable.cc (fillInStackTrace): Check for zero return from backtrace().
2000-07-19  Jeff Sturm  <jeff.sturm@appnet.com>

	* java/lang/natThrowable.cc (fillInStackTrace): Check for
	zero return from backtrace().

From-SVN: r35135
2000-07-19 14:37:56 +00:00
Bryce McKinlay c180a82d69 commit changelog
From-SVN: r35044
2000-07-15 06:12:47 +01:00
Bryce McKinlay 826b480791 Add missing files from last check-in:
* java/awt/image/ImageConsumer.java: New file.
	* java/awt/image/ImageProducer.java: New file.
	* java/awt/image/ImageObserver.java: New file.

From-SVN: r35000
2000-07-12 22:13:51 +01:00
Bryce McKinlay e98da3dcf5 backport: Applet.java: New file.
2000-07-12  Bryce McKinlay  <bryce@albatross.co.nz>

	Merged implementation of java.applet from classpath:
	* java/applet/Applet.java: New file.
	* java/applet/AppletContext.java: New file.
	* java/applet/AppletStub.java: New file.
	* java/applet/AudioClip.java: New file.

	* Makefile.am: Added new java.applet classes.
	* Makefile.in: Rebuilt.

From-SVN: r34981
2000-07-12 05:52:04 +01:00
Bryce McKinlay c7a136d3ef Big AWT patch.
From-SVN: r34976
2000-07-12 04:32:07 +01:00
Tom Tromey 4ea9cbf197 natClassLoader.cc (_Jv_PrepareCompiledClass): Initialize static final String fields.
* java/lang/natClassLoader.cc (_Jv_PrepareCompiledClass):
	Initialize static final String fields.

From-SVN: r34910
2000-07-07 20:54:32 +00:00
Tom Tromey fa948ac381 PrintWriter.java (print): Call write(String), not print(String).
* java/io/PrintWriter.java (print): Call write(String), not
	print(String).  See PR libgcj/277.
	(print(String)): Use write, not out.write.

From-SVN: r34853
2000-07-03 21:03:52 +00:00
Tom Tromey e5858cc975 * include/jni.h: Include <gcj/array.h>. Fixes PR libgcj/270.
From-SVN: r34818
2000-06-30 23:09:44 +00:00
Andrew Haley 52fa9d82f4 re GNATS java.io/203 (File.createTempFile doesn't close descriptor)
2000-06-27  Andrew Haley  <aph@cygnus.com>

       * java/io/File.java (createTempFile): Close the FileDescriptor
       used to create a temp file.  Fixes some of PR 203.
       * java/io/natFileDescriptorPosix.cc (open): Call garbage
       collection if we run out of file handles.

From-SVN: r34755
2000-06-28 12:24:10 +00:00
Warren Levy 580ac50392 Removed extraneous conflict marker.
From-SVN: r34754
2000-06-28 11:26:42 +00:00
Warren Levy 2017da526c Gnu.java: New file.
* gnu/java/security/provider/Gnu.java: New file.
	* gnu/java/security/provider/SHA.java: New file.
	* gnu/java/security/provider/SHA1PRNG.java: New file.
	* Makefile.am: Added the above files.
	* Makefile.in: Rebuilt.

	* java/io/ObjectStreamClass.java (setUID): Use Gnu SHA instead of SHS.

From-SVN: r34753
2000-06-28 11:24:05 +00:00
Bryce McKinlay 06772c7d0e ThreadGroup.java: Added synchronized flag to many methods.
* ThreadGroup.java: Added synchronized flag to many methods.
	(destroyed_flag): Removed.
	(isDestroyed, removeGroup, removeThread): Test for parent == null.
	(activeCount): Added spec note.

From-SVN: r34750
2000-06-28 07:03:11 +01:00
Warren Levy d9984f96fc Principal.java: New file.
* java/security/Principal.java: New file.
	* Makefile.am: Added Principal.java.
	* Makefile.in: Rebuilt.

From-SVN: r34749
2000-06-28 01:31:42 +00:00
Rolf W. Rasmussen b32dabe5ed MouseEvent.java: Fixed coordinate space confusion.
2000-06-27  Rolf W. Rasmussen  <rolfwr@ii.uib.no>

	* java/awt/event/MouseEvent.java: Fixed coordinate space
	confusion.

From-SVN: r34746
2000-06-27 21:30:34 +00:00
Tom Tromey 56067b0077 PushbackInputStream.java (read): If there are characters in the buffer, don't also call super.read().
* java/io/PushbackInputStream.java (read): If there are characters
	in the buffer, don't also call super.read().
	* java/io/PushbackReader.java (read): If there are characters in
	the buffer, don't also call super.read().

From-SVN: r34745
2000-06-27 21:27:50 +00:00
Tom Tromey 260e1a2bb0 * java/lang/Double.java (valueOf): Call parseDouble().
From-SVN: r34737
2000-06-27 18:35:54 +00:00
Warren Levy 7b245d2461 PropertyChangeEvent.java (oldVal): Renamed to oldValue.
* java/beans/PropertyChangeEvent.java (oldVal): Renamed to oldValue.
	(newVal): Renamed to newValue.
	* java/beans/PropertyVetoException.java (changeEvent): Renamed to evt.
	* java/beans/beancontext/BeanContextServiceRevokedEvent.java
	(revokeNow): Renamed to invalidateRefs.
	* java/io/OptionalDataException.java: Updated FIXME.
	(eof): New placeholder field.
	(length); Ditto.
	* java/io/WriteAbortedException.java (message): Made transient.
	* java/lang/ClassNotFoundException.java: Updated comments for JDK 1.2.
	* java/lang/Throwable.java (stackTrace): Made transient.
	* java/net/InetAddress.java: Made Serializable.
	* java/security/KeyPair.java: Made Serializable.
	* java/security/Provider.java: Replaced with Classpath version that
	implements serialization and proper methods.
	* java/text/ChoiceFormat.java (strings): Renamed to choiceFormats.
	(limits): Renamed to choiceLimits.

Serialization changes per:
http://java.sun.com/products/jdk/1.2/docs/api/serialized-form.html

From-SVN: r34726
2000-06-27 05:10:03 +00:00
Tom Tromey cf036e712c natDouble.cc (parseDouble): Renamed from doubleValueOf.
* java/lang/natDouble.cc (parseDouble): Renamed from
	doubleValueOf.
	* java/lang/Double.java (parseDouble): Renamed from
	doubleValueOf.  Now public.

From-SVN: r34679
2000-06-24 18:11:01 +00:00
Andrew Haley 56e3dd2cea ieeefp.h: Handle ia64, fr30, mcore.
* java/lang/ieeefp.h: Handle ia64, fr30, mcore.
	* java/lang/natThrowable.cc: On IA-64, use __ia64_backtrace.

From-SVN: r34667
2000-06-23 19:53:33 +00:00
Tom Tromey 782c59d653 natMethod.cc: Include <alloca.h>.
* java/lang/reflect/natMethod.cc: Include <alloca.h>.
	* java/lang/natDouble.cc: Always include <alloca.h>.
	Fix for PR libgcj/267.

From-SVN: r34665
2000-06-23 17:39:00 +00:00
Bryce McKinlay 0ee935e162 ThreadGroup.java (add(Thread)): Rename to addThread() to comply with classpath VM spec.
2000-06-21  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/lang/ThreadGroup.java (add(Thread)): Rename to addThread() to
	comply with classpath VM spec.
	(add(Group)): Rename to addGroup().
	* java/lang/Thread.java (Thread): Use addThread().
	* java/lang/natThread.cc (finish_): Use removeThread().

From-SVN: r34627
2000-06-21 04:55:35 +01:00
Bryce McKinlay 6dfd8a7790 ThreadGroup.java: Merged with classpath.
2000-06-20  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/lang/ThreadGroup.java: Merged with classpath.
	* prims.cc (_Jv_RunMain): Don't use 
ain_group'.
	* gnu/gcj/runtime/FirstThread.java: Remove ThreadGroup constructor
	argument.
	* java/lang/Thread.java (Thread): Bootstrap initial thread from
	ThreadGroup.root if Thread.currentThread is null. Honour the
	ThreadGroup's max priority setting.

From-SVN: r34615
2000-06-20 14:30:14 +01:00
Tom Tromey d4d17e95f1 re GNATS gcj/260 ("Klass.class" expression should cause Klass to be initialized)
* java/lang/natClass.cc (forName): Removed dead code.  Initialize
	returned class.  For PR gcj/260.

From-SVN: r34590
2000-06-18 22:14:06 +00:00
Tom Tromey 3fff847575 re GNATS libgcj/261 (Macro-inconsistency)
Fix for PR libgcj/261:
	* include/win32-signal.h (MAKE_THROW_FRAME): Added `_exception'
	argument.
	* include/sparc-signal.h (MAKE_THROW_FRAME): Added `_exception'
	argument.  (This is a patch from long ago that somehow went
	missing.)

From-SVN: r34575
2000-06-16 15:52:24 +00:00
Tom Tromey ff1c0096a1 natIconv.cc (iconv_adapter): New function.
* gnu/gcj/convert/natIconv.cc (iconv_adapter): New function.
	(read): Use it.
	(write): Likewise.

From-SVN: r34570
2000-06-16 01:11:12 +00:00
Bryce McKinlay 1bf8972740 2000-06-15 Bryce McKinlay <bryce@albatross.co.nz>
Fix for PR java.lang/258:
	* prims.cc (_Jv_PrimClass): Set state of primitive class to
	JV_STATE_DONE, to prevent accidental initialization.
	* java/lang/natClass.cc (_Jv_IsAssignableFrom): Call
	_Jv_InterfaceAssignableFrom if target is an interface and source is
	an interface or an abstract class. Remove redundant initializeClass
	calls. Remove duplicate if_idt test.
	(_Jv_InterfaceAssignableFrom): New function.
	* java/lang/Class.h (_Jv_InterfaceAssignableFrom): Prototype.

From-SVN: r34563
2000-06-15 13:04:50 +01:00
Bryce McKinlay d655f87d6f 2000-06-15 Bryce McKinlay <bryce@albatross.co.nz>
Fix for PR java.lang/258:
	* prims.cc (_Jv_PrimClass): Set state of primitive class to
	JV_STATE_DONE, to prevent accidental initialization.
	* java/lang/natClass.cc (_Jv_IsAssignableFrom): Call
	_Jv_InterfaceAssignableFrom if target is an interface and source is
	an interface or an abstract class. Remove redundant initializeClass
	calls. Remove duplicate if_idt test.
	* java/lang/Class.h (_Jv_InterfaceAssignableFrom): New function.

From-SVN: r34562
2000-06-15 12:58:18 +01:00
Tom Tromey c74e221410 prims.cc (DECLARE_PRIM_TYPE): Define a vtable as well.
* prims.cc (DECLARE_PRIM_TYPE): Define a vtable as well.
	(_Jv_PrimClass): Set `methods' by calling _Jv_FindArrayClass.
	* include/jvm.h (struct _Jv_ArrayVTable): Declare.
	(NUM_OBJECT_METHODS): New define.
	* java/lang/natClassLoader.cc (_Jv_FindArrayClass): Added
	`array_vtable' parameter.  Added assertion.
	* java/lang/Class.h (_Jv_FindArrayClass): Added `array_vtable'
	parameter.

From-SVN: r34312
2000-05-31 23:50:37 +00:00
Bryce McKinlay f1aa7a521a cni.h: Include <string.h>.
2000-05-31  Bryce McKinlay  <bryce@albatross.co.nz>

	* gcj/cni.h: Include <string.h>.
	* defineclass.cc: Include <alloca.h>.
	* interpret.cc: Ditto.
	* gij.cc: Include <stdlib.h>.

From-SVN: r34311
2000-05-31 23:49:19 +01:00
Tom Tromey efc7058478 name-finder.h: Include <sys/wait.h>.
* include/name-finder.h: Include <sys/wait.h>.
	(_Jv_name_finder::pid): Now of type `pid_t'.
	(_Jv_name_finder::~_Jv_name_finder): Call waitpid().
	* java/lang/Throwable.java (CPlusPlusDemangler.close): Call
	`proc.waitFor()'.

From-SVN: r34279
2000-05-30 23:26:02 +00:00
Warren Levy 0d0cd44169 ObjectOutputStream.java (writeObject): Use component type when writing arrays.
* java/io/ObjectOutputStream.java (writeObject): Use component type
	when writing arrays.
	Fixed typo.

From-SVN: r34142
2000-05-24 21:15:51 +00:00
Bryce McKinlay 1c02a3d964 re GNATS libgcj/226 (implicit __builtin_expect) and GNATS gcj/228 (compressed JAR files)
2000-05-20  Bryce McKinlay  <bryce@albatross.co.nz>

	Fix for PR libgcj/226:
	* java/lang/Class.h (_Jv_InitClass): Don't call __builtin_expect,
	since this is an installed header.

	Fix for PR libgcj/228:
	* java/util/zip/ZipFile (getInputStream): Create inflater with
	nowrapper option.

	* java/util/zip/natInflater.cc (inflate): Throw zlib's error message
	with DataFormatException.

From-SVN: r34064
2000-05-21 00:30:46 +01:00
Tom Tromey fa5b690ab6 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (hack1): Removed.
	(awto_files): Likewise.
	(libgcjawt_la_SOURCES): Likewise.
	(EXTRA_libgcjawt_la_SOURCES): Likewise.
	(libgcjawt_la_DEPENDENCIES): Likewise.
	(libgcjawt_la_LIBADD): Likewise.
	(libgcjawt_la_LDFLAGS): Likewise.
	(libgcjawt_la_LINK): Likewise.
	($(awt_java_source_files:.java=.class)): Likewise.
	(libgcj.zip): Don't depend on AWT files.
	(MOSTLYCLEANFILES): Don't include AWT files.
	($(awto_files)): Removed.
	(nat_headers): Removed AWT files.
	(cond_awt_java_source_files): Removed.
	(ordinary_java_source_files): Added awt_java_source_files.
	* libgcj.spec.in (*lib): Removed -lgcjawt.
	* configure: Rebuilt.
	* configure.in: Removed --enable-java-awt option.

From-SVN: r34058
2000-05-20 20:26:51 +00:00
Bryce McKinlay ee2f99a584 ZipEntry.java: Implement Cloneable, per JDK1.2 docs.
2000-05-20  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/util/zip/ZipEntry.java: Implement Cloneable, per JDK1.2 docs.
	(ZipEntry): Copy the Name' field.
	(clone): Implement JDK1.2 method.
	(setCompressedSize): ditto.
	(hashCode): ditto.

From-SVN: r34043
2000-05-20 06:46:20 +01:00
Tom Tromey ee7ea78d2a Removed duplicate ChangeLog entry
From-SVN: r34042
2000-05-20 01:17:57 +00:00
Tom Tromey 1dcc053603 BufferedWriter.java: Merged with Classpath.
* java/io/BufferedWriter.java: Merged with Classpath.
	* java/io/BufferedOutputStream.java: Merged with Classpath.

From-SVN: r34041
2000-05-19 23:35:34 +00:00
Tom Tromey 6c80c45e30 Jumbo patch:
* Imported beans and serialization
* Updated IA-64 port
* Miscellaneous bug fixes

From-SVN: r34028
2000-05-19 17:55:34 +00:00
Bryce McKinlay c1f76317e4 From Gregory R. Warnes <warnes@biostat.washington.edu>:
* gnu/gcj/protocol/jar/Connection.java (getJarFile): Test for null
	`jarFile', not `jarFileURL'.

From-SVN: r34005
2000-05-19 00:50:34 +01:00
Bryce McKinlay fc5b21380e Thread.java: Declare `data' as Object, not RawData.
2000-05-18  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/lang/Thread.java: Declare `data' as Object, not RawData.
	* java/lang/natThread.java (initialize_native): Cast `data' to
	jobject.
	* gnu/gcj/RawData.java: Clarify documentation.

From-SVN: r33981
2000-05-18 11:08:25 +01:00
Andrew Haley 3951562dfa ppc-signal.h: New file.
2000-05-15  Andrew Haley  <aph@cygnus.com>

        * include/ppc-signal.h: New file.

From-SVN: r33932
2000-05-16 14:38:21 +00:00
Tom Tromey 839ba6c895 ZipInputStream.java (getNextEntry): When reading file headers, don't include `size' in the skip call.
* java/util/zip/ZipInputStream.java (getNextEntry): When reading
	file headers, don't include `size' in the skip call.

From-SVN: r33850
2000-05-11 17:05:03 +00:00
Bryce McKinlay ac83e16bc4 StringBuffer.java (replace): Calculate length for arraycopy() correctly.
2000-05-10  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/lang/StringBuffer.java (replace): Calculate length for
	arraycopy() correctly.

From-SVN: r33822
2000-05-10 12:13:17 +01:00
Bryce McKinlay fe517fb2c9 StringBuffer.java (delete): Call arrayCopy() correctly.
2000-05-10  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/lang/StringBuffer.java (delete): Call arrayCopy() correctly.
	Avoid arrayCopy() call where possible. Update `count' _after_ calling
	arrayCopy().
	(replace): Reimplemented. Fix javadoc.
	(reverse): Call ensureCapacity_unsynchronized().
	(StringBuffer (String)): Use DEFAULT_CAPACITY.

From-SVN: r33819
2000-05-10 11:15:13 +01:00
Tom Tromey 2238de654f StringBuffer.java (toString): Don't mark buffer as shared.
* java/lang/StringBuffer.java (toString): Don't mark buffer as
	shared.
	(insert(int,char[],int,int): New method.
	(delete): New method from Classpath.
	(deleteCharAt): Likewise.
	(substring): Likewise.
	(shared): No longer private.
	Added JavaDoc comments from Classpath.
	* java/lang/String.java (String(StringBuffer)): Ensure `buffer' is
	shared.

From-SVN: r33809
2000-05-09 22:46:58 +00:00
Tom Tromey 89b6698a3e Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (LIBLINK): New macro.
	(libgcj_la_LINK): Use it.
	(libgcjawt_la_LINK): Likewise.

From-SVN: r33760
2000-05-07 16:02:00 +00:00
Tom Tromey fad163ed2f Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (libgcj.zip): Don't pass -L to javac.

From-SVN: r33728
2000-05-06 16:25:13 +00:00
Tom Tromey 327f248083 re GNATS libgcj/220 (build fails with "only absolute run-paths are allowed" error during linking)
Fix for PR libgcj/220:
	* Makefile.in: Rebuilt.
	* Makefile.am (gij_LDFLAGS): Don't use libstdc++.
	(jv_convert_LDFLAGS): Likewise.
	(libgcj_la_LDFLAGS): Likewise.
	(GCJLINK): New macro.
	(jv_convert_LINK): Use it.
	(gij_LINK): Likewise.
	(libgcj_la_LINK): New macro.
	(libgcjawt_la_LINK): Likewise.

From-SVN: r33706
2000-05-05 16:11:36 +00:00
Tom Tromey a52dee2f36 field.h (JvFieldIsRef): Return false for gnu.gcj.RawData field.
* gcj/field.h (JvFieldIsRef): Return false for gnu.gcj.RawData
	field.
	* boehm.cc (_Jv_MarkObj): Removed dead code.  Use `STATIC', not
	`0x0008'.
	Include Modifier.h.

From-SVN: r33702
2000-05-05 04:46:26 +00:00
Bryce McKinlay 9d4c21486c natClass.cc (isInstance): Use __builtin_expect.
2000-05-05  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/lang/natClass.cc (isInstance): Use __builtin_expect.
	(_Jv_IsAssignableFrom): Ditto.
	(_Jv_IsInstanceOf): Ditto.
	(_Jv_CheckCast): Ditto.
	(_Jv_CheckArrayStore): Ditto.
	* java/lang/Class.h (_Jv_InitClass): Ditto.
	* java/lang/natObject.cc (_Jv_MonitorEnter): __builtin_expect `false',
	not `0'.
	(notify): Ditto.
	(notifyAll): Ditto.
	(wait): Ditto.
	(_Jv_MonitorExit): Ditto.
	* boehm.cc (_Jv_MarkObj): Ditto.
	(_Jv_MarkObj): Ditto.
	(_Jv_MarkArray): Ditto.
	* prims.cc (_Jv_AllocObject): Ditto.
	(_Jv_NewObjectArray): Ditto.
	(_Jv_NewPrimArray): Ditto.
	(_Jv_Malloc): Ditto.
	(_Jv_Realloc): Ditto.
	(_Jv_MallocUnchecked): Ditto.
	(_Jv_divI): Ditto.
	(_Jv_remI): Ditto.
	(_Jv_divJ): Ditto.
	(_Jv_remJ): Ditto.

From-SVN: r33698
2000-05-05 03:56:14 +01:00
Tom Tromey aff3283b59 Removed erroneous ChangeLog entry
From-SVN: r33672
2000-05-04 15:51:47 +00:00
Tom Tromey f70b7142c2 Locale.java (Locale): Don't explicitly check for null.
* java/util/Locale.java (Locale): Don't explicitly check for
	null.
	* java/util/Hashtable.java (containsKey): Don't explicitly check
	for null.
	(get): Likewise.
	* java/util/BitSet.java (and, or, xor): Don't explicitly check for
	null.
	* java/util/zip/ZipEntry.java (ZipEntry): Don't explicitly check
	for null.
	* java/text/StringCharacterIterator.java
	(StringCharacterIterator): Don't check for null.
	* java/text/ChoiceFormat.java (setChoices): Don't explicitly check
	for null pointer.
	* java/net/MulticastSocket.java (joinGroup): Don't explicitly
	check for null pointer.
	(leaveGroup): Likewise.
	* java/net/DatagramPacket.java (DatagramPacket): Removed erroneous
	comment.
	(setData): Likewise.
	* java/lang/ThreadGroup.java (ThreadGroup): Don't explicitly check
	for `p==null'.

From-SVN: r33671
2000-05-04 15:50:34 +00:00
Jakub Jelinek 1f57788658 Makefile.am (GCJCOMPILE, [...]): Move -L option out of FLAGS.
2000-04-28  Jakub Jelinek  <jakub@redhat.com>

	* Makefile.am (GCJCOMPILE, JCFLAGS, JF1CLAGS, jv_convert_LINK,
	gij_LINK, libgcj.zip, .java=.class): Move -L option out of FLAGS.
	(libgcj_la_LDFLAGS): Add -L../libstdc++ for in-gcc builds.
	(jv_convert_LDFLAGS, gij_LDFLAGS): Add `pwd`/../libstdc++ to
	-rpath for in-gcc builds.
	* Makefile.in: Rebuilt.

From-SVN: r33587
2000-05-01 21:36:39 +00:00
Tom Tromey 72ddef6d32 Removed mistakenly-committed ChangeLog entry
From-SVN: r33512
2000-04-28 16:29:30 +00:00
Tom Tromey f9f70f2dda re GNATS gcj/218 (Java executables can abort trying to access a null pointer in a leaf function)
* libgcj.spec.in (*jc1): Added -fasynchronous-exceptions.
	Fix for PR gcj/218.

From-SVN: r33511
2000-04-28 16:11:56 +00:00
Bryce McKinlay 065ccab369 String.java (toString): Remove `final' hack.
2000-04-28  Bryce McKinlay  <bryce@albatross.co.nz>

	* libjava/java/lang/String.java (toString): Remove `final' hack.

From-SVN: r33508
2000-04-28 08:56:34 +01:00
Tom Tromey 40f4ae3280 Runtime support for PR gcj/2:
* prims.cc (_Jv_ThrowNullPointerException): New function.
	* include/jvm.h (_Jv_ThrowNullPointerException): Declare.

From-SVN: r33492
2000-04-27 23:13:31 +00:00
Bryce McKinlay af4464eb46 prims.cc (_Jv_NewObjectArray): Fix typo.
2000-04-27  Bryce McKinlay  <bryce@albatross.co.nz>

        * prims.cc (_Jv_NewObjectArray): Fix typo.

From-SVN: r33479
2000-04-27 12:47:13 +01:00
Tom Tromey 09acb3e19d Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (AM_CXXFLAGS): Added -fasynchronous-exceptions.

From-SVN: r33447
2000-04-26 17:29:05 +00:00
Jeff Sturm 448415dcae natFirstThread.cc (run): Initialize class before calling main.
* gnu/gcj/runtime/natFirstThread.cc (run): Initialize class before
	calling main.

From-SVN: r33377
2000-04-24 15:07:16 +00:00
Anthony Green 1143c0a03f + 2000-04-22 Anthony Green <green@cygnus.com> + + * include/jvm.h (__builtin_expect): Define as unused for now.
+ 2000-04-22  Anthony Green  <green@cygnus.com>
+
+ 	* include/jvm.h (__builtin_expect): Define as unused for now.
+ 	* java/lang/natObject.cc (_Jv_MonitorEnter): Add __builtin_expect.
+ 	(notify): Ditto.
+ 	(notifyAll): Ditto.
+ 	(wait): Ditto.
+ 	(_Jv_MonitorExit): Ditto.
+ 	* boehm.cc (_Jv_MarkObj): Ditto.
+ 	(_Jv_MarkObj): Ditto.
+ 	(_Jv_MarkArray): Ditto.
+ 	(_Jv_AllocBytes): Ditto.
+ 	* prims.cc (_Jv_AllocObject): Ditto.
+ 	(_Jv_NewObjectArray): Ditto.
+ 	(_Jv_NewPrimArray): Ditto.
+ 	(_Jv_Malloc): Ditto.
+ 	(_Jv_Realloc): Ditto.
+ 	(_Jv_MallocUnchecked): Ditto.
+ 	(_Jv_divI): Ditto.
+ 	(_Jv_remI): Ditto.
+ 	(_Jv_divJ): Ditto.
+ 	(_Jv_remJ): Ditto.
+
+ 	* include/Makefile.in: Rebuilt.
+ 	* include/Makefile.am (include_HEADERS): Add jvmpi.h.
+

From-SVN: r33339
2000-04-22 17:09:39 +00:00
Tom Tromey 6cd167e1a7 PipedInputStream.java, [...]: Yet another new version from Classpath.
* java/io/PipedInputStream.java, java/io/PipedOutputStream.java:
	Yet another new version from Classpath.

From-SVN: r33328
2000-04-21 21:41:32 +00:00
Tom Tromey 7234f9bc03 re GNATS libgcj/15 (_REENTRANT should be defined more consistently)
Fix for PR libgcj/15:
	* java/util/natGregorianCalendar.cc (_REENTRANT,
	_POSIX_PTHREAD_SEMANTICS): Don't define.
	* java/net/natInetAddress.cc (_REENTRANT): Don't define.
	* java/lang/natSystem.cc (_REENTRANT, _POSIX_PTHREAD_SEMANTICS):
	Don't define.
	* java/io/natFile.cc (_REENTRANT, _POSIX_PTHREAD_SEMANTICS): Don't
	define.
	* configure: Rebuilt.
	* configure.in: If using POSIX threads, define _REENTRANT if
	needed.  Define _POSIX_PTHREAD_SEMANTICS.  Don't define
	GETHOSTBYNAME_R_NEEDS_REENTRANT.

From-SVN: r33318
2000-04-21 20:38:43 +00:00
Tom Tromey 051d082b26 PipedInputStream.java, [...]: New version from Classpath.
* java/io/PipedInputStream.java, java/io/PipedReader.java,
	java/io/PipedOutputStream.java, java/io/PipedWriter.java: New
	version from Classpath.

From-SVN: r33316
2000-04-21 20:12:05 +00:00
Tom Tromey 93bc735f86 re GNATS libgcj/213 (Another parallel build error)
Fix for PR libgcj/213:
	* Makefile.in: Rebuilt.
	* Makefile.am (gij_SOURCES): Added gij.cc.
	(EXTRA_gij_SOURCES): Removed.
	(gij_LDADD): Removed gij.lo.
	(gij_DEPENDENCIES): Likewise.
	($(gij_OBJECTS)): Depend on nat_headers.

From-SVN: r33307
2000-04-21 14:23:44 +00:00
Tom Tromey ab8d774e06 Handler.java (openConnection): Use `setURL', not `url.set'.
* gnu/gcj/protocol/file/Handler.java (openConnection): Use
	`setURL', not `url.set'.

From-SVN: r33306
2000-04-21 14:18:49 +00:00
Tom Tromey d3474943bf Fix for PR java.io/204:
* java/io/PipedInputStream.java, java/io/PipedReader.java,
	java/io/PipedOutputStream.java, java/io/PipedWriter.java: Imported
	from Classpath.

From-SVN: r33300
2000-04-21 01:18:16 +00:00
Tom Tromey 18fcc4961b re GNATS libgcj/212 (build is broken on Linux/Alpha)
Fix for PR libgcj/212:
	* gcj/javaprims.h (_Jv_word, _Jv_word2): Removed definitions.
	* include/jvm.h (_Jv_word, _Jv_word2): Define.
	* java/lang/Class.h (_Jv_word): Declare.

From-SVN: r33292
2000-04-20 22:24:33 +00:00
Tom Tromey 6e84eab83f * jni.cc (_Jv_JNI_PopSystemFrame): Clear `env->ex'.
From-SVN: r33285
2000-04-20 17:39:30 +00:00
Tom Tromey af98124ef9 jni.cc (_Jv_JNI_FindClass): Use system class loader if class doesn't have a loader.
* jni.cc (_Jv_JNI_FindClass): Use system class loader if class
	doesn't have a loader.

From-SVN: r33272
2000-04-20 05:49:48 +00:00
Bryce McKinlay 4824d1bb6e boehm.cc: (_Jv_MarkObj...
2000-04-19  Bryce McKinlay  <bryce@albatross.co.nz>

	* boehm.cc: (_Jv_MarkObj, _Jv_MarkArray): Cast pointers for
	MAYBE_MARK to ptr_t, for compatibility with new GC version.

From-SVN: r33252
2000-04-19 11:10:39 +01:00
Bryce McKinlay 8bfecb841a re GNATS java.io/202 (File creation doesn't observe umask)
2000-04-16  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/io/natFileDescriptorPosix.cc (open): Use mode 0666. Fix for
	PR libgcj/202.
	(available): Initialize `Where' to prevent bogus compiler warning.

From-SVN: r33181
2000-04-16 04:09:27 +01:00
Tom Tromey cc309dd512 natString.cc (intern): Temporarily disable finalizer registration.
* java/lang/natString.cc (intern): Temporarily disable finalizer
	registration.

From-SVN: r33127
2000-04-12 21:17:00 +00:00
Tom Tromey 50b99cc8fe natString.cc (unintern): Added `obj' argument.
* java/lang/natString.cc (unintern): Added `obj' argument.
	(intern): Register finalizer for string.
	* java/lang/String.java (unintern): Now static; added obj
	argument.

From-SVN: r33124
2000-04-12 20:45:59 +00:00
Tom Tromey c23c855f38 Vector.java (VectorEnumeration): Now `final'.
* java/util/Vector.java (VectorEnumeration): Now `final'.
	* java/util/Hashtable.java (HashtableEntry): Now `final'.
	(HashtableEnumeration): Likewise.
	* java/util/zip/ZipFile.java (ZipEnumeration): Now `final'.
	* java/text/RuleBasedCollator.java (RBCElement): Now `final'.

From-SVN: r33083
2000-04-11 20:02:48 +00:00
Warren Levy d0123c54ca ObjectStreamException.java: New file.
* java/io/ObjectStreamException.java: New file.
	* java/io/OptionalDataException.java: New file.
	* java/io/StreamCorruptedException.java: New file.
	* java/math/BigDecimal.java: New file.
	* java/sql/CallableStatement.java: New file.
	* java/sql/Connection.java: New file.
	* java/sql/DataTruncation.java: New file.
	* java/sql/DatabaseMetaData.java: New file.
	* java/sql/Date.java: New file.
	* java/sql/Driver.java: New file.
	* java/sql/DriverManager.java: New file.
	* java/sql/DriverPropertyInfo.java: New file.
	* java/sql/PreparedStatement.java: New file.
	* java/sql/ResultSet.java: New file.
	* java/sql/ResultSetMetaData.java: New file.
	* java/sql/SQLException.java: New file.
	* java/sql/SQLWarning.java: New file.
	* java/sql/Statement.java: New file.
	* java/sql/Time.java: New file.
	* java/sql/Timestamp.java: New file.
	* java/sql/Types.java: New file.
	* Makefile.am: Added above new files.
	* Makefile.in: Rebuilt.

	* mauve-libgcj: Turned on java.math, java.sql and java.security tests.
	* java/net/MulticastSocket.java (MulticastSocket): Pass values a la
	DatagramSocket constructor instead of null.

java.sql is JDK 1.1 Compliant

From-SVN: r33077
2000-04-11 09:21:53 +00:00
Anthony Green e472b4f96b posix-threads.h (_Jv_MutexUnlock): Replace _JV_NOT_OWNER.
2000-04-08  Anthony Green  <green@cygnus.com>

	* include/posix-threads.h (_Jv_MutexUnlock): Replace
	_JV_NOT_OWNER.

From-SVN: r33039
2000-04-09 06:53:00 +00:00
Anthony Green 568fe067bc posix-threads.cc (_Jv_MutexLock): Moved back to posix-threads.h.
2000-04-08  Anthony Green  <green@cygnus.com>

	* posix-threads.cc (_Jv_MutexLock): Moved back to posix-threads.h.
	(_Jv_MutexUnlock): Ditto.
	* include/posix-threads.h (_Jv_MutexLock): From posix-threads.cc.
	(_Jv_MutexUnlock): Ditto.

From-SVN: r33037
2000-04-09 05:41:56 +00:00
Anthony Green bdf2ced905 StringBuffer.java (ensureCapacity): Don't call Math::max.
2000-04-08  Anthony Green  <green@cygnus.com>

	* java/lang/StringBuffer.java (ensureCapacity): Don't call Math::max.
	(ensureCapacity_unsynchronized): New private method.
	(append): Use ensureCapacity_unsynchronized.

From-SVN: r33036
2000-04-09 04:52:43 +00:00
Tom Tromey 4eaf5996ad Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (awt_java_source_files): Added new files.
	* java/awt/IllegalComponentStateException.java: New file.
	* java/awt/ItemSelectable.java: New file.
	* java/awt/event/WindowEvent.java: Finished.
	* java/awt/event/TextEvent.java: Finished.
	* java/awt/event/ContainerEvent.java: New file.
	* java/awt/Component.java (getX, getY): New methods.
	* java/awt/event/PaintEvent.java: New file.
	* java/awt/event/MouseEvent.java: New file.
	* java/awt/ActiveEvent.java: New file.
	* java/awt/event/KeyEvent.java: Finished.
	* java/awt/event/ItemEvent.java: New file.
	* java/awt/Adjustable.java: New file.
	* java/awt/event/InputMethodEvent.java: New file.
	* java/awt/event/InputEvent.java: Finished.
	* java/awt/event/FocusEvent.java: New file.
	* java/awt/event/MouseMotionAdapter.java: New file.
	* java/awt/event/MouseAdapter.java: New file.
	* java/awt/event/KeyAdapter.java: New file.
	* java/awt/event/FocusAdapter.java: New file.
	* java/awt/event/ContainerAdapter.java: New file.
	* java/awt/event/ComponentEvent.java: Finished.
	* java/awt/event/AdjustmentEvent.java: New file.
	* java/awt/event/ComponentAdapter.java: New file.
	* java/awt/event/ActionEvent.java: Finished.
	* java/awt/event/MouseMotionListener.java: New file.
	* java/awt/event/MouseListener.java: New file.
	* java/awt/event/ItemListener.java: New file.
	* java/awt/event/InputMethodListener.java: New file.
	* java/awt/event/ContainerListener.java: New file.
	* java/awt/event/FocusListener.java: New file.
	* java/awt/event/ComponentListener.java: New file.
	* java/awt/event/AWTEventListener.java: New file.
	* java/awt/event/AdjustmentListener.java: New file.

From-SVN: r33034
2000-04-09 04:13:27 +00:00
Anthony Green 3bd835f73f natObject.cc (_Jv_MonitorEnter): Only perform null check when we have to.
2000-04-08  Anthony Green  <green@redhat.com>

	* java/lang/natObject.cc (_Jv_MonitorEnter): Only perform null
	check when we have to.

	* gcj/array.h: Mark elements(JArray<T>& x) and elements(JArray<T>*
	x) as `inline'.

	* java/util/StringTokenizer.java: Minor optimization.  Eliminates
	one method call.

	* java/util/Vector.java (VectorEnumeration.nextElement): Manually
	inline hasMoreElements.

From-SVN: r33033
2000-04-09 01:26:20 +00:00
Tom Tromey 24969f074e configure: Rebuilt.
* configure: Rebuilt.
	* configure.in: Recognize --enable-java-awt.
	(AWT): New conditional.
	* Makefile.in: Rebuilt.
	* Makefile.am (toolexeclib_LTLIBRARIES): Build libgcjawt.la if
	requested.
	(libgcjawt_la_SOURCES): New macro.
	(EXTRA_libgcjawt_la_SOURCES): Likewise.
	(libgcjawt_la_DEPENDENCIES): Likewise.
	(libgcjawt_la_LIBADD): Likewise.
	(libgcjawt_la_LDFLAGS): Likewise.
	(libgcj.zip): Depend on cond_java_awt_source_files
	(cond_awt_java_source_files): New macro.
	(MOSTLYCLEANFILES): Added awto_files.
	(awto_files): New macro.  Use where javao_files used.
	(nat_headers): Use cond_awt_java_source_files.

From-SVN: r32954
2000-04-06 00:29:39 +00:00
Tom Tromey 69c0caa166 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (awt_java_source_files): Added AWTException.java.
	* java/awt/AWTException.java: New file.

From-SVN: r32907
2000-04-04 19:56:20 +00:00
Tom Tromey 6719cc92e8 jvm.h (_Jv_GetArrayElementFromElementType): More commentary from Alex.
* include/jvm.h (_Jv_GetArrayElementFromElementType): More
	commentary from Alex.

From-SVN: r32894
2000-04-03 23:36:49 +00:00
Tom Tromey 0c2534d98d Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am ($(javao_files)): Depend on libgcj.zip.
	From H.J. Lu.

From-SVN: r32885
2000-04-03 18:07:45 +00:00
Anthony Green 54c2f04ba0 JVMPI changes...
Sun Apr  2 08:27:18 2000  Anthony Green  <green@redhat.com>

        * configure: Rebuilt.
	* configure.in: Add --disable-jvmpi.
        * include/config.h.in: Rebuilt.
        * acconfig.h: Add ENABLE_JVMPI.

	* include/jvm.h: Declare _Jv_DisableGC and _Jv_EnableGC.
        (_Jv_JVMPI_Notify_OBJECT_ALLOC): New define.
        (_Jv_JVMPI_Notify_THREAD_END): New define.
        (_Jv_JVMPI_Notify_THREAD_END): New define.
        * prims.cc (_Jv_JVMPI_Notify_OBJECT_ALLOC): Declare.
	(_Jv_JVMPI_Notify_THREAD_END): Declare.
        (_Jv_JVMPI_Notify_THREAD_END): Declare.

	* prims.cc (_Jv_AllocObject): Generate JVMPI object allocation
        events.

        * java/lang/natThread.cc: Include JVMPI headers if necessary.
        (finish_): Generate JVMPI thread end events.
        (run_): Generate JVMPI thread start events.
	* gnu/gcj/runtime/natFirstThread.cc (run): Call JNI_OnLoad for any
        preloaded JNI library.
        Include JVMPI headers if necessary.
        (run): Generate JVMPI thread start events.

        * boehm.cc: Define GC_disable and GC_enable.
	(_Jv_DisableGC): New function.
        (_Jv_EnableGC): New function.
        (disable_gc_mutex): Declare.
        * nogc.cc (_Jv_DisableGC): New function.
	(_Jv_EnableGC): New function.

        * jni.cc (_Jv_JNI_GetEnv): Handle JVMPI interface requests.
        (_Jv_JVMPI_Interface): Define.
        (jvmpiEnableEvent): New function.
        (_Jv_JNI_Init): Initialize _Jv_JVMPI_Interface.

        * include/jvmpi.h: New file.

From-SVN: r32866
2000-04-02 15:34:17 +00:00
Bryce McKinlay 8e4b9c9713 Synchronized gcjh commands for java/lang/Thread.h with Makefile.in.
From-SVN: r32776
2000-03-28 05:43:44 +01:00
Bryce McKinlay b834f1fa06 Makefile.in: New #defines and friends for Thread.h.
* Makefile.in: New #defines and friends for Thread.h.
        * posix-threads.cc: (struct starter): Remove `object'.
        (_Jv_CondWait): Use interruptable condition variables and new
        recursive mutexes. New return codes on interrupt or non-ownership
        of mutex.
        (_Jv_CondNotify): Ditto.
        (_Jv_CondNotifyAll): Ditto.
        (_Jv_ThreadInterrupt): Set thread interrupt flag directly. Interrupt
        the target thread by signaling its wait condition.
        (_Jv_ThreadInitData): Set `thread_obj' in the thread data struct,
        not the starter struct. Initialize wait_mutex and wait_cond.
        (_Jv_MutexLock): New recursive mutex implementation. Moved from
        posix-threads.h.
        (_Jv_MutexUnlock): Ditto.
        (really_start): Set info->data->thread from pthread_self() to work
        around a race condition. Destroy wait_mutex and wait_cond when run()
        returns.
        * java/lang/Thread.java: (isInterrupted_): Renamed to overloaded
        `isInterrupted(boolean)'. Clear interrupted flag if clear_flag is
        set.
        startable_flag: New private field.
        (Thread): Initialize `startable_flag'.
        (toString): Check for null thread group.
        * java/lang/natThread.cc: (struct natThread): New fields
        `join_mutex', `join_cond'. Removed fields `joiner', `next'.
        (class locker): Removed.
        (initialize_native): Initialize `join_cond' and `join_mutex'.
        (interrupt): Now just calls _Jv_ThreadInterrupt().
        (join): Simplified. Just wait on the target thread's join condition.
        (finish_): Remove join list code. Unset thread group. Signal
        potential joiners by notifying the dying threads join_cond.
        (start): Check for illegal restarts.
        * java/lang/natObject.cc: Check for return value of _Jv_CondWait and
        act appropriatly.
        * include/posix-threads.h: Remove all HAVE_RECURSIVE_MUTEX related
        #defines and #ifdefs.
        (struct _Jv_Thread_t): New fields `thread_obj', `wait_cond',
        `wait_mutex', `next'.
        (struct _Jv_ConditionVariable_t): Define as a struct instead of
        directly mapping to pthread_cond_t.
        (struct _Jv_Mutex_t): New recursive implementation.
        (_Jv_PthreadCheckMonitor): Reimplemented. Simple `owner' check.
        _Jv_HaveCondDestroy: Never define this for posix-threads.
        (_Jv_CondNotify): Remove inline implementation(s), prototype instead.
        (_Jv_CondNotifyAll): Ditto.
        (_Jv_MutexLock): Ditto.
        (_Jv_MutexUnlock): Ditto.
        (_Jv_MutexInit): Changed to reflect new mutex implementation.
        (_Jv_MutexDestroy): Ditto.
        (_Jv_CondDestroy): Removed.
        (_Jv_PthreadGetMutex): Removed.
        * include/win32-threads.h: (_Jv_CondNotify): Guess _JV_NOT_OWNER on an
        error. Add a FIXME about this.
        (_Jv_CondNotifyAll): Ditto.
        * win32-threads.cc: (_Jv_CondWait): Return 0 on a timeout. Guess
        _JV_NOT_OWNER on other errors. Add FIXME.

From-SVN: r32773
2000-03-28 03:22:24 +01:00
Tom Tromey 4e2d1dbdd3 jni.cc (_Jv_JNI_PopSystemFrame): If environment has exception set, throw it.
* jni.cc (_Jv_JNI_PopSystemFrame): If environment has exception
	set, throw it.
	(call): Don't throw exception here.

From-SVN: r32770
2000-03-27 19:51:46 +00:00
Tom Tromey 99444711eb [multiple changes]
2000-03-26  Tom Tromey  <tromey@cygnus.com>

	* java/lang/mprec.h: Use SIZEOF_VOID_P.
	* interpret.cc: Use SIZEOF_VOID_P.
	* include/java-cpool.h (_Jv_storeLong): Use SIZEOF_VOID_P.
	(_Jv_loadLong): Likewise.
	(_Jv_storeDouble): Likewise.
	* configure: Rebuilt.
	* configure.in: Check size of void*.

	* resolve.cc (ncode): Use FFI_PREP_RAW_CLOSURE and FFI_RAW_SIZE.

2000-03-26  Hans Boehm  <boehm@acm.org>

	* include/java-cpool.h (_Jv_storeLong, _Jv_loadLong,
	_Jv_storeDouble, _Jv_loadDouble): Define differently on 64 bit
	machine.
	* java/lang/ieeefp.h: Define __IEEE_BIG_ENDIAN or
	__IEEE_LITTLE_ENDIAN appropriately on IA64.
	* java/lang/mprec.h: Don't define Pack_32 on 64 bit machine.
	* javaprims.h (_Jv_word): Added `l' and `d' entries in 64 bit
	case.
	* resolve.cc (FFI_PREP_RAW_CLOSURE): New define.
	(FFI_RAW_SIZE): Likewise.
	(_Jv_InterpMethod::ncode): Use them.
	* interpret.cc (PUSHL, PUSHD, POPL, POPD, LOADL, LOADD, STOREL,
	STORED): Define differently on a 64 bit machine.
	(continue1): Use ffi_java_raw_call when appropriate.

From-SVN: r32754
2000-03-26 20:33:04 +00:00
Warren Levy 552cc5b57e BigInteger.java (divide): Handle the special case when dividing by 1 and the high bit of the dividend is set.
* java/math/BigInteger.java(divide): Handle the special case when
	dividing by 1 and the high bit of the dividend is set.
	(setShiftRight): Handle case when count == 0.

From-SVN: r32724
2000-03-24 09:18:12 +00:00
Warren Levy 111393dfd6 Font.java (isBold): Fix syntax error.
* java/awt/Font.java(isBold): Fix syntax error.
	(isItalic): ditto.
	* java/awt/Frame.java(postEvent): ditto.
	* java/awt/Menu.java(postEvent): ditto.
	* java/awt/MenuBar.java(postEvent): ditto.
	* java/awt/Toolkit.java(init): Included a stub.

From-SVN: r32723
2000-03-24 09:09:56 +00:00
Bryce McKinlay 604de2bddf Event.java: Add all the event type constants.
2000-03-21  Bryce McKinlay  <bryce@albatross.co.nz>

        * java/awt/Event.java: Add all the event type constants.
        (Event): Implemented constructors.
        (controlDown): Implemented.
        (metaDown): Implemented.
        (paramString): Stubbed.
        (shiftDown): Implemented.
        (toString): Implemented.
        (translate): Implemented.

From-SVN: r32676
2000-03-21 21:33:53 +00:00
Bryce McKinlay a09f61183a * java/lang/natClass.cc (isInstance): Use JV_CLASS, not getClass().
From-SVN: r32665
2000-03-21 05:54:42 +00:00
Bryce McKinlay afccdd1d6c natClass.cc (isInstance): Use _Jv_IsAssignableFrom(), not Class.isAssignableFrom().
* java/lang/natClass.cc (isInstance): Use _Jv_IsAssignableFrom(),
        not Class.isAssignableFrom().

From-SVN: r32664
2000-03-21 05:44:29 +00:00
Bryce McKinlay a162f9d81e natClass.cc (isInstance): Initialize `this'.
2000-03-21  Bryce McKinlay  <bryce@albatross.co.nz>

        * java/lang/natClass.cc (isInstance): Initialize `this'.
        (isAssignableFrom): Initialize `this' and `klass'.
        (_Jv_IsAssignableFrom): If an interface has no idt, it is not
        implemented by any loaded class, so return false.

From-SVN: r32663
2000-03-21 05:12:20 +00:00
Warren Levy 54b43a686d Color.java: Specified java.io for Serializable.
* java/awt/Color.java: Specified java.io for Serializable.
	* java/awt/Toolkit.java: Imported java.net.URL.

From-SVN: r32639
2000-03-19 12:20:12 +00:00
Warren Levy b6166b4d0f * java/awt/Color.java: Rewrote to be more memory efficient (& compile).
From-SVN: r32634
2000-03-19 11:23:27 +00:00
Warren Levy d05165c393 Color.java: New file.
* java/awt/Color.java: New file.
	* java/awt/Graphics.java: New file.
	* java/awt/Image.java: New file.
	* java/awt/Paint.java: New file.
	* java/awt/PaintContext.java: New file.
	* java/awt/Transparency.java: New file.
	* java/util/Collection.java: New file.
	* java/util/Comparator.java: New file.
	* java/util/Iterator.java: New file.
	* java/util/List.java: New file.
	* java/util/ListIterator.java: New file.
	* Makefile.am: Added above new files.
	* Makefile.in: Rebuilt.

	* java/awt/Font.java (PLAIN): New field.
	(BOLD): New field.
	(ITALIC): New field.
	(ROMAN_BASELINE): New field.
	(CENTER_BASELINE): New field.
	(HANGING_BASELINE): New field.
	(name): New field.
	(style): New field.
	(size): New field.
	(pointSize): New field.
	(Font): Implemented constructor.
	(isPlain): Implemented method.
	(isBold): Implemented method.
	(isItalic): Implemented method.
	(getName): Implemented method.
	(getStyle): Implemented method.
	(getSize): Implemented method.
	(getSize2D): Implemented method.
	(decode): Stubbed.
	* java/awt/Frame.java (getFont): Stubbed.
	(postEvent): Stubbed.
	(remove): Stubbed.
	* java/awt/Menu.java (postEvent): Stubbed.
	* java/awt/MenuBar.java (getFont): Stubbed.
	(postEvent): Stubbed.
	* java/awt/Toolkit.java (getImage): Added abstract method.

From-SVN: r32598
2000-03-17 00:45:06 +00:00
Tom Tromey 878885b411 [multiple changes]
2000-03-15  Tom Tromey  <tromey@cygnus.com>

	* java/io/natFileDescriptorWin32.cc (winerr): Now static.

	* prims.cc (win32_exception_handler): Reformatted.

	* include/win32-threads.h (_Jv_HaveCondDestroy): New define.
	(_Jv_HaveMutexDestroy): Likewise.

2000-03-15 Jon Beniston <jb7216@bristol.ac.uk>

	* java/io/natFileDescriptorWin32.cc: New file.
	* java/io/natFileWin32.cc: New file.
	* java/net/natInetAddress.cc: Added conditional inclusion of
	Windows / Winsock headers.
	* java/net/natPlainDatagramSocketImpl.cc: Added conditional
	inclusion of Windows / Winsock headers.
	* java/net/natPlainSocketImpl.cc: Added conditional inclusion of
	Windows / Winsock headers.
	* include/win32-signal.h: New file.
	* include/win32-threads.h: New file.
	* win32-threads.cc: New file.
	* exception.cc (win32_get_restart_frame): New function.
	* prims.cc (win32_exception_handler): New function.
	(main_init) Performs Winsock initialisation.
	(main_init) Installs exeception handler.

From-SVN: r32567
2000-03-15 22:03:19 +00:00
Tom Tromey 90a883ae6b jni.cc (mangled_name): Fixed assertion.
* jni.cc (mangled_name): Fixed assertion.
	(JNI_GetCreatedJavaVMs): Don't comment out `buf_len' argument;
	turned assert into actual failure.

From-SVN: r32546
2000-03-14 21:59:54 +00:00
Warren Levy ea7f51a4af Key.java (serialVersionUID): Set to 0 for now.
* java/security/Key.java(serialVersionUID): Set to 0 for now.
	* java/security/interfaces/DSAPrivateKey.java(serialVersionUID): Ditto.
	* java/security/interfaces/DSAPublicKey.java(serialVersionUID): Ditto.

From-SVN: r32464
2000-03-10 05:10:40 +00:00
Warren Levy 8560e49702 AlgorithmParameterGeneratorSpi.java: New file.
* java/security/AlgorithmParameterGeneratorSpi.java: New file.
	* java/security/DigestException.java: New file.
	* java/security/GeneralSecurityException.java: New file.
	* java/security/InvalidAlgorithmParameterException.java: New file.
	* java/security/InvalidKeyException.java: New file.
	* java/security/InvalidParameterException.java: New file.
	* java/security/Key.java: New file.
	* java/security/KeyException.java: New file.
	* java/security/KeyPair.java: New file.
	* java/security/KeyPairGenerator.java: New file.
	* java/security/KeyPairGeneratorSpi.java: New file.
	* java/security/NoSuchProviderException.java: New file.
	* java/security/PrivateKey.java: New file.
	* java/security/Provider.java: New file.
	* java/security/PublicKey.java: New file.
	* java/security/SecureRandom.java: New file.
	* java/security/Security.java: New file.
	* java/security/Signature.java: New file.
	* java/security/SignatureException.java: New file.
	* java/security/interfaces/DSAKey.java: New file.
	* java/security/interfaces/DSAParams.java: New file.
	* java/security/interfaces/DSAPrivateKey.java: New file.
	* java/security/interfaces/DSAPublicKey.java: New file.
	* java/security/interfaces/RSAPrivateCrtKey.java: New file.
	* java/security/interfaces/RSAPrivateKey.java: New file.
	* java/security/interfaces/RSAPublicKey.java: New file.
	* java/security/spec/AlgorithmParameterSpec.java: New file.
	* java/security/spec/InvalidKeySpecException.java: New file.
	* java/security/spec/InvalidParameterSpecException.java: New file.
	* java/security/spec/KeySpec.java: New file.
	* java/security/spec/RSAPrivateCrtKeySpec.java: New file.
	* java/security/spec/RSAPrivateKeySpec.java: New file.
	* java/security/spec/RSAPublicKeySpec.java: New file.
	* Makefile.am: Added above java.security files.
	* Makefile.in: Rebuilt.

	* java/security/MessageDigest.java: Rewritten.
	* java/security/SecureClassLoader.java: Added JDK1.2 comment.

From-SVN: r32461
2000-03-10 02:43:57 +00:00
Bryce McKinlay d585552a72 Updated README.
From-SVN: r32456
2000-03-09 22:20:43 +00:00
Bryce McKinlay fb863f625e natClassLoader.cc (_Jv_FindArrayClass): Call _Jv_PrepareConstantTimeTables.
2000-03-09  Bryce McKinlay  <bryce@albatross.co.nz>

        * java/lang/natClassLoader.cc (_Jv_FindArrayClass): Call
        _Jv_PrepareConstantTimeTables.
        * java/lang/natClass.cc (_Jv_PrepareConstantTimeTables): Array
        classes should have an IDT, so don't return if klass is an array
        class.

From-SVN: r32445
2000-03-09 09:22:36 +00:00
Tom Tromey c500e5ec9f natArray.cc (newInstance): Don't allow array of `void' to be created.
* java/lang/reflect/natArray.cc (newInstance): Don't allow array
	of `void' to be created.

From-SVN: r32443
2000-03-09 04:50:49 +00:00
Warren Levy d98729aa0e * java/math/BigInteger.java(signum): Handle zero properly.
From-SVN: r32441
2000-03-09 04:35:30 +00:00
Tom Tromey 2ba5f77454 All files: Updated copyright information.
* All files: Updated copyright information.
	* COPYING: New file.
	* COPYING.LIB: Removed.
	* LIBGCJ_LICENSE: We now use GPL + special exception.

From-SVN: r32387
2000-03-07 19:55:28 +00:00
Bryce McKinlay ddf0fc6c9f resolve.cc (_Jv_SearchMethodInClass): New function.
2000-03-07  Bryce McKinlay  <bryce@albatross.co.nz>

        * resolve.cc (_Jv_SearchMethodInClass): New function.
        (_Jv_ResolvePoolEntry): Search superinterfaces for interface
        methods.
        * java/lang/Class.h (_Jv_SearchMethodInClass): New prototype.

2000-03-07  Bryce McKinlay  <bryce@albatross.co.nz>

        * java/lang/Class.h (union _Jv_IDispatchTable): New declaration.
        (struct _Jv_ifaces): New declaration.
        JV_CLASS: New macro definition.
        (getComponentType): Relocate below isArray() for inlining.
        (getModifiers): Declare `inline'.
        (getSuperclass): Ditto.
        (isArray): Ditto.
        (isPrimitive): Ditto.
        (_Jv_IsAssignableFrom): New prototype.
        (_Jv_LookupInterfaceMethodIdx): New prototype. Predeclare with "C"
        linkage.
        (_Jv_InitClass): Move from natClass.cc. Declare `inline'.
        Check for JV_STATE_DONE before invoking initializeClass().
        (_Jv_PrepareConstantTimeTables): New prototype.
        (_Jv_GetInterfaces): Ditto.
        (_Jv_GenerateITable): Ditto.
        (_Jv_GetMethodString): Ditto.
        (_Jv_AppendPartialITable): Ditto.
        (_Jv_FindIIndex): Ditto.
        depth, ancestors, idt: New class fields.

        * java/lang/natClass.cc (isAssignableFrom): Move functionality to
        inline function `_Jv_IsAssignableFrom'. Use that function.
        (isInstance): Declare `inline'.
        (initializeClass): Get lock on class before checking `state'. Unlock
        before calling resolveClass0. Call _Jv_PrepareConstantTimeTables
	with the lock held.
        (_Jv_LookupInterfaceMethod): Use _Jv_GetMessageString.
        (_Jv_IsAssignableFrom): New inline function. Test assignability
	using class->depth and ancestor table.
        (_Jv_IsInstanceOf): Use _Jv_IsAssignableFrom.
        (_Jv_CheckCast): Move from prims.cc. Use JV_CLASS and
        _Jv_IsAssignableFrom.
        (_Jv_CheckArrayStore): Ditto.
        (_Jv_LookupInterfaceMethodIdx): New function.
        INITIAL_IOFFSETS_LEN, INITIAL_IFACES_LEN: New #defines.
        (_Jv_PrepareConstantTimeTables): New function.
        (_Jv_IndexOf): Ditto.
        (_Jv_GetInterfaces): Ditto.
        (_Jv_GenerateITable): Ditto.
        (_Jv_GetMethodString): Ditto.
        (_Jv_AppendPartialITable): Ditto.
        iindex_mutex, iindex_mutex_initialized: New static fields.
        (_Jv_FindIIndex): New function.

        * java/lang/natClassLoader.cc (_Jv_NewClass): Set new jclass fields.

        * prims.cc (_Jv_CheckCast): Moved to natClass.cc.
        (_Jv_CheckArrayStore): Ditto.
        (JvNewCharArray, JvNewBooleanArray, JvNewByteArray, JvNewShortArray,
        JvNewIntArray, JvNewLongArray, JvNewFloatArray, JvNewDoubleArray):
        Moved to gcj/array.h.
        (_Jv_Realloc): New function.

        * gcj/cni.h: Move _Jv_PrimClass definitions to gcj/array.h.

        * gcj/array.h: _Jv_PrimClass definitions moved from gcj/cni.h.
        (JvNewCharArray, JvNewBooleanArray, JvNewByteArray,
        JvNewShortArray, JvNewIntArray, JvNewLongArray, JvNewFloatArray,
        JvNewDoubleArray): Implementations moved from prims.cc and
        declared `inline'.

        * gcj/javaprims.h (_Jv_Realloc): Prototype.

        * include/jvm.h (_Jv_LookupInterfaceMethodIdx): Prototype.

From-SVN: r32382
2000-03-07 09:52:56 +00:00
Tom Tromey 8d00f6171a jni.cc (MARK_NONE): New define.
* jni.cc (MARK_NONE): New define.
	(MARK_USER): Likewise.
	(MARK_SYSTEM): Likewise.
	(struct _Jv_JNI_LocalFrame): Made `marker' bigger and `size'
	smaller.
	(_Jv_JNI_DeleteLocalRef): Use MARK_NONE in assert.
	(_Jv_JNI_EnsureLocalCapacity): Use MARK_NONE.
	(_Jv_JNI_PushLocalFrame): Use MARK_USER.
	(_Jv_JNI_PopLocalFrame): New version with additional `stop'
	argument.
	(call): Use MARK_SYSTEM.
	(_Jv_GetJNIEnvNewFrame): New function.
	(_Jv_LookupJNIMethod): New function.
	(_Jv_JNI_PopSystemFrame): New function.
	(call): Use _Jv_JNI_PopSystemFrame and _Jv_LookupJNIMethod.

From-SVN: r32373
2000-03-07 00:10:52 +00:00
Tom Tromey 4d54cfecc3 re GNATS libgcj/43 (jni.h not installed)
Fix for PR libgcj/43:
	* include/Makefile.in: Rebuilt.
	* include/Makefile.am (include_HEADERS): New define.

From-SVN: r32351
2000-03-06 02:50:38 +00:00
Anthony Green 008b7307cb javaprims.h ("Java"): Remove FirstThread.
2000-03-08  Anthony Green  <green@redhat.com>

	* gcj/javaprims.h ("Java"): Remove FirstThread.

From-SVN: r32349
2000-03-05 22:31:02 +00:00
Warren Levy c261e080ef DatagramSocket.java (DatagramSocket(int,InetAddress)): Handle null addresses.
* java/net/DatagramSocket.java(DatagramSocket(int,InetAddress)):
	  Handle null addresses.

From-SVN: r32339
2000-03-05 09:01:16 +00:00
Anthony Green aa1e467f34 re GNATS gcj/151 (strange result on Math.sin(1e50))
* configure.host (libgcj_flags): Define __NO_MATH_INLINES.
	See PR gcj/151.

From-SVN: r32337
2000-03-05 08:32:51 +00:00
Anthony Green 0f9c645ea5 configure: Rebuilt.
* configure: Rebuilt.
	      * configure.in (ZLIBTESTSPEC): New macro.
	      (GCTESTSPEC): New macro.
        (LIBGCJTESTSPEC): New macro.
        * libgcj-test.spec.in: New file.

From-SVN: r32330
2000-03-04 21:50:19 +00:00
Tom Tromey b099f07de9 java-interp.h: Don't include MethodInvocation.h.
* include/java-interp.h: Don't include MethodInvocation.h.
	(class _Jv_InterpMethod): Don't make MethodInvocation a friend.
	* Makefile.in: Rebuilt.
	* Makefile.am (gnu/gcj/runtime/MethodInvocation.h): Removed.
	(ordinary_java_source_files): Don't mention
	MethodInvocation.java.
	* gnu/gcj/runtime/MethodInvocation.java: Removed.
	* interpret.cc (MethodInvocation::continue1): Removed.
	(run): Handle exceptions here.
	* java/lang/ClassLoader.java (defineClass1, defineClass2):
	Removed.
	* java/lang/natClassLoader.cc (defineClass0): Catch exceptions
	here.
	(defineClass2): Removed.

	* java/lang/reflect/Method.java (hack_trampoline, hack_call):
	Removed.
	* java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Catch
	exceptions here.
	(hack_call): Removed.

	* java/lang/Class.h (Class): Removed hackRunInitializers,
	hackTrampoline.
	* java/lang/natClass.cc (hackRunInitializers): Removed.
	(initializeClass): Catch exceptions here.
	Include ExceptionInInitializerError.h.
	* java/lang/Class.java (hackTrampoline, hackRunInitializers):
	Removed.

	* java/lang/Object.h (Object): Don't mention hack12_6.
	* java/lang/natObject.cc (_Jv_FinalizeObject): Catch exceptions
	here.
	* java/lang/Object.java (hack12_6): Removed.

	* java/lang/natThread.cc (run_): Renamed.  Catch exceptions here.
	(start): Use run_, not run__.
	* java/lang/Thread.java (run_): Renamed from run__; old run_
	removed.

	* jni.cc (_Jv_JNI_FindClass): Handle exceptions.
	(_Jv_JNI_EnsureLocalCapacity): Likewise.
	(_Jv_JNI_DefineClass): Likewise.
	(_Jv_JNI_ThrowNew): Likewise.
	(_Jv_JNI_AllocObject): Likewise.
	(_Jv_JNI_GetAnyMethodID): Likewise.
	(_Jv_JNI_CallAnyMethodV): Likewise.
	(_Jv_JNI_CallAnyMethodA): Likewise.
	(_Jv_JNI_CallAnyVoidMethodV): Likewise.
	(_Jv_JNI_CallAnyVoidMethodA): Likewise.
	(_Jv_JNI_GetAnyFieldID): Likewise.
	(_Jv_JNI_NewString): Likewise.
	(_Jv_JNI_NewStringUTF): Likewise.
	(_Jv_JNI_GetStringUTFChars): Likewise.
	(_Jv_JNI_NewObjectArray): Likewise.
	(_Jv_JNI_NewPrimitiveArray): Likewise.
	(_Jv_JNI_GetPrimitiveArrayRegion): Likewise.
	(_Jv_JNI_GetStringRegion): Likewise.
	(_Jv_JNI_GetStringUTFRegion): Likewise.
	(_Jv_JNI_SetPrimitiveArrayRegion): Likewise.
	(_Jv_JNI_MonitorEnter): Likewise.
	(_Jv_JNI_MonitorExit): Likewise.
	(_Jv_JNI_ToReflectedField): Likewise.
	(_Jv_JNI_ToReflectedMethod): Likewise.
	(_Jv_JNI_RegisterNatives): Likewise.
	(_Jv_JNI_AttachCurrentThread): Likewise.
	(_Jv_JNI_DestroyJavaVM): Likewise.

From-SVN: r32294
2000-03-02 20:25:20 +00:00
Mo DeJong fee2681f8a ZipOutputStream.java (closeEntry): Fixed error caused by the incorrect casting of a long to an int.
2000-02-28  Mo DeJong  <mdejong@cygnus.com>

	* java/util/zip/ZipOutputStream.java(closeEntry) : Fixed
	error caused by the incorrect casting of a long to an int.

From-SVN: r32257
2000-02-29 17:08:00 +00:00
Mo DeJong f8b7a5d26b ZipOutputStream.java (write_entry): Fixed SIGSEV caused by use of the wrong instance variable.
2000-02-28  Mo DeJong  <mdejong@cygnus.com>

	* java/util/zip/ZipOutputStream.java(write_entry) : Fixed
	SIGSEV caused by use of the wrong instance variable.

From-SVN: r32256
2000-02-29 17:04:35 +00:00
Bryce McKinlay 91da35dbf2 File.java (File(String, String)): For dirPath, treat an empty String the same as `null'.
2000-02-27  Bryce McKinlay  <bryce@albatross.co.nz>

       * java/io/File.java (File(String, String)): For dirPath, treat an
       empty String the same as `null'.

From-SVN: r32217
2000-02-27 10:43:47 +00:00
Anthony Green e1b1511329 Minor clean up and bug fix.
From-SVN: r32196
2000-02-26 21:12:54 +00:00
Tom Tromey ac52f669c5 jni.cc (_Jv_JNI_RegisterNatives): Conditionalize body on `INTERPRETER'.
* jni.cc (_Jv_JNI_RegisterNatives): Conditionalize body on
	`INTERPRETER'.

From-SVN: r32156
2000-02-25 23:49:34 +00:00
Bryce McKinlay 4ae4a3c973 re GNATS libgcj/38 (Static initializer in DecimalFormat eventually depends on itself)
2000-02-25  Bryce McKinlay  <bryce@albatross.co.nz>

        * java/net/URLConnection.java (initializeDateFormats): New
        private method.
        (getHeaderFieldDate): Call initializeDateFormats if required.
        locale, dateFormat1, dateFormat2, dateFormat3: Don't initialize
        these.
        Fix for PR libgcj/38.

From-SVN: r32153
2000-02-25 22:38:33 +00:00
Warren Levy 12b595c7c4 BigInteger.java (ival): Made private.
* java/math/BigInteger.java(ival): Made private.
	(words): Ditto.
	(neg): Ditto.

From-SVN: r32143
2000-02-25 04:00:09 +00:00
Anthony Green 9b90451bee Forgot to commit ChangeLog
From-SVN: r32087
2000-02-21 08:21:52 +00:00
Tom Tromey 38b3a2c089 * boehm.cc (_Jv_AllocBytes): Clear returned memory.
From-SVN: r32085
2000-02-21 05:14:06 +00:00
Bryce McKinlay a0e34aaae4 ZipEntry.java (setCrc): Fix overflow.
2000-02-19  Bryce McKinlay  <bryce@albatross.co.nz>

        * java/util/zip/ZipEntry.java (setCrc): Fix overflow.
        (setSize): ditto.

From-SVN: r32062
2000-02-19 02:54:14 +00:00
Tom Tromey 8ade47715e jvm.h (_Jv_GetJavaVM): Declare.
* include/jvm.h (_Jv_GetJavaVM): Declare.
	* include/java-interp.h (_Jv_GetFirstMethod): New function.
	(_Jv_MethodBase::get_method): New method.
	(_Jv_JNIMethod::set_function): New method.
	* jni.cc (_Jv_JNI_UnregisterNatives): New function.
	(_Jv_JNI_RegisterNatives): New function.
	(_Jv_JNIFunctions): Updated for new functions.
	(_Jv_GetJavaVM): New function.
	(_Jv_JNI_GetJavaVM): Use it.  Now static.
	(_Jv_JNI_AttachCurrentThread): Create a new JNIEnv if this thread
	is already a Java thread but does not have a JNIEnv yet.

	* java/lang/natRuntime.cc (_load): Pass the JavaVM to the onload
	function.

From-SVN: r32056
2000-02-18 21:22:06 +00:00
Tom Tromey 8dd8ff2e98 Rotated ChangeLogs
From-SVN: r32043
2000-02-17 22:57:30 +00:00
Tom Tromey de3cb4e4c1 re GNATS gcj/152 (Installation flaw)
* gcj/field.h (_Jv_Field::getClass): Don't use JvAssert.
	Fixes PR gcj/152.

From-SVN: r32036
2000-02-17 18:34:14 +00:00
Tom Tromey 5ef57049f9 * jni.cc (_Jv_JNI_CallStaticMethodV): Added some assertions.
From-SVN: r32021
2000-02-17 00:54:34 +00:00
Tom Tromey 1adbc4d8be jni.cc (_Jv_JNI_NewObjectV): Corrected assertion.
* jni.cc (_Jv_JNI_NewObjectV): Corrected assertion.
	(_Jv_JNI_NewObject): Likewise.
	(_Jv_JNI_NewObjectA): Likewise.
	(_Jv_JNI_CallAnyMethodV): In constructor case, pass correct value
	as "return" type to _Jv_CallAnyMethodA.
	(_Jv_JNI_CallAnyMethodA): Likewise.
	(_Jv_JNI_CallAnyVoidMethodV): Likewise.

From-SVN: r32017
2000-02-16 22:42:41 +00:00
Tom Tromey d77a164002 jni.cc (_Jv_JNI_FindClass): Use ClassLoader.loadClass, not findClass.
* jni.cc (_Jv_JNI_FindClass): Use ClassLoader.loadClass, not
	findClass.

From-SVN: r32013
2000-02-16 18:42:48 +00:00
Tom Tromey d348bda453 resolve.cc (ncode): Set args_raw_size.
* resolve.cc (ncode): Set args_raw_size.  Compute jni_cif and
	jni_arg_types.
	(init_cif): Added `rtype_p' argument.
	* include/java-interp.h (class _Jv_MethodBase): Added
	args_raw_size.
	(class _Jv_InterpMethod): Removed args_raw_size.
	(class _Jv_JNIMethod): Added jni_cif and jni_arg_types fields.
	* jni.cc (call): Pass JNIEnv and (for static methods only) the
	class pointer as well as the ordinary arguments.

From-SVN: r31995
2000-02-16 00:07:34 +00:00
Tom Tromey cdd59e7bdf * jni.cc (mangled_name): Skip leading `(' in signature.
From-SVN: r31993
2000-02-15 22:59:23 +00:00
Tom Tromey abfb784400 * jni.cc (add_char): Added missing `else'.
From-SVN: r31991
2000-02-15 22:42:10 +00:00
Tom Tromey 2d759f7165 jni.cc (_Jv_JNI_AttachCurrentThread): Return error if malloc fails.
* jni.cc (_Jv_JNI_AttachCurrentThread): Return error if malloc
	fails.

From-SVN: r31986
2000-02-15 20:39:36 +00:00
Bryce McKinlay 2e5aca8386 Updated ChangeLog
From-SVN: r31982
2000-02-15 08:53:00 +00:00
Tom Tromey 26c3229c0b re GNATS gcj/150 (System.loadLibrary() semantics arn't the same as in the JDK)
* java/lang/natRuntime.cc (_load): On Unix, prefix library name
	with `lib' for loadLibrary.  Fixes PR gcj/150.

From-SVN: r31976
2000-02-15 07:53:11 +00:00
Warren Levy 34540fe35e MPN.java (findLowestBit): Made methods public.
* gnu/gcj/math/MPN.java(findLowestBit): Made methods public.

	* java/math/BigInteger.java(BigInteger(int,int,java.util.Random):
	  New constructor.
	(min): Implemented.
	(max): Implemented.
	(modPow): Rewritten to not use the naive, slow, brute force approach.
	(isProbablePrime): Implemented.
	(testBit): Implemented.
	(flipBit): Implemented.
	(getLowestSetBit): Implemented.

From-SVN: r31966
2000-02-14 10:23:29 +00:00
Anthony Green 97ce4a51fa gcj/142
i386 and i486 should configure the same as i586 and i686.

From-SVN: r31954
2000-02-13 18:07:09 +00:00
Tom Tromey dd16866663 File.java (createTempFile): Use low bits from counter, not high bits.
* java/io/File.java (createTempFile): Use low bits from counter,
	not high bits.

From-SVN: r31946
2000-02-12 20:13:42 +00:00
Anthony Green 95311793fe More thanks.
From-SVN: r31942
2000-02-12 03:49:13 +00:00
Tom Tromey 28ec5077d7 interpret.cc (continue1): Use STOREA, not STOREI, to implement astore instruction.
* interpret.cc (continue1): Use STOREA, not STOREI, to implement
	astore instruction.  From Hans Boehm.

From-SVN: r31939
2000-02-11 23:24:28 +00:00
Warren Levy 136b5d77fc BigInteger.java (BigInteger(String, int)): New constructor.
* java/math/BigInteger.java(BigInteger(String, int)): New constructor.
	(BigInteger(String)): New constructor.
	(not): Rewritten using version from Kawa's BitOps class.
	(valueOf): New private methods from Kawa's BitOps class.
	(swappedOp): ditto.
	(bitOp): ditto.
	(setBitOp): ditto.
	(and): Implemented.
	(or): Implemented.
	(xor): Implemented.
	(andNot): Implemented.
	(clearBit): Implemented.
	(setBit): Implemented.
	(bitCount): Implemented.
	(toByteArray): Implemented.

From-SVN: r31926
2000-02-11 19:09:03 +00:00
Tom Tromey 9d381124d8 * java/io/File.java (nextValue): Now synchronized.
From-SVN: r31925
2000-02-11 18:44:37 +00:00
Tom Tromey 304ccb1075 natFileDescriptorPosix.cc (open): Recognize EXCL flag.
* java/io/natFileDescriptorPosix.cc (open): Recognize EXCL flag.
	* java/io/FileDescriptor.java (EXCL): New static field.
	* java/io/File.java (tmpdir): New static field.
	(createTempFile): New method.
	(nextValue): New method.
	* java/lang/natSystem.cc (init_properties): Set java.io.tmpdir
	property.

From-SVN: r31922
2000-02-11 17:32:52 +00:00
Tom Tromey 26439cc59c jni.h (JNI_FALSE): Renamed from JNI_TRUE; oops.
* include/jni.h (JNI_FALSE): Renamed from JNI_TRUE; oops.
	(jboolean): Declare as an attributed int, not a bool.
	(_Jv_func): Declare differently for C.

From-SVN: r31907
2000-02-10 23:44:05 +00:00
Tom Tromey aaf0766e9f natNativeThread.cc: New file.
* gnu/gcj/jni/natNativeThread.cc: New file.
	* gnu/gcj/jni/NativeThread.java: New file.
	* java/lang/Thread.java (data): Now a RawData.
	* include/jvm.h (_Jv_GetCurrentJNIEnv, _Jv_SetCurrentJNIEnv):
	Declare.
	* Makefile.in: Rebuilt.
	* Makefile.am (java/lang/Thread.h): New target.
	(ordinary_java_source_files): Added NativeThread.java.
	(nat_source_files): Added natNativeThread.cc.
	* java/lang/natThread.cc: Include <jni.h>
	(struct natThread): Added `jni_env' field.
	(_Jv_GetCurrentJNIEnv): New function.
	(_Jv_SetCurrentJNIEnv): Likewise.
	(initialize_native): Initialize jni_env.
	Include RawData.h.
	* jni.cc (ThreadGroupClass): New define.
	(_Jv_JNI_InvokeFunctions): New structure.
	(JNI_GetCreatedJavaVMs): New function.
	(the_vm): New global.
	(JNI_GetDefaultJavaVMInitArgs): New function.
	Include NativeThread.h.
	(NativeThreadClass): New define.
	(_Jv_JNI_EnsureLocalCapacity): Return JNI_ERR, not -1.
	(_Jv_JNI_DestroyJavaVM): New function.
	(_Jv_JNI_AttachCurrentThread): New function.
	(_Jv_JNI_DetachCurrentThread): New function.
	(_Jv_JNI_GetEnv): New function.
	(JNI_CreateJavaVM): New function.
	(_Jv_JNI_GetJavaVM): New function.
	(_Jv_JNIFunctions): Added entry for GetJavaVM.
	* include/jni.h (JavaVMAttachArgs): New structure.
	(JNI_EDETACHED): New define.
	(JNI_EVERSION): Likewise.
	(JavaVM): Define properly.
	(struct JNIInvokeInterface): New structure.
	(class _Jv_JavaVM): New class.
	(JNI_OnLoad, JNI_OnUnload): Declare.
	(JNI_GetDefaultJavaVMInitArgs, JNI_CreateJavaVM,
	JNI_GetCreatedJavaVMs): Declare.
	(JavaVMInitArgs): New typedef.
	(JavaVMOption): Likewise.
	(JNI_ERR): New define.
	(JNI_OK): Likewise.

From-SVN: r31901
2000-02-10 20:31:48 +00:00
Andrew Haley 715bdd8117 interpret.cc: Don't include fdlibm.h.
2000-02-10  Andrew Haley  <aph@cygnus.com>

	* interpret.cc: Don't include fdlibm.h.
	Replace #if with #ifdef throughout.
	Declare extern __ieee754_fmod.
	(continue1): Remove op_getfield, op_getstatic, op_putfield,
	op_putstatic insns.
	* resolve.cc (_Jv_PrepareClass): Use imeth as method pointer.
	Search class hierarchy for superclass vtable.

	* java/lang/natClassLoader.cc (_Jv_UnregisterClass): Don't fall
	off the end of a pointer list.

	* java/lang/natThread.cc (stop): Don't abort, throw an exception
	instead.
	(suspend): Ditto.

From-SVN: r31897
2000-02-10 17:16:30 +00:00
Tom Tromey 7e3b6e312a natRuntime.cc (_load): Call add_library.
* java/lang/natRuntime.cc (_load): Call add_library.
	(loadLibraryInternal): Likewise.

From-SVN: r31877
2000-02-10 00:17:10 +00:00
Tom Tromey c56c8c43b9 natIconv.cc (Input_iconv::finalize): Call iconv_close when handle is not NULL.
* gnu/gcj/convert/natIconv.cc (Input_iconv::finalize): Call
	iconv_close when handle is not NULL.  Thanks to Andrew Haley.
	(Output_iconv::finalize): Likewise.

From-SVN: r31876
2000-02-10 00:14:54 +00:00
Tom Tromey bad196d78e Properties.java (setProperty): New method.
* java/util/Properties.java (setProperty): New method.
	(store): New method.

From-SVN: r31855
2000-02-08 21:30:45 +00:00
Tom Tromey 3fd64b5a09 Runtime.java (_load): Declare.
* java/lang/Runtime.java (_load): Declare.
	(load, loadLibrary): Wrote in terms of _load.
	* java/lang/natRuntime.cc (load): Call JNI_OnLoad if it appears in
	library.
	(loadLibrary): Likewise.
	Include <jni.h>.
	(_load): New method.
	(loadLibrary, load): Removed.

From-SVN: r31846
2000-02-08 00:26:58 +00:00
Tom Tromey 278abd2849 jni.cc (ThrowableClass): New define.
* jni.cc (ThrowableClass): New define.
	(_Jv_JNI_Throw): Check argument.
	(_Jv_JNI_ThrowNew): Likewise.
	(wrap_value): Don't wrap object if it is NULL.
	(_Jv_JNI_DefineClass): Use wrap_value.
	(_Jv_JNI_FindClass): Likewise.
	(_Jv_JNI_GetSuperclass): Likewise.
	(_Jv_JNI_ExceptionOccurred): Likewise.
	(_Jv_JNI_AllocObject): Likewise.
	(_Jv_JNI_GetObjectClass): Likewise.
	(_Jv_JNI_NewString): Likewise.
	(_Jv_JNI_NewStringUTF): Likewise.
	(_Jv_JNI_NewObjectArray): Likewise.
	(_Jv_JNI_GetObjectArrayElement): Likewise.
	(_Jv_JNI_NewPrimitiveArray): Likewise.
	(_Jv_JNI_ToReflectedField): Likewise.
	(_Jv_JNI_ToReflectedMethod): Likewise.
	(_Jv_JNI_AllocObject): Check argument.
	(_Jv_JNI_NewObjectV): Likewise.
	(_Jv_JNI_NewObject): Likewise.
	(_Jv_JNI_NewObjectA): Likewise.
	(_Jv_JNI_GetObjectClass): Likewise.
	(_Jv_JNI_GetField): Likewise.
	(_Jv_JNI_SetField): Likewise.

From-SVN: r31845
2000-02-08 00:23:09 +00:00
Tom Tromey 7c51d9fb95 interpret.cc (PUSHL): Don't use expression statement.
* interpret.cc (PUSHL): Don't use expression statement.
	(PUSHD): Likewise.
	(LOADL): Likewise.
	(STOREL): Likewise.

From-SVN: r31844
2000-02-08 00:17:28 +00:00
Tom Tromey f39b788a15 jni.cc (add_char): Conditional on INTERPRETER.
* jni.cc (add_char): Conditional on INTERPRETER.
	(mangled_name): Likewise.
	(call): Likewise.
	* include/java-interp.h (class _Jv_MethodBase): Conditional on
	INTERPRETER.
	(class _Jv_JNIMethod): Likewise.

From-SVN: r31839
2000-02-07 21:17:30 +00:00
Warren Levy 4f88416976 Added credits for Per Bothner's work on MPN.java and IntNum.java (for
BigInteger).

From-SVN: r31795
2000-02-04 22:11:07 +00:00
Warren Levy 25c449becf Makefile.am: Added MPN.java and BigInteger.java.
* Makefile.am: Added MPN.java and BigInteger.java.
	* Makefile.in: Rebuilt.
	* gnu/gcj/math/MPN.java: New file.
	* java/math/BigInteger.java: New file.

From-SVN: r31794
2000-02-04 22:00:36 +00:00
Tom Tromey facc279fc1 defineclass.cc (handleMethodsBegin): Allocate _Jv_MethodBase pointers.
* defineclass.cc (handleMethodsBegin): Allocate _Jv_MethodBase
	pointers.
	(handleMethodsEnd): Fixed error messages.  Create a _Jv_JNIMethod
	if the method is native.
	* resolve.cc (ncode): Don't handle native methods.
	(_Jv_JNIMethod::ncode): New method.
	(_Jv_PrepareClass): Handle native methods.
	* jni.cc (call): Renamed from _Jv_JNI_conversion_call.
	Include AbstractMethodError.h.
	(add_char): New function.
	(mangled_name): Likewise.
	* include/java-interp.h (class _Jv_JNIMethod): New class.
	(class _Jv_MethodBase): New class.
	(class _Jv_InterpMethod): Derive from _Jv_MethodBase.
	(_Jv_InterpClass): Changed `interpreted_methods' field to type
	`_Jv_MethodBase'.

	* include/jvm.h (_Jv_FindSymbolInExecutable): Declare.
	* java/lang/natRuntime.cc (libraries_size, libraries_count,
	libraries): New globals.
	(add_library): New function.
	(_Jv_FindSymbolInExecutable): New function.

	* java/lang/natClassLoader.cc (initiated_classes, loaded_classes):
	Now static.

From-SVN: r31790
2000-02-04 20:49:27 +00:00
Andrew Haley 43c5c8a630 Throwable.java (CPlusPlusDemangler): New class.
2000-02-04  Andrew Haley  <aph@cygnus.com>

        * java/lang/Throwable.java (CPlusPlusDemangler): New class.
        (printStackTrace): Use a CPlusPlusDemangler to demangle names.
        * java/lang/natThrowable.cc (printRawStackTrace): Rename
        printStackTrace to printRawStackTrace.

From-SVN: r31785
2000-02-04 16:59:35 +00:00