aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/expr.c
diff options
context:
space:
mode:
authorBryce McKinlay <bryce@waitaki.otago.ac.nz>2001-10-26 01:53:56 +0000
committerBryce McKinlay <bryce@gcc.gnu.org>2001-10-26 02:53:56 +0100
commit961b8e7028e4434d031214cd170b3ec85af87bbd (patch)
tree91722ffb7b8a13491652f4adbc7c3b762d82a185 /gcc/java/expr.c
parent839f8204241b26ffd49b18e86af8c8d2c396e923 (diff)
downloadgcc-961b8e7028e4434d031214cd170b3ec85af87bbd.zip
gcc-961b8e7028e4434d031214cd170b3ec85af87bbd.tar.gz
gcc-961b8e7028e4434d031214cd170b3ec85af87bbd.tar.bz2
expr.c (expand_java_field_op): Don't special-case references to java.lang.PRIMTYPE.TYPE.
* expr.c (expand_java_field_op): Don't special-case references to java.lang.PRIMTYPE.TYPE. (build_primtype_type_ref): Removed. * java-tree.h (build_primtype_type_ref): Remove prototype. * parse.y (maybe_build_primttype_type_ref): Removed. (complete_function_arguments): Don't special-case references to java.lang.PRIMTYPE.TYPE. (patch_assignment): Likewise. (array_constructor_check_entry): Likewise. From-SVN: r46522
Diffstat (limited to 'gcc/java/expr.c')
-rw-r--r--gcc/java/expr.c48
1 files changed, 0 insertions, 48 deletions
diff --git a/gcc/java/expr.c b/gcc/java/expr.c
index 5481289..cf9bef4 100644
--- a/gcc/java/expr.c
+++ b/gcc/java/expr.c
@@ -2266,22 +2266,6 @@ expand_java_field_op (is_static, is_putting, field_ref_index)
return;
}
- /* Inline references to java.lang.PRIMTYPE.TYPE.
- In addition to being a useful (minor) optimization,
- this is also needed to avoid circularities in the implementation
- of these fields in libjava. */
- if (field_name == TYPE_identifier_node && ! is_putting
- && ! flag_emit_class_files && field_type == class_ptr_type
- && strncmp (self_name, "java.lang.", 10) == 0)
- {
- tree typ = build_primtype_type_ref (self_name);
- if (typ)
- {
- push_value (typ);
- return;
- }
- }
-
field_ref = build_field_ref (field_ref, self_type, field_name);
if (is_static)
field_ref = build_class_init (self_type, field_ref);
@@ -2313,38 +2297,6 @@ expand_java_field_op (is_static, is_putting, field_ref_index)
push_value (field_ref);
}
-tree
-build_primtype_type_ref (self_name)
- const char *self_name;
-{
- const char *class_name = self_name+10;
- tree typ;
- if (strncmp(class_name, "Byte", 4) == 0)
- typ = byte_type_node;
- else if (strncmp(class_name, "Short", 5) == 0)
- typ = short_type_node;
- else if (strncmp(class_name, "Integer", 7) == 0)
- typ = int_type_node;
- else if (strncmp(class_name, "Long", 4) == 0)
- typ = long_type_node;
- else if (strncmp(class_name, "Float", 5) == 0)
- typ = float_type_node;
- else if (strncmp(class_name, "Double", 6) == 0)
- typ = double_type_node;
- else if (strncmp(class_name, "Boolean", 7) == 0)
- typ = boolean_type_node;
- else if (strncmp(class_name, "Char", 4) == 0)
- typ = char_type_node;
- else if (strncmp(class_name, "Void", 4) == 0)
- typ = void_type_node;
- else
- typ = NULL_TREE;
- if (typ != NULL_TREE)
- return build_class_ref (typ);
- else
- return NULL_TREE;
-}
-
void
load_type_state (label)
tree label;