aboutsummaryrefslogtreecommitdiff
path: root/libjava/defineclass.cc
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2001-11-05 23:39:54 +0000
committerTom Tromey <tromey@gcc.gnu.org>2001-11-05 23:39:54 +0000
commita12fe13ddb02336f99401401bfd8e85d5bd343bc (patch)
tree00e8580aca78cea0cc0c6157e06cdab7d56a0790 /libjava/defineclass.cc
parente6ec164c8d2631e6dcb9f20e9ca0266d73633e37 (diff)
downloadgcc-a12fe13ddb02336f99401401bfd8e85d5bd343bc.zip
gcc-a12fe13ddb02336f99401401bfd8e85d5bd343bc.tar.gz
gcc-a12fe13ddb02336f99401401bfd8e85d5bd343bc.tar.bz2
Class.h (Class): Made _Jv_BytecodeVerifier a friend.
* java/lang/Class.h (Class): Made _Jv_BytecodeVerifier a friend. * Makefile.in: Rebuilt. * Makefile.am (libgcj_la_SOURCES): Added verify.cc. * verify.cc: New file. * include/java-interp.h (_Jv_count_arguments): Declare. (_Jv_VerifyMethod): Likewise. (class _Jv_InterpMethod): Made _Jv_BytecodeVerifier a friend. (class _Jv_InterpException): Likewise. * resolve.cc (_Jv_count_arguments): Renamed from count_arguments. No longer static. Updated callers. * defineclass.cc (int_bits_to_float): Removed. (long_bits_to_double): Likewise. (prepare_pool_entry): Updated. (handleCodeAttribute): Verify method (commented out for now). From-SVN: r46796
Diffstat (limited to 'libjava/defineclass.cc')
-rw-r--r--libjava/defineclass.cc24
1 files changed, 7 insertions, 17 deletions
diff --git a/libjava/defineclass.cc b/libjava/defineclass.cc
index 7a3efa5..db37203 100644
--- a/libjava/defineclass.cc
+++ b/libjava/defineclass.cc
@@ -58,9 +58,6 @@ static void throw_incompatible_class_change_error (jstring msg)
static void throw_class_circularity_error (jstring msg)
__attribute__ ((__noreturn__));
-static jdouble long_bits_to_double (jlong);
-static jfloat int_bits_to_float (jint);
-
/**
* We define class reading using a class. It is practical, since then
* the entire class-reader can be a friend of class Class (it needs to
@@ -826,7 +823,7 @@ _Jv_ClassReader::prepare_pool_entry (int index, unsigned char this_tag)
case JV_CONSTANT_Float:
{
- jfloat f = int_bits_to_float ((jint) get4 (this_data));
+ jfloat f = java::lang::Float::intBitsToFloat ((jint) get4 (this_data));
_Jv_storeFloat (&pool_data[index], f);
pool_tags[index] = JV_CONSTANT_Float;
}
@@ -842,7 +839,8 @@ _Jv_ClassReader::prepare_pool_entry (int index, unsigned char this_tag)
case JV_CONSTANT_Double:
{
- jdouble d = long_bits_to_double ((jlong) get8 (this_data));
+ jdouble d
+ = java::lang::Double::longBitsToDouble ((jlong) get8 (this_data));
_Jv_storeDouble (&pool_data[index], d);
pool_tags[index] = JV_CONSTANT_Double;
}
@@ -1282,10 +1280,12 @@ void _Jv_ClassReader::handleCodeAttribute
memcpy ((void*) method->bytecode (),
(void*) (bytes+code_start),
code_length);
-
+
def->interpreted_methods[method_index] = method;
- /* that's all we do for now */
+ // FIXME: Shouldn't this be done after loading completes?
+// if (verify)
+// _Jv_VerifyMethod (method);
}
void _Jv_ClassReader::handleExceptionTableEntry
@@ -1635,16 +1635,6 @@ throw_internal_error (char *msg)
throw new java::lang::InternalError (JvNewStringLatin1 (msg));
}
-static jfloat int_bits_to_float (jint value)
-{
- return java::lang::Float::intBitsToFloat (value);
-}
-
-static jdouble long_bits_to_double (jlong value)
-{
- return java::lang::Double::longBitsToDouble (value);
-}
-
static void throw_incompatible_class_change_error (jstring msg)
{
throw new java::lang::IncompatibleClassChangeError (msg);