Commit Graph

637 Commits

Author SHA1 Message Date
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 25a42e445e * java/lang/ClassLoader.java (findClass): Fixed documentation.
From-SVN: r93069
2005-01-07 22:15:46 +00:00
Tom Tromey 7385c78009 natRuntime.cc (insertSystemProperties): Set java.ext.dirs earlier.
* java/lang/natRuntime.cc (insertSystemProperties): Set
	java.ext.dirs earlier.

From-SVN: r92964
2005-01-05 18:55:27 +00:00
Eric Botcazou ec24eb4ebb natObject.cc (_Jv_ObjectCheckMonitor): Initialize the sync_info element of the object if needed.
* java/lang/natObject.cc (_Jv_ObjectCheckMonitor): Initialize the
	sync_info element of the object if needed.

From-SVN: r92922
2005-01-05 05:09:09 +00:00
Tom Tromey f5b25f8cca natClassLoader.cc (_Jv_RegisterClassHookDefault): Re-enable duplicate class registration error.
* java/lang/natClassLoader.cc (_Jv_RegisterClassHookDefault):
	Re-enable duplicate class registration error.

From-SVN: r92447
2004-12-21 01:03:55 +00:00
Andrew Haley 64d200483a re PR libgcj/15001 ([3.4 only] Using JNI with interpreter and interface methods yields SIGSEGV)
2004-12-10  Andrew Haley  <aph@redhat.com>

        PR java/15001
        * java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Look up
        abstract methods by name.

From-SVN: r92315
2004-12-17 15:13:44 +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
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
Michael Koch 58e594dca9 Character.java, [...]: Reorder "final static" to "static final".
2004-11-24  Michael Koch  <konqueror@gmx.de>

	* java/lang/Character.java, scripts/unicode-blocks.pl:
	Reorder "final static" to "static final".

From-SVN: r91153
2004-11-24 13:33:01 +00:00
Michael Koch f8af9e2861 String.java (rehash): Removed.
2004-11-23  Michael Koch  <konqueror@gmx.de>

	* java/lang/String.java (rehash): Removed.
	* java/lang/natString.cc (rehash): Made static.
	(_Jv_NewStringUtf8Const): Use static rehash method.

From-SVN: r91104
2004-11-23 21:33:01 +00:00
Jeroen Frijters a734981608 StackTraceElement.java: Made final.
2004-11-18  Jeroen Frijters  <address@bogus.example.com>

	* java/lang/StackTraceElement.java: Made final.
	* java/nio/channels/Channels.java: Added private constructor.
	* java/rmi/Naming.java: Added private constructor.
	* java/rmi/registry/LocateRegistry.java: Added private constructor.
	* java/rmi/server/RMIClassLoader.java: Added private constructor.
	* java/security/KeyPairGeneratorSpi.java
	(clone): Made protected and simplified implementation.
	* java/text/DateFormat.java
	(allFields): Made package accessible.
	* java/text/DecimalFormat.java
	(formatInternal): Made private.
	* java/text/Format.java
	(formatInternal): Made private.
	* java/util/logging/Handler.java: Made constructor protected.
	* java/util/regex/Matcher.java: Made final.
	* java/util/regex/Pattern.java: Made final.
	* javax/crypto/CipherInputStream.java
	(mark): Corrected mark parameter type (from long to int).
	* javax/crypto/ExemptionMechanism.java
	(finalize): Added.
	* javax/crypto/Mac.java
	(getMacLength): Made final.
	(clone): Made final.
	* javax/imageio/ImageIO.java: Added private constructor.
	* javax/imageio/stream/ImageInputStreamImpl.java
	(checkClosed): Made final.
	* javax/net/ssl/SSLPermission.java: Made final.
	* javax/print/DocFlavor.java
	(hostEncoding): Added work-around to prevent the field from being
	a compile time constant.
	* javax/print/attribute/AttributeSetUtilities.java: Added private
	constructor.
	(UnmodifiableDocAttributeSet): Made private.
	(UnmodifiablePrintJobAttributeSet): Made private.
	(UnmodifiablePrintRequestAttributeSet): Made private.
	(UnmodifiablePrintServiceAttributeSet): Made private.
	(SynchronizedAttributeSet): Made private.
	(SynchronizedDocAttributeSet): Made private.
	(SynchronizedPrintJobAttributeSet): Made private.
	(SynchronizedPrintRequestAttributeSet): Made private.
	(SynchronizedPrintServiceAttributeSet): Made private.
	* javax/security/auth/PrivateCredentialPermission.java: Made final.

From-SVN: r90866
2004-11-18 15:26:45 +00:00
Kriang Lerdsuwanakij 21a0c6e02e Makefile.am: Correct friend function declaration.
* Makefile.am: Correct friend function declaration.
	* Makefile.in: Regenerated.
	* include/boehm-gc.h (JV_MARKOBJ_DECL, JV_MARKARRAY_DECL): Add
	scope to function names.  Declare functions directly.
	* libjava/java/lang/Class.h
	(java::lang::Class): Correct friend class declaration.
	(_Jv_InitClass, _Jv_GetArrayClass): Move definition to global
	scope.
	* libjava/java/lang/Class.h
	(java::lang::Object): Correct friend class declaration.

From-SVN: r90849
2004-11-18 05:37:13 +00:00
Michael Koch 0b43493272 Object.java: Added javadocs all over (merged from GNU classpath).
2004-11-16  Michael Koch  <konqueror@gmx.de>

	* java/lang/Object.java: Added javadocs all over (merged from GNU
	classpath).

From-SVN: r90766
2004-11-16 21:37:29 +00:00
Mark Wielaard d060a30bf8 [multiple changes]
2004-11-07  Michael Koch  <konqueror@gmx.de>

       * java/lang/Process.java:
       Import cleanups.

2004-11-07  Jeroen Frijters  <jeroen@frijters.net>

       * java/util/zip/ZipEntry.java
       (KNOWN_SIZE, KNOWN_CSIZE, KNOWN_CRC, KNOWN_TIME): Made final.

From-SVN: r90231
2004-11-07 13:05:53 +00:00
Michael Koch c2e999dfeb StringBuffer.java, [...]: Removed redundant and reordered modifiers.
2004-11-06  Michael Koch  <konqueror@gmx.de>

       * java/lang/StringBuffer.java,
       java/lang/Throwable.java,
       java/security/spec/DSAParameterSpec.java,
       java/util/zip/ZipEntry.java,
       java/util/zip/ZipFile.java,
       java/util/zip/ZipInputStream.java,
       java/util/zip/ZipOutputStream.java:
       Removed redundant and reordered modifiers.

From-SVN: r90177
2004-11-06 16:32:56 +00:00
Mark Wielaard 5dc8952e24 re PR libgcj/18234 (System property java.library.path doesn't get used by System.loadLibrary())
PR libgcj/18234
       * java/lang/Runtime.java (static): Call init().
       (Runtime): Remove call to init().
       (init): Make static.

From-SVN: r89902
2004-10-30 23:58:26 +00:00
Kriang Lerdsuwanakij ea0ffdd260 * libjava/java/lang/Class.h
(java::lang::Class): Correct friend class declaration.

From-SVN: r89578
2004-10-26 10:43:56 +00:00
Geoffrey Keating f1a6626519 Index: gcc/gcc/ChangeLog
2004-10-25  Geoffrey Keating  <geoffk@apple.com>

	* config/darwin.h (LINK_SPEC): Default weak_reference_mismatches
	to 'non-weak'.
	(MAKE_DECL_ONE_ONLY): Set DECL_WEAK.
	(ASM_MAKE_LABEL_LINKONCE): Delete.
	(ASM_WEAKEN_DECL): New.
	(ASM_DECLARE_OBJECT_NAME): Look at DECL_WEAK not DECL_ONE_ONLY.
	(ASM_DECLARE_FUNCTION_NAME): Likewise.
	(TEXT_SECTION_ASM_OP): Add a tab.
	(DATA_SECTION_ASM_OP): Likewise.
	(SECTION_FUNCTION): Add a tab.  Use fputs.  Don't call
	data_section on every section change.
	(EXTRA_SECTIONS): Add a bunch of new extra sections.
	(EXTRA_SECTION_FUNCTIONS): Likewise.
	(USE_SELECT_SECTION_FOR_FUNCTIONS): Define.
	(JCR_SECTION_NAME): Define.
	(TARGET_SECTION_TYPE_FLAGS): Don't define.
	* config/darwin.c (darwin_encode_section_info): A symbol is defined
	in this file if it is not weak.
	(textcoal_section): Delete.
	(datacoal_section): Delete.
	(darwin_make_decl_one_only): Delete.
	(machopic_select_section): Handle functions.
	(darwin_asm_named_section): Add a tab.
	(darwin_section_type_flags): Delete.
	(darwin_unique_section): Delete contents.
	(darwin_emit_unwind_label): Add a tab.  Make decls weak if
	DECL_WEAK is set.
	* config/darwin-protos.h (darwin_section_type_flags): Delete.
	(darwin_make_decl_one_only): Delete.
	(text_coal_section): New.
	(text_unlikely_section): New.
	(text_unlikely_coal_section): New.
	(const_coal_section): New.
	(data_coal_section): New.
	(const_data_coal_section): New.
	* varasm.c (function_section): Honour
	USE_SELECT_SECTION_FOR_FUNCTIONS.
	* dwarf2out.c (output_call_frame_info): Look at DECL_WEAK when
	TARGET_USES_WEAK_UNWIND_INFO is in effect.
	* dbxout.c (dbxout_source_file): Don't change sections while
	a function is being output.

Index: gcc/testsuite/ChangeLog
2004-10-25  Geoffrey Keating  <geoffk@apple.com>

	* objc.dg/image-info.m: Update for changes to section selection.

Index: libjava/ChangeLog
2004-10-25  Geoffrey Keating  <geoffk@apple.com>

	* Makefile.am (DARWIN_CRT_SRC): New.
	(libgcj_la_SOURCES): Use it.
	* configure.ac: Define USING_DARWIN_CRT when on Darwin.
	* darwin.cc: New file.
	* include/jvm.h (_Jv_RegisterClasses): Constify.
	(_Jv_RegisterClasses_Counted): New prototype.
	* java/lang/Class.h: Include stddef.h.
	(_Jv_RegisterClasses): Constify.
	(_Jv_RegisterClasses_Counted): New prototype.
	(Object): Make '_Jv_RegisterClasses_Counted' a friend.
	* java/lang/natClassLoader.cc (_Jv_RegisterClasses): Constify.
	(_Jv_RegisterClasses_Counted): New function.
	* configure: Regenerate.
	* Makefile.in: Regenerate.
	* gcj/Makefile.in: Regenerate.
	* include/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

Index: libstdc++-v3/ChangeLog
2004-10-25  Geoffrey Keating  <geoffk@apple.com>

	* libsupc++/new_op.cc (new): Make weak.
	* libsupc++/new_opnt.cc (new): Make weak.
	* libsupc++/new_opv.cc (new): Make weak.
	* libsupc++/new_opvnt.cc (new): Make weak.
	* libsupc++/delete_op.cc (delete): Make weak.
	* libsupc++/delete_opnt.cc (delete): Make weak.
	* libsupc++/delete_opv.cc (delete): Make weak.
	* libsupc++/delete_opvnt.cc (delete): Make weak.

From-SVN: r89572
2004-10-26 06:09:05 +00:00
Michael Koch 0460023ee2 2004-10-22 Michael Koch <konqueror@gmx.de>
* java/lang/Math.java
	* java/lang/StackTraceElement.java
	* java/nio/Buffer.java
	* java/nio/ByteBuffer.java
	* java/nio/CharBuffer.java
	* java/nio/DoubleBuffer.java
	* java/nio/FloatBuffer.java
	* java/nio/IntBuffer.java
	* java/nio/LongBuffer.java
	* java/nio/ShortBuffer.java
	* java/nio/charset/Charset.java
	* java/rmi/server/RMIClassLoader.java
	* java/rmi/server/RMISocketFactory.java
	* java/security/Policy.java
	* java/text/ChoiceFormat.java
	* java/text/CollationElementIterator.java
	* java/text/DateFormat.java
	* java/text/DecimalFormat.java
	* java/text/DecimalFormatSymbols.java
	* java/text/MessageFormat.java
	* java/text/NumberFormat.java
	* java/text/RuleBasedCollator.java
	* java/text/SimpleDateFormat.java
	* java/util/BitSet.java
	* java/util/Calendar.java
	* java/util/Collections.java
	* java/util/IdentityHashMap.java
	* java/util/Locale.java
	* java/util/TreeMap.java
	* java/util/logging/LogRecord.java
	* java/util/logging/XMLFormatter.java
	* java/util/prefs/AbstractPreferences.java
	* java/util/prefs/Preferences.java
	* javax/crypto/interfaces/DHPrivateKey.java
	* javax/crypto/interfaces/DHPublicKey.java
	* javax/crypto/interfaces/PBEKey.java
	* javax/net/ssl/HandshakeCompletedEvent.java
	* javax/security/auth/Subject.java

From-SVN: r89454
2004-10-22 17:14:29 +00:00
Kazuhiro Inaoka 2989a2f55b Add m32r support.
From-SVN: r89367
2004-10-21 09:36:47 +00:00
Andreas Schwab b3a450236a natClass.cc (_Jv_LayoutVTableMethods): Cast pointers to uaddr, not int.
* java/lang/natClass.cc (_Jv_LayoutVTableMethods): Cast pointers
	to uaddr, not int.
	* java/lang/natClassLoader.cc (_Jv_PrepareCompiledClass):
	Likewise.

From-SVN: r89346
2004-10-20 21:42:33 +00:00
Michael Koch 3330802695 System.java: Revert accidential change.
2004-10-18  Michael Koch  <konqueror@gmx.de>

	* java/lang/System.java: Revert accidential change.

From-SVN: r89208
2004-10-18 11:09:11 +00:00
Michael Koch 2047d8e479 Math.java, [...]: Reworked import statements, HTML in javadocs and modifier orders.
2004-10-18  Michael Koch  <konqueror@gmx.de>

	* java/lang/Math.java,
	java/lang/Package.java,
	java/lang/Runtime.java,
	java/lang/StrictMath.java,
	java/lang/System.java,
	java/lang/Thread.java,
	java/lang/ThreadLocal.java,
	java/lang/Void.java:
	Reworked import statements, HTML in javadocs and modifier orders.

From-SVN: r89207
2004-10-18 10:41:56 +00:00
Michael Koch 7b040d4c07 [multiple changes]
2004-10-18  Michael Koch  <konqueror@gmx.de>

	* java/lang/reflect/Proxy.java: Improved javadocs.

2004-10-18  Michael Koch  <konqueror@gmx.de>

	* java/lang/reflect/AccessibleObject.java
	(checkPermission): Removed redundant final modifier.
	(secureSetAccessible): Likewise.
	* java/lang/reflect/Proxy.java:
	Reworked import statements.
	(generate): Removed redundant final modifier.
	* java/lang/reflect/ReflectPermission.java:
	Reorder package declaration and import statement.

2004-10-18  Jeroen Frijters  <jeroen@frijters.net>

	* java/lang/reflect/Proxy.java
	(count): Removed useless initializer.

From-SVN: r89201
2004-10-18 09:46:48 +00:00
Mark Wielaard 3bd2680ed5 System.java (properties): Make package private.
2004-09-26  Mark Wielaard  <mark@klomp.org>

       * java/lang/System.java (properties): Make package private.
       * java/lang/Throwable.java (StaticData.nl): Initialize through
       directly accessing System.properties.getProperty().

       * java/lang/Throwable.java (nl): Remove static field.
       (StaticData): New private static inner class.
       (stackTraceStringBuffer): Use StaticData.nl.

From-SVN: r88133
2004-09-26 17:11:14 +00:00
Jeroen Frijters 9b2b6c0f33 Proxy.java (getPackage, [...]): Fixed handling of default package.
2004-09-25  Jeroen Frijters  <jeroen@frijters.net>

       * java/lang/reflect/Proxy.java (getPackage, ClassFactory): Fixed
       handling of default package. (generate): Removed confused comments
       and code about making Method and Field accessible.

From-SVN: r88109
2004-09-25 19:46:21 +00:00
Tom Tromey 667196047f ClassLoader.java (loadedClasses): Declare as HashMap.
2004-09-24  Tom Tromey  <tromey@redhat.com>

	* java/lang/ClassLoader.java (loadedClasses): Declare as HashMap.
	(definedPackages): Likewise.

From-SVN: r88027
2004-09-24 11:25:42 +00:00
Jeroen Frijters e6ab8dc2e7 2004-09-24 Jeroen Frijters <jeroen@frijters.net>
* java/lang/StackTraceElement.java
	(className): Renamed field to declaringClass to be compatible
	with Sun serialization format.

From-SVN: r88012
2004-09-24 05:58:28 +00:00
Tom Tromey 3a3d022561 natMethod.cc (_Jv_CallAnyMethodA): Indentation fix.
* java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA):
	Indentation fix.

From-SVN: r87825
2004-09-21 22:23:46 +00:00
Richard Henderson 72826319ff natPosixProcess.cc (waitForSignal): Ignore return value of sigsuspend.
* java/lang/natPosixProcess.cc (waitForSignal): Ignore return
        value of sigsuspend.

From-SVN: r87505
2004-09-14 13:09:31 -07:00
Mohan Embar bdbf6060ea natThread.cc (finalize_native): Destroy join conditional variable and mutex if...
* java/lang/natThread.cc (finalize_native): Destroy
	join conditional variable and mutex if these destroy
	operations are supported.

From-SVN: r87361
2004-09-11 19:10:44 +00:00
Andreas Tobler 4166b03640 [multiple changes]
2004-09-09  Michael Koch  <konqueror@gmx.de>

	* java/security/ProtectionDomain.java,
	* java/util/PropertyPermissionCollection.java:
	Fixed javadocs all over.

2004-09-09  Sven de Marothy  <sven@physto.se>

	Patch from David Gilbert <david.gilbert@object-refinery.com>
	* java/lang/Comparable.java: Fixed documentation errors.
	* java/util/Arrays.java: Likewise.

2004-09-09  Andrew John Hughes  <gnu_andrew@member.fsf.org>

	* java/net/Inet4Address.java
	(Inet4Address): Added comment to serialization UID.
	* java/text/Format.java
	(Format): Added comment to serialization UID.

From-SVN: r87248
2004-09-09 21:44:07 +02:00
Michael Koch c6614d3ea3 2004-09-09 Michael Koch <konqueror@gmx.de>
* java/lang/System.java
	(err): Fixed javadoci to point to setErr() and not setOut().

From-SVN: r87227
2004-09-09 10:19:29 +00:00
Hans Boehm ed3479983d configure.ac: Handle --enable-gc-debug.
* configure.ac: Handle --enable-gc-debug.
	* configure: Regenerate.
	* include/config.h.in (LIBGCJ_GC_DEBUG): Add.
	* boehm.cc: Include gc_mark.h, javaxfc.h, but no GC private files.
	Rearrange include file order.
	(GC_DEBUG): Set if LIBGCJ_GC_DEBUG is set.
	(GC_finalize_all, GC_debug_generic_malloc): Don't declare.
	(disable_gc_mutex): Delete along with all references.
	(_Jv_MarkObj, _Jv_MarkArray): Use public types,
	adjust for debug header size.
	(_Jv_AllocObj, _Jv_allocPtrFreeObj): Define out of line for
	debug case.
	(_Jv_AllocArray): Declare min_heap_addr only if needed.
	(gcj_describe_type_fn): New.
	(_Jv_InitGC): Use GC_new_free_list, GC_new_proc, and GC_new_kind.
	Register gcj_describe_type_fn.
	* include/boehm-gc.h:
	(_Jv_AllocObj, _Jv_allocPtrFreeObj):
	Don't define, but declare, for debug case.
	* java/lang/natObject.cc:
	(GC_DEBUG): Define if LIBGCJ_GC_DEBUG is set.

From-SVN: r86686
2004-08-28 00:45:56 +00:00
Hans Boehm 0039c16d35 defineclass.cc: Include <stdio.h>.
* defineclass.cc: Include <stdio.h>.
	* java/lang/natClassLoader.cc: Include <stdio.h>.

From-SVN: r86434
2004-08-23 19:21:19 +00:00
David Daney 720086cd84 natPosixProcess.cc (waitForSignal): Use sigsuspend instead of sigwait.
2004-08-18  David Daney  <ddaney@avtrex.com>

	* java/lang/natPosixProcess.cc (waitForSignal): Use sigsuspend
	instead of sigwait.

From-SVN: r86186
2004-08-18 15:12:32 +00:00
Hans Boehm 28e99c6271 re PR libgcj/16662 (IllegalMonitorStateException in EventQueue.getNextEvent(): possible hash synchronization bug?)
PR libgcj/16662
	* java/lang/natObject.cc (LOCK_LOG, LOG): Add debug tracing.
	(Almost everywhere): add LOG calls, fix, add comments.
	(_Jv_MonitorEnter): Replace masking of LOCKED bit with assertion.
	Add explicit check for LOCKED bit in slow case (PR 16662).
	(_Jv_MonitorExit): Add casts in debug-only code.
	Always release LOCKED bit before throwing exception.
	(_Jv_ObjectCheckMonitor): Lock may be held if lightweight lock
	isn't.  Handle easy cases without lock acquisition.
	(Object::wait): Use NotifyAll for lock inflation.

From-SVN: r85884
2004-08-12 17:56:32 +00:00
David Daney c58f29001d re PR libgcj/11801 (Problems with Process.waitFor() and exitValue())
2004-08-12  David Daney  <ddaney@avtrex.com>

	PR libgcj/11801
	* java/lang/PosixProcess.java: Rewrote.
	* java/lang/natPosixProcess.cc: Rewrote.
	* java/lang/Runtime.java (execInternal): Declare throws IOException.
	* gcj/javaprims.h (ConcreteProcess$ProcessManager): Declare.
	* posix-threads.cc (block_sigchld) New function.
	(_Jv_ThreadRegister) Use it.
	(_Jv_ThreadStart) Use it.
	* configure.in (PLATFORM_INNER_NAT_HDRS): New AC_SUBST() used in...
	* Makefile.am: ... to specify extra native headers.
	* configure: Regenerated.
	* include/config.h: Regenerated.
	* Makefile.in: Regenerated.
	* gcj/Makefile.in: Regenerated.
	* include/Makefile.in: Regenerated.
	* testsuite/Makefile.in: Regenerated.

From-SVN: r85880
2004-08-12 16:20:11 +00:00
Per Bothner b4d49f49bf javaprims.h (_Jv_Utf8Const): Change struct to a class, with private fields and access methods.
* gcj/javaprims.h (_Jv_Utf8Const): Change struct to a class,
	with private fields and access methods.
	(_Jv_NewStringUTF, _Jv_hashUtf8String): New function declarations.
	* gcj/cni.h (_Jv_NewStringUTF): Move to javaprims.h.
	* prims.cc (_Jv_Utf8COnst::init): New method implementation.
	( _Jv_makeUtf8Const): Rewrite using new constructors.
	(hashUtf8String): Rename to +_Jv_hashUtf8String and make non-static.
	* defineclass.cc: Use new _Utf8Const access/convenience methods.
	* jni.cc: Likewise.
	* resolve.cc: Likewise.
	* gcj/field.h: Likewise.
	* include/jvm.h: Likewise.
	* java/lang/Class.h: Likewise.
	* java/lang/natClass.cc: Likwise.
	* java/lang/natClassLoader.cc: Likewise
	* java/lang/reflect/natMethod.cc: Likewise
	* verify.cc: Likewise.
	(_Jv_BytecodeVerifier::make_utf8_const):  Optimize.
	(~_Jv_BytecodeVerifier):  Don't need second _Jv_Free call.

From-SVN: r85854
2004-08-11 23:53:42 -07:00
Bryce McKinlay d078f7c010 File.java (toURI): Throw RuntimeException, not InternalError.
2004-07-27  Bryce McKinlay  <mckinlay@redhat.com>

	* java/io/File.java (toURI): Throw RuntimeException, not
	InternalError.
	* java/lang/Runtime.java (exit): Qualify static sleep() call with
	class name, not instance.

From-SVN: r85227
2004-07-27 19:42:38 +01:00
Bryce McKinlay ffe4e0376f prims.cc (_Jv_InitPrimClass): Don't create an array class.
2004-07-23  Bryce McKinlay  <mckinlay@redhat.com>

	* prims.cc (_Jv_InitPrimClass): Don't create an array class.
	(_Jv_CreateJavaVM): Don't pass array vtable parameter to
	_Jv_InitPrimClass.
	(DECLARE_PRIM_TYPE): Don't declare array vtables.
	* include/jvm.h (struct _Jv_ArrayVTable): Removed.
	* java/lang/Class.h (_Jv_InitPrimClass): Update friend declaration.

From-SVN: r85109
2004-07-24 02:17:29 +01:00
Mark Wielaard 392abf6bf9 System.java (static): Set http.agent system property when not yet set.
* java/lang/System.java (static): Set http.agent system property when
       not yet set.
       * gnu/java/net/protocol/http/Connection.java (static): Get httpAgent
       from system property inside AccessController.doPrivileged() call.
       (proxyPort): Made package private.
       (proxyInUse): Likewise.
       (proxyHost): Likewise.
       (userAgent): Likewise.

From-SVN: r85078
2004-07-23 11:49:59 +00:00
Per Bothner 963ddbd50f Print -verbose:message on "loading", not initialization.
* java/lang/Class.h (JV_STATE_LOADED, JV_STATE_COMPILED):  Swap order.
	* defineclass.cc (_Jv_ClassReader::parse):  Print message if
	gcj::verbose_class_flag.
	* java/lang/natClass.cc (initializeClass):  Don't print message here.
	* java/lang/natClassLoader.cc (_Jv_WaitForState):  If state was
	_JV_STATE_COMPILED, set to JV_STATE_LOADED and may print message.
	(_Jv_PrepareCompiledClass):  Likewise.

From-SVN: r84926
2004-07-19 11:29:31 -07:00
Michael Koch 1792f52d3a String.java: Fixed javadocs all over.
2004-07-17  Michael Koch  <konqueror@gmx.de>

	* java/lang/String.java: Fixed javadocs all over.

From-SVN: r84870
2004-07-17 14:04:45 +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
Andrew Haley d1238423cd natSystem.cc (getenv0): Don't assume environment variable is Latin 1 coded.
2004-06-15  Andrew Haley  <aph@redhat.com>

        * java/lang/natSystem.cc (getenv0): Don't assume environment
        variable is Latin 1 coded.

From-SVN: r83182
2004-06-15 13:43:33 +00:00
Andrew Haley df94fa14b9 System.java: (getenv0): New method.
2004-06-14  Andrew Haley  <aph@redhat.com>

        * java/lang/System.java: (getenv0): New method.
        (getenv): Add security check.  Do the right thing.
        * java/lang/natSystem.cc (getenv0): New method.

From-SVN: r83107
2004-06-14 14:34:21 +00:00
Michael Koch 071917b066 System.java: Reordered imports.
2004-05-30  Michael Koch  <konqueror@gmx.de>

	* java/lang/System.java: Reordered imports.

From-SVN: r82450
2004-05-30 13:48:03 +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 17abdabcf3 Layout interfaces during preparation, not initialization.
* java/lang/natClass.cc (initializeClass): Move
	_Jv_LayoutInterfaceMethods call...
	* java/lang/natClassLoader.cc (_Jv_PrepareCompiledClass): to here.

From-SVN: r82101
2004-05-21 17:08:50 +01:00
Anthony Green a6845d137a Fix typo in last commit.
From-SVN: r82037
2004-05-19 21:49:40 +00:00
Anthony Green 0f22079ec2 Makefile.am: Define JAVA_EXT_DIRS.
2004-05-19  Anthony Green  <green@redhat.com>

	* Makefile.am: Define JAVA_EXT_DIRS.
	* Makefile.in: Rebuilt.
	* java/lang/natRuntime.cc (insertSystemProperties): Set
	java.ext.dirs property.

From-SVN: r82034
2004-05-19 19:31:42 +00:00
Tom Tromey 7b68f0bf7e URLStreamHandler.java (toExternalForm): Removed unused variables.
2004-05-03  Tom Tromey  <tromey@redhat.com>

	* java/net/URLStreamHandler.java (toExternalForm): Removed
	unused variables.
	unused constructor.
	* java/math/BigDecimal.java (divide): Removed unused variable.
	* java/lang/Throwable.java: Cleaned up imports.
	* java/lang/ClassLoader.java: Cleaned up imports.
	* java/io/FilePermission.java (implies): Removed unused
	variable.
	* java/awt/TextComponent.java: Removed unused import.
	* gnu/java/util/prefs/NodeReader.java: Cleaned up imports.
	* gnu/java/util/DoubleEnumeration.java: Removed unused import.
	* gnu/java/text/WordBreakIterator.java: Removed unused import.
	* gnu/java/text/SentenceBreakIterator.java: Removed unused
	import.
	* gnu/java/text/LineBreakIterator.java: Removed unused import.
	* gnu/java/text/CharacterBreakIterator.java: Removed
	unused import.
	* gnu/java/security/provider/DSAKeyPairGenerator.java:
	Cleaned up imports.
	* gnu/java/security/der/DERWriter.java: Cleaned up imports.
	* gnu/java/nio/charset/UTF_16Decoder.java (put): Removed
	unused method.
	* gnu/java/nio/SocketChannelImpl.java: Cleaned up imports.
	* gnu/java/nio/FileLockImpl.java: Cleaned up imports.
	* gnu/java/io/Base64InputStream.java: Cleaned up imports.
	* gnu/java/beans/info/ComponentBeanInfo.java: Cleaned up imports.
	* gnu/classpath/ServiceFactory.java: Cleaned up imports.
	(lookupProviders): Removed unused variable.
	(loadNextServiceProvider): Likewise.
	* gnu/java/beans/BeanInfoEmbryo.java: Cleaned up imports.

From-SVN: r81450
2004-05-03 19:52:29 +00:00
Bryce McKinlay 746ecc7813 natClass.cc (_Jv_LayoutInterfaceMethods): New method.
2004-04-21  Bryce McKinlay  <mckinlay@redhat.com>

        * java/lang/natClass.cc (_Jv_LayoutInterfaceMethods): New method.
        Set method->index values for interface methods to their itable
	index.
        (initializeClass): Call _Jv_LayoutInterfaceMethods.

From-SVN: r80978
2004-04-21 20:26:22 +01:00
Michael Koch cf6f7d5589 Byte.java, [...]: Fixed javadocs, coding style and argument names all over.
2004-04-20  Michael Koch  <konqueror@gmx.de>

	* java/lang/Byte.java,
	java/lang/CharSequence.java,
	java/lang/ClassLoader.java,
	java/lang/Compiler.java,
	java/lang/Double.java,
	java/lang/Float.java,
	java/lang/Integer.java,
	java/lang/Long.java,
	java/lang/Math.java,
	java/lang/Number.java,
	java/lang/Package.java,
	java/lang/Runtime.java,
	java/lang/RuntimePermission.java,
	java/lang/SecurityManager.java,
	java/lang/Short.java,
	java/lang/StringBuffer.java,
	java/lang/System.java,
	java/lang/ThreadGroup.java,
	java/lang/Throwable.java,
	java/lang/reflect/InvocationHandler.java,
	java/lang/reflect/Proxy.java:
	Fixed javadocs, coding style and argument names all over.

From-SVN: r80899
2004-04-20 12:30:19 +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 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
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
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
Michael Koch 2b6b5c35ce 2004-04-01 Michael Koch <konqueror@gmx.de>
* java/lang/SecurityManager.java
	(checkAwtEventQueueAccess): Implemented.

From-SVN: r80314
2004-04-01 19:15:05 +00:00
Anthony Green 95e59f1ada natClass.cc (getClassLoader): Circumvent infinite recursion when searching for the system ClassLoader.
2004-03-21  Anthony Green  <green@redhat.com>

        * java/lang/natClass.cc (getClassLoader): Circumvent infinite
        recursion when searching for the system ClassLoader.

From-SVN: r79871
2004-03-23 19:24:07 +00:00
Jeroen Frijters b121dcb5a8 ThreadGroup.java (list): Changed print to println.
2004-03-19  Jeroen Frijters  <jeroen@frijters.net>

	* java/lang/ThreadGroup.java (list): Changed print to println.

From-SVN: r79707
2004-03-19 22:59:51 +00:00
Michael Koch bfb0a4ad70 2004-03-09 Michael Koch <konqueror@gmx.de>
* java/lang/Thread.java
	(runnable): Moved around.
	(daemon): Renamed from daemon_flag.
	(contextClassLoader): Renamed from context_class_loader.
	(Thread): Reordered constructors.
	(activeCount): Use group directly.
	(destroy): Make it a java method. Throw NoSuchMethodError like Sun does.
	(holdsLock): Reworked javadoc.
	(setDaemon): Reworked.
	* java/lang/natThread.cc
	(destroy): Removed.

From-SVN: r79200
2004-03-09 21:02:52 +00:00
Per Bothner dd341087ac * java/lang/natPosixProcess.cc (startProcess): Fix thinko.
From-SVN: r78725
2004-03-01 13:33:28 -08:00
Per Bothner 881ad9e405 natPosixProcess.cc (startProcess): Implement standard streams using FileChannelImpl, not FileDescriptor.
* java/lang/natPosixProcess.cc (startProcess):  Implement standard
	streams using FileChannelImpl, not FileDescriptor.
	* java/lang/natWin32Process.cc (startProcess):  Likewise.

From-SVN: r78664
2004-02-29 11:14:20 -08:00
Andrew Haley 50106e8f8d re PR libgcj/14296 (3.4 regression: Method.Invoke)
2004-02-25  Andrew Haley  <aph@redhat.com>

	PR java/14296:
	* java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Make sure
	we have a valid method index.

From-SVN: r78504
2004-02-26 15:22:20 +00:00
Anthony Green b29610b3cf de-pessimization
From-SVN: r78447
2004-02-25 19:52:58 +00:00
Michael Koch 7959d59810 2004-02-05 Michael Koch <konqueror@gmx.de>
* java/lang/Thread.java
	(Thread): Reordered.
	(setContextClassLoader): Fixed javadoc comment.
	(setPriority): Reordered.
	(yield): Reordered.
	(initialize_native): Reordered.
	(gen_name): Reordered.

From-SVN: r77327
2004-02-05 18:20:46 +00:00
Michael Koch 5ad136540e Thread.java: Reordered fields...
2004-02-05  Michael Koch  <konqueror@gmx.de>

	* java/lang/Thread.java: Reordered fields, reformated much code,
	no functional changes, some variables renamed, javadoc comments
	merged.

From-SVN: r77322
2004-02-05 16:34:30 +00:00
Tom Tromey 2565abce54 natPosixProcess.cc (startProcess): Handle case where PATH or LD_LIBRARY_PATH is not set in parent environment.
* java/lang/natPosixProcess.cc (startProcess): Handle case where
	PATH or LD_LIBRARY_PATH is not set in parent environment.

From-SVN: r77203
2004-02-04 00:07:19 +00:00
Michael Koch f79b77082f 2004-01-27 Michael Koch <konqueror@gmx.de>
* java/lang/Class.java
	(getConstructor): Removed SecurityException from throws clause.
	(_getConstructors): Likewise.
	(getConstructors): Likewise.
	(getDeclaredConstructor): Likewise.
	(getDeclaredClasses): Likewise.
	(getDeclaredConstructors): Likewise.
	(getDeclaredField): Likewise.
	(getDeclaredMethod): Likewise.
	(getDeclaredMethods): Likewise.
	(getField): Likewise.
	(getMethod): Likewise.
	(getMethods): Likewise.

From-SVN: r76747
2004-01-27 21:00:19 +00:00
Michael Koch 135f54eb84 Class.java: Imports reworked, reformated.
2004-01-25  Michael Koch  <konqueror@gmx.de>

	* java/lang/Class.java: Imports reworked, reformated.
	(Class): Javadoc added.
	(forName): Likewise.
	(getClasses): Likewise.
	(getClassLoader): Likewise.
	(getComponentType): Likewise.
	(getConstructor): Likewise.
	(getConstructors): Likewise.
	(getDeclaredConstructor): Likewise.
	(getDeclaredClasses): Likewise.
	(getDeclaredConstructors): Likewise.
	(getDeclaredField): Likewise.
	(getDeclaredMethod): Likewise.
	(getDeclaredMethods): Likewise.
	(getDeclaringClass): Likewise.
	(getField): Likewise.
	(getInterfaces): Likewise.
	(getMethod): Likewise.
	(getMethods): Likewise.
	(getModifiers): Likewise.
	(getName): Likewise.
	(getResource): Likewise.
	(getResourceAsStream): Likewise.
	(getSigners): Likewise.
	(setSigners): Likewise.
	(getSuperclass): Likewise.
	(isArray): Likewise.
	(isAssignableFrom): Likewise.
	(isInstance): Likewise.
	(isInterface): Likewise.
	(isPrimitive): Likewise.
	(newInstance): Likewise.
	(getProtectionDomain): Likewise.
	(toString): Likewise.
	(Class): Moved.
	(initializeClass): Likewise.
	(finalize): Likewise.

From-SVN: r76554
2004-01-25 13:08:08 +00:00
Michael Koch 0791cb20bc VMClassLoader.java: Reworked imports.
2004-01-23  Michael Koch  <konqueror@gmx.de>

	* java/lang/VMClassLoader.java: Reworked imports.

From-SVN: r76426
2004-01-23 15:29:38 +00:00
Michael Koch 834d51fe49 Class.java, [...]: Merged copyright with classpath.
2004-01-23  Michael Koch  <konqueror@gmx.de>

	* java/lang/Class.java,
	java/lang/Object.java,
	java/lang/Thread.java: Merged copyright with classpath.

From-SVN: r76409
2004-01-23 11:56:48 +00:00
Tom Tromey b54a271561 natClassLoader.cc: Moved VMClassLoader methods...
* java/lang/natClassLoader.cc: Moved VMClassLoader methods...
	* java/lang/natVMClassLoader.cc: ...here.  New file.
	* Makefile.in: Rebuilt.
	* Makefile.am (nat_source_files): Added natVMClassLoader.cc.

From-SVN: r76003
2004-01-16 23:54:22 +00:00
Andrew Haley d55d97f163 natClassLoader.cc (_Jv_PrepareCompiledClass): Resolve a Utf8Const field before looking at its class.
2004-01-09  Andrew Haley  <aph@redhat.com>

	* java/lang/natClassLoader.cc (_Jv_PrepareCompiledClass): Resolve
	a Utf8Const field before looking at its class.

From-SVN: r75591
2004-01-09 17:10:43 +00:00
Michael Koch 40f8ee2d8d Array.java: Merged documentation with classpath.
2004-01-07  Michael Koch  <konqueror@gmx.de>

	* java/lang/reflect/Array.java: Merged documentation with classpath.

From-SVN: r75512
2004-01-07 18:46:18 +00:00
Michael Koch 907cdc7fad 2004-01-06 Michael Koch <konqueror@gmx.de>
* java/lang/Package.java
	(getPackage): Get the current class loader directly.
	* java/lang/SecurityManager.java
	(currentLoadedClass): Dont iterate over class contexts.
	(classLoaderDepth): Don't check class loaders if everything is allowed.

From-SVN: r75465
2004-01-06 08:34:58 +00:00
Michael Koch 9e129d901c re PR libgcj/13056 (import new libltdl)
2003-12-16  Michael Koch  <konqueror@gmx.de>

	Fix for PR libgcj/13056.
	* libltdl/configure.in,
	libltdl/config.h.in: Removed.
	* libltdl/configure.ac,
	libltdl/config-h.in,
	libltdl/install-sh,
	libltdl/config.guess,
	libltdl/config.sub,
	libltdl/missing,
	libltdl/mkinstalldirs,
	libltdl/ltmain.sh: New files.
	* libltdl/Makefile.am,
	libltdl/acinclude.m4,
	libltdl/aclocal.m4,
	libltdl/ltdl.c,
	libltdl/ltdl.h,
	libltdl/README: Update to versions from libtool 1.5.
	libltdl/configure,
	* libltdl/Makefile.in: Regenerated.
	* java/lang/natRuntime.cc (find_symbol):
	Use type 'lt_ptr' instead of 'lt_ptr_t'.

From-SVN: r74711
2003-12-16 21:48:25 +00:00
Michael Koch b7e0ff4538 Class.h (hack_signers): Renamed signers to hack_signers.
2003-12-03  Michael Koch  <konqueror@gmx.de>

	* java/lang/Class.h (hack_signers): Renamed signers to hack_signers.
	* java/lang/natClass.cc (getSigners): Likewise.
	(setSigners): Likewise.

From-SVN: r74247
2003-12-03 21:26:59 +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
Tom Tromey f627fd15aa natDouble.cc (parseDouble): Reverted patch of 2003-11-13.
* java/lang/natDouble.cc (parseDouble): Reverted patch of
	2003-11-13.

From-SVN: r73956
2003-11-26 18:02:34 +00:00
Mark Wielaard 4716418ffe * java/lang/Float.java (static): Removed.
From-SVN: r73805
2003-11-21 13:24:28 +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
Mohan Embar cafa50327c re PR libgcj/12231 ([win32] Console applications spawned via Runtime.exec( ) in a GUI application flash console window)
PR libgcj/12231
	* java/lang/Win32Process.java (hasExited) Changed from
	public to private.
	(startProcess): Likewise.
	(cleanup): Likewise.
	* java/lang/natWin32Process.cc (cleanup) Don't close
	input, output and error streams.
	(ChildProcessPipe): New helper class.
	(startProcess): Refactored to use ChildProcessPipe.
	Use CREATE_NO_WINDOW when launching child process.

From-SVN: r73326
2003-11-07 03:16:49 +00:00
Bryce McKinlay 99f8b2501d natClass.cc (newInstance): Throw InstantiationException if class has no null-argument constructor.
* java/lang/natClass.cc (newInstance): Throw InstantiationException
        if class has no null-argument constructor.

From-SVN: r73244
2003-11-04 05:27:10 +00:00
Bryce McKinlay f56228e73f natMethod.cc (_Jv_CallAnyMethodA): Don't use vtable dispatch for final methods.
* java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Don't use
	vtable dispatch for final methods.

From-SVN: r73101
2003-10-30 21:09:45 +00:00
Bryce McKinlay 6ac8b2b187 natClass.cc (_Jv_LayoutVTableMethods): Always assign a vtable slot for final methods.
* java/lang/natClass.cc (_Jv_LayoutVTableMethods): Always assign a
	vtable slot for final methods. Add FIXME comment.

From-SVN: r73023
2003-10-28 22:45:57 +00:00
Bryce McKinlay e0f23fcd49 AccessibleObject.java (secureSetAccessible): Don't check for AccessibleObject.
* java/lang/reflect/AccessibleObject.java (secureSetAccessible):
	Don't check for AccessibleObject. Update javadocs.

From-SVN: r72943
2003-10-26 02:28:45 +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
Bryce McKinlay 8822f4aaf9 Method.java (toString): Avoid extra whitespace on method with no modifiers.
* java/lang/reflect/Method.java (toString): Avoid extra whitespace
	on method with no modifiers.

From-SVN: r72919
2003-10-25 07:55:21 +01:00
Bryce McKinlay a10fd35601 re PR libgcj/11780 (Method.invoke() is slow)
PR libgcj/11780:
	* java/lang/reflect/natMethod.cc (invoke): Look up caller and
	perform accessibility check only if target is non-public and
	accessible flag is not set.
	* java/lang/reflect/natField.cc (getAddr): Likewise.

From-SVN: r72918
2003-10-25 07:49:20 +01:00
Anthony Green fe8738988d Obvious fix for systems with no interpreter.
From-SVN: r72903
2003-10-24 18:27:29 +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
Rainer Orth 59407b8361 natObject.cc (_Jv_ObjectCheckMonitor): Use _Jv_MutexCheckMonitor instead of accessing mutex.owner directly.
* java/lang/natObject.cc (_Jv_ObjectCheckMonitor): Use
	_Jv_MutexCheckMonitor instead of accessing mutex.owner directly.

From-SVN: r72872
2003-10-23 21:48:36 +00:00
Tom Tromey eab09cdf1a re PR libgcj/12416 (java.lang.Class.getFields returns duplicate entries.)
PR libgcj/12416:
	* java/lang/Class.h: Updated.
	* java/lang/natClass.cc (_getFields): Removed.
	(getFields): Likewise.
	(getDeclaredFields): Added `public_only' parameter.
	* java/lang/Class.java (getFields): Now implemented in java; from
	Classpath.
	(getDeclaredFields): Likewise.
	(getDeclaredFields(boolean)): Declare.
	(_getFields): Removed.
	(internalGetFields): New method, from Classpath.

From-SVN: r72818
2003-10-22 19:29:27 +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
Ralph Loader 35e1369c77 StringBuffer.java (getChars): Fix array index checks.
* java/lang/StringBuffer.java (getChars): Fix array index checks.
	(append, substring, insert): Likewise.
	* testsuite/libjava.lang/StringBuffer_overflow.java: New file.
	* testsuite/libjava.lang/StringBuffer_overflow.out: New file.

From-SVN: r72579
2003-10-16 21:35:42 +00:00
Ralph Loader 2488a51e82 natString.cc (getChars): Fix validation of array indexes.
* java/lang/natString.cc (getChars):
	Fix validation of array indexes.
	(getBytes, regionMatches, startsWith, valueOf): Likewise.
	* testsuite/libjava.lang/String_overflow.java: New file.
	* testsuite/libjava.lang/String_overflow.out: New file.

From-SVN: r72578
2003-10-16 21:28:23 +00:00
Tom Tromey b71d486c40 natClassLoader.cc (_Jv_InitNewClassFields): Removed.
* java/lang/natClassLoader.cc (_Jv_InitNewClassFields): Removed.
	(defineClass): Updated.
	(_Jv_NewClass): Likewise.
	* prims.cc (_Jv_InitPrimClass): Don't call
	_Jv_InitNewClassFields.

From-SVN: r72444
2003-10-13 22:08:51 +00:00