Commit Graph

453 Commits

Author SHA1 Message Date
Ulrich Weigand bbb362e693 linux.h (MD_FALLBACK_FRAME_STATE_FOR): For SIGSEGV and SIGBUS signal frames...
ChangeLog:

	* config/s390/linux.h (MD_FALLBACK_FRAME_STATE_FOR): For SIGSEGV and
	SIGBUS signal frames, the PSW address points *to* the faulting
	instruction, not after it.

libjava/ChangeLog:

	* include/s390-signal.c (SIGNAL_HANDLER): Use SIGINFO-style prototype.
	(struct old_s390_kernel_sigaction): Likewise for k_sa_handler.
	(MAKE_THROW_FRAME): Do not modify PSW address.
	(INIT_SEGV): Install SIGINFO-style signal handler.
	(INIT_FPE): Likewise.

From-SVN: r84506
2004-07-11 11:49:25 +00:00
Michael Koch 1f33f6b4c7 unicode-muncher.pl: Updated to version 2.1 from GNU classpath.
2004-07-09  Michael Koch  <konqueror@gmx.de>

	* scripts/unicode-muncher.pl: Updated to version 2.1
	from GNU classpath. Added some clarifications on where to find the
	needed files from www.unicode.org.
	* gnu/gcj/convert/UnicodeCharacterDatabase-3.0.0.html,
	gnu/gcj/convert/UnicodeData-3.0.0.txt:
	Removed, these can directly be downloaded from www.unicode.org if
	needed.
	* gnu/java/lang/CharData.java: Regenerated.
	* include/java-chartables.h: Regenerated.
	* Makefile.am (ordinary_java_source_files):
	Removed gnu/java/lang/CharData.java.
	* Makefile.in: Regenerated.

From-SVN: r84399
2004-07-09 21:00:12 +00:00
Randolph Chung 8c5ac2c403 pa32-linux.h (MD_FALLBACK_FRAME_STATE_FOR): Define.
* gcc/config/pa/pa32-linux.h (MD_FALLBACK_FRAME_STATE_FOR): Define.
	* libjava/configure.in (SIGNAL_HANDLER): Use pa-signal.h for hppa.
	* libjava/configure: Regenerate.
	* libjava/configure.host: Set can_unwind_signal for hppa*-linux.
	* libjava/pa-signal.h: New file.

From-SVN: r84344
2004-07-09 03:39:35 +00:00
Per Bothner 0bd241538e jvm.h (namespace jcj): Declare verbose_class_flag
* include/jvm.h (namespace jcj):  Declare verbose_class_flag
	* java/lang/natClass.cc (gcj::verbose_class_flag):  New variable.
	(initializeClass):  If verbose_class_flag, print message.
	* gij.cc (main):  Handle -verbose:class flag.

From-SVN: r84242
2004-07-07 16:44:12 -07:00
Geoffrey Keating f8a57be818 Index: gcc/ChangeLog
2004-06-28  Geoffrey Keating  <geoffk@apple.com>
	    Andreas Tobler  <a.tobler@schweiz.ch>

	PR 15813
	* dwarf2out.c (reg_save): Output DW_CFA_same_value when a
	register is saved in itself.
	(initial_return_save): If the return address is a register,
	it's already there, don't bother to mention it in the CFI.
	(struct queued_reg_save): Add field saved_reg.
	(struct reg_saved_in_data): New.
	(regs_saved_in_regs): New.
	(num_regs_saved_in_regs): New.
	(queue_reg_save): Add extra parameter to specify register saved
	in register.  Remove duplicate entries from queue.  Add comment
	for function.
	(flush_queued_reg_saves): Handle registers saved in registers.
	Update regs_saved_in_regs.  Add comment for function.
	(clobbers_queued_reg_save): Add comment for function.  Allow
	for regs_saved_in_regs.
	(reg_saved_in): New.
	(dwarf2out_frame_debug_expr): Handle saving registers in other
	registers.
	(dwarf2out_frame_debug): Reset regs_saved_in_regs.
	* unwind-dw2.c (execute_cfa_program): Correct handling of
	DW_CFA_same_value.  Add FIXME comment about incorrect implementation
	of DW_CFA_restore_extended.
	* config/rs6000/rs6000.c (rs6000_emit_prologue): Let
	dwarf2out_frame_debug_expr see instructions that save registers
	in other registers or save those other registers in memory.

	* unwind-dw2.c (DWARF_FRAME_REGISTERS): Move to unwind-dw2.h.
	(_Unwind_FrameState): Likewise.
	* unwind-dw2.h: New.
	* Makefile.in (LIB2ADDEHDEP): Add unwind-dw2.h.
	* config/rs6000/darwin-fallback.c: New file.
	* config/rs6000/darwin.h (MD_FALLBACK_FRAME_STATE_FOR): Define.
	* config/rs6000/t-darwin (LIB2FUNCS_EXTRA): Add darwin-fallback.o.

Index: gcc/testsuite/ChangeLog
2004-06-26  Geoffrey Keating  <geoffk@apple.com>
	    Andreas Tobler  <a.tobler@schweiz.ch>

	* gcc.dg/cleanup-10.c: Run on all Linux platforms and powerpc-darwin.
	Use SA_RESETHAND rather than SA_ONESHOT.  Trap SIGBUS as well
	as SIGSEGV.
	* gcc.dg/cleanup-11.c: Likewise.
	* gcc.dg/cleanup-8.c: Likewise.
	* gcc.dg/cleanup-9.c: Likewise.
	* gcc.dg/cleanup-5.c: Run on all platforms.

Index: libjava/ChangeLog
2004-06-26  Geoffrey Keating  <geoffk@apple.com>
	    Andreas Tobler  <a.tobler@schweiz.ch>

	* configure.host (powerpc-*-darwin*): New case, define
	can_unwind_signal.
	* configure.in (*-*-darwin*): New case, point to darwin-signal.h.
	* configure: Regenerate.
	* include/darwin-signal.h: New.

Co-Authored-By: Andreas Tobler <a.tobler@schweiz.ch>

From-SVN: r83953
2004-07-01 04:09:07 +00:00
Steven Augart a01a235c76 jni.h (_Jv_func): Removed.
2004-05-14  Steven Augart  <augart@watson.ibm.com>

	* include/jni.h (_Jv_func): Removed.
	(struct JNINativeInterface): Use `void *' for reserved slots.
	(struct JNIInvokeInterface): Likewise.

From-SVN: r81851
2004-05-14 16:35:07 +00: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 d7afe286b3 [multiple changes]
2004-04-14  Andrew Haley  <aph@redhat.com>
            Bryce McKinlay  <mckinlay@redhat.com>

	* java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Use
	_Jv_LookupInterfaceMethodIdx for calls to interfaces.
	* include/jvm.h (_Jv_CallAnyMethodA): Add new 	face' arg.

	* testsuite/libjava.lang/InvokeInterface.java: New file.
	* testsuite/libjava.lang/InvokeInterface.out: New file.

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

	* class.c (get_interface_method_index): New function. Return
	dispatch index for interface method.
	(make_method_value): For interface methods, set index field to
	iface dispatch index, not DECL_VINDEX.
	* expr.c (build_invokeinterface): Use get_interface_method_index.

From-SVN: r80684
2004-04-14 18:45:20 +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
Alan Modra d1d5c836a1 linux64.h (MD_FALLBACK_FRAME_STATE_FOR): Don't bump retaddr here.
* config/rs6000/linux64.h (MD_FALLBACK_FRAME_STATE_FOR): Don't
	bump retaddr here.

	* include/powerpc-signal.h: Revert 2004-01-21 change.
	(INIT_SEGV, INIT_FPE): Provide powerpc64 versions.  Check return
	from syscall for ppc32 versions.

From-SVN: r77601
2004-02-10 23:57:43 +10:30
Andreas Jaeger fb1b37c797 * include/x86_64-signal.h: Fix typo.
From-SVN: r77491
2004-02-08 18:35:52 +01:00
Diego Novillo 9d4d854dc3 i386-signal.h (HANDLE_DIVIDE_OVERFLOW): Add volatile qualifier to _regs.
* include/i386-signal.h (HANDLE_DIVIDE_OVERFLOW): Add volatile
	qualifier to _regs.

From-SVN: r77489
2004-02-08 12:13:50 -05:00
Diego Novillo 6bdd607046 i386-signal.h (MAKE_THROW_FRAME): Add volatile qualifier to _regs.
* include/i386-signal.h (MAKE_THROW_FRAME): Add volatile
	qualifier to _regs.

From-SVN: r77484
2004-02-08 11:51:03 -05:00
Michael Koch 3953c05789 jvm.h (MAYBE_UNUSED): New macro tp mark probably unused arguments.
2004-02-01  Michael Koch  <konqueror@gmx.de>

	* include/jvm.h (MAYBE_UNUSED): New macro tp mark probably unused
	arguments.
	* jni.cc (_Jv_LookupJNIMethod): Mark 'args_size' unused.
	* verify.cc (debug_print): Mark 'fmt' unused.

From-SVN: r77079
2004-02-01 20:05:03 +00:00
Jakub Jelinek 02731d29be linux64.h (MD_FALLBACK_FRAME_STATE_FOR): Corrected to handle kernels with changed ucontext.
* config/rs6000/linux64.h (MD_FALLBACK_FRAME_STATE_FOR)
	[!__powerpc64__]: Corrected to handle kernels with changed ucontext.

	* include/powerpc-signal.h: Add #ifndef __powerpc64__ around the
	header.  For __powerpc64__ provide the default-signal.h definitions
	for now.
	* include/x86_64-signal.h [!__x86_64__]: Include java-signal-aux.h
	instead of the dummy definitions.
	* configure.host (x86_64-*): Remove CHECKREFSPEC, add DIVIDESPEC.
	(powerpc64*-*): Remove with_libffi_default.
	Only add -mminimal-toc for 64-bit compilations.
	* configure.in: Use powerpc-signal.h on powerpc64 as well.
	(x86_64-*-linux*): Set SIGNAL_HANDLER_AUX.
	Link SIGNAL_HANDLER_AUX to include/java-signal-aux.h.
	* configure: Rebuilt.

From-SVN: r76437
2004-01-23 18:32:16 +01: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
Mohan Embar 5cd4d463f9 win32.cc (WSAEventWrapper): Implemented default constructor and init() methods.
* win32.cc (WSAEventWrapper): Implemented default
	constructor and init() methods.
	(_Jv_select): Removed.
	* gnu/java/nio/natSelectorImplWin32.cc
	(helper_put_filedescriptors): Removed.
	(helper_get_filedescriptors): Removed.
	(implSelect): Implemented in terms of WSAEventWrapper
	and WSAWaitForMultipleEvents instead of _Jv_select().
	Added support for thread interruption.
	* include/win32.h (WSAEventWrapper): Minor formatting
	changes; added default constructor declaration, init(),
	getFD() and getEventHandle() methods.
	(_Jv_select): Removed.

From-SVN: r74715
2003-12-16 22:54:22 +00:00
Mohan Embar 83c02e38a3 configure.in: Added new MinGW-specific configure flag --with-win32-nlsapi.
* configure.in: Added new MinGW-specific configure flag
	--with-win32-nlsapi.
	Added new AC_DEFINE MINGW_LIBGCJ_UNICODE.
	Add -lunicows to MinGW SYSTEMSPEC if --with-win32-nlsapi
	is set to unicows.
	* configure: Rebuilt.
	* include/config.h.in: Rebuilt.
	* win32.cc (_Jv_Win32NewString): Implemented.
	(nativeToUnicode): New helper function defined only for
	non-UNICODE builds.
	(unicodeToNative): Likewise.
	(_Jv_Win32TempString): Implemented.
	(lots): Refactored using tchar.h macros.
	(WSAEventWrapper): Use _Jv_Win32NewString.
	(_Jv_platform_initialize): Use GetModuleFileNameA instead
	of GetModuleFileName.
	(_Jv_platform_initProperties): Use _Jv_Win32NewString.
	Use temporary stack buffer instead of a heap buffer.
	* include/win32.h
	Added defines for UNICODE and _UNICODE if MINGW_LIBGCJ_UNICODE is
	defined; added tchar.h include.
	(_Jv_Win32TempString): Declared new helper class.
	(JV_TEMP_STRING_WIN32): New helper macro.
	(_Jv_Win32NewString): Declared new helper method.
	* java/io/natFileDescriptorWin32.cc (open): Use
	JV_TEMP_STRING_WIN32 instead of JV_TEMP_UTF_STRING.
	(write): Reformatted slightly.
	* java/io/natFileWin32.cc (lots): Use tchar.h macros;
	use JV_TEMP_STRING_WIN32 instead of JV_TEMP_UTF_STRING.
	(getCanonicalPath): Use _Jv_Win32NewString instead of
	JvNewStringUTF.
	(performList): Likewise.
	* java/lang/natWin32Process.cc (ChildProcessPipe):
	Use tchar.h macros.
	(startProcess): Use tchar.h macros, JV_TEMP_STRING_WIN32,
	and UNICODE environment flag for CreateProcess.
	* java/net/natNetworkInterfaceWin32.cc
	(winsock2GetRealNetworkInterfaces): Use tchar.h macros and
	_Jv_Win32NewString.

From-SVN: r74201
2003-12-02 22:26:50 +00:00
Danny Smith 2fe6fc5268 jni.cc (JNI_CreateJavaVM): Remove JNIEXPORT.
* jni.cc (JNI_CreateJavaVM): Remove JNIEXPORT.
	(JNI_GetCreatedJavaVMs): Likewise.
	(JNI_GetDefaultJavaVMInitArgs): Likewise.
	* include/jni.h (JNIIMPEXP): Remove definition
	and replace with...
	(__GCJ_JNIIMPEXP__): New macro, applicable only to libgcj
	symbols,
	(__GCJ_DLL__): New macro, controlling __GCJ_JNIIMPEXP__.

From-SVN: r73484
2003-11-12 05:56:44 +00:00
Mohan Embar bbf76ec06c win32.h (_Jv_platform_close_on_exec): Changed signature and declared extern.
* include/win32.h (_Jv_platform_close_on_exec): Changed
	signature and declared extern.
	* win32.cc (_Jv_platform_close_on_exec): Implemented.
	* gnu/java/net/natPlainDatagramSocketImplWin32.cc
	(create): Use new signature of _Jv_platform_close_on_exec.
	* gnu/java/net/natPlainSocketImplWin32.cc
	(create): Eliminated a few typecasts
	Use new signature of _Jv_platform_close_on_exec.
	(accept): Eliminated a few typecasts
	Use new signature of _Jv_platform_close_on_exec.
	* java/io/natFileDescriptorWin32.cc (open): Use
	_Jv_platform_close_on_exec.

From-SVN: r73325
2003-11-07 03:13:56 +00:00
Bryce McKinlay b9b5672b49 Constructor.java (toString): Avoid extra whitespace on constructor with no modifiers.
2003-10-26  Bryce McKinlay  <bryce@mckinlay.net.nz>

	* java/lang/reflect/Constructor.java (toString): Avoid extra
	whitespace on constructor with no modifiers.
	* java/lang/reflect/natConstructor.java (newInstance): Look up
	caller and perform accessibility check only if constructor is
	non-public and accessible flag is not set.

2003-10-26  Bryce McKinlay  <bryce@mckinlay.net.nz>

	* jni.cc (_Jv_JNI_CallAnyMethodV, _Jv_JNI_CallAnyMethodA,
	_Jv_JNI_CallAnyVoidMethodV, _Jv_JNI_CallAnyVoidMethodA): Don't
	use _Jv_LookupDeclaredMethod(). Call _Jv_CallAnyMethodA with
	is_virtual_call argument.
	* include/jvm.h (_Jv_isVirtualMethod): Moved and renamed from
	natClass.cc.
	* java/lang/natClass.cc (_Jv_LayoutVTableMethods): Use
	_Jv_isVirtualMethod.
	* java/lang/reflect/natMethod.cc (invoke): Don't use
	_Jv_LookupDeclaredMethod.
	(_Jv_CallAnyMethodA): New is_virtual_call argument. If specified,
	look up method in target object's vtable.

From-SVN: r72942
2003-10-26 02:25:42 +00:00
Andrew Haley 904715853c lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
2003-10-22  Andrew Haley  <aph@redhat.com>

        * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
        (java_get_callee_fndecl): New.

        * jcf-parse.c (java_parse_file): Call emit_catch_table().

        * java-tree.h (ctable_decl): New.
        (catch_classes):  New.
        (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.

        * decl.c (java_init_decl_processing): Add catch_class_type.
        Add ctable_decl.
        Add catch_classes field.

        * class.c (build_indirect_class_ref): Break out from
        build_class_ref.
        (make_field_value): Check flag_indirect_dispatch.
        (make_class_data): Ditto.
        Tidy uses of PUSH_FIELD_VALUE.
        Add field catch_classes.
        (make_catch_class_record): New.

        * java-tree.h (PUSH_FIELD_VALUE): Tidy.

2003-10-22  Andrew Haley  <aph@redhat.com>

        * java/lang/natClass.cc (initializeClass): Call
        _Jv_linkExceptionClassTable.
        (_Jv_LinkSymbolTable): Call )_Jv_ThrowNoSuchMethodError.  Call
        _Jv_Defer_Resolution on a method whose ncode is NULL.
        (_Jv_linkExceptionClassTable): New function.
        (_Jv_LayoutVTableMethods): If superclass looks like a constant pool
        entry, look it up.
        * java/lang/Class.h (struct _Jv_CatchClass): New.
        (_Jv_linkExceptionClassTable): New friend.
        (_Jv_Defer_Resolution): New friend.
        (class Class.catch_classes): New field.
        * include/java-interp.h (Jv_Defer_Resolution): New method.
        (_Jv_PrepareClass): Make a friend of _Jv_MethodBase.
        (_Jv_MethodBase.deferred): New field.
        (_Jv_Defer_Resolution): New function.
        * resolve.cc (_Jv_PrepareClass): Resolve deferred handlers.
        * exception.cc (get_ttype_entry): Change return type to void**.
        (PERSONALITY_FUNCTION): Remove all code related to using a
        Utf8Const* for a match type.  Change match type to be a pointer to
        a pointer, rather than a pointer to a Class.
        * defineclass.cc (handleCodeAttribute): Initialize
        method->deferred.
        (handleMethodsEnd): Likewise.

From-SVN: r72886
2003-10-24 09:29:43 +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
Jerry Quinn 16a10fb6fc posix-threads.cc (_Jv_CondNotify,_Jv_CondNotifyAll): Rename _Jv_PthreadCheckMonitor to _Jv_MutexCheckMonitor.
2003-10-21  Jerry Quinn  <jlquinn@optonline.net>

        * posix-threads.cc (_Jv_CondNotify,_Jv_CondNotifyAll): Rename
        _Jv_PthreadCheckMonitor to _Jv_MutexCheckMonitor.
	* include/no-threads.h (_Jv_MutexCheckMonitor): New.
	* include/posix-threads.h (_Jv_MutexCheckMonitor): Rename from
        _Jv_PthreadCheckMonitor.  Simplify code.
	(_Jv_MutexUnlock): Use _Jv_MutexCheckMonitor.
	* include/win32-threads.h (_Jv_MutexCheckMonitor): New.
	* java/lang/Object.h (_Jv_ObjectCheckMonitor): Declare.
	* java/lang/Thread.java (holdsLock): New.
	* java/lang/natObject.cc (_Jv_ObjectCheckMonitor): New, with and
        without JV_HASH_SYNCHRONIZATION.
	* java/lang/natThread.cc (java::lang::Thread::holdsLock): New.

From-SVN: r72741
2003-10-21 04:46:19 +00:00
Mohan Embar ef050c9e23 win32.cc: (_Jv_pipe) Implemented.
* win32.cc: (_Jv_pipe) Implemented.
	* gnu/java/nio/natPipeImpl.cc: (nativeInit) Use
	_Jv_pipe instead of ::pipe.
	* include/posix.h: (_Jv_pipe) New inline.
	* include/win32.h: (_Jv_pipe) New declaration.

From-SVN: r72616
2003-10-17 18:44:42 +00:00
Andrew Haley 9dfc2ec225 jcf-parse.c (java_parse_file): Write otable and atable.
2003-10-01  Andrew Haley  <aph@redhat.com>

        * jcf-parse.c (java_parse_file): Write otable and atable.
        * java-tree.h (atable_methods): New.
        (atable_decl): New.
        (atable_syms_decl): New.
        (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
        JTI_ATABLE_SYMS_DECL.  Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
        (symbol_*type): Rename method_symbol* to symbol*type.
        (emit_offset_symbol_table): Delete.
        (emit_symbol_table): New.
        (get_symbol_table_index): New.
        (atable_type): New.
        * expr.c (build_field_ref): Handle flag_indirect_dispatch.
        (build_known_method_ref): Likewise.
        (get_symbol_table_index): Rename from get_offset_table_index.
        Parameterize to allow re-use by differing types of symbol table.
        (build_invokevirtual): Pass table to get_offset_table_index.
        * decl.c (java_init_decl_processing): Push types and decls for
        atable and atable_syyms.
        * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
        (make_class_data): Add new fields atable and atable_syms.
        (emit_symbol_table): Rename from emit_offset_symbol_table.
        Parameterize to allow re-use by different types of symbol table.
        (build_symbol_entry): Renamed from build_method_symbols_entry.

2003-10-01  Andrew Haley  <aph@redhat.com>

        * java/lang/natClass.cc (initializeClass): Check for otable and
        atable.
        (_Jv_LinkOffsetTable): Check for existence of atable.  Rewrite
        loops using for().  Search superinterfaces.  Check for fields as
        well as methods.  Initialize atable as well as otable: check for
        static methods as well as virtual methods.
        * java/lang/Class.h (struct _Jv_AddressTable): New.
        (atable): New.
        (atable_syms): New.
        * include/jvm.h (_Jv_equalUtf8Consts): constify.
        * prims.cc (_Jv_equalUtf8Consts): constify.

From-SVN: r71979
2003-10-01 16:22:13 +00:00
Tom Tromey 2cd5614273 re PR libgcj/10596 (Reference and String.intern don't work together)
PR libgcj/10596:
	* include/jvm.h (_Jv_FinalizeString,
	_Jv_RegisterStringFinalizer): Declare.
	* java/lang/natString.cc (_Jv_FinalizeString): Renamed from
	unintern.
	(intern): Updated.
	(_Jv_NewStringUtf8Const): Likewise.
	* java/lang/ref/natReference.cc (finalize_referred_to_object):
	Add special case when finalizing a String.
	(in_hash): New function.
	(_Jv_RegisterStringFinalizer): Likewise.
	(maybe_add_finalize): Likewise.

From-SVN: r71915
2003-09-29 21:13:55 +00:00
Mohan Embar b90e0e3cdb win32-threads.cc: (ensure_interrupt_event_initialized) New function for lazy initialization of an...
* win32-threads.cc: (ensure_interrupt_event_initialized) New
	function for lazy initialization of an auto-reset event.
	(_Jv_CondWait) Added thread interrupt support.
	(_Jv_ThreadInitData) Added initialization of interrupt support
	members.
	(_Jv_ThreadDestroyData) Added cleanup of interrupt support members.
	(_Jv_ThreadStart) Removed unused code.
	(_Jv_Win32GetInterruptEvent) New method for returning interrupt event
	to an external caller.
	(_Jv_ThreadInterrupt) Implemented.
	* include/win32-threads.h: (_Jv_Thread_t) Added a Win32 auto-reset
	event for interrupt support as well as a mutex which regulates
	access to this.
	(_Jv_Win32GetInterruptEvent) Declared new method for returning interrupt
	event to an external caller.
	* java/lang/natWin32Process.cc: (cleanup) Close handle to spawned
	process.
	(waitFor) Added interrupt support.

From-SVN: r71562
2003-09-19 08:28:43 +00:00
Michael Koch e1a3a7d02b acconfig.h: Removed most items.
2003-09-11  Michael Koch  <konqueror@gmx.de>

	* acconfig.h: Removed most items.
	* configure.in: Added descriptions to AC_DEFINE macros that where in
	acconfig.h before.
	* include/config.h.in: Regenerated.

From-SVN: r71309
2003-09-11 17:25:47 +00:00
Mohan Embar 5c14415811 win32.cc: fixed tab...
* win32.cc: fixed tab, indentation and whitespace
	inconsistencies
	removed jvm.h include
	added includes java/lang/UnsupportedOperationException.h,
	java/io/IOException.h, java/net/SocketException.h
	(WSAEventWrapper): class implementation
	(_Jv_WinStrError): implemented both overloads
	(_Jv_ThrowIOException): implemented both overloads
	(_Jv_ThrowSocketException): implemented both overloads
	(_Jv_select): implemented
	* include/win32.h: fixed tab, indentation and whitespace
	inconsistencies
	wrapped <windows.h> include with  #define WIN32_LEAN_AND_MEAN
	added jvm.h include
	(WSAEventWrapper): added class declaration
	(_Jv_WinStrError): added both overload declarations
	(_Jv_ThrowIOException): added both overload declarations
	(_Jv_ThrowSocketException): added both overload declarations
	removed ENOTCONN, ECONNRESET and ENOPROTOOPT defines
	(_Jv_select): added declaration
	(_Jv_socket): removed
	(_Jv_connect): removed
	(_Jv_close): removed
	(_Jv_bind): removed
	(_Jv_accept): removed
	(_Jv_listen): removed
	(_Jv_write): removed
	(_Jv_read): removed
	* java/io/natFileDescriptorWin32.cc: fixed tab, indentation and
	whitespace inconsistencies
	replaced <windows.h> #include with <platform.h>
	removed jvm.h include
	(testCanUseGetHandleInfo): new function which tests whether Win32
	GetHandleInformation() call can be used with console buffer handles
	(only supported on >=WinNT 5.0)
	(winerr): removed (superseded by _Jv_WinStrError in include/win32.h)
	(valid): rewrote implementation using GetHandleInformation()
	(sync): 	changed exception throwing to use error string and exception
	helper methods declared in include/win32.h
	(open): likewise
	(write): likewise
	(setLength): likewise
	(close): likewise
	(seek): likewise
	(getFilePointer): likewise
	(read): likewise
	* java/io/natFileWin32.cc: fixed tab, indentation and
	whitespace inconsistencies
	replaced <windows.h> #include with <platform.h>
	removed jvm.h include
	(_access): use JV_TEMP_UTF_STRING
	(_stat): likewise
	(performMkDir): use JV_TEMP_UTF_STRING
	(performRenameTo): likewise
	(performDelete): likewise
	(performCreate): likewise
	(performSetReadOnly): likewise
	(performSetLastModified): likewise
	* java/lang/natWin32Process.cc: fixed tab, indentation and
	whitespace inconsistencies
	replaced <windows.h> #include with <platform.h>
	removed includes gcj/cni.h, jvm.h
	(new_string): removed
	(startProcess): use JV_TEMP_UTF_STRING,
	changed exception throwing to use error string and exception
	helper methods declared in include/win32.h
	* java/net/natInetAddressWin32.cc: fixed tab, indentation and
	whitespace inconsistencies
	replaced <windows.h> #include with <platform.h>
	removed jvm.h include
	removed DISABLE_JAVA_NET conditional code
	removed POSIX conditional code not relevant to Win32
	(aton): use JV_TEMP_UTF_STRING
	removed POSIX conditional code not relevant to Win32
	(lookup): likewise
	(getLocalHostName): likewise
	* java/net/natNetworkInterfaceWin32.cc: fixed tab, indentation and
	whitespace inconsistencies
	removed unnecessary windows.h, winsock.h and gcj/cni.h includes
	removed DISABLE_JAVA_NET conditional code
	removed POSIX conditional code not relevant to Win32
	(winsock2GetRealNetworkInterfaces): new function to compute network
	interfaces via Winsock2 API
	(determineGetRealNetworkInterfacesFN): new function for returning
	a function pointer to the function used to compute network interfaces.
	(getRealNetworkInterfaces): implemented
	* java/net/natPlainDatagramSocketImplWin32.cc: fixed tab, indentation and
	whitespace inconsistencies
	removed gcj/cni.h include
	removed DISABLE_JAVA_NET conditional code
	removed POSIX conditional code not relevant to Win32
	changed net POSIXisms to Win32isms
	replaced _Jv socket-related calls with their real Win32 equivalents
	changed exception throwing to use error string and exception
	helper methods declared in include/win32.h
	(peekData): implemented timeout support
	(receive): likewise
	* java/net/natPlainSocketImplWin32.cc: fixed tab, indentation and
	whitespace inconsistencies
	removed gcj/cni.h and gcj/javaprims.h includes
	removed DISABLE_JAVA_NET conditional code
	removed POSIX conditional code not relevant to Win32
	changed net POSIXisms to Win32isms
	replaced _Jv socket-related calls with their real Win32
	equivalents
	changed exception throwing to use error string and exception
	helper methods declared in include/win32.h
	(throwConnectException): helper function for connect()
	(connect): implemented timeout support
	(accept): likewise
	(doRead): new helper function common to both read() method overloads,
	includes timeout support
	(read): implemented both overloads in terms of doRead()
	(available): implemented using ioctlsocket()

From-SVN: r70904
2003-08-29 04:21:01 +00:00
Tom Tromey 91edd042ff Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (ordinary_java_source_files): Added new files.
	* java/lang/Class.h (_Jv_sharedlib_register_hook): Declare as
	friend.
	* java/net/URLClassLoader.java (findClass): Don't use
	findURLResource.  Use loader's getClass method.
	(URLLoader.getClass): New method.
	(addURL): Handle `gcjlib' URLs.
	(SoURLLoader): New class.
	(SoResource): Likewise.
	* gnu/gcj/protocol/gcjlib/Connection.java: New file.
	* gnu/gcj/protocol/gcjlib/Handler.java: New file.
	* include/jvm.h (struct _Jv_core_chain): Moved from natCore.cc.
	(_Jv_RegisterCoreHook): Declare.
	(_Jv_FindCore): Declare.
	* gnu/gcj/runtime/SharedLibHelper.java: New file.
	* gnu/gcj/runtime/natSharedLibLoader.cc (CoreHookFunc): New
	typedef.
	(core_hook): New function.
	(struct SharedLibDummy) [saved_core]: New field.
	(init): Set _Jv_RegisterCoreHook.  Throw exception on failure.
	(register_hook): Set protection domain and class loader on new
	class.
	(finalize): Free core chain.
	* gnu/gcj/Core.java (Core): New constructor.
	* gnu/gcj/runtime/SharedLibLoader.java: Rewrote to use
	SharedLibHelper.
	* gnu/gcj/natCore.cc (_Jv_RegisterResource): Indentation fixlet.
	(_Jv_create_core): New function.
	(create): Use it.
	(default_register_resource): New function.
	(_Jv_RegisterCoreHook): New global.
	(_Jv_RegisterResource): Use it.
	(core_chain_struct): Removed.
	(_Jv_FindCore): New function.
	(_Jv_FreeCoreChain): New function.

From-SVN: r70892
2003-08-28 22:17:37 +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
Mohan Embar dca5e0e850 jvm.h: New class _Jv_TempUTFString (helper class for getting a temporary C string from...
* include/jvm.h: New class _Jv_TempUTFString (helper class for
	getting a temporary C string from a jstring)
	New macro JV_TEMP_UTF_STRING, which leverages _Jv_TempUTFString
	but uses a stack buffer if the string length is less than 256
	bytes.

From-SVN: r70564
2003-08-19 11:48:59 +00:00
Tom Tromey 0da021f5cc re PR libgcj/11951 (natMethod.cc (_Jv_CallAnyMethodA) should clear ffi_result before ffi_call)
PR libgcj/11951:
	* java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Returns
	void.  Throw VirtualMachineError if ffi fails.  Initialize return
	value.  Added is_jni_call argument; only wrap exception if not a
	JNI call.  Use descriptive message if operation not supported.
	(_Jv_GetTypesFromSignature): Use declaring class' loader to find
	array class.
	* include/jvm.h (_Jv_CallAnyMethodA): Updated declaration.
	* jni.cc (_Jv_JNI_CallAnyMethodV): Updated for new form of
	_Jv_CallAnyMethodA.
	(_Jv_JNI_CallAnyMethodA): Likewise.
	(_Jv_JNI_CallAnyVoidMethodV): Likewise.
	(_Jv_JNI_CallAnyVoidMethodA): Likewise.

From-SVN: r70544
2003-08-18 14:36:07 +00:00
Andrew Haley cf68fdb19b i386-signal.h (RESTORE): New.
2003-07-08  Andrew Haley  <aph@redhat.com>

        * include/i386-signal.h (RESTORE): New.
        (INIT_SEGV): Set restorer.
        (INIT_FPE): Likewise.

From-SVN: r69957
2003-07-30 14:50:02 +00:00
Tom Tromey ffd94572f4 Runtime.java: Comment fix.
* java/lang/Runtime.java: Comment fix.
	* java/lang/ClassLoader.java (isAncestorOf): New method.
	(getParent): Uncommented security check.  Use isAncestorOf.
	* include/jvm.h (_Jv_CheckAccess): Declare.
	* java/lang/reflect/natConstructor.cc (newInstance): Perform
	access check.
	Include IllegalAccessException.h, ArrayIndexOutOfBoundsException.h.
	* java/lang/reflect/natArray.cc (newInstance): Pass caller's
	class loader to _Jv_GetArrayClass.
	Include ArrayIndexOutOfBoundsException.h.
	* java/lang/reflect/Field.java: Update comment to reflect status.
	(equals): Fixed indentation.
	* java/lang/Class.h (Class): Declare memberAccessCheck, not
	checkMemberAccess.  Make _Jv_CheckAccess a friend.
	* java/lang/Class.java (memberAccessCheck): New method from
	Classpath.
	(checkMemberAccess): Removed.
	(getDeclaredMethod): Use memberAccessCheck.
	(getField): Likewise.
	(getMethod): Likewise.
	* resolve.cc (_Jv_ResolvePoolEntry): Use _Jv_CheckAccess.
	(_Jv_SearchMethodInClass): Likewise.
	* prims.cc (_Jv_CheckAccess): New function.
	* jni.cc (_Jv_JNI_FindClass): Use getClassLoaderInternal.
	(_Jv_JNI_GetAnyFieldID): Likewise.
	* java/lang/natClass.cc (forName): Use getClassLoaderInternal.
	(getClassLoader): Added security check.
	(getConstructor): Call memberAccessCheck.
	(getDeclaredClasses): Likewise.
	(getDeclaredField): Likewise.
	(getDeclaredFields): Likewise.
	(_getConstructors): Likewise.
	(getDeclaredConstructor): Likewise.
	(getDeclaredMethods): Likewise.
	(getFields): Likewise.
	(getMethods): Likewise.
	(newInstance): Likewise.
	(_Jv_MakeVTable): Put method name in exception.
	* java/lang/reflect/natMethod.cc (getType): Use
	getClassLoaderInternal.
	(_Jv_GetTypesFromSignature): Likewise.
	(invoke): Perform access check.
	(_Jv_CallAnyMethodA): Removed old FIXME comments.
	Include ArrayIndexOutOfBoundsException.h.
	* java/lang/reflect/natField.cc (getType): Use
	getClassLoaderInternal.
	(_Jv_CheckFieldAccessibility): Removed.
	(getAddr): Use _Jv_CheckAccess; find caller.
	Include ArrayIndexOutOfBoundsException.h.

From-SVN: r69621
2003-07-21 01:54:06 +00:00
Rainer Orth 6b3517eaf5 configure.in: Check for usleep declaration.
* configure.in: Check for usleep declaration.
	* acconfig.h (HAVE_USLEEP_DECL): Provide template.
	* configure: Regenerate.
	* include/config.h.in: Likewise.
	* include/posix.h [!HAVE_USLEEP_DECL]: Declare usleep.

From-SVN: r69041
2003-07-07 14:11:09 +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
Franz Sirl 7d8b7202f8 Oops, accidentally committed the 3.3 version to mainline. Undone.
From-SVN: r68156
2003-06-18 15:29:12 +00:00
Franz Sirl beea232412 powerpc-signal.h: New File.
2003-06-17  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>

	* include/powerpc-signal.h: New File.
	* configure.in: Use it.
	* configure: Regenerated.

From-SVN: r68088
2003-06-17 15:56:09 +00:00
Andrew Haley bec3e66d1a prims.cc (catch_segv): Create exception in handler.
2003-06-12  Andrew Haley  <aph@redhat.com>

        * prims.cc (catch_segv): Create exception in handler.
        (catch_fpe): Likewise.
        (_Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ): Likewise.
        (_Jv_ThrowSignal): Remove.

        * include/x86_64-signal.h (INIT_SEGV): Delete reference to nullp.
        * include/default-signal.h (INIT_SEGV, INIT_FPE): Delete reference
        to nullp and arithexception.
        * include/dwarf2-signal.h (INIT_SEGV, INIT_FPE): Likewise.
        * include/i386-signal.h (INIT_SEGV, INIT_FPE): Likewise.
        * include/s390-signal.h (INIT_SEGV, INIT_FPE): Likewise.
        * include/sparc-signal.h (INIT_SEGV, INIT_FPE): Likewise.
        * include/win32-signal.h (INIT_SEGV, INIT_FPE): Likewise.

From-SVN: r67892
2003-06-13 12:20:45 +00:00
Michael Koch 248e983efb 2003-06-07 Michael Koch <konqueror@gmx.de>
* include/posix.h
	(O_DSYNC): Define O_DSYNC on platforms not
	supporting O_FSYNC (newlib).

From-SVN: r67587
2003-06-07 14:30:32 +00:00
Loren J. Rittle 49c72d225b posix.h (O_SYNC): Define if not available and a reasonable...
* libjava/include/posix.h (O_SYNC): Define if not available
	and a reasonable, perhaps more conservative, replacement exists.
	(O_DSYNC): Likewise.
	* java/io/natFileDescriptorPosix.cc (open): Revert last patch.

From-SVN: r67517
2003-06-05 22:37:02 +00:00
Bert Deknuydt ad23ad2cbe posix-threads.h: Include <machine/pal.h> on OSF.
2003-06-05  Bert Deknuydt  <Bert.Deknuydt@esat.kuleuven.ac.be>

	* include/posix-threads.h: Include <machine/pal.h> on OSF.

From-SVN: r67491
2003-06-05 15:43:58 +00:00
Andrew Haley 9f47031337 x86_64-signal.h (MAKE_THROW_FRAME): Mark sigcontext on stack volatile to prevent optimization from removing it.
2003-06-03  Andrew Haley  <aph@redhat.com>

        * include/x86_64-signal.h (MAKE_THROW_FRAME): Mark sigcontext on
        stack volatile to prevent optimization from removing it.

From-SVN: r67379
2003-06-03 16:13:22 +00:00
Mohan Embar c4519773ca jvm.h: (_Jv_GetNbArgs) added (_Jv_GetSafeArg) added (_Jv_SetArgs) added
2003-03-29  Mohan Embar  <gnustuff@thisiscool.com>

        * include/jvm.h: (_Jv_GetNbArgs) added
        (_Jv_GetSafeArg) added
        (_Jv_SetArgs) added
        * prims.cc: (_Jv_GetNbArgs) implemented
        (_Jv_GetSafeArg) implemented
        (_Jv_SetArgs) implemented
        (_Jv_RunMain) use _Jv_SetArgs() instead of explicitly
        setting _Jv_argc and _Jv_argv
        * posix.cc: (_Jv_ThisExecutable) use _Jv_GetSafeArg()
        instead of _Jv_argv
        * java/lang/natRuntime.cc: (insertSystemProperties) use
        _Jv_GetSafeArg() instead of _Jv_argv

From-SVN: r66067
2003-04-25 16:48:13 +00:00
Andreas Tobler dcde977582 posix.h: Add suffix for darwin dynamic libraries.
2003-03-22  Andreas Tobler <a.tobler@schweiz.ch>

        * include/posix.h: Add suffix for darwin dynamic libraries.

From-SVN: r64705
2003-03-22 11:56:44 +01:00
Tom Tromey 2b7f1f8f41 resolve.cc (ncode): Use _Jv_platform_ffi_abi.
* resolve.cc (ncode): Use _Jv_platform_ffi_abi.
	Include platform.h.
	* java/lang/natRuntime.cc (insertSystemProperties): Use
	_Jv_platform_path_separator.
	(nativeGetLibname): Use _Jv_platform_file_separator.
	(_load): Use _Jv_platform_onload_names.
	(onload_names): New global.
	* include/win32.h (_Jv_platform_file_separator): New define.
	(_Jv_platform_path_separator): Likewise.
	(_Jv_platform_onload_names): Likewise.
	(_Jv_platform_ffi_abi): Likewise.
	* include/posix.h (_Jv_platform_file_separator): New define.
	(_Jv_platform_path_separator): Likewise.
	(_Jv_platform_onload_names): Likewise.
	(_Jv_platform_ffi_abi): Likewise.

From-SVN: r64461
2003-03-17 00:45:37 +00:00
Andrew Haley c068c63834 [multiple changes]
2003-03-10  2003-02-27  Mohan Embar  <gnustuff@thisiscool.com>

        * include/jvm.h: removed declaration of _Jv_ThisExecutable()
        setter; made return value of getter const char* instead of char*
        * prims.cc: removed all references to _Jv_ThisExecutable().
        These are in the platform-specific sections now.
        * posix.cc: define platform-specific _Jv_ThisExecutable().
        Handle DISABLE_MAIN_ARGS and HAVE_PROC_SELF_EXE cases
        * win32.cc: define platform-specific _Jv_ThisExecutable()
        using GetModuleFilename()
        * java/lang/natRuntime.cc: set gnu.gcj.progname property
        to argv[0] instead of _Jv_ThisExecutable()

2003-03-10  Ranjit Mathew  <rmathew@hotmail.com>

        * gnu/gcj/runtime/NameFinder.java (usingAddr2name): New flag
        that is set if we are using addr2name.awk instead of addr2line.
        (NameFinder): Set usingAddr2name if using addr2name.awk.
        (getExternalLabel): New native method to convert a method
        name to an external label.
        (lookup): Convert name given by addr2line to an external label
        before demangling.

        * gnu/gcj/runtime/natNameFinder.cc (LABEL_PREFIX): New string
        constant representing the prefix attached to method names to
        convert them to an external label.
        (gnu::gcj::runtime::NameFinder::getExternalLabel): Define
        using LABEL_PREFIX.

From-SVN: r64111
2003-03-10 19:45:30 +00:00
Michael Koch c0daa90283 configure.in: Added check for memory mapping of files.
2003-03-02  Michael Koch  <konqueror@gmx.de>

	* configure.in: Added check for memory mapping of files.
	* configure: Regenerated.
	* config.h.in: Regenerated.

From-SVN: r63661
2003-03-02 13:46:06 +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
Rainer Orth a191802c42 natStackTrace.cc: Include platform.h immediately after config.h.
* gnu/gcj/runtime/natStackTrace.cc: Include platform.h immediately
	after config.h.  Use <> for consistency.
	* java/lang/natObject.cc: Likewise.
	* java/lang/natRuntime.cc: Likewise.
	* java/lang/natSystem.cc: Likewise.
	* java/util/natTimeZone.cc: Likewise.
	* win32.cc: Likewise.
	* include/posix.h (fcntl, socket, connect, close, bind, accept,
	listen, write, read): Undef to avoid interference from OS macros.

From-SVN: r63122
2003-02-19 16:28:37 +00:00
Ranjit Mathew ea5a63a26d win32.h: Include ws2tcpip.h instead of winsock.h to obtain definition of the socklen_t type.
2003-02-12  Ranjit Mathew  <rmathew@hotmail.com>

	* include/win32.h: Include ws2tcpip.h instead of
	winsock.h to obtain definition of the socklen_t type.
	Remove IP_TOS definition - not needed with ws2tcpip.h
	(_Jv_connect): Correct slight formatting error.

From-SVN: r62801
2003-02-13 00:07:37 +00:00
Tom Tromey 60c7f4ef5e aclocal.m4, [...]: Rebuilt.
* aclocal.m4, configure, include/config.h.in: Rebuilt.
	* acinclude.m4 (CHECK_FOR_BROKEN_MINGW_LD): Resurrected; was in
	aclocal.m4 and lost in some merge.

From-SVN: r62188
2003-01-31 17:59:00 +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
Ranjit Mathew 65b8e87409 re PR java/9254 (java::lang::Object::wait(), threads-win32.cc returns wrong return codes)
2003-01-28  Ranjit Mathew  <rmathew@hotmail.com>

	Fixes PR java/9254:
	* include/win32-threads.h (_Jv_Mutex_t): Convert to a struct
	additionally containing id of the owner thread as well as
	the number of nested times the thread has acquired the mutex.
	(_Jv_MutexInit): Initialise owner thread id and refcount to 0.
	(_Jv_MutexDestroy): Reset owner thread id and refcount to 0.
	(_Jv_MutexUnlock): Check if really the owner thread, reset
	owner thread id to 0 before leaving, if leaving for the last
	time.
	(_Jv_MutexLock): Set owner thread id in the mutex and increment
	refcount.
	(_Jv_ThreadYield): Yield using a call to Sleep(0).
	* win32-threads.cc (_Jv_CondWait): Check if really owner of
	the passed mutex.
	Pass handle of the broadcast event, instead of a pointer to it
	in Win32 ResetEvent( ) call.
	Remove incorrect return values.
	(_Jv_CondDestroy): Close both event handles and delete
	critical section.
	(_Jv_CondNotify): Check if really the owner thread.
	(_Jv_CondNotifyAll): Check if really the owner thread.
	(_Jv_InitThreads): Change daemon_cond to a manual-reset event.
	(really_start): Use SetEvent( ) to signal daemon_cond.
	(_Jv_ThreadWait): Remove SignalObjectAndWait( ) and use
	WaitForSingleObject( ) instead to wait for daemon_cond to be
	signalled.

From-SVN: r62033
2003-01-28 22:23:36 +00:00
Ranjit Mathew e4261ef72c configure.in: Specifically define HAVE_BACKTRACE if building for MinGW.
2003-01-27  Ranjit Mathew  <rmathew@hotmail.com>

	* configure.in: Specifically define HAVE_BACKTRACE if building
	for MinGW.
	* include/win32.h: Remove HAVE_BACKTRACE definition.
	* gnu/gcj/runtime/natStackTrace.cc: Include platform.h.
	* configure: Rebuilt.

From-SVN: r62000
2003-01-28 19:10:00 +00:00
Tom Tromey 4c98b1b078 defineclass.cc (handleMethodsEnd): Precompute code for static method.
* defineclass.cc (handleMethodsEnd): Precompute code for static
	method.
	(handleCodeAttribute): Likewise.
	* resolve.cc (ncode): Use run_class for unsynchronized static
	methods.
	* include/java-interp.h (class _Jv_InterpMethod): Declare
	run_class.
	* interpret.cc (run_synch_class): Initialize class.
	(run) [insn_invokestatic]: Don't initialize class.
	[insn_anewarray]: Likewise.
	[insn_multianewarray]: Likewise.
	(run_class): New function.

From-SVN: r61727
2003-01-24 19:58:21 +00:00
Andrew Haley f8061f6ab4 x86_64-signal.h: Add simple handler for x86_64 32-bit mode.
2003-01-22  Andrew Haley  <aph@redhat.com>

        * x86_64-signal.h: Add simple handler for x86_64 32-bit mode.
        * configure.host (CHECKREFSPEC): Define for x86_64.

From-SVN: r61600
2003-01-22 17:47:04 +00:00
Andrew Haley b399dfb0b4 dwarf2-signal.h: Remove x86_64.
2003-01-10  Andrew Haley  <aph@redhat.com>

        * include/dwarf2-signal.h: Remove x86_64.
        * configure.host (x86_64 DIVIDESPEC): Remove.
        * include/x86_64-signal.h: New file.
        * configure.in: Regenerate.

From-SVN: r61285
2003-01-14 14:02:13 +00:00
Andrew Haley 399df6db87 dwarf2-signal.h: Remove x86_64.
2003-01-10  Andrew Haley  <aph@redhat.com>

        * include/dwarf2-signal.h: Remove x86_64.
        * configure.host (x86_64 DIVIDESPEC): Remove.
        * include/x86_64-signal.h: New file.
        * configure.in: Regenerate.

From-SVN: r61284
2003-01-14 13:51:15 +00:00
Tom Tromey 6ec628973a posix.h (_Jv_platform_usleep): Wrap in ifdef JV_HASH_SYNCHRONIZATION.
* include/posix.h (_Jv_platform_usleep): Wrap in ifdef
	JV_HASH_SYNCHRONIZATION.
	* include/win32.h (_Jv_platform_usleep): Wrap in ifdef
	JV_HASH_SYNCHRONIZATION.

From-SVN: r60998
2003-01-07 16:50:08 +00:00
Tom Tromey 35a94bdca8 re PR libgcj/8997 (spin() calls Thread.sleep)
2002-12-31  Tom Tromey  <tromey@redhat.com>
            Ranjit Mathew  <rmathew@hotmail.com>

	Fix for PR libgcj/8997:
	* java/lang/natObject.cc (spin): Use _Jv_platform_usleep.
	Include platform.h.
	* include/posix.h (_Jv_platform_usleep): New function.
	* include/win32.h (_Jv_platform_usleep): New function.

Co-Authored-By: Ranjit Mathew <rmathew@hotmail.com>

From-SVN: r60700
2002-12-31 17:43:47 +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
Tom Tromey a1aba4f9a5 natClassLoader.cc (defineClass0): Removed erroneous comment.
* java/lang/natClassLoader.cc (defineClass0): Removed erroneous
	comment.
	* java/lang/ClassLoader.java (defineClass): Use chained
	exception when rethrowing.
	* defineclass.cc (handleClassBegin): Mark class as interpreted.
	* java/lang/reflect/Modifier.java (INVISIBLE, INTERPRETED): New
	constants.
	* resolve.cc (_Jv_PrepareMissingMethods): New function.
	(_Jv_PrepareClass): Use it.
	* include/java-interp.h (_Jv_IsInterpretedClass): Rewrote.
	(_Jv_InterpClass): _Jv_PrepareMissingMethods now friend.
	* java/lang/Class.h (Class::getModifiers): Mask with ALL_FLAGS.
	(Class): _Jv_PrepareMissingMethods now friend.
	* java/lang/natClassLoader.cc (defineClass0): Use JvSynchronize.
	Record `NULL' for system class loader.
	(_Jv_RegisterInitiatingLoader): Use JvSynchronize.  Special case
	system class loader.
	(_Jv_FindClassInCache): Likewise.
	(_Jv_UnregisterClass): Use JvSynchronize.  Free old loader info.
	(_Jv_FindClass): Special case system class loader.
	* java/lang/natClass.cc (_Jv_abstractMethodError): New function.
	(_Jv_SetVTableEntries): Put _Jv_abstractMethodError into empty
	vtable slots.
	(_Jv_LayoutVTableMethods): Don't generate vtable slot for a method
	in a final class.
	(_getDeclaredMethod): Don't return synthetic methods.
	(getDeclaredMethods): Likewise.
	(_getMethod): Likewise.
	(_getMethods): Likewise.

From-SVN: r60319
2002-12-19 19:31:55 +00:00
Tom Tromey 35cfd29184 win32.h: Fixed typo in "DISABLE_JAVA_NET".
* include/win32.h: Fixed typo in "DISABLE_JAVA_NET".
	From Laurent Bardet <l.bardet@magic.fr>.

From-SVN: r60013
2002-12-10 21:24:47 +00:00
Tom Tromey 78bb0444d2 win32.h (_Jv_platform_solib_prefix): New define.
* include/win32.h (_Jv_platform_solib_prefix): New define.
	(_Jv_platform_solib_suffix): Likewise.
	* include/posix.h (_Jv_platform_solib_prefix): New define.
	(_Jv_platform_solib_suffix): Likewise.
	* java/lang/natRuntime.cc: Include StackTrace.h.
	(_load): Use findLibrary and new platform defines.
	(nativeGetLibname): Use new platform defines.

From-SVN: r59976
2002-12-10 01:39:32 +00:00
Tom Tromey b4d0051bd9 java-interp.h (class _Jv_InterpMethod): Added JV_MARKOBJ_DECL.
* include/java-interp.h (class _Jv_InterpMethod): Added
	JV_MARKOBJ_DECL.
	* boehm.cc (_Jv_MarkObj): Consolidated interpreter code.  Also
	mark `prepared' field of interpreted method.
	* interpret.cc (compile): Use _Jv_AllocBytes.

From-SVN: r59900
2002-12-06 23:41:38 +00:00
Andrew Haley 421f9e6091 natClassLoader.cc (_Jv_PrepareCompiledClass): Call _Jv_PushClass.
2002-12-03  Andrew Haley  <aph@redhat.com>

        * java/lang/natClassLoader.cc (_Jv_PrepareCompiledClass): Call
	_Jv_PushClass.
        (_Jv_InitNewClassFields): Set protectionDomain and chain = NULL.
        (_Jv_PopClass): New.
        (_Jv_PushClass): New.
        * java/lang/natClass.cc (forName (jstring)): Use a StackTrace to
        discover the ClassLoader of our caller.
        (_Jv_CheckArrayStore): Don't check that a class is assignment
        compatible with Object.
        * java/lang/natVMTHrowable.cc: Delete.
        * gnu/gcj/runtime/StackTrace.java: New, partly copied from
	java.lang.VMThrowable.
        (StackTrace(), StackTrace(int)): New constructors.
        (classAt, methodAt, update, methodAtAddress): New methods.
        (map): New field.
	* java/lang/VMThrowable.java: Use StackTrace instead of
	natVMTHrowable.
	* java/lang/Class.h (getClassLoaderInternal): New.
        (class Class): Be friendly with _Jv_PopClass and _Jv_PushClass.
        Be friendly with gnu::gcj::runtime::StackTrace.
        (Object.chain): New field.
        * include/java-interp.h (class _Jv_InterpMethod): Be friendly with
        gnu::gcj::runtime::StackTrace.
        * prims.cc (_Jv_NewObjectArray): Use getClassLoaderInternal()
        instead of getClassLoader().
        * verify.cc (class _Jv_BytecodeVerifier): Likewise.
        java::lang::VMThrowable.
        * Makefile.am (core_java_source_files): Add MethodRef.java,
	StackTrace.java.
        (nat_source_files): Remove natVMThrowable.cc; add natStackTrace.cc.
        * Makefile.in: Rebuild.

2002-12-03  Andrew Haley  <aph@redhat.com>

	* class.c (make_class_data): New field, "chain".
	* decl.c (java_init_decl_processing): Likewise.

From-SVN: r59769
2002-12-03 13:50:05 +00:00
Tom Tromey 35e058a2b8 jni.cc: Added `name' argument.
* jni.cc: Added `name' argument.
	* include/jni.h (struct JNINativeInterface) [DefineClass]: Added
	`const char *' argument.
	(class _Jv_JNIEnv) [DefineClass]: Likewise.

From-SVN: r59756
2002-12-03 03:54:05 +00:00
Andreas Tobler 32e098dd98 natPlainDatagramSocketImpl.cc (socklen_t): Don't define.
2002-11-26  Andreas Tobler  <a.tobler@schweiz.ch>

	* java/net/natPlainDatagramSocketImpl.cc (socklen_t): Don't
	define.
	* java/net/natPlainSocketImpl.cc (socklen_t): Don't define.
	* include/posix.h (socklen_t): Define if not already defined.

From-SVN: r59533
2002-11-26 20:09:28 +00:00
Michael Koch c6d58c6682 2002-11-22 Michael Koch <konqueror@gmx.de>
* include/posix.h:
	(_Jv_platform_on_close): Moved out of #ifndef DISBALE_JAVA_NET.
	* include/win32.h:
	(_Jv_platform_on_close): Moved out of #ifndef DISBALE_JAVA_NET.
	(backtrace): Moved out of #ifndef DISBALE_JAVA_NET.

From-SVN: r59374
2002-11-22 10:27:53 +00:00
Michael Koch d1bf262d83 posix.h: I put too much into the #ifndef DISABLE_JAVA_NET.
2002-11-21  Michael Koch <konqueror@gmx.de>

        * include/posix.h: I put too much into the #ifndef DISABLE_JAVA_NET.
        Only the new network functions should be in it.

From-SVN: r59350
2002-11-21 18:01:22 +00:00
Michael Koch e59ff7e93a posic.h: Moved new functions into a #ifndef DISABLE_JAVA_NET
2002-11-21  Michael Koch <konqueror@gmx.de>

	* include/posic.h: Moved new functions into a #ifndef DISABLE_JAVA_NET
	* include/win32.h: Moved new functions into a #ifndef DISABLE_JAVA_NET

From-SVN: r59346
2002-11-21 14:34:12 +00:00
Michael Koch c3e0633cc3 2002-11-21 Michael Koch <konqueror@gmx.de>
* include/posix.h
       (_Jv_socket): New method.
       (_Jv_connect): New method.
       (_Jv_close): New method.
       (_Jv_platform_close_on_exec): Prefixed system function with "::".
       (_Jv_bind): New method.
       (_Jv_listen): New method.
       (_Jv_write): New method.
       (_Jv_read): New method.
       * include/win32.h
       (_Jv_socket): New method.
       (_Jv_connect): New method.
       (_Jv_close): New method.
       (_Jv_bind): New method.
       (_Jv_listen): New method.
       (_Jv_write): New method.
       (_Jv_read): New method.
       * java/net/natNetworkInterface.cc:
       Include platform.h, removed inclusion of socket.h
       (getRealNetworkInterfaces): Replaced ::socket() by _Jv_socket() and
       ::close() by _Jv_close().
       * java/net/natPlainDatagramSocketImpl.cc:
       Removed include of socket.h, definition of NATIVE_CLOSE and _Jv_bind,
       added some new lines to make code more readable.
       (create): Replaced ::socket() by _Jv_socket().
       (close): Replaced NATIVE_CLOSE() by _Jv_close().
       * java/net/natPlainSocketImpl.cc:
       Removed definition of NATIVE_CLOSE, _Jv_bind, Jv_connect and _Jv_accept,
       removed include of socket.h, removed some windows defines
       (now in include/win32.h).
       (create): Replaced ::socket() by _Jv_socket().
       (close): Replaced NATIVE_CLOSE() by _Jv_close().
       (write): Replaced ::read by _Jv_write().
       (read): Replaced ::read by _Jv_read().

From-SVN: r59338
2002-11-21 10:08:03 +00:00
Ranjit Mathew 93745862c4 jni.h: Add missing JNICALL and JNIEXPORT attributes to function and function pointer...
2002-11-19  Ranjit Mathew <rmathew@hotmail.com>

	* include/jni.h: Add missing JNICALL and JNIEXPORT attributes
	to function and function pointer declarations in accordance with
	Sun's JDKs. Define JNIIMPEXP to either JNIEXPORT or JNIIMPORT
	based on whether __GCJ_JNI_IMPL__ has been defined or not.
	* jni.cc: Add missing JNICALL and JNIEXPORT attributes to
	JNI function definitions.

From-SVN: r59277
2002-11-19 21:23:28 +00:00
Ranjit Mathew a2eb270a7e jni.h (JNIIMPORT, [...]): Linker defines for Win32.
2002-11-08  Ranjit Mathew <rmathew@hotmail.com>

	* include/jni.h (JNIIMPORT, JNIEXPORT, JNICALL): Linker defines
	for Win32. JNICALL has been defined to __stdcall to be compatible
	with Sun's JDKs.

From-SVN: r58985
2002-11-10 17:38:08 +00:00
Adam Megacz e2a450f6e8 aclocal.m4 (CHECK_FOR_BROKEN_MINGW_LD): added
2002-10-20  Adam Megacz <adam@xwt.org>

        * aclocal.m4 (CHECK_FOR_BROKEN_MINGW_LD): added
        * configure.in: enabled hash sync on Win32
        * include/win32-threads.h (_Jv_ThreadId_t): added.
        * java/lang/natObject.cc (_Jv_MonitorEnter, _Jv_MonitorExit,
        heavy_lock_obj_finalization_proc, wait, notify, notifyAll):
        removed some posix-isms, use Thread::sleep() instead of usleep,
        added code to clear bottom three bits if platform has a broken
        linker.  * include/win32-threads.h (_Jv_ThreadId_t): added.

From-SVN: r58344
2002-10-21 01:50:14 +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
Michael Koch a2f2457fa4 Matcher.java, [...]: Merge with classpath, new files.
2002-09-18  Michael Koch  <konqueror@gmx.de>

	* java/util/regex/Matcher.java, java/util/regex/Pattern.java,
	java/util/regex/PatternSyntaxException.java:
	Merge with classpath, new files.
	* Makefile.am (core_java_source_files):
	Added java/util/regex/Matcher.java,
	java/util/regex/Pattern.java,
	java/util/regex/PatternSyntaxException.java
	* Makefile.in: Regenerated.
	* include/config.h.in: Added HAVE_NET_IF_H.
	* java/net/natNetworkInterface.cc (getRealNetworkInterfaces):
	Removed #if 0 ... #endif.

From-SVN: r57275
2002-09-18 10:15:52 +00:00
Adam Megacz 981f97c364 natPlainDatagramSocket.cc: removed #include <ws2tcpip.h>; the mingw header is broken (conflicts with itself).
2002-09-14  Adam Megacz <adam@xwt.org>

        * java/net/natPlainDatagramSocket.cc: removed #include
        <ws2tcpip.h>; the mingw header is broken (conflicts with itself).
        * include/win32.h: included definition for IP_TOS to satisfy
        natPlainDatagramSocket.cc

From-SVN: r57151
2002-09-14 21:56:44 +00:00
Tom Tromey 0148e1ee90 natFileDescriptorPosix.cc (setLength): Handle case where ftruncate is missing.
* java/io/natFileDescriptorPosix.cc (setLength): Handle case where
	ftruncate is missing.
	* configure, include/config.h.in: Rebuilt.
	* acconfig.h (HAVE_FTRUNCATE): Mention.
	* configure.in: Check for ftruncate.

From-SVN: r56658
2002-08-29 18:05:15 +00:00
Tom Tromey 3308c46e47 jvm.h (struct _Jv_frame_info): New structure.
* include/jvm.h (struct _Jv_frame_info): New structure.
	* gnu/gcj/runtime/natNameFinder.cc: Include StringBuffer.h,
	java-interp.h.
	(lookupInterp): New method.
	(getAddrAsString): Use _Jv_frame_info.
	(dladdrLookup): Likewise.
	* gnu/gcj/runtime/NameFinder.java (lookup): Try to look up
	interpreted frame.
	(lookupInterp): Declare.
	* java/lang/natVMThrowable.cc: Include Thread.h, java-interp.h.
	(fillInStackTrace): Collect information on interpreted frames.
	Use _Jv_frame_info.
	* interpret.cc: Include Thread.h.
	(run): Create and push _Jv_MethodChain object.
	(_Jv_EndOfInterpreter): New global.
	* java/lang/Thread.java (interp_frame): New field.
	* include/java-interp.h (struct _Jv_MethodChain): New structure.
	Include NameFinder.h.

From-SVN: r56657
2002-08-29 17:53:28 +00:00
Tony Kimball 835cb22e3b natPlainDatagramSocketImpl.cc (NATIVE_CLOSE): New define.
2002-08-27  Tony Kimball <alk@pobox.com>
            Tom Tromey  <tromey@redhat.com>

	* java/net/natPlainDatagramSocketImpl.cc (NATIVE_CLOSE): New
	define.
	(::close): Removed.
	(PlainDatagramSocketImpl::close): Use NATIVE_CLOSE.
	* java/net/natPlainSocketImpl.cc (NATIVE_CLOSE): New define.
	(::close): Removed.
	(PlainSocketImpl::close): Use NATIVE_CLOSE.
	* include/win32.h (getcwd): Removed declaration.  Include io.h.

Co-Authored-By: Tom Tromey <tromey@redhat.com>

From-SVN: r56605
2002-08-27 16:08:31 +00:00
Adam Megacz 6005baa707 win32.h (getcwd): copied function declaration as temporary fix for header confusion.
2002-08-25  Adam Megacz <adam@xwt.org>

        * include/win32.h (getcwd): copied function declaration as
        temporary fix for header confusion.

From-SVN: r56574
2002-08-26 05:29:59 +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
Bo Thorsen 7b20471292 ieeefp.h: Add x86-64 support.
2002-07-19  Bo Thorsen  <bo@berlioz.suse.de>

        * java/lang/ieeefp.h: Add x86-64 support.
        * configure.in: Likewise.
        * configure.host: Likewise.
        * configure: Regenerated.
        * sysdep/x86-64/locks.h: New file with x86-64 locks.

From-SVN: r55588
2002-07-19 16:41:15 +02: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 fdae83abe7 verify.cc (branch_prepass): Updated for change to exception handler type.
* verify.cc (branch_prepass): Updated for change to exception
	handler type.
	(verify_instructions_0): Likewise.
	* defineclass.cc (handleCodeAttribute): Initialize `prepared'.
	(handleExceptionTableEntry): Updated for change to exception
	handler type.
	* java/lang/Class.h (Class): Removed _Jv_InterpMethodInvocation.
	* include/java-interp.h (_Jv_InterpMethodInvocation): Removed.
	(union _Jv_InterpPC): New.
	(class _Jv_InterpException): Changed types to _Jv_InterpPC.
	(class _Jv_InterpMethod): Added new `prepared' field.
	(class _Jv_InterpMethod): Added `compile' method.  Removed
	`continue1' and `find_exception'.  Changed arguments to `run'.
	* interpret.cc (union insn_slot): New.
	(find_exception): Removed.
	(run_normal): Removed most logic.
	(run_synch_object): Likewise; also, use JvSynchronize.
	(run_synch_class): Likewise.
	(run): Removed.
	(continue1): Renamed as `run'.  Compile bytecode if required.
	Add new code to allow refinement of direct-threaded code at
	runtime.  Handle exceptions.
	(SAVE_PC): Removed.
	(compile): New method.
	(SET_ONE, SET_INSN, SET_INT, SET_DATUM): New defines.
	(NULLARRAYCHECK): Don't use SAVE_PC.
	(pc_t): New typedef.
	(TAKE_GOTO, GET1S, GET1U, GET2U, AVAL1U, AVAL2U, AVAL2UP,
	SKIP_GOTO, GOTO_VAL, PCVAL, AMPAMP): New macros.

From-SVN: r54968
2002-06-24 20:38:47 +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 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 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
Ulrich Weigand e793a7140e configure.host [...]: Set can_unwind_signal=yes.
* configure.host [s390*-linux*]: Set can_unwind_signal=yes.
* configure.in [s390*-*-linux*]: Do not define HAVE_BACKTRACE.
Set SIGNAL_HANDLER=include/s390-linux.h.
* configure: Regenerate.
* include/s390-linux.h: New file.

From-SVN: r54012
2002-05-29 18:36:50 +00:00
David Billinghurst 0659e0e3df natSystem.cc (getSystemTimeZone): Use HAVE_UNDERSCORE_TIMEZONE.
2002-05-03  David Billinghurst  <David.Billinghurst@riotinto.com>
	    Tom Tromey  <tromey@redhat.com>

	* java/lang/natSystem.cc (getSystemTimeZone): Use
	HAVE_UNDERSCORE_TIMEZONE.
	* include/config.h.in: Rebuilt.
	* acconfig.h (HAVE_UNDERSCORE_TIMEZONE, HAVE_BACKTRACE): Undef.
	* aclocal.m4, configure: Rebuilt.
	* acinclude.m4: Run AC_EXEEXT.
	* configure.in: Adjust test for `timezone' so it fails on Cygwin.
	Add test for `_timezone'.

Co-Authored-By: Tom Tromey <tromey@redhat.com>

From-SVN: r53117
2002-05-03 20:17:48 +00:00
Hans Boehm ce4b2ca6bc dwarf2-signal.h (INIT_SEGV, [...]): use sigaction instead of __libc_sigaction.
* include/dwarf2-signal.h (INIT_SEGV, INIT_FPE for ia64):
	use sigaction instead of __libc_sigaction.

From-SVN: r53074
2002-05-03 00:21:48 +00:00
David S. Miller fd84ba84a7 re PR bootstrap/6525 (libjava won't build on Red Hat Linux 6.2/sparc)
2002-05-02  David S. Miller  <davem@redhat.com>

	PR bootstrap/6525
	* include/dwarf2-signal.h (INIT_SEGV, INIT_FPE): Don't use
	__libc_sigaction on Sparc.

From-SVN: r53055
2002-05-02 10:54:24 -07:00
David S. Miller 6ea531707a re PR target/6422 (libjava failures on sparc-linux)
2002-04-25  David S. Miller  <davem@redhat.com>

	PR target/6422
	* include/dwarf2-signal.h (MAKE_THROW_FRAME for sparc*): Set
	program counter to next program counter minus 8.  Update
	comments in this macro to explain why.

From-SVN: r52820
2002-04-26 17:04:14 -07:00
Tom Tromey b446a5f169 verify.cc (construct_primitive_array_type): New case.
* verify.cc (construct_primitive_array_type) [void_type]: New
	case.
	(branch_prepass): Added dummy entries for unused instruction
	values.
	(verify_instructions_0): Likewise.
	* interpret.cc (continue1): Comment fix.
	* include/java-insns.h (op_xxxunusedxxx1): Removed.
	* Makefile.in: Rebuilt.
	* Makefile.am: Added -Wswitch-enum.

From-SVN: r52814
2002-04-26 22:39:29 +00:00
Adam Megacz c2a6704f60 win32.cc, win32.cc (backtrace): Added this function because Win32 does not supply it.
2002-04-23  Adam Megacz <adam@xwt.org>

        * win32.cc, include/win32.cc (backtrace): Added this function
        because Win32 does not supply it.

From-SVN: r52701
2002-04-24 01:33:19 +00:00
David S. Miller 4bf0144590 dwarf2-signal.h (MAKE_THROW_FRAME, sparc32): Document magic instruction reading sequence.
2002-04-21  David S. Miller  <davem@redhat.com>

	* include/dwarf2-signal.h (MAKE_THROW_FRAME, sparc32): Document
	magic instruction reading sequence.

From-SVN: r52609
2002-04-22 01:13:32 -07:00
David S. Miller 714708c8b1 dwarf2-signal.h (SIGNAL_HANDLER): Name siginfo_t pointer arg.
2002-04-19  David S. Miller  <davem@redhat.com>

	* include/dwarf2-signal.h (SIGNAL_HANDLER): Name siginfo_t pointer
	arg.
	(MAKE_THROW_FRAME): Define for 32-bit and 64-bit sparc.
	(INIT_SEGV, INIT_FPE): Use direct __libc_sigaction installation
	on Sparc too.
	* include/sparc-signal.h (FLUSH_REGISTER_WINDOWS): Define properly
	for 64-bit sparc.
	(MAKE_THROW_FRAME): Use long for sp/retaddr so 64-bit works.
	* sysdeps/sparc/locks.h: New file.
	* configure.in (SIGNAL_HANDLER): Set to include/sparc-signal.h
	on all sparc Solaris configurations.  Set to
	include/dwarf2-signal.h on sparc Linux.
	* configure: Regenerate
	* configure.host (can_unwind_signal): sparc*-linux* can do it now.

From-SVN: r52575
2002-04-21 02:37:49 -07: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
Adam King 94ed000253 jvm.h (_Jv_ThrowBadArrayIndex, [...]): Mark as noreturn.
2002-04-11  Adam King <aking@dreammechanics.com>
	    Tom Tromey  <tromey@redhat.com>

	* include/jvm.h (_Jv_ThrowBadArrayIndex,
	_Jv_ThrowNullPointerException): Mark as noreturn.
	* win32.cc (_Jv_platform_initProperties): Use _Jv_MallocUnchecked
	and _Jv_free.  Correctly invoke GetTempPath().  Indentation
	fixes.

Co-Authored-By: Tom Tromey <tromey@redhat.com>

From-SVN: r52164
2002-04-11 15:57:56 +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
Adam King 455cd615c2 natSystem.cc (init_properties): Call new function _Jv_platform_initProperties.
2002-04-07  Adam King <aking@dreammechanics.com>

	* java/lang/natSystem.cc (init_properties): Call new function
	_Jv_platform_initProperties.
	* win32 (_Jv_platform_initProperties): New function that adds Win32
	support for the System properties os.name, os.arch, os.version,
	user.name, user.home, and user.dir.
	* include/posix.h, include/win32.h, posix.cc: New function
	_Jv_platform_initProperties.

From-SVN: r51989
2002-04-07 12:27:00 +01:00
Adam Megacz c77567790f win32.h (_Jv_platform_close_on_exec): added inline modifier.
2002-04-04  Adam Megacz <adam@xwt.org>

    * include/win32.h (_Jv_platform_close_on_exec): added inline
    modifier.

From-SVN: r51899
2002-04-05 04:22:28 +00:00
Richard Henderson 6ad4639794 * include/posix-threads.h [alpha] (_Jv_ThreadSelf): Avoid a copy.
From-SVN: r51468
2002-03-27 11:25:04 -08:00
Andrew Haley 3cb2054594 dwarf2-signal.h (MAKE_THROW_FRAME): Add for IA-64.
2002-03-25  Andrew Haley <aph@cambridge.redhat.com>, Hans Boehm <Hans_Boehm@hp.com>

        * include/dwarf2-signal.h (MAKE_THROW_FRAME): Add for IA-64.
        (INIT_SEGV, INIT_FPE): Add versions that use __libc_sigaction
        instead of syscall on IA-64.
        Add FIXME comment.

From-SVN: r51459
2002-03-27 17:08:47 +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
Hans Boehm d6220b3ad7 * include/dwarf2-signal.h: Temporarily back out last change.
From-SVN: r51415
2002-03-26 22:44:48 +00:00
Loren J. Rittle b4a19310cd * include/posix-threads.h: Support <.../pal.h> on FreeBSD/alpha.
From-SVN: r51383
2002-03-26 11:26:13 +00:00
Andrew Haley 90b2d2afa1 configure.in, configure: enable dwarf2-exception-style exception handling on IA-64.
* configure.in, configure: enable dwarf2-exception-style
	exception handling on IA-64.
	* include/dwarf2-signal.h (MAKE_THROW_FRAME): Add for IA-64.
	(INIT_SEGV, INIT_FPE): Use __libc_sigaction instead of syscall.
	Add FIXME comment.

From-SVN: r51367
2002-03-26 03:42:54 +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
Martin Kahlert c6ef94c533 2002-03-19 Martin Kahlert <martin.kahlert@infineon.com>
* include/jni.h Use correct C comments

From-SVN: r51046
2002-03-19 21:45:42 +00:00
Tom Tromey 9d5e46be34 jni.h (JNIIMPORT): New macro.
* include/jni.h (JNIIMPORT): New macro.
	(JNIEXPORT): Likewise.
	(JNICALL): Likewise.

From-SVN: r51009
2002-03-18 21:55:42 +00:00
Andrew Haley 71c6877d3e i386-signal.h (old_i386_kernel_sigaction): New.
2002-03-18  Andrew Haley  <aph@cambridge.redhat.com>

        * include/i386-signal.h (old_i386_kernel_sigaction): New.
        INIT_SEGV: Use old_i386_kernel_sigaction.
        INIT_FP: Likewise.

From-SVN: r50980
2002-03-18 17:11:43 +00:00
Bryce McKinlay 1b5a2139c7 natSystem.cc (init_properties): Update VM version properties.
* java/lang/natSystem.cc (init_properties): Update VM version
	properties.
	* configure.in: Set GCJVERSION.
	* acconfig.h: Add GCJVERSION.
	* configure: Rebuilt.
	* include/config.h.in: Rebuilt.

From-SVN: r50944
2002-03-18 06:19:03 +00:00
Anthony Green e2ea015c1c Install libgcj-config.h in a better place.
From-SVN: r50817
2002-03-15 18:03:49 +00:00
Bryce McKinlay 60678e476f posix.h: Add multiple include header protection.
* include/posix.h: Add multiple include header protection.
	* java/net/natPlainSocketImpl.cc: Don't #include <posix.h>.

From-SVN: r50559
2002-03-11 04:15:51 +00:00
Tom Tromey 0c1fcb02b1 Win32Process.java: Added comment.
* java/lang/Win32Process.java: Added comment.
	* include/posix.h (_Jv_platform_close_on_exec): New function.
	Include fcntl.h.
	* include/win32.h (_Jv_platform_close_on_exec): New function.
	* java/net/natPlainSocketImpl.cc (create): Set close-on-exec
	flag.
	(accept): Likewise.
	* java/net/natPlainDatagramSocketImpl.cc (create): Set
	close-on-exec flag.
	* java/io/natFileDescriptorPosix.cc (open): Set close-on-exec
	flag.

From-SVN: r50536
2002-03-10 17:59:23 +00:00
Bryce McKinlay 4559716751 Hashtable synchronization for PowerPC.
libjava:
	Hashtable synchronization for PowerPC.
	* configure.in: Define SLOW_PTHREAD_SELF if configure.host set
	slow_pthread_self. Set up symlink for sysdeps directory.
	* configure: Rebuild.
	* configure.host: Document more shell variables. Set sysdeps_dir
	for most platforms. Set slow_pthread_self for i686. Set
	enable_hash_synchronization_default and slow_pthread_self for PowerPC.
	* posix-threads.cc (_Jv_ThreadSelf_out_of_line): Use release_set so
	that memory barrier is emitted where required.
	* prims.cc: 64-bit align static primitive class instances.
	* include/posix-threads.h (_Jv_ThreadSelf for SLOW_PTHREAD_SELF): Add
	read_barrier() to enforce ordering of reads.
	* sysdep/powerpc/locks.h: New file. Implementation of synchronization
	primitives for PowerPC.
	* sysdep/i386/locks.h: New file. Synchronization primitives for i386
	moved from natObject.cc.
	* sysdep/alpha/locks.h: Likewise.
	* sysdep/ia64/locks.h: Likewise.
	* sysdep/generic/locks.h: Likewise.
	* java/lang/natObject.cc: Move thread synchronization primitives to
	system-dependent headers.
gcc/java:
	* decl.c (java_init_decl_processing): Make sure class_type_node
	alignment is not less than 64 bits if hash synchronization isenabled.

boehm-gc:
	* include/gc_priv.h: Define ALIGN_DOUBLE on 32 bit targets if GCJ
	support is enabled, for hash synchronization.

From-SVN: r50523
2002-03-10 03:53:16 +00:00
Tom Tromey de3adb3d9c * include/jni.h: Include stdio.h.
From-SVN: r50457
2002-03-08 21:37:46 +00:00
Adam Megacz 8eeda6e0e7 win32.cc (_Jv_platform_gettimeofday): Now takes no args, returns jlong.
2002-03-07  Adam Megacz  <adam@xwt.org>

        * win32.cc (_Jv_platform_gettimeofday): Now takes no args,
        returns jlong. Added implementation
        * posix.cc (_Jv_platform_gettimeofday): Now takes no args,
        returns jlong.
        * win32.h (_Jv_platform_gettimeofday): Now takes no args,
        returns jlong.
        * posix.h (_Jv_platform_gettimeofday): Now takes no args,
        returns jlong.
        * java/lang/natSystem.cc (currentTimeMillis): Now uses updated
        _Jv_platform_gettimeofday signature.

From-SVN: r50416
2002-03-08 01:03:56 +00:00
Tom Tromey fd7852b37a config.h.in: Rebuilt.
* include/config.h.in: Rebuilt.
	* configure: Rebuilt.
	* Makefile.in: Rebuilt.

From-SVN: r50381
2002-03-06 23:11:18 +00:00
Eric Blake 1fa782725c unicode-decomp.pl: Move from chartables.pl...
2002-03-04  Eric Blake  <ebb9@email.byu.edu>

	* scripts/unicode-decomp.pl: Move from chartables.pl, and remove
	the code for generating include/java-chartables.h.
	* scripts/unicode-blocks.pl: Move from scripts/blocks.pl, and
	merge with Classpath.
	* scripts/unicode-muncher.pl: Copy from Classpath.
	* scritps/MakeCharTables.java: New file.
	* gnu/gcj/convert/Blocks-3.txt: New file.
	* gnu/gcj/convert/UnicodeData-3.0.0.txt: New file.
	* gnu/gcj/convert/UnicodeCharacterDatabase-3.0.0.html: New file.
	* gnu/java/lang/CharData.java: Copy from Classpath.
	* Makefile.am (ordinary_java_source_files): Add
	gnu/java/lang/CharData.java.
	* configure.in: Remove --enable-fast-character option.
	* java/lang/Character.java: Merge algorithms and Javadoc with
	Classpath.
	* java/lang/natCharacter.cc: Implement Unicode lookup table more
	efficiently.
	* include/java-chardecomp.h: Regenerate.
	* include/java-chartables.h: Regenerate.

From-SVN: r50368
2002-03-06 18:54:45 +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
Martin Kahlert aeb4ed4614 jni.h: Fix typo.
2002-02-14  Martin Kahlert  <martin.kahlert@infineon.com>

	* include/jni.h: Fix typo.

From-SVN: r49767
2002-02-14 15:42:37 +00:00
Adam Megacz b32d2321aa win32.h: Added _Jv_platform_gettimeofday.
2002-02-11  Adam Megacz <adam@xwt.org>

        * include/win32.h: Added _Jv_platform_gettimeofday.
        * win32.cc (_Jv_platform_gettimeofday): Added dummy function.

From-SVN: r49693
2002-02-12 02:25:07 +00:00
Tom Tromey 9f2618df7e name-finder.h: Conditionally include sys/wait.h.
* include/name-finder.h: Conditionally include sys/wait.h.
	* include/config.h.in: Rebuilt.

From-SVN: r49585
2002-02-07 19:25:28 +00:00
Tom Tromey 73272ce608 prims.cc (_Jv_CreateJavaVM): Call _Jv_platform_initialize.
* prims.cc (_Jv_CreateJavaVM): Call _Jv_platform_initialize.
	* win32.cc (win32_exception_handler): Now static.
	* include/win32.h (_Jv_platform_initialize): Declare.
	(win32_exception_handler): Don't declare.
	* java/lang/natSystem.cc (currentTimeMillis): Use
	_Jv_platform_gettimeofday.
	* posix.cc (_Jv_platform_gettimeofday): Renamed.
	(_Jv_select): Use new name.
	(_Jv_platform_initialize): New function.
	* include/posix.h (_Jv_platform_gettimeofday): Renamed from
	_Jv_gettimeofday.
	(_Jv_platform_initialize): Declare.

From-SVN: r49583
2002-02-07 18:59:52 +00:00
Adam Megacz 1dd52a9935 For some reason AC_HEADER_SYS_WAIT() isn't defining HAVE_SYS_WAIT_H on Linux...
For some reason AC_HEADER_SYS_WAIT() isn't defining HAVE_SYS_WAIT_H on
Linux; this patch backs out my patch that added the #ifdefs until I
can figure out what happened.

From-SVN: r49572
2002-02-07 10:02:59 +00:00
Adam Megacz b8fe3c1e06 configure.in: Changed mingw) to *mingw*).
2002-02-06  Adam Megacz <adam@xwt.org>

        * configure.in: Changed mingw) to *mingw*).
        * win32.cc: Created this file.
        * win32.h: Created this file.
        * win32.cc, prims.cc, win32.h (win32_exception_handler): Moved
        win32_exception_handler from prims.cc to win32.cc, added
        header in win32.h.
        * prims.cc: removed some #ifdef-WIN32'd headers which are no
        longer needed now that we have platform.h

From-SVN: r49566
2002-02-07 05:26:42 +00:00
Adam Megacz 4048d33691 name-finder.h: don't #include sys/wait.h unless HAVE_SYS_WAIT_H
2002-02-06  Adam Megacz <adam@xwt.org>

        * name-finder.h: don't #include sys/wait.h unless HAVE_SYS_WAIT_H

From-SVN: r49564
2002-02-07 04:37:00 +00:00
Anthony Green b5ee195f1e embedded updates
From-SVN: r49562
2002-02-07 03:24:12 +00:00
Adam Megacz 8627cc158d win32-threads.h (_Jv_ConditionVariable_t): Now a struct, to enable safer wait() algorithm.
2002-02-01  Adam Megacz <adam@xwt.org>

        * include/win32-threads.h (_Jv_ConditionVariable_t): Now a struct, to
	enable safer wait() algorithm.
	(_Jv_CondWait, _Jv_CondInit, _Jv_CondDestroy, _Jv_CondNotify,
	_Jv_CondNotifyAll): Implementations moved to win32-threads.cc.
	(_Jv_MutexInit, _Jv_HaveMutexDestroy, _Jv_MutexUnlock,
	_Jv_MutexLock, _Jv_ThreadYield): Reimplement using CRITICAL_SECTIONs
	instead of mutex.
	(_Jv_ThreadYield): Don't call Sleep(), because it crashes win98.

From-SVN: r49427
2002-02-02 04:27:34 +00:00
Tom Tromey 3bd483f2a1 Start of AWT merge with Classpath:
* Makefile.in: Rebuilt.
	* Makefile.am (awt_java_source_files): Reference files in
	gnu/java/awt, not gnu/gcj/awt.
	* java/awt/image/BufferedImage.java: Updated copyright.
	* java/awt/image/ComponentColorModel.java: Updated copyright.
	* java/awt/image/ComponentSampleModel.java: Updated copyright.
	* java/awt/image/DataBuffer.java: Updated copyright.
	* java/awt/image/DataBufferByte.java: Updated copyright.
	* java/awt/image/DataBufferInt.java: Updated copyright.
	* java/awt/image/DataBufferUShort.java: Updated copyright.
	* java/awt/image/IndexColorModel.java: Updated copyright.
	* java/awt/image/PackedColorModel.java: Updated copyright.
	* java/awt/image/Raster.java: Updated copyright.
	* java/awt/image/RasterOp.java: Updated copyright.
	* java/awt/image/SampleModel.java: Updated copyright.
	* java/awt/image/SinglePixelPackedSampleModel.java: Updated copyright.
	* java/awt/image/WritableRaster.java: Updated copyright.
	* java/awt/color/ColorSpace.java: Updated copyright.
	* java/awt/color/ICC_ColorSpace.java: Updated copyright
	* java/awt/color/ICC_Profile.java: Updated copyright.
	* java/awt/event/HierarchyBoundsAdapter.java: Updated copyright.
	* java/awt/event/HierarchyBoundsListener.java: Updated copyright.
	* java/awt/event/HierarchyEvent.java: Updated copyright.
	* java/awt/event/HierarchyListener.java: Updated copyright.
	* java/awt/geom/AffineTransform.java: Updated copyright.
	* java/awt/geom/Dimension2D.java: Updated copyright.
	* java/awt/geom/Ellipse2D.java: Updated copyright.
	* java/awt/geom/IllegalPathStateException.java: Updated copyright.
	* java/awt/geom/Line2D.java: Updated copyright.
	* java/awt/geom/NoninvertibleTransformException.java: Updated
	copyright.
	* java/awt/geom/PathIterator.java: Updated copyright.
	* java/awt/geom/Point2D.java: Updated copyright.
	* java/awt/geom/Rectangle2D.java: Updated copyright.
	* java/awt/geom/RectangularShape.java: Updated copyright.
	* java/awt/geom/RoundRectangle2D.java: Updated copyright.
	* java/awt/Toolkit.java: Updated import for file moves.
	* java/awt/Rectangle.java: Updated copyright; added javadoc from
	Classpath.
	(hashCode): New method from Classpath.
	* java/awt/Graphics2D.java: Updated copyright.
	* java/awt/Transparency.java: Updated copyright.
	* java/awt/Paint.java: Updated copyright.
	* java/awt/Graphics.java: New version from Classpath.
	* java/awt/EventDispatchThread.java: Updated copyright.
	* java/awt/CardLayout.java (layoutContainer): Don't skip invisible
	children.
	(gotoComponent): Wrap around on next/previous.
	* gnu/gcj/awt/BitMaskExtent.java: Removed.
	* gnu/gcj/awt/Buffers.java: Removed.
	* gnu/gcj/awt/ComponentDataBlitOp.java: Removed.
	* gnu/gcj/awt/GLightweightPeer.java: Removed.
	* gnu/java/awt/BitMaskExtent.java: Added.
	* gnu/java/awt/Buffers.java: Added.
	* gnu/java/awt/ComponentDataBlitOp.java: Added.
	* gnu/java/awt/GLightweightPeer.java: Added.
	* java/awt/geom/Line2D.java (clone): Ignore
	CloneNotSupportedException.
	* gnu/gcj/awt/GLightweightPeer.java (getColorModel): New method.
	* java/awt/Frame.java: Merged with Classpath.
	* java/awt/RenderingHints.java: Copyright update.
	* java/awt/Paint.java: Copyright update.
	* java/awt/image/DirectColorModel.java: Merged with Classpath.
	* java/awt/image/ColorModel.java: Merged with Classpath.
	* java/awt/Window.java (show): New Implementation from Classpath.
	(isShowing): Use super.isShowing().
	* java/awt/EventQueue.java: Merged with Classpath.
	* java/awt/AWTEventMulticaster.java (save): Throw
	RuntimeException.
	(saveInternal): Likewise.
	* java/awt/AWTEvent.java: Now implements Serializable.
	* java/awt/Event.java: Copyright update.
	* java/awt/peer/ComponentPeer.java: Merged with Classpath.
	* java/awt/image/BufferedImage.java: Copyright update.
	* java/awt/GraphicsConfiguration.java: Copyright update.
	* java/awt/Component.java: (addNotify): Don't call
	addNotifyContainerChildren().
	(addNotifyContainerChildren): Removed.
	(setPeer): New method from Classpath.
	(setTreeLock): Likewise.
	(setVisible): Rewrote.
	(show): Use it.
	(hide): Likewise.
	(validate): Set `valid'.
	(checkImage(Image,ImageObserver)): Implementation from Classpath.
	(createImage(ImageProducer)): Likewise.
	(prepareImage): Likewise.
	* java/awt/Container.java (addImpl): Handle case where constraint
	is not a String.  Post event via system event queue.
	(remove): Post event via system event queue.
	(validateTree): Only validate child if it is invalid.
	(getAlignmentX): Call super method as default.
	(getAlignmentY): Likewise.
	(addContainerListener): Now synchronized.
	(removeContainerListener): Likewise.
	(addNotifyContainerChildren): Now private.
	* java/awt/ComponentOrientation.java: Updated copyright.  Added
	@author.
	* java/awt/FlowLayout.java (serialVersionUID): New field.
	(setAlignment): Better exception message.
	(layoutContainer): Don't compute component's preferred size unless
	we're going to use it.
	* java/awt/BorderLayout.java (AFTER_LAST_LINE, AFTER_LINE_ENDS,
	BEFORE_FIRST_LINE, BEFORE_LINE_BEGINS): New constants.
	(firstLine, lastLine, firstItem, lastItem): New fields.
	(addLayoutComponent): Handle case where constraints is null.
	Also, handle relative locations.
	(removeLayoutComponent): Handle relative locations.
	(MIN, MAX, PREF): New constants.
	(calcCompSize): New method.
	(calcSize): New method.
	(minimumLayoutSize): Use it.
	(preferredLayoutSize): Likewise.
	(maximumLayoutSize): Likewise.
	(toString): Include more information.
	(setBounds): New method.
	(layoutContainer): Use libgcj implementation; extended to handle
	relative locations.

From-SVN: r48896
2002-01-16 04:21:35 +00:00
Andreas Tobler ebecd56de9 configure, [...]: Rebuilt.
2002-01-06 Andreas Tobler <a.tobler@schweiz.ch>

	* configure, include/config.h.in: Rebuilt.
	* java/lang/natSystem.cc (getSystemTimeZone): Check HAVE_TM_ZONE.
	* configure.in: Call AC_STRUCT_TIMEZONE.

From-SVN: r48588
2002-01-06 21:38:15 +00:00
Bryce McKinlay 726abf5d79 jvm.h (_Jv_BuildGCDescr): Declare unconditionally.
* include/jvm.h (_Jv_BuildGCDescr): Declare unconditionally.
	* nogc.cc (_Jv_BuildGCDescr): Define unconditionally.

From-SVN: r48169
2001-12-19 01:59:28 +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
Bryce McKinlay 861ef92859 java-tree.h (otable_methods, [...]): New field/global tree definitions.
gcc/java:

	* java-tree.h (otable_methods, otable_decl, otable_syms_decl,
	otable_type, otable_ptr_type, method_symbol_type,
	method_symbols_array_type, method_symbols_array_ptr_type): New
	field/global tree definitions.
	(flag_indirect_dispatch): New flag.
	* decl.c (java_init_decl_processing): Initialize new otable and
	otable_syms type nodes and decls. Add new field "index" to
	method_type_node.
	* class.c (build_method_symbols_entry): New function.
	(make_method_value): Set "index" to to method's vtable index for
	virtual methods when indirect-dispatch is not used.
	(make_class_data): For indirect-dispatch, dont emit the dtable_decl,
	and set vtable_method_count to -1. Set otable and otable_syms field
	if indirect-dispatch is used and there was something to put in them.
	(build_method_symbols_entry): New function.
	(emit_offset_symbol_table): New function.
	* expr.c (get_offset_table_index): New function.
	(build_invokevirtual): Build array reference to otable at the index
	returned by get_offset_table_index, and use the result as the vtable
	offset.
	(build_invokeinterface): Similar.
	* jcf-parse.c (yyparse): If indirect-dispatch, call
	emit_offset_symbol_table at the end of compilation, after all classes
	have been generated.
	* jvspec.c: Don't pass findirect-dispatch to jvgenmain.
	* lang.c (flag_indirect_dispatch): Define.
	(lang_f_options): Add indirect-dispatch flag.

libjava:

	* include/jvm.h (_Jv_VTable::idx_to_offset): New method.
	* java/lang/natClassLoader.cc (_Jv_PrepareCompiledClass): Call
	_Jv_MakeVTable and _Jv_LinkOffsetTable if needed.
	* java/lang/Class.h (_Jv_Method): Add "index" field.
	(_Jv_MethodSymbol): New struct type.
	(_Jv_LinkOffsetTable, _Jv_LayoutVTableMethods, _Jv_SetVTableEntries,
	_Jv_MakeVTable): Friends.
	(otable, otable_syms): New Class fields.
	* java/lang/natClass.cc (_Jv_LinkOffsetTable): New function.
	(isVirtualMethod): New static function.
	(_Jv_LayoutVTableMethods): New function.
	(_Jv_SetVTableEntries): New function.
	(_Jv_MakeVTable): New function.

From-SVN: r48038
2001-12-15 08:31:49 +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 bea31ffbcb Fix for PR libgcj/2024, plus other class name cleanups:
* include/jvm.h (_Jv_VerifyFieldSignature,
	_Jv_VerifyMethodSignature, _Jv_VerifyClassName,
	_Jv_VerifyIdentifier, _Jv_ClassNameSamePackage): Moved from ...
	* include/java-interp.h: ... here.
	* defineclass.cc (UTF8_PEEK): No longer conditional on
	interpreter.
	(_Jv_VerifyOne): Likewise.
	(_Jv_VerifyFieldSignature): Likewise.
	(_Jv_VerifyMethodSignature): Likewise.
	(is_identifier_start): Likewise.
	(is_identifier_part): Likewise.
	(_Jv_VerifyIdentifier): Likewise.
	(_Jv_VerifyClassName): Likewise.
	(_Jv_VerifyClassName): Likewise.
	(_Jv_ClassNameSamePackage): Likewise.
	(_Jv_VerifyClassName): Fail if class name is too long.
	* java/lang/natClassLoader.cc (_Jv_NewArrayClass): Disallow array
	of void.
	* java/lang/natClass.cc (forName): Check syntax of class name.
	Include IllegalArgumentException.h.

From-SVN: r47334
2001-11-26 06:40:06 +00:00
Tom Tromey fa88ce26e5 verify.cc (_Jv_BytecodeVerifier::branch_prepass): Use java_opcode as type for switch.
* verify.cc (_Jv_BytecodeVerifier::branch_prepass): Use
	java_opcode as type for switch.
	[op_wide]: Likewise.
	(_Jv_BytecodeVerifier::verify_instructions_0): Likewise.
	[op_invokevirtual]: Likewise.
	* include/java-insns.h (java_opcode): Give enum a name.

From-SVN: r47330
2001-11-25 19:48:19 +00:00
Tom Tromey a12fe13ddb Class.h (Class): Made _Jv_BytecodeVerifier a friend.
* java/lang/Class.h (Class): Made _Jv_BytecodeVerifier a friend.
	* Makefile.in: Rebuilt.
	* Makefile.am (libgcj_la_SOURCES): Added verify.cc.
	* verify.cc: New file.
	* include/java-interp.h (_Jv_count_arguments): Declare.
	(_Jv_VerifyMethod): Likewise.
	(class _Jv_InterpMethod): Made _Jv_BytecodeVerifier a friend.
	(class _Jv_InterpException): Likewise.
	* resolve.cc (_Jv_count_arguments): Renamed from count_arguments.
	No longer static.  Updated callers.
	* defineclass.cc (int_bits_to_float): Removed.
	(long_bits_to_double): Likewise.
	(prepare_pool_entry): Updated.
	(handleCodeAttribute): Verify method (commented out for now).

From-SVN: r46796
2001-11-05 23:39:54 +00:00
Tom Tromey 2bd989ca96 jni.h (struct JNINativeInterface): Returns jsize, not jint.
* include/jni.h (struct JNINativeInterface) [GetStringLength]:
	Returns jsize, not jint.

From-SVN: r46569
2001-10-27 18:24:51 +00:00
Hans Boehm e16ffa0d61 boehm-gc.h: Call thread local allocation functions if THREAD_LOCAL_ALLOC is defined.
* include/boehm-gc.h: Call thread local allocation functions
	if THREAD_LOCAL_ALLOC is defined.

From-SVN: r46490
2001-10-25 17:29:41 +00:00
Bryce McKinlay afb2dec526 prims.cc (_Jv_Abort): Always print error message using fprintf, don't try to allocate.
* prims.cc (_Jv_Abort): Always print error message using fprintf,
        don't try to allocate.
        (_Jv_CreateJavaVM): Set gcj::runTimeInitialized.
        * include/jvm.h (gcj::runTimeInitialized): New variable declaration.
        * java/lang/natClassLoader.cc (_Jv_RegisterClassHookDefault): Handle
        duplicate class registration with JvFail if the runtime hasn't been
        initialized yet.

From-SVN: r46424
2001-10-23 06:42:03 +01:00
Bryce McKinlay 107abb2f61 Eliminate use of C++ static constructors.
* interpret.cc: Remove static Utf8Consts. Use namespace gcj.
	* jni.cc: Likewise.
	* resolve.cc: Likewise.
	* defineclass.cc: Likewise.
	(_Jv_ClassReader::handleClassBegin): Synchronize call to
	_Jv_RegisterClass.
	* include/jvm.h (void_signature, clinit_name, init_name, finit_name):
	Declare in namespace gcj.
	* java/lang/Class.h (Class): Remove initialization for primitive
	types.
	(friend void _Jv_InitPrimClass): This is in prims.cc.
	* prims.cc (_Jv_InitPrimClass): Do primitive type initialization
	here instead.
	(void_signature, clinit_name, init_name, finit_name): Define in
	namespace gcj.
	(_Jv_CreateJavaVM): Call _Jv_InitThreads, _Jv_InitGC, and
	_Jv_InitializeSyncMutex from here. Initialize Utf8 constants.
	Initialize primitive types.
	* java/lang/natClassLoader.cc (_Jv_RegisterClasses): Don't call
	initialization routines. Don't synchronize.
	* java/lang/natRuntime.cc (_load): Synchronize on java.lang.Class
	across dlopen call.

From-SVN: r46282
2001-10-16 09:35:17 +01:00
Hans Boehm 3a8da0244a natObject.cc (heavy_lock): Moved fields old_client_data, old_finalization_proc near beginning.
2001-10-15  Hans Boehm <Hans_Boehm@hp.com>

	* java/lang/natObject.cc (heavy_lock): Moved fields
	old_client_data, old_finalization_proc near beginning.
	(heavy_lock_finalization_proc): Now inline; changed type of
	argument.
	(JV_SYNC_TABLE_SZ): Now 2048.
	(mp): New global.
	(spin): `mp' now global.
	(heavy_lock_obj_finalization_proc): Updated to correctly handle
	heavy lock finalization.
	(remove_all_heavy): New function.
	(maybe_remove_all_heavy): Likewise.
	(_Jv_MonitorEnter): Throw exception if object is NULL.
	(_Jv_MonitorExit): Likewise.  Also, clear long lists of unlocked
	heavy locks.
	* include/jvm.h (_Jv_AllocTraceTwo): Declare.
	* nogc.cc (_Jv_AllocTraceTwo): New function.
	* boehm.cc (trace_two_vtable): New global.
	(_Jv_AllocTraceTwo): New function.

From-SVN: r46271
2001-10-15 22:42:42 +00:00
Tom Tromey eeedeb5a17 natFinalizerThread.cc: New file.
* gnu/gcj/runtime/natFinalizerThread.cc: New file.
	* java/lang/natRuntime.cc: Include FinalizerThread.h.
	(runFinalization): Call finalizerReady.
	* nogc.cc (_Jv_GCInitializeFinalizers): New function.
	* prims.cc: Include VirtualMachineError.h, FinalizerThread.h.
	(_Jv_CreateJavaVM): Start the finalizer thread.
	* no-threads.cc: Include InternalError.h.
	(_Jv_ThreadStart): Throw InternalError.
	(_Jv_ThreadInitData): Don't throw error if this is not the first
	thread.
	* Makefile.in: Rebuilt.
	* Makefile.am (ordinary_java_source_files): Added
	FinalizerThread.java.
	(nat_source_files): Added natFinalizerThread.cc.
	* include/jvm.h (_Jv_GCInitializeFinalizers): Declare.
	* boehm.cc (_Jv_GCInitializeFinalizers): New function.
	* gnu/gcj/runtime/FirstThread.java (run): Start finalizer thread.
	* gnu/gcj/runtime/FinalizerThread.java: New file.

From-SVN: r46163
2001-10-10 22:25:43 +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
Per Bothner 8107bcf9f3 SharedLibLoader.java: New class.
* gnu/gcj/runtime/SharedLibLoader.java:  New class.
	* gnu/gcj/runtime/natSharedLibLoader.cc:  Native methods.
	* Makefile.am:  Update accordingly.
	* configure.in:  Add AC_CHECK_LIB for dlopen.
	* include/config.h.in:  Add HAVE_DLOPEN.

From-SVN: r45885
2001-09-29 12:16:27 -07:00
Richard Henderson f5ddf15465 jvm.h (_Jv_VTable): Handle function descriptors for ia64...
* include/jvm.h (_Jv_VTable): Handle function descriptors for ia64;
        add get_method, set_method, vtable_elt_size, new_vtable.
        (_Jv_ArrayVTable): Derive from _Jv_VTable.
        * resolve.cc (_Jv_PrepareClass): Use new _Jv_VTable methods.
        * interpret.cc (_Jv_InterpMethod::continue1): Likewise.
        * java/lang/natClassLoader.cc (_Jv_NewArrayClass): Likewise.

From-SVN: r45734
2001-09-21 09:59:12 -07:00
Bryce McKinlay 7866a458e2 jvm.h (_Jv_AllocRawObj): New prototype.
* include/jvm.h (_Jv_AllocRawObj): New prototype.
	* boehm.cc (_Jv_AllocRawObj): Implement.
	* nogc.cc (_Jv_AllocRawObj): Likewise.
	* exception.cc (_Jv_Throw): Use _Jv_AllocRawObj, not GC_malloc.

From-SVN: r45497
2001-09-10 02:21:08 +01:00
Anthony Green a11e2c2279 jvm.h: Declare _Jv_RegisterResource.
* include/jvm.h: Declare _Jv_RegisterResource.
        * gnu/gcj/Core.java, gnu/gcj/natCore.cc,
        gnu/gcj/protocol/core/Connection.java,
        gnu/gcj/protocol/core/Handler.java,
        gnu/gcj/protocol/core/CoreInputStream.java,
        gnu/gcj/protocol/core/natCoreInputStream.cc: New files.
        * java/net/URL.java (setURLStreamHandler): Use
        gnu.gcj.protocol.core.Handler for the core protocol.
        * gnu/gcj/runtime/VMClassLoader.java (init): Add "core:/" to the
        end of java.class.path.
        * Makefile.am (ordinary_java_source_files): Add new java files.
        (nat_source_files): Add new native code files.
        * Makefile.in: Rebuilt.

From-SVN: r45450
2001-09-06 22:32:54 +00: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
Rainer Orth 60a78ccfac re PR libgcj/3694 (natPlainDatagramSocketImpl.cc doesn't compile in ALPHA OSF1)
* include/posix.h (_POSIX_PII_SOCKET): Define.
	* configure.in (HAVE_SOCKLEN_T): Define.
	* java/net/natPlainSocketImpl.cc [!HAVE_SOCKLEN_T]: Move socklen_t
	definition up.
	(_JV_accept): New function, avoids Tru64 UNIX accept macro.
	(java::net::PlainSocketImpl::accept): Use it.
	Fixes PRs libgcj/3694, libgcj/3696.

	* configure.in (HAVE_STRUCT_IPV6_MREQ): New test.
	* acconfig.h (HAVE_STRUCT_IPV6_MREQ): Provide template.
	* configure, include/config.h.in: Regenerate.
	* java/net/natPlainDatagramSocketImpl.cc (union McastReq): Use it.
	(mcastGrp): Likewise.
	(java::net::PlainDatagramSocketImpl::setOption): Guard against
	missing IPV6_MULTICAST_IF.
	Fixes PR libgcj/3694.

From-SVN: r44546
2001-08-01 17:53:00 +00:00
Jeff Sturm 092a1f5ab3 configure.host: Enable hash synchronization for alpha*-*.
* configure.host: Enable hash synchronization for alpha*-*.
* include/posix-threads.h (_Jv_ThreadSelf): Added inline function for alpha.
* java/lang/natObject.cc (compare_and_swap, release_set,
compare_and_swap_release): Added inline functions for alpha.

From-SVN: r44251
2001-07-23 03:51:17 +00:00
Tom Tromey 860a15368d For PR java/2812:
* libgcj.spec.in (*lib): Added LIBICONV.
	* configure: Rebuilt.
	* configure.in: Call AM_ICONV.  Don't check for iconv function.
	Add parameters to JV_HASH_SYNCHRONIZATION define.
	* acinclude.m4 (AM_ICONV): New macro, from Bruno Haible.

From-SVN: r44116
2001-07-18 17:06:24 +00:00
Alexandre Petit-Bianco ba75520fff i386-signal.h (HANDLE_DIVIDE_OVERFLOW): Removed unused local `_ebp.'
2001-07-13  Alexandre Petit-Bianco  <apbianco@redhat.com>

	* include/i386-signal.h (HANDLE_DIVIDE_OVERFLOW): Removed unused
	local `_ebp.'

(http://gcc.gnu.org/ml/java-patches/2001-q3/msg00070.html )

From-SVN: r44093
2001-07-17 16:59:07 -07:00
Andrew Haley b8ef6023aa i386-signal.h: Don't do anything with unsigned divide overflow except throw an exception.
2001-07-06  Andrew Haley  <aph@cambridge.redhat.com>

        * include/i386-signal.h: Don't do anything with unsigned divide
        overflow except throw an exception.

From-SVN: r43813
2001-07-06 16:33:10 +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 470042c712 java-interp.h (_Jv_InterpClass): Use JV_MARKOBJ_DECL.
* include/java-interp.h (_Jv_InterpClass): Use JV_MARKOBJ_DECL.
	From Corey Minyard.

From-SVN: r43484
2001-06-21 15:17:21 +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
Anthony Green 6a6a4abb1a Check for sigaction.
From-SVN: r42790
2001-06-02 08:34:33 +00:00
Tom Tromey 70cb702a96 * include/jvm.h (_Jv_ThrowNoMemory): Mark as noreturn.
From-SVN: r42694
2001-05-29 22:18:41 +00:00
Andrew Haley c9bffcd53e i386-signal.h (MAKE_THROW_FRAME): Don't fix up frame pointer...
2001-05-29  Andrew Haley  <aph@redhat.com>

        * include/i386-signal.h (MAKE_THROW_FRAME): Don't fix up frame
        pointer: the dwarf unwinder in libgcc will do everything that's
        needed.
        (HANDLE_DIVIDE_OVERFLOW): Tidy.  Don't mess with stack frames any
        more than we absolutely need to.
        * configure.host (EXCEPTIONSPEC): Remove libgcj_sjlj on Alpha.
        * configure.in (SIGNAL_HANDLER): Use include/dwarf2-signal.h on
        Alpha.
        (SIGNAL_HANDLER): Test "$enable_sjlj_exceptions", not
        "$libgcj_sjlj".
        * configure: Rebuilt.
        * include/dwarf2-signal.h (MAKE_THROW_FRAME): Adjust PC
        for Alpha.
        (SIGNAL_HANDLER): Use siginfo style handler.
        (INIT_SEGV): Likewise.
        (INIT_FPE): Likewise.
        * include/ppc-signal.h: Delete whole file.

From-SVN: r42691
2001-05-29 17:50:50 +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
Andrew Haley 01936f3a7d dwarf2-signal.h: New file.
2001-05-18  Andrew Haley  <aph@cambridge.redhat.com>

        * include/dwarf2-signal.h: New file.
        * configure.in (SYSDEP_SOURCES): Add dwarf2-signal.h for PPC.
        * configure.host (EXCEPTIONSPEC): Don't use sjlj on PPC.
        * configure: Rebuilt.

From-SVN: r42400
2001-05-21 16:59:42 +00:00
Alexandre Petit-Bianco ec54a908e5 posix-threads.h (_Jv_CondInit): `0' used in place of `NULL.'
2001-05-18  Alexandre Petit-Bianco  <apbianco@redhat.com>

        * include/posix-threads.h (_Jv_CondInit): `0' used in place of `NULL.'
        (_Jv_MutexInit): Likewise.

(http://gcc.gnu.org/ml/java-patches/2001-q2/msg00245.html )

From-SVN: r42303
2001-05-18 22:43:00 -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
Zack Weinberg 1f730ff7b6 except.c (choose_personality_routine): Export.
gcc/cp:
	* except.c (choose_personality_routine): Export.  Add
	explanatory comment.  Take an enum languages, not a boolean.
	(initialize_handler_parm): Adjust to match.
	* cp-tree.h: Prototype choose_personality_routine.
	* lex.c (handle_pragma_java_exceptions): New function.
	(init_cp_pragma): Register #pragma GCC java_exceptions.

gcc:
	* extend.texi: Document #pragma GCC java_exceptions.

libjava:
	* Makefile.am (libgcj_la_OBJECTS): Remove libsupc++convenience.la.
	* Makefile.in: Regenerate (by hand).
	* include/jvm.h: Add #pragma GCC java_exceptions at top of file.
	* doc/cni.sgml: Document #pragma GCC java_exceptions.

From-SVN: r42027
2001-05-13 01:28:18 +00:00
Tom Tromey 09efa46f6a jni.h (struct JNINativeInterface): Fixed types in Get/Set*ArrayRegion declarations.
2001-04-27  Martin Kahlert  <martin.kahlert@infineon.com>

	* include/jni.h (struct JNINativeInterface): Fixed types in
	Get/Set*ArrayRegion declarations.
	(class _Jv_JNIEnv): Likewise.

From-SVN: r41633
2001-04-27 16:09:10 +00: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
Bryce McKinlay f404754042 1.3-Compliant Implementation of java.io.File.
* java/lang/natSystem.cc (init_properties): Get "file.separator",
	"path.separator", and "java.io.tmpdir" from the File class, instead
	of setting them explicitly.
	* java/io/File.java: Do not canonicalize paths for security manager
	checks. Call init_native() from static initializer. Do not pass path
	argument to native methods. New native method declarations. Some
	security manager checks moved to checkWrite().
	(equals): Check file system case sensitivity and act appropriatly.
	(hashCode): Likewise.
	(isHidden): New method implemented.
	(performList): Changed prototype. Now takes a class argument specifying
	the class of the returned array: Strings or File objects. Also added
	FileFilter argument.
	(listFiles): New variants with "File" return type implemented.
	(createTempFile): Use createNewFile(). Use maxPathLen.
	(setReadOnly): New method implemented.
	(listRoots): Likewise.
	(compareTo): Likewise.
	(setLastModified): Likewise.
	(checkWrite): New method.
	(setPath): Removed.
	* java/io/natFile.cc: Various functions no longer take canonical path
	argument.
	(stat): Handle ISHIDDEN query.
	(isAbsolute): Remove WIN32 cruft.
	(performList): New arguments. Handle returning either File[] or
	String[] arrays. Check with FileFilter or FilenameFilter arguments as
	appropriate. Use an ArrayList, not a Vector, for the temporary list.
	(performSetReadOnly): New method implemented.
	(performListRoots): Likewise.
	(performSetLastModified): Likewise.
	(performCreate): Likewise.
	(init_native): New initialization function.
	* java/io/natFileWin32.cc: Various functions no longer take canonical
	path argument.
	(stat): Add FIXME about ISHIDDEN query.
	(performList): New arguments. Handle returning either File[] or String[]
	arrays. Check with FileFilter or FilenameFilter arguments as
	appropriate. Use an ArrayList, not a Vector, for the temporary list.
	(performSetReadOnly): New. Stubbed.
	(performListRoots): Likewise.
	(performSetLastModified): Likewise.
	(performCreate): Likewise.
	(init_native) New initialization function.
	* configure.in: Check for utime() and chmod().
	* configure: Rebuilt.
	* include/config.h.in: Rebuilt.

	Resolves PR libgcj/1759.

From-SVN: r40985
2001-04-01 12:16:40 +01:00
Tom Tromey 83c64db681 jni.cc (_Jv_JNI_GetAnyFieldID): Handle unresolved fields.
* jni.cc (_Jv_JNI_GetAnyFieldID): Handle unresolved fields.
	* java/lang/reflect/natField.cc (getType): Use _Jv_ResolveField
	unconditionally.
	* include/jvm.h (_Jv_ResolveField): Declare.
	* include/java-interp.h (_Jv_ResolveField): Don't declare.
	* resolve.cc (_Jv_ResolveField): No longer conditional on
	INTERPRETER.

From-SVN: r40785
2001-03-23 19:15:44 +00: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
Per Bothner f9edddabe7 Change to sometimes include class name in ClassFormatError message.
From-SVN: r40030
2001-02-23 20:15:31 -08:00
Andrew Haley 6472877ae0 i386-signal.h (INIT_SEGV): Use a direct system call to set the handler.
2001-02-14  Andrew Haley  <aph@redhat.com>

        * include/i386-signal.h (INIT_SEGV): Use a direct system call to
        set the handler.

From-SVN: r39724
2001-02-15 19:19:50 +00:00
Andrew Haley cab1f90abf 2001-01-26 Andrew Haley <aph@redhat.com>
(INIT_FPE): Use a direct system call to set the handler.

From-SVN: r39354
2001-01-30 21:00:22 +00:00
Tom Tromey b755792e3c natSystem.cc: Include locale.h if it exists.
* java/lang/natSystem.cc: Include locale.h if it exists.
	* configure: Rebuilt.
	* configure.in: Check for locale.h.

From-SVN: r38957
2001-01-12 19:16:05 +00:00
Bryce McKinlay e301621d19 For boehm-gc:
* configure.in: Rename THREADLIB to THREADLIBS.
	* Makefile.am (LINK): Add $(THREADLIBS) to libtool command line. This
	ensures that we link the correct version of the linuxthreads semaphore
	functions.
	* Makefile.in: Rebuilt.
	* configure: Rebuilt.

	* linux_thread.c (GC_thr_init, GC_suspend_handler): Add SIGABRT to the
	list of signals which are not blocked during suspend in the NO_SIGNALS
	case.

For libjava:
	* Makefile.am (libgcj_la_LIBADD): Add $(THREADLIBS). This ensures that
	the correct versions of various linuxthreads functions get linked.
	* Makefile.in: Rebuilt.
	* java/lang/natThread.cc (finalize_native): New static function. Call
	_Jv_ThreadDestroyData.
	(initialize_native): Register finalizer for "data".
	* include/posix-threads.h (_Jv_ThreadInitData): New simpler prototype.
	(_Jv_ThreadDestroyData): New prototype.
	* include/win32-threads.h: Ditto.
	* include/no-threads.h: Ditto.
	* posix-threads.cc (_Jv_ThreadInitData): Implement new prototype.
	(_Jv_ThreadDestroyData): New function. Free native thread "data" and
	move mutex and condition variable destroy code from:
	(really_start): ...here.
	(_Jv_ThreadStart): Set PTHREAD_CREATE_DETACHED.
	* win32-threads.cc (_Jv_ThreadInitData): Implement new prototype.
	(_Jv_ThreadDestroyData): Implemented.
	* nogc.cc (_Jv_AllocObject): Use "void *" not "ptr_t".
	(_Jv_AllocArray): Ditto.

From-SVN: r38557
2000-12-30 12:18:39 +00:00
Bryce McKinlay 5662d5333a natSystem.cc (init_properties): Set user.language and user.region.
2000-11-29  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/lang/natSystem.cc (init_properties): Set user.language and
	user.region.
	* configure.in: Check for setlocale.
	* configure: Rebuilt.
	* include/config.h.in: Rebuilt.

From-SVN: r37842
2000-11-29 04:53:37 +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
Bryce McKinlay 6a3bad7d98 re GNATS libgcj/341 (Throwable.printStackTrace() isn't working)
2000-10-09  Bryce McKinlay  <bryce@albatross.co.nz>

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

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

From-SVN: r36794
2000-10-09 02:54:50 +01:00
Tom Tromey 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
Hans Boehm bf3b8e42e2 Implement bitmap descriptor based marking for Boehm GC.
2000-09-30  Hans Boehm  <boehm@acm.org>
	    Bryce McKinlay  <bryce@albatross.co.nz>

	Implement bitmap descriptor based marking for Boehm GC.

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

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

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

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

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

From-SVN: r36215
2000-09-06 22:25:56 +00:00
Tom Tromey 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