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@cygnus.com>2000-10-05 07:17:34 +0000
commit36f7228ac61ebbedce17220204b3f077be076809 (patch)
tree4d5c18c324994e5c054b7c48872b57170975b1b9 /gcc/java/decl.c
parent37d3a8fd8edd8528015bd5ab93b59af0ca73c1f3 (diff)
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) git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@36717 138bc75d-0d04-0410-961f-82ee72b054a4
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 da44ca6ac81..8dd349ff8c7 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;