[multiple changes]

2000-06-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	* except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.

2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	* check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
	Java specific checks.
	* expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
	screened by DECL_P.
	* java-tree.def (CASE_EXPR): Marked 'e'.
	(DEFAULT_EXPR): Likewise.
	* jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
	screened by DECL_P.
	* jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
	Java specific checks.
	(generate_bytecode_insns): Test try_block for BLOCK before using
	BLOCK_EXPR_BODY.
	* parse.y (build_wfl_wrap): Added `location' argument. Set
	EXPR_WFL_LINECOL accordingly.
	(dim_expr:): Wrap constants with WFLs.
	(method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
	(resolve_package): Check for `stmt' not being a BLOCK before
	building a debuggable statement with it.
	(make_qualified_primary): Added extra parameter to build_wfl_wrap
	invocation.
	(resolve_field_access): Make sure `decl' is a DECL before treating
	it as such.
	(maybe_build_primttype_type_ref): Make sure `wfl''s node is an
	IDENTIFIER_NODE before treating it as such.
	(patch_new_array_init): Make sure `elt' is a TREE_LIST before
	treating it as such.
	(find_applicable_accessible_methods_list): CLASS_INTERFACE macro
	to be applied only on non array types.

2000-06-16  Per Bothner  <per@bothner.com>

	* java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN):  Don't
	define in terms of DECL_RESULT, as that fails when --enable-checking.

2000-06-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	* parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
	* parse.y (find_in_imports): Returned type changed to void,
	leading comment fixed.
	(register_package): New function.
	(qualify_and_find): Likewise.
	(package_declaration:): Use `register_package'.
	(single_type_import_declaration:): Removed local variable
	`node'. Added missing `;' for consistency.
	(type_import_on_demand_declaration:): Use `chainon' to link new
	entries.
	(lookup_field_wrapper): Lookup local variables defined in outer
	contexts first.
	(java_complete_class): Don't reverse the list of imported on demand.
	(do_resolve_class): Reorganized. Removed local variable
	`original_name'. Call `qualify_and_find' with the current package
	name, invoke `find_in_imports_on_demand' right after. Call
	`qualify_and_find' with the packages we've seen so far. Fixed
	operations numbering in comments.
	(java_expand_class): Don't reverse `package_list'.
	(find_most_specific_methods_list): New local variables `abstract'
	and `candidates'. Use them to pick the right method.

(Fixes for the ENABLE_TREE_CHECKING Java run-time build problem:
 http://gcc.gnu.org/ml/gcc-patches/2000-06/msg00551.html)

From-SVN: r34642
parent e605b040
2000-06-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
* except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
* check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
Java specific checks.
* expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
screened by DECL_P.
* java-tree.def (CASE_EXPR): Marked 'e'.
(DEFAULT_EXPR): Likewise.
* jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
screened by DECL_P.
* jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
Java specific checks.
(generate_bytecode_insns): Test try_block for BLOCK before using
BLOCK_EXPR_BODY.
* parse.y (build_wfl_wrap): Added `location' argument. Set
EXPR_WFL_LINECOL accordingly.
(dim_expr:): Wrap constants with WFLs.
(method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
(resolve_package): Check for `stmt' not being a BLOCK before
building a debuggable statement with it.
(make_qualified_primary): Added extra parameter to build_wfl_wrap
invocation.
(resolve_field_access): Make sure `decl' is a DECL before treating
it as such.
(maybe_build_primttype_type_ref): Make sure `wfl''s node is an
IDENTIFIER_NODE before treating it as such.
(patch_new_array_init): Make sure `elt' is a TREE_LIST before
treating it as such.
(find_applicable_accessible_methods_list): CLASS_INTERFACE macro
to be applied only on non array types.
2000-06-16 Per Bothner <per@bothner.com>
* java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN): Don't
define in terms of DECL_RESULT, as that fails when --enable-checking.
2000-06-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* jcf-write.c (CHECK_PUT): Add static prototype. Make pointer
......@@ -19,6 +59,30 @@
* lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
2000-06-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
* parse.y (find_in_imports): Returned type changed to void,
leading comment fixed.
(register_package): New function.
(qualify_and_find): Likewise.
(package_declaration:): Use `register_package'.
(single_type_import_declaration:): Removed local variable
`node'. Added missing `;' for consistency.
(type_import_on_demand_declaration:): Use `chainon' to link new
entries.
(lookup_field_wrapper): Lookup local variables defined in outer
contexts first.
(java_complete_class): Don't reverse the list of imported on demand.
(do_resolve_class): Reorganized. Removed local variable
`original_name'. Call `qualify_and_find' with the current package
name, invoke `find_in_imports_on_demand' right after. Call
`qualify_and_find' with the packages we've seen so far. Fixed
operations numbering in comments.
(java_expand_class): Don't reverse `package_list'.
(find_most_specific_methods_list): New local variables `abstract'
and `candidates'. Use them to pick the right method.
Tue Jun 6 11:39:05 2000 Tom Tromey <tromey@ferrule.cygnus.com>
* parse.y (check_modifiers_consistency): Don't subtract out
......
......@@ -463,7 +463,7 @@ check_init (exp, before)
words tmp = ALLOC_WORDS (2 * num_current_words);
words when_true = tmp;
words when_false = tmp + num_current_words;
#ifdef ENABLE_CHECKING
#ifdef ENABLE_JC1_CHECKING
if (TREE_CODE (alt->block) != LOOP_EXPR)
fatal ("internal error in check-init: EXIT_EXPR not in LOOP_EXPR");
#endif
......@@ -534,7 +534,7 @@ check_init (exp, before)
case WITH_CLEANUP_EXPR:
{
struct alternatives *alt = alternatives;
#ifdef ENABLE_CHECKING
#ifdef ENABLE_JC1_CHECKING
if (TREE_CODE (alt->block) != CLEANUP_POINT_EXPR)
fatal ("internal error in check-init: WITH_CLEANUP_EXPR not in CLEANUP_POINT_EXPR");
#endif
......
......@@ -325,7 +325,7 @@ prepare_eh_table_type (type)
push_obstacks (&permanent_obstack, &permanent_obstack);
if (type == NULL_TREE)
exp = null_pointer_node;
exp = CATCH_ALL_TYPE;
else if (is_compiled_class (type))
exp = build_class_ref (type);
else
......
......@@ -1087,7 +1087,8 @@ build_instanceof (value, type)
value,
boolean_true_node, boolean_false_node);
}
else if (! CLASS_INTERFACE (valclass)
else if (DECL_P (klass) && DECL_P (valclass)
&& ! CLASS_INTERFACE (valclass)
&& ! CLASS_INTERFACE (klass)
&& ! inherits_from_p (type, valtype)
&& (CLASS_FINAL (klass)
......@@ -1097,7 +1098,7 @@ build_instanceof (value, type)
tree, so we immediately know the answer. */
expr = boolean_false_node;
}
else if (CLASS_FINAL (klass))
else if (DECL_P (klass) && CLASS_FINAL (klass))
{
tree save = save_expr (value);
expr = build (COND_EXPR, itype,
......
......@@ -42,10 +42,10 @@ DEFTREECODE (THIS_EXPR, "this", '1', 0)
/* Case statement expression.
Operand 1 is the case value. */
DEFTREECODE (CASE_EXPR, "case", 'x', 1)
DEFTREECODE (CASE_EXPR, "case", 'e', 1)
/* Default statement expression. */
DEFTREECODE (DEFAULT_EXPR, "default", 'x', 0)
DEFTREECODE (DEFAULT_EXPR, "default", 'e', 0)
/* Try expression
Operand 0 is the tried block,
......
......@@ -465,11 +465,12 @@ struct lang_identifier
#define RETURN_MAP_ADJUSTED(NODE) TREE_LANG_FLAG_2(NODE)
/* In the label of a sub-routine, a chain of the return location labels. */
#define LABEL_RETURN_LABELS(node) DECL_RESULT (LABEL_RETURN_LABEL(node))
#define LABEL_RETURN_LABELS(node) \
(LABEL_DECL_CHECK (LABEL_RETURN_LABEL(node))->decl.result)
/* In a LABEL_DECL, the next pending label.
See pending_blocks in expr.c. */
#define LABEL_PENDING_CHAIN(NODE) DECL_RESULT(NODE)
#define LABEL_PENDING_CHAIN(NODE) (LABEL_DECL_CHECK (NODE)->decl.result)
/* In a LABEL_DECL, the corresponding bytecode program counter. */
#define LABEL_PC(NODE) ((NODE)->decl.u2.i)
......
......@@ -193,7 +193,7 @@ set_source_filename (jcf, index)
while (c--) \
{ \
tree class = get_class_constant (jcf, JCF_readu2 (jcf)); \
if (!CLASS_COMPLETE_P (class)) \
if (DECL_P (class) && !CLASS_COMPLETE_P (class)) \
{ \
tree outer = TYPE_NAME (get_class_constant (jcf, \
JCF_readu2 (jcf))); \
......
......@@ -347,7 +347,7 @@ static void append_innerclasses_attribute_entry PARAMS ((struct jcf_partial *, t
We assume a local variable 'ptr' points into where we want to
write next, and we assume enoygh space has been allocated. */
#ifdef ENABLE_CHECKING
#ifdef ENABLE_JC1_CHECKING
static int CHECK_PUT PARAMS ((void *, struct jcf_partial *, int));
static int
......@@ -403,7 +403,7 @@ alloc_chunk (last, data, size, work)
return chunk;
}
#ifdef ENABLE_CHECKING
#ifdef ENABLE_JC1_CHECKING
static int CHECK_OP PARAMS ((struct jcf_partial *));
static int
......@@ -2358,6 +2358,7 @@ generate_bytecode_insns (exp, target, state)
}
if (CAN_COMPLETE_NORMALLY (try_block)
&& TREE_CODE (try_block) == BLOCK
&& BLOCK_EXPR_BODY (try_block) != empty_stmt_node)
emit_goto (finished_label, state);
......
......@@ -687,12 +687,11 @@ typedef struct _jdeplist {
}
/* Register an import */
#define REGISTER_IMPORT(WHOLE, NAME) \
{ \
IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P ((NAME)) = 1; \
node = build_tree_list ((WHOLE), (NAME)); \
TREE_CHAIN (node) = ctxp->import_list; \
ctxp->import_list = node; \
#define REGISTER_IMPORT(WHOLE, NAME) \
{ \
IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P ((NAME)) = 1; \
ctxp->import_list = chainon (ctxp->import_list, \
build_tree_list ((WHOLE), (NAME))); \
}
/* Macro to access the osb (opening square bracket) count */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment