aboutsummaryrefslogtreecommitdiff
path: root/libjava/include
AgeCommit message (Collapse)AuthorFilesLines
2001-05-18posix-threads.h (_Jv_CondInit): `0' used in place of `NULL.'Alexandre Petit-Bianco1-2/+2
2001-05-18 Alexandre Petit-Bianco <apbianco@redhat.com> * include/posix-threads.h (_Jv_CondInit): `0' used in place of `NULL.' (_Jv_MutexInit): Likewise. (http://gcc.gnu.org/ml/java-patches/2001-q2/msg00245.html ) From-SVN: r42303
2001-05-18[multiple changes]Bryce McKinlay1-3/+0
2001-05-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * include/jvm.h: Move "#pragma GCC java_exceptions" to ... * gcj/javaprims.h: ... here. * gnu/gcj/io/shs.cc: Add "#pragma GCC java_exceptions". 2001-05-17 Martin Kahlert <martin.kahlert@infineon.com> * java/lang/natClass.cc (_Jv_FindIIndex): Fix an off by one error with length of ioffset table. (_Jv_IsAssignableFrom): Likewise. From-SVN: r42248
2001-05-13except.c (choose_personality_routine): Export.Zack Weinberg1-0/+3
gcc/cp: * except.c (choose_personality_routine): Export. Add explanatory comment. Take an enum languages, not a boolean. (initialize_handler_parm): Adjust to match. * cp-tree.h: Prototype choose_personality_routine. * lex.c (handle_pragma_java_exceptions): New function. (init_cp_pragma): Register #pragma GCC java_exceptions. gcc: * extend.texi: Document #pragma GCC java_exceptions. libjava: * Makefile.am (libgcj_la_OBJECTS): Remove libsupc++convenience.la. * Makefile.in: Regenerate (by hand). * include/jvm.h: Add #pragma GCC java_exceptions at top of file. * doc/cni.sgml: Document #pragma GCC java_exceptions. From-SVN: r42027
2001-04-27jni.h (struct JNINativeInterface): Fixed types in Get/Set*ArrayRegion ↵Tom Tromey1-43/+43
declarations. 2001-04-27 Martin Kahlert <martin.kahlert@infineon.com> * include/jni.h (struct JNINativeInterface): Fixed types in Get/Set*ArrayRegion declarations. (class _Jv_JNIEnv): Likewise. From-SVN: r41633
2001-04-04Makefile.am (AUTOMAKE_OPTIONS): Remove no-installinfo.Andreas Jaeger2-12/+9
2001-04-04 Andreas Jaeger <aj@suse.de> * gcj/Makefile.am (AUTOMAKE_OPTIONS): Remove no-installinfo. * gcj/Makefile.in: Rebuilt. * Makefile.am (AUTOMAKE_OPTIONS): Remove no-installinfo. * Makefile.in: Rebuilt. * testsuite/Makefile.am (AUTOMAKE_OPTIONS): Remove no-installinfo. * testsuite/Makefile.in: Rebuild. * include/Makefile.am (AUTOMAKE_OPTIONS): Remove no-installinfo. * include/Makefile.in: Rebuild. From-SVN: r41100
2001-04-011.3-Compliant Implementation of java.io.File.Bryce McKinlay1-3/+9
* java/lang/natSystem.cc (init_properties): Get "file.separator", "path.separator", and "java.io.tmpdir" from the File class, instead of setting them explicitly. * java/io/File.java: Do not canonicalize paths for security manager checks. Call init_native() from static initializer. Do not pass path argument to native methods. New native method declarations. Some security manager checks moved to checkWrite(). (equals): Check file system case sensitivity and act appropriatly. (hashCode): Likewise. (isHidden): New method implemented. (performList): Changed prototype. Now takes a class argument specifying the class of the returned array: Strings or File objects. Also added FileFilter argument. (listFiles): New variants with "File" return type implemented. (createTempFile): Use createNewFile(). Use maxPathLen. (setReadOnly): New method implemented. (listRoots): Likewise. (compareTo): Likewise. (setLastModified): Likewise. (checkWrite): New method. (setPath): Removed. * java/io/natFile.cc: Various functions no longer take canonical path argument. (stat): Handle ISHIDDEN query. (isAbsolute): Remove WIN32 cruft. (performList): New arguments. Handle returning either File[] or String[] arrays. Check with FileFilter or FilenameFilter arguments as appropriate. Use an ArrayList, not a Vector, for the temporary list. (performSetReadOnly): New method implemented. (performListRoots): Likewise. (performSetLastModified): Likewise. (performCreate): Likewise. (init_native): New initialization function. * java/io/natFileWin32.cc: Various functions no longer take canonical path argument. (stat): Add FIXME about ISHIDDEN query. (performList): New arguments. Handle returning either File[] or String[] arrays. Check with FileFilter or FilenameFilter arguments as appropriate. Use an ArrayList, not a Vector, for the temporary list. (performSetReadOnly): New. Stubbed. (performListRoots): Likewise. (performSetLastModified): Likewise. (performCreate): Likewise. (init_native) New initialization function. * configure.in: Check for utime() and chmod(). * configure: Rebuilt. * include/config.h.in: Rebuilt. Resolves PR libgcj/1759. From-SVN: r40985
2001-03-23jni.cc (_Jv_JNI_GetAnyFieldID): Handle unresolved fields.Tom Tromey2-3/+3
* jni.cc (_Jv_JNI_GetAnyFieldID): Handle unresolved fields. * java/lang/reflect/natField.cc (getType): Use _Jv_ResolveField unconditionally. * include/jvm.h (_Jv_ResolveField): Declare. * include/java-interp.h (_Jv_ResolveField): Don't declare. * resolve.cc (_Jv_ResolveField): No longer conditional on INTERPRETER. From-SVN: r40785
2001-03-21configure: Rebuilt.Tom Tromey1-1/+0
* configure: Rebuilt. * configure.in (GCJFLAGS): Subst. * Makefile.in: Rebuilt. * Makefile.am (jv_convert_LDFLAGS): Added -shared-libgcc. (gij_LDFLAGS): Likewise. (JC1FLAGS): Added GCJFLAGS and removed -g. From-SVN: r40700
2001-02-23Change to sometimes include class name in ClassFormatError message.Per Bothner1-5/+5
From-SVN: r40030
2001-02-15i386-signal.h (INIT_SEGV): Use a direct system call to set the handler.Andrew Haley1-1/+1
2001-02-14 Andrew Haley <aph@redhat.com> * include/i386-signal.h (INIT_SEGV): Use a direct system call to set the handler. From-SVN: r39724
2001-01-302001-01-26 Andrew Haley <aph@redhat.com>Andrew Haley1-2/+16
(INIT_FPE): Use a direct system call to set the handler. From-SVN: r39354
2001-01-12natSystem.cc: Include locale.h if it exists.Tom Tromey1-0/+3
* java/lang/natSystem.cc: Include locale.h if it exists. * configure: Rebuilt. * configure.in: Check for locale.h. From-SVN: r38957
2000-12-30For boehm-gc:Bryce McKinlay3-4/+11
* configure.in: Rename THREADLIB to THREADLIBS. * Makefile.am (LINK): Add $(THREADLIBS) to libtool command line. This ensures that we link the correct version of the linuxthreads semaphore functions. * Makefile.in: Rebuilt. * configure: Rebuilt. * linux_thread.c (GC_thr_init, GC_suspend_handler): Add SIGABRT to the list of signals which are not blocked during suspend in the NO_SIGNALS case. For libjava: * Makefile.am (libgcj_la_LIBADD): Add $(THREADLIBS). This ensures that the correct versions of various linuxthreads functions get linked. * Makefile.in: Rebuilt. * java/lang/natThread.cc (finalize_native): New static function. Call _Jv_ThreadDestroyData. (initialize_native): Register finalizer for "data". * include/posix-threads.h (_Jv_ThreadInitData): New simpler prototype. (_Jv_ThreadDestroyData): New prototype. * include/win32-threads.h: Ditto. * include/no-threads.h: Ditto. * posix-threads.cc (_Jv_ThreadInitData): Implement new prototype. (_Jv_ThreadDestroyData): New function. Free native thread "data" and move mutex and condition variable destroy code from: (really_start): ...here. (_Jv_ThreadStart): Set PTHREAD_CREATE_DETACHED. * win32-threads.cc (_Jv_ThreadInitData): Implement new prototype. (_Jv_ThreadDestroyData): Implemented. * nogc.cc (_Jv_AllocObject): Use "void *" not "ptr_t". (_Jv_AllocArray): Ditto. From-SVN: r38557
2000-11-29natSystem.cc (init_properties): Set user.language and user.region.Bryce McKinlay1-0/+6
2000-11-29 Bryce McKinlay <bryce@albatross.co.nz> * java/lang/natSystem.cc (init_properties): Set user.language and user.region. * configure.in: Check for setlocale. * configure: Rebuilt. * include/config.h.in: Rebuilt. From-SVN: r37842
2000-11-27Makefile.in: Rebuilt.Tom Tromey1-0/+1
* Makefile.in: Rebuilt. * Makefile.am (core_java_source_files): Added RuntimePermission.java. * java/lang/RuntimePermission.java: Imported from Classpath. * java/lang/Thread.java (getContextClassLoader): Now synchronized. Added security code. (setContextClassLoader): Likewise. From-SVN: r37772
2000-10-09re GNATS libgcj/341 (Throwable.printStackTrace() isn't working)Bryce McKinlay1-3/+0
2000-10-09 Bryce McKinlay <bryce@albatross.co.nz> * include/jvm.h: Enable __builtin_expect(). * name-finder.cc (lookup): Don't trust dladdr() if the address is from the main program. Fix for PR libgcj/341. From-SVN: r36794
2000-10-06Rebuilt Makefile.insTom Tromey1-1/+5
From-SVN: r36741
2000-10-06natField.cc (BooleanClass): Don't define.Tom Tromey1-2/+2
* java/lang/reflect/natField.cc (BooleanClass): Don't define. * java/lang/reflect/natArray.cc (BooleanClass): Don't define. * java/lang/Class.h (Object): Added `class$' field. * java/lang/Object.h (Object): Added `class$' field. * defineclass.cc (ClassClass): Use `class$' form. (ClassObject): Likewise. * resolve.cc (ClassObject): Use `class$' form. (ObjectClass): Likewise. * interpret.cc (ClassError): Removed. * java/net/natPlainDatagramSocketImpl.cc (BooleanClass): Use `class$' form. (IntegerClass): Likewise. * java/net/natPlainSocketImpl.cc (BooleanClass): Use `class$' form. * java/lang/natClassLoader.cc (CloneableClass): Use `class$' form. (ObjectClass, ClassClass, VMClassLoaderClass, ClassLoaderClass, SerializableClass): Likewise. Include Serializable.h, Cloneable.h. * java/lang/natSystem.cc (SystemClass): Removed. (init_properties): Use `class$' form. * java/lang/natObject.cc (CloneableClass): Removed. (clone): Use `class$' form. * java/lang/natClass.cc (CloneableClass): Use `class$' form. (ObjectClass, ErrorClass, ClassClass, MethodClass, FieldClass, ConstructorClass): Likewise. * java/lang/reflect/natMethod.cc (ObjectClass): Use `class$' form. (ClassClass, VoidClass, ByteClass, ShortClass, CharacterClass, IntegerClass, LongClass, FloatClass, DoubleClass): Likewise. * java/io/natObjectInputStream.cc (ObjectClass): Use `class$' form. (ClassClass): Likewise. * include/jvm.h (StringClass): Use `class$' form. * prims.cc (ObjectClass): Removed. (_Jv_RunMain): Use `class$' form. (_Jv_AllocObject): Likewise. * jni.cc (ClassClass): Use `class$' form. (ThrowableClass): Likewise. (ObjectClass): Likewise. (MethodClass): Likewise. (ThreadGroupClass): Likewise. (NativeThreadClass): Likewise. * boehm.cc (ObjectClass): Removed. (ClassClass): Removed. (_Jv_MarkObj): Use `class$' form. * gcj/field.h (JvFieldIsRef): Use `class$' form. Include RawData.h. From-SVN: r36740
2000-09-30Implement bitmap descriptor based marking for Boehm GC.Hans Boehm1-4/+11
2000-09-30 Hans Boehm <boehm@acm.org> Bryce McKinlay <bryce@albatross.co.nz> Implement bitmap descriptor based marking for Boehm GC. * configure.in: Define JC1GCSPEC. Set it if boehm-gc is used. * configure: Rebuilt. * libgcj.spec.in: Pass JC1GCSPEC to jc1. * include/jvm.h (struct _Jv_VTable): New field `gc_descr'. New inline method get_finalizer(). (struct _Jv_ArrayVTable): Ditto. Declare method array with NUM_OBJECT_METHODS elements instead of NUM_OBJECT_METHODS + 1. (_Jv_AllocObj): Add new jclass parameter. (_Jv_AllocArray): Ditto. (_Jv_BuildGCDescr): New prototype. * prims.cc (_Jv_AllocObject): Rename parameter `c' to `klass'. Pass `klass' to _Jv_AllocObj. Don't set the new object's vtable. Use get_finalizer() instead of direct finalizer vtable offset. (_Jv_NewObjectArray): Rename parameter `clas' to `klass'. Pass `klass' to _Jv_AllocArray. Don't set the new array's vtable. (_Jv_NewPrimArray): Call _Jv_FindArrayClass before _Jv_AllocObj. Pass `klass' to _Jv_AllocObj. Don't set the new array's vtable. * resolve.cc (METHOD_NOT_THERE, METHOD_INACCESSIBLE): New #defines. (_Jv_ResolvePoolEntry): Use METHOD_NOT_THERE and METHOD_INACCESSIBLE. (_Jv_DetermineVTableIndex): Ditto. (_Jv_PrepareClass): Ditto. Remove offset-by-one adjustments from vtable calculations to account for new gc_descr field. * boehm.cc: #include gc_gcj.h. (obj_kind_x, obj_free_list): `#if 0'-ed away. (_Jv_MarkObj): Check that vtable doesn't point to a cleared object. New commentary from HB. Mark the classes vtable. (_Jv_MarkArray): Check that vtable doesn't point to a cleared object. (GC_DEFAULT_DESCR): New #define. (_Jv_BuildGCDescr): New function. Use GC_DEFAULT_DESCR, for now. (_Jv_AllocObj): New parameter `klass'. Use GC_GCJ_MALLOC (). (_Jv_AllocArray): New parameter `klass'. Allocate with GC_MALLOC and scan conservativly if size is less than min_heap_addr. Set vtable pointer of new object before returning. (_Jv_AllocBytes): Use GC_MALLOC_ATOMIC, not GC_GENERIC_MALLOC. (_Jv_InitGC): Call GC_init_gcj_malloc(). Don't set up marking and allocation for obj_kind_x. * nogc.cc (_Jv_BuildGCDescr): New function. Return 0. (_Jv_AllocObj): Set vtable on returned object. (_Jv_AllocArray): Ditto. * java/lang/Class.h (_Jv_NewObjectArray): No longer a friend. (_Jv_NewPrimArray): Ditto. (_Jv_AllocObj): Declare as a friend. (_Jv_AllocArray): Ditto. * java/lang/natClassLoader.cc (_Jv_FindArrayClass): Copy gc_descr from &ObjectClass into new array class. Remove offset-by-one adjustments from `method' size calculations to account for gc_descr field. Co-Authored-By: Bryce McKinlay <bryce@albatross.co.nz> From-SVN: r36679
2000-09-11BytesToUnicode.java (getDefaultDecoder): Let default decoder use iconv.Tom Tromey1-0/+6
* gnu/gcj/convert/BytesToUnicode.java (getDefaultDecoder): Let default decoder use iconv. * gnu/gcj/convert/UnicodeToBytes.java (getDefaultEncoder): Let default encoder use iconv. * configure: Rebuilt. * configure.in: Check for nl_langinfo and <langinfo.h>. * java/lang/natSystem.cc (file_encoding): New function. (DEFAULT_FILE_ENCODING): Define to file_encoding() if possible. From-SVN: r36306
2000-09-06jvm.h (_Jv_HashCode): Cast object ptr to `unsigned long' to avoid long long ↵Jeff Sturm1-2/+3
division. 2000-09-06 Jeff Sturm <jeff.sturm@appnet.com> * include/jvm.h (_Jv_HashCode): Cast object ptr to `unsigned long' to avoid long long division. From-SVN: r36215
2000-08-30Makefile.in: Rebuilt.Tom Tromey1-2/+2
* Makefile.in: Rebuilt. * Makefile.am (AM_CXXFLAGS): Added -fdollars-in-identifiers. From-SVN: r36069
2000-08-26Makefile.in: Rebuilt.Anthony Green1-2/+2
2000-08-26 Anthony Green <green@redhat.com> * Makefile.in: Rebuilt. * Makefile.am (java/lang/ClassLoader.h): Make _Jv_RunMain a friend. * prims.cc: Include ClassLoader.h. (_Jv_RunMain): When executing jar files, classpath must be the jar file only. Lose our reference to the system ClassLoader in order to get a new one with the correct classpath. * java/lang/natSystem.cc (init_properties): When executing a jar file, only use the jar file for java.class.path. * gnu/gcj/runtime/VMClassLoader.java: Use the canonical file name for bytecode archives. * gnu/gcj/runtime/FirstThread.java: Handle case where manifest exists, but not Main-Class. From-SVN: r35999
2000-08-22Makefile.in: Rebuilt.Mark Wielaard1-2/+2
2000-08-21 Mark Wielaard <mark@klomp.org> * Makefile.in: Rebuilt. * Makefile.am (java/lang/reflect/Constructor.h): Declare Class as a `friend class'. (java/lang/reflect/Field.h): Likewise. (java/lang/reflect/Method.h): Likewise. (gnu/gcj/runtime/VMClassLoader.h): Declare ClassLoader as a `friend class'. From-SVN: r35863
2000-08-21natSystem.cc (init_properties): Change sourceware reference to ↵Anthony Green2-1/+4
sources.redhat.com. Sun Aug 20 21:02:48 2000 Anthony Green <green@redhat.com> * java/lang/natSystem.cc (init_properties): Change sourceware reference to sources.redhat.com. * include/java-props.h: Add _Jv_Jar_Class_Path. * prims.cc: Ditto. Set it from `gij -jar file' option. * java/lang/natSystem.cc (init_properties): Set java.class.path from {gij -jar file}:{CLASSPATH variable}:{-Djava.class.path= or .} * java/util/PropertyPermission.java: Import from GNU Classpath. * Makefile.in: Rebuilt. * Makefile.am: Add java/util/PropertyPermission.java. * java/lang/System.java: Add setProperty method. * gij.cc (main): Add -jar option to execute jar files. (help): Describe -jar option. * prims.cc (_Jv_RunMain): Add support for jar execution mode. * gnu/gcj/tools/Gij.java: New file. * include/jvm.h: Add is_jar argument to _Jv_RunMain. * gnu/gcj/runtime/FirstThread.java (main): New method. * java/util/jar/Attributes.java: Correct comment spelling. From-SVN: r35829
2000-08-19Attributes.java, [...]: Imported from Classpath.Anthony Green1-2/+2
Sat Aug 19 11:00:53 2000 Anthony Green <green@redhat.com> * java/util/jar/Attributes.java, java/util/jar/JarEntry.java, java/util/jar/JarException.java, java/util/jar/JarFile.java, java/util/jar/JarInputStream.java, java/util/jar/JarOutputStream.java, java/util/jar/Manifest.java, java/util/Set.java, java/util/Map.java, java/util/Bucket.java, java/util/AbstractSet.java, java/util/BasicMapEntry.java, java/security/cert/CRL.java, java/security/cert/CRLException.java, java/security/cert/Certificate.java, java/security/cert/CertificateEncodingException.java, java/security/cert/CertificateException.java, java/security/cert/CertificateExpiredException.java, java/security/cert/CertificateFactory.java, java/security/cert/CertificateFactorySpi.java, java/security/cert/CertificateNotYetValidException.java, java/security/cert/CertificateParsingException.java, java/security/cert/X509CRL.java, java/security/cert/X509CRLEntry.java, java/security/cert/X509Certificate.java, java/security/cert/X509Extension.java: Imported from Classpath. * java/util/Hashtable.java: Imported from Classpath. * java/util/zip/ZipInputStream.java: Create stub for createZipEntry. * gcj/javaprims.h: Updated class list. * Makefile.in, gcj/Makefile.in: Rebuilt. * Makefile.am (ordinary_java_source_files): Add these new classes. From-SVN: r35809
2000-08-16jvm.h (_Jv_HashCode): New hash code.Andrew Haley1-1/+3
2000-08-15 Andrew Haley <aph@cygnus.com> * include/jvm.h (_Jv_HashCode): New hash code. From-SVN: r35744
2000-08-02Makefile.in: Rebuilt.Tom Tromey1-0/+27
* Makefile.in: Rebuilt. * Makefile.am (libgcj_la_SOURCES): Added posix.cc. * java/net/natPlainSocketImpl.cc: Include posix.h. (accept): Use _Jv_select. * java/net/natPlainDatagramSocketImpl.cc: Include posix.h. (receive): Use _Jv_select. * java/io/natFileDescriptorPosix.cc: Include posix.h. (available): Use _Jv_select. * java/lang/natSystem.cc: Include posix.h. (currentTimeMillis): Use _Jv_gettimeofday. * include/posix.h: New file. * posix.cc: New file. From-SVN: r35435
2000-06-30* include/jni.h: Include <gcj/array.h>. Fixes PR libgcj/270.Tom Tromey1-0/+1
From-SVN: r34818
2000-06-16re GNATS libgcj/261 (Macro-inconsistency)Tom Tromey2-4/+4
Fix for PR libgcj/261: * include/win32-signal.h (MAKE_THROW_FRAME): Added `_exception' argument. * include/sparc-signal.h (MAKE_THROW_FRAME): Added `_exception' argument. (This is a patch from long ago that somehow went missing.) From-SVN: r34575
2000-05-31prims.cc (DECLARE_PRIM_TYPE): Define a vtable as well.Tom Tromey1-0/+12
* prims.cc (DECLARE_PRIM_TYPE): Define a vtable as well. (_Jv_PrimClass): Set `methods' by calling _Jv_FindArrayClass. * include/jvm.h (struct _Jv_ArrayVTable): Declare. (NUM_OBJECT_METHODS): New define. * java/lang/natClassLoader.cc (_Jv_FindArrayClass): Added `array_vtable' parameter. Added assertion. * java/lang/Class.h (_Jv_FindArrayClass): Added `array_vtable' parameter. From-SVN: r34312
2000-05-30name-finder.h: Include <sys/wait.h>.Tom Tromey1-3/+7
* include/name-finder.h: Include <sys/wait.h>. (_Jv_name_finder::pid): Now of type `pid_t'. (_Jv_name_finder::~_Jv_name_finder): Call waitpid(). * java/lang/Throwable.java (CPlusPlusDemangler.close): Call `proc.waitFor()'. From-SVN: r34279
2000-05-19Jumbo patch:Tom Tromey4-7/+14
* Imported beans and serialization * Updated IA-64 port * Miscellaneous bug fixes From-SVN: r34028
2000-05-16ppc-signal.h: New file.Andrew Haley1-0/+115
2000-05-15 Andrew Haley <aph@cygnus.com> * include/ppc-signal.h: New file. From-SVN: r33932
2000-04-27Runtime support for PR gcj/2:Tom Tromey1-0/+1
* prims.cc (_Jv_ThrowNullPointerException): New function. * include/jvm.h (_Jv_ThrowNullPointerException): Declare. From-SVN: r33492
2000-04-22+ 2000-04-22 Anthony Green <green@cygnus.com> + + * include/jvm.h ↵Anthony Green3-4/+7
(__builtin_expect): Define as unused for now. + 2000-04-22 Anthony Green <green@cygnus.com> + + * include/jvm.h (__builtin_expect): Define as unused for now. + * java/lang/natObject.cc (_Jv_MonitorEnter): Add __builtin_expect. + (notify): Ditto. + (notifyAll): Ditto. + (wait): Ditto. + (_Jv_MonitorExit): Ditto. + * boehm.cc (_Jv_MarkObj): Ditto. + (_Jv_MarkObj): Ditto. + (_Jv_MarkArray): Ditto. + (_Jv_AllocBytes): Ditto. + * prims.cc (_Jv_AllocObject): Ditto. + (_Jv_NewObjectArray): Ditto. + (_Jv_NewPrimArray): Ditto. + (_Jv_Malloc): Ditto. + (_Jv_Realloc): Ditto. + (_Jv_MallocUnchecked): Ditto. + (_Jv_divI): Ditto. + (_Jv_remI): Ditto. + (_Jv_divJ): Ditto. + (_Jv_remJ): Ditto. + + * include/Makefile.in: Rebuilt. + * include/Makefile.am (include_HEADERS): Add jvmpi.h. + From-SVN: r33339
2000-04-20re GNATS libgcj/212 (build is broken on Linux/Alpha)Tom Tromey1-0/+29
Fix for PR libgcj/212: * gcj/javaprims.h (_Jv_word, _Jv_word2): Removed definitions. * include/jvm.h (_Jv_word, _Jv_word2): Define. * java/lang/Class.h (_Jv_word): Declare. From-SVN: r33292
2000-04-09posix-threads.h (_Jv_MutexUnlock): Replace _JV_NOT_OWNER.Anthony Green1-1/+1
2000-04-08 Anthony Green <green@cygnus.com> * include/posix-threads.h (_Jv_MutexUnlock): Replace _JV_NOT_OWNER. From-SVN: r33039
2000-04-09posix-threads.cc (_Jv_MutexLock): Moved back to posix-threads.h.Anthony Green1-2/+32
2000-04-08 Anthony Green <green@cygnus.com> * posix-threads.cc (_Jv_MutexLock): Moved back to posix-threads.h. (_Jv_MutexUnlock): Ditto. * include/posix-threads.h (_Jv_MutexLock): From posix-threads.cc. (_Jv_MutexUnlock): Ditto. From-SVN: r33037
2000-04-03jvm.h (_Jv_GetArrayElementFromElementType): More commentary from Alex.Tom Tromey1-1/+2
* include/jvm.h (_Jv_GetArrayElementFromElementType): More commentary from Alex. From-SVN: r32894
2000-04-02Forgot to add this file before...Anthony Green1-0/+227
From-SVN: r32868
2000-04-02JVMPI changes...Anthony Green2-0/+17
Sun Apr 2 08:27:18 2000 Anthony Green <green@redhat.com> * configure: Rebuilt. * configure.in: Add --disable-jvmpi. * include/config.h.in: Rebuilt. * acconfig.h: Add ENABLE_JVMPI. * include/jvm.h: Declare _Jv_DisableGC and _Jv_EnableGC. (_Jv_JVMPI_Notify_OBJECT_ALLOC): New define. (_Jv_JVMPI_Notify_THREAD_END): New define. (_Jv_JVMPI_Notify_THREAD_END): New define. * prims.cc (_Jv_JVMPI_Notify_OBJECT_ALLOC): Declare. (_Jv_JVMPI_Notify_THREAD_END): Declare. (_Jv_JVMPI_Notify_THREAD_END): Declare. * prims.cc (_Jv_AllocObject): Generate JVMPI object allocation events. * java/lang/natThread.cc: Include JVMPI headers if necessary. (finish_): Generate JVMPI thread end events. (run_): Generate JVMPI thread start events. * gnu/gcj/runtime/natFirstThread.cc (run): Call JNI_OnLoad for any preloaded JNI library. Include JVMPI headers if necessary. (run): Generate JVMPI thread start events. * boehm.cc: Define GC_disable and GC_enable. (_Jv_DisableGC): New function. (_Jv_EnableGC): New function. (disable_gc_mutex): Declare. * nogc.cc (_Jv_DisableGC): New function. (_Jv_EnableGC): New function. * jni.cc (_Jv_JNI_GetEnv): Handle JVMPI interface requests. (_Jv_JVMPI_Interface): Define. (jvmpiEnableEvent): New function. (_Jv_JNI_Init): Initialize _Jv_JVMPI_Interface. * include/jvmpi.h: New file. From-SVN: r32866
2000-03-28Makefile.in: New #defines and friends for Thread.h.Bryce McKinlay2-168/+55
* Makefile.in: New #defines and friends for Thread.h. * posix-threads.cc: (struct starter): Remove `object'. (_Jv_CondWait): Use interruptable condition variables and new recursive mutexes. New return codes on interrupt or non-ownership of mutex. (_Jv_CondNotify): Ditto. (_Jv_CondNotifyAll): Ditto. (_Jv_ThreadInterrupt): Set thread interrupt flag directly. Interrupt the target thread by signaling its wait condition. (_Jv_ThreadInitData): Set `thread_obj' in the thread data struct, not the starter struct. Initialize wait_mutex and wait_cond. (_Jv_MutexLock): New recursive mutex implementation. Moved from posix-threads.h. (_Jv_MutexUnlock): Ditto. (really_start): Set info->data->thread from pthread_self() to work around a race condition. Destroy wait_mutex and wait_cond when run() returns. * java/lang/Thread.java: (isInterrupted_): Renamed to overloaded `isInterrupted(boolean)'. Clear interrupted flag if clear_flag is set. startable_flag: New private field. (Thread): Initialize `startable_flag'. (toString): Check for null thread group. * java/lang/natThread.cc: (struct natThread): New fields `join_mutex', `join_cond'. Removed fields `joiner', `next'. (class locker): Removed. (initialize_native): Initialize `join_cond' and `join_mutex'. (interrupt): Now just calls _Jv_ThreadInterrupt(). (join): Simplified. Just wait on the target thread's join condition. (finish_): Remove join list code. Unset thread group. Signal potential joiners by notifying the dying threads join_cond. (start): Check for illegal restarts. * java/lang/natObject.cc: Check for return value of _Jv_CondWait and act appropriatly. * include/posix-threads.h: Remove all HAVE_RECURSIVE_MUTEX related #defines and #ifdefs. (struct _Jv_Thread_t): New fields `thread_obj', `wait_cond', `wait_mutex', `next'. (struct _Jv_ConditionVariable_t): Define as a struct instead of directly mapping to pthread_cond_t. (struct _Jv_Mutex_t): New recursive implementation. (_Jv_PthreadCheckMonitor): Reimplemented. Simple `owner' check. _Jv_HaveCondDestroy: Never define this for posix-threads. (_Jv_CondNotify): Remove inline implementation(s), prototype instead. (_Jv_CondNotifyAll): Ditto. (_Jv_MutexLock): Ditto. (_Jv_MutexUnlock): Ditto. (_Jv_MutexInit): Changed to reflect new mutex implementation. (_Jv_MutexDestroy): Ditto. (_Jv_CondDestroy): Removed. (_Jv_PthreadGetMutex): Removed. * include/win32-threads.h: (_Jv_CondNotify): Guess _JV_NOT_OWNER on an error. Add a FIXME about this. (_Jv_CondNotifyAll): Ditto. * win32-threads.cc: (_Jv_CondWait): Return 0 on a timeout. Guess _JV_NOT_OWNER on other errors. Add FIXME. From-SVN: r32773
2000-03-26[multiple changes]Tom Tromey2-3/+19
2000-03-26 Tom Tromey <tromey@cygnus.com> * java/lang/mprec.h: Use SIZEOF_VOID_P. * interpret.cc: Use SIZEOF_VOID_P. * include/java-cpool.h (_Jv_storeLong): Use SIZEOF_VOID_P. (_Jv_loadLong): Likewise. (_Jv_storeDouble): Likewise. * configure: Rebuilt. * configure.in: Check size of void*. * resolve.cc (ncode): Use FFI_PREP_RAW_CLOSURE and FFI_RAW_SIZE. 2000-03-26 Hans Boehm <boehm@acm.org> * include/java-cpool.h (_Jv_storeLong, _Jv_loadLong, _Jv_storeDouble, _Jv_loadDouble): Define differently on 64 bit machine. * java/lang/ieeefp.h: Define __IEEE_BIG_ENDIAN or __IEEE_LITTLE_ENDIAN appropriately on IA64. * java/lang/mprec.h: Don't define Pack_32 on 64 bit machine. * javaprims.h (_Jv_word): Added `l' and `d' entries in 64 bit case. * resolve.cc (FFI_PREP_RAW_CLOSURE): New define. (FFI_RAW_SIZE): Likewise. (_Jv_InterpMethod::ncode): Use them. * interpret.cc (PUSHL, PUSHD, POPL, POPD, LOADL, LOADD, STOREL, STORED): Define differently on a 64 bit machine. (continue1): Use ffi_java_raw_call when appropriate. From-SVN: r32754
2000-03-15[multiple changes]Tom Tromey2-0/+181
2000-03-15 Tom Tromey <tromey@cygnus.com> * java/io/natFileDescriptorWin32.cc (winerr): Now static. * prims.cc (win32_exception_handler): Reformatted. * include/win32-threads.h (_Jv_HaveCondDestroy): New define. (_Jv_HaveMutexDestroy): Likewise. 2000-03-15 Jon Beniston <jb7216@bristol.ac.uk> * java/io/natFileDescriptorWin32.cc: New file. * java/io/natFileWin32.cc: New file. * java/net/natInetAddress.cc: Added conditional inclusion of Windows / Winsock headers. * java/net/natPlainDatagramSocketImpl.cc: Added conditional inclusion of Windows / Winsock headers. * java/net/natPlainSocketImpl.cc: Added conditional inclusion of Windows / Winsock headers. * include/win32-signal.h: New file. * include/win32-threads.h: New file. * win32-threads.cc: New file. * exception.cc (win32_get_restart_frame): New function. * prims.cc (win32_exception_handler): New function. (main_init) Performs Winsock initialisation. (main_init) Installs exeception handler. From-SVN: r32567
2000-03-09natArray.cc (newInstance): Don't allow array of `void' to be created.Tom Tromey1-2/+2
* java/lang/reflect/natArray.cc (newInstance): Don't allow array of `void' to be created. From-SVN: r32443
2000-03-07All files: Updated copyright information.Tom Tromey14-14/+14
* All files: Updated copyright information. * COPYING: New file. * COPYING.LIB: Removed. * LIBGCJ_LICENSE: We now use GPL + special exception. From-SVN: r32387
2000-03-07resolve.cc (_Jv_SearchMethodInClass): New function.Bryce McKinlay1-1/+3
2000-03-07 Bryce McKinlay <bryce@albatross.co.nz> * resolve.cc (_Jv_SearchMethodInClass): New function. (_Jv_ResolvePoolEntry): Search superinterfaces for interface methods. * java/lang/Class.h (_Jv_SearchMethodInClass): New prototype. 2000-03-07 Bryce McKinlay <bryce@albatross.co.nz> * java/lang/Class.h (union _Jv_IDispatchTable): New declaration. (struct _Jv_ifaces): New declaration. JV_CLASS: New macro definition. (getComponentType): Relocate below isArray() for inlining. (getModifiers): Declare `inline'. (getSuperclass): Ditto. (isArray): Ditto. (isPrimitive): Ditto. (_Jv_IsAssignableFrom): New prototype. (_Jv_LookupInterfaceMethodIdx): New prototype. Predeclare with "C" linkage. (_Jv_InitClass): Move from natClass.cc. Declare `inline'. Check for JV_STATE_DONE before invoking initializeClass(). (_Jv_PrepareConstantTimeTables): New prototype. (_Jv_GetInterfaces): Ditto. (_Jv_GenerateITable): Ditto. (_Jv_GetMethodString): Ditto. (_Jv_AppendPartialITable): Ditto. (_Jv_FindIIndex): Ditto. depth, ancestors, idt: New class fields. * java/lang/natClass.cc (isAssignableFrom): Move functionality to inline function `_Jv_IsAssignableFrom'. Use that function. (isInstance): Declare `inline'. (initializeClass): Get lock on class before checking `state'. Unlock before calling resolveClass0. Call _Jv_PrepareConstantTimeTables with the lock held. (_Jv_LookupInterfaceMethod): Use _Jv_GetMessageString. (_Jv_IsAssignableFrom): New inline function. Test assignability using class->depth and ancestor table. (_Jv_IsInstanceOf): Use _Jv_IsAssignableFrom. (_Jv_CheckCast): Move from prims.cc. Use JV_CLASS and _Jv_IsAssignableFrom. (_Jv_CheckArrayStore): Ditto. (_Jv_LookupInterfaceMethodIdx): New function. INITIAL_IOFFSETS_LEN, INITIAL_IFACES_LEN: New #defines. (_Jv_PrepareConstantTimeTables): New function. (_Jv_IndexOf): Ditto. (_Jv_GetInterfaces): Ditto. (_Jv_GenerateITable): Ditto. (_Jv_GetMethodString): Ditto. (_Jv_AppendPartialITable): Ditto. iindex_mutex, iindex_mutex_initialized: New static fields. (_Jv_FindIIndex): New function. * java/lang/natClassLoader.cc (_Jv_NewClass): Set new jclass fields. * prims.cc (_Jv_CheckCast): Moved to natClass.cc. (_Jv_CheckArrayStore): Ditto. (JvNewCharArray, JvNewBooleanArray, JvNewByteArray, JvNewShortArray, JvNewIntArray, JvNewLongArray, JvNewFloatArray, JvNewDoubleArray): Moved to gcj/array.h. (_Jv_Realloc): New function. * gcj/cni.h: Move _Jv_PrimClass definitions to gcj/array.h. * gcj/array.h: _Jv_PrimClass definitions moved from gcj/cni.h. (JvNewCharArray, JvNewBooleanArray, JvNewByteArray, JvNewShortArray, JvNewIntArray, JvNewLongArray, JvNewFloatArray, JvNewDoubleArray): Implementations moved from prims.cc and declared `inline'. * gcj/javaprims.h (_Jv_Realloc): Prototype. * include/jvm.h (_Jv_LookupInterfaceMethodIdx): Prototype. From-SVN: r32382
2000-03-06re GNATS libgcj/43 (jni.h not installed)Tom Tromey2-18/+64
Fix for PR libgcj/43: * include/Makefile.in: Rebuilt. * include/Makefile.am (include_HEADERS): New define. From-SVN: r32351
2000-03-05configure.host: Fix __NO_MATH_INLNES botch.Anthony Green1-2/+5
* configure.host: Fix __NO_MATH_INLNES botch. * Makefile.in: Rebuilt. * Makefile.am (nat_source_files): Move natFirstThread.cc. (gnu/gcj/runtime/FirstThread.h): Moved. (ordinary_java_source_files): Move FirstThread.java. * prims.cc: Deal with FirstThread movement. (JvRunMain): Ditto. (_Jv_RunMain): Ditto. * gnu/gcj/runtime/FirstThread.java: Moved from java/lang. * gnu/gcj/runtime/natFirstThread.cc: Ditto. From-SVN: r32348