aboutsummaryrefslogtreecommitdiff
path: root/libjava/resolve.cc
diff options
context:
space:
mode:
authorRichard Henderson <rth@gcc.gnu.org>2001-09-21 09:59:12 -0700
committerRichard Henderson <rth@gcc.gnu.org>2001-09-21 09:59:12 -0700
commitf5ddf15465053a1e7e764e896405bf6ff6756e89 (patch)
tree8a0b15f8ae55ff04e4e9997580f5dcc5bbc78ec7 /libjava/resolve.cc
parent6723181663a87a735bdfdf2e16a6bd41dbc30be1 (diff)
downloadgcc-f5ddf15465053a1e7e764e896405bf6ff6756e89.zip
gcc-f5ddf15465053a1e7e764e896405bf6ff6756e89.tar.gz
gcc-f5ddf15465053a1e7e764e896405bf6ff6756e89.tar.bz2
jvm.h (_Jv_VTable): Handle function descriptors for ia64...
* 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. From-SVN: r45734
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 9fbc963..e44ba6d 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);
}
}