aboutsummaryrefslogtreecommitdiff
path: root/libjava/defineclass.cc
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2001-12-04 06:37:53 +0000
committerTom Tromey <tromey@redhat.com>2001-12-04 06:37:53 +0000
commitd0bde69b21150da4043e768f1ad9eecefb93f50f (patch)
tree032cf042fe4b123003d1e37679a4281f05c4c8d8 /libjava/defineclass.cc
parent180870426fad578a4bc623a6dd873ec2507b4f66 (diff)
* defineclass.cc (handleMethodsEnd): Invoke verifier here...
(handleCodeAttribute): ... not here. * verify.cc (_Jv_BytecodeVerifier::state::state): Use `copy', not structure assignment. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@47591 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/defineclass.cc')
-rw-r--r--libjava/defineclass.cc18
1 files changed, 11 insertions, 7 deletions
diff --git a/libjava/defineclass.cc b/libjava/defineclass.cc
index 3a6eaba9227..31a46625320 100644
--- a/libjava/defineclass.cc
+++ b/libjava/defineclass.cc
@@ -500,10 +500,10 @@ void _Jv_ClassReader::read_methods ()
check_tag (name_index, JV_CONSTANT_Utf8);
prepare_pool_entry (descriptor_index, JV_CONSTANT_Utf8);
-
+
handleMethod (i, access_flags, name_index,
descriptor_index);
-
+
for (int j = 0; j < attributes_count; j++)
{
read_one_method_attribute (i);
@@ -1282,10 +1282,6 @@ void _Jv_ClassReader::handleCodeAttribute
code_length);
def->interpreted_methods[method_index] = method;
-
- // FIXME: Shouldn't this be done after loading completes?
-// if (verify)
-// _Jv_VerifyMethod (method);
}
void _Jv_ClassReader::handleExceptionTableEntry
@@ -1332,9 +1328,17 @@ void _Jv_ClassReader::handleMethodsEnd ()
{
if (def->interpreted_methods[i] == 0)
throw_class_format_error ("method with no code");
+
+ if (verify)
+ {
+ _Jv_InterpMethod *m;
+ m = (reinterpret_cast<_Jv_InterpMethod *>
+ (def->interpreted_methods[i]));
+ // FIXME: enable once verifier is more fully tested.
+ // _Jv_VerifyMethod (m);
+ }
}
}
-
}
void _Jv_ClassReader::throw_class_format_error (char *msg)