aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/decl.c
diff options
context:
space:
mode:
authorAlexandre Petit-Bianco <apbianco@cygnus.com>2000-10-05 07:17:34 +0000
committerAlexandre Petit-Bianco <apbianco@gcc.gnu.org>2000-10-05 00:17:34 -0700
commit6e22695a4cb3a02846963a46b713a3e0ab419f10 (patch)
tree4d5c18c324994e5c054b7c48872b57170975b1b9 /gcc/java/decl.c
parente23062d5a741b3eba6bb8fc66bd0b99e759cd6cd (diff)
downloadgcc-6e22695a4cb3a02846963a46b713a3e0ab419f10.zip
gcc-6e22695a4cb3a02846963a46b713a3e0ab419f10.tar.gz
gcc-6e22695a4cb3a02846963a46b713a3e0ab419f10.tar.bz2
[multiple changes]
Tue Oct 3 13:44:37 2000 Alexandre Petit-Bianco <apbianco@cygnus.com> * decl.c (find_local_variable): Removed uncessary type check and fixed range check typo. From Corey Minyard. Wed Sep 13 16:06:52 2000 Alexandre Petit-Bianco <apbianco@cygnus.com> * decl.c (give_name_to_locals): New local `code_offset'. Call `maybe_adjust_start_pc.' * expr.c (note_instructions): New function. (expand_byte_code): Don't collect insn starts here. (peek_opcode_at_pc): New function. (maybe_adjust_start_pc): Likewise. * java-tree.h (maybe_adjust_start_pc): Declare. (note_instructions): Likewise. * jcf-parse.c (parse_class_file): Call `note_instructions.' Wed Sep 13 11:50:35 2000 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (field_access:): Fixed indentation. (qualify_ambiguous_name): Properly qualify `this.a[b].c'. (http://gcc.gnu.org/ml/gcc-patches/2000-10/msg00067.html) From-SVN: r36717
Diffstat (limited to 'gcc/java/decl.c')
-rw-r--r--gcc/java/decl.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/java/decl.c b/gcc/java/decl.c
index da44ca6..8dd349f 100644
--- a/gcc/java/decl.c
+++ b/gcc/java/decl.c
@@ -170,9 +170,8 @@ find_local_variable (index, type, pc)
&& in_range)
{
if (best == NULL_TREE
- || (TREE_TYPE (decl) == type && TREE_TYPE (best) != type)
- || DECL_LOCAL_START_PC (decl) > DECL_LOCAL_START_PC (best)
- || DECL_LOCAL_END_PC (decl) < DECL_LOCAL_START_PC (decl))
+ || (DECL_LOCAL_START_PC (decl) > DECL_LOCAL_START_PC (best)
+ && DECL_LOCAL_END_PC (decl) < DECL_LOCAL_START_PC (best)))
best = decl;
}
decl = DECL_LOCAL_SLOT_CHAIN (decl);
@@ -1517,6 +1516,7 @@ give_name_to_locals (jcf)
JCF *jcf;
{
int i, n = DECL_LOCALVARIABLES_OFFSET (current_function_decl);
+ int code_offset = DECL_CODE_OFFSET (current_function_decl);
tree parm;
pending_local_decls = NULL_TREE;
if (n == 0)
@@ -1553,6 +1553,13 @@ give_name_to_locals (jcf)
"bad PC range for debug info for local `%s'");
end_pc = DECL_CODE_LENGTH (current_function_decl);
}
+
+ /* Adjust start_pc if necessary so that the local's first
+ store operation will use the relevant DECL as a
+ destination. Fore more information, read the leading
+ comments for expr.c:maybe_adjust_start_pc. */
+ start_pc = maybe_adjust_start_pc (jcf, code_offset, start_pc, slot);
+
DECL_LANG_SPECIFIC (decl)
= (struct lang_decl *) ggc_alloc (sizeof (struct lang_decl_var));
DECL_LOCAL_SLOT_NUMBER (decl) = slot;