diff options
| author | apbianco <apbianco@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-11-24 17:57:41 +0000 |
|---|---|---|
| committer | apbianco <apbianco@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-11-24 17:57:41 +0000 |
| commit | 7523afefd027644170ddafcbf0f5112db2f40658 (patch) | |
| tree | ddfaaed8a863a8721201f3dd3d76d282cc58791c /gcc/java/java-tree.h | |
| parent | c2173b386e1bfe6fec018fc4c65eda79d31a192c (diff) | |
| download | ppe42-gcc-7523afefd027644170ddafcbf0f5112db2f40658.tar.gz ppe42-gcc-7523afefd027644170ddafcbf0f5112db2f40658.zip | |
Tue Nov 24 17:06:38 1998 Per Bothner <bothner@cygnus.com>
* (generate_classfile): Always write class access flag with
ACC_SUPER set.
Tue Nov 24 16:34:33 1998 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (maybe_layout_super_class): New function.
(layout_class): Reorganized. Loop on class methods dispatched into
a new function. Call maybe_layout_super_class.
(layout_class_methods, layout_class_method): New functions.
* expr.c (expand_java_NEW): Call layout_class_methods on loaded
class.
(expand_invoke): Likewise.
* java-tree.h (all_class_list): New global variable declared.
(layout_class_methods, layout_class_method): New function
prototypes.
(LAYOUT_SEEN_CLASS_METHODS): New macro.
* jcf-parse.c (all_class_list): New global variable.
(load_class): Extended what class_or_name can be. Use parser
context mechanism to save globals before calling jcf_parse.
(jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
is set on the file name.
(jcf_parse): Layout class methods when Object is loaded, otherwise
record class in all_class_list for delayed method layout.
(parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
* lang.c (put_decl_node): Decode <init> into the decl context
class name.
* lex.c (java_allocate_new_line): Use xmalloc.
* parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
pointers, not TREE_LIST elements.
(struct parser_ctxt): Fixed comment indentations, added comments
and reordered some fields.
(java_check_methods): Function prototype removed.
* parse.y (java_push_parser_context): Use xmalloc.
(java_parser_context_restore_global): Pop extra pushed ctxp only
when there's nothing next.
(maybe_create_class_interface_decl): Fixed comment, add new
created class decl to all_class_list.
(method_header): Use GET_REAL_TYPE on argument's types.
(method_declarator): Use GET_REAL_TYPE, change type to the real
type in TREE_LIST dependency node. Build argument list with the
real type.
(create_jdep_list): Use xmalloc. Removed allocation error message.
(obtain_incomplete_type): Fixed leading comment. Broadened
incoming argument meaning.
(register_incomplete_type): Use xmalloc. Removed allocation error
message.
(safe_layout_class): Fixed leading comment.
(jdep_resolve_class): Reversed if statement condition and switch
if and else bodies.
(resolve_and_layout): Fixed leading comment. Broadened incoming
argument meaning.
(complete_class_report_errors): New local variable name, for
clarity. purify_type_name used for all error cases.
(java_get_real_method_name): Stricter check on constructors.
(java_check_regular_methods): Reverse methods list only if not
already laid out. Layout artificial constructor.
(java_check_methods): Deleted.
(source_start_java_method): Obtain incomplete type for patchable
method arguments.
(java_layout_classes): Fixed leading comment. Use
LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
before returning. Fixed comments.
(java_expand_classes): Check for errors up front.
(patch_method_invocation): Class to search is resolved and laid
out.
A step forward truly mixing .class and .java during package
compilation. Includes a Per's patch.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23834 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/java-tree.h')
| -rw-r--r-- | gcc/java/java-tree.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h index 4554638b92a..66aae185e08 100644 --- a/gcc/java/java-tree.h +++ b/gcc/java/java-tree.h @@ -112,6 +112,9 @@ extern tree main_class; /* The class we are currently processing. */ extern tree current_class; +/* List of all class DECLs seen so far. */ +extern tree all_class_list; + /* Nonzero if we want to automatically do array bounds checking; on by default. Use -fno-bounds-check to disable. */ @@ -483,6 +486,8 @@ extern tree unmangle_classname PROTO ((const char *name, int name_length)); extern tree parse_signature_string PROTO ((const unsigned char *, int)); extern tree get_type_from_signature PROTO ((tree)); extern void layout_class PROTO ((tree)); +extern tree layout_class_method PROTO ((tree, tree, tree, tree)); +extern void layout_class_methods PROTO ((tree)); extern tree make_class (); extern tree build_class_ref PROTO ((tree)); extern tree build_dtable_decl PROTO ((tree)); @@ -835,3 +840,10 @@ extern tree *type_map; if (java_error_count) \ return; \ } + +#define LAYOUT_SEEN_CLASS_METHODS() \ + { \ + tree current; \ + for (current = all_class_list; current; current = TREE_CHAIN (current)) \ + layout_class_methods (TREE_TYPE (TREE_VALUE (current))); \ + } |

