mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-20 13:09:59 +08:00
verify.cc (pop64): Removed.
* verify.cc (pop64): Removed. (verify_instructions_0) <op_pop2>: Inline code. Don't throw exception if top-of-stack is narrow. (initialize_stack): Check to ensure that <init> is not static and <clinit> is. From-SVN: r65453
This commit is contained in:
parent
06790e5fd5
commit
bc9150d335
@ -1,3 +1,11 @@
|
|||||||
|
2003-04-10 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
* verify.cc (pop64): Removed.
|
||||||
|
(verify_instructions_0) <op_pop2>: Inline code. Don't throw
|
||||||
|
exception if top-of-stack is narrow.
|
||||||
|
(initialize_stack): Check to ensure that <init> is not static and
|
||||||
|
<clinit> is.
|
||||||
|
|
||||||
2003-04-07 Aaron M. Renn (arenn@urbanophile.com)
|
2003-04-07 Aaron M. Renn (arenn@urbanophile.com)
|
||||||
|
|
||||||
* java/io/ObjectStreamException
|
* java/io/ObjectStreamException
|
||||||
|
@ -1202,14 +1202,6 @@ private:
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
type pop64 ()
|
|
||||||
{
|
|
||||||
type r = pop_raw ();
|
|
||||||
if (! r.iswide ())
|
|
||||||
verify_fail ("wide pop of narrow type");
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
type pop_type (type match)
|
type pop_type (type match)
|
||||||
{
|
{
|
||||||
match.promote ();
|
match.promote ();
|
||||||
@ -2160,21 +2152,31 @@ private:
|
|||||||
bool initialize_stack ()
|
bool initialize_stack ()
|
||||||
{
|
{
|
||||||
int var = 0;
|
int var = 0;
|
||||||
bool is_init = false;
|
bool is_init = _Jv_equalUtf8Consts (current_method->self->name,
|
||||||
|
gcj::init_name);
|
||||||
|
bool is_clinit = _Jv_equalUtf8Consts (current_method->self->name,
|
||||||
|
gcj::clinit_name);
|
||||||
|
|
||||||
using namespace java::lang::reflect;
|
using namespace java::lang::reflect;
|
||||||
if (! Modifier::isStatic (current_method->self->accflags))
|
if (! Modifier::isStatic (current_method->self->accflags))
|
||||||
{
|
{
|
||||||
type kurr (current_class);
|
type kurr (current_class);
|
||||||
if (_Jv_equalUtf8Consts (current_method->self->name, gcj::init_name))
|
if (is_init)
|
||||||
{
|
{
|
||||||
kurr.set_uninitialized (type::SELF, this);
|
kurr.set_uninitialized (type::SELF, this);
|
||||||
is_init = true;
|
is_init = true;
|
||||||
}
|
}
|
||||||
|
else if (is_clinit)
|
||||||
|
verify_fail ("<clinit> method must be static");
|
||||||
set_variable (0, kurr);
|
set_variable (0, kurr);
|
||||||
current_state->set_this_type (kurr);
|
current_state->set_this_type (kurr);
|
||||||
++var;
|
++var;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (is_init)
|
||||||
|
verify_fail ("<init> method must be non-static");
|
||||||
|
}
|
||||||
|
|
||||||
// We have to handle wide arguments specially here.
|
// We have to handle wide arguments specially here.
|
||||||
int arg_count = _Jv_count_arguments (current_method->self->signature);
|
int arg_count = _Jv_count_arguments (current_method->self->signature);
|
||||||
@ -2525,7 +2527,11 @@ private:
|
|||||||
pop32 ();
|
pop32 ();
|
||||||
break;
|
break;
|
||||||
case op_pop2:
|
case op_pop2:
|
||||||
pop64 ();
|
{
|
||||||
|
type t = pop_raw ();
|
||||||
|
if (! t.iswide ())
|
||||||
|
pop32 ();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case op_dup:
|
case op_dup:
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user