diff options
author | Alexandre Petit-Bianco <apbianco@cygnus.com> | 1998-10-20 11:16:37 +0000 |
---|---|---|
committer | Alexandre Petit-Bianco <apbianco@gcc.gnu.org> | 1998-10-20 04:16:37 -0700 |
commit | b351b287b70b47f67c310858202042d6b270938a (patch) | |
tree | dfc31a7ace81e0e453bad8eb1c3f339df92a71cb /gcc/java/java-tree.h | |
parent | 2331d640cee930caa1464c0d754846d339168bc8 (diff) | |
download | gcc-b351b287b70b47f67c310858202042d6b270938a.zip gcc-b351b287b70b47f67c310858202042d6b270938a.tar.gz gcc-b351b287b70b47f67c310858202042d6b270938a.tar.bz2 |
class.c (is_compiled_class): New local variable seen_in_zip.
Tue Oct 20 09:15:38 1998 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (is_compiled_class): New local variable
seen_in_zip. Identify classes found in currently compiled source
file(s).
* decl.c (complete_start_java_method): Fixed typo.
* java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
(CLASS_P): Moved around.
(java_parse_abort_on_error): Macro moved from jcf-parse.c
* jcf-parse.c (java_parse_abort_on_error): Macro moved to
java-parse.h
(jcf_parse_source): Changed leading comment. Removed unnecessary
fclose and CLASS_FROM_SOURCE_P marking.
(parse_source_file): New local variables remember_for_generation
and filename. Mark parsed file name identifier node. Removed block
executed when parse_only was null. Set remember_for_generation.
Use it as an argument to java_pop_parser_context.
(yyparse): New local variables several_files, list, next node and
current_file_list. Split ampersand separated file names into
current_file_list. Iterate through the list and parse accordingly.
* parse.h (java_pop_parser_context): New function prototype.
* parse.y (ctxp_for_generation): New static global variable.
(java_pop_parser_context): New argument generate. Link popped ctxp
to ctxp_for_generation list accordingly.
(java_complete_expand_methods): Fixed indentation.
(java_expand_classes): New function.
Add support for the use of `&' as a file separator on the jc1 command
line.
From-SVN: r23201
Diffstat (limited to 'gcc/java/java-tree.h')
-rw-r--r-- | gcc/java/java-tree.h | 37 |
1 files changed, 33 insertions, 4 deletions
diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h index 7006815..df0670c 100644 --- a/gcc/java/java-tree.h +++ b/gcc/java/java-tree.h @@ -49,8 +49,10 @@ struct JCF; MODIFY_EXPR_FROM_INITIALIZATION_P (in MODIFY_EXPR) 3: IS_AN_IMPORT_ON_DEMAND_P (in IDENTIFIER_NODE) RESOLVE_PACKAGE_NAME_P (in EXPR_WITH_FILE_LOCATION) - 4: RESOLVE_TYPE_NAME_P (in EXPR_WITH_FILE_LOCATION) - 5: IS_BREAK_STMT_P (in EXPR_WITH_FILE_LOCATION) + 4: IS_A_COMMAND_LINE_FILENAME_P (in IDENTIFIER_NODE) + RESOLVE_TYPE_NAME_P (in EXPR_WITH_FILE_LOCATION) + 5: HAS_BEEN_ALREADY_PARSED_P (in IDENTIFIER_NODE) + IS_BREAK_STMT_P (in EXPR_WITH_FILE_LOCATION) IS_CRAFTED_STRING_BUFFER_P (in CALL_EXPR) Usage of TYPE_LANG_FLAG_?: @@ -58,6 +60,7 @@ struct JCF; 2: CLASS_LOADED_P (in RECORD_TYPE). 3: CLASS_FROM_SOURCE_P (in RECORD_TYPE). 4: CLASS_P (in RECORD_TYPE). + 5: CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P (in RECORD_TYPE) Usage of DECL_LANG_FLAG_?: 1: METHOD_PUBLIC (in FUNCTION_DECL). @@ -521,6 +524,8 @@ extern void init_outgoing_cpool PROTO (()); extern void make_class_data PROTO ((tree)); extern void register_class PROTO (()); extern int alloc_name_constant PROTO ((int, tree)); +extern void emit_register_class PROTO (()); +extern void lang_init_source PROTO ((int)); /* Access flags etc for a method (a FUNCTION_DECL): */ @@ -567,8 +572,6 @@ extern int alloc_name_constant PROTO ((int, tree)); virtual methods. */ #define TYPE_VTABLE(TYPE) TYPE_BINFO_VTABLE(TYPE) -/* True of a RECORD_TYPE of a class/interface type (not array type) */ -#define CLASS_P(TYPE) TYPE_LANG_FLAG_4 (TYPE) /* Use CLASS_LOADED_P? FIXME */ #define CLASS_COMPLETE_P(DECL) DECL_LANG_FLAG_2 (DECL) @@ -653,6 +656,13 @@ extern tree *type_map; /* True if class TYPE was defined in Java source code. */ #define CLASS_FROM_SOURCE_P(TYPE) TYPE_LANG_FLAG_3 (TYPE) +/* True of a RECORD_TYPE of a class/interface type (not array type) */ +#define CLASS_P(TYPE) TYPE_LANG_FLAG_4 (TYPE) + +/* True if class TYPE was defined in a Java source file compiled. */ +#define CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P(TYPE) \ + TYPE_LANG_FLAG_5 (TYPE) + /* True if identifier ID was seen while processing a single type import stmt */ #define IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P(ID) TREE_LANG_FLAG_0 (ID) @@ -665,6 +675,12 @@ extern tree *type_map; /* True if ID is an already processed import on demand */ #define IS_AN_IMPORT_ON_DEMAND_P(ID) TREE_LANG_FLAG_3 (ID) +/* True if ID is a command-line specified filename */ +#define IS_A_COMMAND_LINE_FILENAME_P(ID) TREE_LANG_FLAG_4 (ID) + +/* True if filename ID has already been parsed */ +#define HAS_BEEN_ALREADY_PARSED_P(ID) TREE_LANG_FLAG_5 (ID) + /* True if EXPR is RHS sub-tree of a compound assign expression */ #define COMPOUND_ASSIGN_P(EXPR) TREE_LANG_FLAG_1 (EXPR) @@ -754,3 +770,16 @@ extern tree *type_map; #define IS_UNCHECKED_EXPRESSION_P(TYPE) \ (inherits_from_p ((TYPE), runtime_exception_type_node) \ || inherits_from_p ((TYPE), error_exception_type_node)) + +/* Make the current function where this macro is invoked report error + messages and and return, if any */ +#define java_parse_abort_on_error() \ + { \ + extern int java_error_count; \ + if (java_error_count) \ + { \ + java_report_errors (); \ + java_pop_parser_context (0); \ + return; \ + } \ + } |