diff options
author | Tom Tromey <tromey@redhat.com> | 2001-12-10 01:18:30 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2001-12-10 01:18:30 +0000 |
commit | 6d8b12448d9bbe96517f2145a93f4589e947edb5 (patch) | |
tree | 45cc1d1d0e9f8a64a919f48430d377afbd8b126c /libjava/resolve.cc | |
parent | ec10f7c7036edcb58649048bef39ade57fc12594 (diff) | |
download | gcc-6d8b12448d9bbe96517f2145a93f4589e947edb5.zip gcc-6d8b12448d9bbe96517f2145a93f4589e947edb5.tar.gz gcc-6d8b12448d9bbe96517f2145a93f4589e947edb5.tar.bz2 |
resolve.cc (_Jv_PrepareClass): Verify method here...
* resolve.cc (_Jv_PrepareClass): Verify method here...
* defineclass.cc (handleMethodsEnd): ... not here.
* verify.cc (_Jv_BytecodeVerifier::initialize_stack): New method.
(_Jv_BytecodeVerifier::verify_instructions_0) [op_return]: Ensure
there are no uninitialized objects.
(_Jv_BytecodeVerifier::state::this_type): New field.
(_Jv_BytecodeVerifier::state::state): Initialize this_type.
(_Jv_BytecodeVerifier::state::copy): Copy this_type.
(_Jv_BytecodeVerifier::state::merge): Merge this_type.
(_Jv_BytecodeVerifier::state::check_no_uninitialized_objects):
Handle this_type.
(_Jv_BytecodeVerifier::state::check_this_initialized): New
method.
(_Jv_BytecodeVerifier::state::set_initialized): Handle this_type.
(_Jv_BytecodeVerifier::state::set_this_type): New method.
(_Jv_BytecodeVerifier::verify_instructions_0) [op_putfield]: Allow
assignment to fields of `this' before another initializer is run.
From-SVN: r47826
Diffstat (limited to 'libjava/resolve.cc')
-rw-r--r-- | libjava/resolve.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libjava/resolve.cc b/libjava/resolve.cc index 2b25b57..ba397c9 100644 --- a/libjava/resolve.cc +++ b/libjava/resolve.cc @@ -578,7 +578,7 @@ _Jv_PrepareClass(jclass klass) // set the instance size for the class clz->size_in_bytes = instance_size; - + // allocate static memory if (static_size != 0) { @@ -628,6 +628,8 @@ _Jv_PrepareClass(jclass klass) else if (imeth != 0) // it could be abstract { _Jv_InterpMethod *im = reinterpret_cast<_Jv_InterpMethod *> (imeth); + // FIXME: enable once verifier is more fully tested. + // _Jv_VerifyMethod (im); clz->methods[i].ncode = im->ncode (); } } |