* except.c (link_handler): Chain exception handlers in order.
Wed Jun 2 10:41:24 1999 Anthony Green <green@cygnus.com>
* expr.c (expand_byte_code): Fill unreachable bytecode regions
with nops and process as usual in order to always set correct EH
ranges. Emit detailed warnings about unreachable bytecodes.
Wed Jun 2 10:35:13 1999 Anthony Green <green@cygnus.com>
* class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
constant.
(From egcs posted patches.)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@27314
138bc75d-0d04-0410-961f-
82ee72b054a4
+Wed Jun 2 10:44:38 1999 Anthony Green <green@cygnus.com>
+
+ * except.c (link_handler): Chain exception handlers in order.
+
+Wed Jun 2 10:41:24 1999 Anthony Green <green@cygnus.com>
+
+ * expr.c (expand_byte_code): Fill unreachable bytecode regions
+ with nops and process as usual in order to always set correct EH
+ ranges. Emit detailed warnings about unreachable bytecodes.
+
+Wed Jun 2 10:35:13 1999 Anthony Green <green@cygnus.com>
+
+ * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
+ constant.
+
Fri May 28 18:22:45 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (lookup_field_wrapper): Unified returned value to NULL
TREE_TYPE (string) = str_type;
PUSH_FIELD_VALUE (cinit, "data", string);
FINISH_RECORD_CONSTRUCTOR (cinit);
+ TREE_CONSTANT (cinit) = 1;
/* Build a unique identifier based on buf. */
sprintf(buf, "_Utf%d", ++utf8_count);
DECL_ARTIFICIAL (decl) = 1;
DECL_IGNORED_P (decl) = 1;
TREE_READONLY (decl) = 1;
+ TREE_THIS_VOLATILE (decl) = 0;
DECL_INITIAL (decl) = cinit;
TREE_CHAIN (decl) = utf8_decl_list;
layout_decl (decl, 0);
if (range->start_pc == outer->start_pc && range->end_pc == outer->end_pc)
{
- outer->handlers = chainon (range->handlers, outer->handlers);
+ outer->handlers = chainon (outer->handlers, range->handlers);
return;
}
int i;
int saw_index;
unsigned char *linenumber_pointer;
+ int dead_code_index = -1;
#undef RET /* Defined by config/i386/i386.h */
#undef AND /* Causes problems with opcodes for iand and land. */
if (! (instruction_bits [PC] & BCODE_VERIFIED))
{
- /* never executed - skip */
- warning ("Some bytecode operations (starting at pc %d) can never be executed", PC);
- while (PC < length
- && ! (instruction_bits [PC] & BCODE_VERIFIED))
- PC++;
- continue;
+ if (dead_code_index == -1)
+ {
+ /* This is the start of a region of unreachable bytecodes.
+ They still need to be processed in order for EH ranges
+ to get handled correctly. However, we can simply
+ replace these bytecodes with nops. */
+ dead_code_index = PC;
+ }
+
+ /* Turn this bytecode into a nop. */
+ byte_ops[PC] = 0x0;
+ }
+ else
+ {
+ if (dead_code_index != -1)
+ {
+ /* We've just reached the end of a region of dead code. */
+ warning ("Unreachable bytecode from %d to before %d.",
+ dead_code_index, PC);
+ dead_code_index = -1;
+ }
}
-
/* Handle possible line number entry for this PC.
This code handles out-of-order and multiple linenumbers per PC,
maybe_poplevels (PC);
maybe_end_try (PC);
} /* for */
+
+ if (dead_code_index != -1)
+ {
+ /* We've just reached the end of a region of dead code. */
+ warning ("Unreachable bytecode from %d to the end of the method.",
+ dead_code_index);
+ }
}
static void