Commit 590077b0 by Tom Tromey Committed by Tom Tromey

verify.cc (_Jv_BytecodeVerifier::get_ushort): Use `jint' for temporary values.

	* verify.cc (_Jv_BytecodeVerifier::get_ushort): Use `jint' for
	temporary values.
	(_Jv_BytecodeVerifier::get_short): Likewise.
	(_Jv_BytecodeVerifier::get_int): Likewise.
	(_Jv_BytecodeVerifier::check_return_type): Reverse ordering of
	`compatible' call.

From-SVN: r47161
parent e7b35eec
2001-11-18 Tom Tromey <tromey@redhat.com> 2001-11-18 Tom Tromey <tromey@redhat.com>
* verify.cc (_Jv_BytecodeVerifier::get_ushort): Use `jint' for
temporary values.
(_Jv_BytecodeVerifier::get_short): Likewise.
(_Jv_BytecodeVerifier::get_int): Likewise.
(_Jv_BytecodeVerifier::check_return_type): Reverse ordering of
`compatible' call.
* verify.cc (_Jv_BytecodeVerifier::pop_type): Put PC into error * verify.cc (_Jv_BytecodeVerifier::pop_type): Put PC into error
message. message.
(_Jv_BytecodeVerifier::pop64): Likewise. (_Jv_BytecodeVerifier::pop64): Likewise.
......
...@@ -946,25 +946,25 @@ private: ...@@ -946,25 +946,25 @@ private:
jint get_ushort () jint get_ushort ()
{ {
jbyte b1 = get_byte (); jint b1 = get_byte ();
jbyte b2 = get_byte (); jint b2 = get_byte ();
return (jint) ((b1 << 8) | b2) & 0xffff; return (jint) ((b1 << 8) | b2) & 0xffff;
} }
jint get_short () jint get_short ()
{ {
jbyte b1 = get_byte (); jint b1 = get_byte ();
jbyte b2 = get_byte (); jint b2 = get_byte ();
jshort s = (b1 << 8) | b2; jshort s = (b1 << 8) | b2;
return (jint) s; return (jint) s;
} }
jint get_int () jint get_int ()
{ {
jbyte b1 = get_byte (); jint b1 = get_byte ();
jbyte b2 = get_byte (); jint b2 = get_byte ();
jbyte b3 = get_byte (); jint b3 = get_byte ();
jbyte b4 = get_byte (); jint b4 = get_byte ();
return (b1 << 24) | (b2 << 16) | (b3 << 8) | b4; return (b1 << 24) | (b2 << 16) | (b3 << 8) | b4;
} }
...@@ -1644,10 +1644,10 @@ private: ...@@ -1644,10 +1644,10 @@ private:
return get_one_type (p); return get_one_type (p);
} }
void check_return_type (type expected) void check_return_type (type onstack)
{ {
type rt = compute_return_type (current_method->self->signature); type rt = compute_return_type (current_method->self->signature);
if (! expected.compatible (rt)) if (! rt.compatible (onstack))
verify_fail ("incompatible return type", start_PC); verify_fail ("incompatible return type", start_PC);
} }
......
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