Commit 528d9c63 by Tom Tromey Committed by Tom Tromey

verify-impl.c (vfy_push_type): Removed bogus "return".

	* verify-impl.c (vfy_push_type): Removed bogus "return".
	(initialize_stack): Use vfy_alloc and vfy_free.
	(verify_instructions_0): Likewise.

From-SVN: r91276
parent 91ff9507
2004-11-24 Tom Tromey <tromey@redhat.com> 2004-11-24 Tom Tromey <tromey@redhat.com>
* verify-impl.c (vfy_push_type): Removed bogus "return".
(initialize_stack): Use vfy_alloc and vfy_free.
(verify_instructions_0): Likewise.
* Merged gcj-abi-2-dev-branch to trunk. * Merged gcj-abi-2-dev-branch to trunk.
2004-11-24 Andrew Haley <aph@redhat.com> 2004-11-24 Andrew Haley <aph@redhat.com>
......
...@@ -1329,7 +1329,7 @@ static void ...@@ -1329,7 +1329,7 @@ static void
vfy_push_type (type_val tval) vfy_push_type (type_val tval)
{ {
type t = make_type (tval); type t = make_type (tval);
return vfy_push_type_t (t); vfy_push_type_t (t);
} }
#define push_type vfy_push_type #define push_type vfy_push_type
...@@ -2267,7 +2267,7 @@ initialize_stack (void) ...@@ -2267,7 +2267,7 @@ initialize_stack (void)
/* We have to handle wide arguments specially here. */ /* We have to handle wide arguments specially here. */
arg_count = vfy_count_arguments (vfy_get_signature (vfr->current_method)); arg_count = vfy_count_arguments (vfy_get_signature (vfr->current_method));
{ {
type arg_types[arg_count]; type *arg_types = (type *) vfy_alloc (arg_count * sizeof (type));
compute_argument_types (vfy_get_signature (vfr->current_method), arg_types); compute_argument_types (vfy_get_signature (vfr->current_method), arg_types);
for (i = 0; i < arg_count; ++i) for (i = 0; i < arg_count; ++i)
{ {
...@@ -2276,6 +2276,7 @@ initialize_stack (void) ...@@ -2276,6 +2276,7 @@ initialize_stack (void)
if (type_iswide (&arg_types[i])) if (type_iswide (&arg_types[i]))
++var; ++var;
} }
vfy_free (arg_types);
} }
return is_init; return is_init;
...@@ -3037,7 +3038,7 @@ verify_instructions_0 (void) ...@@ -3037,7 +3038,7 @@ verify_instructions_0 (void)
arg_count = vfy_count_arguments (method_signature); arg_count = vfy_count_arguments (method_signature);
{ {
/* Pop arguments and check types. */ /* Pop arguments and check types. */
type arg_types[arg_count]; type *arg_types = (type *) vfy_alloc (arg_count * sizeof (type));
compute_argument_types (method_signature, arg_types); compute_argument_types (method_signature, arg_types);
for (i = arg_count - 1; i >= 0; --i) for (i = arg_count - 1; i >= 0; --i)
...@@ -3047,6 +3048,8 @@ verify_instructions_0 (void) ...@@ -3047,6 +3048,8 @@ verify_instructions_0 (void)
nargs -= type_depth (&arg_types[i]); nargs -= type_depth (&arg_types[i]);
pop_init_ref_t (arg_types[i]); pop_init_ref_t (arg_types[i]);
} }
vfy_free (arg_types);
} }
if (opcode == op_invokeinterface if (opcode == op_invokeinterface
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment