aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/java-tree.h
diff options
context:
space:
mode:
authorAlexandre Petit-Bianco <apbianco@redhat.com>2001-08-02 17:20:50 -0700
committerAlexandre Petit-Bianco <apbianco@gcc.gnu.org>2001-08-02 17:20:50 -0700
commit36e10d77f212d88ecc4f97fff8636cdb744c0cb9 (patch)
treefc8a4c0f1e39f85ea16c56a7ccdd79ebcbcb35a3 /gcc/java/java-tree.h
parentdff94ad7470cadea94dbb94b5e66b56229b37cc5 (diff)
downloadgcc-36e10d77f212d88ecc4f97fff8636cdb744c0cb9.zip
gcc-36e10d77f212d88ecc4f97fff8636cdb744c0cb9.tar.gz
gcc-36e10d77f212d88ecc4f97fff8636cdb744c0cb9.tar.bz2
java-tree.h (all_class_filename): New macro.
2001-08-02 Alexandre Petit-Bianco <apbianco@redhat.com> * java-tree.h (all_class_filename): New macro. (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.' (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link newly created IDENTIFIER_NODE to `all_class_filename.' (http://gcc.gnu.org/ml/gcc-patches/2001-08/msg00093.html) Proxima Estacion Esperanza From-SVN: r44588
Diffstat (limited to 'gcc/java/java-tree.h')
-rw-r--r--gcc/java/java-tree.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h
index 73d4af2..03d3cc2 100644
--- a/gcc/java/java-tree.h
+++ b/gcc/java/java-tree.h
@@ -135,6 +135,9 @@ 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]
+
extern int flag_emit_class_files;
extern int flag_filelist_file;
@@ -349,6 +352,7 @@ enum java_tree_index
JTI_MAIN_CLASS,
JTI_CURRENT_CLASS,
JTI_ALL_CLASS_LIST,
+ JTI_ALL_CLASS_FILENAME,
JTI_MAX
};
@@ -1452,14 +1456,14 @@ extern tree *type_map;
scope of TYPE_DECL. */
#define DECL_INNER_CLASS_LIST(NODE) DECL_INITIAL (NODE)
-/* Build a IDENTIFIER_POINTER for a file name we're considering. We
- need to register the root, but we're trying to register it only
- once. */
-#define BUILD_FILENAME_IDENTIFIER_NODE(F, S) \
- if (!((F) = maybe_get_identifier ((S)))) \
- { \
- (F) = get_identifier ((S)); \
- ggc_add_tree_root (&(F), 1); \
+/* 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.