diff options
author | apbianco <apbianco@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-01-24 08:08:36 +0000 |
---|---|---|
committer | apbianco <apbianco@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-01-24 08:08:36 +0000 |
commit | a24242f98531ade03e6b0d76a60f81d832c4fbf1 (patch) | |
tree | b3ca35263ce6de5b0c268b75d5186f60cd6b2f19 /gcc/java/jcf-write.c | |
parent | 307e5cb7686abc5b64b4cbf004e0df71b5f1b85c (diff) | |
download | gcc-a24242f98531ade03e6b0d76a60f81d832c4fbf1.tar.gz |
2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (layout_class): Don't lay the superclass out if it's
already being laid out.
* jcf-parse.c (handle_innerclass_attribute): New function.
(HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
handle_innerclasses_attribute.
(jcf_parse): Don't load an innerclasses if it's already being
laid out.
* jcf-write.c (append_innerclass_attribute_entry): Static
`anonymous_name' and its initialization deleted. `ocii' and `ini'
to be zero for anonymous classes.
2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
necessary.
* jcf-parse.c (set_source_filename): Use
MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
* expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
gets a unique asm name.
2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
* jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
(HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
if necessary.
(HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
* jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
* parse.y (lookup_package_type_and_set_next): Deleted.
(resolve_package): Removed unnecessary code.
(find_applicable_accessible_methods_list): `finit$' can't be
inherited.
* verify.c (pop_argument_types): Added missing prototype.
(http://gcc.gnu.org/ml/gcc-patches/2001-01/msg01812.html)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39230 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/jcf-write.c')
-rw-r--r-- | gcc/java/jcf-write.c | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/gcc/java/jcf-write.c b/gcc/java/jcf-write.c index b66db937245..1106a759530 100644 --- a/gcc/java/jcf-write.c +++ b/gcc/java/jcf-write.c @@ -3216,27 +3216,24 @@ append_innerclasses_attribute_entry (state, decl, name) struct jcf_partial *state; tree decl, name; { - static tree anonymous_name = NULL_TREE; - int icii, ocii, ini, icaf; + int icii, icaf; + int ocii = 0, ini = 0; unsigned char *ptr = append_chunk (NULL, 8, state); - if (!anonymous_name) + icii = find_class_constant (&state->cpool, TREE_TYPE (decl)); + + /* Sun's implementation seems to generate ocii to 0 for inner + classes (which aren't considered members of the class they're + in.) The specs are saying that if the class is anonymous, + inner_name_index must be zero. */ + if (!ANONYMOUS_CLASS_P (TREE_TYPE (decl))) { - anonymous_name = get_identifier (""); - ggc_add_tree_root (&anonymous_name, 1); + ocii = find_class_constant (&state->cpool, + TREE_TYPE (DECL_CONTEXT (decl))); + ini = find_utf8_constant (&state->cpool, name); } - - icii = find_class_constant (&state->cpool, TREE_TYPE (decl)); - ocii = find_class_constant (&state->cpool, TREE_TYPE (DECL_CONTEXT (decl))); - - /* The specs are saying that if the class is anonymous, - inner_name_index must be zero. But the implementation makes it - point to an empty string. */ - ini = find_utf8_constant (&state->cpool, - (ANONYMOUS_CLASS_P (TREE_TYPE (decl)) ? - anonymous_name : name)); icaf = get_access_flags (decl); - + PUT2 (icii); PUT2 (ocii); PUT2 (ini); PUT2 (icaf); } |