* check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
* decl.c (finish_method, java_add_stmt): Likewise.
* java-gimplify.c (java-gimplify.c): Likewise.
* jcf-write.c (generate_bytecode_insns): Likewise.
* lang.c (java_post_options): Likewise - call linemap_add.
From-SVN: r88324
* java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
+ * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
+ * decl.c (finish_method, java_add_stmt): Likewise.
+ * java-gimplify.c (java-gimplify.c): Likewise.
+ * jcf-write.c (generate_bytecode_insns): Likewise.
+ * lang.c (java_post_options): Likewise - call linemap_add.
+
2004-09-29 Andrew Haley <aph@redhat.com>
PR java/17007
if (IS_EMPTY_STMT (body))
break;
wfl = exp;
+#ifdef USE_MAPPED_LOCATION
+ input_location = EXPR_LOCATION (exp);
+#else
input_filename = EXPR_WFL_FILENAME (exp);
input_line = EXPR_WFL_LINENO (exp);
+#endif
check_init (body, before);
input_location = saved_location;
wfl = saved_wfl;
cfun = DECL_STRUCT_FUNCTION (fndecl);
else
allocate_struct_function (fndecl);
+#ifdef USE_MAPPED_LOCATION
+ cfun->function_end_locus = DECL_FUNCTION_LAST_LINE (fndecl);
+#else
cfun->function_end_locus.file = DECL_SOURCE_FILE (fndecl);
cfun->function_end_locus.line = DECL_FUNCTION_LAST_LINE (fndecl);
+#endif
/* Defer inlining and expansion to the cgraph optimizers. */
cgraph_finalize_function (fndecl, false);
java_add_stmt (tree stmt)
{
if (input_filename)
- annotate_with_locus (stmt, input_location);
+ SET_EXPR_LOCATION (stmt, input_location);
return current_binding_level->stmts
= add_stmt_to_compound (current_binding_level->stmts,
break;
case EXPR_WITH_FILE_LOCATION:
+#ifdef USE_MAPPED_LOCATION
+ input_location = EXPR_LOCATION (*expr_p);
+#else
input_location.file = EXPR_WFL_FILENAME (*expr_p);
input_location.line = EXPR_WFL_LINENO (*expr_p);
+#endif
*expr_p = EXPR_WFL_NODE (*expr_p);
- annotate_with_locus (*expr_p, input_location);
+ SET_EXPR_LOCATION (*expr_p, input_location);
break;
case CASE_EXPR:
tree body = EXPR_WFL_NODE (exp);
if (IS_EMPTY_STMT (body))
break;
+#ifdef USE_MAPPED_LOCATION
+ input_location = EXPR_LOCATION (exp);
+#else
input_filename = EXPR_WFL_FILENAME (exp);
input_line = EXPR_WFL_LINENO (exp);
+#endif
if (EXPR_WFL_EMIT_LINE_NOTE (exp) && input_line > 0
&& debug_info_level > DINFO_LEVEL_NONE)
put_linenumber (input_line, state);
}
}
}
+#ifdef USE_MAPPED_LOCATION
+ linemap_add (&line_table, LC_ENTER, false, filename, 0);
+ linemap_add (&line_table, LC_RENAME, false, "<built-in>", 0);
+#endif
/* Initialize the compiler back end. */
return false;