diff options
author | Ranjit Mathew <rmathew@gcc.gnu.org> | 2005-05-27 05:15:26 +0000 |
---|---|---|
committer | Ranjit Mathew <rmathew@gcc.gnu.org> | 2005-05-27 05:15:26 +0000 |
commit | 38c9d142c841e105788c13daf64902c7156a0fb3 (patch) | |
tree | b3937d50c473e4e969f8f4dfe85d2bed7c441069 /gcc/java/java-tree.h | |
parent | 27358466f931ecec6692d6d4267318ed1266d729 (diff) | |
download | gcc-38c9d142c841e105788c13daf64902c7156a0fb3.zip gcc-38c9d142c841e105788c13daf64902c7156a0fb3.tar.gz gcc-38c9d142c841e105788c13daf64902c7156a0fb3.tar.bz2 |
re PR java/19870 (gcj -C doesn't generate accessors for private members across nested class boundaries)
PR java/19870.
* java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to
NESTED_FIELD_ACCESS_IDENTIFIER_P.
(FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS.
(FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P.
* jcf-write.c (generate_classfile): Use
NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
OUTER_FIELD_ACCESS_IDENTIFIER_P.
* parse.y (build_outer_field_access): Rename to
build_nested_field_access. Support static fields and outer-to-inner
class accesses.
(outer_field_access_p): Rename to nested_field_access_p. Support
static fields and generalise to outer-to-inner class and sibling
inner class accesses.
(outer_field_expanded_access_p): Rename to
nested_field_expanded_access_p and support static fields.
(outer_field_access_fix): Rename to nested_field_access_fix and
support static fields.
(build_outer_field_access_expr): Rename to
build_nested_field_access_expr and support static fields.
(build_outer_field_access_methods): Rename to
build_nested_field_access_methods and support static fields. For
static fields, generate accessors without class instance parameters.
(build_outer_field_access_method): Rename to
build_nested_field_access_method and support static fields.
(build_outer_method_access_method): Use
NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
OUTER_FIELD_ACCESS_IDENTIFIER_P.
(resolve_expression_name): Consider static field accesses across
nested classes.
(resolve_qualified_expression_name): Likewise.
(java_complete_lhs): Use nested_field_access_fix instead of
outer_field_access_fix.
(patch_unary_op): Rename outer_field_flag to nested_field_flag.
Use nested_field_expanded_access_p instead of
outer_field_expanded_access_p. Use nested_field_access_fix instead
of outer_field_access_fix.
(check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P
instead of OUTER_FIELD_ACCESS_IDENTIFIER_P.
From-SVN: r100246
Diffstat (limited to 'gcc/java/java-tree.h')
-rw-r--r-- | gcc/java/java-tree.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h index f919741..3799563 100644 --- a/gcc/java/java-tree.h +++ b/gcc/java/java-tree.h @@ -71,7 +71,7 @@ struct JCF; IS_CRAFTED_STRING_BUFFER_P (in CALL_EXPR) IS_INIT_CHECKED (in SAVE_EXPR) 6: CAN_COMPLETE_NORMALLY (in statement nodes) - OUTER_FIELD_ACCESS_IDENTIFIER_P (in IDENTIFIER_NODE) + NESTED_FIELD_ACCESS_IDENTIFIER_P (in IDENTIFIER_NODE) Usage of TYPE_LANG_FLAG_?: 0: CLASS_ACCESS0_GENERATED_P (in RECORD_TYPE) @@ -896,16 +896,16 @@ union lang_tree_node #define DECL_LOCAL_START_PC(NODE) (DECL_LANG_SPECIFIC (NODE)->u.v.start_pc) /* The end (bytecode) pc for the valid range of this local variable. */ #define DECL_LOCAL_END_PC(NODE) (DECL_LANG_SPECIFIC (NODE)->u.v.end_pc) -/* For a VAR_DECLor PARM_DECL, used to chain decls with the same +/* For a VAR_DECL or PARM_DECL, used to chain decls with the same slot_number in decl_map. */ #define DECL_LOCAL_SLOT_CHAIN(NODE) (DECL_LANG_SPECIFIC(NODE)->u.v.slot_chain) /* For a FIELD_DECL, holds the name of the access method. Used to - read/write the content of the field from an inner class. */ -#define FIELD_INNER_ACCESS(DECL) \ + read/write the content of the field across nested class boundaries. */ +#define FIELD_NESTED_ACCESS(DECL) \ (DECL_LANG_SPECIFIC (VAR_OR_FIELD_CHECK (DECL))->u.v.am) -/* Safely tests whether FIELD_INNER_ACCESS exists or not. */ -#define FIELD_INNER_ACCESS_P(DECL) \ - DECL_LANG_SPECIFIC (DECL) && FIELD_INNER_ACCESS (DECL) +/* Safely tests whether FIELD_NESTED_ACCESS exists or not. */ +#define FIELD_NESTED_ACCESS_P(DECL) \ + DECL_LANG_SPECIFIC (DECL) && FIELD_NESTED_ACCESS (DECL) /* True if a final field was initialized upon its declaration or in an initializer. Set after definite assignment. */ #define DECL_FIELD_FINAL_IUD(NODE) (DECL_LANG_SPECIFIC (NODE)->u.v.final_iud) @@ -1689,9 +1689,9 @@ extern tree *type_map; /* True if NODE (a statement) can complete normally. */ #define CAN_COMPLETE_NORMALLY(NODE) TREE_LANG_FLAG_6 (NODE) -/* True if NODE (an IDENTIFIER) bears the name of a outer field from - inner class access function. */ -#define OUTER_FIELD_ACCESS_IDENTIFIER_P(NODE) \ +/* True if NODE (an IDENTIFIER) bears the name of an outer field from + inner class (or vice versa) access function. */ +#define NESTED_FIELD_ACCESS_IDENTIFIER_P(NODE) \ TREE_LANG_FLAG_6 (IDENTIFIER_NODE_CHECK (NODE)) /* True if NODE belongs to an inner class TYPE_DECL node. |