aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/parse.y
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2003-09-21 22:09:32 -0700
committerRichard Henderson <rth@gcc.gnu.org>2003-09-21 22:09:32 -0700
commitf31686a322301454c5ea5b997997aa7c84c57781 (patch)
treed942bc168b4a8f91e17acf863e1d2091ff773b6c /gcc/java/parse.y
parent0f7fcd6a40a237b634e0f93f1206724add7354d3 (diff)
downloadgcc-f31686a322301454c5ea5b997997aa7c84c57781.zip
gcc-f31686a322301454c5ea5b997997aa7c84c57781.tar.gz
gcc-f31686a322301454c5ea5b997997aa7c84c57781.tar.bz2
Revert DECL_SOURCE_LOCATION -> TREE_LOCUS change.
From-SVN: r71641
Diffstat (limited to 'gcc/java/parse.y')
-rw-r--r--gcc/java/parse.y31
1 files changed, 16 insertions, 15 deletions
diff --git a/gcc/java/parse.y b/gcc/java/parse.y
index de0a7d4..a5064e1 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),
- TREE_FILENAME (decl), TREE_LINENO (decl));
+ DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl));
/* Here we should point out where its redefined. It's a unicode. FIXME */
}
@@ -3716,10 +3716,12 @@ 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 */
- set_tree_file_line (decl, EXPR_WFL_FILENAME (cl),
- (flag_emit_xref
- ? EXPR_WFL_LINECOL (cl) : EXPR_WFL_LINENO (cl)));
-
+ 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);
CLASS_FROM_SOURCE_P (TREE_TYPE (decl)) = 1;
CLASS_PARSED_P (TREE_TYPE (decl)) = 1;
CLASS_FROM_CURRENTLY_COMPILED_P (TREE_TYPE (decl)) =
@@ -4203,7 +4205,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)),
- TREE_FILENAME (decl), TREE_LINENO (decl));
+ DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl));
free (t1);
free (t2);
return 1;
@@ -4685,7 +4687,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)
- set_tree_file_line (meth, TREE_FILENAME (meth), EXPR_WFL_LINECOL (id));
+ DECL_SOURCE_LINE (meth) = EXPR_WFL_LINECOL (id);
return meth;
}
@@ -6703,8 +6705,8 @@ lookup_cl (tree decl)
cl_v = build_expr_wfl (NULL_TREE, NULL, 0, 0);
}
- EXPR_WFL_FILENAME_NODE (cl_v) = get_identifier (TREE_FILENAME (decl));
- EXPR_WFL_SET_LINECOL (cl_v, TREE_LINENO (decl), -1);
+ EXPR_WFL_FILENAME_NODE (cl_v) = get_identifier (DECL_SOURCE_FILE (decl));
+ EXPR_WFL_SET_LINECOL (cl_v, DECL_SOURCE_LINE (decl), -1);
line = java_get_line_col (EXPR_WFL_FILENAME (cl_v),
EXPR_WFL_LINENO (cl_v), EXPR_WFL_COLNO (cl_v));
@@ -7284,7 +7286,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),
- TREE_LINENO (other));
+ DECL_SOURCE_LINE (other));
continue;
}
@@ -7304,8 +7306,7 @@ 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)
- set_tree_file_line (decl, TREE_FILENAME (decl),
- EXPR_WFL_LINECOL (wfl));
+ DECL_SOURCE_LINE (decl) = EXPR_WFL_LINECOL (wfl);
/* Don't try to use an INIT statement when an error was found */
if (init && java_error_count)
@@ -7413,7 +7414,7 @@ create_artificial_method (tree class, int flags, tree type,
static void
start_artificial_method_body (tree mdecl)
{
- set_tree_file_line (mdecl, TREE_FILENAME (mdecl), 1);
+ DECL_SOURCE_LINE (mdecl) = 1;
DECL_FUNCTION_LAST_LINE (mdecl) = 1;
source_start_java_method (mdecl);
enter_block ();
@@ -7979,7 +7980,7 @@ start_complete_expand_method (tree mdecl)
TREE_CHAIN (tem) = next;
}
pushdecl_force_head (DECL_ARGUMENTS (mdecl));
- input_location = TREE_LOCUS (mdecl);
+ input_line = DECL_SOURCE_LINE (mdecl);
build_result_decl (mdecl);
}
@@ -10144,7 +10145,7 @@ check_deprecation (tree wfl, tree decl)
to the record. */
decl = TYPE_NAME (TREE_TYPE (elt));
}
- file = TREE_FILENAME (decl);
+ file = DECL_SOURCE_FILE (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