Commit 6e63e240 by Tom Tromey Committed by Tom Tromey

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
parent 2a33a75f
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> 2007-01-10 Tom Tromey <tromey@redhat.com>
* lang.c (java_can_use_bit_fields_p): Removed. * lang.c (java_can_use_bit_fields_p): Removed.
......
/* Built-in and inline functions for gcj /* 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. Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -578,7 +578,7 @@ initialize_builtins (void) ...@@ -578,7 +578,7 @@ initialize_builtins (void)
tree tree
check_for_builtin (tree method, tree call) 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; int i;
tree method_arguments = TREE_OPERAND (call, 1); tree method_arguments = TREE_OPERAND (call, 1);
......
...@@ -209,7 +209,7 @@ add_assume_compiled (const char *ident, int excludep) ...@@ -209,7 +209,7 @@ add_assume_compiled (const char *ident, int excludep)
/* The default value returned by enable_assertions. */ /* 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. /* Enter IDENT (a class or package name) into the enable-assertions table.
VALUE is true to enable and false to disable. */ VALUE is true to enable and false to disable. */
...@@ -1059,40 +1059,6 @@ build_class_ref (tree type) ...@@ -1059,40 +1059,6 @@ build_class_ref (tree type)
const char *name; const char *name;
tree decl_name; tree decl_name;
char buffer[25]; 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); decl_name = TYPE_NAME (type);
if (TREE_CODE (decl_name) == TYPE_DECL) if (TREE_CODE (decl_name) == TYPE_DECL)
decl_name = DECL_NAME (decl_name); decl_name = DECL_NAME (decl_name);
......
...@@ -1059,12 +1059,8 @@ build_newarray (int atype_value, tree length) ...@@ -1059,12 +1059,8 @@ build_newarray (int atype_value, tree length)
host_integerp (length, 0) == INTEGER_CST host_integerp (length, 0) == INTEGER_CST
? tree_low_cst (length, 0) : -1); ? tree_low_cst (length, 0) : -1);
/* If compiling to native, pass a reference to the primitive type class /* Pass a reference to the primitive type class and save the runtime
and save the runtime some work. However, the bytecode generator some work. */
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); type_arg = build_class_ref (prim_type);
return build3 (CALL_EXPR, promote_type (type), return build3 (CALL_EXPR, promote_type (type),
......
...@@ -131,8 +131,6 @@ struct JCF; ...@@ -131,8 +131,6 @@ struct JCF;
/* The virtual offset symbol table. Used by the runtime to fill out /* The virtual offset symbol table. Used by the runtime to fill out
the otable. */ the otable. */
extern int flag_emit_class_files;
extern int flag_filelist_file; extern int flag_filelist_file;
/* When nonzero, permit the use of the assert keyword. */ /* When nonzero, permit the use of the assert keyword. */
...@@ -144,10 +142,6 @@ extern int flag_assert; ...@@ -144,10 +142,6 @@ extern int flag_assert;
extern int flag_jni; 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. */ /* When nonzero, always check for a non gcj generated classes archive. */
extern int flag_force_classes_archive_check; extern int flag_force_classes_archive_check;
...@@ -158,8 +152,6 @@ extern const char *resource_name; ...@@ -158,8 +152,6 @@ extern const char *resource_name;
/* Turned to 1 if -Wall was encountered. See lang.c for their meanings. */ /* Turned to 1 if -Wall was encountered. See lang.c for their meanings. */
extern int flag_wall; extern int flag_wall;
extern int flag_redundant; 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 /* When nonzero, warn when source file is newer than matching class
file. */ file. */
...@@ -1674,7 +1666,7 @@ extern tree *type_map; ...@@ -1674,7 +1666,7 @@ extern tree *type_map;
/* True when we can perform static class initialization optimization */ /* True when we can perform static class initialization optimization */
#define STATIC_CLASS_INIT_OPT_P() \ #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 /* These are the possible values for the `state' field of the class
structure. This must be kept in sync with libgcj. */ structure. This must be kept in sync with libgcj. */
......
...@@ -912,7 +912,7 @@ handle_signature_attribute (int member_index, JCF *jcf, ...@@ -912,7 +912,7 @@ handle_signature_attribute (int member_index, JCF *jcf,
#define HANDLE_CONSTANTVALUE(INDEX) \ #define HANDLE_CONSTANTVALUE(INDEX) \
{ tree constant; int index = 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)); \ tree name = get_name_constant (jcf, JPOOL_USHORT1 (jcf, index)); \
constant = build_utf8_ref (name); \ constant = build_utf8_ref (name); \
} \ } \
...@@ -1469,8 +1469,7 @@ load_class (tree class_or_name, int verbose) ...@@ -1469,8 +1469,7 @@ load_class (tree class_or_name, int verbose)
if (!class_loaded) if (!class_loaded)
{ {
if (flag_verify_invocations || ! flag_indirect_dispatch if (flag_verify_invocations || ! flag_indirect_dispatch)
|| flag_emit_class_files)
{ {
if (verbose) if (verbose)
error ("cannot find file for class %s", IDENTIFIER_POINTER (saved)); error ("cannot find file for class %s", IDENTIFIER_POINTER (saved));
......
...@@ -270,8 +270,6 @@ java_handle_option (size_t scode, const char *arg, int value) ...@@ -270,8 +270,6 @@ java_handle_option (size_t scode, const char *arg, int value)
case OPT_Wall: case OPT_Wall:
flag_wall = value; flag_wall = value;
flag_redundant = value;
flag_extraneous_semicolon = value;
/* When -Wall given, enable -Wunused. We do this because the C /* When -Wall given, enable -Wunused. We do this because the C
compiler does it, and people expect it. */ compiler does it, and people expect it. */
set_Wunused (value); set_Wunused (value);
...@@ -657,8 +655,6 @@ java_post_options (const char **pfilename) ...@@ -657,8 +655,6 @@ java_post_options (const char **pfilename)
target name here. */ target name here. */
if ((dependency_tracking & DEPEND_TARGET_SET)) if ((dependency_tracking & DEPEND_TARGET_SET))
; /* Nothing. */ ; /* Nothing. */
else if (flag_emit_class_files)
jcf_dependency_set_target (NULL);
else else
{ {
strcpy (buf + (dot - filename), TARGET_OBJECT_SUFFIX); strcpy (buf + (dot - filename), TARGET_OBJECT_SUFFIX);
......
/* Handle types for the GNU compiler for the Java(TM) language. /* 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. Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -131,9 +131,7 @@ convert (tree type, tree expr) ...@@ -131,9 +131,7 @@ convert (tree type, tree expr)
{ {
if (type == char_type_node || type == promoted_char_type_node) if (type == char_type_node || type == promoted_char_type_node)
return fold_convert (type, expr); return fold_convert (type, expr);
if ((really_constant_p (expr) if ((really_constant_p (expr) || ! flag_unsafe_math_optimizations)
|| (! flag_unsafe_math_optimizations
&& ! flag_emit_class_files))
&& TREE_CODE (TREE_TYPE (expr)) == REAL_TYPE && TREE_CODE (TREE_TYPE (expr)) == REAL_TYPE
&& TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT) && TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT)
return convert_ieee_real_to_integer (type, expr); return convert_ieee_real_to_integer (type, expr);
......
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