Commit Graph

207 Commits

Author SHA1 Message Date
Nathanael Nerode b2281cb3f2 aclocal.m4: Rebuilt with aclocal gcj-1.4.
* aclocal.m4: Rebuilt with aclocal gcj-1.4.
	* configure: Rebuilt with autoconf 2.13.
	* Makefile.in, gcj/Makefile.in, include/Makefile.in,
	testsuite/Makefile.in: Rebuilt with automake gcj-1.4.

From-SVN: r84743
2004-07-15 04:05:09 +00:00
Jerry Quinn 12e8e7ea6d EventHandler.java: New file.
2004-07-14  Jerry Quinn  <jlquinn@optonline.net>

	* java/beans/EventHandler.java: New file.
	* Makefile.am (awt_java_source_files): Add EventHandler.java.
	* Makefile.in, gcj/Makefile.in, include/Makefile.in,
	testsuite/Makefile.in: Regenerate.

From-SVN: r84714
2004-07-14 22:58:30 +00:00
Bryce McKinlay 7a1c3d48ab re PR libgcj/15713 (compile interpret.cc with -fno-strict-aliasing)
2004-07-12  Bryce McKinlay  <mckinlay@redhat.com>

	PR libgcj/15713
	* include/jvm.h (_Jv_value): New union type.
	* gcj/field.h (_Jv_Field): Add new _addr union field variants
	* interperet.cc (run): Use _Jv_value union type and *_addr _Jv_Field
	union members.

From-SVN: r84596
2004-07-13 02:04:47 +01:00
Bryce McKinlay a4548f27d0 javaprims.h: Regenerate CNI namespace definitions.
2004-07-10  Bryce McKinlay  <mckinlay@redhat.com>

        * gcj/javaprims.h: Regenerate CNI namespace definitions.

From-SVN: r84459
2004-07-10 15:50:15 +01:00
Bryce McKinlay ca60dce284 gcj.texi (Object allocation): Remove _Jv_AllocBytes.
* gcj.texi (Object allocation): Remove _Jv_AllocBytes.
	(Mixing with C++): Document JvAllocBytes and RawDataManaged.

	* gcj/cni.h (JvAllocBytes): New public CNI function. Calls
	_Jv_AllocBytes.
	* gnu/gcj/RawDataManaged.java: New file.
	* java/lang/Thread.java (data): Declare as RawDataManaged.
	* java/lang/natThread.cc (init_native): Cast natThread data to
	RawDataManaged, not jobject.
	* Makefile.am (ordinary_java_source_files): Add RawDataManaged.
	* Makefile.in: Rebuilt.

From-SVN: r82372
2004-05-28 19:53:06 +01:00
Bryce McKinlay f531010820 class.c (make_class_data): Add new field aux_info.
2004-04-19  Bryce McKinlay  <mckinlay@redhat.com>

	* class.c (make_class_data): Add new field aux_info.
	* decl.c (java_init_decl_processing): Push type and decl for
	`aux_info'.

2004-04-19  Bryce McKinlay  <mckinlay@redhat.com>

	* gcj/cni.h (JvAllocObject): Remove these obsolete,
	undocumented CNI calls.
	* include/java-interp.h (_Jv_InterpClass): No longer
	extends java.lang.Class.
	* java/lang/Class.h (Class): Add new field `aux_info'.
	* boehm.cc (_Jv_MarkObj): Update java.lang.Class marking.
	* defineclass.cc: Remove Class<->_Jv_InterpClass casts.
	Use Class->aux_info instead.
	* jni.cc (_Jv_JNI_AllocObject): Use _Jv_AllocObject.
	* resolve.cc: Remove Class<->_Jv_InterpClass casts.
	Use Class->aux_info instead.
	* java/io/natObjectInputStream.cc (allocateObject): Use
	_Jv_AllocObject.
	* java/lang/natClass.cc (newInstance): Likewise.
	* java/lang/natClassLoader.cc (_Jv_NewClass): Likewise.
	* java/lang/natObject.cc (clone): Likewise.
	* java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Likewise.
	* java/lang/natVMClassLoader.cc (defineClass): Don't use
	JvAllocObject. Allocate klass->aux_info here for interpreted
	class.

From-SVN: r80875
2004-04-20 02:38:46 +01:00
Bryce McKinlay 245c3c04af prims.cc (_Jv_AllocObject): Remove `size' argument.
libjava:
2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>

	* prims.cc (_Jv_AllocObject): Remove `size' argument.
	(_Jv_AllocObjectNoFinalizer): Likewise.
	(_Jv_AllocObjectNoInitNoFinalizer): Likewise.
	(_Jv_AllocPtrFreeObject): Likewise.
	(_Jv_AllocString): Moved from natString.cc. Call collector interface
	directly even in the JVMPI case.
	* gcj/cni.h (JvAllocObject): Remove `size' argument from
	_Jv_AllocObject calls.
	* gcj/javaprims.h: Update prototypes.
	* gnu/gcj/natCore.cc (_Jv_create_core): Use `new', not
	_Jv_AllocObject.
	* java/lang/Class.h: Update _Jv_AllocObject friend prototype.
	* java/lang/natString.cc (_Jv_AllocString): Move to prims.cc.

gcc/cp:
2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>

	* init.c (build_new_1): Don't use type size argument for Java
	_Jv_AllocObject call.

gcc/java:
2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>

	* expr.c (expand_java_NEW): Don't use size argument for
	_Jv_AllocObject calls.
	* parse.y (patch_invoke): Likewise.

From-SVN: r80754
2004-04-16 17:27:19 +01:00
Graydon Hoare 86881a7b54 [multiple changes]
2004-03-12  Graydon Hoare  <graydon@redhat.com>

	* gnu/java/awt/peer/gtk/GdkGraphics2D.java: Clipping fixes.
	* javax/swing/JComponent.java (paint): Use persistent double buffer.
	* javax/swing/JList.java (ListListener): Revalidate on changes.
	* javax/swing/JScrollPane.java: Reimplement.
	* javax/swing/JViewport.java: Reimplement.
	* javax/swing/ScrollPaneLayout.java: Reimplement.
	* javax/swing/ViewportLayout.java: Tidy up.
	* javax/swing/plaf/basic/BasicButtonListener.java: Remove printlns.
	* javax/swing/plaf/basic/BasicScrollPaneUI.java: Reimplement.
	* javax/swing/plaf/basic/BasicSliderUI.java: Handle missing labels.
	* javax/swing/plaf/basic/BasicViewportUI.java: Implement in terms of
	backing store only.

2004-03-11  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
	(window_wm_protocols_filter): New function.
	(window_focus_in_cb): Remove function.
	(window_focus_out_cb): Likewise.
	(window_focus_or_active_state_change_cb): New function.
	(create): Add filter that removes WM_TAKE_FOCUS client messages.
	(connectSignals): Don't attach handlers to focus-in-event or
	focus-out-event signals.  Handle notify signal.

2004-03-11  David Jee  <djee@redhat.com>

	* gnu/java/awt/peer/gtk/GtkCheckboxPeer.java
	(gtkSetLabel): New native method declaration.
	(setLabel): Use gtkSetLabel.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c
	(Java_gnu_java_awt_peer_gtk_GtkCheckboxPeer_gtkSetLabel): New method.

2004-03-10  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* gnu/java/awt/peer/gtk/GdkGraphics.java (setColor): Default to
	black when color argument is null.

2004-03-10  Kim Ho  <kho@redhat.com>

	* java/awt/Container.java: Remove check
	for drag events.

2004-03-10  Kim Ho  <kho@redhat.com>

	* java/awt/Container.java: (visitChild):
	Remove candidate clip. Use the component
	clip to intersect.
	* gnu/java/awt/peer/gtk/GtkComponentPeer.java:
	(handleEvent): Use the PaintEvent's clip.

2004-03-10  Kim Ho  <kho@redhat.com>

	* gnu/java/awt/peer/gtk/GtkComponentPeer.java:
	(handleEvent): Don't set the clip for the
	Graphics object.

2004-03-09  Graydon Hoare  <graydon@redhat.com>

	* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGlyphVector.c:
	Fix double <-> fixed macros, reset font transform.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkClasspathFontPeerMetrics.c:
	Likewise.

2004-03-09�� Kim Ho  <kho@redhat.com>

	* java/awt/Container.java: (visitChild): Move
	the x and y coordinate of the component rectangle
	to correct position.
	(handleEvent): Forward drag events to the pressed
	component.
	* javax/swing/plaf/basic/BasicScrollBarUI.java:
	Fix comments.
	(ArrowButtonListener::mousePressed): Stop the
	existing timer.
	(mouseDragged): Implement.
	(TrackListener::mousePressed): Only react if
	the press doesn't occur on the thumb, otherwise
	just set the offset.
	(TrackListener::mouseReleased): Unset the isAdjusting
	value.
	(createIncreaseIcon): Switch icon.
	(createDecreaseIcon): Switch icon.
	(calculatePreferredSize): Use width.
	(getThumbBounds): Use the top as the lower value.
	(layoutVScrollBar): Switch the button locations.
	(paintIncreaseHighlight): Paint correct side of thumb.
	(paintDecreaseHighlight): ditto.
	(valueForYPosition): Use top as the lower value.
	* javax/swing/plaf/basic/BasicSliderUI.java:
	Fix comments.
	(mouseDragged): Implement.
	(mousePressed): Only react when the thumb isn't
	pressed, otherwise just set offset.
	(mouseReleased): Handle a release of the thumb.
	(scrollDueToClickInTrack): Stop the timer first.
	* javax/swing/JProgressBar.java:
	(setString): Fix change condition.
	* javax/swing/JSeparator.java:
	Remove println's.

2004-03-08  David Jee  <djee@redhat.com>

	* java/awt/image/AffineTransformOp.java:
	(filter): Use Graphics2D interface instead of directly using the
	GdkGraphics2D peer.

2004-03-05  David Jee  <djee@redhat.com>

	* gnu/java/awt/peer/gtk/GtkButtonPeer.java
	(handleEvent): Action events are generated upon MOUSE_RELEASED.
	* java/awt/Container.java
	(acquireComponentForMouseEvent): Fixed.
	(handleEvent): Fixed.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c
	(state_to_awt_mods_with_button_states): New method.
	(pre_event_handler): Fixed mouse event generation.

2004-03-05  Olga Rodimina  <rodimina@redhat.com>

	gnu/java/awt/peer/gtk/GdkGraphics2D.java
	(GdkGraphics2D (BufferedImage)): Initialize
	pixmap associated with specified BufferedImage.
	(setPaint): Changed implementation of Texture
	Paint to use AffineTransformOp.
	* java/awt/image/AffineTransformOp.java
	(createCompatibleDestRaster): Throw RasterFormatException
	if resulting width or height of raster is 0.

2004-03-04  Olga Rodimina  <rodimina@redhat.com>

	* java/awt/image/AffineTransformOp.java:
	Removed unnecessary field interpolationType.
	Formatted some of the lines to be consistent with
	the GNU style.
	(AffineTransformOp): Create new RenderingHints
	containing specified interpolation type.
	(createCompatibleDestImage): Implemented.
	(createCompatibleDestRaster): Implemented.
	(filter): Implemented.
	(getBounds2D(BufferedImage)): Implemented.
	(getBounds2D(Raster)): Implemented.
	(getInterpolationType): Get interpolation value from
	rendering hints.

2004-03-04  David Jee  <djee@redhat.com>

	* gnu/java/awt/peer/gtk/GtkContainerPeer.java
	(setFont): Check if child peers are null.

2004-03-04  Graydon Hoare  <graydon@redhat.com>

	* testsuite/lib/libjava.exp (libjava_find_lib): Don't include
	.libs in -L option.
	(libjava_arguments): Add new libraries to argument list.

2004-03-04  Tom Tromey  <tromey@redhat.com>

	* Makefile.in: Rebuilt.
	* Makefile.am (toolexeclib_LTLIBRARIES): Added lib-java-awt.la,
	lib-javax-swing.la, lib-java-applet.la, lib-java-beans.la.
	(misc_java_source_files): New macro.
	(swing_java_source_files): Likewise.
	(awt_java_source_files): Pruned.
	(applet_java_source_files): New macro.
	(beans_java_source_files): Likewise.
	(lib_java_applet_la_SOURCES): Likewise.
	(lib_java_awt_la_SOURCES): Likewise.
	(lib_javax_swing_la_SOURCES): Likewise.
	(lib_java_beans_la_SOURCES): Likewise.
	(all_java_object_files): Likewise.
	(%.lo: %.java): Use all_java_object_files.
	(all_java_source_files): Added new _SOURCES.
	(ordinary_java_source_files): Removed awt_java_source_files.

2004-03-02  Olga Rodimina  <rodimina@redhat.com>

	* Makefile.am: Added java/awt/image/AffineTransformOp.java
	* Makefile.in: Re-generated.
	* java/awt/image/AffineTransformOp.java: New Class.

2004-03-01  Olga Rodimina  <rodimina@redhat.com>

	* gnu/java/awt/peer/gtk/GdkGraphics2D.java
	(setPaint): Interpret correctly TexturePaint's
	anchor rectangle.
	(drawImage): Fixed scale factors of the affine
	transform.

2004-02-27  David Jee  <djee@redhat.com>

	* gnu/java/awt/peer/gtk/GdkGraphics.java
	(GdkGraphics(Component)): Inherit font from component.
	(drawString): Use font style.
	* gnu/java/awt/peer/gtk/GtkCheckboxPeer.java
	(gtkSetFont): New native method declaration.
	(setFont): New method.
	* gnu/java/awt/peer/gtk/GtkComponentPeer.java
	(gtkSetFont): New native method declaration.
	(setFont): Call new native method gtkSetFont.
	* gnu/java/awt/peer/gtk/GtkContainerPeer.java
	(setFont): For all child components who do not their fonts set,
        set their peers' fonts with this container's font.
	* gnu/java/awt/peer/gtk/GtkLabelPeer.java:
	Move all native method declarations to the top for readability.
	(gtkSetFont): New native method declaration.
	(setFont): New method.
	* java/awt/Component.java
	(setFont): Invalidate after setting the font.
	* java/awt/Container.java
	(invalidateTree): New method.
	(setFont): Invalidate the container tree after setting the font.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics.c
	(Java_gnu_java_awt_peer_gtk_GdkGraphics_drawString): Use font style.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c
	(Java_gnu_java_awt_peer_gtk_GtkCheckboxPeer_gtkSetFont): New method.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
	(Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkSetFont): New method.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkLabelPeer.c
	(Java_gnu_java_awt_peer_gtk_GtkLabelPeer_gtkSetFont): New method.

2004-02-27  Olga Rodimina <rodimina@redhat.com>

	* gnu/java/awt/peer/gtk/GdkGraphics2D.java
	(updateBufferedImage): New helper function.
	Updates BufferedImage in memory if it was changed.
	(draw): changed to update BufferedImage in memory after
	this drawing operation
	(fill): Ditto.
	(draw3DRect): Ditto.
	(fill3DRect): Ditto.
	(clearRect): Ditto.
	(drawRaster): Ditto.
	(drawImage) : Ditto. Update only in case of GtkOffScreenImage with
	no affine transformation.
	(drawGlyphVector): Ditto.

2004-02-26  Olga Rodimina <rodimina@redhat.com>

	* gnu/java/awt/peer/gtk/GdkGraphics2D.java
	(isBufferedImageGraphics): New Helper function.
	Returns true if this graphics2d can be used to draw
	into buffered image and false otherwise.
	(updateImagePixels): New Helper function.
	Updates pixels in the BufferedImage.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c
	(getImagePixels): New function. Returns pixels
	of the buffered image associated with
	this Graphics2D.

2004-02-26  David Jee  <djee@redhat.com>

	* java/awt/BorderLayout.java
	(layoutContainer): Fix width and height calculations to ensure
	that they're non-negative.
	* java/awt/Component.java
	(setBackground): If c is null, inherit from closest ancestor whose
	background color is set.

2004-02-26�� Kim Ho�� <kho@redhat.com>

	* Makefile.am: Add new files.
	* Makefile.in: Re-generate.
	* javax/swing/JProgressBar.java:
	(JProgressBar(int, int int)): Throw
	IllegalArgumentException if orientation is
	invalid.
	(JProgressBar(BoundedRangeModel)): Create
	ChangeListener and register it. UpdateUI.
	(getChangeListeners): Implement.
	(setModel): Reset ChangeListener.
	* javax/swing/JScrollBar.java: Implement.
	* javax/swing/JSeparator.java: Implement.
	* javax/swing/JSlider.java:
	(JSlider(int, int, int, int)): Throw
	IllegalArgumentException if orientation
	is invalid.
	(getChangeListeners): Fix method name.
	* javax/swing/SwingUtilities.java:
	(layoutCompoundLabel): If there is no text,
	set the text rectangle dimensions to 0.
	* javax/swing/plaf/basic/BasicButtonUI.java:
	(paint): If there is no text, don't paint it.
	* javax/swing/plaf/basic/BasicScrollBarUI.java:
	Implement.
	* javax/swing/plaf/basic/BasicSeparatorUI.java:
	Implement.
	* javax/swing/plaf/basic/BasicSliderUI.java:
	(propertyChange): If the model changes, change
	the listeners accordingly.

2004-02-25  Graydon Hoare  <graydon@redhat.com>

	* javax/swing/AbstractButton.java: Add "final" qualifiers.
	* javax/swing/JList.java: Reimplement.
	* javax/swing/DefaultListSelectionModel.java: Reimplement.
	* javax/swing/plaf/basic/BasicListUI.java: Reimplement.
	* javax/swing/plaf/basic/BasicLookAndFeel.java: Add "purple" values.
	* javax/swing/ListModel.java: Javadoc.
	* javax/swing/ListSelectionModel.java: Add missing methods.
	* javax/swing/AbstractListModel.java: Javadoc and corrections.
	* javax/swing/DefaultListModel.java: Javadoc and corrections.
	* javax/swing/ListModel.java: Javadoc and corrections.
	* javax/swing/DefaultListCellRenderer.java: Minor tidying.

2004-02-25  David Jee  <djee@redhat.com>

	* gnu/java/awt/peer/gtk/GtkFontPeer.java
	(GtkFontPeer): Change default size to 12.
	* gnu/java/awt/peer/gtk/GtkToolkit.java
	(getFontPeer): Change default size to 12.
	(getClasspathFontPeer): Likewise. Set default name to "Default".
	* java/awt/Font.java
	(Font(Map)): Call Font(String,Map).
	(Font(String,Map)): If attrs is null, initialize it as an empty
	HashMap, which will ensure that the Font will get default attributes.

2004-02-25  David Jee  <djee@redhat.com>

	* gnu/java/awt/peer/gtk/GtkFontPeer.java
	(GtkFontPeer(String,int)): Call the new constructor with size 1.
	(GtkFontPeer(String,int,int)): New constructor with size attribute.
	* gnu/java/awt/peer/gtk/GtkToolkit.java
	(getFontPeer(String,int)): Call the new overload method with size 1.
	(getFontPeer(String,int,int)): New method. Overloaded with size
	attribute.
	(getClasspathFontPeer): Set the size of the font.

2004-02-24  Olga Rodimina  <rodimina@redhat.com>

	* gnu/java/awt/peer/gtk/GdkGraphics2D.java
	(bimage): New field.
	(GdkGraphics2D): New Constructor. Constructs Graphics
	object that can be used to draw into the Buffered Image.
	* gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java:
	(GdkGraphicsEnvironment): Fixed to include public
	keyword.
	(createGraphics): Implemented.
	* gnu/java/awt/peer/gtk/GtkToolkit.java
	(getLocalGraphicsEnvironment): Implemented.
	* java/awt/GraphicsEnvironment.java:
	(getLocalGraphicsEnvironment): Implemented.
	* java/awt/image/BufferedImage.java:
	(createGraphics): Implemented.

2004-02-24  David Jee  <djee@redhat.com>

	* java/awt/Component.java
	(eventTypeEnabled): Add MOUSE_MOVED and MOUSE_DRAGGED event types.
	* java/awt/Container.java
	(addNotifyContainerChildren): Fix event enabling.

2004-02-23  Olga Rodimina  <rodimina@redhat.com>

	* Makefile.am: Added
	gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java
	* Makefile.in: Re-generated.
	* gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java:
	New Class.

2004-02-19  Kim Ho  <kho@redhat.com>

	* Makefile.am: Add BasicProgressBarUI
	* Makefile.in: Regenerate.
	* javax/swing/JProgressBar.java:
	Re-implement.
	* javax/swing/plaf/basic/BasicLookAndFeel.java
	Add constants for JProgressBar.
	* javax/swing/plaf/basic/BasicProgressBarUI.java
	Implement.
	* javax/swing/plaf/basic/BasicSliderUI.java
	Change comments.
	(calculateGeometry): New method
	(paint): Remove unnecessary size calculations.

2004-02-18  Olga Rodimina  <rodimina@redhat.com>

	* gnu/java/awt/peer/gtk/GdkGraphics2D.java
	(drawRaster): Fixed small error that caused
	imageToUser transformation to be set incorrectly.
	(toString): Implemented.

2004-02-18  David Jee  <djee@redhat.com>

	* java/awt/CardLayout.java
	(addLayoutComponent): Show the first component added as the default.
	(removeLayoutComponent): After removing, show the next component.
	(gotoComponent): If there is only one component, show it and return.

2004-02-18  Kim Ho  <kho@redhat.com>

	* javax/swing/JSlider.java: Re-order
	modifiers.
	* javax/swing/JLabel.java: Re-order
	modifiers.
	* javax/swing/JComponent.java:
	(addPropertyChangeListener):
	Implement.
	(removePropertyChangeListener):
	ditto.
	(firePropertyChangeEvent):
	ditto.

2004-02-17  David Jee  <djee@redhat.com>

	* java/awt/Component.java
	(show): Dispatch ComponentEvent via system event queue.
	(hide): Likewise.
	(move): Likewise.
	(resize): Likewise.
	(reshape): Likewise.
	* java/awt/Window.java
	(setBoundsCallback): Likewise.

2004-02-17  David Jee  <djee@redhat.com>

	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
	(Java_gnu_java_awt_peer_gtk_GtkComponentPeer_setNativeBounds):
	Use gtk_widget_set_size_request() instead of the deprecated
	gtk_widget_set_usize().

2004-02-17  Kim Ho  <kho@redhat.com>

	* javax/swing/JSlider.java: Fix comments and
	make property strings constants.
	(createStandardLabels): Use the labels
	preferred size as bounds.
	* javax/swing/plaf/basic/BasicSliderUI.java
	Fix comments.
	(ScrollHandler::actionPerformed): Don't
	calculate the timer stop value. Let the
	MouseListeners find the stop location.
	(getPreferredHorizontalSize): Re-implement.
	(getPreferredVerticalSize): ditto.
	(getMinimumHorizontalSize): ditto.
	(getMinimumVerticalSize): ditto.
	(getPreferredSize): ditto.
	(getMinimumSize): ditto.
	(getMaximumSize): ditto.
	(paintTicks): Use doubles to find the
	tick location.
	(paintHorizontalLabel):�� Use preferredSize
	as initial width and height.
	(paintVerticalLabel): ditto.

2004-02-17  Kim Ho  <kho@redhat.com>

	* javax/swing/JLabel.java: Changed
	property strings to constants.
	(DISPLAYED_MNEMONIC_INDEX_CHANGED_PROPERTY):
	New property.
	(setText): Change mnemonic index if
	text is too short.
	(setDisplayedMnemonicIndex): Fire property
	change event.
	(getDisplayedMnemonicIndex): Remove check
	against short text.

2004-02-17 Olga Rodimina <rodimina@redhat.com>

	* gnu/java/awt/peer/gtk/GdkGraphics2D.java:
	(drawImage(img,xform,obs)): Invert xform before
	passing the xform to cairo.
	(drawImage(img,x,y,bgcolor,obs)): Implemented.
	(drawImage (img,x,y,w,h,bgcolor,obs)): Partly
	implemented.
	(drawImage (img,x,y,w,h,obs)): Implemented.
	(drawImage (img,dx1,dy1,dx2,dy2,sx1,sy1,sx2,sy2,
	bgcolor,obs)): Partly implemented.
	(drawImage (img,dx1,dy1,dx2,dy2,sx1,sy1,sx2,sy2,obs)):
	Implemented.
	* java/awt/image/BufferedImage.java:
	(copyData): if dest is null, create raster with same
	dimensions as the current image.

2004-02-16  Graydon Hoare  <graydon@redhat.com>

	* javax/swing/plaf/basic/BasicLabelUI.java
	(getPreferredSize): Use layoutCL.
	* javax/swing/plaf/basic/BasicGraphicsUtils.java
	(getPreferredButtonSize): Start with empty view rect, layout using
	component's preferred alignment.
	* javax/swing/plaf/basic/BasicLookAndFeel.java: Add some Label and
	List defaults.

2004-02-16  David Jee  <djee@redhat.com>

	* java/awt/Component.java
	(show): Dispatch COMPONENT_SHOWN ComponentEvent.
	(hide): Dispatch COMPONENT_HIDDEN ComponentEvent.
	(move): Erase old bounds and repaint new bounds. Dispatch
	COMPONENT_MOVED ComponentEvent.
	(resize): Erase old bounds and repaint new bounds. Dispatch
	COMPONENT_RESIZED ComponentEvent.
	(reshape): Dispatch COMPONENT_RESIZED and COMPONENT_MOVED
	ComponentEvents.
	* java/awt/Window.java
	(setBoundsCallback): Dispatch COMPONENT_RESIZED and COMPONENT_MOVED
	ComponentEvents.

2004-02-16  Olga Rodimina  <rodimina@redhat.com>

	* gnu/java/awt/peer/gtk/GdkGraphics2D.java:
	(setRenderingHint): Added implementation of
	Interpolation rendering hints.
	(setRenderingHints): Ditto.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c:
	(drawPixels): fixed to allow user to choose type
	of filtering that should be used when displaying images.
	(cairoSurfaceSetFilter): New method. Sets filter type for
	interpolation of pixel values.

2004-02-16  David Jee  <djee@redhat.com>

	* java/awt/GridBagLayout.java
	(calcCellSizes): Rows or columns with zero sizes should still be
	considered for extra space distribution.

2004-02-16  Kim Ho  <kho@redhat.com>

	* javax/swing/JLabel.java: Re-implement.
	* javax/swing/plaf/basic/BasicLabelUI.java
	Re-implement.
	* javax/swing/plaf/basic/BasicLookAndFeel.java:
	Added constant.

2004-02-16�� Kim Ho�� <kho@redhat.com>

	* javax/swing/JSlider.java: Fix indentation and comments.
	(setModel): Remove null check to conform with Sun's.
	(setOrientation): Throw exception if not
	HORIZONTAL or VERTICAL.
	(getInverted): Use private variable instead of
	ComponentOrientation.
	(setInverted): ditto.
	* javax/swing/plaf/basic/BasicSliderUI.java:
	Fix indentation and comments.
	(propertyChange): Remove check for inverted slider, handle
	in main paint.
	(getMinimumSize): Return preferred size.
	(getMaximumSize): ditto.
	(calculateFocusRect): Don't relocate rectangle.
	(drawInverted): Return XOR of the slider's inversion and
	the component's orientation.
	(paint): Update leftToRightCache

2004-02-13  David Jee  <djee@redhat.com>

	* java/awt/GridBagLayout.java
	(GetLayoutInfo): Fix weight and size distribution. Relocate repeated
	code to helper methods.
	(sortBySpan): New helper method.
	(distributeSizeAndWeight): Likewise.
	(calcCellWeights): Likewise.
	(calcCellSizes): Add comments.

2004-02-13  David Jee  <djee@redhat.com>

	* java/awt/Component.java
        (show): Only do something if component is invisible at the moment.
        (hide): Only do something if component is visible at the moment.
        (reshape): If lightweight, erase old bounds and repaint new bounds.

2004-02-13�� Kim Ho�� <kho@redhat.com>

	* Makefile.am: Updated for new file.
	* Makefile.in: Regenerated.
	* javax/swing/JSlider.java: Reimplement.
	* javax/swing/SwingUtilities.java
	(layoutCompoundLabel): Use icon height
	instead of width.
	(paintComponent): Implement.
	* javax/swing/plaf/basic/BasicLookAndFeel.java:
	Add JSlider defaults.
	* javax/swing/plaf/basic/BasicSliderUI.java:
	Implement. New file.

From-SVN: r79607
2004-03-17 21:29:02 +00:00
David Jee 3c3a78a502 2004-01-13�� David Jee�� <djee@redhat.com>
����������������* Makefile.am: Add BitwiseXORComposite.java.
����������������* Makefile.in: Regenerated.
����������������* gcj/Makefile.in: Regenerated.
����������������* include/Makefile.in: Regenerated.
����������������* testsuite/Makefile.in: Regenerated.

From-SVN: r75808
2004-01-13 17:37:23 +00:00
Michael Koch 3366ae3675 javaprims.h: Added missing java.util.Currency.
2003-11-25  Michael Koch  <konqueror@gmx.de>

	* gcj/javaprims.h: Added missing java.util.Currency.

From-SVN: r73927
2003-11-25 18:26:08 +00:00
David Daney 1322946805 mips-signal.h: New file.
2003-10-22  David Daney  <ddaney@avtrex.com)

	* include/mips-signal.h: New file.
	* sysdep/dwarf2-backtrace.cc: New file.
	* sysdep/mips: New directory.
	* sysdep/mips/locks.h: New file.
	* Makefile.am(extra_cc_files): New, to allow extra c++ files to be
	added to libgcj.
	(extra_cc_source_files): Ditto.
	* configure.host(disable_dladdr):  New shell variable passed to
	configure.
	(mips*-*-linux*): sysdeps_dir=mips,
	can_unwind_signal=yes, disable_dladdr=yes, use -mxgot.
	(mipsel*-linux* | mipsisa32el*-linux*): Enable hash synchronization.
	* configure.in:(mips*-*-linux*): Use sysdep/dwarf2-backtrace.cc to
	generate backtrace, and include/mips-signal.h as SIGNAL_HANDLER
	(HAVE_DLADDR): Make it depend on setting of disable_dladdr.
	(EXTRA_CC_FILES): New, to support conditional addition of
	sysdep/dwarf2-backtrace.cc.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
	* gcj/Makefile.in: Regenerated.
	* include/config.h.in: Regenerated.
	* include/Makefile.in: Regenerated.
	* testsuite/Makefile.in: Regenerated.

From-SVN: r72808
2003-10-22 16:35:17 +00:00
Paolo Bonzini 415c96ca6a interpret.cc (_Jv_InterpMethod::run): Don't use libffi types, they were meant to be internal.
2003-10-14  Paolo Bonzini  <bonzini@gnu.org>

	* interpret.cc (_Jv_InterpMethod::run): Don't
	use libffi types, they were meant to be internal.
	* gcj/javaprims.h (_Jv_ulong): New typedef.

From-SVN: r72482
2003-10-14 17:53:42 +00:00
Tom Tromey b9f42bb060 Proxy.java (generate): Uncomment protection domain code.
* java/lang/reflect/Proxy.java (generate): Uncomment protection
	domain code.
	* java/lang/natClassLoader.cc (defineClass): Added `loader'
	argument.
	(linkClass0): Now in VMClassLoader.
	(markClassErrorState0): Likewise.
	(getSystemClassLoaderInternal): New method.
	* java/lang/natClass.cc (initializeClass): Use
	VMClassLoader::resolveClass.
	* java/lang/ClassLoader.java: New version, from Classpath.
	* java/lang/Class.java (getProtectionDomain):
	protectionDomainPermission and unknownProtectionDomain now in
	VMClassLoader.
	* java/lang/Class.h: VMClassLoader now a friend class.
	* gnu/gcj/runtime/VMClassLoader.java (instance): Now
	package-private.
	* gcj/javaprims.h: Regenerated class list.
	* resolve.cc (_Jv_PrepareClass): Use VMClassLoader::resolveClass.
	* java/lang/VMClassLoader.java: New version from Classpath;
	modified for libgcj use.

From-SVN: r71765
2003-09-25 07:46:19 +00:00
Scott Gilbertson c79c6c5b9e Makefile.am (gtk_awt_peer_sources): Add gnu/java/awt/peer/GLightweightPeer.java.
2003-08-21  Scott Gilbertson  <scottg@mantatest.com>
            Thomas Fitzsimmons  <fitzsim@redhat.com>

	* Makefile.am (gtk_awt_peer_sources): Add
	gnu/java/awt/peer/GLightweightPeer.java.  Remove
	gnu/java/awt/GLightweightPeer.java.
	* gnu/java/awt/GLightweightPeer.java: Remove file.
	* gnu/java/awt/peer/GLightweightPeer.java: New file.
	* java/awt/Component.java (getToolkit): Add comment about
	lightweight components.
	* java/awt/Toolkit.java (createComponent): Return
	gnu.java.awt.peer.GLightweightPeer.

Co-Authored-By: Thomas Fitzsimmons <fitzsim@redhat.com>

From-SVN: r70657
2003-08-21 18:39:56 +00:00
Mark Mitchell d17811fd1a fold-const.c (make_range): Do not access operand 1 for a zero-operand operator.
* fold-const.c (make_range): Do not access operand 1 for a
	zero-operand operator.

2003-07-08  Mark Mitchell  <mark@codesourcery.com>

	* cp-tree.def (NON_DEPENDENT_EXPR): New node.
	* cp-tree.h (build_call_from_tree): Remove.
	(build_member_call): Likewise.
	(dependent_template_arg_p): Remove.
	(any_dependent_template_arguments_p): New function.
	(dependent_template_id_p): Likewise.
	(any_type_dependent_arguments_p): Likewise.
	(build_non_dependent_expr): Likewise.
	(build_non_dependent_args): Likewise.
	(build_x_compound_expr): Adjust prototype.
	* call.c (build_new_method_call): Handle non-dependent expressions
	correctly.
	* decl2.c (grok_array_decl): Likewise.
	(build_offset_ref_call_from_tree): Likewise.
	(build_call_from_tree): Remove.
	* error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
	(dump_expr): Likewise.
	* init.c (build_member_call): Remove.
	* mangle.c (write_expression): Update handling for template-ids.
	* parser.c (cp_parser_primary_expression): Use
	any_dependent_template_arguments_p.  Update constant-expression
	handling.
	(cp_parser_postfix_expression): Use
	any_type_dependent_arguments_p.  Simplify call processing.
	(cp_parser_unary_expression): Simplify.
	(cp_parser_expression): Adjust for changes to
	build_x_compound_expr.
	(cp_parser_template_argument): Implement standard-conforming
	parsing of non-type template arguments.
	(cp_parser_direct_declarator): Use
	cp_parser_fold_non_dependent_expr.
	(cp_parser_fold_non_dependent_expr): New function.
	(cp_parser_next_token_ends_template_argument_p): Likewise.
	* pt.c (convert_template_argument): Do not call
	maybe_fold_nontype_arg.
	(tsubst_baselink): Likewise.
	(tsubst_copy_and_build): Share common code.  Make sizeof/alignof
	processing work correctly for non-dependent expressions.  Adjust
	handling of COMPOUND_EXPR.  Simplify call processing.
	(value_dependent_expression_p): Deal with functional casts and
	sizeof/alignof correctly.
	(type_dependent_expression_p): Handle overloaded functions.
	(any_type_dependent_arguments_p): New function.
	(any_dependent_template_arguments_p): Likewise.
	(dependent_template_p): Treat SCOPE_REFs as dependent.
	(dependent_template_id_p): Simplify.
	(build_non_dependent_expr): New function.
	(build_non_dependent_args): Likewise.
	* semantics.c (finish_stmt_expr): Don't make dependent
	statement-expresions have void type.
	(finish_call_expr): Handle non-dependent expressions
	correctly.
	* tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
	* typeck.c (cxx_sizeof_or_alignof_type): Give the expression
	type size_t, even in templates.
	(expr_sizeof): Likewise.
	(finish_class_member_access_expr): Handle non-dependent expressions
	correctly.
	(build_x_indirect_ref): Likewise.
	(build_x_binary_op): Likewise.
	(build_x_unary_op): Likewise.
	(build_x_conditional_expr): Likewise.
	(build_x_compound_expr): Likewise.
	* typeck2.c (build_x_arrow): Likewise.

2003-07-08  Mark Mitchell  <mark@codesourcery.com>

	* g++.dg/abi/mangle17.C: Make sure template expressions are
	dependent.
	* g++.dg/abi/mangle4.C: Mark erroneous casts.
	* g++.dg/debug/debug7.C: Mark erronous new-declarator.
	* g++.dg/opt/stack1.C: Remove erroneous code.
	* g++.dg/parse/template7.C: New test.
	* g++.dg/template/dependent-expr1.C: Mark erroneous code.
	* g++.old-deja/g++.pt/crash4.C: Likewise.

2003-07-09  Mark Mitchell  <mark@codesourcery.com>

	* gcj/array.h (JvPrimClass): Don't parenthesize the output.

From-SVN: r69130
2003-07-09 08:48:08 +00:00
Mark Wielaard 5be0088e45 cni.h: CNI now expands to Compiled Native Interface.
* gcj/cni.h: CNI now expands to Compiled Native Interface.

       * java/lang/e_pow.c: CYGNUS LOCAL should be GCJ LOCAL.
       * java/lang/fdlibm.h: Likewise.

From-SVN: r69104
2003-07-08 21:27:37 +00:00
Thomas Fitzsimmons 29e531ff29 glib-2.0.m4: New file.
* glib-2.0.m4: New file.
	* gtk-2.0.m4: New file.
	* glib.m4: Remove.
	* gtk.m4: Remove.
	* configure.in: Update AM_PATH_GTK macro call to
	AM_PATH_GTK_2_0.  Likewise for AM_PATH_GLIB.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollBarPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextFieldPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c,
	jni/gtk-peer/gthread-jni.c,
	jni/gtk-peer/gthread-jni.h:
	New versions from classpath.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* Makefile.in: Regenerate.
	* gcj/Makefile.in: Regenerate.
	* include/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

From-SVN: r68746
2003-06-30 23:53:29 +00:00
Tom Tromey cf88ede3d2 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (JC1FLAGS): Added -Wno-deprecated.

From-SVN: r63352
2003-02-24 02:15:43 +00:00
Tom Tromey 5aac1dac62 Window.java (Window(Window,GraphicsConfiguration)): Don't try to find graphics configuration.
* java/awt/Window.java (Window(Window,GraphicsConfiguration)):
	Don't try to find graphics configuration.
	* java/awt/Toolkit.java (default_toolkit_name): Use new
	Configuration entry.
	* gnu/classpath/Configuration.java.in (default_awt_peer_toolkit):
	New global.
	* configure: Rebuilt.
	* configure.in (TOOLKIT): New subst.
	(--enable-java-awt) [xlib, gtk]: Set TOOLKIT if required.
	Do AWT tests much earlier.  Run Gtk tests.  Make jniinclude
	directory.  Make output directories for .c files.
	* Makefile.in: Rebuilt.
	* Makefile.am (lib_gnu_java_awt_peer_gtk_la_SOURCES): New macro.
	(toolexeclib_LTLIBRARIES): Added cond_gtk_ltlibrary.
	(all_java_source_files): Added new sources.
	($(lib_gnu_java_awt_peer_gtk_la_OBJECTS)): New target.
	(gtk_c_files): New macro.
	(gtk_c_source_files): New macro.
	(cond_gtk_ltlibrary): New macro.
	($(gtk_c_files)): New target.
	(lib_gnu_java_awt_peer_gtk_la_LIBADD): New macro.
	(gtk_awt_peer_sources): New macro.
	(gtk_c_headers): New macro.
	($(gtk_c_headers)): New target.
	(ACLOCAL_AMFLAGS): New macro.
	* gtk.m4, glib.m4, libart.m4: New files.
	* gnu/java/awt/peer/gtk/GdkFontMetrics.java,
	gnu/java/awt/peer/gtk/GdkGraphics.java,
	gnu/java/awt/peer/gtk/GtkArg.java,
	gnu/java/awt/peer/gtk/GtkArgList.java,
	gnu/java/awt/peer/gtk/GtkButtonPeer.java,
	gnu/java/awt/peer/gtk/GtkCanvasPeer.java,
	gnu/java/awt/peer/gtk/GtkCheckboxGroupPeer.java,
	gnu/java/awt/peer/gtk/GtkCheckboxMenuItemPeer.java,
	gnu/java/awt/peer/gtk/GtkCheckboxPeer.java,
	gnu/java/awt/peer/gtk/GtkChoicePeer.java,
	gnu/java/awt/peer/gtk/GtkClipboard.java,
	gnu/java/awt/peer/gtk/GtkComponentPeer.java,
	gnu/java/awt/peer/gtk/GtkContainerPeer.java,
	gnu/java/awt/peer/gtk/GtkDialogPeer.java,
	gnu/java/awt/peer/gtk/GtkFileDialogPeer.java,
	gnu/java/awt/peer/gtk/GtkFontPeer.java,
	gnu/java/awt/peer/gtk/GtkFramePeer.java,
	gnu/java/awt/peer/gtk/GtkGenericPeer.java,
	gnu/java/awt/peer/gtk/GtkImage.java,
	gnu/java/awt/peer/gtk/GtkImagePainter.java,
	gnu/java/awt/peer/gtk/GtkLabelPeer.java,
	gnu/java/awt/peer/gtk/GtkListPeer.java,
	gnu/java/awt/peer/gtk/GtkMainThread.java,
	gnu/java/awt/peer/gtk/GtkMenuBarPeer.java,
	gnu/java/awt/peer/gtk/GtkMenuComponentPeer.java,
	gnu/java/awt/peer/gtk/GtkMenuItemPeer.java,
	gnu/java/awt/peer/gtk/GtkMenuPeer.java,
	gnu/java/awt/peer/gtk/GtkOffScreenImage.java,
	gnu/java/awt/peer/gtk/GtkPanelPeer.java,
	gnu/java/awt/peer/gtk/GtkPopupMenuPeer.java,
	gnu/java/awt/peer/gtk/GtkScrollbarPeer.java,
	gnu/java/awt/peer/gtk/GtkScrollPanePeer.java,
	gnu/java/awt/peer/gtk/GtkTextAreaPeer.java,
	gnu/java/awt/peer/gtk/GtkTextComponentPeer.java,
	gnu/java/awt/peer/gtk/GtkTextFieldPeer.java,
	gnu/java/awt/peer/gtk/GtkToolkit.java,
	gnu/java/awt/peer/gtk/GtkWindowPeer.java,
	gnu/java/awt/peer/gtk/TestAWT.java,
	gnu/java/awt/peer/gtk/Test.java: New files from Classpath.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontMetrics.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCanvasPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxMenuItemPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkChoicePeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkClipboard.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImagePainter.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkLabelPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuBarPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuItemPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPanelPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPopupMenuPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollBarPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollPanePeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextFieldPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c,
	jni/gtk-peer/gthread-jni.c, jni/gtk-peer/gthread-jni.h,
	jni/gtk-peer/gtkpeer.h, jni/classpath/jcl.c, jni/classpath/jcl.h,
	jni/classpath/jnilink.c, jni/classpath/jnilink.h,
	jni/classpath/native_state.c, jni/classpath/native_state.h,
	jni/classpath/primlib.c, jni/classpath/primlib.h: Likewise.

From-SVN: r62187
2003-01-31 17:54:14 +00:00
Mark Wielaard 827452ae5c Makefile.am (core_java_source_files): Add VMObjectStreamClass.java.
* Makefile.am (core_java_source_files): Add VMObjectStreamClass.java.
       (nat_source_files): Add natVMObjectStreamClass.cc.
       * Makefile.in: Regenerated.
       * gcj/javaprims.h (namespace java): Regenerated.
       * java/io/ObjectStreamClass.java (getClassUID): Call
       VMObjectStreamClass.hasClassInitializer().
       (hasClassInitializer): Removed.
       * java/io/VMObjectStreamClass.java: New class.
       * java/io/natVMObjectStreamClass.cc: New file.
       * java/lang/Class.h: Make java::io::VMObjectStreamClass friend class.

From-SVN: r61501
2003-01-20 06:46:28 +00:00
Tom Tromey 9f1cf235ef javaprims.h: Updated.
* gcj/javaprims.h: Updated.
	* scripts/classes.pl (scan): Removed stray semicolon.

From-SVN: r60659
2002-12-30 22:42:20 +00:00
Mark Mitchell dfe5a36e95 boehm.cc: Remove stray semicolon.
* boehm.cc: Remove stray semicolon.
	* interpret.cc: Likewise.
	* prims.cc: Likewise.
	* verify.cc (_Jv_BytecodeVerifier::verify_fail): Move definition
	earlier to ensure default arguments are processed.
	* gcj/array.h (JArray): Add forward declaration.
	(elements): Likewise.
	* gcj/javaprim.h: Remove stray semicolons.
	* include/bohm-gc.h: Likewise.
	* include/jni.h: Likewise.
	* include/jvm.h: Likewise.
	* java/lang/Class.h (_Jv_GetArrayClass): Declare _Jv_NewArrayClass.

From-SVN: r60556
2002-12-28 06:38:52 +00:00
Michael Koch 4d1d2b093d cvsignore: New file to ignore files generated during build.
2002-10-10  Michael Koch  <konqueror@gmx.de>

	* gcj/.cvsignore: New file to ignore files generated during build.
	* include/.cvsignore: New file to ignore files generated during build.

From-SVN: r58003
2002-10-10 05:21:53 +00:00
Tom Tromey d74732f5cd ObjectInputStream.java (resolveProxyClass): New method from Classpath.
* java/io/ObjectInputStream.java (resolveProxyClass): New method
	from Classpath.
	* Makefile.in: Rebuilt.
	* Makefile.am (rmi_java_source_files): Added new files.
	* gnu/java/rmi/RMIMarshalledObjectInputStream.java,
	gnu/java/rmi/RMIMarshalledObjectOutputStream.java,
	gnu/java/rmi/server/ConnectionRunnerPool.java: New files from
	Classpath.
	* gnu/java/rmi/dgc/DGCImpl.java,
	gnu/java/rmi/dgc/DGCImpl_Skel.java,
	gnu/java/rmi/dgc/DGCImpl_Stub.java,
	gnu/java/rmi/registry/RegistryImpl_Skel.java,
	gnu/java/rmi/registry/RegistryImpl_Stub.java,
	gnu/java/rmi/server/RMIHashes.java,
	gnu/java/rmi/server/RMIObjectInputStream.java,
	gnu/java/rmi/server/RMIObjectOutputStream.java,
	gnu/java/rmi/server/UnicastConnection.java,
	gnu/java/rmi/server/UnicastConnectionManager.java,
	gnu/java/rmi/server/UnicastRef.java,
	gnu/java/rmi/server/UnicastServer.java,
	gnu/java/rmi/server/UnicastServerRef.java,
	java/rmi/MarshalledObject.java,
	java/rmi/server/RMIClassLoader.java,
	java/rmi/server/RemoteObject.java,
	java/rmi/server/UnicastRemoteObject.java,
	java/security/SecureClassLoader.java: Merged from Classpath.

From-SVN: r57675
2002-10-01 03:46:43 +00:00
Anthony Green d3cc3f10da Add Proxy support.
From-SVN: r57635
2002-09-30 05:19:09 +00:00
Mark Wielaard 6e0532cdf6 Makefile.am (libgcj_la_SOURCES): Remove name-finder.cc.
* Makefile.am (libgcj_la_SOURCES): Remove name-finder.cc.
        (core_java_source_files): Add VMThrowable.java and NameFinder.java
        (nat_source_files): Remove natThrowable.cc, add natVMThrowable.cc
        and natNameFinder.cc.
        * Makefile.in: Regenerate.
        * prims.cc: Use trace_enabled from VMThrowable.
        * name-finder.cc: Removed.
        * gcj/javaprims.h: Add class VMThrowable.
        * gnu/gcj/runtime/NameFinder.java: New file.
        * gnu/gcj/runtime/natNameFinder.cc: Likewise.
        * include/name-finder.h: Removed.
        * java/lang/Throwable.java (printStackTrace (PrintStream)): Use new
        method stackTraceString().
        (printStackTrace (PrintWriter)): Likewise.
        (stackTraceString): Complete rewrite of old printStackTrace using
        StringBuffer.
        (stackTraceStringBuffer): New helper method for stackTraceString().
        (fillInStackTrace): Delegate to VMTrowable.
        (getStackTrace): Likewise.
        (getStackTrace0): Removed.
        (trace_enabled, stackTraceBytes): Moved to new VMThrowable.java.
        (setStackTrace): Copy given array.
        * java/lang/natThrowable.cc: Removed (replaced by natVMThrowable).
        * java/lang/VMThrowable.java: New class.
        * java/lang/natVMThrowable.cc: New file.

From-SVN: r56556
2002-08-24 22:46:19 +00:00
Mark Wielaard dc7b1dda60 natThrowable.cc (printRawStackTrace): removed.
* java/lang/natThrowable.cc (printRawStackTrace): removed.
	(getStackTrace0): new method.
	* java/lang/Throwable.java (CPlusPlusDemangler): removed.
	(printStackTrace(PrintWriter)): replace with pure java implementation.
	(printRawStackTrace): removed.
	(getStackTrace0): new method.
	* java/lang/StackTraceElement.java (toString): add extra whitespace.
	* gcj/javaprims.h: regenerate class list.
	* include/name-finder.h (lookup): new returns StackTraceElement*.
	(method_name, file_name): fields removed.
	(pid2, f2_pipe, b2_pipe, b2_pipe_fd): new fields.
	(~_Jv_name_finder): close new descriptors.
	* name-finder.cc(_Jv_name_finder): setup c++filt helper process.
	(createStackTraceElement): new method.
	(lookup): returns StackTraceElement*, uses createStackTraceElement().

From-SVN: r55424
2002-07-12 12:52:44 +00:00
Tom Tromey b2ae5f70a0 configure: Rebuilt.
* configure: Rebuilt.
	* configure.in (INTERPRETER): New subst.
	(AM_RUNTESTFLAGS): Don't subst.

From-SVN: r54940
2002-06-24 04:45:46 +00:00
Tom Tromey ab928b3241 javaprims.h: Updated class declaration list.
* gcj/javaprims.h: Updated class declaration list.
	* Makefile.in: Rebuilt.
	* Makefile.am (core_java_source_files): Removed
	BasicMapEntry.java.
	* java/util/BasicMapEntry.java: Removed.

From-SVN: r54753
2002-06-18 17:06:44 +00:00
Tom Tromey 3831381763 javaprims.h: Updated class declaration list.
* gcj/javaprims.h: Updated class declaration list.
	* Makefile.in: Rebuilt.
	* Makefile.am (core_java_source_files): Added
	PropertyPermissionCollection.java.
	* java/lang/Thread.java (group, name): Now package-private.
	* java/lang/ThreadGroup.java: Re-merge with Classpath.
	* java/util/AbstractList.java: Likewise.
	* java/util/AbstractMap.java: Likewise.
	* java/util/Calendar.java: Likewise.
	* java/util/Collections.java: Likewise.
	* java/util/HashMap.java: Likewise.
	* java/util/Hashtable.java: Likewise.
	* java/util/LinkedHashMap.java: Likewise.
	* java/util/LinkedList.java: Likewise.
	* java/util/List.java: Likewise.
	* java/util/ListResourceBundle.java: Likewise.
	* java/util/Map.java: Likewise.
	* java/util/Observable.java: Likewise.
	* java/util/Properties.java: Likewise.
	* java/util/PropertyPermission.java: Likewise.
	* java/util/PropertyPermissionCollection.java: Likewise.
	* java/util/PropertyResourceBundle.java: Likewise.
	* java/util/Random.java: Likewise.
	* java/util/SimpleTimeZone.java: Likewise.
	* java/util/StringTokenizer.java: Likewise.
	* java/util/TimerTask.java: Likewise.
	* java/util/TreeMap.java: Likewise.
	* java/util/WeakHashMap.java: Likewise.
	* java/util/jar/Attributes.java: Likewise.
	* java/util/jar/JarException.java: Likewise.
	* java/util/jar/Manifest.java: Likewise.

From-SVN: r54743
2002-06-18 15:40:16 +00:00
Tom Tromey 8217640552 javaprims.h: Updated class declaration list.
* gcj/javaprims.h: Updated class declaration list.
	* Makefile.in: Rebuilt.
	* Makefile.am (core_java_source_files): Added new file.
	* java/util/EventListenerProxy.java: New file.
	* java/util/EventListener.java: Re-merge with Classpath.
	* java/util/EventObject.java: Re-merge with Classpath.

From-SVN: r54720
2002-06-17 21:32:01 +00:00
Tom Tromey c458bd737d * gcj/javaprims.h: Updated class declaration list.
From-SVN: r54693
2002-06-17 04:08:46 +00:00
Tom Tromey 419831367f Class.h (Class::desiredAssertionStatus): Declare.
* java/lang/Class.h (Class::desiredAssertionStatus): Declare.
	(Class::getPackagePortion): Likewise.
	* java/lang/Class.java (desiredAssertionStatus): New method from
	Classpath.
	(getPackagePortion): Likewise.
	* java/lang/VMClassLoader.java (defaultAssertionStatus,
	packageAssertionStatus, classAssertionStatus): New methods from
	Classpath.
	* java/lang/ClassLoader.java (defaultAssertionStatus,
	systemPackageAssertionStatus, packageAssertionStatus,
	systemClassAssertionStatus, classAssertionStatus): New fields from
	Classpath.
	(setDefaultAssertionStatus, setPackageAssertionStatus,
	setClassAssertionStatus, clearAssertionStatus): New methods from
	Classpath.
	* Makefile.in: Rebuilt.
	* Makefile.am (core_java_source_files): Added AssertionError.java.
	* java/lang/AssertionError.java: New from Classpath.

From-SVN: r54517
2002-06-11 17:33:22 +00:00
Bryce McKinlay 4fbecd2944 Merge JDK 1.4 exception chaining support from classpath.
* java/lang/Throwable.java: Merge 1.4 support from classpath.
	(stackTraceBytes): Rename from stackTrace.
	* java/lang/Exception.java: Merge from classpath.
	* java/lang/StackTraceElement: New file from classpath.
	* gcj/javaprims.h: Rebuild CNI namespace declarations.
	* Makefile.am: Add StackTraceElement.
	* Makefile.in: Rebuilt.

From-SVN: r53836
2002-05-24 11:40:47 +01:00
Tom Tromey ab8471334e re PR libgcj/6081 (libjava make install fails: Arg list too long)
Fix for PR libgcj/6081:
	* Makefile.in: Rebuilt.
	* Makefile.am (install-data-local): Use GNU make trick to avoid
	shell limit.

From-SVN: r52370
2002-04-16 15:52:26 +00:00
Anthony Green 395cb21141 Install libgcj.jar as libgcj-VERSION.jar.
From-SVN: r52226
2002-04-12 14:28:10 +00:00
Tom Tromey 880f8c16ad Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (java/lang/Thread.h): Mark
	_Jv_AttachCurrentThreadAsDaemon as friend.
	* gcj/javaprims.h (_Jv_AttachCurrentThreadAsDaemon): Declare.
	* gcj/cni.h (JvAttachCurrentThreadAsDaemon): New function.
	* java/lang/natThread.cc (_Jv_AttachCurrentThreadAsDaemon): New
	function.
	* java/lang/natRuntime.cc (_load): Recognize JNI_VERSION_1_4.
	* jni.cc (_Jv_JNI_GetVersion): Return JNI_VERSION_1_4.
	(_Jv_JNI_InvokeFunctions): Added
	_Jv_JNI_AttachCurrentThreadAsDaemon.
	(_Jv_JNI_GetEnv): Handle JNI_VERSION_1_4.
	(JNI_GetDefaultJavaVMInitArgs): Likewise.
	(JNI_CreateJavaVM): Likewise.
	(_Jv_JNI_AttachCurrentThread): Likewise.
	(_Jv_JNI_AttachCurrentThread): Added `is_daemon' argument.
	(_Jv_JNI_AttachCurrentThreadAsDaemon): New method.
	(_Jv_JNIFunctions): Initialize new fields.
	(_Jv_JNI_NewDirectByteBuffer): New function.
	(_Jv_JNI_GetDirectBufferAddress): Likewise.
	(_Jv_JNI_GetDirectBufferCapacity): Likewise.
	* include/jni.h (JNI_VERSION_1_4): New macro.
	(JNIInvokeInterface::AttachCurrentThreadAsDaemon): New field.
	(_Jv_JavaVM::AttachCurrentThreadAsDaemon): New method.
	(JNINativeInterface::NewDirectByteBuffer): New field.
	(JNINativeInterface::GetDirectBufferAddress): New field.
	(JNINativeInterface::GetDirectBufferCapacity): New field.
	(_Jv_JNIEnv::NewDirectByteBuffer): New method.
	(_Jv_JNIEnv::GetDirectBufferAddress): New method.
	(_Jv_JNIEnv::GetDirectBufferCapacity): New method.

From-SVN: r52144
2002-04-10 20:36:04 +00:00
Anthony Green 5cb27a4697 libgcj.spec.in: Add CHECKREFSPEC.
2002-03-27  Anthony Green  <green@redhat.com>

	* libgcj.spec.in: Add CHECKREFSPEC.
	* configure.in: Ditto.
	* configure.host: Ditto.  Check references for xscale-elf.
	* configure: Rebuilt.

From-SVN: r51457
2002-03-27 16:41:44 +00:00
Tom Tromey 5c00920976 Makefile.am (libgcj_la_LDFLAGS): Use THREADLDFLAGS.
* Makefile.am (libgcj_la_LDFLAGS): Use THREADLDFLAGS.
	(jv_convert_LDFLAGS): Likewise.
	(gij_LDFLAGS): Likewise.
	(rmic_LDFLAGS): Likewise.
	(rmiregistry_LDFLAGS): Likewise.
	* configure.in (THREADLDFLAGS): New subst; set correctly for
	*BSD.

From-SVN: r51363
2002-03-26 00:54:41 +00:00
Tom Tromey c677cd7f47 reverted erroneous checkin
From-SVN: r51235
2002-03-23 16:16:46 +00:00
Tom Tromey f5c5a4e915 name-finder.h (_Jv_name_finder::myclose): New method.
* include/name-finder.h (_Jv_name_finder::myclose): New method.
	* name-finder.cc (_Jv_name_finder): Initialize file descriptors.

From-SVN: r51234
2002-03-23 16:14:28 +00:00
Anthony Green e2ea015c1c Install libgcj-config.h in a better place.
From-SVN: r50817
2002-03-15 18:03:49 +00:00
Tom Tromey fc04b455f9 natSystem.cc (init_properties): Use __VERSION__.
* java/lang/natSystem.cc (init_properties): Use __VERSION__.
	* gij.cc (version): Use __VERSION__.
	* include/config.h.in: Rebuilt.
	* acconfig.h (GCJVERSION): Removed.
	* configure: Rebuilt.
	* configure.in (GCJVERSION): Removed.

From-SVN: r50088
2002-02-27 05:32:29 +00:00
Alexandre Oliva d6e671fadf Makefile.in, [...]: Rebuilt.
* Makefile.in, gcj/Makefile.in, include/Makefile.in: Rebuilt.
* testsuite/Makefile.in: Likewise.

From-SVN: r49985
2002-02-23 03:15:37 +00:00
Eric Blake 2f999d0fe7 javaprims.h (java::lang): Add java::lang::StrictMath.
2002-02-14  Eric Blake  <ebb9@email.byu.edu>

	* gcj/javaprims.h (java::lang): Add java::lang::StrictMath.
	* Makefile.am (core_java_source_files): Add
	java/lang/StrictMath.java.
	* java/lang/Math.java: Merge with Classpath.
	* java/lang/StrictMath.java: New file - merge with Classpath.

From-SVN: r49781
2002-02-15 03:21:47 +00:00
Tom Tromey 04942eac9b For PR libgcj/5103:
* include/jvm.h (__GCJ_JNI_IMPL__): Define.
	* include/config.h.in: Rebuilt.
	* configure: Rebuilt.
	* configure.in: Define JV_HAVE_INTTYPES_H if inttypes.h found.
	Added comment for HAVE_DLOPEN to avoid autoheader error.
	* gcj/libgcj-config.h.in (JV_HAVE_INTTYPES_H): Added.
	* include/jni.h: Include <gcj/libgcj-config.h>.  Don't include
	CNI-specific headers if we are compiling ordinary JNI code with a
	C++ compiler.  Include <inttypes.h> and JNIWeakRef.h when
	appropriate.
	* jni.cc: Don't include JNIWeakRef.h.

From-SVN: r48082
2001-12-16 22:33:02 +00:00
Hans Boehm 938f37772e prims.cc: Some old cleanups.
* libjava/prims.cc: Some old cleanups.  The collector now
	handles test for out of memory.
	* libjava/prims.cc, libjava/gcj/javaprims.h:
	(_Jv_AllocObjectNoInitNoFinalizer, _Jv_AllocObjectNoFinalizer):
	New functions for finalizer-free allocation.
	(jvmpi_notify_alloc): Became separate function.
	* libjava/java/lang/Object.h, libjava/include/jvm.h: Adjust for
	revised vtable layout on IA64.  With TARGET_VTABLE_USES_DESCRIPTORS,
	there is only one extra descriptor.

From-SVN: r48002
2001-12-14 18:43:55 +00:00
Tom Tromey c0e5eb1602 javaprims.h: Updated class list.
* gcj/javaprims.h: Updated class list.
	* java/util/Hashtable.java: Re-merged with Classpath.

From-SVN: r46295
2001-10-16 22:00:32 +00:00
Mark Wielaard d352477d45 Makefile.am (core_java_source_files): add InheritableThreadLocal
* Makefile.am (core_java_source_files): add InheritableThreadLocal
	* Makefile.in: regenerate
	* gcj/javaprims.h: ditto
	* java/lang/InheritableThreadLocal.java: new class from Classpath
	* java/lang/Thread.java Thread (Thread, ThreadGroup, Runnable, String):
	call InheritableThreadLocal.newChildThread()

From-SVN: r45979
2001-10-02 22:49:59 +00:00
Mark Wielaard 627a8b878e Makefile.am: Add new classes
* Makefile.am: Add new classes
	(core_java_source_files): CharSequence
	(ordinary_java_source_files): Authenticator, PasswordAuthentication
	* Makefile.in: regenerate
	* gcj/javaprims.h: ditto
	* java/lang/CharSequence: new class from Classpath
	* java/lang/String.java: implements CharSequence
	(subSequence (int,int)): new method
	* java/lang/SubString.java: implements CharSequence
	(subSequence (int,int)): new method
	remerge comments with Classpath
	* java/net/Authenticator.java: new class from Classpath
	* java/net/PasswordAuthentication.java: ditto

From-SVN: r45969
2001-10-02 20:59:31 +00:00
Tom Tromey 2b3d3db68d javaprims.h: Rebuilt class list.
* gcj/javaprims.h: Rebuilt class list.
	* boehm.cc (_Jv_GCRegisterDisappearingLink): New function.
	(_Jv_GCCanReclaimSoftReference): New function.
	* include/jvm.h (_Jv_GCRegisterDisappearingLink): Declare.
	(_Jv_GCCanReclaimSoftReference): Declare.
	* java/lang/ref/Reference.java (referent): Now a RawData.
	(create): Renamed from `created'.  Added object argument.
	(Reference): Don't initialize `referent' here.
	* Makefile.in: Rebuilt.
	* Makefile.am (nat_source_files): Added new file.
	* java/lang/ref/natReference.cc: New file.

From-SVN: r45958
2001-10-02 14:31:47 +00:00
Tom Tromey 75df3bafe1 javaprims.h: Regenerated class list.
* gcj/javaprims.h: Regenerated class list.
	* java/lang/IllegalThreadStateException.java,
	java/lang/InstantiationException.java: Minor comment tweaks to
	satisfy libgcj `classes.pl' script.

From-SVN: r45354
2001-09-02 06:26:09 +00:00
Per Bothner dee45a7f96 javaprims.h (_Jv_RegisterClassHook): New extern declaration.
* gcj/javaprims.h (_Jv_RegisterClassHook):  New extern declaration.
	(_Jv_RegisterClassHookDefault):  Likewise.
	* java/lang/Class.h (_Jv_RegisterClassHookDefault):  Declare as friend.
	* java/lang/natClassLoader.cc (_Jv_RegisterClassHook):  New variable.
	(_Jv_RegisterClassHookDefault):  New.function.
	(_Jv_RegisterClasses):  Call _Jv_RegisterClassHook.

From-SVN: r45344
2001-08-31 18:26:14 -07:00
Bryce McKinlay 2dc55bc99f Makefile.am: New friends for java/lang/Thread.h.
* Makefile.am: New friends for java/lang/Thread.h.
	* prims.cc (runFirst): Removed.
	(JvRunMain): Merged into _Jv_RunMain. Now just calls that.
	(_Jv_RunMain): Now takes either a klass or class name parameter.
	Create a gnu.gcj.runtime.FirstThread and attach the native thread
	to that, then run it using _Jv_ThreadRun. Remove special handling of
	jar files, instead pass is_jar parameter through to FirstThread.
	* gcj/javaprims.h: Add prototypes for _Jv_ThreadRun and new variant
	of _Jv_AttachCurrentThread.
	* gnu/gcj/runtime/FirstThread.java (FirstThread): Now extends Thread.
	(run): New method. Take care of looking up main class manifest
	attribute and calling forName if neccessary. Then call call_main.
	(call_main): New native method.
	* gnu/gcj/runtime/natFirstThread.cc (call_main): New function, code
	relocated from prims.cc. Look up and call main method.
	* java/lang/Thread.java (run_): Removed.
	* java/lang/natThread.cc (run_): Renamed to...
	(_Jv_ThreadRun): this. JVMPI notification code moved to ...
	(_Jv_NotifyThreadStart): here. New function.
	(countStackFrames, destroy, resume, suspend, stop): Throw
	UnsupportedOperationExceptions rather than JvFail'ing.
	(_Jv_AttachCurrentThread): New variant takes a Thread argument.
	Existing version wraps new variant.

From-SVN: r45182
2001-08-26 12:30:09 +01:00
Tom Tromey ac8d99218a jni.cc: Include IdentityHashMap.h, not Hashtable.h.
* jni.cc: Include IdentityHashMap.h, not Hashtable.h.
	(local_ref_table, global_ref_table): Now IdentityHashMap.
	(_Jv_JNI_Init): Updated for new types.
	(mark_for_gc): Likewise.
	(unmark_for_gc): Likewise.
	* gcj/javaprims.h: Rebuilt class list.
	* Makefile.in: Rebuilt.
	* Makefile.am (core_java_source_files): Added new file.
	* java/util/IdentityHashMap.java: New file.

From-SVN: r44929
2001-08-15 20:46:48 +00:00
Tom Tromey e109d16f8c javaprims.h: Rebuilt class list.
* gcj/javaprims.h: Rebuilt class list.
	* Makefile.in: Rebuilt.
	* Makefile.am (core_java_source_files): Added VMClassLoader.
	* java/lang/VMClassLoader.java: New file.
	* java/lang/Boolean.java: Merged with Classpath.
	* java/lang/Byte.java: Merged with Classpath.
	* java/lang/Integer.java: Merged with Classpath.
	* java/lang/Long.java: Merged with Classpath.
	* java/lang/Number.java: Merged with Classpath.
	* java/lang/Short.java: Merged with Classpath.

From-SVN: r44274
2001-07-23 20:01:29 +00:00
Tom Tromey fe3dac3d3c re PR bootstrap/3281 (Installation failure (mkinstalldirs))
Fix for PR bootstrap/3281:
	* aclocal.m4, configure: Rebuilt.
	* acinclude.m4 (LIBGCJ_CONFIGURE): Don't set libgcj_flagbasedir.
	Correctly compute libgcj_basedir.
	(mkinstalldirs): Define and subst.

From-SVN: r43739
2001-07-03 22:31:43 +00:00
Tom Tromey 7f7ba9bf90 For PR bootstrap/3075:
* configure, aclocal.m4, Makefile.am: Rebuilt.
	* configure.in: Pass `--with-auxdir' to subdir configure.  Don't
	call AC_CONFIG_AUX_DIR or AC_CANONICAL_SYSTEM.  Look for unwind.h
	relative to libgcj_basedir.
	* acinclude.m4 ((LIBGCJ_CONFIGURE): Call AC_CONFIG_AUX_DIR and
	AC_CANONICAL_SYSTEM here.
	* Makefile.am (CONFIG_STATUS_DEPENDENCIES): Use srcdir, not
	libgcj_basedir.
	($(extra_headers)): New target.

From-SVN: r43034
2001-06-08 18:02:03 +00:00
Anthony Green 9f0fbbabfb Remove libgcjdata hack. Fix jv-scan usage in dejagnu.
From-SVN: r42812
2001-06-02 19:13:52 +00:00
Anthony Green c8fb98139d USE_LIBFFI change
From-SVN: r42791
2001-06-02 08:49:31 +00:00
Tom Tromey 3610e0d548 [multiple changes]
2001-05-23  Tom Tromey  <tromey@redhat.com>

	* posix-threads.cc (_Jv_self_cache): Renamed from self_cache.
	* gcj/Makefile.in: Rebuilt.
	* gcj/Makefile.am (gcj_HEADERS): Added libgcj-config.h.
	* gcj/javaprims.h: Include gcj/libgcj-config.h.
	* gcj/libgcj-config.h.in: New file.
	* libgcj.spec.in (*jc1): Added @HASH_SYNC_SPEC@.
	* configure: Rebuilt.
	* configure.in: Enable hash synchronization by default on some
	platforms.
	(HASH_SYNC_SPEC): New subst.
	(AC_CONFIG_HEADER): Added gcj/libgcj-config.h.
	Correctly use `test -z' instead of `test -n' in a couple places.
	(JV_HASH_SYNCHRONIZATION): Use AC_DEFINE; don't add to
	LIBGCJ_CXXFLAGS.
	* configure.host (enable_java_net_default): Initialize.
	(enable_hash_synchronization_default): New variable.

2001-05-23  Hans Boehm <Hans_Boehm@hp.com>

	* boehm.cc (_Jv_MarkObj): Don't mark sync_info when hash
	synchronization in use.
	(_Jv_MarkArray): Likewise.
	(_Jv_AllocBytes): Don't check return result.
	(handle_out_of_memory): New function.
	(_Jv_InitGC): Set GC_oom_fn.
	(trace_one_vtable): New global.
	(_Jv_AllocTraceOne): New function.
	* configure.in: Added --enable-hash-synchronization.
	* defineclass.cc, prims.cc, resolve.cc, java/lang/natString.cc,
	java/net/natInetAddress.cc: Remove _Jv_AllocBytesChecked.
	* nogc.cc (_Jv_AllocObj): Throw out-of-memory.
	(_Jv_AllocArray): Likewise.
	(_Jv_AllocBytes): Likewise.
	(_Jv_AllocPtrFreeObject): New function.
	(_Jv_AllocTraceOne): Likewise.
	* posix-threads.cc (_Jv_ThreadRegister): Handle slow
	pthread_self().
	(self_cache): New global.
	(_Jv_ThreadSelf_out_of_line): New function.
	* prims.cc (_Jv_AllocBytesChecked): Removed.
	(_Jv_ThrowNoMemory): New function.
	(_Jv_AllocObject): Don't check for null return from allocator.
	(_Jv_NewObjectArray): Likewise.
	(_Jv_AllocPtrFreeObject): New function.
	(_Jv_NewPrimArray): Allocate pointer-free object if possible.
	* include/javaprims.h (_Jv_AllocPtrFreeObject): Declare.
	(_Jv_MonitorEnter, _Jv_MonitorExit): Don't return value.
	* include/boehm-gc.h (_Jv_AllocObj): Define.
	(_Jv_AllocPtrFreeObj): Define.
	* include/jvm.h (_Jv_AllocPtrFreeObj): Declare.
	(_Jv_ThrowNoMemory): Declare.
	(_Jv_AllocTraceOne): Declare.
	(_Jv_AllocBytesChecked): Removed.
	* include/posix-threads.h (_Jv_MutexInit, _Jv_MutexLock,
	_Jv_MutexUnlock): Handle LOCK_DEBUG.
	(_Jv_ThreadSelf): Handle case where system pthread_self() is
	slow.
	* java/lang/Class.h (Class): Declare _Jv_AllocPtrFreeObj as
	friend.
	* java/lang/Object.h (sync_info): Conditional upon presence of
	hash synchronization.
	* java/lang/natObject.cc: Much new code to handle thin locks and
	hash synchronization.
	* java/lang/natString.cc (_Jv_AllocString): Allocate pointer-free
	object if possible.

From-SVN: r42519
2001-05-24 05:40:37 +00:00
Per Bothner c93d7fae7b Implement invocation interface; don't create new thread for main.
From-SVN: r42428
2001-05-21 23:47:48 -07:00
Per Bothner ef0a7b49a9 javaprims.h (_Jv_FormatInt): New declaration.
* gcj/javaprims.h (_Jv_FormatInt):  New declaration.
	* java/lang/natString.cc (_JvFormatInt):  New primitive, with logic
	taken from old Integer.toString code.
	(Integer::valueOf):  Use _Jv_FormatInt.
	* java/lang/Integer.java (toString):  Just use call String.valueOf.
	* java/lang/Long.java (toString):  Fix typo in comment.
	* java/lang/String.java (valueOf(int)):  Make native.
	* java/lang/StringBuffer.java (append(int)):  Make native.
	* java/lang/natStringBuffer.cc:  New file, for append(jint).
	* Makefile.am (ant_source_files):  Add java/lang/natStringBuffer.cc.

From-SVN: r42419
2001-05-21 21:38:37 -07:00
Bryce McKinlay ca1906ff9a [multiple changes]
2001-05-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>

	* include/jvm.h: Move "#pragma GCC java_exceptions" to ...
	* gcj/javaprims.h: ... here.
	* gnu/gcj/io/shs.cc: Add "#pragma GCC java_exceptions".

2001-05-17  Martin Kahlert  <martin.kahlert@infineon.com>

	* java/lang/natClass.cc (_Jv_FindIIndex): Fix an off by one error
	with length of ioffset table.
	(_Jv_IsAssignableFrom): Likewise.

From-SVN: r42248
2001-05-18 07:29:11 +01:00
Bryce McKinlay 28f7d9d05a decl.c (init_decl_processing): Add new class "protectionDomain" field.
gcc/java:

2001-04-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>

	* decl.c (init_decl_processing): Add new class "protectionDomain"
	field.
	* class.c (make_class_data): Set initial value for "protectionDomain".

libjava:

2001-04-25  Bryce McKinlay  <bryce@albatross.co.nz>

	java.security merge and ClassLoader compliance fixes.

	* java/lang/Class.h (Class): Include ProtectionDomain.h.
	New protectionDomain field.
	(forName): Add initialize parameter. Fixes declaration to comply with
	JDK spec.
	* java/lang/natClass.cc (forName): Correct declaration of the three-arg
	variant. Honour	"initialize" flag.
	(getProtectionDomain0): New method.
	* java/lang/Class.java: Fix forName() declaration.
	(getPackage): New method based on Classpath implementation.
	(getProtectionDomain0): New native method decl.
	(getProtectionDomain): New method.
	* java/lang/ClassLoader.java (getParent): Now final.
	(definedPackages): New field.
	(getPackage): New.
	(defineClass): New variant with protectionDomain argument.
	(definePackage): New.
	(getPackages): New.
	(findSystemClass): Now final.
	(getSystemResourceAsStream): Remove redundant "final" modifier.
	(getSystemResource): Remove redundant "final" modifier.
	(getResources): Now final.
	(protectionDomainPermission): New static field.
	(unknownProtectionDomain): Ditto.
	(defaultProtectionDomain): Ditto.
	(getSystemClassLoader): Now non-native.
	* java/util/ResourceBundle.java (tryGetSomeBundle): Use the correct
	arguments for Class.forName().
	* java/lang/Package.java: New file.
	* gnu/gcj/runtime/VMClassLoader.java (getVMClassLoader): Removed.
	(instance): Static initialize singleton.
	(findClass): Override this, not findSystemClass.
	* java/lang/natClassLoader.cc (defineClass0): Set class's
	protectionDomain field as specified.
	(getSystemClassLoader): Removed.
	(findClass): Renamed from findSystemClass. Call the interpreter via
	URLClassLoader.findClass if loading class via dlopen fails.

	* java/security/*.java: java.security import/merge with Classpath.
	* java/security/acl/*.java: Likewise.
	* java/security/interfaces/*.java: Likewise.
	* java/security/spec/*.java: Likewise.
	* java/net/NetPermission.java: Likewise.
	* java/net/SocketPermission.java: Likewise.
	* gnu/java/security/provider/DefaultPolicy.java: Likewise.

	* Makefile.am: Add new classes.
	* Makefile.in: Rebuilt.
	* gcj/javaprims.h: CNI namespace rebuild.

From-SVN: r41543
2001-04-25 16:45:15 +01:00
Andreas Jaeger 48f9396dd6 Makefile.am (AUTOMAKE_OPTIONS): Remove no-installinfo.
2001-04-04  Andreas Jaeger  <aj@suse.de>

	* gcj/Makefile.am (AUTOMAKE_OPTIONS): Remove no-installinfo.
	* gcj/Makefile.in: Rebuilt.
	* Makefile.am (AUTOMAKE_OPTIONS): Remove no-installinfo.
	* Makefile.in: Rebuilt.
	* testsuite/Makefile.am (AUTOMAKE_OPTIONS): Remove no-installinfo.
	* testsuite/Makefile.in: Rebuild.
	* include/Makefile.am (AUTOMAKE_OPTIONS): Remove no-installinfo.
	* include/Makefile.in: Rebuild.

From-SVN: r41100
2001-04-04 23:38:53 +00:00
Richard Henderson 52a11cbfcf IA-64 ABI Exception Handling.
From-SVN: r40924
2001-03-28 03:04:51 -08:00
Richard Henderson b3208f56cb exception.cc (java_eh_info): Make value type jthrowable.
* exception.cc (java_eh_info): Make value type jthrowable.
	(_Jv_type_matcher): Remove now unneeded cast.
	(_Jv_Throw): Make argument type jthrowable.  Munge name
	for SJLJ_EXCEPTIONS here ...
	* gcj/cni.h: ... not here.
	(JvThrow): Remove.
	* gcj/javaprims.h (_Jv_Throw, _Jv_Sjlj_Throw): Update declarations.

	* defineclass.cc, interpret.cc, jni.cc, posix-threads.cc,
	prims.cc, resolve.cc, gnu/gcj/runtime/natFirstThread.cc,
	gnu/gcj/xlib/natDrawable.cc, gnu/gcj/xlib/natFont.cc,
	gnu/gcj/xlib/natWMSizeHints.cc, gnu/gcj/xlib/natWindowAttributes.cc,
	gnu/gcj/xlib/natXImage.cc, java/io/natFile.cc,
	java/io/natFileDescriptorEcos.cc, java/io/natFileDescriptorPosix.cc,
	java/io/natFileDescriptorWin32.cc, java/io/natFileWin32.cc,
	java/lang/natClass.cc, java/lang/natClassLoader.cc,
	java/lang/natDouble.cc, java/lang/natObject.cc,
	java/lang/natPosixProcess.cc, java/lang/natRuntime.cc,
	java/lang/natString.cc, java/lang/natSystem.cc,
	java/lang/natThread.cc, java/lang/reflect/natArray.cc,
	java/lang/reflect/natConstructor.cc, java/lang/reflect/natField.cc,
	java/lang/reflect/natMethod.cc, java/util/zip/natDeflater.cc,
	java/util/zip/natInflater.cc:
	Use throw, not JvThrow or _Jv_Throw.

From-SVN: r40838
2001-03-25 23:05:32 -08:00
Tom Tromey 7e0c895f0e configure: Rebuilt.
* configure: Rebuilt.
	* configure.in (GCJFLAGS): Subst.
	* Makefile.in: Rebuilt.
	* Makefile.am (jv_convert_LDFLAGS): Added -shared-libgcc.
	(gij_LDFLAGS): Likewise.
	(JC1FLAGS): Added GCJFLAGS and removed -g.

From-SVN: r40700
2001-03-21 18:43:03 +00:00
Alexandre Petit-Bianco 2feccc205e All files with updated copyright.
2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	All files with updated copyright.
	* prims.cc (class _Jv_PrimClass): Removed.
	(init_prim_class): New function.
	(DECLARE_PRIM_TYPE): Rewritten. `java::lang::Class' replaces
	`_Jv_PrimClass' in primitive type declarations. Assign to the
	value returned by `init_prim_class.'
	* gcj/array.h: `java::lang::Class' replaces `_Jv_PrimClass' in
	primitive type declarations.
	(JvPrimClass): Cast to `jclass' removed.
	* java/lang/Class.h (Class): New constructor.
	(Class): New copy constructor.
	(initializePrim): New prototype.
	(_Jv_PrimClass): Field removed.
	* java/lang/Object.h (struct _JvObjectPrefix): New virtuals
	nacd_1 and nacd_2 (for compatibility with the new C++ ABI.)
	(class java::lang::Object): `finalize' moved up front.
	* java/lang/natClass.cc
	(isAssignableFrom): Turned outline.
	(isInstance): Likewise.
	(isInterface): Likewise, fixed indentation.
	(initializePrim): New function.

(New C++ ABI compatibility patch:
 http://sources.redhat.com/ml/java-patches/2001-q1/msg00065.html)

From-SVN: r39032
2001-01-15 00:11:40 -08:00
Bryce McKinlay 34a2a47f15 * gcj/javaprims.h: Rebuilt CNI namespace declarations.
From-SVN: r38188
2000-12-11 07:50:52 +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 31280fb7c4 prims.cc (_Jv_NewObjectArray): Undo placement change.
2000-11-25  Anthony Green  <green@redhat.com>

	* prims.cc (_Jv_NewObjectArray): Undo placement change.
	(_Jv_NewPrimArray): Likewise.
	* gcj/array.h (__JArray): Undo const change.  Removed constructor.
	(class JArray): Removed constructor.

	* java/lang/Thread.java (context_class_loader): New private data.
	(getContextClassLoader): New method.
	(setContextClassLoader): New method.
	(Thread): Initialize context_class_loader.

	* java/net/URLClassLoader.java: Import java.util.Enumeration.
	(getResource): Rename to findResource.
	(findResource): New method.  Used to be getResource.
	(getResourceAsStream): Deleted.
	(jarFileize): Extracted logic from URLClassLoader constructor into
	this new private method.
	(addURL): New protected method.
	(URLClassLoader): Call jarFileize.  Use addElement instead of
	insertElementAt.
	(findResources): New method.

	* java/lang/ClassLoader.java: Import java.util.Enumeration.
	(getResource): Implement correct logic.
	(findResource): New method.
	(getResources): New method.
	(findClass): Create a ClassNotFoundException with the name of the
	class rather than nothing at all.
	(defineClass) Only throw ClassFormatError.

	* java/lang/Class.java (forName): New method.
	* java/lang/Class.h (forName): New method.
	* java/lang/natClass.cc (forName): New method.

From-SVN: r37751
2000-11-26 03:58:56 +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
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
Tom Tromey 37dad58d3c Rebuilt Makefile.ins
From-SVN: r36741
2000-10-06 01:57:45 +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 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
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 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
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
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 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
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 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
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
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
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 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
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
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
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
Anthony Green 6cc964322f configure.host: Fix __NO_MATH_INLNES botch.
* configure.host: Fix __NO_MATH_INLNES botch.

	* Makefile.in: Rebuilt.
	* Makefile.am (nat_source_files): Move natFirstThread.cc.
	(gnu/gcj/runtime/FirstThread.h): Moved.
	(ordinary_java_source_files): Move FirstThread.java.
	* prims.cc: Deal with FirstThread movement.
	(JvRunMain): Ditto.
	(_Jv_RunMain): Ditto.

	* gnu/gcj/runtime/FirstThread.java: Moved from java/lang.
	* gnu/gcj/runtime/natFirstThread.cc: Ditto.

From-SVN: r32348
2000-03-05 22:26: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 355dff4cef method.h (JvNumMethods): Moved from Class.h.
* gcj/method.h (JvNumMethods): Moved from Class.h.
	(JvGetFirstMethod): Likewise.
	* java/lang/Class.h (Object): Updated decl of
	_Jv_JNI_ToReflectedField.
	(Object): Added _Jv_JNI_ToReflectedMethod as a friend.
	* Makefile.in: Rebuilt.
	* Makefile.am (java/lang/reflect/Field.h): Added `jboolean'
	argument of _Jv_JNI_ToReflectedField.
	(java/lang/reflect/Constructor.h): Added _Jv_JNI_ToReflectedMethod
	as a friend.
	(java/lang/reflect/Method.h): Likewise.
	* include/jni.h (class _Jv_JNIEnv): Added `klass' member.  Use
	__GCJ_JNI_IMPL__.
	(jweak): New typedef.
	(struct JNINativeInterface): Correctly declare remaining entries.
	* jni.cc: Include Class.h, ClassLoader.h.
	(_Jv_JNI_FindClass): New function.
	(_Jv_JNI_DefineClass): New function.
	(_Jv_JNI_conversion_call): New function.
	(_Jv_JNI_FindClass): Use current class loader to find class.
	(_Jv_JNI_ExceptionCheck): New function.
	(_Jv_JNI_FromReflectedField): Now static.
	(MethodClass): New define.
	(_Jv_JNI_FromReflectedMethod): New function.
	(_Jv_JNI_ToReflectedMethod): Likewise.
	Include Method.h.
	(_Jv_JNI_IsAssignableFrom): Renamed.
	(_Jv_JNI_GetStringRegion): New function.
	Include StringIndexOutOfBoundsException.h.
	(_Jv_JNI_GetStringUTFRegion): New function.
	(_Jv_JNIFunctions): Updated for new functions.
	(_Jv_JNI_GetPrimitiveArrayCritical): New function
	(_Jv_JNI_ReleasePrimitiveArrayCritical): Likewise.
	(_Jv_JNI_GetStringCritical): New function.
	(_Jv_JNI_ReleaseStringCritical): Likewise.
	(get_throwable): Removed.
	(GCJ_JV_JNIENV_FRIEND): Removed.
	(__GCJ_JNI_IMPL__): Define.
	Include method.h.

From-SVN: r31638
2000-01-26 23:56:36 +00:00
Tom Tromey 0507a9b19f field.h (struct _Jv_Field): Use "jshort" as type for nameIndex.
* gcj/field.h (struct _Jv_Field): Use "jshort" as type for
	nameIndex.  Use "jint" as type for boffset.
	* java/lang/Class.h (struct _Jv_Method): Made accflags a
	_Jv_ushort.
	(Class): Likewise.  Also changed type of method_count,
	vtable_method_count, size_in_bytes, field_count,
	static_field_count, interface_count.
	* gcj/array.h (__JArray): Made `length' a const jsize, not an
	int.

From-SVN: r31621
2000-01-26 00:55:50 +00:00
Tom Tromey 8a9220959f natConstructor.cc (newInstance): Use _Jv_CallAnyMethodA.
* java/lang/reflect/natConstructor.cc (newInstance): Use
	_Jv_CallAnyMethodA.
	* include/jvm.h: Declare _Jv_CallAnyMethodA.
	* java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Renamed
	from _Jv_CallNonvirtualMethodA.  Changed interface; overloaded.
	Include <jni.h>.
	(COPY): Removed.
	(invoke): Use _Jv_CallAnyMethodA.
	(VAL): Redefined.
	* java/lang/Class.h (Class): Declare JvGetFirstStaticField,
	JvNumStaticFields, JvNumMethods, and JvGetFirstMethod as friend
	functions.
	(struct _Jv_Method): Added getNextMethod method.
	(JvNumMethods): New function.
	(JvGetFirstMethod): Likewise.
	* gcj/field.h (JvGetFirstStaticField): New function.
	(JvNumStaticFields): Likewise.
	(getNextField): Renamed from getNextInstanceField.
	(struct _Jv_Field): New method getClass.
	* jni.cc: Wrote many new functions.
	* include/jni.h (JNI_TRUE): Define.
	(JNI_FALSE): Likewise.
	(jobject, jclass, jstring, jarray, jthrowable, jobjectArray,
	jbyteArray, jshortArray, jintArray, jlongArray, jbooleanArray,
	jcharArray, jfloatArray, jdoubleArray): New typedefs.
	(jfieldID, jmethodID): Likewise.
	(JNI_COMMIT, JNI_ABORT): New defines.
	(JNINativeMethod): New struct.
	(struct JNINativeInterface): Correctly declared more entries.
	(class _Jv_JNIEnv): Added `ex' member.
	(JNI_VERSION_1_1): New define.
	(JNI_VERSION_1_2): Likewise.

	* boehm.cc (_Jv_MarkObj): Use getNextField, not
	getNextInstanceField.

From-SVN: r31553
2000-01-21 23:50:31 +00:00
Tom Tromey 7c734b1758 * All files: Updated copyright to reflect Cygnus purchase.
From-SVN: r31504
2000-01-19 18:39:27 +00:00
Tom Tromey 7af8555855 Runtime.java (loadLibraryInternal): Declare.
* java/lang/Runtime.java (loadLibraryInternal): Declare.
	* java/lang/natClassLoader.cc (_Jv_FindClass): Removed dead copy.
	(_Jv_FindClassInCache): Likewise.
	(_Jv_FindClass): Don't conditionalize body on INTERPRETER.
	(findSystemClass): Try to load class from compiled module.
	Include Runtime.h.
	* java/lang/natRuntime.cc (load): Use UTF-8 copy of filename.
	(loadLibrary): Likewise.
	(lt_preloaded_symbols): Define.
	(loadLibraryInternal): New method.
	* include/config.h.in: Rebuilt.
	* acconfig.h (USE_LTDL): Added.
	* Makefile.am (SUBDIRS): Added $(DIRLTDL).
	(INCLUDES): Added $(INCLTDL).b
	(libgcj_la_DEPENDENCIES): Added $(LIBLTDL).
	(libgcj_la_LIBADD): Likewise.
	* aclocal.m4, configure: Rebuilt.
	* configure.in: Added libltdl support.

From-SVN: r31472
2000-01-17 19:22:20 +00:00
Tom Tromey 0f918fea8b [multiple changes]
2000-01-04  Tom Tromey  <tromey@cygnus.com>

	* java/lang/reflect/natConstructor.cc (newInstance): Pass
	declaring class as return_type argument to
	_Jv_CallNonvirtualMethodA.
	* java/lang/reflect/natMethod.cc (_Jv_CallNonvirtualMethodA): In
	constructor case, create object and use it as `this' argument.
	* java/lang/Class.h (_getConstructors): Declare.
	(_getFields): Declare.
	* java/lang/Class.java (getConstructors): Wrote.
	(_getConstructors): New native method.
	(getDeclaredConstructors): Wrote.
	(_getFields): Declare new native method.
	* java/lang/natClass.cc (_Jv_LookupInterfaceMethod): Removed
	incorrect comment.
	(getMethod): Work correctly when class is primitive.
	(getDeclaredMethods): Likewise.  Compute offset using `method',
	not `mptr'.
	(getDeclaredMethod): Likewise.
	(getConstructor): Wrote.
	(ConstructorClass): New define.
	(getDeclaredConstructor): Wrote.
	(_getConstructors): New method.
	(_getFields): New method.
	(getFields): Wrote.

	* Makefile.in: Rebuilt.
	* Makefile.am (AM_CXXFLAGS): Added -D_GNU_SOURCE.

	* prims.cc: Remove `#pragma implementation'.
	* gcj/array.h: Remove `#pragma interface'.

	* prims.cc (_Jv_equaln): New function.
	* java/lang/Class.java (getSignature): Declare.
	* resolve.cc (_Jv_LookupDeclaredMethod): Moved to natClass.cc.
	* java/lang/natClass.cc (_Jv_LookupDeclaredMethod): Moved from
	resolve.cc.
	(getSignature): New method.
	(getDeclaredMethod): Wrote.
	(getMethod): Wrote.
	Include StringBuffer.h.
	* java/lang/Class.h (Class): Added _Jv_FromReflectedConstructor
	as a friend.  Unconditionally declare _Jv_LookupDeclaredMethod as
	a friend.
	(getSignature): Declare.
	* include/jvm.h (_Jv_GetTypesFromSignature): Declare.
	(_Jv_equaln): Declare.
	(_Jv_CallNonvirtualMethodA): Declare.
	* Makefile.in: Rebuilt.
	* Makefile.am (nat_source_files): Added natConstructor.cc.
	(java/lang/reflect/Constructor.h): New target.
	* java/lang/reflect/natConstructor.cc: New file.
	* java/lang/reflect/Constructor.java (newInstance): Now native.
	(declaringClass): Renamed from decl_class.
	(offset): Renamed from index.
	(getType): New native method.
	(getModifiers): Now native.
	(getParameterTypes): Call getType if required.
	(hashCode): Include hash code from declaring class.
	(modifiers): Removed.
	(toString): Call getType if required.
	* gcj/method.h (_Jv_FromReflectedConstructor): New function.
	* java/lang/reflect/natMethod.cc (hack_call): New method.
	Removed `#if 0' around FFI code.
	Include <gnu/gcj/RawData.h>.
	(invoke): Use _Jv_CallNonvirtualMethodA.  Throw
	IllegalArgumentException when argument object and class disagree.
	(_Jv_GetTypesFromSignature): New function.
	(getType): Use it.
	(ObjectClass): New define.
	(_Jv_CallNonvirtualMethodA): New function.
	* java/lang/reflect/Method.java (hack_trampoline): New method.
	(hack_call): New native method.

1999-12-21  Per Bothner  <per@bothner.com>

	* java/lang/natClass.cc (getDeclaredMethods): Correctly compute
	offset in new Method.

From-SVN: r31199
2000-01-04 08:46:52 +00:00
Anthony Green d3189ab7da jvm.h: Declare many functions with __attribute__((__malloc__)).
* include/jvm.h: Declare many functions with
	__attribute__((__malloc__)).
	* gcj/javaprims.h: Ditto.

From-SVN: r30794
1999-12-06 06:33:56 +00:00
Tom Tromey 3cf88fb4e8 sjlj jumbo patch
From-SVN: r30591
1999-11-19 19:13:42 +00:00
Tom Tromey b8c3c4f014 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (java/lang/ClassLoader.h): New target.
	* java/lang/natClassLoader.cc (_Jv_FindClass): Removed reference
	to `redirect'.

	* include/java-props.h (_Jv_Compiler_Properties): Changed
	declaration.
	* gcj/array.h (JvRunMain, _Jv_RunMain): Don't declare.
	* include/jvm.h (_Jv_GCSetInitialHeapSize,
	_Jv_GCSetMaximumHeapSize): Declare.
	(JvRunMain, _Jv_RunMain): Declare.
	(_Jv_SetMaximumHeapSize, _Jv_SetInitialHeapSize): Declare.
	* nogc.cc (_Jv_GCSetInitialHeapSize): New function.
	(_Jv_GCSetMaximumHeapSize): Likewise.
	* boehm.cc (_Jv_GCSetInitialHeapSize): New function.
	(_Jv_GCSetMaximumHeapSize): Likewise.
	* prims.cc (parse_heap_size): New function.
	(_Jv_SetInitialHeapSize): Likewise.
	(_Jv_SetMaximumHeapSize): Likewise.
	(_Jv_Compiler_Properties): New global.
	* gij.cc (help): New function.
	(version): Likewise.
	(heap_size): Likewise.
	(heap_max_size): Likewise.
	(main): Parse arguments.  Set _Jv_Compiler_Properties.
	Include <config.h>, <java-props.h>.
	(_Jv_Compiler_Properties): Removed.

From-SVN: r30133
1999-10-22 19:43:41 +00:00
Tom Tromey 27e934d8ba configure: Rebuilt.
* configure: Rebuilt.
	* configure.in: Build include/Makefile.
	* Makefile.in: Rebuilt.
	* Makefile.am (SUBDIRS): Added gcj and include.
	(install-data-local): New target.
	(extra_headers): New macro.
	* include/Makefile.in: New file.
	* include/Makefile.am: New file.

	* interpret.cc: Don't include gcj/field.h or gcj/cni.h.
	* java/lang/reflect/natField.cc: Don't include gcj/field.h or
	gcj/cni.h.
	* boehm.cc: Don't include java-threads.h or gcj/field.h.
	* resolve.cc: Include config.h.
	* defineclass.cc: Include config.h.
	* include/java-interp.h: Don't include config.h.
	* include/jvm.h: Include java-threads.h, Object.h, java-gc.h,
	cni.h.

	* gcj/javaprims.h: Regenerated namespace decls.
	* classes.pl (scan): Don't put `;' after closing brace.

	* Makefile.in: Rebuilt.
	* Makefile.am (INCLUDES): Added -I for top_srcdir.
	* configure.in: Create gcj/Makefile.
	* gcj/Makefile.in: New file.
	* gcj/Makefile.am: New file.
	* java/lang/Object.h: Don't include any other headers.
	* gcj/array.h: Renamed from include/java-array.h.
	* gcj/field.h: Renamed from include/java-field.h.
	* gcj/method.h: Renamed from include/java-method.h.
	* gcj/cni.h, gcj/javaprims.h: Moved from include/.
	Updated all files to reflect new include structure.

From-SVN: r29278
1999-09-10 22:03:10 +00:00