tree method_sig;
{
tree handle_class = CLASS_TO_HANDLE_TYPE (this_class);
- tree function_type, method_type, fndecl;
+ tree function_type, fndecl;
unsigned char *sig = (unsigned char*)IDENTIFIER_POINTER (method_sig);
push_obstacks (&permanent_obstack, &permanent_obstack);
if (sig[0] != '(')
struct obstack *obstack;
tree type;
{
- char buf[8];
- int len;
- char *ptr;
switch (TREE_CODE (type))
{
char code;
build_internal_class_name (type));
}
+/* Allocate a CONSTANT_string entry given a STRING_CST. */
+
+int
+find_string_constant (cpool, string)
+ CPool *cpool;
+ tree string;
+{
+ string = get_identifier (TREE_STRING_POINTER (string));
+ return find_class_or_string_constant (cpool, CONSTANT_String, string);
+
+}
+
/* Find (or create) a CONSTANT_NameAndType matching NAME and TYPE.
Return its index in the constant pool CPOOL. */
{
int size = 2;
int i = 1;
- jword *datap = &cpool->data[1];;
- for ( ; i < cpool->count; i++, datap++)
+ for ( ; i < cpool->count; i++)
{
size++;
switch (cpool->tags[i])
break;
case CONSTANT_Long:
case CONSTANT_Double:
- size += 4;
+ size += 8;
+ i++;
break;
case CONSTANT_Utf8:
{
- tree t = (tree) *datap;
+ tree t = (tree) cpool->data[i];
int len = IDENTIFIER_LENGTH (t);
size += len + 2;
}
break;
+ default:
+ /* Second word of CONSTANT_Long and CONSTANT_Double. */
+ size--;
}
}
return size;
#endif
- if (METHOD_STATIC (fndecl) && ! METHOD_PRIVATE (fndecl))
+ if (METHOD_STATIC (fndecl) && ! METHOD_PRIVATE (fndecl)
+ && ! flag_emit_class_files)
{
tree clas = DECL_CONTEXT (fndecl);
tree init = build (CALL_EXPR, void_type_node,