aboutsummaryrefslogtreecommitdiff
path: root/libjava/boehm.cc
AgeCommit message (Collapse)AuthorFilesLines
2004-04-20class.c (make_class_data): Add new field aux_info.Bryce McKinlay1-1/+3
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
2003-12-04boehm.cc (_Jv_MarkObj): Access hack_signers field.Michael Koch1-1/+1
2003-12-04 Michael Koch <konqueror@gmx.de> * boehm.cc (_Jv_MarkObj): Access hack_signers field. From-SVN: r74279
2003-10-09ClassLoader.java (setSigners): Implemented.Tom Tromey1-0/+2
* java/lang/ClassLoader.java (setSigners): Implemented. * boehm.cc (_Jv_MarkObj): Mark `signers' field. * java/lang/natClassLoader.cc (_Jv_InitNewClassFields): Initialize new fields. * java/lang/Class.java (getSigners): Now native. (setSigners): Declare. * java/lang/natClass.cc (getSigners): New method. (getSigners): Likewise. * java/lang/Class.h (Class::signers): New field. (Class::setSigners): New method. From-SVN: r72271
2003-09-29boehm.cc (_Jv_BuildGCDescr): Put first word of object in most significant ↵Bryce McKinlay1-5/+12
bit of descriptor. * boehm.cc (_Jv_BuildGCDescr): Put first word of object in most significant bit of descriptor. Include the vtable and sync_info fields. From-SVN: r71895
2003-07-23* boehm.cc (_Jv_BuildGCDescr): Use `1ULL'.Tom Tromey1-1/+1
From-SVN: r69703
2003-07-23boehm.cc (_Jv_BuildGCDescr): Wrote.Tom Tromey1-4/+42
* boehm.cc (_Jv_BuildGCDescr): Wrote. Include limits.h. From-SVN: r69700
2003-01-03boehm.cc (_Jv_MarkObj): Mark the protectionDomain of a class.Anthony Green1-1/+3
2002-12-22 Anthony Green <green@redhat.com> * boehm.cc (_Jv_MarkObj): Mark the protectionDomain of a class. From-SVN: r60834
2002-12-28boehm.cc: Remove stray semicolon.Mark Mitchell1-1/+1
* boehm.cc: Remove stray semicolon. * interpret.cc: Likewise. * prims.cc: Likewise. * verify.cc (_Jv_BytecodeVerifier::verify_fail): Move definition earlier to ensure default arguments are processed. * gcj/array.h (JArray): Add forward declaration. (elements): Likewise. * gcj/javaprim.h: Remove stray semicolons. * include/bohm-gc.h: Likewise. * include/jni.h: Likewise. * include/jvm.h: Likewise. * java/lang/Class.h (_Jv_GetArrayClass): Declare _Jv_NewArrayClass. From-SVN: r60556
2002-12-06java-interp.h (class _Jv_InterpMethod): Added JV_MARKOBJ_DECL.Tom Tromey1-15/+21
* include/java-interp.h (class _Jv_InterpMethod): Added JV_MARKOBJ_DECL. * boehm.cc (_Jv_MarkObj): Consolidated interpreter code. Also mark `prepared' field of interpreted method. * interpret.cc (compile): Use _Jv_AllocBytes. From-SVN: r59900
2002-09-25boehm.cc (_Jv_MarkObj): Don't fail if class object has been allocated but ↵Tom Tromey1-1/+7
not initialized. * boehm.cc (_Jv_MarkObj): Don't fail if class object has been allocated but not initialized. From-SVN: r57514
2002-02-12boehm.cc (initialized, [...]): Removed unused declarations.Bryce McKinlay1-90/+2
* boehm.cc (initialized, obj_kind_x, obj_free_list): Removed unused declarations. (_Jv_InitGC): Don't bother locking, as this is always called from a single-thread. Turn off GC_all_interior_pointers. Remove dead code. From-SVN: r49695
2001-12-19* boehm.cc (_Jv_BuildGCDescr): Define unconditionally.Bryce McKinlay1-4/+2
From-SVN: r48170
2001-11-12* boehm.cc (_Jv_GCCanReclaimSoftReference): Fix warning.Bryce McKinlay1-1/+1
From-SVN: r46941
2001-10-15natObject.cc (heavy_lock): Moved fields old_client_data, ↵Hans Boehm1-1/+19
old_finalization_proc near beginning. 2001-10-15 Hans Boehm <Hans_Boehm@hp.com> * java/lang/natObject.cc (heavy_lock): Moved fields old_client_data, old_finalization_proc near beginning. (heavy_lock_finalization_proc): Now inline; changed type of argument. (JV_SYNC_TABLE_SZ): Now 2048. (mp): New global. (spin): `mp' now global. (heavy_lock_obj_finalization_proc): Updated to correctly handle heavy lock finalization. (remove_all_heavy): New function. (maybe_remove_all_heavy): Likewise. (_Jv_MonitorEnter): Throw exception if object is NULL. (_Jv_MonitorExit): Likewise. Also, clear long lists of unlocked heavy locks. * include/jvm.h (_Jv_AllocTraceTwo): Declare. * nogc.cc (_Jv_AllocTraceTwo): New function. * boehm.cc (trace_two_vtable): New global. (_Jv_AllocTraceTwo): New function. From-SVN: r46271
2001-10-10natFinalizerThread.cc: New file.Tom Tromey1-0/+7
* gnu/gcj/runtime/natFinalizerThread.cc: New file. * java/lang/natRuntime.cc: Include FinalizerThread.h. (runFinalization): Call finalizerReady. * nogc.cc (_Jv_GCInitializeFinalizers): New function. * prims.cc: Include VirtualMachineError.h, FinalizerThread.h. (_Jv_CreateJavaVM): Start the finalizer thread. * no-threads.cc: Include InternalError.h. (_Jv_ThreadStart): Throw InternalError. (_Jv_ThreadInitData): Don't throw error if this is not the first thread. * Makefile.in: Rebuilt. * Makefile.am (ordinary_java_source_files): Added FinalizerThread.java. (nat_source_files): Added natFinalizerThread.cc. * include/jvm.h (_Jv_GCInitializeFinalizers): Declare. * boehm.cc (_Jv_GCInitializeFinalizers): New function. * gnu/gcj/runtime/FirstThread.java (run): Start finalizer thread. * gnu/gcj/runtime/FinalizerThread.java: New file. From-SVN: r46163
2001-10-02javaprims.h: Rebuilt class list.Tom Tromey1-0/+13
* gcj/javaprims.h: Rebuilt class list. * boehm.cc (_Jv_GCRegisterDisappearingLink): New function. (_Jv_GCCanReclaimSoftReference): New function. * include/jvm.h (_Jv_GCRegisterDisappearingLink): Declare. (_Jv_GCCanReclaimSoftReference): Declare. * java/lang/ref/Reference.java (referent): Now a RawData. (create): Renamed from `created'. Added object argument. (Reference): Don't initialize `referent' here. * Makefile.in: Rebuilt. * Makefile.am (nat_source_files): Added new file. * java/lang/ref/natReference.cc: New file. From-SVN: r45958
2001-09-10jvm.h (_Jv_AllocRawObj): New prototype.Bryce McKinlay1-0/+8
* include/jvm.h (_Jv_AllocRawObj): New prototype. * boehm.cc (_Jv_AllocRawObj): Implement. * nogc.cc (_Jv_AllocRawObj): Likewise. * exception.cc (_Jv_Throw): Use _Jv_AllocRawObj, not GC_malloc. From-SVN: r45497
2001-08-18boehm.cc: Include gc_local_alloc.h if appropriate.Hans Boehm1-13/+8
2001-08-17 Hans-J. Boehm <Hans_Boehm@hp.com> * boehm.cc: Include gc_local_alloc.h if appropriate. (GC_GENERIC_MALLOC): Don't define. (MAYBE_MARK): Redefine for GC 6.0. (_Jv_MarkObj): Mark class differently. (_Jv_AllocArray): Use GC_generic_malloc. From-SVN: r44993
2001-05-24[multiple changes]Tom Tromey1-25/+54
2001-05-23 Tom Tromey <tromey@redhat.com> * posix-threads.cc (_Jv_self_cache): Renamed from self_cache. * gcj/Makefile.in: Rebuilt. * gcj/Makefile.am (gcj_HEADERS): Added libgcj-config.h. * gcj/javaprims.h: Include gcj/libgcj-config.h. * gcj/libgcj-config.h.in: New file. * libgcj.spec.in (*jc1): Added @HASH_SYNC_SPEC@. * configure: Rebuilt. * configure.in: Enable hash synchronization by default on some platforms. (HASH_SYNC_SPEC): New subst. (AC_CONFIG_HEADER): Added gcj/libgcj-config.h. Correctly use `test -z' instead of `test -n' in a couple places. (JV_HASH_SYNCHRONIZATION): Use AC_DEFINE; don't add to LIBGCJ_CXXFLAGS. * configure.host (enable_java_net_default): Initialize. (enable_hash_synchronization_default): New variable. 2001-05-23 Hans Boehm <Hans_Boehm@hp.com> * boehm.cc (_Jv_MarkObj): Don't mark sync_info when hash synchronization in use. (_Jv_MarkArray): Likewise. (_Jv_AllocBytes): Don't check return result. (handle_out_of_memory): New function. (_Jv_InitGC): Set GC_oom_fn. (trace_one_vtable): New global. (_Jv_AllocTraceOne): New function. * configure.in: Added --enable-hash-synchronization. * defineclass.cc, prims.cc, resolve.cc, java/lang/natString.cc, java/net/natInetAddress.cc: Remove _Jv_AllocBytesChecked. * nogc.cc (_Jv_AllocObj): Throw out-of-memory. (_Jv_AllocArray): Likewise. (_Jv_AllocBytes): Likewise. (_Jv_AllocPtrFreeObject): New function. (_Jv_AllocTraceOne): Likewise. * posix-threads.cc (_Jv_ThreadRegister): Handle slow pthread_self(). (self_cache): New global. (_Jv_ThreadSelf_out_of_line): New function. * prims.cc (_Jv_AllocBytesChecked): Removed. (_Jv_ThrowNoMemory): New function. (_Jv_AllocObject): Don't check for null return from allocator. (_Jv_NewObjectArray): Likewise. (_Jv_AllocPtrFreeObject): New function. (_Jv_NewPrimArray): Allocate pointer-free object if possible. * include/javaprims.h (_Jv_AllocPtrFreeObject): Declare. (_Jv_MonitorEnter, _Jv_MonitorExit): Don't return value. * include/boehm-gc.h (_Jv_AllocObj): Define. (_Jv_AllocPtrFreeObj): Define. * include/jvm.h (_Jv_AllocPtrFreeObj): Declare. (_Jv_ThrowNoMemory): Declare. (_Jv_AllocTraceOne): Declare. (_Jv_AllocBytesChecked): Removed. * include/posix-threads.h (_Jv_MutexInit, _Jv_MutexLock, _Jv_MutexUnlock): Handle LOCK_DEBUG. (_Jv_ThreadSelf): Handle case where system pthread_self() is slow. * java/lang/Class.h (Class): Declare _Jv_AllocPtrFreeObj as friend. * java/lang/Object.h (sync_info): Conditional upon presence of hash synchronization. * java/lang/natObject.cc: Much new code to handle thin locks and hash synchronization. * java/lang/natString.cc (_Jv_AllocString): Allocate pointer-free object if possible. From-SVN: r42519
2001-05-21configure.in: Update boehm-gc include dir for new GC version.Bryce McKinlay1-10/+10
* configure.in: Update boehm-gc include dir for new GC version. * configure: Rebuilt. * exception.cc: Only include <gc.h>. Remove TRUE/FALSE hacks and extern "C" wrapper. * boehm.cc: Update includes for new GC version. MAKE_PROC is now GC_MAKE_PROC. mark_proc is now GC_mark_proc. * posix-threads.cc: Only include <gc.h>. Don't need to wrap with extern "C". From-SVN: r42380
2001-01-08In gcc/java:Bryce McKinlay1-0/+2
* class.c (make_class_data): Push initial value for "arrayclass". * decl.c (init_decl_processing): Add new class field "arrayclass". In libjava: * java/lang/Class.h (_Jv_InitClass): Use __builtin_expect. (_Jv_NewArrayClass): Renamed from _Jv_FindArrayClass. (_Jv_GetArrayClass): New inline function. (arrayclass): New field. * prims.cc (_Jv_NewObjectArray): Use _Jv_GetArrayClass. Don't use _Jv_GetArrayElementFromElementType. (_Jv_NewPrimArray): Ditto. (_Jv_PrimClass constructor): Initialize "depth", "ancestors", and "idt" for completeness. Initialze "arrayclass" using _Jv_NewArrayClass. Set Modifier::ABSTRACT. * java/lang/natClassLoader.cc (_Jv_NewClass): Initialize "arrayclass". (_Jv_NewArrayClass): Renamed from _Jv_FindArrayClass. Now void. Now synchronized. Array classes are now referenced from elementClass->arrayclass. Don't use _Jv_FindClassInCache. Set array classes' accessibility flags correctly. Optimize so that all array classes share the same IDT. * java/lang/reflect/natArray.cc (newInstance): Use _Jv_GetArrayClass. * java/lang/reflect/natMethod.cc (_Jv_GetTypesFromSignature): Ditto. * java/lang/natClass.cc (_getFields): Increment offset. Prevent fields in superclasses from overwriting classes own fields. (_Jv_IsAssignableFrom): Check for NULL source idt instead of calling Modifier::isAbstract(). (null_idt): New static field. (_Jv_PrepareConstantTimeTables): Optimize case where class implements no interfaces. (_Jv_IndexOf): Made inline. * boehm.cc (_Jv_MarkObj): Mark "arrayclass" field. From-SVN: r38808
2000-10-06natField.cc (BooleanClass): Don't define.Tom Tromey1-7/+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-21/+130
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-05-07Forgot this file when checking in my last change.Bryce McKinlay1-3/+3
From-SVN: r33745
2000-05-05field.h (JvFieldIsRef): Return false for gnu.gcj.RawData field.Tom Tromey1-9/+2
* gcj/field.h (JvFieldIsRef): Return false for gnu.gcj.RawData field. * boehm.cc (_Jv_MarkObj): Removed dead code. Use `STATIC', not `0x0008'. Include Modifier.h. From-SVN: r33702
2000-04-22+ 2000-04-22 Anthony Green <green@cygnus.com> + + * include/jvm.h ↵Anthony Green1-4/+4
(__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-19boehm.cc: (_Jv_MarkObj...Bryce McKinlay1-56/+56
2000-04-19 Bryce McKinlay <bryce@albatross.co.nz> * boehm.cc: (_Jv_MarkObj, _Jv_MarkArray): Cast pointers for MAYBE_MARK to ptr_t, for compatibility with new GC version. From-SVN: r33252
2000-04-02JVMPI changes...Anthony Green1-0/+25
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-07All files: Updated copyright information.Tom Tromey1-1/+1
* All files: Updated copyright information. * COPYING: New file. * COPYING.LIB: Removed. * LIBGCJ_LICENSE: We now use GPL + special exception. From-SVN: r32387
2000-02-21* boehm.cc (_Jv_AllocBytes): Clear returned memory.Tom Tromey1-1/+8
From-SVN: r32085
2000-01-21natConstructor.cc (newInstance): Use _Jv_CallAnyMethodA.Tom Tromey1-2/+2
* java/lang/reflect/natConstructor.cc (newInstance): Use _Jv_CallAnyMethodA. * include/jvm.h: Declare _Jv_CallAnyMethodA. * java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Renamed from _Jv_CallNonvirtualMethodA. Changed interface; overloaded. Include <jni.h>. (COPY): Removed. (invoke): Use _Jv_CallAnyMethodA. (VAL): Redefined. * java/lang/Class.h (Class): Declare JvGetFirstStaticField, JvNumStaticFields, JvNumMethods, and JvGetFirstMethod as friend functions. (struct _Jv_Method): Added getNextMethod method. (JvNumMethods): New function. (JvGetFirstMethod): Likewise. * gcj/field.h (JvGetFirstStaticField): New function. (JvNumStaticFields): Likewise. (getNextField): Renamed from getNextInstanceField. (struct _Jv_Field): New method getClass. * jni.cc: Wrote many new functions. * include/jni.h (JNI_TRUE): Define. (JNI_FALSE): Likewise. (jobject, jclass, jstring, jarray, jthrowable, jobjectArray, jbyteArray, jshortArray, jintArray, jlongArray, jbooleanArray, jcharArray, jfloatArray, jdoubleArray): New typedefs. (jfieldID, jmethodID): Likewise. (JNI_COMMIT, JNI_ABORT): New defines. (JNINativeMethod): New struct. (struct JNINativeInterface): Correctly declared more entries. (class _Jv_JNIEnv): Added `ex' member. (JNI_VERSION_1_1): New define. (JNI_VERSION_1_2): Likewise. * boehm.cc (_Jv_MarkObj): Use getNextField, not getNextInstanceField. From-SVN: r31553
2000-01-19* All files: Updated copyright to reflect Cygnus purchase.Tom Tromey1-1/+1
From-SVN: r31504
1999-11-05boehm.cc (_Jv_GCSetInitialHeapSize): Swapped size & current.Jeff Sturm1-1/+1
1999-11-05 Jeff Sturm <jsturm@sigma6.com> * boehm.cc (_Jv_GCSetInitialHeapSize): Swapped size & current. * prims.cc (parse_heap_size): Use end, not spec. Use 1024 multipler for `k'. From-SVN: r30418
1999-11-03* boehm.cc: Don't include boehm-config.h.Tom Tromey1-4/+0
From-SVN: r30359
1999-11-02boehm.cc (_Jv_InitGC): Set GC_java_finalization.Tom Tromey1-19/+3
* boehm.cc (_Jv_InitGC): Set GC_java_finalization. (sum_blocks): Removed. (_Jv_GCFreeMemory): Use GC_get_free_bytes. From-SVN: r30335
1999-10-22Makefile.in: Rebuilt.Tom Tromey1-0/+14
* Makefile.in: Rebuilt. * Makefile.am (java/lang/ClassLoader.h): New target. * java/lang/natClassLoader.cc (_Jv_FindClass): Removed reference to `redirect'. * include/java-props.h (_Jv_Compiler_Properties): Changed declaration. * gcj/array.h (JvRunMain, _Jv_RunMain): Don't declare. * include/jvm.h (_Jv_GCSetInitialHeapSize, _Jv_GCSetMaximumHeapSize): Declare. (JvRunMain, _Jv_RunMain): Declare. (_Jv_SetMaximumHeapSize, _Jv_SetInitialHeapSize): Declare. * nogc.cc (_Jv_GCSetInitialHeapSize): New function. (_Jv_GCSetMaximumHeapSize): Likewise. * boehm.cc (_Jv_GCSetInitialHeapSize): New function. (_Jv_GCSetMaximumHeapSize): Likewise. * prims.cc (parse_heap_size): New function. (_Jv_SetInitialHeapSize): Likewise. (_Jv_SetMaximumHeapSize): Likewise. (_Jv_Compiler_Properties): New global. * gij.cc (help): New function. (version): Likewise. (heap_size): Likewise. (heap_max_size): Likewise. (main): Parse arguments. Set _Jv_Compiler_Properties. Include <config.h>, <java-props.h>. (_Jv_Compiler_Properties): Removed. From-SVN: r30133
1999-09-10configure: Rebuilt.Tom Tromey1-3/+3
* configure: Rebuilt. * configure.in: Build include/Makefile. * Makefile.in: Rebuilt. * Makefile.am (SUBDIRS): Added gcj and include. (install-data-local): New target. (extra_headers): New macro. * include/Makefile.in: New file. * include/Makefile.am: New file. * interpret.cc: Don't include gcj/field.h or gcj/cni.h. * java/lang/reflect/natField.cc: Don't include gcj/field.h or gcj/cni.h. * boehm.cc: Don't include java-threads.h or gcj/field.h. * resolve.cc: Include config.h. * defineclass.cc: Include config.h. * include/java-interp.h: Don't include config.h. * include/jvm.h: Include java-threads.h, Object.h, java-gc.h, cni.h. * gcj/javaprims.h: Regenerated namespace decls. * classes.pl (scan): Don't put `;' after closing brace. * Makefile.in: Rebuilt. * Makefile.am (INCLUDES): Added -I for top_srcdir. * configure.in: Create gcj/Makefile. * gcj/Makefile.in: New file. * gcj/Makefile.am: New file. * java/lang/Object.h: Don't include any other headers. * gcj/array.h: Renamed from include/java-array.h. * gcj/field.h: Renamed from include/java-field.h. * gcj/method.h: Renamed from include/java-method.h. * gcj/cni.h, gcj/javaprims.h: Moved from include/. Updated all files to reflect new include structure. From-SVN: r29278
1999-08-24boehm.cc: Undefine TRUE and FALSE.Tom Tromey1-0/+5
* boehm.cc: Undefine TRUE and FALSE. * posix-threads.cc (_Jv_CondWait): Use ETIMEDOUT, not ETIME. From-SVN: r28810
1999-08-10[multiple changes]Anthony Green1-1/+2
Mon Aug 9 18:33:38 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> * Makefile: Rebuilt. * Makefile.am (toolexeclibdir): Add $(MULTISUBDIR) even for native builds. * java/net/natPlainSocketImpl.cc: Include <sys/select.h> only if present. * configure: Rebuilt. * configure.in: Properly align --help output, fix capitalization and punctuation. * acinclude.m4: Likewise. 1999-08-09 Kresten Krab Thorup <krab@gnu.org> * include/javaprims.h (_Jv_word, _Jv_word2): New types. * include/java-interp.h (_Jv_InterpMethodInvocation): Use _Jv_word. (_Jv_callInterpretedMethod): Unused. Remove. (_Jv_InterpMethod::run,run_normal,run_synch_object,run_synch_class): Use ffi_raw. * include/java-cpool.h (_Jv_get, _Jv_put): Remove. (_Jv_{store,load}{Indexes,Int,Float,Long,Double}): Use _Jv_word. * boehm.cc (_Jv_MarkObj): Use _Jv_word. * interpret.cc: use _Jv_word. * defineclass.cc: use_Jv_word. * resolve.cc: Use _Jv_word. (_Jv_ResolvePoolEntry): Return _Jv_word. * java/lang/Class.h (_Jv_Constants): Use _Jv_word for cpool. * java/lang/natClassLoader.cc (_Jv_InternClassStrings): Use _Jv_word. * interpret.cc (gnu::gcj::runtime::MethodInvocation::continue1): Change comment. From-SVN: r28641
1999-08-08[multiple changes]Anthony Green1-2/+76
1999-08-09 Anthony Green <green@cygnus.com> * gij.cc: New file. * include/config.h.in: Rebuilt. * acconfig.h: Add INTERPRETER. * configure: Rebuilt. * Makefile.in: Rebuilt. * Makefile.am (libffi_files): Identify the libffi object files for inclusion in libgcj. (LIBFFIINCS): Define. * interpret.cc (gnu::gcj::runtime::MethodInvocation::continue1): Dummy definition for configurations without an interpreter. * java/net/natPlainSocketImpl.cc (getOption): Disamiguate call to java::lang::Boolean constructor. * include/java-interp.h: Always include java-cpool.h. * java/lang/natClassLoader.cc (getVMClassLoader0): Always return 0 when INTERPRETER not defined. * java/lang/Class.h (finalize): Define. * gnu/gcj/util/path/DirectoryPathEntry.java (getURL): Catch IOException from File.getCanonicalPath. (getStream): Likewise. * NEWS: More news. * THANKS: More thanks. 1999-08-09 Kresten Krab Thorup <krab@gnu.org> * resolve.cc (get_ffi_type_from_signature): Generate uint16 for jchar type. (_Jv_PrepareClass): Allow non-abstract classes to have abstract subclasses. (_Jv_ResolvePoolEntry): Revert subclass check for protected fields and methods. * interpret.cc (continue1/perform_invoke): Don't sign extend uint16 return val. (continue1/lshl,lshr): Push long, not int. (continue1/ulshr): Use UINT64, not long long. * defineclass.cc (handleFieldsEnd): Handle case when all fields are static. * java/lang/natClass.cc (forName): Add call to _Jv_InitClass. * java/lang/FirstThread.java (run): Add top-level exception handler. (run0): Renamed from run. 1999-08-08 Kresten Krab Thorup <krab@gnu.org> * configure.in (--with-interpreter): Added. * include/config.h.in (INTERPRETER): Added. * java/lang/ClassLoader.java: File replaced. * java/lang/VMClassLoader.java: New file. * java/lang/natClassLoader.cc: New file. * gnu/gcj/runtime/MethodInvocation.java: New file. * gnu/gcj/util/path/SearchPath.java: New file. * gnu/gcj/util/path/PathEntry.java: New file. * gnu/gcj/util/path/DirectoryPathEntry.java: New file. * gnu/gcj/util/path/ZipPathEntry.java: New file. * gnu/gcj/util/path/URLPathEntry.java: New file. * gnu/gcj/util/path/CacheEntry.java: New file. * include/java-interp.h: New file. * include/java-cpool.h: New file. * include/java-insns.h: New file. * defineclass.cc: New file. * interpret.cc: New file. * resolve.cc: New file. * java/lang/natClass.cc (loaded_classes, _Jv_RegisterClass, _Jv_RegisterClasses, _Jv_FindClassInCache, _Jv_FindClass, _Jv_NewClass, _Jv_FindArrayClass): Moved to natClassLoader.cc. (finalize): New. (STATE_NOTHING, STATE_RESOLVED, STATE_IN_PROGRESS, STATE_DONE, STATE_ERROR): Moved to java/lang/Class.h and renamed with JV_ prefix. (initializeClass): Use new JV_ prefixed names. Also, call ClassLoader::resolveClass instead of _Jv_ResolveClass. * java/lang/Class.h (JV_STATE_PRELOADING, JV_STATE_LOADING, JV_STATE_LOADED, JV_STATE_COMPILED, JV_STATE_PREPARED, JV_STATE_LINKED): New. (_Jv_WaitForState, _Jv_RegisterInitiatingLoader, _Jv_UnregisterClass, _Jv_InternClassStrings): New friends. (_Jv_IsInterpretedClass, _Jv_InitField, _Jv_LookupDeclaredMethod, _Jv_DetermineVTableIndex, _Jv_ResolvePoolEntry, _Jv_PrepareClass, _Jv_ClassReader, _Jv_InterpClass, _Jv_InterpMethod, _Jv_InterpMethodInvocation): New friends for interpreter. (finalize): New. (CONSTANT_Class, CONSTANT_String, etc.): Moved to include/java-cpool.h and renamed with JV_ prefix. * include/jvm.h (_Jv_makeUtf8Const, _Jv_makeUtf8TypeConst): New decls. (_Jv_UnregisterClass): New decl. * java/lang/natClassLoader.cc (_Jv_FindArrayClass): Added class loader argument. (_Jv_FindClass): Use class loader. * prims.cc (_Jv_makeUtf8Const): New function. (_Jv_NewObjectArray): Change use of _Jv_FindArrayClass. (_Jv_NewPrimArray): Ditto. (_Jv_FindClassFromSignature): Ditto. * java/lang/reflect/natArray.cc (newInstance): Ditto. * java/lang/reflect/natMethod.cc (getType): Ditto. * include/java-field.h (_Jv_Field::isRef): Make robust for non-resolved contexts. * boehm.cc (_Jv_MarkObj): Mark interpreter-related fields. Also, don't mark class->next field. * java/lang/VirtualMachineError.java: Added FIXME note. * configure.in (INTERPSPEC): New spec. * libgcj.spec.in: Added INTERPSPEC. * Makefile.am: Added gcjh friends for java/lang/VMClassLoader and gnu/gcj/runtime/MethodInvocation. (libgcj_la_SOURCES): Added resolve.cc defineclass.cc interpret.cc. (ordinary_java_source_files): Added above mentioned java classes. * configure: Rebuilt. * Makefile.in: Rebuilt. From-SVN: r28597
1999-08-03ServerSocket.java: Define ANY_IF.Bryce McKinlay1-1/+1
* java/net/ServerSocket.java: Define ANY_IF. (ServerSocket (int,int)): Use ANY_IF instead of null to bind to all network interfaces. * java/net/DatagramSocket.java (DatagramSocket): ditto. * java/net/natPlainSocketImpl.cc (bind): Expect 0.0.0' instead of null. * java/net/natPlainDatagramSocketImpl (bind): Expect 0.0.0' instead of null. From-SVN: r28429
1999-08-03boehm.cc (_Jv_RegisterFinalizer): Cast eth' to GC_PTR.Bryce McKinlay1-1/+1
eth' * boehm.cc (_Jv_RegisterFinalizer): Cast eth' to GC_PTR. * exception.cc (_Jv_Throw): Cast _Jv_type_matcher' to __eh_matcher. From-SVN: r28428
1999-04-07Initial revisionTom Tromey1-0/+367
From-SVN: r26263