Commit 0b740634 by Kaveh R. Ghazi Committed by Kaveh Ghazi

mangle.c (set_type_package_list): Constify.

	* mangle.c (set_type_package_list): Constify.
	* verify-glue.c (vfy_make_string): Delete.
	* verify.h (vfy_make_string): Likewise.

From-SVN: r126980
parent 2b8327ce
2007-07-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* mangle.c (set_type_package_list): Constify.
* verify-glue.c (vfy_make_string): Delete.
* verify.h (vfy_make_string): Likewise.
2007-07-26 Tom Tromey <tromey@redhat.com> 2007-07-26 Tom Tromey <tromey@redhat.com>
* java-tree.h (push_labeled_block, pop_labeled_block): Remove. * java-tree.h (push_labeled_block, pop_labeled_block): Remove.
......
...@@ -749,27 +749,21 @@ set_type_package_list (tree type) ...@@ -749,27 +749,21 @@ set_type_package_list (tree type)
{ {
int i; int i;
const char *type_string = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type))); const char *type_string = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type)));
char *ptr; const char *ptr;
int qualifications; int qualifications;
tree list = NULL_TREE, elt; tree list = NULL_TREE, elt;
for (ptr = (char *)type_string, qualifications = 0; *ptr; ptr++) for (ptr = type_string, qualifications = 0; *ptr; ptr++)
if (*ptr == '.') if (*ptr == '.')
qualifications += 1; qualifications += 1;
for (ptr = (char *)type_string, i = 0; i < qualifications; ptr++) for (ptr = type_string, i = 0; i < qualifications; ptr++)
{ {
if (ptr [0] == '.') if (ptr [0] == '.')
{ {
char c; tree const identifier
tree identifier; = get_identifier_with_length (type_string, ptr - type_string);
/* Can't use an obstack, we're already using it to
accumulate the mangling. */
c = ptr [0];
ptr [0] = '\0';
identifier = get_identifier (type_string);
ptr [0] = c;
elt = build_tree_list (identifier, identifier); elt = build_tree_list (identifier, identifier);
TREE_CHAIN (elt) = list; TREE_CHAIN (elt) = list;
list = elt; list = elt;
......
...@@ -211,18 +211,6 @@ vfy_get_pool_class (vfy_constants *pool, int index) ...@@ -211,18 +211,6 @@ vfy_get_pool_class (vfy_constants *pool, int index)
} }
vfy_string vfy_string
vfy_make_string (const char *s, int len)
{
tree result;
char *s2 = (char *) s;
char save = s2[len];
s2[len] = '\0';
result = get_identifier (s2);
s2[len] = save;
return result;
}
vfy_string
vfy_get_class_name (vfy_jclass klass) vfy_get_class_name (vfy_jclass klass)
{ {
return DECL_NAME (TYPE_NAME (klass)); return DECL_NAME (TYPE_NAME (klass));
......
...@@ -97,7 +97,6 @@ vfy_constants *vfy_get_constants (vfy_jclass klass); ...@@ -97,7 +97,6 @@ vfy_constants *vfy_get_constants (vfy_jclass klass);
int vfy_get_constants_size (vfy_jclass klass); int vfy_get_constants_size (vfy_jclass klass);
vfy_string vfy_get_pool_string (vfy_constants *pool, int index); vfy_string vfy_get_pool_string (vfy_constants *pool, int index);
vfy_jclass vfy_get_pool_class (vfy_constants *pool, int index); vfy_jclass vfy_get_pool_class (vfy_constants *pool, int index);
vfy_string vfy_make_string (const char *s, int len);
vfy_string vfy_get_class_name (vfy_jclass klass); vfy_string vfy_get_class_name (vfy_jclass klass);
bool vfy_is_assignable_from (vfy_jclass target, vfy_jclass source); bool vfy_is_assignable_from (vfy_jclass target, vfy_jclass source);
char vfy_get_primitive_char (vfy_jclass klass); char vfy_get_primitive_char (vfy_jclass klass);
......
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