Commit Graph

346 Commits

Author SHA1 Message Date
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 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
Tom Tromey fec1ce0a00 * java/io/ByteArrayOutputStream.java: Merged with Classpath.
From-SVN: r35736
2000-08-16 01:43:42 +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 b6ac804e3d Connection.java (gotHeaders): Removed.
2000-08-10  Bryce McKinlay  <bryce@albatross.co.nz>
	    John Stracke <francis@ecal.com>

	* gnu/gcj/protocol/http/Connection.java (gotHeaders): Removed.
	(connect): Don't falsely claim HTTP/1.1 compliance. Call
	getHttpHeaders().
	(disconnect): Don't unset connected flag.
	(getHeaderField (String)): Call connect() if not connected.
	(getHeaderField (int)): Ditto.
	(getHeaderFieldKey): Ditto.
	(getHttpHeaders): Don't call connect().
	* java/net/HttpURLConnection.java (instanceFollowRedirects,
	gotResponseVals): New fields.
	(getResponseCode): Call getResponseVals() conditionally.
	(getResponseMessage): Ditto.
	(getResponseVals): Call connect(). Don't throw
	FileNotFoundException.

From-SVN: r35603
2000-08-10 10:10:25 +01:00
Bryce McKinlay b996061366 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.
	* java/awt/Color.java (getTransparency): New method.
	* java/awt/Component.java: Various updates.
	* java/awt/Container.java (removeNotify): Call super.removeNotify()
	after dealing with children.
	* java/awt/Toolkit.java (changeSupport): Renamed from pcsupport.
	* java/awt/Window.java: Various new methods and updates.
	* java/awt/color/ICC_Profile.java (getNumComponents): Cast profileID
	to int for switch.
	* java/awt/event/KeyEvent.java (paramString): Initialize `r'.
	* java/awt/event/WindowEvent.java (paramString): Ditto.
	* java/awt/geom/Dimension2D.java (clone): Wrap super call with
	try/catch block.
	* java/awt/geom/Point2D.java (clone): Ditto.
	* java/awt/geom/RectangularShape.java (clone): Ditto.
	* java/awt/image/ColorModel.java (bits, cspace, transparency,
	hasAlpha, isAlphaPremultiplied): Make package-private, not private.

From-SVN: r35589
2000-08-09 14:01:44 +01: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 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
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
Bryce McKinlay 5ab63c1aea Makefile.am: Add new AWT stubs.
* Makefile.am: Add new AWT stubs.
	* java/awt/Canvas.java: New placeholder class.
	* java/awt/Checkbox.java: Ditto.
	* java/awt/CheckboxMenuItem.java: Ditto.
	* java/awt/Choice.java: Ditto.
	* java/awt/Dialog.java: Ditto.
	* java/awt/FileDialog.java: Ditto.
	* java/awt/List.java: Ditto.
	* java/awt/ScrollPane.java: Ditto.
	* java/awt/TextField.java: Ditto.
	* java/awt/datatransfer/Clipboard.java: Ditto.
	* java/awt/Component.java (treeLock): Now a static String. Add
	comment.
	* java/awt/MenuItem.java (MenuItem): Add default constructor.
	* java/awt/Toolkit.java: Added all methods from J2SE 1.3 API docs.
	Some commented out. Partially implemented.
	* java/awt/natToolkit.cc: Removed file.

From-SVN: r35450
2000-08-03 13:09:41 +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
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
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 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 1b0bd03b7f EventQueue.java (invokeAndWait): Call postEvent() within synchronized block.
* java/awt/EventQueue.java (invokeAndWait): Call postEvent() within
	synchronized block.
	* java/awt/event/InvocationEvent (dispatch): Synchronize on notifier
	before calling notifyAll().

From-SVN: r35042
2000-07-15 05:42:47 +01:00
Bryce McKinlay d55bb5be91 Add missing imports.
From-SVN: r35002
2000-07-12 22:24:00 +01:00
Bryce McKinlay 6ae3fb6650 Fix missing "package" declaration.
From-SVN: r35001
2000-07-12 22:16:52 +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
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 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
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
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
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 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 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
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
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 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
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
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 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
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 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 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
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 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 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