diff options
author | bryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-04-16 16:27:19 +0000 |
---|---|---|
committer | bryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-04-16 16:27:19 +0000 |
commit | d8fff3ca9b99a853557ccd9e5d78510d4a39e22d (patch) | |
tree | f8e6ed92c4715a9964e9461e0650bbca33471270 /libjava/java/lang/natString.cc | |
parent | 33ea6cc075fce69981316855b3ebe9e666489df9 (diff) | |
download | gcc-d8fff3ca9b99a853557ccd9e5d78510d4a39e22d.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@80754 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/lang/natString.cc')
-rw-r--r-- | libjava/java/lang/natString.cc | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/libjava/java/lang/natString.cc b/libjava/java/lang/natString.cc index 8217f703995..e01f467b79f 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); |