Commit aabd7048 by Per Bothner

expr.c (process_jvm_instruction): Coerce to correct Throwable sub-type the…

expr.c (process_jvm_instruction): Coerce to correct Throwable sub-type the result of the call that gets the...

d
	* expr.c (process_jvm_instruction):  Coerce to correct Throwable
	sub-type the result of the call that gets the exception value.
	* parse.y (java_complete_expand_methods):  If flags_syntax_only,
	don't call finish_class.
	* parse.y (java_check_regular_methods):  If METHOD_PRIVATE,
	clear found before continuing.
	* verify.c (verify_jvm_instructions):  On an array load, allow
	and handle top of stack to be TYPE_NULL.

From-SVN: r24697
parent 2dc219a1
...@@ -2197,8 +2197,8 @@ process_jvm_instruction (PC, byte_ops, length) ...@@ -2197,8 +2197,8 @@ process_jvm_instruction (PC, byte_ops, length)
replace the top of the stack with the thrown object reference */ replace the top of the stack with the thrown object reference */
if (instruction_bits [PC] & BCODE_EXCEPTION_TARGET) if (instruction_bits [PC] & BCODE_EXCEPTION_TARGET)
{ {
pop_value (ptr_type_node); tree type = pop_type (ptr_type_node);
push_value (soft_exceptioninfo_call_node); push_value (build1 (NOP_EXPR, type, soft_exceptioninfo_call_node));
} }
switch (byte_ops[PC++]) switch (byte_ops[PC++])
......
...@@ -7161,8 +7161,13 @@ java_check_regular_methods (class_decl) ...@@ -7161,8 +7161,13 @@ java_check_regular_methods (class_decl)
found = lookup_argument_method (super_class, DECL_NAME (method), sig); found = lookup_argument_method (super_class, DECL_NAME (method), sig);
/* Nothing overrides or it's a private method. */ /* Nothing overrides or it's a private method. */
if (!found || (found && METHOD_PRIVATE (found))) if (!found)
continue; continue;
if (METHOD_PRIVATE (found))
{
found = NULL_TREE;
continue;
}
/* If found wasn't verified, it's DECL_NAME won't be set properly. /* If found wasn't verified, it's DECL_NAME won't be set properly.
We set it temporarily for the sake of the error report. */ We set it temporarily for the sake of the error report. */
...@@ -8310,7 +8315,7 @@ java_complete_expand_methods () ...@@ -8310,7 +8315,7 @@ java_complete_expand_methods ()
{ {
if (flag_emit_class_files) if (flag_emit_class_files)
write_classfile (current_class); write_classfile (current_class);
else else if (! flag_syntax_only)
finish_class (current_class); finish_class (current_class);
} }
} }
......
...@@ -4523,8 +4523,13 @@ java_check_regular_methods (class_decl) ...@@ -4523,8 +4523,13 @@ java_check_regular_methods (class_decl)
found = lookup_argument_method (super_class, DECL_NAME (method), sig); found = lookup_argument_method (super_class, DECL_NAME (method), sig);
/* Nothing overrides or it's a private method. */ /* Nothing overrides or it's a private method. */
if (!found || (found && METHOD_PRIVATE (found))) if (!found)
continue; continue;
if (METHOD_PRIVATE (found))
{
found = NULL_TREE;
continue;
}
/* If found wasn't verified, it's DECL_NAME won't be set properly. /* If found wasn't verified, it's DECL_NAME won't be set properly.
We set it temporarily for the sake of the error report. */ We set it temporarily for the sake of the error report. */
...@@ -5672,7 +5677,7 @@ java_complete_expand_methods () ...@@ -5672,7 +5677,7 @@ java_complete_expand_methods ()
{ {
if (flag_emit_class_files) if (flag_emit_class_files)
write_classfile (current_class); write_classfile (current_class);
else else if (! flag_syntax_only)
finish_class (current_class); finish_class (current_class);
} }
} }
......
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