aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/expr.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2008-02-29 12:55:06 +0000
committerTom Tromey <tromey@gcc.gnu.org>2008-02-29 12:55:06 +0000
commit0a5fe1104e1a3d5a582248a434777951c0199837 (patch)
tree25913b4e0b76c5a0ab05d84339e5149bd388d1b0 /gcc/java/expr.c
parentb0fbea136ef18450fdc326a7ea6a35deca625448 (diff)
downloadgcc-0a5fe1104e1a3d5a582248a434777951c0199837.zip
gcc-0a5fe1104e1a3d5a582248a434777951c0199837.tar.gz
gcc-0a5fe1104e1a3d5a582248a434777951c0199837.tar.bz2
expr.c (expand_byte_code): Set DECL_FUNCTION_LAST_LINE on method.
* expr.c (expand_byte_code): Set DECL_FUNCTION_LAST_LINE on method. * java-tree.h (struct lang_decl_func): Remove obsolete comment. From-SVN: r132767
Diffstat (limited to 'gcc/java/expr.c')
-rw-r--r--gcc/java/expr.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/java/expr.c b/gcc/java/expr.c
index c174ed9..b113df1 100644
--- a/gcc/java/expr.c
+++ b/gcc/java/expr.c
@@ -3132,6 +3132,7 @@ expand_byte_code (JCF *jcf, tree method)
int dead_code_index = -1;
unsigned char* byte_ops;
long length = DECL_CODE_LENGTH (method);
+ location_t max_location = input_location;
stack_pointer = 0;
JCF_SEEK (jcf, DECL_CODE_OFFSET (method));
@@ -3219,6 +3220,8 @@ expand_byte_code (JCF *jcf, tree method)
{
int line = GET_u2 (linenumber_pointer - 2);
input_location = linemap_line_start (line_table, line, 1);
+ if (input_location > max_location)
+ max_location = input_location;
if (!(instruction_bits[PC] & BCODE_HAS_MULTI_LINENUMBERS))
break;
}
@@ -3238,6 +3241,8 @@ expand_byte_code (JCF *jcf, tree method)
warning (0, "unreachable bytecode from %d to the end of the method",
dead_code_index);
}
+
+ DECL_FUNCTION_LAST_LINE (method) = max_location;
}
static void