diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-09-21 16:59:12 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-09-21 16:59:12 +0000 |
commit | 67577e43ece0812b968fd949d8c890e880fc6668 (patch) | |
tree | 8a0b15f8ae55ff04e4e9997580f5dcc5bbc78ec7 /libjava/java/lang/natClassLoader.cc | |
parent | 6bfa2cc1b1757ca919c796642fcb4ee2d7fe7fa7 (diff) | |
download | gcc-67577e43ece0812b968fd949d8c890e880fc6668.tar.gz |
* include/jvm.h (_Jv_VTable): Handle function descriptors for ia64;
add get_method, set_method, vtable_elt_size, new_vtable.
(_Jv_ArrayVTable): Derive from _Jv_VTable.
* resolve.cc (_Jv_PrepareClass): Use new _Jv_VTable methods.
* interpret.cc (_Jv_InterpMethod::continue1): Likewise.
* java/lang/natClassLoader.cc (_Jv_NewArrayClass): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45734 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/lang/natClassLoader.cc')
-rw-r--r-- | libjava/java/lang/natClassLoader.cc | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/libjava/java/lang/natClassLoader.cc b/libjava/java/lang/natClassLoader.cc index 70dea6db84a..004b9d14b73 100644 --- a/libjava/java/lang/natClassLoader.cc +++ b/libjava/java/lang/natClassLoader.cc @@ -626,20 +626,17 @@ _Jv_NewArrayClass (jclass element, java::lang::ClassLoader *loader, JvAssert (ObjectClass.vtable_method_count == NUM_OBJECT_METHODS); int dm_count = ObjectClass.vtable_method_count; - // Create a new vtable by copying Object's vtable (except the - // class pointer, of course). Note that we allocate this as - // unscanned memory -- the vtables are handled specially by the - // GC. - int size = (sizeof (_Jv_VTable) + ((dm_count - 1) * sizeof (void *))); + // Create a new vtable by copying Object's vtable. _Jv_VTable *vtable; if (array_vtable) vtable = array_vtable; else - vtable = (_Jv_VTable *) _Jv_AllocBytes (size); + vtable = _Jv_VTable::new_vtable (dm_count); vtable->clas = array_class; - memcpy (vtable->method, ObjectClass.vtable->method, - dm_count * sizeof (void *)); vtable->gc_descr = ObjectClass.vtable->gc_descr; + for (int i = 0; i < dm_count; ++i) + vtable->set_method (i, ObjectClass.vtable->get_method (i)); + array_class->vtable = vtable; array_class->vtable_method_count = ObjectClass.vtable_method_count; |