typeck.c (convert): Don't use flag_emit_class_files.

* typeck.c (convert): Don't use flag_emit_class_files.
	* lang.c (java_post_options): Don't use flag_emit_class_files.
	(java_handle_option): Don't use flag_extraneous_semicolon or
	flag_redundant.
	* jcf-parse.c (HANDLE_CONSTANTVALUE): Don't use
	flag_emit_class_files.
	(load_class): Likewise.
	* java-tree.h (flag_emit_class_files): Don't declare.
	(STATIC_CLASS_INIT_OPT_P): Don't use flag_emit_class_files.
	(flag_extraneous_semicolon): Don't declare.
	(flag_not_overriding): Likewise.
	(flag_static_local_jdk1_1): Likewise.
	(flag_redundant): Likewise.
	* expr.c (build_newarray): Don't use flag_emit_class_files.
	* class.c (DEFAULT_ENABLE_ASSERT): Don't use
	flag_emit_class_files.
	(build_class_ref): Likewise.
	* builtins.c (check_for_builtin): Don't use
	flag_emit_class_files.

From-SVN: r120687
This commit is contained in:
Tom Tromey 2007-01-11 22:40:13 +00:00 committed by Tom Tromey
parent 2a33a75f60
commit 6e63e24060
8 changed files with 33 additions and 64 deletions

View File

@ -1,3 +1,25 @@
2007-01-11 Tom Tromey <tromey@redhat.com>
* typeck.c (convert): Don't use flag_emit_class_files.
* lang.c (java_post_options): Don't use flag_emit_class_files.
(java_handle_option): Don't use flag_extraneous_semicolon or
flag_redundant.
* jcf-parse.c (HANDLE_CONSTANTVALUE): Don't use
flag_emit_class_files.
(load_class): Likewise.
* java-tree.h (flag_emit_class_files): Don't declare.
(STATIC_CLASS_INIT_OPT_P): Don't use flag_emit_class_files.
(flag_extraneous_semicolon): Don't declare.
(flag_not_overriding): Likewise.
(flag_static_local_jdk1_1): Likewise.
(flag_redundant): Likewise.
* expr.c (build_newarray): Don't use flag_emit_class_files.
* class.c (DEFAULT_ENABLE_ASSERT): Don't use
flag_emit_class_files.
(build_class_ref): Likewise.
* builtins.c (check_for_builtin): Don't use
flag_emit_class_files.
2007-01-10 Tom Tromey <tromey@redhat.com>
* lang.c (java_can_use_bit_fields_p): Removed.

View File

@ -1,5 +1,5 @@
/* Built-in and inline functions for gcj
Copyright (C) 2001, 2003, 2004, 2005, 2006
Copyright (C) 2001, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
This file is part of GCC.
@ -578,7 +578,7 @@ initialize_builtins (void)
tree
check_for_builtin (tree method, tree call)
{
if (! flag_emit_class_files && optimize && TREE_CODE (call) == CALL_EXPR)
if (optimize && TREE_CODE (call) == CALL_EXPR)
{
int i;
tree method_arguments = TREE_OPERAND (call, 1);

View File

@ -209,7 +209,7 @@ add_assume_compiled (const char *ident, int excludep)
/* The default value returned by enable_assertions. */
#define DEFAULT_ENABLE_ASSERT (flag_emit_class_files || optimize == 0)
#define DEFAULT_ENABLE_ASSERT (optimize == 0)
/* Enter IDENT (a class or package name) into the enable-assertions table.
VALUE is true to enable and false to disable. */
@ -1059,40 +1059,6 @@ build_class_ref (tree type)
const char *name;
tree decl_name;
char buffer[25];
if (flag_emit_class_files)
{
const char *prim_class_name;
tree prim_class;
if (type == char_type_node)
prim_class_name = "java.lang.Character";
else if (type == boolean_type_node)
prim_class_name = "java.lang.Boolean";
else if (type == byte_type_node)
prim_class_name = "java.lang.Byte";
else if (type == short_type_node)
prim_class_name = "java.lang.Short";
else if (type == int_type_node)
prim_class_name = "java.lang.Integer";
else if (type == long_type_node)
prim_class_name = "java.lang.Long";
else if (type == float_type_node)
prim_class_name = "java.lang.Float";
else if (type == double_type_node)
prim_class_name = "java.lang.Double";
else if (type == void_type_node)
prim_class_name = "java.lang.Void";
else
gcc_unreachable ();
prim_class = lookup_class (get_identifier (prim_class_name));
/* We wrap the class in a NOP_EXPR, because it is a
type. We can't hold it in the COMPONENT_REF itself,
as that type must remain NULL. */
prim_class = build1 (NOP_EXPR, prim_class, NULL_TREE);
return build3 (COMPONENT_REF, NULL_TREE,
prim_class, TYPE_identifier_node, NULL_TREE);
}
decl_name = TYPE_NAME (type);
if (TREE_CODE (decl_name) == TYPE_DECL)
decl_name = DECL_NAME (decl_name);

View File

@ -1059,13 +1059,9 @@ build_newarray (int atype_value, tree length)
host_integerp (length, 0) == INTEGER_CST
? tree_low_cst (length, 0) : -1);
/* If compiling to native, pass a reference to the primitive type class
and save the runtime some work. However, the bytecode generator
expects to find the type_code int here. */
if (flag_emit_class_files)
type_arg = build_int_cst (NULL_TREE, atype_value);
else
type_arg = build_class_ref (prim_type);
/* Pass a reference to the primitive type class and save the runtime
some work. */
type_arg = build_class_ref (prim_type);
return build3 (CALL_EXPR, promote_type (type),
build_address_of (soft_newarray_node),

View File

@ -131,8 +131,6 @@ struct JCF;
/* The virtual offset symbol table. Used by the runtime to fill out
the otable. */
extern int flag_emit_class_files;
extern int flag_filelist_file;
/* When nonzero, permit the use of the assert keyword. */
@ -144,10 +142,6 @@ extern int flag_assert;
extern int flag_jni;
/* When nonzero, report the now deprecated empty statements. */
extern int flag_extraneous_semicolon;
/* When nonzero, always check for a non gcj generated classes archive. */
extern int flag_force_classes_archive_check;
@ -158,8 +152,6 @@ extern const char *resource_name;
/* Turned to 1 if -Wall was encountered. See lang.c for their meanings. */
extern int flag_wall;
extern int flag_redundant;
extern int flag_not_overriding;
extern int flag_static_local_jdk1_1;
/* When nonzero, warn when source file is newer than matching class
file. */
@ -1674,7 +1666,7 @@ extern tree *type_map;
/* True when we can perform static class initialization optimization */
#define STATIC_CLASS_INIT_OPT_P() \
(flag_optimize_sci && (optimize >= 2) && ! flag_emit_class_files)
(flag_optimize_sci && (optimize >= 2))
/* These are the possible values for the `state' field of the class
structure. This must be kept in sync with libgcj. */

View File

@ -912,7 +912,7 @@ handle_signature_attribute (int member_index, JCF *jcf,
#define HANDLE_CONSTANTVALUE(INDEX) \
{ tree constant; int index = INDEX; \
if (! flag_emit_class_files && JPOOL_TAG (jcf, index) == CONSTANT_String) { \
if (JPOOL_TAG (jcf, index) == CONSTANT_String) { \
tree name = get_name_constant (jcf, JPOOL_USHORT1 (jcf, index)); \
constant = build_utf8_ref (name); \
} \
@ -1469,8 +1469,7 @@ load_class (tree class_or_name, int verbose)
if (!class_loaded)
{
if (flag_verify_invocations || ! flag_indirect_dispatch
|| flag_emit_class_files)
if (flag_verify_invocations || ! flag_indirect_dispatch)
{
if (verbose)
error ("cannot find file for class %s", IDENTIFIER_POINTER (saved));

View File

@ -270,8 +270,6 @@ java_handle_option (size_t scode, const char *arg, int value)
case OPT_Wall:
flag_wall = value;
flag_redundant = value;
flag_extraneous_semicolon = value;
/* When -Wall given, enable -Wunused. We do this because the C
compiler does it, and people expect it. */
set_Wunused (value);
@ -657,8 +655,6 @@ java_post_options (const char **pfilename)
target name here. */
if ((dependency_tracking & DEPEND_TARGET_SET))
; /* Nothing. */
else if (flag_emit_class_files)
jcf_dependency_set_target (NULL);
else
{
strcpy (buf + (dot - filename), TARGET_OBJECT_SUFFIX);

View File

@ -1,5 +1,5 @@
/* Handle types for the GNU compiler for the Java(TM) language.
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2007
Free Software Foundation, Inc.
This file is part of GCC.
@ -131,9 +131,7 @@ convert (tree type, tree expr)
{
if (type == char_type_node || type == promoted_char_type_node)
return fold_convert (type, expr);
if ((really_constant_p (expr)
|| (! flag_unsafe_math_optimizations
&& ! flag_emit_class_files))
if ((really_constant_p (expr) || ! flag_unsafe_math_optimizations)
&& TREE_CODE (TREE_TYPE (expr)) == REAL_TYPE
&& TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT)
return convert_ieee_real_to_integer (type, expr);