aboutsummaryrefslogtreecommitdiff
path: root/gcc/java
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/java')
-rw-r--r--gcc/java/ChangeLog9
-rw-r--r--gcc/java/java-tree.h1
-rw-r--r--gcc/java/lang.c2
-rw-r--r--gcc/java/typeck.c23
4 files changed, 11 insertions, 24 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 965f7ab..f979728 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,12 @@
+2007-03-30 Rafael Avila de Espindola <espindola@google.com>
+
+ * typeck.c (java_signed_or_unsigned_type): Removed.
+ (java_signed_type): use get_signed_or_unsigned_type instead of
+ java_signed_or_unsigned_type.
+ (java_unsigned_type): Ditto.
+ * lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Removed.
+ * java-tree.h (java_signed_or_unsigned_type): Removed.
+
2007-03-26 Tom Tromey <tromey@redhat.com>
* Make-lang.in (JAVA_MANFILES): Removed grmiregistry.1.
diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h
index 4a41371..c11f83e 100644
--- a/gcc/java/java-tree.h
+++ b/gcc/java/java-tree.h
@@ -1101,7 +1101,6 @@ extern tree java_type_for_mode (enum machine_mode, int);
extern tree java_type_for_size (unsigned int, int);
extern tree java_unsigned_type (tree);
extern tree java_signed_type (tree);
-extern tree java_signed_or_unsigned_type (int, tree);
extern tree java_truthvalue_conversion (tree);
extern void add_assume_compiled (const char *, int);
extern void add_enable_assert (const char *, int);
diff --git a/gcc/java/lang.c b/gcc/java/lang.c
index b1912cc..723d9a6 100644
--- a/gcc/java/lang.c
+++ b/gcc/java/lang.c
@@ -186,8 +186,6 @@ struct language_function GTY(())
#define LANG_HOOKS_SIGNED_TYPE java_signed_type
#undef LANG_HOOKS_UNSIGNED_TYPE
#define LANG_HOOKS_UNSIGNED_TYPE java_unsigned_type
-#undef LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE
-#define LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE java_signed_or_unsigned_type
#undef LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN
#define LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN java_dump_tree
diff --git a/gcc/java/typeck.c b/gcc/java/typeck.c
index 395168f..b35461b 100644
--- a/gcc/java/typeck.c
+++ b/gcc/java/typeck.c
@@ -195,31 +195,12 @@ java_type_for_size (unsigned bits, int unsignedp)
return 0;
}
-/* Return a type the same as TYPE except unsigned or
- signed according to UNSIGNEDP. */
-
-tree
-java_signed_or_unsigned_type (int unsignedp, tree type)
-{
- if (! INTEGRAL_TYPE_P (type))
- return type;
- if (TYPE_PRECISION (type) == TYPE_PRECISION (int_type_node))
- return unsignedp ? unsigned_int_type_node : int_type_node;
- if (TYPE_PRECISION (type) == TYPE_PRECISION (byte_type_node))
- return unsignedp ? unsigned_byte_type_node : byte_type_node;
- if (TYPE_PRECISION (type) == TYPE_PRECISION (short_type_node))
- return unsignedp ? unsigned_short_type_node : short_type_node;
- if (TYPE_PRECISION (type) == TYPE_PRECISION (long_type_node))
- return unsignedp ? unsigned_long_type_node : long_type_node;
- return type;
-}
-
/* Return a signed type the same as TYPE in other respects. */
tree
java_signed_type (tree type)
{
- return java_signed_or_unsigned_type (0, type);
+ return get_signed_or_unsigned_type (0, type);
}
/* Return an unsigned type the same as TYPE in other respects. */
@@ -227,7 +208,7 @@ java_signed_type (tree type)
tree
java_unsigned_type (tree type)
{
- return java_signed_or_unsigned_type (1, type);
+ return get_signed_or_unsigned_type (1, type);
}
/* Mark EXP saying that we need to be able to take the