mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-30 18:25:35 +08:00
defineclass.cc (handleMethodsEnd): Invoke verifier here...
* defineclass.cc (handleMethodsEnd): Invoke verifier here... (handleCodeAttribute): ... not here. * verify.cc (_Jv_BytecodeVerifier::state::state): Use `copy', not structure assignment. From-SVN: r47591
This commit is contained in:
parent
2ca2d9ee0f
commit
64d3a1b48e
@ -1,3 +1,10 @@
|
|||||||
|
2001-12-03 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
* defineclass.cc (handleMethodsEnd): Invoke verifier here...
|
||||||
|
(handleCodeAttribute): ... not here.
|
||||||
|
* verify.cc (_Jv_BytecodeVerifier::state::state): Use `copy', not
|
||||||
|
structure assignment.
|
||||||
|
|
||||||
2001-12-02 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
|
2001-12-02 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
|
||||||
|
|
||||||
* Makefile.am (nat_files, x_nat_files): Make sure the dependencies
|
* Makefile.am (nat_files, x_nat_files): Make sure the dependencies
|
||||||
|
@ -500,10 +500,10 @@ void _Jv_ClassReader::read_methods ()
|
|||||||
|
|
||||||
check_tag (name_index, JV_CONSTANT_Utf8);
|
check_tag (name_index, JV_CONSTANT_Utf8);
|
||||||
prepare_pool_entry (descriptor_index, JV_CONSTANT_Utf8);
|
prepare_pool_entry (descriptor_index, JV_CONSTANT_Utf8);
|
||||||
|
|
||||||
handleMethod (i, access_flags, name_index,
|
handleMethod (i, access_flags, name_index,
|
||||||
descriptor_index);
|
descriptor_index);
|
||||||
|
|
||||||
for (int j = 0; j < attributes_count; j++)
|
for (int j = 0; j < attributes_count; j++)
|
||||||
{
|
{
|
||||||
read_one_method_attribute (i);
|
read_one_method_attribute (i);
|
||||||
@ -1282,10 +1282,6 @@ void _Jv_ClassReader::handleCodeAttribute
|
|||||||
code_length);
|
code_length);
|
||||||
|
|
||||||
def->interpreted_methods[method_index] = method;
|
def->interpreted_methods[method_index] = method;
|
||||||
|
|
||||||
// FIXME: Shouldn't this be done after loading completes?
|
|
||||||
// if (verify)
|
|
||||||
// _Jv_VerifyMethod (method);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void _Jv_ClassReader::handleExceptionTableEntry
|
void _Jv_ClassReader::handleExceptionTableEntry
|
||||||
@ -1332,9 +1328,17 @@ void _Jv_ClassReader::handleMethodsEnd ()
|
|||||||
{
|
{
|
||||||
if (def->interpreted_methods[i] == 0)
|
if (def->interpreted_methods[i] == 0)
|
||||||
throw_class_format_error ("method with no code");
|
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)
|
void _Jv_ClassReader::throw_class_format_error (char *msg)
|
||||||
|
@ -697,12 +697,12 @@ private:
|
|||||||
subroutine = 0;
|
subroutine = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
state (const state *copy, int max_stack, int max_locals)
|
state (const state *orig, int max_stack, int max_locals)
|
||||||
{
|
{
|
||||||
stack = new type[max_stack];
|
stack = new type[max_stack];
|
||||||
locals = new type[max_locals];
|
locals = new type[max_locals];
|
||||||
local_changed = (bool *) _Jv_Malloc (sizeof (bool) * max_locals);
|
local_changed = (bool *) _Jv_Malloc (sizeof (bool) * max_locals);
|
||||||
*this = *copy;
|
copy (orig, max_stack, max_locals);
|
||||||
next = INVALID;
|
next = INVALID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user