summaryrefslogtreecommitdiff
path: root/gcc/java
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2008-02-26 16:05:24 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2008-02-26 16:05:24 +0000
commit9c85a98a2b03f3bacaba6103c8112066d0d272bb (patch)
treef43ad37c53fe9e709732439c80643fe626116583 /gcc/java
parentc039429494a2dec15ad4bf0b4a6d2fcc13ce8298 (diff)
downloadgcc-9c85a98a2b03f3bacaba6103c8112066d0d272bb.tar.gz
gcc
* system.h (USE_MAPPED_LOCATION): Poison. * Makefile.in (GTFILES): Put CPP_ID_DATA_H first. * tree-cfg.c (make_cond_expr_edges): Remove old location code. (make_goto_expr_edges): Likewise. (remove_bb): Likewise. (execute_warn_function_return): Likewise. * basic-block.h (struct edge_def) <goto_locus>: Change type to location_t. * c-common.c (fname_decl): Remove old location code. * tree-vect-transform.c (vect_finish_stmt_generation): Remove old location code. * rtl.h (ASM_OPERANDS_SOURCE_LOCATION): Remove old-location variant. (ASM_INPUT_SOURCE_LOCATION): Likewise. (gen_rtx_ASM_INPUT): Likewise. (gen_rtx_ASM_INPUT_loc): Likewise. (get_rtx_asm_OPERANDS): Remove. * cfglayout.c (insn_locators_alloc): Remove old location code. (set_curr_insn_source_location): Likewise. (curr_insn_locator): Likewise. * print-tree.c (print_node): Remove old location code. * tree-mudflap.c (mf_varname_tree): Remove old location code. (mf_file_function_line_tree): Remove test of USE_MAPPED_LOCATION. * cfgexpand.c (expand_gimple_cond_expr): Don't use location_from_locus. (construct_exit_block): Remove old location code. * emit-rtl.c (force_next_line_note): Remove old location code. * profile.c (branch_prob): Remove old location code. * tree-vectorizer.h (LOC, UNKNOWN_LOC, EXPR_LOC, LOC_FILE, LOC_LINE): Remove old-location variants. * langhooks.c (lhd_print_error_function): Remove old location code. * configure, config.in: Rebuilt. * configure.ac (--enable-mapped-location): Remove. * c-decl.c (c_init_decl_processing): Remove old location code. (finish_function): Likewise. * recog.c (decode_asm_operands): Remove old location code. * c-pch.c (c_common_read_pch): Remove old location code. * rtl.def (ASM_INPUT, ASM_OPERANDS): Remove old location variants. * gimple-low.c (lower_function_body): Remove old location code. * toplev.c (unknown_location): Remove. (push_srcloc): Remove old-location variant. (process_options): Remove old location code. (lang_dependent_init): Likewise. * input.h (UNKNOWN_LOCATION): Move definition. (location_t): Undeprecate. (source_locus): Remove. (location_from_locus): Remove. (struct location_s): Remove. Remove all old-location code. (input_line, input_filename): Remove. * final.c (final_scan_insn): Remove old location code. * diagnostic.c (diagnostic_build_prefix): Remove USE_MAPPED_LOCATION test. * tree.h (gimple_stmt) <locus>: Now a location_t. (tree_exp) <locus>: Likewise. (DECL_IS_BUILTIN): Remove old-location variant. (annotate_with_file_line, annotate_with_locus): Likewise. (expr_locus, set_expr_locus): Update. * tree.c (build1_stat): Remove old location code. (last_annotated_node): Remove. (annotate_with_file_line): Remove old-location variant. (annotate_with_locus): Likewise. (expr_location): Remove old location code. (set_expr_location): Likewise. (expr_has_location): Likewise. (expr_locus): Likewise. (set_expr_locus): Likewise. (expr_filename): Don't use location_from_locus. (expr_lineno): Likewise. * rtl-error.c (location_for_asm): Remove old location code. * c-lex.c (cb_line_change): Remove old location code. (fe_file_change): Likewise. (cb_def_pragma): Likewise. (c_lex_with_flags): Likewise. * gengtype.c (do_typedef): Don't special-case location types. (define_location_structures): Remove. (main): Don't call define_location_structures. * tree-pretty-print.c (dump_implicit_edges): Remove old location code. gcc/ada * misc.c (internal_error_function): Remove test of USE_MAPPED_LOCATION. * trans.c (gigi): Remove test of USE_MAPPED_LOCATION. (Sloc_to_locus): Remove old location code. gcc/cp * parser.c (eof_token): Remove old location code. (check_empty_body): Remove test of USE_MAPPED_LOCATION. * decl2.c (generate_ctor_or_dtor_function): Remove old location code. (cp_write_global_declarations): Likewise. * lex.c (cxx_init): Remove old location code. (handle_pragma_implementation): Remove test of USE_MAPPED_LOCATION. * pt.c (tsubst): Remove old location code. * error.c (cp_print_error_function): Remove test of USE_MAPPED_LOCATION. * decl.c (pop_label): Remove old location code. (finish_function): Likewise. gcc/fortran * trans-io.c (set_error_locus): Remove old location code. * trans-decl.c (gfc_set_decl_location): Remove old location code. * f95-lang.c (gfc_init): Remove test of USE_MAPPED_LOCATION. * scanner.c (gfc_gobble_whitespace): Remove old location code. (get_file): Likewise. (preprocessor_line): Likewise. (load_file): Likewise. (gfc_new_file): Likewise. * trans.c (gfc_trans_runtime_check): Remove old location code. (gfc_get_backend_locus): Likewise. (gfc_set_backend_locus): Likewise. * data.c (gfc_assign_data_value): Remove old location code. * error.c (show_locus): Remove old location code. * gfortran.h (gfc_linebuf): Remove old location code. (gfc_linebuf_linenum): Remove old-location variant. gcc/java * lang.c (java_post_options): Remove conditional. * expr.c (expand_byte_code): Remove old location code. * jcf-parse.c (set_source_filename): Remove old location code. (give_name_to_class): Likewise. (jcf_parse): Likewise. (duplicate_class_warning): Likewise. (parse_class_file): Likewise. (java_parse_file): Likewise. * decl.c (finish_method): Remove old location code. * class.c (push_class): Remove old location code. gcc/objc * objc-act.c (objc_init): Remove old location code. gcc/treelang * tree1.c (treelang_init): Remove old location code. (treelang_parse_file): Likewise. * lex.l (LINEMAP_POSITION_FOR_COLUMN): Remove. (update_lineno_charno): Remove old location code. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132679 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java')
-rw-r--r--gcc/java/ChangeLog13
-rw-r--r--gcc/java/class.c6
-rw-r--r--gcc/java/decl.c7
-rw-r--r--gcc/java/expr.c6
-rw-r--r--gcc/java/jcf-parse.c46
-rw-r--r--gcc/java/lang.c4
6 files changed, 19 insertions, 63 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 73a77947a80..90f9a0cad9e 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,16 @@
+2008-02-26 Tom Tromey <tromey@redhat.com>
+
+ * lang.c (java_post_options): Remove conditional.
+ * expr.c (expand_byte_code): Remove old location code.
+ * jcf-parse.c (set_source_filename): Remove old location code.
+ (give_name_to_class): Likewise.
+ (jcf_parse): Likewise.
+ (duplicate_class_warning): Likewise.
+ (parse_class_file): Likewise.
+ (java_parse_file): Likewise.
+ * decl.c (finish_method): Remove old location code.
+ * class.c (push_class): Remove old location code.
+
2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
PR other/35107
diff --git a/gcc/java/class.c b/gcc/java/class.c
index 2aec3a5addf..4eb3360a539 100644
--- a/gcc/java/class.c
+++ b/gcc/java/class.c
@@ -1,6 +1,6 @@
/* Functions related to building classes and their related objects.
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007 Free Software Foundation, Inc.
+ 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This file is part of GCC.
@@ -479,10 +479,6 @@ push_class (tree class_type, tree class_name)
{
tree decl, signature;
location_t saved_loc = input_location;
-#ifndef USE_MAPPED_LOCATION
- input_filename = "<unknown>";
- input_line = 0;
-#endif
CLASS_P (class_type) = 1;
decl = build_decl (TYPE_DECL, class_name, class_type);
TYPE_DECL_SUPPRESS_DEBUG (decl) = 1;
diff --git a/gcc/java/decl.c b/gcc/java/decl.c
index 1f0dbf46de6..9f08746154a 100644
--- a/gcc/java/decl.c
+++ b/gcc/java/decl.c
@@ -1,7 +1,7 @@
/* Process declarations and variables for the GNU compiler for the
Java(TM) language.
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2007,
- 2005, 2006, 2007 Free Software Foundation, Inc.
+ 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This file is part of GCC.
@@ -1851,12 +1851,7 @@ finish_method (tree fndecl)
set_cfun (DECL_STRUCT_FUNCTION (fndecl));
else
allocate_struct_function (fndecl, false);
-#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);
diff --git a/gcc/java/expr.c b/gcc/java/expr.c
index a482a969235..c174ed9a41e 100644
--- a/gcc/java/expr.c
+++ b/gcc/java/expr.c
@@ -1,6 +1,6 @@
/* Process expressions for the GNU compiler for the Java(TM) language.
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007 Free Software Foundation, Inc.
+ 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This file is part of GCC.
@@ -3218,11 +3218,7 @@ expand_byte_code (JCF *jcf, tree method)
if (pc == PC)
{
int line = GET_u2 (linenumber_pointer - 2);
-#ifdef USE_MAPPED_LOCATION
input_location = linemap_line_start (line_table, line, 1);
-#else
- input_location.line = line;
-#endif
if (!(instruction_bits[PC] & BCODE_HAS_MULTI_LINENUMBERS))
break;
}
diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c
index c3fe5247891..3350191dc34 100644
--- a/gcc/java/jcf-parse.c
+++ b/gcc/java/jcf-parse.c
@@ -1,6 +1,6 @@
/* Parser for Java(TM) .class files.
Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007 Free Software Foundation, Inc.
+ 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This file is part of GCC.
@@ -327,14 +327,7 @@ set_source_filename (JCF *jcf, int index)
&& strcmp (sfname, old_filename + old_len - new_len) == 0
&& (old_filename[old_len - new_len - 1] == '/'
|| old_filename[old_len - new_len - 1] == '\\'))
- {
-#ifndef USE_MAPPED_LOCATION
- input_filename = find_sourcefile (input_filename);
- DECL_SOURCE_LOCATION (TYPE_NAME (current_class)) = input_location;
- file_start_location = input_location;
-#endif
- return;
- }
+ return;
}
if (strchr (sfname, '/') == NULL && strchr (sfname, '\\') == NULL)
{
@@ -364,13 +357,7 @@ set_source_filename (JCF *jcf, int index)
}
sfname = find_sourcefile (sfname);
-#ifdef USE_MAPPED_LOCATION
line_table->maps[line_table->used-1].to_file = sfname;
-#else
- input_filename = sfname;
- DECL_SOURCE_LOCATION (TYPE_NAME (current_class)) = input_location;
- file_start_location = input_location;
-#endif
if (current_class == main_class) main_input_filename = sfname;
}
@@ -1205,7 +1192,6 @@ give_name_to_class (JCF *jcf, int i)
tree class_name = unmangle_classname ((const char *) JPOOL_UTF_DATA (jcf, j),
JPOOL_UTF_LENGTH (jcf, j));
this_class = lookup_class (class_name);
-#ifdef USE_MAPPED_LOCATION
{
tree source_name = identifier_subst (class_name, "", '.', '/', ".java");
const char *sfname = IDENTIFIER_POINTER (source_name);
@@ -1216,14 +1202,6 @@ give_name_to_class (JCF *jcf, int i)
if (main_input_filename == NULL && jcf == main_jcf)
main_input_filename = sfname;
}
-#else
- if (! DECL_ARTIFICIAL (TYPE_NAME (this_class)))
- {
- input_location = DECL_SOURCE_LOCATION (TYPE_NAME (this_class));
- if (main_input_filename == NULL && jcf == main_jcf)
- main_input_filename = input_filename;
- }
-#endif
jcf->cpool.data[i].t = this_class;
JPOOL_TAG (jcf, i) = CONSTANT_ResolvedClass;
@@ -1496,9 +1474,7 @@ jcf_parse (JCF* jcf)
if (TYPE_REFLECTION_DATA (current_class))
annotation_write_byte (JV_DONE_ATTR);
-#ifdef USE_MAPPED_LOCATION
linemap_add (line_table, LC_LEAVE, false, NULL, 0);
-#endif
/* The fields of class_type_node are already in correct order. */
if (current_class != class_type_node && current_class != object_type_node)
@@ -1531,13 +1507,8 @@ static void
duplicate_class_warning (const char *filename)
{
location_t warn_loc;
-#ifdef USE_MAPPED_LOCATION
linemap_add (line_table, LC_RENAME, 0, filename, 0);
warn_loc = linemap_line_start (line_table, 0, 1);
-#else
- warn_loc.file = filename;
- warn_loc.line = 0;
-#endif
warning (0, "%Hduplicate class will only be compiled once", &warn_loc);
}
@@ -1586,13 +1557,11 @@ parse_class_file (void)
java_layout_seen_class_methods ();
input_location = DECL_SOURCE_LOCATION (TYPE_NAME (current_class));
-#ifdef USE_MAPPED_LOCATION
{
/* Re-enter the current file. */
expanded_location loc = expand_location (input_location);
linemap_add (line_table, LC_ENTER, 0, loc.file, loc.line);
}
-#endif
file_start_location = input_location;
(*debug_hooks->start_source_file) (input_line, input_filename);
@@ -1657,13 +1626,8 @@ parse_class_file (void)
if (min_line == 0 || line < min_line)
min_line = line;
}
-#ifdef USE_MAPPED_LOCATION
if (min_line != 0)
input_location = linemap_line_start (line_table, min_line, 1);
-#else
- if (min_line != 0)
- input_line = min_line;
-#endif
}
else
{
@@ -1934,18 +1898,14 @@ java_parse_file (int set_yydebug ATTRIBUTE_UNUSED)
JCF_ZERO (main_jcf);
main_jcf->read_state = finput;
main_jcf->filbuf = jcf_filbuf_from_stdio;
-#ifdef USE_MAPPED_LOCATION
linemap_add (line_table, LC_ENTER, false, filename, 0);
input_location = linemap_line_start (line_table, 0, 1);
-#endif
if (open_in_zip (main_jcf, filename, NULL, 0) < 0)
fatal_error ("bad zip/jar file %s", filename);
localToFile = SeenZipFiles;
/* Register all the classes defined there. */
process_zip_dir (main_jcf->read_state);
-#ifdef USE_MAPPED_LOCATION
linemap_add (line_table, LC_LEAVE, false, NULL, 0);
-#endif
parse_zip_file_entries ();
}
else if (magic == (JCF_u4) ZIPEMPTYMAGIC)
@@ -1962,10 +1922,8 @@ java_parse_file (int set_yydebug ATTRIBUTE_UNUSED)
parse_source_file_1 (real_file, filename, finput);
java_parser_context_restore_global ();
java_pop_parser_context (1);
-#ifdef USE_MAPPED_LOCATION
linemap_add (line_table, LC_LEAVE, false, NULL, 0);
#endif
-#endif
}
}
diff --git a/gcc/java/lang.c b/gcc/java/lang.c
index 4dc1f19eda4..76b024ce822 100644
--- a/gcc/java/lang.c
+++ b/gcc/java/lang.c
@@ -1,6 +1,6 @@
/* Java(TM) language-specific utility routines.
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007 Free Software Foundation, Inc.
+ 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This file is part of GCC.
@@ -655,10 +655,8 @@ java_post_options (const char **pfilename)
}
}
}
-#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;