Commit Graph

179 Commits

Author SHA1 Message Date
Tom Tromey af84b3d056 VMCompiler.java (compileClass): Ignore UnknownError.
* java/lang/VMCompiler.java (compileClass): Ignore UnknownError.
	* gnu/gcj/runtime/natSharedLibLoader.cc (finalize): Only dlclose
	if 'handler' is valid.

From-SVN: r93927
2005-01-19 23:56:27 +00:00
Tom Tromey 3fd8010046 PR libgcj/12016, PR libgcj/18405, PR libgcj/17738:
* java/lang/Package.java (getPackages): Use VMClassLoader when
	appropriate.
	(getPackage): Likewise.
	* prims.cc (_Jv_CreateJavaVM): Call
	_Jv_RegisterBootstrapPackages.
	* include/jvm.h (_Jv_RegisterBootstrapPackages): Declare.
	* java/lang/VMClassLoader.java (getPackage): Rewrote.
	(getPackages): Likewise.
	(definedPackages): New field.
	(definePackageForNative): New method.
	* java/lang/Class.h (_Jv_FindClassInCache): Updated.
	* java/lang/natVMClassLoader.cc (loadClass): Updated.
	* defineclass.cc (handleClassBegin): Use
	ClassLoader.findLoadedClass.
	* java/lang/natClassLoader.cc (_Jv_RegisterInitiatingLoader):
	Rewrote.
	(struct _Jv_LoaderInfo): Removed.
	(initiated_classes): Likewise.
	(_Jv_UnregisterClass): Don't use initiated_classes.
	(_Jv_FindClassInCache): Likewise.  Removed 'loader' argument.
	(_Jv_FindClass): Register classes found during boostrap.
	(BOOTSTRAP_CLASS_LIST_SIZE): New define.
	(bootstrap_class_list): New global.
	(bootstrap_index): Likewise.
	(_Jv_RegisterBootstrapPackages): New function.
	* gnu/gcj/runtime/natVMClassLoader.cc (findClass): Call
	definePackageForNative.
	(findClass): Updated.
	* gnu/gcj/runtime/VMClassLoader.java (definePackageForNative):
	New method.

From-SVN: r93155
2005-01-10 19:39:26 +00:00
Tom Tromey 693ac16709 Main.java (main): Mention gcj-dbtool.
* gnu/gcj/tools/gcj_dbtool/Main.java (main): Mention gcj-dbtool.
	Recognize --help and --version.
	(usage): Mention gcj-dbtool.  Added "out" argument.
	(insist): Updated.

From-SVN: r91491
2004-11-29 22:26:00 +00:00
Tom Tromey 7cb21c1c12 natDebug.cc (getField): Don't qualify name.
* gnu/gcj/util/natDebug.cc (getField): Don't qualify name.
	* java/lang/Class.h (_Jv_Linker): Declare.
	(Class): Fix names of friends.
	(_Jv_getInterfaceMethod): Declare.

From-SVN: r91320
2004-11-26 02:27:54 +00:00
Andrew Haley fbd8fb2d03 Add missing file from gcj-abi-2-dev-branch merge
From-SVN: r91285
2004-11-25 11:54:53 +00:00
Andrew Haley e0966a17a3 Add missing file from gcj-abi-2-dev-branch merge.
From-SVN: r91284
2004-11-25 11:50:45 +00:00
Tom Tromey 367390404d * Merged gcj-abi-2-dev-branch to trunk.
(Actual changes too large to list in the commit message;
see ChangeLog.)

From-SVN: r91270
2004-11-25 03:47:08 +00:00
David Daney 86ce0e3d22 Output_UnicodeLittleUnmarked.java: New file.
2004-10-28  David Daney  <ddaney@avtrex.com>

	* gnu/gcj/convert/Output_UnicodeLittleUnmarked.java: New file.
	* Makefile.am: Build it.
	* Makefile.in: Regenerate.

From-SVN: r89763
2004-10-28 15:22:44 +00:00
Andrew Haley 963ebe78d4 re PR libgcj/18036 (Bad interaction between interpreter and Class.forName())
2004-10-18  Andrew Haley  <aph@redhat.com>

        PR java/18036:
        * gnu/gcj/runtime/natStackTrace.cc (fillInStackTrace): Reorganize
        and correct logic used to find interpreter.

From-SVN: r89221
2004-10-18 14:07:42 +00:00
Andrew Haley 180a373d0d interpret.cc (_Jv_InterpMethod::run): Initialize _Jv_StartOfInterpreter.
2004-10-13  Andrew Haley  <aph@redhat.com>

        * interpret.cc (_Jv_InterpMethod::run): Initialize
        _Jv_StartOfInterpreter.
        (_Jv_StartOfInterpreter, _Jv_EndOfInterpreter): Functions removed.
        (_Jv_StartOfInterpreter, _Jv_EndOfInterpreter): New variables.
        * gnu/gcj/runtime/natStackTrace.cc (fillInStackTrace): Use
        _Unwind_FindEnclosingFunction to discover whether PC is within the
        interpreter.

From-SVN: r89037
2004-10-14 15:21:13 +00:00
Scott Gilbertson 717b209147 XCanvasPeer.java (createImage): Implement.
2004-07-12  Scott Gilbertson  <scottg@mantatest.com>

	* gnu/awt/xlib/XCanvasPeer.java (createImage): Implement.
	* gnu/awt/xlib/XOffScreenImage.java
	  (XOffScreenImage): Add ImageConsumer interface. Add ColorModel
	  constructor argument. Add constructor using ImageProducer.
	  (getSource): Implement.
	  (imageComplete): New method.
	  (setColorModel): New method.
	  (setDimensions): New method.
	  (setHints): New method.
	  (setPixels): New method.
	  (setProperties): New method.
	* gnu/gcj/xlib/GC.java (drawPoint): New native method.
	* gnu/gcj/xlib/natGC.cc (drawPoint): New native method.

From-SVN: r84564
2004-07-12 16:26:07 +00:00
Bryce McKinlay 31a7b75558 re PR awt/16748 (IAA.ImageComponentsTest: Freezes When Window Is Resized)
2004-07-11  Bryce McKinlay  <mckinlay@redhat.com>

	PR libgcj/16748
	* prims.cc (_Jv_CreateJavaVM): Fix comment.
	* gnu/gcj/runtime/FinalizerThread.java (init): New. Native.
	(finalizerReady): Now native.
	(run): Likewise.
	(runFinalizers): Removed.
	* gnu/gcj/runtime/natFinalizerThread.cc (run): Implement here. Use
	a primitive lock, and don't hold it while running the finalizers.
	(runFinalizers): Implement. Don't aquire any Java lock.
	(finalizerReady): Use lock primitives to signal finalizer thread.

From-SVN: r84531
2004-07-11 22:19:47 +01: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
Bryce McKinlay a1433c46a1 VMClassLoader.java (init): Check classpath entry before passing to URL constructor.
2004-07-05  Bryce McKinlay  <mckinlay@redhat.com>

	* gnu/gcj/runtime/VMClassLoader.java (init): Check classpath entry
	before passing to URL constructor. Rethrow any MalformedURLException
	as a RuntimeException. Catch MalformedURLException specifically, not
	all exceptions.

From-SVN: r84138
2004-07-06 00:18:14 +01:00
Michael Koch 74fa958ec7 FirstThread.java, [...]: Removed.
2004-07-04  Michael Koch  <konqueror@gmx.de>

	* gnu/gcj/runtime/FirstThread.java,
	gnu/gcj/runtime/natFirstThread.cc: Removed.
	* gnu/java/lang/MainThread.java,
	gnu/java/lang/natMainThread.cc: New files.
	* prims.cc (_Jv_RunMain): Use MainThread instead of FirstThread.
	* Makefile.am: Added new files and removed deleted ones.
	* Makefile.in: Regenerated.

From-SVN: r84085
2004-07-04 15:27:05 +00:00
Bryce McKinlay eb8163abfb BytesToUnicode.java (getDecoder): Pass original encoding name to iconv.
* gnu/gcj/convert/BytesToUnicode.java (getDecoder): Pass original
	encoding name to iconv.
	* gnu/gcj/convert/UnicodeToBytes.java (getEncoder): Likewise.

From-SVN: r83512
2004-06-22 20:24:32 +01:00
Bryce McKinlay f50aa5059a re PR libgcj/16134 (Memory leak in String.getBytes())
PR libgcj/16134:
	* gnu/gcj/convert/BytesToUnicode.java: Canonicalize encoding name
	before cache lookup. Thanks to Hannes Wallnoefer.
	* gnu/gcj/convert/UnicodeToBytes.java: Likewise.

From-SVN: r83501
2004-06-22 18:21:23 +01:00
Ranjit Mathew 6ca77e6fa4 VMClassLoader.java (init): Add extensions directory only if it actually exists.
* gnu/gcj/runtime/VMClassLoader.java (init): Add extensions
        directory only if it actually exists.

From-SVN: r83347
2004-06-18 13:53:19 +00:00
Anthony Green 794c3bee30 Add extension directory contents to the class path.
From-SVN: r83291
2004-06-17 13:30:32 +00:00
Bryce McKinlay ca60dce284 gcj.texi (Object allocation): Remove _Jv_AllocBytes.
* gcj.texi (Object allocation): Remove _Jv_AllocBytes.
	(Mixing with C++): Document JvAllocBytes and RawDataManaged.

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

From-SVN: r82372
2004-05-28 19:53:06 +01:00
Bryce McKinlay 245c3c04af prims.cc (_Jv_AllocObject): Remove `size' argument.
libjava:
2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>

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

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

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

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

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

From-SVN: r80754
2004-04-16 17:27:19 +01:00
Ranjit Mathew 84264cb69e VMThrowable.java (getStackTrace): Pass trace as-is to modified lookup().
* java/lang/VMThrowable.java (getStackTrace): Pass trace as-is to
	modified lookup().
	* gnu/gcj/runtime/NameFinder.java (lookup): Change to take in a
	StackTraceElement directly.
	(newElement): New native helper method to create StackTraceElement
	bypassing Java access control.
	(createStackTraceElement): Use newElement() instead of directly
	calling StackTraceElement's constructor.
	* gnu/gcj/runtime/natNameFinder.cc (newElement): New method.

From-SVN: r80541
2004-04-09 04:39:24 +00:00
Per Bothner 0fca95f56f Input_UnicodeBig.java: New class..
* gnu/gcj/convert/Input_UnicodeBig.java:  New class..
	* gnu/gcj/convert/Input_UnicodeLittle.java:  New class.
	* Makefile.am:  Update accordingly.
	* gnu/gcj/convert/IOConverter.java:  Define "utf-16le" and "utf16be"
	as aliases for UnicodeLittle and UnicodeBig.

From-SVN: r79723
2004-03-19 16:24:49 -08:00
Michael Koch c6a6237687 2004-02-20 Michael Koch <konqueror@gmx.de>
* gnu/gcj/convert/Convert.java
	(main): Use equals() to compare strings.

From-SVN: r78174
2004-02-20 17:02:35 +00:00
Nathan Bryant 092b50e2d7 re PR libgcj/12001 (_Jv_FindClass dumps core when Oracle's classes12.zip in $CLASSPATH)
PR libgcj/12001:
	* gnu/gcj/runtime/VMClassLoader.java (VMClassLoader): Pass empty
	array to superclass.
	(init): Changed interface; add URLs here.
	(initialize): New static method.
	* prims.cc (_Jv_CreateJavaVM): Initialize ClassLoader here...
	(_Jv_RunMain): ... not here.

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

From-SVN: r75889
2004-01-14 22:49:58 +00:00
Scott Gilbertson b3e4bb0347 GC.java (updateClip): Added rectangles argument.
2003-12-05  Scott Gilbertson  <scottg@mantatest.com>

	* gnu/gcj/xlib/GC.java (updateClip): Added rectangles argument.
	(clip): Removed field
	(clipRectangles): New field.
	(clone): Use new updateClip.
	(setClipRectangles): Use new updateClip.
	* gnu/gcj/xlib/natGC.cc (updateClip): Prepare passed rectangles.

From-SVN: r74348
2003-12-05 22:10:16 +00:00
Tom Tromey b86ca9a2dc jni.cc (_Jv_JNI_GetStringUTFChars): Pass length of string to JvGetStringUTFRegion.
* jni.cc (_Jv_JNI_GetStringUTFChars): Pass length of string to
	JvGetStringUTFRegion.
	* java/lang/natPosixProcess.cc (new_string): Pass length of string
	to JvGetStringUTFRegion.
	* java/lang/natDouble.cc (parseDouble): Pass length of string to
	JvGetStringUTFRegion.
	* java/lang/natWin32Process.cc (startProcess): Pass length of
	string to JvGetStringUTFRegion.
	* java/lang/natClass.cc (forName): Pass length of string to
	JvGetStringUTFRegion.
	* gnu/gcj/runtime/natNameFinder.cc (getExternalLabel): Pass length
	of string to JvGetStringUTFRegion.
	* gnu/gcj/convert/natIconv.cc (init): Pass length of string to
	JvGetStringUTFRegion.
	* gnu/awt/gtk/natGtkLabelPeer.cc (setText): Pass length of string
	to JvGetStringUTFRegion.
	* gnu/awt/gtk/natGtkButtonPeer.cc (setLabel): Pass length of
	string to JvGetStringUTFRegion.

From-SVN: r73571
2003-11-14 01:48:30 +00:00
Jeff Sturm edf6d50b51 FirstThread.java (Klocale, Kcalendar): New fields.
* gnu/gcj/runtime/FirstThread.java (Klocale, Kcalendar):
New fields.

From-SVN: r73360
2003-11-08 13:43:12 +00:00
Bryce McKinlay 9b574a7758 * gnu/gcj/xlib/XAnyEvent.java (XAnyEvent): Make constructor public.
From-SVN: r73351
2003-11-08 01:23:47 +00:00
Tom Tromey 4badbfa2b3 re PR libgcj/12656 (Inherited main( ) Method Not Seen At Runtime)
PR libgcj/12656:
	* gnu/gcj/runtime/natFirstThread.cc (call_main): Use
	_Jv_LookupDeclaredMethod, not _Jv_GetMethodLocal.

From-SVN: r72811
2003-10-22 18:05:57 +00:00
Michael Koch 85aa13b287 Connection.java, [...]: Moved to gnu/java/net/protocol.
2003-10-08  Michael Koch  <konqueror@gmx.de>

	* gnu/gcj/protocol/core/Connection.java,
	gnu/gcj/protocol/core/CoreInputStream.java,
	gnu/gcj/protocol/core/Handler.java,
	gnu/gcj/protocol/core/natCoreInputStream.cc,
	gnu/gcj/protocol/file/Connection.java,
	gnu/gcj/protocol/file/Handler.java,
	gnu/gcj/protocol/gcjlib/Connection.java,
	gnu/gcj/protocol/gcjlib/Handler.java,
	gnu/gcj/protocol/http/Connection.java,
	gnu/gcj/protocol/http/Handler.java,
	gnu/gcj/protocol/jar/Connection.java,
	gnu/gcj/protocol/jar/Handler.java: Moved to gnu/java/net/protocol.
	* gnu/java/net/protocol/core/Connection.java,
	gnu/java/net/protocol/core/CoreInputStream.java,
	gnu/java/net/protocol/core/Handler.java,
	gnu/java/net/protocol/core/natCoreInputStream.cc,
	gnu/java/net/protocol/file/Connection.java,
	gnu/java/net/protocol/file/Handler.java,
	gnu/java/net/protocol/gcjlib/Connection.java,
	gnu/java/net/protocol/gcjlib/Handler.java,
	gnu/java/net/protocol/http/Connection.java,
	gnu/java/net/protocol/http/Handler.java,
	gnu/java/net/protocol/jar/Connection.java,
	gnu/java/net/protocol/jar/Handler.java: Moved from gnu/gcj/protocol.
	* gnu/gcj/runtime/FirstThread.java,
	java/net/URL.java: Use moved protocol handlers.
	* Makefile.am
	(ordinary_java_source_files): Moved files.
	(nat_source_files): Likewise.
	* Makefile.in: Regenerated.

From-SVN: r72233
2003-10-08 16:28:30 +00:00
Bryce McKinlay fddb33d2cd re PR libgcj/12475 (Stack traces leak memory)
Fix PR libgcj/12475
	* gnu/gcj/runtime/StackTrace.java (finalize): Declare.
	* gnu/gcj/runtime/natStackTrace.cc (finalize): New. Free "addrs".

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

From-SVN: r71765
2003-09-25 07:46:19 +00:00
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 81f7282f97 Makefile.am: added gnu/awt/xlib/XOffScreenImage.java.
* Makefile.am: added gnu/awt/xlib/XOffScreenImage.java.
	* Makefile.in: re-generated.
	* gnu/awt/j2d/IntegerGraphicsState.java
	(ScreenCoupledImage): new interface.
	(drawImage): detect ScreenCoupledImage instances.
	* gnu/awt/xlib/XCanvasPeer.java (createImage) implemented.
	* gnu/awt/xlib/XEventLoop.java
	(createEvent): re-formatted, and rearranged to avoid null pointer.
	* gnu/awt/xlib/XGraphics.java
	(drawImage): added XOffScreenImage handling.
	* gnu/awt/xlib/XOffScreenImage.java: new file.
	* gnu/gcj/xlib/Drawable.java (getDepth): new native method.
	* gnu/gcj/xlib/GC.java (copyArea): new native method.
	* gnu/gcj/xlib/XAnyEvent.java
	(TYPE_KEY_PRESS): new constant.
	(TYPE_KEY_RELEASE): new constant.
	(TYPE_MOTION_NOTIFY): new constant.
	(TYPE_ENTER_NOTIFY): new constant.
	(TYPE_LEAVE_NOTIFY): new constant.
	(TYPE_FOCUS_IN): new constant.
	(TYPE_FOCUS_OUT): new constant.
	(TYPE_KEYMAP_NOTIFY): new constant.
	(TYPE_GRAPHICS_EXPOSE): new constant.
	(TYPE_NO_EXPOSE): new constant.
	(TYPE_VISIBILITY_NOTIFY): new constant.
	(TYPE_CREATE_NOTIFY): new constant.
	(TYPE_DESTROY_NOTIFY): new constant.
	(TYPE_MAP_REQUEST): new constant.
	(TYPE_CONFIGURE_REQUEST): new constant.
	(TYPE_GRAVITY_NOTIFY): new constant.
	(TYPE_RESIZE_REQUEST): new constant.
	(TYPE_CIRCULATE_NOTIFY): new constant.
	(TYPE_CIRCULATE_REQUEST): new constant.
	(TYPE_PROPERTY_NOTIFY): new constant.
	(TYPE_SELECTION_CLEAR): new constant.
	(TYPE_SELECTION_REQUEST): new constant.
	(TYPE_SELECTION_NOTIFY): new constant.
	(TYPE_COLORMAP_NOTIFY): new constant.
	(TYPE_MAPPING_NOTIFY): new constant.
	* gnu/gcj/xlib/natDrawable.cc (getDepth): new method.
	* gnu/gcj/xlib/natGC.cc (copyArea): new method
	* java/awt/Component.java (createImage): changed to use peer method.

From-SVN: r70776
2003-08-25 19:02:29 +00:00
Andrew Haley f2f3f409f6 [multiple changes]
2003-01-31  Andrew Haley  <aph@redhat.com>

	* except.c (prepare_eh_table_type): Use new encoding for exception
	handlers when using -fno-assume-compiled.

2003-08-20  Andrew Haley  <aph@redhat.com>

	* gnu/gcj/runtime/StackTrace.java (getClass): New method.
	* gnu/gcj/runtime/natStackTrace.cc (getClass): New method.
	(classAt): Break out class lookup function into getClass().
	* exception.cc (PERSONALITY_FUNCTION): Use new encoding for exception
	handlers when using -fno-assume-compiled.

From-SVN: r70605
2003-08-20 17:27:56 +00:00
Tom Tromey 3f1923dcc1 re PR libgcj/9125 (VMClassLoader should cache the result of Runtime.(internal)loadLibrary())
Fix for PR libgcj/9125:
	* gnu/gcj/runtime/natVMClassLoader.cc (findClass): Find Runtime
	object outside of loop.  Respect lib_control setting.
	* gnu/gcj/runtime/VMClassLoader.java (tried_libraries): New
	field.
	(lib_control): New field.
	(LIB_FULL, LIB_CACHE, LIB_NEVER): New constants.
	(VMClassLoader): Initialize new field.

From-SVN: r70600
2003-08-20 15:32:23 +00:00
Tom Tromey b33ab7a9b0 natIconv.cc (write): Handle case where output buffer is too small.
* gnu/gcj/convert/natIconv.cc (write): Handle case where
	output buffer is too small.

From-SVN: r69927
2003-07-29 16:38:48 +00:00
Anthony Green 49e58846cf AbstractGraphicsState.java (clone): Handle CloneNotSupportedException.
2003-07-20  Anthony Green  <green@redhat.com>

	* gnu/awt/j2d/AbstractGraphicsState.java (clone): Handle
	CloneNotSupportedException.
	* gnu/gcj/xlib/WindowAttributes.java (clone): Ditto.
	* gnu/gcj/xlib/WMSizeHints.java (clone): Ditto.
	* gnu/gcj/xlib/GC.java (clone): Ditto.
	* gnu/awt/xlib/XGraphics.java (clone): Ditto.
	* gnu/awt/j2d/Graphics2DImpl.java (clone): Ditto.

	* gnu/awt/xlib/XEventLoop.java (postNextEvent): Remove unreachable
	handler.
	* gnu/gcj/runtime/NameFinder.java (NameFinder): Ditto.

From-SVN: r69623
2003-07-21 02:24:09 +00:00
Steve Pribyl 8ec880749f natSharedLibLoader.cc (init): `libname' now a String.
2003-07-20  Steve Pribyl <steve@netfuel.com.>

	* gnu/gcj/runtime/natSharedLibLoader.cc (init): `libname' now a
	String.  Put dlerror() message into exception.
	Include UnsatisfiedLinkError.
	* gnu/gcj/runtime/SharedLibLoader.java (init): `libname' now a
	String.  Now native.

From-SVN: r69622
2003-07-21 02:09:47 +00:00
Matt Kraai d3276d3574 SharedLibLoader.java: Fix misspelling.
2003-07-11  Matt Kraai  <kraii@alumni.cmu.edu>

	* gnu/gcj/runtime/SharedLibLoader.java: Fix misspelling.
	* gnu/gcj/runtime/natSharedLibLoader.cc: Likewise.
	* java/awt/im/InputContext.java: Remove a redundant
	partial line.

From-SVN: r69238
2003-07-11 18:27:54 +00:00
Michael Koch 3d8daef2cd 2003-07-01 Michael Koch <konqueror@gmx.de>
* gnu/gcj/convert/natIconv.cc
	(iconv_init): Fixed possible memory leak by releasing allocated iconv
	handle.

From-SVN: r68774
2003-07-01 14:42:38 +00:00
Scott Gilbertson a28853b01b IntegerGraphicsState.java (drawOval): implemented.
2003-06-11  Scott Gilbertson  <scottg@mantatest.com>

	* gnu/awt/j2d/IntegerGraphicsState.java (drawOval): implemented.
	(fillOval): implemented
	* gnu/awt/xlib/XGraphics.java (drawArc): implemented.
	(fillArc): implemented.
	* gnu/gcj/xlib/GC.java (drawArc): added native method.
	(fillArc): added native method.
	* gnu/gcj/xlib/natGC.cc (drawArc): added native method.
	(fillArc): added native method.

From-SVN: r67810
2003-06-12 03:08:58 +00:00
Tom Tromey 4982b6384a natFont.cc (getAscent): Correctly access "ascent" field.
* gnu/gcj/xlib/natFont.cc (getAscent): Correctly access "ascent"
	field.
	(getDescent): Likewise, for "descent".

From-SVN: r67695
2003-06-10 02:45:07 +00:00
Scott Gilbertson 0940ed88c4 natFont.cc (getMaxAscent): adjusted return value.
2003-06-09  Scott Gilbertson  <scottg@mantatest.com>

	* gnu/gcj/xlib/natFont.cc (getMaxAscent): adjusted return value.
	(getMaxDescent): adjusted return value.
	(getAscent): modified to use metrics for 'O'.
	(getDescent): modified to use metrics for 'y'.

From-SVN: r67692
2003-06-10 01:50:12 +00:00
Anthony Green a8a8de4875 URLStreamHandler.java (sameFile): Fix port value comparison.
2003-06-08  Anthony Green  <green@redhat.com>

        * java/net/URLStreamHandler.java (sameFile): Fix port value
        comparison.
        * java/net/URL.java (handler): Make package private.
        * gnu/gcj/protocol/http/Handler.java (getDefaultPort): New method.

From-SVN: r67640
2003-06-08 22:07:48 +00:00
Mark Wielaard 60e9f0d726 re PR libgcj/8738 (java.io.CharArrayWriter's write methods erroneously throw IOExceptions)
2002-06-06  James Clark  <jjc@jclark.com>

       Fix for PR libgcj/8738:
       * gnu/gcj/convert/UnicodeToBytes.java (havePendingBytes): New method.
       * gnu/gcj/convert/Output_SJIS.java (havePendingBytes): Likewise.
       * gnu/gcj/convert/Output_EUCJIS.java (havePendingBytes): Likewise.
       * gnu/gcj/convert/Output_UTF8.java (havePendingBytes): Likewise.
       (write): Always decrease avail when count is increased.
       * java/lang/natString.cc (getBytes): Check converter havePendingBytes()
       and whether output buffer is full before increasing size.

2002-06-06  Mark Wielaard  <mark@klomp dot org>

       * java/io/PrintStream.java (writeChars(char[],int, int)):
       Check converter.havePendingBytes().
       (writeChars(String,int,int)): Likewise.
       * java/io/OutputStreamWriter.java (writeChars(char[], int, int)):
       Check converter.havePendingBytes() and flush buffer when stalled.

From-SVN: r67595
2003-06-07 18:35:00 +00:00
Scott Gilbertson 146b867529 natGC.cc (drawString): Removed obsolete code.
2003-05-08  Scott Gilbertson  <scottg@mantatest.com>

	* gnu/gcj/xlib/natGC.cc (drawString): Removed obsolete code.

From-SVN: r66608
2003-05-08 18:51:51 +00:00
Scott Gilbertson 9e9e204234 XGraphics.java (XGraphics): Use new GC.create.
2003-04-19  Scott Gilbertson  <scottg@mantatest.com>

	* gnu/awt/xlib/XGraphics.java (XGraphics): Use new GC.create.
	(dispose): Null metrics.
	* gnu/awt/xlib/XToolkit.java (sync): Implement.
	* gnu/gcj/xlib/Clip.java (dispose): Change name of native from
	finalize.
	(finalize): Call dispose.
	* gnu/gcj/xlib/Drawable.java (gcCache): New field.
	(gcCachedCount): New field.
	(finalize): New method.
	(putGCInCache): New method.
	(getGCFromCache): New method.
	* gnu/gcj/xlib/GC.java (GC): Make protected.
	(clone): Get new GC from cache if possible.
	(create): New static method.
	(dispose): Save old GC in cache.
	* gnu/gcj/xlib/natClip.cc (dispose): Check for null before
	deleting.
	* gnu/gcj/xlib/natGC.cc (initStructure): Call XCreateGC only if gc
	is null.
	* gnu/gcj/xlib/Pixmap.java (Pixmap): Use new GC.create.
	* java/awt/Container.java (visitChild): Dispose gfx2 when
	finished.

From-SVN: r65827
2003-04-19 19:54:39 +00:00