LABEL_IS_SUBR_START (in LABEL_DECL)
CLASS_ABSTRACT (in TYPE_DECL)
FIELD_TRANSIENT (in FIELD_DECL)
- 6: METHOD_TRANSIENT (in FUNCTION_DECL)
- LABEL_CHANGED (in LABEL_DECL)
+ 6: LABEL_CHANGED (in LABEL_DECL)
CLASS_SUPER (in TYPE_DECL, ACC_SUPER flag)
FIELD_LOCAL_ALIAS (in FIELD_DECL)
7: DECL_CONSTRUCTOR_P (in FUNCTION_DECL).
/* List of all class filenames seen so far. */
#define all_class_filename java_global_trees [JTI_ALL_CLASS_FILENAME]
-/* List of virtual method decls called in this translation unit, used to
- generate virtual method offset symbol table. */
+/* List of virtual decls referred to by this translation unit, used to
+ generate virtual method offset symbol table. */
#define otable_methods java_global_trees [JTI_OTABLE_METHODS]
+/* List of static decls referred to by this translation unit, used to
+ generate virtual method offset symbol table. */
+#define atable_methods java_global_trees [JTI_ATABLE_METHODS]
-/* The virtual method offset table. This is emitted as uninitialized data of
- the required length, and filled out at run time during class linking. */
+/* The virtual offset table. This is emitted as uninitialized data of
+ the required length, and filled out at run time during class
+ linking. */
#define otable_decl java_global_trees [JTI_OTABLE_DECL]
+/* The static address table. */
+#define atable_decl java_global_trees [JTI_ATABLE_DECL]
-/* The virtual method offset symbol table. Used by the runtime to fill out the
- otable. */
+/* The virtual offset symbol table. Used by the runtime to fill out
+ the otable. */
#define otable_syms_decl java_global_trees [JTI_OTABLE_SYMS_DECL]
+/* The static symbol table. Used by the runtime to fill out the
+ otable. */
+#define atable_syms_decl java_global_trees [JTI_ATABLE_SYMS_DECL]
+
+#define ctable_decl java_global_trees [JTI_CTABLE_DECL]
+#define catch_classes java_global_trees [JTI_CATCH_CLASSES]
extern int flag_emit_class_files;
extern int do_not_fold;
/* Resource name. */
-extern char * resource_name;
+extern const char *resource_name;
/* Turned to 1 if -Wall was encountered. See lang.c for their meanings. */
extern int flag_wall;
JTI_DECIMAL_INT_MAX_NODE,
JTI_DECIMAL_LONG_MAX_NODE,
- JTI_BOOLEAN_TYPE_NODE,
-
JTI_OBJECT_TYPE_NODE,
JTI_UNQUALIFIED_OBJECT_ID_NODE,
JTI_OBJECT_PTR_TYPE_NODE,
JTI_RETURN_ADDRESS_TYPE_NODE,
- JTI_BOOLEAN_TRUE_NODE,
- JTI_BOOLEAN_FALSE_NODE,
-
JTI_LONG_ZERO_NODE,
JTI_FLOAT_ZERO_NODE,
JTI_DOUBLE_ZERO_NODE,
JTI_METHOD_PTR_TYPE_NODE,
JTI_OTABLE_TYPE,
JTI_OTABLE_PTR_TYPE,
- JTI_METHOD_SYMBOL_TYPE,
- JTI_METHOD_SYMBOLS_ARRAY_TYPE,
- JTI_METHOD_SYMBOLS_ARRAY_PTR_TYPE,
+ JTI_ATABLE_TYPE,
+ JTI_ATABLE_PTR_TYPE,
+ JTI_SYMBOL_TYPE,
+ JTI_SYMBOLS_ARRAY_TYPE,
+ JTI_SYMBOLS_ARRAY_PTR_TYPE,
JTI_END_PARAMS_NODE,
JTI_OTABLE_DECL,
JTI_OTABLE_SYMS_DECL,
+ JTI_ATABLE_METHODS,
+ JTI_ATABLE_DECL,
+ JTI_ATABLE_SYMS_DECL,
+
+ JTI_CTABLE_DECL,
+ JTI_CATCH_CLASSES,
+
JTI_PREDEF_FILENAMES,
JTI_MAX
#define decimal_long_max \
java_global_trees[JTI_DECIMAL_LONG_MAX_NODE]
-#define boolean_type_node \
- java_global_trees[JTI_BOOLEAN_TYPE_NODE]
-
#define object_type_node \
java_global_trees[JTI_OBJECT_TYPE_NODE]
#define unqualified_object_id_node \
#define return_address_type_node \
java_global_trees[JTI_RETURN_ADDRESS_TYPE_NODE]
-/* Nodes for boolean constants TRUE and FALSE. */
-#define boolean_true_node \
- java_global_trees[JTI_BOOLEAN_TRUE_NODE]
-#define boolean_false_node \
- java_global_trees[JTI_BOOLEAN_FALSE_NODE]
-
/* Integer constants not declared in tree.h. */
#define long_zero_node \
java_global_trees[JTI_LONG_ZERO_NODE]
java_global_trees[JTI_METHOD_PTR_TYPE_NODE]
#define otable_type \
java_global_trees[JTI_OTABLE_TYPE]
+#define atable_type \
+ java_global_trees[JTI_ATABLE_TYPE]
#define otable_ptr_type \
java_global_trees[JTI_OTABLE_PTR_TYPE]
-#define method_symbol_type \
- java_global_trees[JTI_METHOD_SYMBOL_TYPE]
-#define method_symbols_array_type \
- java_global_trees[JTI_METHOD_SYMBOLS_ARRAY_TYPE]
-#define method_symbols_array_ptr_type \
- java_global_trees[JTI_METHOD_SYMBOLS_ARRAY_PTR_TYPE]
+#define atable_ptr_type \
+ java_global_trees[JTI_ATABLE_PTR_TYPE]
+#define symbol_type \
+ java_global_trees[JTI_SYMBOL_TYPE]
+#define symbols_array_type \
+ java_global_trees[JTI_SYMBOLS_ARRAY_TYPE]
+#define symbols_array_ptr_type \
+ java_global_trees[JTI_SYMBOLS_ARRAY_PTR_TYPE]
+#define class_refs_decl \
+ Jjava_global_trees[TI_CLASS_REFS_DECL]
#define end_params_node \
java_global_trees[JTI_END_PARAMS_NODE]
/* The original WFL of a final variable. */
#define DECL_FIELD_FINAL_WFL(NODE) \
(DECL_LANG_SPECIFIC(NODE)->u.v.wfl)
-/* In a FUNCTION_DECL for which DECL_BUILT_IN does not hold, this is
- the approximate number of statements in this function. There is
- no need for this number to be exact; it is only used in various
- heuristics regarding optimization. */
-#define DECL_NUM_STMTS(NODE) \
- (FUNCTION_DECL_CHECK (NODE)->decl.u1.i)
/* True if NODE is a local variable final. */
#define LOCAL_FINAL_P(NODE) (DECL_LANG_SPECIFIC (NODE) && DECL_FINAL (NODE))
/* True if NODE is a final field. */
if (DECL_LANG_SPECIFIC (T) == NULL) \
{ \
DECL_LANG_SPECIFIC ((T)) \
- = ((struct lang_decl *) \
- ggc_alloc_cleared (sizeof (struct lang_decl))); \
+ = ggc_alloc_cleared (sizeof (struct lang_decl)); \
DECL_LANG_SPECIFIC (T)->desc = LANG_DECL_VAR; \
}
unsigned int fixed_ctor : 1;
unsigned int init_calls_this : 1;
unsigned int strictfp : 1;
+ unsigned int invisible : 1; /* Set for methods we generate
+ internally but which shouldn't be
+ written to the .class file. */
};
struct treetreehash_entry GTY(())
#define MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC(T) \
if (TYPE_LANG_SPECIFIC ((T)) == NULL) \
{ \
- TYPE_LANG_SPECIFIC ((T)) = \
- ((struct lang_type *) \
- ggc_alloc_cleared (sizeof (struct lang_type))); \
+ TYPE_LANG_SPECIFIC ((T)) \
+ = ggc_alloc_cleared (sizeof (struct lang_type)); \
}
#define TYPE_FINIT_STMT_LIST(T) (TYPE_LANG_SPECIFIC(T)->finit_stmt_list)
#define JCF_u4 unsigned long
#define JCF_u2 unsigned short
+/* Possible values to pass to lookup_argument_method_generic. */
+#define SEARCH_INTERFACE 1
+#define SEARCH_SUPER 2
+#define SEARCH_ONLY_INTERFACE 4
+#define SEARCH_VISIBLE 8
+
extern void java_parse_file (int);
extern bool java_mark_addressable (tree);
extern tree java_type_for_mode (enum machine_mode, int);
extern tree lookup_java_constructor (tree, tree);
extern tree lookup_java_method (tree, tree, tree);
extern tree lookup_argument_method (tree, tree, tree);
-extern tree lookup_argument_method2 (tree, tree, tree);
+extern tree lookup_argument_method_generic (tree, tree, tree, int);
extern int has_method (tree, tree);
extern tree promote_type (tree);
extern tree get_constant (struct JCF*, int);
extern tree build_internal_class_name (tree);
extern tree build_constants_constructor (void);
extern tree build_ref_from_constant_pool (int);
-extern void compile_resource_file (char *, const char *);
extern tree build_utf8_ref (tree);
extern tree ident_subst (const char*, int, const char*, int, int, const char*);
extern tree identifier_subst (const tree, const char *, int, int, const char *);
extern void register_class (void);
extern int alloc_name_constant (int, tree);
extern void emit_register_classes (void);
-extern void emit_offset_symbol_table (void);
+extern tree emit_symbol_table (tree, tree, tree, tree, tree);
extern void lang_init_source (int);
extern void write_classfile (tree);
extern char *print_int_node (tree);
extern void add_predefined_file (tree);
extern int predefined_filename_p (tree);
-extern void java_optimize_inline (tree);
extern tree decl_constant_value (tree);
extern void java_mark_class_local (tree);
extern void java_inlining_merge_static_initializers (tree, void *);
extern void java_inlining_map_static_initializers (tree, void *);
-extern void compile_resource_data (char *name, const char *buffer, int length);
+extern void compile_resource_data (const char *name, const char *buffer, int);
+extern void compile_resource_file (const char *, const char *);
extern void write_resource_constructor (void);
-extern void compile_resource_file (char *name, const char *filename);
extern void init_resource_processing (void);
+extern void start_complete_expand_method (tree);
+extern void java_expand_body (tree);
+
+extern int get_symbol_table_index (tree, tree *);
+
+extern tree make_catch_class_record (tree, tree);
+extern void emit_catch_table (void);
#define DECL_FINAL(DECL) DECL_LANG_FLAG_3 (DECL)
#define METHOD_SYNCHRONIZED(DECL) DECL_LANG_FLAG_4 (DECL)
#define METHOD_NATIVE(DECL) (DECL_LANG_SPECIFIC(DECL)->u.f.native)
#define METHOD_ABSTRACT(DECL) DECL_LANG_FLAG_5 (DECL)
-#define METHOD_TRANSIENT(DECL) DECL_LANG_FLAG_6 (DECL)
#define METHOD_STRICTFP(DECL) (DECL_LANG_SPECIFIC (DECL)->u.f.strictfp)
+#define METHOD_INVISIBLE(DECL) (DECL_LANG_SPECIFIC (DECL)->u.f.invisible)
#define JAVA_FILE_P(NODE) TREE_LANG_FLAG_2 (NODE)
#define CLASS_FILE_P(NODE) TREE_LANG_FLAG_3 (NODE)
/* Append a field initializer to CONS for a field with the given VALUE.
NAME is a char* string used for error checking;
the initializer must be specified in order. */
-#define PUSH_FIELD_VALUE(CONS, NAME, VALUE) {\
- tree field = TREE_CHAIN(CONS);\
- if (strcmp (IDENTIFIER_POINTER (DECL_NAME (field)), NAME) != 0) abort();\
- CONSTRUCTOR_ELTS(CONS) = tree_cons (field, VALUE, CONSTRUCTOR_ELTS(CONS));\
- TREE_CHAIN(CONS) = TREE_CHAIN (field); }
+#define PUSH_FIELD_VALUE(CONS, NAME, VALUE) \
+do \
+{ \
+ tree field = TREE_CHAIN(CONS); \
+ if (strcmp (IDENTIFIER_POINTER (DECL_NAME (field)), NAME) != 0) \
+ abort(); \
+ CONSTRUCTOR_ELTS(CONS) = tree_cons (field, VALUE, CONSTRUCTOR_ELTS(CONS)); \
+ TREE_CHAIN(CONS) = TREE_CHAIN (field); \
+} \
+while (0)
/* Finish creating a record CONSTRUCTOR CONS. */
#define FINISH_RECORD_CONSTRUCTOR(CONS) \