verify.cc (type::compatible): Check initialization status first.
* verify.cc (type::compatible): Check initialization status first. * interpret.cc (run) [insn_invokespecial, invokespecial_resolved]: Don't use NULLCHECK. From-SVN: r59494
This commit is contained in:
parent
32f0ffb380
commit
b0fbe966b1
3 changed files with 20 additions and 8 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2002-11-25 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
* verify.cc (type::compatible): Check initialization status
|
||||||
|
first.
|
||||||
|
* interpret.cc (run) [insn_invokespecial, invokespecial_resolved]:
|
||||||
|
Don't use NULLCHECK.
|
||||||
|
|
||||||
2002-11-23 Mark Wielaard <mark@klomp.org>
|
2002-11-23 Mark Wielaard <mark@klomp.org>
|
||||||
|
|
||||||
* javax/naming/AuthenticationException.java: Update copyright header.
|
* javax/naming/AuthenticationException.java: Update copyright header.
|
||||||
|
|
|
@ -2795,7 +2795,10 @@ _Jv_InterpMethod::run (void *retp, ffi_raw *args)
|
||||||
|
|
||||||
sp -= rmeth->stack_item_count;
|
sp -= rmeth->stack_item_count;
|
||||||
|
|
||||||
NULLCHECK (sp[0].o);
|
// We don't use NULLCHECK here because we can't rely on that
|
||||||
|
// working for <init>. So instead we do an explicit test.
|
||||||
|
if (! sp[0].o)
|
||||||
|
throw new java::lang::NullPointerException;
|
||||||
|
|
||||||
fun = (void (*)()) rmeth->method->ncode;
|
fun = (void (*)()) rmeth->method->ncode;
|
||||||
|
|
||||||
|
@ -2813,7 +2816,10 @@ _Jv_InterpMethod::run (void *retp, ffi_raw *args)
|
||||||
{
|
{
|
||||||
rmeth = (_Jv_ResolvedMethod *) AVAL ();
|
rmeth = (_Jv_ResolvedMethod *) AVAL ();
|
||||||
sp -= rmeth->stack_item_count;
|
sp -= rmeth->stack_item_count;
|
||||||
NULLCHECK (sp[0].o);
|
// We don't use NULLCHECK here because we can't rely on that
|
||||||
|
// working for <init>. So instead we do an explicit test.
|
||||||
|
if (! sp[0].o)
|
||||||
|
throw new java::lang::NullPointerException;
|
||||||
fun = (void (*)()) rmeth->method->ncode;
|
fun = (void (*)()) rmeth->method->ncode;
|
||||||
}
|
}
|
||||||
goto perform_invoke;
|
goto perform_invoke;
|
||||||
|
|
|
@ -458,8 +458,12 @@ private:
|
||||||
if (key < reference_type || k.key < reference_type)
|
if (key < reference_type || k.key < reference_type)
|
||||||
return key == k.key;
|
return key == k.key;
|
||||||
|
|
||||||
|
// An initialized type and an uninitialized type are not
|
||||||
|
// compatible.
|
||||||
|
if (isinitialized () != k.isinitialized ())
|
||||||
|
return false;
|
||||||
|
|
||||||
// The `null' type is convertible to any reference type.
|
// The `null' type is convertible to any reference type.
|
||||||
// FIXME: is this correct for THIS?
|
|
||||||
if (key == null_type || k.key == null_type)
|
if (key == null_type || k.key == null_type)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
@ -469,11 +473,6 @@ private:
|
||||||
&& data.klass == &java::lang::Object::class$)
|
&& data.klass == &java::lang::Object::class$)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// An initialized type and an uninitialized type are not
|
|
||||||
// compatible.
|
|
||||||
if (isinitialized () != k.isinitialized ())
|
|
||||||
return false;
|
|
||||||
|
|
||||||
// Two uninitialized objects are compatible if either:
|
// Two uninitialized objects are compatible if either:
|
||||||
// * The PCs are identical, or
|
// * The PCs are identical, or
|
||||||
// * One PC is UNINIT.
|
// * One PC is UNINIT.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue