Commit Graph

162 Commits

Author SHA1 Message Date
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