summaryrefslogtreecommitdiff
path: root/gcc/java/verify.c
diff options
context:
space:
mode:
authorapbianco <apbianco@138bc75d-0d04-0410-961f-82ee72b054a4>1999-12-06 19:56:58 +0000
committerapbianco <apbianco@138bc75d-0d04-0410-961f-82ee72b054a4>1999-12-06 19:56:58 +0000
commitfd42932f146b1ce4136bd0edc05b8f2f94679483 (patch)
treeddf284ed2a7ed8687ce5deda9ffcab1baff6b2c9 /gcc/java/verify.c
parent6c664d8d68bae261d1beb86f1299f2dfecc66de3 (diff)
downloadgcc-fd42932f146b1ce4136bd0edc05b8f2f94679483.tar.gz
Tue Nov 30 12:36:15 1999 Anthony Green <green@cygnus.com>
* verify.c (verify_jvm_instructions): Create new return label chain if non existant (don't rely on the verified state of the jsr target.) Tue Nov 23 17:29:40 1999 Alexandre Petit-Bianco <apbianco@cygnus.com> * verify.c (merge_type_state): Non verified subroutines being considered more than once to trigger passive type merge. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30811 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/verify.c')
-rw-r--r--gcc/java/verify.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/gcc/java/verify.c b/gcc/java/verify.c
index 41ad823cb46..d17a184bf40 100644
--- a/gcc/java/verify.c
+++ b/gcc/java/verify.c
@@ -216,10 +216,13 @@ merge_type_state (label)
int cur_length = stack_pointer + nlocals;
tree vec = LABEL_TYPE_STATE (label);
tree return_map;
- if (vec == NULL_TREE)
+ if (vec == NULL_TREE || !LABEL_VERIFIED (label))
{
- vec = make_tree_vec (cur_length);
- LABEL_TYPE_STATE (label) = vec;
+ if (!vec)
+ {
+ vec = make_tree_vec (cur_length);
+ LABEL_TYPE_STATE (label) = vec;
+ }
while (--cur_length >= 0)
TREE_VEC_ELT (vec, cur_length) = type_map [cur_length];
return 1;
@@ -1153,9 +1156,10 @@ verify_jvm_instructions (jcf, byte_ops, length)
tree target = lookup_label (oldpc + IMMEDIATE_s2);
tree return_label = lookup_label (PC);
push_type (return_address_type_node);
- if (! LABEL_VERIFIED (target))
+ /* The return label chain will be null if this is the first
+ time we've seen this jsr target. */
+ if (LABEL_RETURN_LABEL (target) == NULL_TREE)
{
- /* first time seen */
tree return_type_map;
int nlocals = DECL_MAX_LOCALS (current_function_decl);
index = nlocals + DECL_MAX_STACK (current_function_decl);