[multiple changes]
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. (From egcs posted patches.) From-SVN: r27314
This commit is contained in:
parent
c237e58627
commit
99fd3aa538
@ -1,3 +1,18 @@
|
||||
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
|
||||
|
@ -583,6 +583,7 @@ build_utf8_ref (name)
|
||||
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);
|
||||
@ -608,6 +609,7 @@ build_utf8_ref (name)
|
||||
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);
|
||||
|
@ -118,7 +118,7 @@ link_handler (range, outer)
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -1986,6 +1986,7 @@ expand_byte_code (jcf, method)
|
||||
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. */
|
||||
@ -2164,15 +2165,29 @@ expand_byte_code (jcf, method)
|
||||
|
||||
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,
|
||||
@ -2204,6 +2219,13 @@ expand_byte_code (jcf, method)
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user