typeck.c (find_method_in_interfaces): Update.

* typeck.c (find_method_in_interfaces): Update.
	* jcf-parse.c (load_class): Update.
	* java-gimplify.c (java_gimplify_component_ref): Removed.
	(java_gimplify_modify_expr): Update.  Removed pre_p and post_p
	arguments.
	(java_gimplify_expr): Update.
	* decl.c (java_init_decl_processing): Update.
	* class.c (set_constant_value): Update.
	(make_class_data): Update.
	(finish_class): Update.
	(build_static_field_ref): Update.
	(is_compiled_class): Update.
	(maybe_layout_super_class): Update.
	(layout_class): Update.
	(layout_class_method): Update.
	* java-tree.h (CAN_COMPLETE_NORMALLY): Removed.
	(lang_decl_var) <am, final_iud, cif>: Removed fields.
	(lang_decl_func) <init_calls_this>: Removed field.
	(lang_type) <dot_class, verify_method>: Removed fields.
	(FIELD_NESTED_ACCESS): Removed.
	(FIELD_NESTED_ACCESS_P): Removed.
	(DECL_FIELD_FINAL_IUD): Removed.
	(DECL_LOCAL_FINAL_IUD): Removed
	(LOCAL_FINAL_P): Removed.
	(FINAL_VARIABLE_P): Removed.
	(CLASS_FINAL_VARIABLE_P): Removed.
	(DECL_BIT_INDEX): Removed.
	(DECL_INIT_CALLS_THIS): Removed.
	(FIELD_LOCAL_ALIAS): Removed.
	(FIELD_LOCAL_ALIAS_USED): Removed.
	(FIELD_THISN): Removed.
	(DECL_FUNCTION_INIT_TEST_CLASS): Removed.
	(LOCAL_CLASS_INITIALIZATION_FLAG): Removed.
	(LOCAL_CLASS_INITIALIZATION_FLAG_P): Removed.
	(TYPE_DOT_CLASS): Removed.
	(TYPE_VERIFY_METHOD): Removed.
	(ID_CLASSDOLLAR_P): Removed.
	(enum java_tree_index) <JTI_CLASSDOLLAR_IDENTIFIER_NODE>:
	Removed.
	(classdollar_identifier_node): Removed.
	(TYPE_UNKNOWN): Removed.
	(CLASS_FROM_SOURCE_P): Removed.
	* expr.c (build_jni_stub): Update.
	(force_evaluation_order): Update.
	(build_java_empty_stmt): Update.
	(build_class_init): Update.
	(java_stack_swap): Update.
	(build_jni_stub): Update.

From-SVN: r127602
This commit is contained in:
Tom Tromey 2007-08-17 22:08:04 +00:00 committed by Tom Tromey
parent 44fd0e8063
commit 279e32c924
8 changed files with 77 additions and 251 deletions

View File

@ -1,3 +1,54 @@
2007-08-17 Tom Tromey <tromey@redhat.com>
* typeck.c (find_method_in_interfaces): Update.
* jcf-parse.c (load_class): Update.
* java-gimplify.c (java_gimplify_component_ref): Removed.
(java_gimplify_modify_expr): Update. Removed pre_p and post_p
arguments.
(java_gimplify_expr): Update.
* decl.c (java_init_decl_processing): Update.
* class.c (set_constant_value): Update.
(make_class_data): Update.
(finish_class): Update.
(build_static_field_ref): Update.
(is_compiled_class): Update.
(maybe_layout_super_class): Update.
(layout_class): Update.
(layout_class_method): Update.
* java-tree.h (CAN_COMPLETE_NORMALLY): Removed.
(lang_decl_var) <am, final_iud, cif>: Removed fields.
(lang_decl_func) <init_calls_this>: Removed field.
(lang_type) <dot_class, verify_method>: Removed fields.
(FIELD_NESTED_ACCESS): Removed.
(FIELD_NESTED_ACCESS_P): Removed.
(DECL_FIELD_FINAL_IUD): Removed.
(DECL_LOCAL_FINAL_IUD): Removed
(LOCAL_FINAL_P): Removed.
(FINAL_VARIABLE_P): Removed.
(CLASS_FINAL_VARIABLE_P): Removed.
(DECL_BIT_INDEX): Removed.
(DECL_INIT_CALLS_THIS): Removed.
(FIELD_LOCAL_ALIAS): Removed.
(FIELD_LOCAL_ALIAS_USED): Removed.
(FIELD_THISN): Removed.
(DECL_FUNCTION_INIT_TEST_CLASS): Removed.
(LOCAL_CLASS_INITIALIZATION_FLAG): Removed.
(LOCAL_CLASS_INITIALIZATION_FLAG_P): Removed.
(TYPE_DOT_CLASS): Removed.
(TYPE_VERIFY_METHOD): Removed.
(ID_CLASSDOLLAR_P): Removed.
(enum java_tree_index) <JTI_CLASSDOLLAR_IDENTIFIER_NODE>:
Removed.
(classdollar_identifier_node): Removed.
(TYPE_UNKNOWN): Removed.
(CLASS_FROM_SOURCE_P): Removed.
* expr.c (build_jni_stub): Update.
(force_evaluation_order): Update.
(build_java_empty_stmt): Update.
(build_class_init): Update.
(java_stack_swap): Update.
(build_jni_stub): Update.
2007-08-17 Tom Tromey <tromey@redhat.com>
* java-tree.h (LABEL_TYPE_STATE): Removed.

View File

@ -851,8 +851,6 @@ set_constant_value (tree field, tree constant)
&& TREE_TYPE (field) == string_ptr_type_node))
error ("ConstantValue attribute of field '%s' has wrong type",
IDENTIFIER_POINTER (DECL_NAME (field)));
if (FIELD_FINAL (field))
DECL_FIELD_FINAL_IUD (field) = 1;
}
}
@ -1163,13 +1161,12 @@ build_static_field_ref (tree fdecl)
{
tree fclass = DECL_CONTEXT (fdecl);
int is_compiled = is_compiled_class (fclass);
int from_class = ! CLASS_FROM_SOURCE_P (current_class);
/* Allow static final fields to fold to a constant. When using
-findirect-dispatch, we simply never do this folding if compiling
from .class; in the .class file constants will be referred to via
the constant pool. */
if ((!flag_indirect_dispatch || !from_class)
if (!flag_indirect_dispatch
&& (is_compiled
|| (FIELD_FINAL (fdecl) && DECL_INITIAL (fdecl) != NULL_TREE
&& (JSTRING_TYPE_P (TREE_TYPE (fdecl))
@ -1853,8 +1850,7 @@ make_class_data (tree type)
|| DECL_CLINIT_P (method)
|| DECL_NAME (type_decl) == id_class
|| DECL_NAME (method) == id_main
|| (METHOD_PUBLIC (method) && !METHOD_STATIC (method))
|| TYPE_DOT_CLASS (type) == method)
|| (METHOD_PUBLIC (method) && !METHOD_STATIC (method)))
{
init = make_method_value (method);
method_count++;
@ -2173,17 +2169,6 @@ make_class_data (tree type)
void
finish_class (void)
{
if (TYPE_VERIFY_METHOD (output_class))
{
tree verify_method = TYPE_VERIFY_METHOD (output_class);
DECL_SAVED_TREE (verify_method)
= add_stmt_to_compound (DECL_SAVED_TREE (verify_method), void_type_node,
build1 (RETURN_EXPR, void_type_node, NULL));
java_genericize (verify_method);
cgraph_finalize_function (verify_method, false);
TYPE_ASSERTIONS (current_class) = NULL;
}
java_expand_catch_classes (current_class);
current_function_decl = NULL_TREE;
@ -2228,9 +2213,7 @@ is_compiled_class (tree class)
{
if (!CLASS_LOADED_P (class))
{
if (CLASS_FROM_SOURCE_P (class))
safe_layout_class (class);
else if (class != current_class)
if (class != current_class)
load_class (class, 1);
}
return 1;
@ -2327,8 +2310,6 @@ maybe_layout_super_class (tree super_class, tree this_class ATTRIBUTE_UNUSED)
return NULL_TREE;
else if (TREE_CODE (super_class) == RECORD_TYPE)
{
if (!CLASS_LOADED_P (super_class) && CLASS_FROM_SOURCE_P (super_class))
safe_layout_class (super_class);
if (!CLASS_LOADED_P (super_class))
load_class (super_class, 1);
}
@ -2366,6 +2347,7 @@ safe_layout_class (tree class)
void
layout_class (tree this_class)
{
int i;
tree super_class = CLASSTYPE_SUPER (this_class);
class_list = tree_cons (this_class, NULL_TREE, class_list);
@ -2416,28 +2398,22 @@ layout_class (tree this_class)
layout_type (this_class);
/* Also recursively load/layout any superinterfaces, but only if
class was loaded from bytecode. The source parser will take care
of this itself. */
if (!CLASS_FROM_SOURCE_P (this_class))
/* Also recursively load/layout any superinterfaces. */
if (TYPE_BINFO (this_class))
{
int i;
if (TYPE_BINFO (this_class))
for (i = BINFO_N_BASE_BINFOS (TYPE_BINFO (this_class)) - 1; i > 0; i--)
{
for (i = BINFO_N_BASE_BINFOS (TYPE_BINFO (this_class)) - 1; i > 0; i--)
tree binfo = BINFO_BASE_BINFO (TYPE_BINFO (this_class), i);
tree super_interface = BINFO_TYPE (binfo);
tree maybe_super_interface
= maybe_layout_super_class (super_interface, NULL_TREE);
if (maybe_super_interface == NULL
|| TREE_CODE (TYPE_SIZE (maybe_super_interface)) == ERROR_MARK)
{
tree binfo = BINFO_BASE_BINFO (TYPE_BINFO (this_class), i);
tree super_interface = BINFO_TYPE (binfo);
tree maybe_super_interface
= maybe_layout_super_class (super_interface, NULL_TREE);
if (maybe_super_interface == NULL
|| TREE_CODE (TYPE_SIZE (maybe_super_interface)) == ERROR_MARK)
{
TYPE_SIZE (this_class) = error_mark_node;
CLASS_BEING_LAIDOUT (this_class) = 0;
class_list = TREE_CHAIN (class_list);
return;
}
TYPE_SIZE (this_class) = error_mark_node;
CLASS_BEING_LAIDOUT (this_class) = 0;
class_list = TREE_CHAIN (class_list);
return;
}
}
}
@ -2632,7 +2608,6 @@ layout_class_method (tree this_class, tree super_class,
set_method_index (method_decl, method_index);
if (method_index == NULL_TREE
&& ! flag_indirect_dispatch
&& !CLASS_FROM_SOURCE_P (this_class)
&& ! DECL_ARTIFICIAL (super_method))
error ("non-static method %q+D overrides static method",
method_decl);

View File

@ -737,7 +737,6 @@ java_init_decl_processing (void)
void_signature_node = get_identifier ("()V");
finalize_identifier_node = get_identifier ("finalize");
this_identifier_node = get_identifier ("this");
classdollar_identifier_node = get_identifier ("class$");
java_lang_cloneable_identifier_node = get_identifier ("java.lang.Cloneable");
java_io_serializable_identifier_node =

View File

@ -638,9 +638,8 @@ java_stack_swap (void)
tree decl1, decl2;
if (stack_pointer < 2
|| (type1 = stack_type_map[stack_pointer - 1]) == TYPE_UNKNOWN
|| (type2 = stack_type_map[stack_pointer - 2]) == TYPE_UNKNOWN
|| type1 == TYPE_SECOND || type2 == TYPE_SECOND
|| (type1 = stack_type_map[stack_pointer - 1]) == TYPE_SECOND
|| (type2 = stack_type_map[stack_pointer - 2]) == TYPE_SECOND
|| TYPE_IS_WIDE (type1) || TYPE_IS_WIDE (type2))
/* Bad stack swap. */
abort ();
@ -1998,13 +1997,7 @@ build_class_init (tree clas, tree expr)
decl = build_decl (VAR_DECL, NULL_TREE,
boolean_type_node);
MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC (decl);
LOCAL_CLASS_INITIALIZATION_FLAG (decl) = 1;
DECL_CONTEXT (decl) = current_function_decl;
DECL_FUNCTION_INIT_TEST_CLASS (decl) = clas;
/* Tell the check-init code to ignore this decl when not
optimizing class initialization. */
if (!STATIC_CLASS_INIT_OPT_P ())
DECL_BIT_INDEX (decl) = -1;
DECL_INITIAL (decl) = boolean_false_node;
/* Don't emit any symbolic debugging info for this decl. */
DECL_IGNORED_P (decl) = 1;
@ -2621,7 +2614,6 @@ build_jni_stub (tree method)
int args_size = 0;
tree klass = DECL_CONTEXT (method);
int from_class = ! CLASS_FROM_SOURCE_P (klass);
klass = build_class_ref (klass);
gcc_assert (METHOD_NATIVE (method) && flag_jni);
@ -2651,25 +2643,16 @@ build_jni_stub (tree method)
chainon (env_var, meth_var);
build_result_decl (method);
/* One strange way that the front ends are different is that they
store arguments differently. */
if (from_class)
method_args = DECL_ARGUMENTS (method);
else
method_args = BLOCK_EXPR_DECLS (DECL_FUNCTION_BODY (method));
method_args = DECL_ARGUMENTS (method);
block = build_block (env_var, NULL_TREE, method_args, NULL_TREE);
TREE_SIDE_EFFECTS (block) = 1;
/* When compiling from source we don't set the type of the block,
because that will prevent patch_return from ever being run. */
if (from_class)
TREE_TYPE (block) = TREE_TYPE (TREE_TYPE (method));
TREE_TYPE (block) = TREE_TYPE (TREE_TYPE (method));
/* Compute the local `env' by calling _Jv_GetJNIEnvNewFrame. */
body = build2 (MODIFY_EXPR, ptr_type_node, env_var,
build_call_nary (ptr_type_node,
build_address_of (soft_getjnienvnewframe_node),
1, klass));
CAN_COMPLETE_NORMALLY (body) = 1;
/* All the arguments to this method become arguments to the
underlying JNI function. If we had to wrap object arguments in a
@ -2756,7 +2739,6 @@ build_jni_stub (tree method)
}
TREE_SIDE_EFFECTS (call) = 1;
CAN_COMPLETE_NORMALLY (call) = 1;
body = build2 (COMPOUND_EXPR, void_type_node, body, call);
TREE_SIDE_EFFECTS (body) = 1;
@ -2766,7 +2748,6 @@ build_jni_stub (tree method)
build_address_of (soft_jnipopsystemframe_node),
1, env_var);
TREE_SIDE_EFFECTS (call) = 1;
CAN_COMPLETE_NORMALLY (call) = 1;
body = build2 (COMPOUND_EXPR, void_type_node, body, call);
TREE_SIDE_EFFECTS (body) = 1;
@ -3750,7 +3731,6 @@ force_evaluation_order (tree node)
cmp = build2 (COMPOUND_EXPR, TREE_TYPE (node), cmp, node);
if (TREE_TYPE (cmp) != void_type_node)
cmp = save_expr (cmp);
CAN_COMPLETE_NORMALLY (cmp) = CAN_COMPLETE_NORMALLY (node);
TREE_SIDE_EFFECTS (cmp) = 1;
node = cmp;
}
@ -3764,7 +3744,6 @@ tree
build_java_empty_stmt (void)
{
tree t = build_empty_stmt ();
CAN_COMPLETE_NORMALLY (t) = 1;
return t;
}

View File

@ -32,8 +32,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "toplev.h"
static tree java_gimplify_block (tree);
static enum gimplify_status java_gimplify_modify_expr (tree*, tree*, tree *);
static enum gimplify_status java_gimplify_component_ref (tree*, tree*, tree *);
static enum gimplify_status java_gimplify_modify_expr (tree *);
static enum gimplify_status java_gimplify_self_mod_expr (tree*, tree*, tree *);
static void dump_java_tree (enum tree_dump_index, tree);
@ -73,7 +72,7 @@ java_gimplify_expr (tree *expr_p, tree *pre_p ATTRIBUTE_UNUSED,
semantics should only be generated by the front-end, and never
by anything after gimplification. */
case MODIFY_EXPR:
return java_gimplify_modify_expr (expr_p, pre_p, post_p);
return java_gimplify_modify_expr (expr_p);
case SAVE_EXPR:
/* Note that we can see <save_expr NULL> if the save_expr was
@ -98,9 +97,6 @@ java_gimplify_expr (tree *expr_p, tree *pre_p ATTRIBUTE_UNUSED,
case COMPARE_G_EXPR:
gcc_unreachable ();
case COMPONENT_REF:
return java_gimplify_component_ref (expr_p, pre_p, post_p);
default:
/* Java insists on strict left-to-right evaluation of expressions.
A problem may arise if a variable used in the LHS of a binary
@ -129,96 +125,13 @@ java_gimplify_expr (tree *expr_p, tree *pre_p ATTRIBUTE_UNUSED,
}
static enum gimplify_status
java_gimplify_component_ref (tree *expr_p, tree *pre_p, tree *post_p)
{
if (CLASS_FROM_SOURCE_P (output_class)
&& TREE_THIS_VOLATILE (TREE_OPERAND (*expr_p, 1))
&& ! TREE_THIS_VOLATILE (*expr_p))
{
enum gimplify_status stat;
tree sync_expr;
/* Special handling for volatile fields.
A load has "acquire" semantics, implying that you can't move up
later operations. A store has "release" semantics meaning that
earlier operations cannot be delayed past it.
This logic only handles loads: stores are handled in
java_gimplify_modify_expr().
We gimplify this COMPONENT_REF, put the result in a tmp_var, and then
return a COMPOUND_EXPR of the form {__sync_synchronize(); tmp_var}.
This forces __sync_synchronize() to be placed immediately after
loading from the volatile field.
*/
TREE_THIS_VOLATILE (*expr_p) = 1;
*expr_p = java_modify_addr_for_volatile (*expr_p);
stat = gimplify_expr (expr_p, pre_p, post_p,
is_gimple_formal_tmp_var, fb_rvalue);
if (stat == GS_ERROR)
return stat;
sync_expr = build_call_expr (built_in_decls[BUILT_IN_SYNCHRONIZE], 0);
TREE_SIDE_EFFECTS (sync_expr) = 1;
*expr_p = build2 (COMPOUND_EXPR, TREE_TYPE (*expr_p),
sync_expr, *expr_p);
TREE_SIDE_EFFECTS (*expr_p) = 1;
}
return GS_UNHANDLED;
}
static enum gimplify_status
java_gimplify_modify_expr (tree *modify_expr_p, tree *pre_p, tree *post_p)
java_gimplify_modify_expr (tree *modify_expr_p)
{
tree modify_expr = *modify_expr_p;
tree lhs = TREE_OPERAND (modify_expr, 0);
tree rhs = TREE_OPERAND (modify_expr, 1);
tree lhs_type = TREE_TYPE (lhs);
if (CLASS_FROM_SOURCE_P (output_class)
&& TREE_CODE (lhs) == COMPONENT_REF
&& TREE_THIS_VOLATILE (TREE_OPERAND (lhs, 1)))
{
/* Special handling for volatile fields.
A load has "acquire" semantics, implying that you can't move up
later operations. A store has "release" semantics meaning that
earlier operations cannot be delayed past it.
This logic only handles stores; loads are handled in
java_gimplify_component_ref().
We gimplify the rhs, put the result in a tmp_var, and then return
a MODIFY_EXPR with an rhs of the form {__sync_synchronize(); tmp_var}.
This forces __sync_synchronize() to be placed after evaluating
the rhs and immediately before storing to the volatile field.
*/
enum gimplify_status stat;
tree sync_expr =
build_call_expr (built_in_decls[BUILT_IN_SYNCHRONIZE], 0);
TREE_SIDE_EFFECTS (sync_expr) = 1;
stat = gimplify_expr (&rhs, pre_p, post_p,
is_gimple_formal_tmp_var, fb_rvalue);
if (stat == GS_ERROR)
return stat;
rhs = build2 (COMPOUND_EXPR, TREE_TYPE (rhs),
sync_expr, rhs);
TREE_SIDE_EFFECTS (rhs) = 1;
TREE_THIS_VOLATILE (lhs) = 1;
lhs = java_modify_addr_for_volatile (lhs);
TREE_OPERAND (modify_expr, 0) = lhs;
TREE_OPERAND (modify_expr, 1) = rhs;
}
/* This is specific to the bytecode compiler. If a variable has
LOCAL_SLOT_P set, replace an assignment to it with an assignment
to the corresponding variable that holds all its aliases. */

View File

@ -48,12 +48,10 @@ struct JCF;
4: IS_A_COMMAND_LINE_FILENAME_P (in IDENTIFIER_NODE)
IS_ARRAY_LENGTH_ACCESS (in INDIRECT_REF)
5: HAS_BEEN_ALREADY_PARSED_P (in IDENTIFIER_NODE)
6: CAN_COMPLETE_NORMALLY (in statement nodes)
Usage of TYPE_LANG_FLAG_?:
1: TYPE_ARRAY_P (in RECORD_TYPE).
2: CLASS_PARSED_P (in RECORD_TYPE).
3: CLASS_FROM_SOURCE_P (in RECORD_TYPE).
4: CLASS_P (in RECORD_TYPE).
5: CLASS_FROM_CURRENTLY_COMPILED_P (in RECORD_TYPE)
6: CLASS_BEING_LAIDOUT (in RECORD_TYPE)
@ -80,11 +78,8 @@ struct JCF;
CLASS_ABSTRACT (in TYPE_DECL)
FIELD_TRANSIENT (in FIELD_DECL)
6: CLASS_SUPER (in TYPE_DECL, ACC_SUPER flag)
FIELD_LOCAL_ALIAS (in FIELD_DECL)
7: DECL_CONSTRUCTOR_P (in FUNCTION_DECL).
CLASS_STATIC (in TYPE_DECL)
FIELD_LOCAL_ALIAS_USED (in FIELD_DECL)
FIELD_THISN (in FIELD_DECL)
*/
#define VAR_OR_FIELD_CHECK(DECL) \
@ -302,7 +297,6 @@ enum java_tree_index
JTI_VOID_SIGNATURE_NODE,
JTI_FINALIZE_IDENTIFIER_NODE,
JTI_THIS_IDENTIFIER_NODE,
JTI_CLASSDOLLAR_IDENTIFIER_NODE,
JTI_ONE_ELT_ARRAY_DOMAIN_TYPE,
JTI_RETURN_ADDRESS_TYPE_NODE,
@ -497,8 +491,6 @@ extern GTY(()) tree java_global_trees[JTI_MAX];
java_global_trees[JTI_FINALIZE_IDENTIFIER_NODE] /* "finalize" */
#define this_identifier_node \
java_global_trees[JTI_THIS_IDENTIFIER_NODE] /* "this" */
#define classdollar_identifier_node \
java_global_trees[JTI_CLASSDOLLAR_IDENTIFIER_NODE] /* "class$" */
#define one_elt_array_domain_type \
java_global_trees[JTI_ONE_ELT_ARRAY_DOMAIN_TYPE]
/* The type of the return address of a subroutine. */
@ -740,9 +732,6 @@ union lang_tree_node
class has been initialized in this function, and FALSE otherwise. */
#define DECL_FUNCTION_INIT_TEST_TABLE(DECL) \
(DECL_LANG_SPECIFIC(DECL)->u.f.init_test_table)
/* If LOCAL_CLASS_INITIALIZATION_FLAG_P(decl), give class it initializes. */
#define DECL_FUNCTION_INIT_TEST_CLASS(DECL) \
(DECL_LANG_SPECIFIC(DECL)->u.v.slot_chain)
/* For each static function decl, itc contains a hash table whose
entries are keyed on class named that are definitively initialized
in DECL. */
@ -752,25 +741,9 @@ union lang_tree_node
#define DECL_LOCAL_CNI_METHOD_P(NODE) \
(DECL_LANG_SPECIFIC (NODE)->u.f.local_cni)
/* A constructor that calls this. */
#define DECL_INIT_CALLS_THIS(DECL) \
(DECL_LANG_SPECIFIC(DECL)->u.f.init_calls_this)
/* True when DECL (a field) is Synthetic. */
#define FIELD_SYNTHETIC(DECL) DECL_LANG_FLAG_2 (VAR_OR_FIELD_CHECK (DECL))
/* True when DECL aliases an outer context local variable. */
#define FIELD_LOCAL_ALIAS(DECL) DECL_LANG_FLAG_6 (VAR_OR_FIELD_CHECK (DECL))
/* True when DECL, which aliases an outer context local variable is
used by the inner classes. */
#define FIELD_LOCAL_ALIAS_USED(DECL) DECL_LANG_FLAG_7 (VAR_OR_FIELD_CHECK (DECL))
/* True when DECL is a this$<n> field. Note that
FIELD_LOCAL_ALIAS_USED can be differentiated when tested against
FIELD_LOCAL_ALIAS. */
#define FIELD_THISN(DECL) DECL_LANG_FLAG_7 (VAR_OR_FIELD_CHECK (DECL))
/* The slot number for this local variable. */
#define DECL_LOCAL_SLOT_NUMBER(NODE) \
(DECL_LANG_SPECIFIC (NODE)->u.v.slot_number)
@ -781,35 +754,10 @@ union lang_tree_node
/* For a VAR_DECL or PARM_DECL, used to chain decls with the same
slot_number in decl_map. */
#define DECL_LOCAL_SLOT_CHAIN(NODE) (DECL_LANG_SPECIFIC(NODE)->u.v.slot_chain)
/* For a FIELD_DECL, holds the name of the access method. Used to
read/write the content of the field across nested class boundaries. */
#define FIELD_NESTED_ACCESS(DECL) \
(DECL_LANG_SPECIFIC (VAR_OR_FIELD_CHECK (DECL))->u.v.am)
/* Safely tests whether FIELD_NESTED_ACCESS exists or not. */
#define FIELD_NESTED_ACCESS_P(DECL) \
DECL_LANG_SPECIFIC (DECL) && FIELD_NESTED_ACCESS (DECL)
/* True if a final field was initialized upon its declaration
or in an initializer. Set after definite assignment. */
#define DECL_FIELD_FINAL_IUD(NODE) (DECL_LANG_SPECIFIC (NODE)->u.v.final_iud)
/* The class that's the owner of a dynamic binding table. */
#define DECL_OWNER(NODE) (DECL_LANG_SPECIFIC(NODE)->u.v.owner)
/* True if NODE is a local variable final. */
#define LOCAL_FINAL_P(NODE) (DECL_LANG_SPECIFIC (NODE) && DECL_FINAL (NODE))
/* True if a final local variable was initialized upon its declaration. */
#define DECL_LOCAL_FINAL_IUD(NODE) (DECL_LANG_SPECIFIC (NODE)->u.v.final_iud)
/* True if NODE is a final field. */
#define FINAL_VARIABLE_P(NODE) (FIELD_FINAL (NODE) && !FIELD_STATIC (NODE))
/* True if NODE is a class final field. */
#define FIELD_ENUM(DECL) (DECL_LANG_SPECIFIC (DECL)->u.v.field_enum)
#define CLASS_FINAL_VARIABLE_P(NODE) \
(FIELD_FINAL (NODE) && FIELD_STATIC (NODE))
/* True if NODE is a class initialization flag. This macro accesses
the flag to read or set it. */
#define LOCAL_CLASS_INITIALIZATION_FLAG(NODE) \
(DECL_LANG_SPECIFIC (NODE)->u.v.cif)
/* True if NODE is a class initialization flag. */
#define LOCAL_CLASS_INITIALIZATION_FLAG_P(NODE) \
(DECL_LANG_SPECIFIC (NODE) && LOCAL_CLASS_INITIALIZATION_FLAG(NODE))
/* True if NODE is a variable that is out of scope. */
#define LOCAL_VAR_OUT_OF_SCOPE_P(NODE) \
(DECL_LANG_SPECIFIC (NODE)->u.v.freed)
@ -837,12 +785,6 @@ union lang_tree_node
&& TREE_CODE (TREE_TYPE (NODE)) != POINTER_TYPE) \
|| TREE_CODE (NODE) == REAL_CST)
/* For a local VAR_DECL or PARM_DECL, holds the index into a words bitstring
that specifies if this decl is definitively assigned.
The value -1 means the variable has been definitely assigned (and not
definitely unassigned). The value -2 means we already reported an error. */
#define DECL_BIT_INDEX(DECL) VAR_OR_FIELD_CHECK (DECL)->decl_common.pointer_alias_set
/* DECL_LANG_SPECIFIC for FUNCTION_DECLs. */
struct lang_decl_func GTY(())
{
@ -869,7 +811,6 @@ struct lang_decl_func GTY(())
unsigned int native : 1; /* Nonzero if this is a native method */
unsigned int init_final : 1; /* Nonzero all finals are initialized */
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
@ -936,10 +877,7 @@ struct lang_decl_var GTY(())
int start_pc;
int end_pc;
tree slot_chain;
tree am; /* Access method for this field (1.1) */
tree owner;
unsigned int final_iud : 1; /* Final initialized upon declaration */
unsigned int cif : 1; /* True: decl is a class initialization flag */
unsigned int freed : 1; /* Decl is no longer in scope. */
unsigned int local_slot : 1; /* Decl is a temporary in the stack frame. */
unsigned int class_field : 1; /* Decl needs mangle_class_field. */
@ -974,10 +912,6 @@ struct lang_decl GTY(())
#define TYPE_DUMMY(T) (TYPE_LANG_SPECIFIC(T)->dummy_class)
/* The decl of the synthetic method `class$' used to handle `.class'
for non primitive types when compiling to bytecode. */
#define TYPE_DOT_CLASS(T) (TYPE_LANG_SPECIFIC (T)->dot_class)
#define TYPE_PACKAGE_LIST(T) (TYPE_LANG_SPECIFIC (T)->package_list)
#define TYPE_PRIVATE_INNER_CLASS(T) (TYPE_LANG_SPECIFIC (T)->pic)
#define TYPE_PROTECTED_INNER_CLASS(T) (TYPE_LANG_SPECIFIC (T)->poic)
@ -1002,7 +936,6 @@ struct lang_decl GTY(())
#define TYPE_CTABLE_DECL(T) (TYPE_LANG_SPECIFIC (T)->ctable_decl)
#define TYPE_CATCH_CLASSES(T) (TYPE_LANG_SPECIFIC (T)->catch_classes)
#define TYPE_VERIFY_METHOD(T) (TYPE_LANG_SPECIFIC (T)->verify_method)
#define TYPE_TO_RUNTIME_MAP(T) (TYPE_LANG_SPECIFIC (T)->type_to_runtime_map)
#define TYPE_ASSERTIONS(T) (TYPE_LANG_SPECIFIC (T)->type_assertions)
@ -1018,10 +951,6 @@ struct lang_type GTY(())
struct JCF *jcf;
struct CPool *cpool;
tree cpool_data_ref; /* Cached */
tree dot_class; /* The decl of the `class$' function that
needs to be invoked and generated when
compiling to bytecode to implement
<non_primitive_type>.class */
tree package_list; /* List of package names, progressive */
tree otable_methods; /* List of static decls referred to by this
@ -1043,9 +972,6 @@ struct lang_type GTY(())
type matcher. */
tree catch_classes;
tree verify_method; /* The verify method for this class.
Used in split verification. */
htab_t GTY ((param_is (struct treetreehash_entry))) type_to_runtime_map;
/* The mapping of classes to exception region
markers. */
@ -1360,7 +1286,6 @@ extern void rewrite_reflection_indexes (void *);
them */
#define ID_INIT_P(ID) ((ID) == init_identifier_node)
#define ID_CLINIT_P(ID) ((ID) == clinit_identifier_node)
#define ID_CLASSDOLLAR_P(ID) ((ID) == classdollar_identifier_node)
/* Access flags etc for variable/field (FIELD_DECL, VAR_DECL, or PARM_DECL): */
@ -1441,9 +1366,6 @@ extern const unsigned char *linenumber_table;
/* The length (in items) of the line number table. */
extern int linenumber_count;
/* In type_map, means that slot is uninitialized or otherwise unusable. */
#define TYPE_UNKNOWN NULL_TREE
/* In type_map, means the second half of a 64-bit double or long. */
#define TYPE_SECOND void_type_node
@ -1455,7 +1377,7 @@ extern int linenumber_count;
/* A array mapping variable/stack slot index to the type current
in that variable/stack slot.
TYPE_UNKNOWN, TYPE_SECOND, and TYPE_NULL are special cases. */
TYPE_SECOND and TYPE_NULL are special cases. */
extern tree *type_map;
/* Map a stack index to the type currently in that slot. */
@ -1487,9 +1409,6 @@ extern tree *type_map;
/* True if class TYPE has been parsed (first pass). */
#define CLASS_PARSED_P(TYPE) TYPE_LANG_FLAG_2 (TYPE)
/* 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)
@ -1514,9 +1433,6 @@ extern tree *type_map;
feature a finalizer method. */
#define HAS_FINALIZER_P(EXPR) TREE_LANG_FLAG_3 (EXPR)
/* True if NODE (a statement) can complete normally. */
#define CAN_COMPLETE_NORMALLY(NODE) TREE_LANG_FLAG_6 (NODE)
/* True if NODE belongs to an inner class TYPE_DECL node.
Verifies that NODE as the attributes of a decl. */
#define INNER_CLASS_DECL_P(NODE) (TYPE_NAME (TREE_TYPE (NODE)) == NODE \

View File

@ -1365,11 +1365,6 @@ load_class (tree class_or_name, int verbose)
|| CLASS_FROM_CURRENTLY_COMPILED_P (type));
}
/* If the class is from source code, then it must already be loaded. */
class_decl = IDENTIFIER_CLASS_VALUE (name);
if (class_decl && CLASS_FROM_SOURCE_P (TREE_TYPE (class_decl)))
return;
saved = name;
/* If flag_verify_invocations is unset, we don't try to load a class

View File

@ -763,9 +763,7 @@ find_method_in_interfaces (tree searched_class, int flags, tree method_name,
tree method;
/* If the superinterface hasn't been loaded yet, do so now. */
if (CLASS_FROM_SOURCE_P (iclass))
safe_layout_class (iclass);
else if (!CLASS_LOADED_P (iclass))
if (!CLASS_LOADED_P (iclass))
load_class (iclass, 1);
/* First, we look in ICLASS. If that doesn't work we'll