diff options
| author | apbianco <apbianco@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-04-26 19:09:37 +0000 |
|---|---|---|
| committer | apbianco <apbianco@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-04-26 19:09:37 +0000 |
| commit | daa0662441a793a41cc20125214d4c07bf9562d4 (patch) | |
| tree | 38ae2203c1adb1c12229db14df3792c799011465 /gcc/java/parse.h | |
| parent | 2ea43938d267c4a864f8726e59133fdb8beb178e (diff) | |
| download | ppe42-gcc-daa0662441a793a41cc20125214d4c07bf9562d4.tar.gz ppe42-gcc-daa0662441a793a41cc20125214d4c07bf9562d4.zip | |
Sat Apr 24 16:50:19 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (layout_class_method): Generate <clinit>'s rtl for
interfaces.
* decl.c (complete_start_java_method): Don't call _Jv_InitClass
for interfaces' <clinit>.
* expr.c (lookup_field): Search for fields in interfaces.
(expand_invoke): Fixed indentation.
(expand_java_field_op): Likewise. Use IS_CLINIT.
* parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
(IS_CLINIT): New macro.
* parse.y (type_declaration:): Call maybe_generate_clinit after an
interface was parsed.
(maybe_generate_clinit): Don't generate if the current class is an
interface with only fields of primitive types.
(reset_method_name): Use IS_CLINIT.
(java_complete_expand_method): Expand <clinit> when it exists for
interfaces. Use IS_CLINIT.
(resolve_expression_name): Use DECL_CONTEXT instead of
current_class to build static field references.
(java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
ARRAY_REF when doing xreferencing.
(check_final_assignment): Fixed typo in leading comment. Use
IS_CLINIT.
(patch_array_ref): Don't fully expand array references when
xreferencing.
(patch_return): Use IS_CLINIT.
(patch_throw_statement): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@26661 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/parse.h')
| -rw-r--r-- | gcc/java/parse.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/java/parse.h b/gcc/java/parse.h index fb489e00508..08a96b4fbdc 100644 --- a/gcc/java/parse.h +++ b/gcc/java/parse.h @@ -177,9 +177,6 @@ extern tree stabilize_reference PROTO ((tree)); && (JNUMERIC_TYPE_P ((TYPE)) \ || TREE_CODE ((TYPE)) == BOOLEAN_TYPE)) -#define JPRIMITIVE_TYPE_OR_VOID_P(TYPE) \ - (JPRIMITIVE_TYPE_P (TYPE) || ((TYPE) == void_type_node)) - #define JBSC_TYPE_P(TYPE) ((TYPE) && (((TYPE) == byte_type_node) \ || ((TYPE) == short_type_node) \ || ((TYPE) == char_type_node))) @@ -583,6 +580,10 @@ typedef struct _jdeplist { ctxp->import_list = node; \ } +/* Safe check that DECL is <clinit> */ +#define IS_CLINIT(DECL) \ + (DECL != NULL_TREE && DECL_NAME (DECL) == clinit_identifier_node) + /* Macro to access the osb (opening square bracket) count */ #define CURRENT_OSB(C) (C)->osb_number [(C)->osb_depth] |

