diff options
author | Jeff Sturm <jsturm@one-point.com> | 2002-12-23 19:42:09 +0000 |
---|---|---|
committer | Jeff Sturm <jsturm@gcc.gnu.org> | 2002-12-23 19:42:09 +0000 |
commit | d3ab697ba4d1eeeecc4ab37337cbcad455c80057 (patch) | |
tree | 8de2de732a2a531c035647c360acaa01a32c9d78 /gcc/java/constants.c | |
parent | 46d40353c383ea8aa490e88cb43adf1652176985 (diff) | |
download | gcc-d3ab697ba4d1eeeecc4ab37337cbcad455c80057.zip gcc-d3ab697ba4d1eeeecc4ab37337cbcad455c80057.tar.gz gcc-d3ab697ba4d1eeeecc4ab37337cbcad455c80057.tar.bz2 |
class.c (build_static_field_ref): Check FIELD_FINAL.
* class.c (build_static_field_ref): Check FIELD_FINAL.
* constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
instead of current_constant_pool_data_ref.
* java-tree.h (current_constant_pool_data_ref): Undefine.
(JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
* jcf-parse.c (init_outgoing_cpool): Don't initialize
current_constant_pool_data_ref.
* except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
not build_internal_class_name.
* parse.y (patch_incomplete_class_ref): Always emit `class$' method.
Use it when class ref isn't certain to be compiled.
From-SVN: r60448
Diffstat (limited to 'gcc/java/constants.c')
-rw-r--r-- | gcc/java/constants.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/java/constants.c b/gcc/java/constants.c index 977a7bd..ca8c860 100644 --- a/gcc/java/constants.c +++ b/gcc/java/constants.c @@ -388,10 +388,12 @@ alloc_class_constant (clas) static tree build_constant_data_ref () { + tree cpool_data_ref = NULL_TREE; + if (TYPE_CPOOL_DATA_REF (current_class)) - current_constant_pool_data_ref = TYPE_CPOOL_DATA_REF (current_class); + cpool_data_ref = TYPE_CPOOL_DATA_REF (current_class); - else if (current_constant_pool_data_ref == NULL_TREE) + if (cpool_data_ref == NULL_TREE) { tree decl; tree decl_name = mangled_classname ("_CD_", current_class); @@ -400,10 +402,10 @@ build_constant_data_ref () one_elt_array_domain_type)); TREE_STATIC (decl) = 1; make_decl_rtl (decl, NULL); - TYPE_CPOOL_DATA_REF (current_class) = current_constant_pool_data_ref + TYPE_CPOOL_DATA_REF (current_class) = cpool_data_ref = build1 (ADDR_EXPR, ptr_type_node, decl); } - return current_constant_pool_data_ref; + return cpool_data_ref; } /* Get the pointer value at the INDEX'th element of the constant pool. */ |