Commit 6ac8b2b1 by Bryce McKinlay Committed by Bryce McKinlay

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
parent e2d0915c
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++;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment