summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-14 02:36:38 +0000
committerbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-14 02:36:38 +0000
commit37c33819b4c4d146c1ecc194b50215297d3086e0 (patch)
tree169246f0954dfc20285a8360379b7db5e6516ac7 /gcc
parent246a13bd86ef507e9768fd7ccd07d23cdf044e2a (diff)
downloadgcc-37c33819b4c4d146c1ecc194b50215297d3086e0.tar.gz
* java-tree.h (all_class_filename): Remove useless macro.
(enum java_tree_index): Remove JTI_ALL_CLASS_FILENAME constant. (BUILD_FILENAME_IDENTIFIER_NODE): Remove useless macro. * parse.y (java_parser_context_restore_global): Replace BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier. * jcf-parse.c (read_class, java_parse_file): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84667 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/java/ChangeLog9
-rw-r--r--gcc/java/java-tree.h14
-rw-r--r--gcc/java/jcf-parse.c4
-rw-r--r--gcc/java/parse.y6
4 files changed, 12 insertions, 21 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index fe7a4dcf623..b111dad3ce7 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,12 @@
+2004-07-13 Per Bothner <per@bothner.com>
+
+ * java-tree.h (all_class_filename): Remove useless macro.
+ (enum java_tree_index): Remove JTI_ALL_CLASS_FILENAME constant.
+ (BUILD_FILENAME_IDENTIFIER_NODE): Remove useless macro.
+ * parse.y (java_parser_context_restore_global): Replace
+ BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
+ * jcf-parse.c (read_class, java_parse_file): Likewise.
+
2004-07-12 Bryce McKinlay <mckinlay@redhat.com>
PR java/16474
diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h
index 2cf91455778..89599764c89 100644
--- a/gcc/java/java-tree.h
+++ b/gcc/java/java-tree.h
@@ -153,9 +153,6 @@ extern int compiling_from_source;
#define all_class_list \
java_global_trees[JTI_ALL_CLASS_LIST]
-/* List of all class filenames seen so far. */
-#define all_class_filename java_global_trees [JTI_ALL_CLASS_FILENAME]
-
/* List of virtual decls referred to by this translation unit, used to
generate virtual method offset symbol table. */
@@ -415,7 +412,6 @@ enum java_tree_index
JTI_CURRENT_CLASS,
JTI_OUTPUT_CLASS,
JTI_ALL_CLASS_LIST,
- JTI_ALL_CLASS_FILENAME,
JTI_PREDEF_FILENAMES,
@@ -1674,16 +1670,6 @@ extern tree *type_map;
scope of TYPE_DECL. */
#define DECL_INNER_CLASS_LIST(NODE) DECL_INITIAL (TYPE_DECL_CHECK (NODE))
-/* Build a IDENTIFIER_NODE for a file name we're considering. Since
- all_class_filename is a registered root, putting this identifier
- in a TREE_LIST it holds keeps this node alive. */
-#define BUILD_FILENAME_IDENTIFIER_NODE(F, S) \
- if (!((F) = maybe_get_identifier ((S)))) \
- { \
- (F) = get_identifier ((S)); \
- tree_cons ((F), NULL_TREE, all_class_filename); \
- }
-
/* Add a FIELD_DECL to RECORD_TYPE RTYPE.
The field has name NAME (a char*), and type FTYPE.
Unless this is the first field, FIELD most hold the previous field.
diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c
index 0503ef9ceeb..07f8ccc754b 100644
--- a/gcc/java/jcf-parse.c
+++ b/gcc/java/jcf-parse.c
@@ -501,7 +501,7 @@ read_class (tree name)
java_parser_context_save_global ();
java_push_parser_context ();
- BUILD_FILENAME_IDENTIFIER_NODE (given_file, filename);
+ given_file = get_identifier (filename);
real_file = get_identifier (lrealpath (filename));
generate = IS_A_COMMAND_LINE_FILENAME_P (given_file);
@@ -1006,7 +1006,7 @@ java_parse_file (int set_yydebug ATTRIBUTE_UNUSED)
}
else
{
- BUILD_FILENAME_IDENTIFIER_NODE (node, value);
+ node = get_identifier (value);
IS_A_COMMAND_LINE_FILENAME_P (node) = 1;
current_file_list = tree_cons (NULL_TREE, node,
current_file_list);
diff --git a/gcc/java/parse.y b/gcc/java/parse.y
index 8d65bd1e52f..283176f4cec 100644
--- a/gcc/java/parse.y
+++ b/gcc/java/parse.y
@@ -2765,11 +2765,7 @@ java_parser_context_restore_global (void)
current_class = ctxp->class_type;
input_filename = ctxp->filename;
if (wfl_operator)
- {
- tree s;
- BUILD_FILENAME_IDENTIFIER_NODE (s, input_filename);
- EXPR_WFL_FILENAME_NODE (wfl_operator) = s;
- }
+ EXPR_WFL_FILENAME_NODE (wfl_operator) = get_identifier (input_filename);
current_function_decl = ctxp->function_decl;
ctxp->saved_data = 0;
if (ctxp->saved_data_ctx)