diff options
Diffstat (limited to 'gcc/java/parse.y')
-rw-r--r-- | gcc/java/parse.y | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/gcc/java/parse.y b/gcc/java/parse.y index a5064e1..de0a7d4 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -3208,7 +3208,7 @@ classitf_redefinition_error (const char *context, tree id, tree decl, tree cl) { parse_error_context (cl, "%s `%s' already defined in %s:%d", context, IDENTIFIER_POINTER (id), - DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl)); + TREE_FILENAME (decl), TREE_LINENO (decl)); /* Here we should point out where its redefined. It's a unicode. FIXME */ } @@ -3716,12 +3716,10 @@ maybe_create_class_interface_decl (tree decl, tree raw_name, decl = push_class (make_class (), qualified_name); /* Take care of the file and line business */ - DECL_SOURCE_FILE (decl) = EXPR_WFL_FILENAME (cl); - /* If we're emiting xrefs, store the line/col number information */ - if (flag_emit_xref) - DECL_SOURCE_LINE (decl) = EXPR_WFL_LINECOL (cl); - else - DECL_SOURCE_LINE (decl) = EXPR_WFL_LINENO (cl); + set_tree_file_line (decl, EXPR_WFL_FILENAME (cl), + (flag_emit_xref + ? EXPR_WFL_LINECOL (cl) : EXPR_WFL_LINENO (cl))); + CLASS_FROM_SOURCE_P (TREE_TYPE (decl)) = 1; CLASS_PARSED_P (TREE_TYPE (decl)) = 1; CLASS_FROM_CURRENTLY_COMPILED_P (TREE_TYPE (decl)) = @@ -4205,7 +4203,7 @@ duplicate_declaration_error_p (tree new_field_name, tree new_type, tree cl) (cl , "Duplicate variable declaration: `%s %s' was `%s %s' (%s:%d)", t1, IDENTIFIER_POINTER (new_field_name), t2, IDENTIFIER_POINTER (DECL_NAME (decl)), - DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl)); + TREE_FILENAME (decl), TREE_LINENO (decl)); free (t1); free (t2); return 1; @@ -4687,7 +4685,7 @@ method_header (int flags, tree type, tree mdecl, tree throws) /* If doing xref, store column and line number information instead of the line number only. */ if (flag_emit_xref) - DECL_SOURCE_LINE (meth) = EXPR_WFL_LINECOL (id); + set_tree_file_line (meth, TREE_FILENAME (meth), EXPR_WFL_LINECOL (id)); return meth; } @@ -6705,8 +6703,8 @@ lookup_cl (tree decl) cl_v = build_expr_wfl (NULL_TREE, NULL, 0, 0); } - EXPR_WFL_FILENAME_NODE (cl_v) = get_identifier (DECL_SOURCE_FILE (decl)); - EXPR_WFL_SET_LINECOL (cl_v, DECL_SOURCE_LINE (decl), -1); + EXPR_WFL_FILENAME_NODE (cl_v) = get_identifier (TREE_FILENAME (decl)); + EXPR_WFL_SET_LINECOL (cl_v, TREE_LINENO (decl), -1); line = java_get_line_col (EXPR_WFL_FILENAME (cl_v), EXPR_WFL_LINENO (cl_v), EXPR_WFL_COLNO (cl_v)); @@ -7286,7 +7284,7 @@ declare_local_variables (int modifier, tree type, tree vlist) if ((other = lookup_name_in_blocks (name))) { variable_redefinition_error (wfl, name, TREE_TYPE (other), - DECL_SOURCE_LINE (other)); + TREE_LINENO (other)); continue; } @@ -7306,7 +7304,8 @@ declare_local_variables (int modifier, tree type, tree vlist) /* If doing xreferencing, replace the line number with the WFL compound value */ if (flag_emit_xref) - DECL_SOURCE_LINE (decl) = EXPR_WFL_LINECOL (wfl); + set_tree_file_line (decl, TREE_FILENAME (decl), + EXPR_WFL_LINECOL (wfl)); /* Don't try to use an INIT statement when an error was found */ if (init && java_error_count) @@ -7414,7 +7413,7 @@ create_artificial_method (tree class, int flags, tree type, static void start_artificial_method_body (tree mdecl) { - DECL_SOURCE_LINE (mdecl) = 1; + set_tree_file_line (mdecl, TREE_FILENAME (mdecl), 1); DECL_FUNCTION_LAST_LINE (mdecl) = 1; source_start_java_method (mdecl); enter_block (); @@ -7980,7 +7979,7 @@ start_complete_expand_method (tree mdecl) TREE_CHAIN (tem) = next; } pushdecl_force_head (DECL_ARGUMENTS (mdecl)); - input_line = DECL_SOURCE_LINE (mdecl); + input_location = TREE_LOCUS (mdecl); build_result_decl (mdecl); } @@ -10145,7 +10144,7 @@ check_deprecation (tree wfl, tree decl) to the record. */ decl = TYPE_NAME (TREE_TYPE (elt)); } - file = DECL_SOURCE_FILE (decl); + file = TREE_FILENAME (decl); /* Complain if the field is deprecated and the file it was defined in isn't compiled at the same time the file which contains its |