natClass.cc (_Jv_LayoutVTableMethods): Always assign a vtable slot for final methods.
* java/lang/natClass.cc (_Jv_LayoutVTableMethods): Always assign a vtable slot for final methods. Add FIXME comment. From-SVN: r73023
This commit is contained in:
parent
e2d0915cc9
commit
6ac8b2b187
|
@ -1,3 +1,8 @@
|
|||
2003-10-28 Bryce McKinlay <bryce@mckinlay.net.nz>
|
||||
|
||||
* java/lang/natClass.cc (_Jv_LayoutVTableMethods): Always assign a
|
||||
vtable slot for final methods. Add FIXME comment.
|
||||
|
||||
2003-10-28 David S. Miller <davem@redhat.com>
|
||||
|
||||
* sysdep/sparc/locks.h (__cas_start_atomic): %g0 --> %%g0.
|
||||
|
|
|
@ -1835,6 +1835,12 @@ _Jv_LayoutVTableMethods (jclass klass)
|
|||
if (! _Jv_isVirtualMethod (meth))
|
||||
continue;
|
||||
|
||||
// FIXME: Must check that we don't override:
|
||||
// - Package-private method where superclass is in different package.
|
||||
// - Final or less-accessible declaration in superclass (check binary
|
||||
// spec, do we allocate new vtable entry or put throw node in vtable?)
|
||||
// - Static or private method in superclass.
|
||||
|
||||
if (superclass != NULL)
|
||||
{
|
||||
super_meth = _Jv_LookupDeclaredMethod (superclass, meth->name,
|
||||
|
@ -1843,8 +1849,7 @@ _Jv_LayoutVTableMethods (jclass klass)
|
|||
|
||||
if (super_meth)
|
||||
meth->index = super_meth->index;
|
||||
else if (! (meth->accflags & java::lang::reflect::Modifier::FINAL)
|
||||
&& ! (klass->accflags & java::lang::reflect::Modifier::FINAL))
|
||||
else
|
||||
meth->index = index++;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue