summaryrefslogtreecommitdiff
path: root/gcc/java/java-tree.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/java/java-tree.h')
-rw-r--r--gcc/java/java-tree.h22
1 files changed, 13 insertions, 9 deletions
diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h
index f48e4215925..282b5802ed9 100644
--- a/gcc/java/java-tree.h
+++ b/gcc/java/java-tree.h
@@ -750,11 +750,12 @@ union GTY((desc ("TREE_CODE (&%h.generic) == IDENTIFIER_NODE"),
(DECL_LANG_SPECIFIC (NODE)->u.v.vtable)
/* Create a DECL_LANG_SPECIFIC if necessary. */
-#define MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC(T) \
- if (DECL_LANG_SPECIFIC (T) == NULL) \
- { \
- DECL_LANG_SPECIFIC ((T)) = GGC_CNEW (struct lang_decl); \
- DECL_LANG_SPECIFIC (T)->desc = LANG_DECL_VAR; \
+#define MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC(T) \
+ if (DECL_LANG_SPECIFIC (T) == NULL) \
+ { \
+ DECL_LANG_SPECIFIC ((T)) \
+ = ggc_alloc_cleared_lang_decl (sizeof (struct lang_decl)); \
+ DECL_LANG_SPECIFIC (T)->desc = LANG_DECL_VAR; \
}
/* A ConstantExpression, after folding and name resolution. */
@@ -840,7 +841,7 @@ typedef struct GTY(()) type_assertion {
extern tree java_treetreehash_find (htab_t, tree);
extern tree * java_treetreehash_new (htab_t, tree);
-extern htab_t java_treetreehash_create (size_t size, int ggc);
+extern htab_t java_treetreehash_create (size_t size);
/* DECL_LANG_SPECIFIC for VAR_DECL, PARM_DECL and sometimes FIELD_DECL
(access methods on outer class fields) and final fields. */
@@ -861,7 +862,7 @@ struct GTY(()) lang_decl_var {
enum lang_decl_desc {LANG_DECL_FUNC, LANG_DECL_VAR};
-struct GTY(()) lang_decl {
+struct GTY((variable_size)) lang_decl {
enum lang_decl_desc desc;
union lang_decl_u
{
@@ -879,7 +880,7 @@ struct GTY(()) lang_decl {
#define MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC(T) \
if (TYPE_LANG_SPECIFIC ((T)) == NULL) \
TYPE_LANG_SPECIFIC ((T)) \
- = GGC_CNEW (struct lang_type);
+ = ggc_alloc_cleared_lang_type (sizeof (struct lang_type));
#define TYPE_DUMMY(T) (TYPE_LANG_SPECIFIC(T)->dummy_class)
@@ -924,7 +925,10 @@ typedef struct GTY(()) method_entry_d {
DEF_VEC_O(method_entry);
DEF_VEC_ALLOC_O(method_entry,gc);
-struct GTY(()) lang_type {
+/* FIXME: the variable_size annotation here is needed because these types are
+ variable-sized in some other frontends. Due to gengtype deficiency the GTY
+ options of such types have to agree across all frontends. */
+struct GTY((variable_size)) lang_type {
tree signature;
struct JCF *jcf;
struct CPool *cpool;