aboutsummaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2001-11-19 01:04:15 +0000
committerTom Tromey <tromey@gcc.gnu.org>2001-11-19 01:04:15 +0000
commit590077b0705ee6cba7222fa21752d87b38ed2f1b (patch)
treed1960b38cca3ffbcd273190bc8285e3067560342 /libjava
parente7b35eec24998f295038354a424ca8b6a2ce808b (diff)
downloadgcc-590077b0705ee6cba7222fa21752d87b38ed2f1b.zip
gcc-590077b0705ee6cba7222fa21752d87b38ed2f1b.tar.gz
gcc-590077b0705ee6cba7222fa21752d87b38ed2f1b.tar.bz2
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
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog7
-rw-r--r--libjava/verify.cc20
2 files changed, 17 insertions, 10 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 0afaa10..d52d322 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,5 +1,12 @@
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
message.
(_Jv_BytecodeVerifier::pop64): Likewise.
diff --git a/libjava/verify.cc b/libjava/verify.cc
index 5d8fd80..cc1c5c4 100644
--- a/libjava/verify.cc
+++ b/libjava/verify.cc
@@ -946,25 +946,25 @@ private:
jint get_ushort ()
{
- jbyte b1 = get_byte ();
- jbyte b2 = get_byte ();
+ jint b1 = get_byte ();
+ jint b2 = get_byte ();
return (jint) ((b1 << 8) | b2) & 0xffff;
}
jint get_short ()
{
- jbyte b1 = get_byte ();
- jbyte b2 = get_byte ();
+ jint b1 = get_byte ();
+ jint b2 = get_byte ();
jshort s = (b1 << 8) | b2;
return (jint) s;
}
jint get_int ()
{
- jbyte b1 = get_byte ();
- jbyte b2 = get_byte ();
- jbyte b3 = get_byte ();
- jbyte b4 = get_byte ();
+ jint b1 = get_byte ();
+ jint b2 = get_byte ();
+ jint b3 = get_byte ();
+ jint b4 = get_byte ();
return (b1 << 24) | (b2 << 16) | (b3 << 8) | b4;
}
@@ -1644,10 +1644,10 @@ private:
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);
- if (! expected.compatible (rt))
+ if (! rt.compatible (onstack))
verify_fail ("incompatible return type", start_PC);
}