diff options
| author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-25 22:08:31 +0000 |
|---|---|---|
| committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-25 22:08:31 +0000 |
| commit | dc5e52161fe493db7c467ab5d2bca209ee1ae883 (patch) | |
| tree | 047bbcbef9a1b2d83cf20f62170c7df12ca50eff /gcc/java/java-tree.h | |
| parent | 2f96475c32ccd16122473fdadc5ab6f1885f5351 (diff) | |
| download | ppe42-gcc-dc5e52161fe493db7c467ab5d2bca209ee1ae883.tar.gz ppe42-gcc-dc5e52161fe493db7c467ab5d2bca209ee1ae883.zip | |
PR libgcj/21692
cp/
* cp-tree.h (make_alias_for): Declare.
* decl2.c (build_java_method_aliases): New.
(cp_finish_file): Call it.
* method.c (make_alias_for): Split out from ...
(make_alias_for_thunk): ... here.
java/
* Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H.
* class.c (build_class_ref): Set DECL_CLASS_FIELD_P and
DECL_CONTEXT; avoid pushdecl_top_level.
(build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT.
(layout_class): Don't SET_DECL_ASSEMBLER_NAME.
(layout_class_method): Likewise.
* decl.c (java_mark_cni_decl_local): New.
(java_mark_class_local): Use it.
* java-tree.h (DECL_LOCAL_CNI_METHOD_P): New.
(DECL_CLASS_FIELD_P, DECL_VTABLE_P): New.
(struct lang_decl_func): Add local_cni;
(struct lang_decl_var): Add class_field, vtable.
(java_mangle_decl): Declare.
* lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New.
* mangle.c: Remove dup obstack.h; include langhooks-def.h.
(mangle_obstack_1): New.
(java_mangle_decl): Remove obstack argument. Call mangle_class_field,
mangle_vtable, and mangle_local_cni_method_decl. Fall back to
lhd_set_decl_assembler_name for things that don't need mangling.
(mangle_class_field): Rename from java_mangle_class_field, make
static, don't call init_mangling or finish_mangling.
(mangle_vtable): Similarly.
(mangle_local_cni_method_decl): New.
(init_mangling): Remove obstack argument. Use &mangle_obstack_1,
gcc_assert, and MANGLE_RAW_STRING.
(finish_mangling): Use gcc_assert, remove if 0 debugging code.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100171 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/java-tree.h')
| -rw-r--r-- | gcc/java/java-tree.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h index 68eb1d6c55d..f9197418424 100644 --- a/gcc/java/java-tree.h +++ b/gcc/java/java-tree.h @@ -818,6 +818,9 @@ union lang_tree_node #define DECL_FIXED_CONSTRUCTOR_P(DECL) \ (DECL_LANG_SPECIFIC(DECL)->u.f.fixed_ctor) +#define DECL_LOCAL_CNI_METHOD_P(NODE) \ + (DECL_LANG_SPECIFIC (NODE)->u.f.local_cni) + /* A constructor that calls this. */ #define DECL_INIT_CALLS_THIS(DECL) \ (DECL_LANG_SPECIFIC(DECL)->u.f.init_calls_this) @@ -931,6 +934,12 @@ union lang_tree_node (DECL_LANG_SPECIFIC (NODE)->u.v.freed) #define LOCAL_SLOT_P(NODE) \ (DECL_LANG_SPECIFIC (NODE)->u.v.local_slot) + +#define DECL_CLASS_FIELD_P(NODE) \ + (DECL_LANG_SPECIFIC (NODE)->u.v.class_field) +#define DECL_VTABLE_P(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) \ @@ -993,7 +1002,8 @@ struct lang_decl_func GTY(()) unsigned int invisible : 1; /* Set for methods we generate internally but which shouldn't be written to the .class file. */ - unsigned int dummy:1; + unsigned int dummy : 1; + unsigned int local_cni : 1; /* Decl needs mangle_local_cni_method. */ }; struct treetreehash_entry GTY(()) @@ -1037,6 +1047,8 @@ struct lang_decl_var GTY(()) unsigned int cif : 1; /* True: decl is a class initialization flag */ unsigned int freed : 1; /* Decl is no longer in scope. */ unsigned int local_slot : 1; /* Decl is a temporary in the stack frame. */ + unsigned int class_field : 1; /* Decl needs mangle_class_field. */ + unsigned int vtable : 1; /* Decl needs mangle_vtable. */ }; /* This is what 'lang_decl' really points to. */ @@ -1367,7 +1379,7 @@ extern void init_jcf_parse (void); extern void init_src_parse (void); extern int cxx_keyword_p (const char *, int); -extern tree java_mangle_decl (struct obstack *, tree); +extern void java_mangle_decl (tree); extern tree java_mangle_class_field (struct obstack *, tree); extern tree java_mangle_vtable (struct obstack *, tree); extern void append_gpp_mangled_name (const char *, int); |

