summaryrefslogtreecommitdiff
path: root/libjava/resolve.cc
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2001-09-21 16:59:12 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2001-09-21 16:59:12 +0000
commit67577e43ece0812b968fd949d8c890e880fc6668 (patch)
tree8a0b15f8ae55ff04e4e9997580f5dcc5bbc78ec7 /libjava/resolve.cc
parent6bfa2cc1b1757ca919c796642fcb4ee2d7fe7fa7 (diff)
downloadgcc-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/resolve.cc')
-rw-r--r--libjava/resolve.cc13
1 files changed, 5 insertions, 8 deletions
diff --git a/libjava/resolve.cc b/libjava/resolve.cc
index 9fbc9630645..e44ba6d339a 100644
--- a/libjava/resolve.cc
+++ b/libjava/resolve.cc
@@ -696,9 +696,7 @@ _Jv_PrepareClass(jclass klass)
clz->vtable_method_count = vtable_count;
/* allocate vtable structure */
- _Jv_VTable *vtable = (_Jv_VTable*)
- _Jv_AllocBytes (sizeof (_Jv_VTable)
- + (sizeof (void*) * (vtable_count)));
+ _Jv_VTable *vtable = _Jv_VTable::new_vtable (vtable_count);
vtable->clas = clz;
vtable->gc_descr = _Jv_BuildGCDescr(clz);
@@ -712,9 +710,8 @@ _Jv_PrepareClass(jclass klass)
/* copy super class' vtable entries. */
if (effective_superclass && effective_superclass->vtable)
- memcpy ((void*)&vtable->method[0],
- (void*)&effective_superclass->vtable->method[0],
- sizeof (void*) * effective_superclass->vtable_method_count);
+ for (int i = 0; i < effective_superclass->vtable_method_count; ++i)
+ vtable->set_method (i, effective_superclass->vtable->get_method (i));
}
/* now, install our own vtable entries, reprise... */
@@ -735,9 +732,9 @@ _Jv_PrepareClass(jclass klass)
throw_internal_error ("vtable problem...");
if (clz->interpreted_methods[i] == 0)
- vtable->method[index] = (void*)&_Jv_abstractMethodError;
+ vtable->set_method(i, (void*)&_Jv_abstractMethodError);
else
- vtable->method[index] = this_meth->ncode;
+ vtable->set_method(i, this_meth->ncode);
}
}