Commit Graph

379 Commits

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

From-SVN: r56657
2002-08-29 17:53:28 +00:00
Tom Tromey
97d8f7e7e7 Class.h: Include Package.h.
* java/lang/Class.h: Include Package.h.
	(Class::getProtectionDomain): Declare.
	(Class::getPackage): Declare.

From-SVN: r56640
2002-08-28 20:05:34 +00:00
Tom Tromey
f87999337a natConstructor.cc (newInstance): Initialize class.
* java/lang/reflect/natConstructor.cc (newInstance): Initialize
	class.
	* java/lang/reflect/natMethod.cc (invoke): Initialize class.

From-SVN: r56624
2002-08-27 23:57:17 +00:00
Mark Wielaard
6e0532cdf6 Makefile.am (libgcj_la_SOURCES): Remove name-finder.cc.
* Makefile.am (libgcj_la_SOURCES): Remove name-finder.cc.
        (core_java_source_files): Add VMThrowable.java and NameFinder.java
        (nat_source_files): Remove natThrowable.cc, add natVMThrowable.cc
        and natNameFinder.cc.
        * Makefile.in: Regenerate.
        * prims.cc: Use trace_enabled from VMThrowable.
        * name-finder.cc: Removed.
        * gcj/javaprims.h: Add class VMThrowable.
        * gnu/gcj/runtime/NameFinder.java: New file.
        * gnu/gcj/runtime/natNameFinder.cc: Likewise.
        * include/name-finder.h: Removed.
        * java/lang/Throwable.java (printStackTrace (PrintStream)): Use new
        method stackTraceString().
        (printStackTrace (PrintWriter)): Likewise.
        (stackTraceString): Complete rewrite of old printStackTrace using
        StringBuffer.
        (stackTraceStringBuffer): New helper method for stackTraceString().
        (fillInStackTrace): Delegate to VMTrowable.
        (getStackTrace): Likewise.
        (getStackTrace0): Removed.
        (trace_enabled, stackTraceBytes): Moved to new VMThrowable.java.
        (setStackTrace): Copy given array.
        * java/lang/natThrowable.cc: Removed (replaced by natVMThrowable).
        * java/lang/VMThrowable.java: New class.
        * java/lang/natVMThrowable.cc: New file.

From-SVN: r56556
2002-08-24 22:46:19 +00:00
Jesse Rosenstock
093f02000f natPosixProcess.cc (cleanup): Added `path' argument.
2002-08-14  Jesse Rosenstock  <jmr@ugcs.caltech.edu>

	* java/lang/natPosixProcess.cc (cleanup): Added `path' argument.
	(startProcess): Allocate path for chdir in async-signal-safe way.

From-SVN: r56330
2002-08-14 19:53:54 +00:00
Jesse Rosenstock
eb812b2c15 Fix for PR libgcj/7570 and PR libgcj/7578:
2002-08-13  Jesse Rosenstock  <jmr@ugcs.caltech.edu>

	Fix for PR libgcj/7570 and PR libgcj/7578:
	* java/lang/natPosixProcess.cc: Include java/io/File.h.
	(startProcess): Handle new `dir' argument.
	* java/lang/Win32Process.java (ConcreteProcess): Added `dir'
	argument.
	* java/lang/PosixProcess.java (ConcreteProcess): Added `dir'
	argument.
	(startProcess): Likewise.
	* java/lang/EcosProcess.java (ConcreteProcess): Added `dir'
	argument.
	* java/lang/Runtime.java (execInternal): Added `dir' argument.
	(exec): Don't create new environment if ENV==null.  Pass DIR to
	execInternal.
	* java/lang/natRuntime.cc: Include java/io/File.h.
	(execInternal): Added `dir' argument.

From-SVN: r56268
2002-08-14 01:07:59 +00:00
Bryce McKinlay
6ee4402c61 ClassLoader.java (getSystemClassLoader, [...]): Add javadoc from classpath.
2002-08-07  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>

	* java/lang/ClassLoader.java (getSystemClassLoader, findClass,
	defineClass, setSigners, getSystemResource, getSystemResourceAsStream,
	findResource, getResources, findResources): Add javadoc from classpath.
	(getSystemResources): Implemented.

From-SVN: r56092
2002-08-07 06:28:24 +01:00
Tom Tromey
1efccea3b1 Runtime.java (loadLibrary): Pass `true' as search argument to _load.
* java/lang/Runtime.java (loadLibrary): Pass `true' as search
	argument to _load.

From-SVN: r55727
2002-07-24 23:17:39 +00:00
Mark Wielaard
5526ddf6fd [multiple changes]
2002-07-24  Mark Wielaard  <mark@klomp.org>

	* java/lang/reflect/natField.cc (setAddr): Check isAccessible().
	* java/io/ObjectInputStream.java (setBooleanField): Before setting
	field call setAccessible(true).
	(setByteField): Likewise.
	(setCharField): Likewise.
	(setDoubleField): Likewise.
	(setFloatField): Likewise.
	(setIntField): Likewise.
	(setLongField): Likewise.
	(setShortField): Likewise.
	(setObjectField): Likewise.

2002-07-24  Tom Tromey  <tromey@redhat.com>

	* java/io/ObjectInputStream.java (readObject) [TC_ARRAY]: Don't
	use toString() to format array element.

From-SVN: r55711
2002-07-24 16:05:34 +00:00
Bo Thorsen
7b20471292 ieeefp.h: Add x86-64 support.
2002-07-19  Bo Thorsen  <bo@berlioz.suse.de>

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

From-SVN: r55588
2002-07-19 16:41:15 +02:00
Jesse Rosenstock
a5774acd55 For PR libgcj/7292:
2002-07-12  Jesse Rosenstock  <jmr@fulcrummicro.com>

	For PR libgcj/7292:
	* java/lang/Character.java (toString(char)): Now static.

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

From-SVN: r55424
2002-07-12 12:52:44 +00:00
Tony Kimball
16da5ae295 natRuntime.cc (nativeGetLibname): Added missing `#'.
2002-07-05  Tony Kimball  <alk@pobox.com>

	* java/lang/natRuntime.cc (nativeGetLibname): Added missing `#'.

From-SVN: r55280
2002-07-06 05:11:53 +00:00
Tom Tromey
0d49ec1158 re PR libgcj/7060 (getMethod() doesn't search super interface)
2002-07-04  Tom Tromey  <tromey@redhat.com>
            Jeff Sturm  <jsturm@one-point.com>

	Fix for PR libgcj/7060:
	* java/lang/Class.h (_getMethod): Renamed from getMethod.
	* java/lang/natClass.cc (_getMethod): Renamed from getMethod.
	Recurse into superinterfaces.  Don't throw NoSuchMethodException.
	* java/lang/Class.java (getMethod): New Java implementation;
	complies with spec.
	(_getMethod): New native method.

Co-Authored-By: Jeff Sturm <jsturm@one-point.com>

From-SVN: r55266
2002-07-05 20:40:11 +00:00
Tom Tromey
d74bba04e8 natPlainDatagramSocketImpl.cc (BooleanClass): Removed.
* java/net/natPlainDatagramSocketImpl.cc (BooleanClass): Removed.
	(IntegerClass): Likewise.
	* java/lang/natClass.cc (CloneableClass): Removed.
	(ObjectClass, ErrorClass, ClassClass, MethodClass, FieldClass,
	ConstructorClass): Likewise.
	* java/lang/natClassLoader.cc (CloneableClass): Removed.
	(ObjectClass, ClassClass, VMClassLoaderClass, ClassLoaderClass,
	SerializableClass): Likewise.
	* java/lang/reflect/natMethod.cc (BooleanClass): Removed.
	(VoidClass, ByteClass, ShortClass, CharacterClass, IntegerClass,
	LongClass, FloatClass, DoubleClass): Likewise.

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

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

From-SVN: r54743
2002-06-18 15:40:16 +00:00
Nathanael Nerode
8f7dfb539f ClassNotFoundException.java: New Classpath version.
2002-06-17  Nathanael Nerode  <neroden@twcny.rr.com>

	* java/lang/ClassNotFoundException.java: New Classpath version.

From-SVN: r54713
2002-06-17 19:15:22 +00:00
Tom Tromey
548ce8be4a RuntimeException.java: Re-merge with Classpath.
* java/lang/RuntimeException.java: Re-merge with Classpath.
	* java/util/ArrayList.java: Likewise.
	* java/util/Arrays.java: Likewise.
	* java/util/BitSet.java: Likewise.
	* java/util/Dictionary.java: Likewise.
	* java/util/IdentityHashMap.java: Likewise.
	* java/util/MissingResourceException.java: Likewise.
	* java/util/Observer.java: Likewise.
	* java/util/TooManyListenersException.java: Likewise.
	* java/util/zip/DataFormatException.java: Likewise.
	* java/util/zip/ZipException.java: Likewise.

From-SVN: r54680
2002-06-16 21:15:44 +00:00
Tom Tromey
3e1b181a67 AbstractMethodError.java: Re-merged with Classpath.
* java/lang/AbstractMethodError.java: Re-merged with Classpath.
	* java/lang/ArithmeticException.java: Likewise.
	* java/lang/ArrayIndexOutOfBoundsException.java: Likewise.
	* java/lang/ArrayStoreException.java: Likewise.
	* java/lang/Byte.java: Likewise.
	* java/lang/CharSequence.java: Likewise.
	* java/lang/ClassCastException.java: Likewise.
	* java/lang/ClassCircularityError.java: Likewise.
	* java/lang/ClassFormatError.java: Likewise.
	* java/lang/CloneNotSupportedException.java: Likewise.
	* java/lang/Cloneable.java: Likewise.
	* java/lang/Comparable.java: Likewise.
	* java/lang/Compiler.java: Likewise.
	* java/lang/Error.java: Likewise.
	* java/lang/ExceptionInInitializerError.java: Likewise.
	* java/lang/IllegalAccessError.java: Likewise.
	* java/lang/IllegalAccessException.java: Likewise.
	* java/lang/IllegalArgumentException.java: Likewise.
	* java/lang/IllegalMonitorStateException.java: Likewise.
	* java/lang/IllegalStateException.java: Likewise.
	* java/lang/IllegalThreadStateException.java: Likewise.
	* java/lang/IncompatibleClassChangeError.java: Likewise.
	* java/lang/IndexOutOfBoundsException.java: Likewise.
	* java/lang/InheritableThreadLocal.java: Likewise.
	* java/lang/InstantiationError.java: Likewise.
	* java/lang/InstantiationException.java: Likewise.
	* java/lang/InternalError.java: Likewise.
	* java/lang/InterruptedException.java: Likewise.
	* java/lang/LinkageError.java: Likewise.
	* java/lang/NegativeArraySizeException.java: Likewise.
	* java/lang/NoClassDefFoundError.java: Likewise.
	* java/lang/NoSuchFieldError.java: Likewise.
	* java/lang/NoSuchFieldException.java: Likewise.
	* java/lang/NoSuchMethodError.java: Likewise.
	* java/lang/NoSuchMethodException.java: Likewise.
	* java/lang/NullPointerException.java: Likewise.
	* java/lang/NumberFormatException.java: Likewise.
	* java/lang/OutOfMemoryError.java: Likewise.
	* java/lang/Process.java: Likewise.
	* java/lang/Runnable.java: Likewise.
	* java/lang/RuntimePermission.java: Likewise.
	* java/lang/SecurityException.java: Likewise.
	* java/lang/Short.java: Likewise.
	* java/lang/StackOverflowError.java: Likewise.
	* java/lang/StringIndexOutOfBoundsException.java: Likewise.
	* java/lang/ThreadDeath.java: Likewise.
	* java/lang/ThreadLocal.java: Likewise.
	* java/lang/UnknownError.java: Likewise.
	* java/lang/UnsatisfiedLinkError.java: Likewise.
	* java/lang/UnsupportedClassVersionError.java: Likewise.
	* java/lang/UnsupportedOperationException.java: Likewise.
	* java/lang/VerifyError.java: Likewise.
	* java/lang/VirtualMachineError.java: Likewise.
	* java/lang/reflect/InvocationTargetException.java: Likewise.
	* java/net/BindException.java: Likewise.
	* java/net/ConnectException.java: Likewise.
	* java/net/MalformedURLException.java: Likewise.
	* java/net/NoRouteToHostException.java: Likewise.
	* java/net/ProtocolException.java: Likewise.
	* java/net/SocketException.java: Likewise.
	* java/net/UnknownHostException.java: Likewise.
	* java/net/UnknownServiceException.java: Likewise.

From-SVN: r54656
2002-06-15 19:45:34 +00:00
Tom Tromey
93f7aeea7a natString.cc (init): Handle case where DONT_COPY is true and OFFSET!=0.
* java/lang/natString.cc (init): Handle case where DONT_COPY is
	true and OFFSET!=0.
	* java/lang/String.java (String(char[],int,int,boolean): New
	constructor.
	* java/lang/Long.java: Imported new version from Classpath.
	* java/lang/Number.java: Likewise.
	* java/lang/Integer.java: Likewise.
	* java/lang/Long.java: Likewise.
	* java/lang/Float.java: Likewise.
	* java/lang/Boolean.java: Likewise.
	* java/lang/Double.java: Likewise.
	* java/lang/Void.java: Likewise.

From-SVN: r54595
2002-06-13 18:16:26 +00:00
Tom Tromey
419831367f Class.h (Class::desiredAssertionStatus): Declare.
* java/lang/Class.h (Class::desiredAssertionStatus): Declare.
	(Class::getPackagePortion): Likewise.
	* java/lang/Class.java (desiredAssertionStatus): New method from
	Classpath.
	(getPackagePortion): Likewise.
	* java/lang/VMClassLoader.java (defaultAssertionStatus,
	packageAssertionStatus, classAssertionStatus): New methods from
	Classpath.
	* java/lang/ClassLoader.java (defaultAssertionStatus,
	systemPackageAssertionStatus, packageAssertionStatus,
	systemClassAssertionStatus, classAssertionStatus): New fields from
	Classpath.
	(setDefaultAssertionStatus, setPackageAssertionStatus,
	setClassAssertionStatus, clearAssertionStatus): New methods from
	Classpath.
	* Makefile.in: Rebuilt.
	* Makefile.am (core_java_source_files): Added AssertionError.java.
	* java/lang/AssertionError.java: New from Classpath.

From-SVN: r54517
2002-06-11 17:33:22 +00:00
Bryce McKinlay
f5fa9bc199 natThrowable.cc (fillInStackTrace): Use "stackTraceBytes", not "stackTrace".
* java/lang/natThrowable.cc (fillInStackTrace): Use "stackTraceBytes",
        not "stackTrace".

From-SVN: r53857
2002-05-24 23:31:23 +01:00
Bryce McKinlay
4fbecd2944 Merge JDK 1.4 exception chaining support from classpath.
* java/lang/Throwable.java: Merge 1.4 support from classpath.
	(stackTraceBytes): Rename from stackTrace.
	* java/lang/Exception.java: Merge from classpath.
	* java/lang/StackTraceElement: New file from classpath.
	* gcj/javaprims.h: Rebuild CNI namespace declarations.
	* Makefile.am: Add StackTraceElement.
	* Makefile.in: Rebuilt.

From-SVN: r53836
2002-05-24 11:40:47 +01:00
Tom Tromey
e86c533b01 natRuntime.cc: Don't include sys/time.h and time.h.
* java/lang/natRuntime.cc: Don't include sys/time.h and time.h.
	* java/util/natTimeZone.cc: Include sys/time.h and time.h here.
	Include platform.h.

From-SVN: r53443
2002-05-14 05:29:30 +00:00
Tom Tromey
8639786815 re PR libgcj/6389 (System.getProperty("") should always throw an IllegalArgumentException)
Fixes PR libgcj/6389:
	* Makefile.in: Rebuilt.
	* Makefile.am (nat_source_files): Added natTimeZone.cc.
	* java/util/natTimeZone.cc: New file.
	* java/util/TimeZone.java (getDefaultTimeZoneId): New method.
	* java/lang/System.java: Merged with Classpath.
	* java/lang/Runtime.java: Merged with Classpath.
	* java/lang/natSystem.cc (setErr0): Renamed from setErr; don't run
	security check.
	(setIn0): Renamed from setIn; don't run security check.
	(setOut0): Renamed from setOut; don't run security check.
	(file_encoding, getpwuid_adaptor, getSystemTimeZone,
	init_properties): Moved to natRuntime.cc.
	Moved many includes to natRuntime.cc.
	(isWordsBigEndian): New method.
	* java/lang/natRuntime.cc: Include Long.h, also other includes
	previously in natSystem.cc.
	(maxMemory): New function.
	(exitInternal): Renamed from `_exit'.
	(exit): Removed.
	(init): Don't set finalize_on_exit.
	(exitInternal): Use `finalizeOnExit'.
	(file_encoding, getpwuid_adaptor): New functions from
	natSystem.cc.
	(insertSystemProperties): New method, renamed from
	System::init_properties.  Don't set user.timezone.
	(_load): Don't call checkLink.
	(execInternal): New method.
	(availableProcessors): Likewise.
	(nativeGetLibname): Likewise.

From-SVN: r53429
2002-05-13 20:10:37 +00:00
Tom Tromey
5d243e08b8 * java/lang/natString.cc (unintern): Fixed typo.
From-SVN: r53265
2002-05-07 19:07:07 +00:00
David Billinghurst
0659e0e3df natSystem.cc (getSystemTimeZone): Use HAVE_UNDERSCORE_TIMEZONE.
2002-05-03  David Billinghurst  <David.Billinghurst@riotinto.com>
	    Tom Tromey  <tromey@redhat.com>

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

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

From-SVN: r53117
2002-05-03 20:17:48 +00:00
Gerhard Tonn
f736fd67c0 ieeefp.h: Define __IEEE_BIG_ENDIAN for S/390.
2002-04-29  Gerhard Tonn  <GerhardTonn@swol.de>

	* java/lang/ieeefp.h: Define __IEEE_BIG_ENDIAN for S/390.

From-SVN: r52874
2002-04-29 05:15:57 +01:00
Adam King
ddfb5e0b69 natDouble.cc (parseDouble): Allow a number to end with the f/F/d/D modifiers.
2002-04-13  Adam King <aking@dreammechanics.com>

        * java/lang/natDouble.cc (parseDouble): Allow a number to end with
        the f/F/d/D modifiers.

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

From-SVN: r52144
2002-04-10 20:36:04 +00:00
Adam King
455cd615c2 natSystem.cc (init_properties): Call new function _Jv_platform_initProperties.
2002-04-07  Adam King <aking@dreammechanics.com>

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

From-SVN: r51989
2002-04-07 12:27:00 +01:00
Mark Wielaard
e45a3a5910 * java/lang/Character,java (isDefined): getType() != UNASSIGNED.
From-SVN: r51982
2002-04-07 07:45:06 +00:00
Mark Wielaard
2801df0ed6 Modifier.java (toString(int,StringBuffer)): Fix ordering.
* java/lang/reflect/Modifier.java (toString(int,StringBuffer)): Fix
        ordering.

From-SVN: r51848
2002-04-04 08:32:28 +00:00
Tom Tromey
c544921cc0 natClassLoader.cc (findClass): Compare against 3', not 0'.
* java/lang/natClassLoader.cc (findClass): Compare against `3',
	not `0'.

From-SVN: r51764
2002-04-02 22:20:30 +00:00
Bryce McKinlay
1b5a2139c7 natSystem.cc (init_properties): Update VM version properties.
* java/lang/natSystem.cc (init_properties): Update VM version
	properties.
	* configure.in: Set GCJVERSION.
	* acconfig.h: Add GCJVERSION.
	* configure: Rebuilt.
	* include/config.h.in: Rebuilt.

From-SVN: r50944
2002-03-18 06:19:03 +00:00
Anthony Green
a46ccd1b47 Add arm thumb support
From-SVN: r50920
2002-03-17 16:18:53 +00:00
Tom Tromey
0c1fcb02b1 Win32Process.java: Added comment.
* java/lang/Win32Process.java: Added comment.
	* include/posix.h (_Jv_platform_close_on_exec): New function.
	Include fcntl.h.
	* include/win32.h (_Jv_platform_close_on_exec): New function.
	* java/net/natPlainSocketImpl.cc (create): Set close-on-exec
	flag.
	(accept): Likewise.
	* java/net/natPlainDatagramSocketImpl.cc (create): Set
	close-on-exec flag.
	* java/io/natFileDescriptorPosix.cc (open): Set close-on-exec
	flag.

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

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

From-SVN: r50523
2002-03-10 03:53:16 +00:00
Adam Megacz
abfabb9850 Win32Process.java (ConcreteProcess): Now throws an IOException so that Throwable.printStackTrace fails correctly.
2002-03-09  Adam Megacz  <adam@xwt.org>

        * java/lang/Win32Process.java (ConcreteProcess): Now throws an
        IOException so that Throwable.printStackTrace fails correctly.

From-SVN: r50488
2002-03-09 08:47:40 +00:00
Adam Megacz
8eeda6e0e7 win32.cc (_Jv_platform_gettimeofday): Now takes no args, returns jlong.
2002-03-07  Adam Megacz  <adam@xwt.org>

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

From-SVN: r50416
2002-03-08 01:03:56 +00:00
Eric Blake
1fa782725c unicode-decomp.pl: Move from chartables.pl...
2002-03-04  Eric Blake  <ebb9@email.byu.edu>

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

From-SVN: r50368
2002-03-06 18:54:45 +00:00
Tom Tromey
355526af2b natPosixProcess.cc (fail): Removed.
* java/lang/natPosixProcess.cc (fail): Removed.
	(startProcess): Simplified error-handling.  Preserve
	LD_LIBRARY_PATH across exec.

From-SVN: r50342
2002-03-06 05:13:58 +00:00
Anthony Green
562ff1637f Add pointer support to the reflection code.
From-SVN: r50180
2002-03-01 05:36:31 +00:00
Tom Tromey
fc04b455f9 natSystem.cc (init_properties): Use __VERSION__.
* java/lang/natSystem.cc (init_properties): Use __VERSION__.
	* gij.cc (version): Use __VERSION__.
	* include/config.h.in: Rebuilt.
	* acconfig.h (GCJVERSION): Removed.
	* configure: Rebuilt.
	* configure.in (GCJVERSION): Removed.

From-SVN: r50088
2002-02-27 05:32:29 +00:00
Tom Tromey
7fe4a89aed natPosixProcess.cc (startProcess): Use FD_CLOEXEC, not `1'.
* java/lang/natPosixProcess.cc (startProcess): Use FD_CLOEXEC, not
	`1'.

From-SVN: r50081
2002-02-27 01:39:30 +00:00
Adam Megacz
f5d8c6600c Win32Process.java: Created a dummy class to allow build process to run to completion.
2002-02-24  Adam Megacz  <adam@xwt.org>

        * java/lang/Win32Process.java: Created a dummy class to allow
        build process to run to completion.

From-SVN: r50013
2002-02-24 23:17:26 +00:00
Jeff Sturm
a7261b2da0 natMethod.cc (_Jv_CallAnyMethodA): Define ffi_result union for ffi_call result.
* java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA):
        Define ffi_result union for ffi_call result.  Cast
        ffi_result members to jvalue.

From-SVN: r50007
2002-02-24 17:55:44 +00:00
Tom Tromey
1a77d3ba32 natSystem.cc (init_properties): Include the `Inc.' in java.vendor and java.vm.vendor.
* java/lang/natSystem.cc (init_properties): Include the `Inc.' in
	java.vendor and java.vm.vendor.
	* gnu/java/rmi/rmic/RMIC.java (parseOptions): Only print most
	recent copyright date.
	* gnu/gcj/convert/Convert.java (version): Print `Inc'.
	* gij.cc (version): Print `Inc'.

From-SVN: r49975
2002-02-22 23:24:45 +00:00
Bryce McKinlay
15b28697de Makefile.in: Rebuilt with Eric's change below.
* Makefile.in: Rebuilt with Eric's change below.

	* java/lang/natMath.cc (abs(jdouble), abs(jfloat), round(jfloat),
	round(jdouble), min(jfloat), max(jfloat), min(jdouble), min(jfloat)):
	Removed functions which are now implemented in Math.java.

From-SVN: r49782
2002-02-15 05:53:29 +00:00