diff options
Diffstat (limited to 'gcc/java')
-rw-r--r-- | gcc/java/ChangeLog | 13 | ||||
-rw-r--r-- | gcc/java/class.c | 6 | ||||
-rw-r--r-- | gcc/java/decl.c | 7 | ||||
-rw-r--r-- | gcc/java/expr.c | 6 | ||||
-rw-r--r-- | gcc/java/jcf-parse.c | 46 | ||||
-rw-r--r-- | gcc/java/lang.c | 4 |
6 files changed, 19 insertions, 63 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 73a7794..90f9a0c 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 2aec3a5..4eb3360 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 1f0dbf4..9f08746 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 a482a96..c174ed9 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 c3fe524..3350191 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 4dc1f19..76b024c 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; |