mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 23:25:24 +02:00
re PR libgcj/10596 (Reference and String.intern don't work together)
PR libgcj/10596: * include/jvm.h (_Jv_FinalizeString, _Jv_RegisterStringFinalizer): Declare. * java/lang/natString.cc (_Jv_FinalizeString): Renamed from unintern. (intern): Updated. (_Jv_NewStringUtf8Const): Likewise. * java/lang/ref/natReference.cc (finalize_referred_to_object): Add special case when finalizing a String. (in_hash): New function. (_Jv_RegisterStringFinalizer): Likewise. (maybe_add_finalize): Likewise. From-SVN: r71915
This commit is contained in:
@@ -290,6 +290,12 @@ void _Jv_GCRegisterDisappearingLink (jobject *objp);
|
||||
implement soft references. */
|
||||
jboolean _Jv_GCCanReclaimSoftReference (jobject obj);
|
||||
|
||||
/* Register a finalizer for a String object. This is only used by
|
||||
the intern() implementation. */
|
||||
void _Jv_RegisterStringFinalizer (jobject str);
|
||||
/* This is called to actually finalize a possibly-intern()d String. */
|
||||
void _Jv_FinalizeString (jobject str);
|
||||
|
||||
/* Return approximation of total size of heap. */
|
||||
long _Jv_GCTotalMemory (void);
|
||||
/* Return approximation of total free memory. */
|
||||
|
||||
Reference in New Issue
Block a user