Commit d1a458c4 by Tom Tromey Committed by Tom Tromey

init.c (build_java_class_ref): Use `build_static_name' with a suffix...

	* init.c (build_java_class_ref): Use `build_static_name' with a
	suffix, not a prefix, to build the class object's name.

From-SVN: r36737
parent bf347805
2000-10-05 Tom Tromey <tromey@cygnus.com>
* init.c (build_java_class_ref): Use `build_static_name' with a
suffix, not a prefix, to build the class object's name.
2000-10-05 Nathan Sidwell <nathan@codesourcery.com> 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (access_kind): Fix comment typo. * cp-tree.h (access_kind): Fix comment typo.
......
...@@ -2167,9 +2167,9 @@ build_java_class_ref (type) ...@@ -2167,9 +2167,9 @@ build_java_class_ref (type)
tree type; tree type;
{ {
tree name, class_decl; tree name, class_decl;
static tree CL_prefix = NULL_TREE; static tree CL_suffix = NULL_TREE;
if (CL_prefix == NULL_TREE) if (CL_suffix == NULL_TREE)
CL_prefix = get_identifier("_CL_"); CL_suffix = get_identifier("class$");
if (jclass_node == NULL_TREE) if (jclass_node == NULL_TREE)
{ {
jclass_node = IDENTIFIER_GLOBAL_VALUE (get_identifier("jclass")); jclass_node = IDENTIFIER_GLOBAL_VALUE (get_identifier("jclass"));
...@@ -2177,7 +2177,7 @@ build_java_class_ref (type) ...@@ -2177,7 +2177,7 @@ build_java_class_ref (type)
fatal("call to Java constructor, while `jclass' undefined"); fatal("call to Java constructor, while `jclass' undefined");
jclass_node = TREE_TYPE (jclass_node); jclass_node = TREE_TYPE (jclass_node);
} }
name = build_overload_with_type (CL_prefix, type); name = build_static_name (type, CL_suffix);
class_decl = IDENTIFIER_GLOBAL_VALUE (name); class_decl = IDENTIFIER_GLOBAL_VALUE (name);
if (class_decl == NULL_TREE) if (class_decl == NULL_TREE)
{ {
...@@ -2193,7 +2193,7 @@ build_java_class_ref (type) ...@@ -2193,7 +2193,7 @@ build_java_class_ref (type)
return class_decl; return class_decl;
} }
/* Returns teh size of the cookie to use when allocating an array /* Returns the size of the cookie to use when allocating an array
whose elements have the indicated TYPE. Assumes that it is already whose elements have the indicated TYPE. Assumes that it is already
known that a cookie is needed. */ known that a cookie is needed. */
......
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