summaryrefslogtreecommitdiff
path: root/gcc/java
diff options
context:
space:
mode:
authorEric Christopher <echristo@gcc.gnu.org>2004-07-28 23:44:56 +0000
committerEric Christopher <echristo@gcc.gnu.org>2004-07-28 23:44:56 +0000
commit9f63daea379c0d0c8a30b8f6ea6d8dc6c4ffa415 (patch)
tree789a4a99989bb6a0b5b9248db954752ac63506bc /gcc/java
parent61b60ed0833f0b703b0b411fb75363cbd145182b (diff)
downloadgcc-9f63daea379c0d0c8a30b8f6ea6d8dc6c4ffa415.tar.gz
c-common.c (c_common_unsafe_for_reeval): Delete.
2004-07-28 Eric Christopher <echristo@redhat.com> * c-common.c (c_common_unsafe_for_reeval): Delete. * c-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete use. * c-pretty-print.c (pp_c_expression): Delete UNSAVE_EXPR case. * calls.c (fix_unsafe_tree): Delete. (expand_call): Delete code which used above. * dojump.c (do_jump): Delete UNSAVE_EXPR case. * expr.c (expand_expr_real_1): Ditto. * fold-const.c (non_lvalue): Ditto. * langhooks-def.h (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete. (lhd_unsafe_for_reeval): Ditto. * langhooks.c (lhd_unsafe_for_reeval): Ditto. * langhooks.h (unsafe_for_reeval): Ditto. (unsave_expr_now): Adjust comment. * tree-inline.c (copy_body_r): Delete UNSAVE_EXPR bits. (estimate_num_insns_1): Ditto. * tree-pretty-print.c (dump_generic_node): Ditto. * tree.c (expr_align): Ditto. (unsave_expr): Delete. (unsafe_for_reeval): Ditto. * tree.h (unsafe_for_reeval, unsave_expr): Ditto. * tree.def (UNSAVE_EXPR): Delete. * objc/objc-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete. 2004-07-28 Eric Christopher <echristo@redhat.com> * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete. 2004-07-28 Eric Christopher <echristo@redhat.com> * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete. (java_unsafe_for_reeval): Ditto. From-SVN: r85276
Diffstat (limited to 'gcc/java')
-rw-r--r--gcc/java/ChangeLog35
-rw-r--r--gcc/java/lang.c58
2 files changed, 38 insertions, 55 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 8962a64baaf..e96f60f2c29 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,8 @@
+2004-07-28 Eric Christopher <echristo@redhat.com>
+
+ * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
+ (java_unsafe_for_reeval): Ditto.
+
2004-07-26 <hp@bitrange.com>
* parse.y (build_super_invocation): Adjust declaration order to
@@ -72,7 +77,7 @@
(start_java_method): Reset uniq. Create base_decl_map. Set
function_binding_level.
(end_java_method): Null unused fields to save memory.
-
+
2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
* class.c (add_interface_do): Remove.
@@ -183,8 +188,8 @@
(create_class): Fix comment typo.
(resolve_qualified_expression_name): Pass type of qualifier to
not_accessible_p, not the type in which target field was found.
- (not_accessible_p): Handle inner classes. Expand protected
- qualifier-subtype check to enclosing instances, but don't apply this
+ (not_accessible_p): Handle inner classes. Expand protected
+ qualifier-subtype check to enclosing instances, but don't apply this
check to static members. Allow protected access to inner classes
of a subtype. Allow private access within common enclosing context.
(build_super_invocation): Get WFL line number info from current
@@ -195,7 +200,7 @@
common_enclosing_instance_p.
* class.c (common_enclosing_context_p): New. Determine if types
share a common enclosing context, even across static contexts.
- (common_enclosing_instance_p): Renamed from
+ (common_enclosing_instance_p): Renamed from
common_enclosing_context_p. Determines if types share a common
non-static enclosing instance.
* java-tree.h (common_enclosing_instance_p): Declare.
@@ -356,7 +361,7 @@
* parse.y (create_interface): Set correct access modifiers for
interfaces.
* jcf-write.c (get_classfile_modifiers): New function.
- (generate_classfile): Use get_classfile_modifiers, not
+ (generate_classfile): Use get_classfile_modifiers, not
get_access_flags.
2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
@@ -369,7 +374,7 @@
2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
- * parse.y (qualify_and_find): Pass type decl, not identifier, to
+ * parse.y (qualify_and_find): Pass type decl, not identifier, to
load_class.
2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
@@ -403,7 +408,7 @@
2004-06-22 Andrew Haley <aph@redhat.com>
Ranjit Mathew <rmathew@hotmail.com>
-
+
Fixes PR java/16113.
* decl.c (force_poplevels): Remove call to expand_end_bindings.
@@ -424,7 +429,7 @@
(emit_init_test_initialization): Likewise.
* java-gimplify.c (java_gimplify_new_array_init): Likewise.
* parse.y (make_qualifed_name, build_array_ref): Likewise.
-
+
2004-06-21 Andrew Haley <aph@redhat.com>
* java-gimplify.c (java_gimplify_block): set TREE_USED on the new
@@ -455,7 +460,7 @@
do not set current_function_cannot_inline.
* resource.c (write_resource_constructor): Do not reset
flag_inline_functions around rest_of_compilation.
-
+
2004-06-08 Andrew Pinski <pinskia@physics.uc.edu>
PR java/15769
@@ -490,8 +495,8 @@
2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
- * jcf-write.c (generate_bytecode_conditional): Handle binops
- UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
+ * jcf-write.c (generate_bytecode_conditional): Handle binops
+ UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
and LTGT_EXPR.
(generate_bytecode_insns): Likewise.
@@ -599,7 +604,7 @@
Fix comment typo.
Use check_pkg_class_access() instead of not_accessible_p()
for unqualified types.
- (not_accessible_p): Use DECL_CONTEXT (member) instead of
+ (not_accessible_p): Use DECL_CONTEXT (member) instead of
REFERENCE for package-private access checking.
(patch_method_invocation): Use accessibility_string() instead
of java_accstring_lookup().
@@ -626,12 +631,12 @@
2004-04-19 Bryce McKinlay <mckinlay@redhat.com>
* class.c (make_class_data): Add new field aux_info.
- * decl.c (java_init_decl_processing): Push type and decl for
+ * decl.c (java_init_decl_processing): Push type and decl for
`aux_info'.
2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
- * expr.c (expand_java_NEW): Don't use size argument for
+ * expr.c (expand_java_NEW): Don't use size argument for
_Jv_AllocObject calls.
* parse.y (patch_invoke): Likewise.
@@ -642,7 +647,7 @@
2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
- * class.c (get_interface_method_index): New function. Return dispatch
+ * class.c (get_interface_method_index): New function. Return dispatch
index for interface method.
(make_method_value): For interface methods, set index field to
iface dispatch index, not DECL_VINDEX.
diff --git a/gcc/java/lang.c b/gcc/java/lang.c
index d3ba37289d9..f81388a4c23 100644
--- a/gcc/java/lang.c
+++ b/gcc/java/lang.c
@@ -17,7 +17,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.
+Boston, MA 02111-1307, USA.
Java and all Java-based marks are trademarks or registered trademarks
of Sun Microsystems, Inc. in the United States and other countries.
@@ -59,7 +59,6 @@ static void put_decl_node (tree);
static void java_print_error_function (diagnostic_context *, const char *);
static tree java_tree_inlining_walk_subtrees (tree *, int *, walk_tree_fn,
void *, void *);
-static int java_unsafe_for_reeval (tree);
static int merge_init_test_initialization (void * *, void *);
static int inline_init_test_initialization (void * *, void *);
static bool java_can_use_bit_fields_p (void);
@@ -221,8 +220,6 @@ struct language_function GTY(())
#define LANG_HOOKS_POST_OPTIONS java_post_options
#undef LANG_HOOKS_PARSE_FILE
#define LANG_HOOKS_PARSE_FILE java_parse_file
-#undef LANG_HOOKS_UNSAFE_FOR_REEVAL
-#define LANG_HOOKS_UNSAFE_FOR_REEVAL java_unsafe_for_reeval
#undef LANG_HOOKS_MARK_ADDRESSABLE
#define LANG_HOOKS_MARK_ADDRESSABLE java_mark_addressable
#undef LANG_HOOKS_TRUTHVALUE_CONVERSION
@@ -672,7 +669,7 @@ java_print_error_function (diagnostic_context *context ATTRIBUTE_UNUSED,
{
const char *name = lang_printable_name (current_function_decl, 2);
fprintf (stderr, "In %s `%s':\n",
- (DECL_CONSTRUCTOR_P (current_function_decl) ? "constructor"
+ (DECL_CONSTRUCTOR_P (current_function_decl) ? "constructor"
: "method"),
name);
}
@@ -866,38 +863,19 @@ java_tree_inlining_walk_subtrees (tree *tp ATTRIBUTE_UNUSED,
#undef WALK_SUBTREE
}
-/* Called from unsafe_for_reeval. */
-static int
-java_unsafe_for_reeval (tree t)
-{
- switch (TREE_CODE (t))
- {
- case BLOCK:
- /* Our expander tries to expand the variables twice. Boom. */
- if (BLOCK_EXPR_DECLS (t) != NULL)
- return 2;
- return unsafe_for_reeval (BLOCK_EXPR_BODY (t));
-
- default:
- break;
- }
-
- return -1;
-}
-
/* Every call to a static constructor has an associated boolean
variable which is in the outermost scope of the calling method.
This variable is used to avoid multiple calls to the static
- constructor for each class.
+ constructor for each class.
It looks something like this:
foo ()
{
boolean dummy = OtherClass.is_initialized;
-
+
...
-
+
if (! dummy)
OtherClass.initialize();
@@ -920,7 +898,7 @@ merge_init_test_initialization (void **entry, void *x)
splay_tree decl_map = (splay_tree)x;
splay_tree_node n;
tree *init_test_decl;
-
+
/* See if we have remapped this declaration. If we haven't there's
a bug in the inliner. */
n = splay_tree_lookup (decl_map, (splay_tree_key) ite->value);
@@ -935,18 +913,18 @@ merge_init_test_initialization (void **entry, void *x)
if (!*init_test_decl)
*init_test_decl = (tree)n->value;
- /* This fixes a weird case.
+ /* This fixes a weird case.
The front end assumes that once we have called a method that
initializes some class, we can assume the class is initialized. It
does this by setting the DECL_INITIAL of the init_test_decl for that
class, and no initializations are emitted for that class.
-
+
However, what if the method that is suppoed to do the initialization
is itself inlined in the caller? When expanding the called method
we'll assume that the class initialization has already been done,
because the DECL_INITIAL of the init_test_decl is set.
-
+
To fix this we remove the DECL_INITIAL (in the caller scope) of all
the init_test_decls corresponding to classes initialized by the
inlined method. This makes the caller no longer assume that the
@@ -962,7 +940,7 @@ merge_init_test_initialization (void **entry, void *x)
void
java_inlining_merge_static_initializers (tree fn, void *decl_map)
{
- htab_traverse
+ htab_traverse
(DECL_FUNCTION_INIT_TEST_TABLE (fn),
merge_init_test_initialization, decl_map);
}
@@ -978,8 +956,8 @@ inline_init_test_initialization (void **entry, void *x)
{
struct treetreehash_entry *ite = (struct treetreehash_entry *) *entry;
splay_tree decl_map = (splay_tree)x;
-
- tree h = java_treetreehash_find
+
+ tree h = java_treetreehash_find
(DECL_FUNCTION_INIT_TEST_TABLE (current_function_decl), ite->key);
if (! h)
return true;
@@ -997,7 +975,7 @@ inline_init_test_initialization (void **entry, void *x)
void
java_inlining_map_static_initializers (tree fn, void *decl_map)
{
- htab_traverse
+ htab_traverse
(DECL_FUNCTION_INIT_TEST_TABLE (fn),
inline_init_test_initialization, decl_map);
}
@@ -1029,7 +1007,7 @@ dump_compound_expr (dump_info_p di, tree t)
}
}
}
-
+
static bool
java_dump_tree (void *dump_info, tree t)
{
@@ -1087,7 +1065,7 @@ java_dump_tree (void *dump_info, tree t)
dump_child ("var", local);
local = next;
}
-
+
{
tree block = BLOCK_EXPR_BODY (t);
dump_child ("body", block);
@@ -1095,7 +1073,7 @@ java_dump_tree (void *dump_info, tree t)
}
}
return true;
-
+
case COMPOUND_EXPR:
if (!dump_flag (di, TDF_SLIM, t))
return false;
@@ -1139,13 +1117,13 @@ java_get_callee_fndecl (tree call_expr)
return NULL;
table = TREE_OPERAND (method, 0);
if (! DECL_LANG_SPECIFIC(table)
- || !DECL_OWNER (table)
+ || !DECL_OWNER (table)
|| TYPE_ATABLE_DECL (DECL_OWNER (table)) != table)
return NULL;
atable_methods = TYPE_ATABLE_METHODS (DECL_OWNER (table));
index = TREE_INT_CST_LOW (TREE_OPERAND (method, 1));
-
+
/* FIXME: Replace this for loop with a hash table lookup. */
for (element = atable_methods; element; element = TREE_CHAIN (element))
{