aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/lang/natString.cc
diff options
context:
space:
mode:
authorBryce McKinlay <mckinlay@redhat.com>2004-04-16 16:27:19 +0000
committerBryce McKinlay <bryce@gcc.gnu.org>2004-04-16 17:27:19 +0100
commit245c3c04af3e4f256615b0e68c7a14a77a91d6d2 (patch)
treef8e6ed92c4715a9964e9461e0650bbca33471270 /libjava/java/lang/natString.cc
parent2f228199b9cbcc7b3b1a3cc978bf9e3b8ddec8f3 (diff)
downloadgcc-245c3c04af3e4f256615b0e68c7a14a77a91d6d2.zip
gcc-245c3c04af3e4f256615b0e68c7a14a77a91d6d2.tar.gz
gcc-245c3c04af3e4f256615b0e68c7a14a77a91d6d2.tar.bz2
prims.cc (_Jv_AllocObject): Remove `size' argument.
libjava: 2004-04-15 Bryce McKinlay <mckinlay@redhat.com> * prims.cc (_Jv_AllocObject): Remove `size' argument. (_Jv_AllocObjectNoFinalizer): Likewise. (_Jv_AllocObjectNoInitNoFinalizer): Likewise. (_Jv_AllocPtrFreeObject): Likewise. (_Jv_AllocString): Moved from natString.cc. Call collector interface directly even in the JVMPI case. * gcj/cni.h (JvAllocObject): Remove `size' argument from _Jv_AllocObject calls. * gcj/javaprims.h: Update prototypes. * gnu/gcj/natCore.cc (_Jv_create_core): Use `new', not _Jv_AllocObject. * java/lang/Class.h: Update _Jv_AllocObject friend prototype. * java/lang/natString.cc (_Jv_AllocString): Move to prims.cc. gcc/cp: 2004-04-15 Bryce McKinlay <mckinlay@redhat.com> * init.c (build_new_1): Don't use type size argument for Java _Jv_AllocObject call. gcc/java: 2004-04-15 Bryce McKinlay <mckinlay@redhat.com> * expr.c (expand_java_NEW): Don't use size argument for _Jv_AllocObject calls. * parse.y (patch_invoke): Likewise. From-SVN: r80754
Diffstat (limited to 'libjava/java/lang/natString.cc')
-rw-r--r--libjava/java/lang/natString.cc24
1 files changed, 0 insertions, 24 deletions
diff --git a/libjava/java/lang/natString.cc b/libjava/java/lang/natString.cc
index 8217f70..e01f467 100644
--- a/libjava/java/lang/natString.cc
+++ b/libjava/java/lang/natString.cc
@@ -402,30 +402,6 @@ java::lang::String::valueOf (jint num)
}
jstring
-_Jv_AllocString(jsize len)
-{
- jsize sz = sizeof(java::lang::String) + len * sizeof(jchar);
-
- // We assert that for strings allocated this way, the data field
- // will always point to the object itself. Thus there is no reason
- // for the garbage collector to scan any of it.
- // Furthermore, we're about to overwrite the string data, so
- // initialization of the object is not an issue.
-#ifdef ENABLE_JVMPI
- jstring obj = (jstring) _Jv_AllocPtrFreeObject(&StringClass, sz);
-#else
- // Class needs no initialization, and there is no finalizer, so
- // we can go directly to the collector's allocator interface.
- jstring obj = (jstring) _Jv_AllocPtrFreeObj(sz, &StringClass);
-#endif
- obj->data = obj;
- obj->boffset = sizeof(java::lang::String);
- obj->count = len;
- obj->cachedHashCode = 0;
- return obj;
-}
-
-jstring
_Jv_NewString(const jchar *chars, jsize len)
{
jstring str = _Jv_AllocString(len);