diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-11-05 23:39:54 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-11-05 23:39:54 +0000 |
commit | 795b12569754a9fc48d7b405f1bb083232bf483c (patch) | |
tree | 00e8580aca78cea0cc0c6157e06cdab7d56a0790 /libjava/defineclass.cc | |
parent | 6937820b66063617f77cc5c28532a8b73997f6d1 (diff) | |
download | gcc-795b12569754a9fc48d7b405f1bb083232bf483c.tar.gz |
* 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).
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46796 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/defineclass.cc')
-rw-r--r-- | libjava/defineclass.cc | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/libjava/defineclass.cc b/libjava/defineclass.cc index 7a3efa5d7c9..db37203e2c4 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); |