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

* All Files: Convert to ISO C style function definitions.

From-SVN: r61218
parent 8e37cba8
2003-01-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* All Files: Convert to ISO C style function definitions.
2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
* parse.y (check_pkg_class_access): ANSIfy definition.
......
......@@ -43,9 +43,8 @@ static void set_bit (unsigned HOST_WIDE_INT *, unsigned HOST_WIDE_INT *,
/* Treat two HOST_WIDE_INT's as a contiguous bitmap, with bit 0 being
the least significant. This function sets bit N in the bitmap. */
static void
set_bit (low, high, n)
unsigned HOST_WIDE_INT *low, *high;
unsigned int n;
set_bit (unsigned HOST_WIDE_INT *low, unsigned HOST_WIDE_INT *high,
unsigned int n)
{
HOST_WIDE_INT *which;
......@@ -62,15 +61,14 @@ set_bit (low, high, n)
/* Recursively mark reference fields. */
static void
mark_reference_fields (field, low, high, ubit,
pointer_after_end, all_bits_set,
last_set_index, last_view_index)
tree field;
unsigned HOST_WIDE_INT *low, *high;
unsigned int ubit;
int *pointer_after_end, *all_bits_set;
int *last_set_index;
HOST_WIDE_INT *last_view_index;
mark_reference_fields (tree field,
unsigned HOST_WIDE_INT *low,
unsigned HOST_WIDE_INT *high,
unsigned int ubit,
int *pointer_after_end,
int *all_bits_set,
int *last_set_index,
HOST_WIDE_INT *last_view_index)
{
/* See if we have fields from our superclass. */
if (DECL_NAME (field) == NULL_TREE)
......
......@@ -29,9 +29,7 @@ Boston, MA 02111-1307, USA. */
/* Grow BUFP so there is room for at least SIZE more bytes. */
void
buffer_grow (bufp, size)
struct buffer *bufp;
int size;
buffer_grow (struct buffer *bufp, int size)
{
if (bufp->limit - bufp->ptr >= size)
return;
......
......@@ -116,8 +116,7 @@ static tree builtin_types[(int) BT_LAST];
/* Internal functions which implement various builtin conversions. */
static tree
max_builtin (method_return_type, method_arguments)
tree method_return_type, method_arguments;
max_builtin (tree method_return_type, tree method_arguments)
{
return build (MAX_EXPR, method_return_type,
TREE_VALUE (method_arguments),
......@@ -125,8 +124,7 @@ max_builtin (method_return_type, method_arguments)
}
static tree
min_builtin (method_return_type, method_arguments)
tree method_return_type, method_arguments;
min_builtin (tree method_return_type, tree method_arguments)
{
return build (MIN_EXPR, method_return_type,
TREE_VALUE (method_arguments),
......@@ -134,8 +132,7 @@ min_builtin (method_return_type, method_arguments)
}
static tree
abs_builtin (method_return_type, method_arguments)
tree method_return_type, method_arguments;
abs_builtin (tree method_return_type, tree method_arguments)
{
return build1 (ABS_EXPR, method_return_type,
TREE_VALUE (method_arguments));
......@@ -155,8 +152,7 @@ build_function_call_expr (tree fn, tree arglist)
}
static tree
cos_builtin (method_return_type, method_arguments)
tree method_return_type ATTRIBUTE_UNUSED, method_arguments;
cos_builtin (tree method_return_type ATTRIBUTE_UNUSED, tree method_arguments)
{
/* FIXME: this assumes that jdouble and double are the same. */
tree fn = built_in_decls[BUILT_IN_COS];
......@@ -166,8 +162,7 @@ cos_builtin (method_return_type, method_arguments)
}
static tree
sin_builtin (method_return_type, method_arguments)
tree method_return_type ATTRIBUTE_UNUSED, method_arguments;
sin_builtin (tree method_return_type ATTRIBUTE_UNUSED, tree method_arguments)
{
/* FIXME: this assumes that jdouble and double are the same. */
tree fn = built_in_decls[BUILT_IN_SIN];
......@@ -177,8 +172,7 @@ sin_builtin (method_return_type, method_arguments)
}
static tree
sqrt_builtin (method_return_type, method_arguments)
tree method_return_type ATTRIBUTE_UNUSED, method_arguments;
sqrt_builtin (tree method_return_type ATTRIBUTE_UNUSED, tree method_arguments)
{
/* FIXME: this assumes that jdouble and double are the same. */
tree fn = built_in_decls[BUILT_IN_SQRT];
......@@ -191,12 +185,11 @@ sqrt_builtin (method_return_type, method_arguments)
/* Define a single builtin. */
static void
define_builtin (val, name, class, type, fallback_p)
enum built_in_function val;
const char *name;
enum built_in_class class;
tree type;
int fallback_p;
define_builtin (enum built_in_function val,
const char *name,
enum built_in_class class,
tree type,
int fallback_p)
{
tree decl;
......@@ -220,8 +213,7 @@ define_builtin (val, name, class, type, fallback_p)
/* Compute the type for a builtin. */
static tree
define_builtin_type (ret, arg1, arg2, arg3, arg4)
int ret, arg1, arg2, arg3, arg4;
define_builtin_type (int ret, int arg1, int arg2, int arg3, int arg4)
{
tree args;
......@@ -262,7 +254,7 @@ define_builtin_type (ret, arg1, arg2, arg3, arg4)
/* Initialize the builtins. */
void
initialize_builtins ()
initialize_builtins (void)
{
int i;
......@@ -322,9 +314,7 @@ initialize_builtins ()
/* If the call matches a builtin, return the
appropriate builtin expression instead. */
tree
check_for_builtin (method, call)
tree method;
tree call;
check_for_builtin (tree method, tree call)
{
if (! flag_emit_class_files && optimize && TREE_CODE (call) == CALL_EXPR)
{
......
......@@ -162,8 +162,7 @@ static void check_final_reassigned (tree, words);
Return the declaration or NULL_TREE if no interesting declaration. */
static tree
get_variable_decl (exp)
tree exp;
get_variable_decl (tree exp)
{
if (TREE_CODE (exp) == VAR_DECL)
{
......@@ -196,8 +195,7 @@ get_variable_decl (exp)
}
static void
final_assign_error (name)
tree name;
final_assign_error (tree name)
{
static const char format[]
= "can't reassign a value to the final variable '%s'";
......@@ -205,9 +203,7 @@ final_assign_error (name)
}
static void
check_final_reassigned (decl, before)
tree decl;
words before;
check_final_reassigned (tree decl, words before)
{
int index = DECL_BIT_INDEX (decl);
/* A final local already assigned or a final parameter
......@@ -225,10 +221,8 @@ check_final_reassigned (decl, before)
BEFORE, WHEN_FALSE, and WHEN_TRUE are as in check_bool_init. */
static void
check_cond_init (test_exp, then_exp, else_exp,
before, when_false, when_true)
tree test_exp, then_exp, else_exp;
words before, when_false, when_true;
check_cond_init (tree test_exp, tree then_exp, tree else_exp,
words before, words when_false, words when_true)
{
int save_start_current_locals = start_current_locals;
DECLARE_BUFFERS(test_false, 6);
......@@ -253,9 +247,8 @@ check_cond_init (test_exp, then_exp, else_exp,
BEFORE, WHEN_FALSE, and WHEN_TRUE are as in check_bool_init. */
static void
check_bool2_init (code, exp0, exp1, before, when_false, when_true)
enum tree_code code; tree exp0, exp1;
words before, when_false, when_true;
check_bool2_init (enum tree_code code, tree exp0, tree exp1,
words before, words when_false, words when_true)
{
word buf[2*4];
words tmp = num_current_words <= 2 ? buf
......@@ -321,9 +314,7 @@ check_bool2_init (code, exp0, exp1, before, when_false, when_true)
be used as temporary working areas. */
static void
check_bool_init (exp, before, when_false, when_true)
tree exp;
words before, when_false, when_true;
check_bool_init (tree exp, words before, words when_false, words when_true)
{
switch (TREE_CODE (exp))
{
......@@ -455,9 +446,7 @@ struct alternatives * alternatives = NULL;
of previous alternative branches. */
static void
done_alternative (after, current)
words after;
struct alternatives *current;
done_alternative (words after, struct alternatives *current)
{
INTERSECTN (current->combined, current->combined, after,
WORDS_NEEDED (2 * current->num_locals));
......@@ -479,9 +468,7 @@ done_alternative (after, current)
/* Check for (un)initialized local variables in EXP. */
static void
check_init (exp, before)
tree exp;
words before;
check_init (tree exp, words before)
{
tree tmp;
again:
......@@ -924,8 +911,7 @@ check_init (exp, before)
}
void
check_for_initialization (body, mdecl)
tree body, mdecl;
check_for_initialization (tree body, tree mdecl)
{
tree decl;
word buf[2];
......
......@@ -105,9 +105,7 @@ static GTY(()) tree class_roots[5];
appropriate node does not exist. */
static assume_compiled_node *
find_assume_compiled_node (node, ident)
assume_compiled_node *node;
const char *ident;
find_assume_compiled_node (assume_compiled_node *node, const char *ident)
{
while (node)
{
......@@ -146,9 +144,7 @@ find_assume_compiled_node (node, ident)
if EXCLUDEP is nonzero. */
void
add_assume_compiled (ident, excludep)
const char *ident;
int excludep;
add_assume_compiled (const char *ident, int excludep)
{
int len;
assume_compiled_node *parent;
......@@ -199,8 +195,7 @@ add_assume_compiled (ident, excludep)
should assume has been compiled to object code. */
static int
assume_compiled (ident)
const char *ident;
assume_compiled (const char *ident)
{
assume_compiled_node *i;
int result;
......@@ -221,13 +216,12 @@ assume_compiled (ident)
Also, PREFIX is prepended, and SUFFIX is appended. */
tree
ident_subst (old_name, old_length, prefix, old_char, new_char, suffix)
const char* old_name;
int old_length;
const char *prefix;
int old_char;
int new_char;
const char *suffix;
ident_subst (const char* old_name,
int old_length,
const char *prefix,
int old_char,
int new_char,
const char *suffix)
{
int prefix_len = strlen (prefix);
int suffix_len = strlen (suffix);
......@@ -254,12 +248,11 @@ ident_subst (old_name, old_length, prefix, old_char, new_char, suffix)
Also, PREFIX is prepended, and SUFFIX is appended. */
tree
identifier_subst (old_id, prefix, old_char, new_char, suffix)
const tree old_id;
const char *prefix;
int old_char;
int new_char;
const char *suffix;
identifier_subst (const tree old_id,
const char *prefix,
int old_char,
int new_char,
const char *suffix)
{
return ident_subst (IDENTIFIER_POINTER (old_id), IDENTIFIER_LENGTH (old_id),
prefix, old_char, new_char, suffix);
......@@ -269,9 +262,7 @@ identifier_subst (old_id, prefix, old_char, new_char, suffix)
prefixed by PREFIX. */
tree
mangled_classname (prefix, type)
const char *prefix;
tree type;
mangled_classname (const char *prefix, tree type)
{
tree ident = TYPE_NAME (type);
if (TREE_CODE (ident) != IDENTIFIER_NODE)
......@@ -280,7 +271,7 @@ mangled_classname (prefix, type)
}
tree
make_class ()
make_class (void)
{
tree type;
type = make_node (RECORD_TYPE);
......@@ -295,8 +286,7 @@ make_class ()
return a corresponding IDENTIFIER_NODE, except using '.' as separator. */
tree
unmangle_classname (name, name_length)
const char *name; int name_length;
unmangle_classname (const char *name, int name_length)
{
tree to_return = ident_subst (name, name_length, "", '/', '.', "");
/* It's not sufficient to compare to_return and get_identifier
......@@ -315,8 +305,7 @@ unmangle_classname (name, name_length)
}
tree
push_class (class_type, class_name)
tree class_type, class_name;
push_class (tree class_type, tree class_name)
{
tree decl, signature;
const char *save_input_filename = input_filename;
......@@ -351,8 +340,7 @@ push_class (class_type, class_name)
fill in field or methods, or do layout_type. */
tree
lookup_class (name)
tree name;
lookup_class (tree name)
{
tree decl = IDENTIFIER_CLASS_VALUE (name);
if (decl == NULL_TREE)
......@@ -361,11 +349,8 @@ lookup_class (name)
}
void
set_super_info (access_flags, this_class, super_class, interfaces_count)
int access_flags;
tree this_class;
tree super_class;
int interfaces_count;
set_super_info (int access_flags, tree this_class,
tree super_class, int interfaces_count)
{
int total_supers = interfaces_count;
tree class_decl = TYPE_NAME (this_class);
......@@ -388,9 +373,7 @@ set_super_info (access_flags, this_class, super_class, interfaces_count)
}
void
set_class_decl_access_flags (access_flags, class_decl)
int access_flags;
tree class_decl;
set_class_decl_access_flags (int access_flags, tree class_decl)
{
if (access_flags & ACC_PUBLIC) CLASS_PUBLIC (class_decl) = 1;
if (access_flags & ACC_FINAL) CLASS_FINAL (class_decl) = 1;
......@@ -407,8 +390,7 @@ set_class_decl_access_flags (access_flags, class_decl)
direct sub-classes of Object are 1, and so on. */
int
class_depth (clas)
tree clas;
class_depth (tree clas)
{
int depth = 0;
if (! CLASS_LOADED_P (clas))
......@@ -426,8 +408,7 @@ class_depth (clas)
/* Return true iff TYPE2 is an interface that extends interface TYPE1 */
int
interface_of_p (type1, type2)
tree type1, type2;
interface_of_p (tree type1, tree type2)
{
int n, i;
tree basetype_vec;
......@@ -454,8 +435,7 @@ interface_of_p (type1, type2)
/* Return true iff TYPE1 inherits from TYPE2. */
int
inherits_from_p (type1, type2)
tree type1, type2;
inherits_from_p (tree type1, tree type2)
{
while (type1 != NULL_TREE && TREE_CODE (type1) == RECORD_TYPE)
{
......@@ -469,8 +449,7 @@ inherits_from_p (type1, type2)
/* Return a 1 iff TYPE1 is an enclosing context for TYPE2 */
int
enclosing_context_p (type1, type2)
tree type1, type2;
enclosing_context_p (tree type1, tree type2)
{
if (!INNER_CLASS_TYPE_P (type2))
return 0;
......@@ -490,8 +469,7 @@ enclosing_context_p (type1, type2)
/* Return 1 iff there exists a common enclosing context between TYPE1
and TYPE2. */
int common_enclosing_context_p (type1, type2)
tree type1, type2;
int common_enclosing_context_p (tree type1, tree type2)
{
if (!PURE_INNER_CLASS_TYPE_P (type1) || !PURE_INNER_CLASS_TYPE_P (type2))
return 0;
......@@ -512,9 +490,7 @@ int common_enclosing_context_p (type1, type2)
}
static void
add_interface_do (basetype_vec, interface_class, i)
tree basetype_vec, interface_class;
int i;
add_interface_do (tree basetype_vec, tree interface_class, int i)
{
tree interface_binfo = make_tree_vec (6);
BINFO_TYPE (interface_binfo) = interface_class;
......@@ -530,8 +506,7 @@ add_interface_do (basetype_vec, interface_class, i)
if attempt is made to add it twice. */
tree
maybe_add_interface (this_class, interface_class)
tree this_class, interface_class;
maybe_add_interface (tree this_class, tree interface_class)
{
tree basetype_vec = TYPE_BINFO_BASETYPES (this_class);
int i;
......@@ -555,8 +530,7 @@ maybe_add_interface (this_class, interface_class)
/* Add the INTERFACE_CLASS as one of the interfaces of THIS_CLASS. */
void
add_interface (this_class, interface_class)
tree this_class, interface_class;
add_interface (tree this_class, tree interface_class)
{
tree basetype_vec = TYPE_BINFO_BASETYPES (this_class);
int i;
......@@ -579,9 +553,7 @@ add_interface (this_class, interface_class)
in the list (*LIST) whose DECL_NAME is NAME. */
static tree *
find_named_method (list, name)
tree *list;
tree name;
find_named_method (tree *list, tree name)
{
while (*list && DECL_NAME (*list) != name)
list = &TREE_CHAIN (*list);
......@@ -590,10 +562,7 @@ find_named_method (list, name)
#endif
static tree
build_java_method_type (fntype, this_class, access_flags)
tree fntype;
tree this_class;
int access_flags;
build_java_method_type (tree fntype, tree this_class, int access_flags)
{
if (access_flags & ACC_STATIC)
return fntype;
......@@ -601,11 +570,7 @@ build_java_method_type (fntype, this_class, access_flags)
}
tree
add_method_1 (this_class, access_flags, name, function_type)
tree this_class;
int access_flags;
tree name;
tree function_type;
add_method_1 (tree this_class, int access_flags, tree name, tree function_type)
{
tree method_type, fndecl;
......@@ -667,11 +632,7 @@ add_method_1 (this_class, access_flags, name, function_type)
Its signature (mangled type) is METHOD_SIG (an IDENTIFIER_NODE). */
tree
add_method (this_class, access_flags, name, method_sig)
tree this_class;
int access_flags;
tree name;
tree method_sig;
add_method (tree this_class, int access_flags, tree name, tree method_sig)
{
tree function_type, fndecl;
const unsigned char *sig
......@@ -687,11 +648,7 @@ add_method (this_class, access_flags, name, method_sig)
}
tree
add_field (class, name, field_type, flags)
tree class;
tree name;
tree field_type;
int flags;
add_field (tree class, tree name, tree field_type, int flags)
{
int is_static = (flags & ACC_STATIC) != 0;
tree field;
......@@ -723,8 +680,7 @@ add_field (class, name, field_type, flags)
/* Associate a constant value CONSTANT with VAR_DECL FIELD. */
void
set_constant_value (field, constant)
tree field, constant;
set_constant_value (tree field, tree constant)
{
if (field == NULL_TREE)
warning ("misplaced ConstantValue attribute (not in any field)");
......@@ -751,9 +707,7 @@ set_constant_value (field, constant)
#if 0
int
strLengthUtf8 (str, len)
char *str;
int len;
strLengthUtf8 (char *str, int len)
{
register unsigned char* ptr = (unsigned char*) str;
register unsigned char *limit = ptr + len;
......@@ -772,9 +726,7 @@ strLengthUtf8 (str, len)
*/
static int32
hashUtf8String (str, len)
const char *str;
int len;
hashUtf8String (const char *str, int len)
{
register const unsigned char* ptr = (const unsigned char*) str;
register const unsigned char *limit = ptr + len;
......@@ -794,9 +746,7 @@ hashUtf8String (str, len)
compiled Java resource, which is accessed by the runtime using
NAME. */
void
compile_resource_file (name, filename)
char *name;
const char *filename;
compile_resource_file (char *name, const char *filename)
{
struct stat stat_buf;
int fd;
......@@ -898,8 +848,7 @@ compile_resource_file (name, filename)
tree utf8_decl_list = NULL_TREE;
tree
build_utf8_ref (name)
tree name;
build_utf8_ref (tree name)
{
const char * name_ptr = IDENTIFIER_POINTER(name);
int name_len = IDENTIFIER_LENGTH(name);
......@@ -971,8 +920,7 @@ build_utf8_ref (name)
Also handles primitive types and array types. */
tree
build_class_ref (type)
tree type;
build_class_ref (tree type)
{
int is_compiled = is_compiled_class (type);
if (is_compiled)
......@@ -1073,8 +1021,7 @@ build_class_ref (type)
}
tree
build_static_field_ref (fdecl)
tree fdecl;
build_static_field_ref (tree fdecl)
{
tree fclass = DECL_CONTEXT (fdecl);
int is_compiled = is_compiled_class (fclass);
......@@ -1124,8 +1071,7 @@ build_static_field_ref (fdecl)
}
int
get_access_flags_from_decl (decl)
tree decl;
get_access_flags_from_decl (tree decl)
{
int access_flags = 0;
if (TREE_CODE (decl) == FIELD_DECL || TREE_CODE (decl) == VAR_DECL)
......@@ -1196,8 +1142,7 @@ get_access_flags_from_decl (decl)
}
static tree
make_field_value (fdecl)
tree fdecl;
make_field_value (tree fdecl)
{
tree finit;
int flags;
......@@ -1241,8 +1186,7 @@ make_field_value (fdecl)
}
static tree
make_method_value (mdecl)
tree mdecl;
make_method_value (tree mdecl)
{
static int method_name_count = 0;
tree minit;
......@@ -1318,8 +1262,7 @@ make_method_value (mdecl)
}
static tree
get_dispatch_vector (type)
tree type;
get_dispatch_vector (tree type)
{
tree vtable = TYPE_VTABLE (type);
if (vtable == NULL)
......@@ -1350,8 +1293,7 @@ get_dispatch_vector (type)
}
static tree
get_dispatch_table (type, this_class_addr)
tree type, this_class_addr;
get_dispatch_table (tree type, tree this_class_addr)
{
int abstract_p = CLASS_ABSTRACT (TYPE_NAME (type));
tree vtable = get_dispatch_vector (type);
......@@ -1426,8 +1368,7 @@ get_dispatch_table (type, this_class_addr)
}
void
make_class_data (type)
tree type;
make_class_data (tree type)
{
tree decl, cons, temp;
tree field, fields_decl;
......@@ -1685,7 +1626,7 @@ make_class_data (type)
}
void
finish_class ()
finish_class (void)
{
tree method;
tree type_methods = TYPE_METHODS (current_class);
......@@ -1729,8 +1670,7 @@ finish_class ()
return 0 if we cannot assume that CLASS is compiled.
Returns 1 for primitive and 0 for array types. */
int
is_compiled_class (class)
tree class;
is_compiled_class (tree class)
{
int seen_in_zip;
if (TREE_CODE (class) == POINTER_TYPE)
......@@ -1776,8 +1716,7 @@ is_compiled_class (class)
/* Build a VAR_DECL for the dispatch table (vtable) for class TYPE. */
tree
build_dtable_decl (type)
tree type;
build_dtable_decl (tree type)
{
tree dtype;
......@@ -1835,8 +1774,7 @@ build_dtable_decl (type)
fields inherited from SUPER_CLASS. */
void
push_super_field (this_class, super_class)
tree this_class, super_class;
push_super_field (tree this_class, tree super_class)
{
tree base_decl;
/* Don't insert the field if we're just re-laying the class out. */
......@@ -1853,9 +1791,7 @@ push_super_field (this_class, super_class)
/* Handle the different manners we may have to lay out a super class. */
static tree
maybe_layout_super_class (super_class, this_class)
tree super_class;
tree this_class;
maybe_layout_super_class (tree super_class, tree this_class)
{
if (TREE_CODE (super_class) == RECORD_TYPE)
{
......@@ -1886,8 +1822,7 @@ maybe_layout_super_class (super_class, this_class)
}
void
layout_class (this_class)
tree this_class;
layout_class (tree this_class)
{
tree super_class = CLASSTYPE_SUPER (this_class);
tree field;
......@@ -1990,8 +1925,7 @@ layout_class (this_class)
}
void
layout_class_methods (this_class)
tree this_class;
layout_class_methods (tree this_class)
{
tree method_decl, dtable_count;
tree super_class;
......@@ -2028,8 +1962,8 @@ layout_class_methods (this_class)
DTABLE_COUNT. Also mangle the method's name. */
tree
layout_class_method (this_class, super_class, method_decl, dtable_count)
tree this_class, super_class, method_decl, dtable_count;
layout_class_method (tree this_class, tree super_class,
tree method_decl, tree dtable_count)
{
tree method_name = DECL_NAME (method_decl);
......@@ -2087,7 +2021,7 @@ layout_class_method (this_class, super_class, method_decl, dtable_count)
}
void
register_class ()
register_class (void)
{
/* END does not need to be registered with the garbage collector
because it always points into the list given by REGISTERED_CLASS,
......@@ -2114,7 +2048,7 @@ register_class ()
class in this file. */
void
emit_register_classes ()
emit_register_classes (void)
{
/* ??? This isn't quite the correct test. We also have to know
that the target is using gcc's crtbegin/crtend objects rather
......@@ -2205,7 +2139,7 @@ build_method_symbols_entry (tree method)
/* Emit the offset symbols table for indirect virtual dispatch. */
void
emit_offset_symbol_table ()
emit_offset_symbol_table (void)
{
tree method_list, method, table, list, null_symbol;
tree otable_bound, otable_array_type;
......@@ -2260,7 +2194,7 @@ emit_offset_symbol_table ()
}
void
init_class_processing ()
init_class_processing (void)
{
registerClass_libfunc = gen_rtx_SYMBOL_REF (Pmode, "_Jv_RegisterClass");
registerResource_libfunc =
......@@ -2278,17 +2212,14 @@ static int java_treetreehash_compare (const void *, const void *);
#define JAVA_TREEHASHHASH_H(t) (htab_hash_pointer (t))
static hashval_t
java_treetreehash_hash (k_p)
const void *k_p;
java_treetreehash_hash (const void *k_p)
{
struct treetreehash_entry *k = (struct treetreehash_entry *) k_p;
return JAVA_TREEHASHHASH_H (k->key);
}
static int
java_treetreehash_compare (k1_p, k2_p)
const void * k1_p;
const void * k2_p;
java_treetreehash_compare (const void * k1_p, const void * k2_p)
{
struct treetreehash_entry * k1 = (struct treetreehash_entry *) k1_p;
tree k2 = (tree) k2_p;
......@@ -2296,9 +2227,7 @@ java_treetreehash_compare (k1_p, k2_p)
}
tree
java_treetreehash_find (ht, t)
htab_t ht;
tree t;
java_treetreehash_find (htab_t ht, tree t)
{
struct treetreehash_entry *e;
hashval_t hv = JAVA_TREEHASHHASH_H (t);
......@@ -2310,9 +2239,7 @@ java_treetreehash_find (ht, t)
}
tree *
java_treetreehash_new (ht, t)
htab_t ht;
tree t;
java_treetreehash_new (htab_t ht, tree t)
{
void **e;
struct treetreehash_entry *tthe;
......@@ -2331,9 +2258,7 @@ java_treetreehash_new (ht, t)
}
htab_t
java_treetreehash_create (size, gc)
size_t size;
int gc;
java_treetreehash_create (size_t size, int gc)
{
if (gc)
return htab_create_ggc (size, java_treetreehash_hash,
......
......@@ -41,11 +41,7 @@ static tree build_constant_data_ref (void);
/* Set the INDEX'th constant in CPOOL to have the given TAG and VALUE. */
static void
set_constant_entry (cpool, index, tag, value)
CPool *cpool;
int index;
int tag;
jword value;
set_constant_entry (CPool *cpool, int index, int tag, jword value)
{
if (cpool->data == NULL)
{
......@@ -73,10 +69,7 @@ set_constant_entry (cpool, index, tag, value)
/* Find (or create) a constant pool entry matching TAG and VALUE. */
int
find_constant1 (cpool, tag, value)
CPool *cpool;
int tag;
jword value;
find_constant1 (CPool *cpool, int tag, jword value)
{
int i;
for (i = cpool->count; --i > 0; )
......@@ -92,10 +85,7 @@ find_constant1 (cpool, tag, value)
/* Find a double-word constant pool entry matching TAG and WORD1/WORD2. */
int
find_constant2 (cpool, tag, word1, word2)
CPool *cpool;
int tag;
jword word1, word2;
find_constant2 (CPool *cpool, int tag, jword word1, jword word2)
{
int i;
for (i = cpool->count - 1; --i > 0; )
......@@ -112,10 +102,7 @@ find_constant2 (cpool, tag, word1, word2)
}
static int
find_tree_constant (cpool, tag, value)
CPool *cpool;
int tag;
tree value;
find_tree_constant (CPool *cpool, int tag, tree value)
{
int i;
for (i = cpool->count; --i > 0; )
......@@ -131,9 +118,7 @@ find_tree_constant (cpool, tag, value)
int
find_utf8_constant (cpool, name)
CPool *cpool;
tree name;
find_utf8_constant (CPool *cpool, tree name)
{
if (name == NULL_TREE)
return 0;
......@@ -141,10 +126,7 @@ find_utf8_constant (cpool, name)
}
static int
find_class_or_string_constant (cpool, tag, name)
CPool *cpool;
int tag;
tree name;
find_class_or_string_constant (CPool *cpool, int tag, tree name)
{
jword j = find_utf8_constant (cpool, name);
int i;
......@@ -159,9 +141,7 @@ find_class_or_string_constant (cpool, tag, name)
}
int
find_class_constant (cpool, type)
CPool *cpool;
tree type;
find_class_constant (CPool *cpool, tree type)
{
return find_class_or_string_constant (cpool, CONSTANT_Class,
build_internal_class_name (type));
......@@ -170,9 +150,7 @@ find_class_constant (cpool, type)
/* Allocate a CONSTANT_string entry given a STRING_CST. */
int
find_string_constant (cpool, string)
CPool *cpool;
tree string;
find_string_constant (CPool *cpool, tree string)
{
string = get_identifier (TREE_STRING_POINTER (string));
return find_class_or_string_constant (cpool, CONSTANT_String, string);
......@@ -183,10 +161,7 @@ find_string_constant (cpool, string)
Return its index in the constant pool CPOOL. */
static int
find_name_and_type_constant (cpool, name, type)
CPool *cpool;
tree name;
tree type;
find_name_and_type_constant (CPool *cpool, tree name, tree type)
{
int name_index = find_utf8_constant (cpool, name);
int type_index = find_utf8_constant (cpool, build_java_signature (type));
......@@ -198,9 +173,7 @@ find_name_and_type_constant (cpool, name, type)
Return its index in the constant pool CPOOL. */
int
find_fieldref_index (cpool, decl)
CPool *cpool;
tree decl;
find_fieldref_index (CPool *cpool, tree decl)
{
int class_index = find_class_constant (cpool, DECL_CONTEXT (decl));
int name_type_index
......@@ -213,18 +186,13 @@ find_fieldref_index (cpool, decl)
Return its index in the constant pool CPOOL. */
int
find_methodref_index (cpool, decl)
CPool *cpool;
tree decl;
find_methodref_index (CPool *cpool, tree decl)
{
return find_methodref_with_class_index (cpool, decl, DECL_CONTEXT (decl));
}
int
find_methodref_with_class_index (cpool, decl, mclass)
CPool *cpool;
tree decl;
tree mclass;
find_methodref_with_class_index (CPool *cpool, tree decl, tree mclass)
{
int class_index = find_class_constant (cpool, mclass);
tree name = DECL_CONSTRUCTOR_P (decl) ? init_identifier_node
......@@ -248,8 +216,7 @@ find_methodref_with_class_index (cpool, decl, mclass)
constant pool. Includes the 2-byte constant_pool_count. */
int
count_constant_pool_bytes (cpool)
CPool *cpool;
count_constant_pool_bytes (CPool *cpool)
{
int size = 2;
int i = 1;
......@@ -294,10 +261,7 @@ count_constant_pool_bytes (cpool)
The length of BUFFER is LENGTH, which must match the needed length. */
void
write_constant_pool (cpool, buffer, length)
CPool *cpool;
unsigned char *buffer;
int length;
write_constant_pool (CPool *cpool, unsigned char *buffer, int length)
{
unsigned char *ptr = buffer;
int i = 1;
......@@ -348,8 +312,7 @@ CPool *outgoing_cpool;
static GTY(()) tree tag_nodes[13];
static tree
get_tag_node (tag)
int tag;
get_tag_node (int tag)
{
/* A Cache for build_int_2 (CONSTANT_XXX, 0). */
......@@ -365,9 +328,7 @@ get_tag_node (tag)
Returns the index of the entry. */
int
alloc_name_constant (tag, name)
int tag;
tree name;
alloc_name_constant (int tag, tree name)
{
return find_tree_constant (outgoing_cpool, tag, name);
}
......@@ -375,8 +336,7 @@ alloc_name_constant (tag, name)
/* Build an identifier for the internal name of reference type TYPE. */
tree
build_internal_class_name (type)
tree type;
build_internal_class_name (tree type)
{
tree name;
if (TYPE_ARRAY_P (type))
......@@ -394,8 +354,7 @@ build_internal_class_name (type)
/* Look for a CONSTANT_Class entry for CLAS, creating a new one if needed. */
int
alloc_class_constant (clas)
tree clas;
alloc_class_constant (tree clas)
{
tree class_name = build_internal_class_name (clas);
......@@ -408,7 +367,7 @@ alloc_class_constant (clas)
/* Return a reference to the data array of the current constant pool. */
static tree
build_constant_data_ref ()
build_constant_data_ref (void)
{
tree cpool_data_ref = NULL_TREE;
......@@ -433,8 +392,7 @@ build_constant_data_ref ()
/* Get the pointer value at the INDEX'th element of the constant pool. */
tree
build_ref_from_constant_pool (index)
int index;
build_ref_from_constant_pool (int index)
{
tree t = build_constant_data_ref ();
index *= int_size_in_bytes (ptr_type_node);
......@@ -447,7 +405,7 @@ build_ref_from_constant_pool (index)
Should only be called at top-level, since it may emit declarations. */
tree
build_constants_constructor ()
build_constants_constructor (void)
{
tree tags_value, data_value;
tree cons;
......
......@@ -93,7 +93,7 @@ int is_class_level = 0;
int current_pc;
void
indent ()
indent (void)
{
register unsigned i;
......@@ -103,9 +103,7 @@ indent ()
#endif /* defined(DEBUG_JAVA_BINDING_LEVELS) */
static tree
push_jvm_slot (index, decl)
int index;
tree decl;
push_jvm_slot (int index, tree decl)
{
struct rtx_def *rtl = NULL;
tree type = TREE_TYPE (decl);
......@@ -152,11 +150,7 @@ push_jvm_slot (index, decl)
is returned, then updated is set to true. */
static tree
check_local_named_variable (best, decl, pc, updated)
tree best;
tree decl;
int pc;
int *updated;
check_local_named_variable (tree best, tree decl, int pc, int *updated)
{
if (pc >= DECL_LOCAL_START_PC (decl)
&& pc < DECL_LOCAL_END_PC (decl))
......@@ -177,10 +171,7 @@ check_local_named_variable (best, decl, pc, updated)
than 'best', return 'decl'. Otherwise return 'best'. */
static tree
check_local_unnamed_variable (best, decl, type)
tree best;
tree decl;
tree type;
check_local_unnamed_variable (tree best, tree decl, tree type)
{
if (TREE_TYPE (decl) == type
|| (TREE_CODE (TREE_TYPE (decl)) == TREE_CODE (type)
......@@ -204,10 +195,7 @@ check_local_unnamed_variable (best, decl, type)
If there is no existing matching decl, allocate one. */
tree
find_local_variable (index, type, pc)
int index;
tree type;
int pc;
find_local_variable (int index, tree type, int pc)
{
tree decl = TREE_VEC_ELT (decl_map, index);
tree best = NULL_TREE;
......@@ -253,9 +241,7 @@ find_local_variable (index, type, pc)
/* Same as find_local_index, except that INDEX is a stack index. */
tree
find_stack_slot (index, type)
int index;
tree type;
find_stack_slot (int index, tree type)
{
return find_local_variable (index + DECL_MAX_LOCALS (current_function_decl),
type, -1);
......@@ -341,9 +327,7 @@ tree java_global_trees[JTI_MAX];
types shorter than int. */
static tree
push_promoted_type (name, actual_type)
const char *name;
tree actual_type;
push_promoted_type (const char *name, tree actual_type)
{
tree type = make_node (TREE_CODE (actual_type));
#if 1
......@@ -373,13 +357,12 @@ push_promoted_type (name, actual_type)
ATTRS is nonzero, use that for the function's attribute list. */
tree
builtin_function (name, type, function_code, class, library_name, attrs)
const char *name;
tree type;
int function_code;
enum built_in_class class;
const char *library_name;
tree attrs ATTRIBUTE_UNUSED;
builtin_function (const char *name,
tree type,
int function_code,
enum built_in_class class,
const char *library_name,
tree attrs ATTRIBUTE_UNUSED)
{
tree decl = build_decl (FUNCTION_DECL, get_identifier (name), type);
DECL_EXTERNAL (decl) = 1;
......@@ -395,8 +378,7 @@ builtin_function (name, type, function_code, class, library_name, attrs)
/* Return tree that represents a vtable for a primitive array. */
static tree
create_primitive_vtable (name)
const char *name;
create_primitive_vtable (const char *name)
{
tree r;
char buf[50];
......@@ -408,7 +390,7 @@ create_primitive_vtable (name)
}
void
java_init_decl_processing ()
java_init_decl_processing (void)
{
register tree endlink;
tree field = NULL_TREE;
......@@ -952,8 +934,7 @@ java_init_decl_processing ()
or return 0 if it is undefined. */
tree
lookup_name (name)
tree name;
lookup_name (tree name)
{
register tree val;
if (current_binding_level != global_binding_level
......@@ -968,8 +949,7 @@ lookup_name (name)
the previous one if its the parameter level. */
static tree
lookup_name_current_level (name)
tree name;
lookup_name_current_level (tree name)
{
register tree t;
......@@ -989,8 +969,7 @@ lookup_name_current_level (name)
/* Use a binding level to record a labeled block declaration */
void
push_labeled_block (lb)
tree lb;
push_labeled_block (tree lb)
{
register tree name = DECL_NAME (LABELED_BLOCK_LABEL (lb));
register struct binding_level *b = current_binding_level;
......@@ -1006,7 +985,7 @@ push_labeled_block (lb)
labeled block */
void
pop_labeled_block ()
pop_labeled_block (void)
{
struct binding_level *b = current_binding_level;
tree label = b->names;
......@@ -1031,8 +1010,7 @@ pop_labeled_block ()
to agree with what X says. */
tree
pushdecl (x)
tree x;
pushdecl (tree x)
{
register tree t;
register tree name = DECL_NAME (x);
......@@ -1150,8 +1128,7 @@ pushdecl (x)
}
void
pushdecl_force_head (x)
tree x;
pushdecl_force_head (tree x)
{
current_binding_level->names = x;
}
......@@ -1159,8 +1136,7 @@ pushdecl_force_head (x)
/* Like pushdecl, only it places X in GLOBAL_BINDING_LEVEL, if appropriate. */
tree
pushdecl_top_level (x)
tree x;
pushdecl_top_level (tree x)
{
register tree t;
register struct binding_level *b = current_binding_level;
......@@ -1174,7 +1150,7 @@ pushdecl_top_level (x)
/* Nonzero if we are currently in the global binding level. */
int
global_bindings_p ()
global_bindings_p (void)
{
return current_binding_level == global_binding_level;
}
......@@ -1185,7 +1161,7 @@ global_bindings_p ()
store the result back using `storedecls' or you will lose. */
tree
getdecls ()
getdecls (void)
{
return current_binding_level->names;
}
......@@ -1193,15 +1169,14 @@ getdecls ()
/* Create a new `struct binding_level'. */
static struct binding_level *
make_binding_level ()
make_binding_level (void)
{
/* NOSTRICT */
return xmalloc (sizeof (struct binding_level));
}
void
pushlevel (unused)
int unused ATTRIBUTE_UNUSED;
pushlevel (int unused ATTRIBUTE_UNUSED)
{
register struct binding_level *newlevel = NULL_BINDING_LEVEL;
......@@ -1257,10 +1232,7 @@ pushlevel (unused)
them into the BLOCK. */
tree
poplevel (keep, reverse, functionbody)
int keep;
int reverse;
int functionbody;
poplevel (int keep, int reverse, int functionbody)
{
register tree link;
/* The chain of decls was accumulated in reverse order.
......@@ -1464,8 +1436,7 @@ poplevel (keep, reverse, functionbody)
}
void
maybe_pushlevels (pc)
int pc;
maybe_pushlevels (int pc)
{
#if defined(DEBUG_JAVA_BINDING_LEVELS)
current_pc = pc;
......@@ -1507,8 +1478,7 @@ maybe_pushlevels (pc)
}
void
maybe_poplevels (pc)
int pc;
maybe_poplevels (int pc)
{
#if defined(DEBUG_JAVA_BINDING_LEVELS)
current_pc = pc;
......@@ -1529,8 +1499,7 @@ maybe_poplevels (pc)
range is forcibly terminated when that exception ends. */
void
force_poplevels (start_pc)
int start_pc;
force_poplevels (int start_pc)
{
while (current_binding_level->start_pc > start_pc)
{
......@@ -1548,8 +1517,7 @@ force_poplevels (start_pc)
to handle the BLOCK node inside the BIND_EXPR. */
void
insert_block (block)
tree block;
insert_block (tree block)
{
TREE_USED (block) = 1;
current_binding_level->blocks
......@@ -1560,8 +1528,7 @@ insert_block (block)
(the one we are currently in). */
void
set_block (block)
register tree block;
set_block (tree block)
{
current_binding_level->this_block = block;
current_binding_level->names = chainon (current_binding_level->names,
......@@ -1573,8 +1540,7 @@ set_block (block)
/* integrate_decl_tree calls this function. */
void
java_dup_lang_specific_decl (node)
tree node;
java_dup_lang_specific_decl (tree node)
{
int lang_decl_size;
struct lang_decl *x;
......@@ -1589,8 +1555,7 @@ java_dup_lang_specific_decl (node)
}
void
give_name_to_locals (jcf)
JCF *jcf;
give_name_to_locals (JCF *jcf)
{
int i, n = DECL_LOCALVARIABLES_OFFSET (current_function_decl);
int code_offset = DECL_CODE_OFFSET (current_function_decl);
......@@ -1688,8 +1653,7 @@ give_name_to_locals (jcf)
}
tree
build_result_decl (fndecl)
tree fndecl;
build_result_decl (tree fndecl)
{
tree restype = TREE_TYPE (TREE_TYPE (fndecl));
tree result = DECL_RESULT (fndecl);
......@@ -1707,8 +1671,7 @@ build_result_decl (fndecl)
}
void
complete_start_java_method (fndecl)
tree fndecl;
complete_start_java_method (tree fndecl)
{
if (! flag_emit_class_files)
{
......@@ -1780,8 +1743,7 @@ complete_start_java_method (fndecl)
}
void
start_java_method (fndecl)
tree fndecl;
start_java_method (tree fndecl)
{
tree tem, *ptr;
int i;
......@@ -1840,7 +1802,7 @@ start_java_method (fndecl)
}
void
end_java_method ()
end_java_method (void)
{
tree fndecl = current_function_decl;
......@@ -1865,9 +1827,7 @@ end_java_method ()
/* Dump FUNCTION_DECL FN as tree dump PHASE. */
static void
dump_function (phase, fn)
enum tree_dump_index phase;
tree fn;
dump_function (enum tree_dump_index phase, tree fn)
{
FILE *stream;
int flags;
......@@ -1880,8 +1840,7 @@ dump_function (phase, fn)
}
}
void java_optimize_inline (fndecl)
tree fndecl;
void java_optimize_inline (tree fndecl)
{
if (flag_inline_trees)
{
......
......@@ -77,10 +77,7 @@ extern void indent ();
previous children have end_pc values that are too low. */
static struct eh_range *
find_handler_in_range (pc, range, child)
int pc;
struct eh_range *range;
register struct eh_range *child;
find_handler_in_range (int pc, struct eh_range *range, struct eh_range *child)
{
for (; child != NULL; child = child->next_sibling)
{
......@@ -99,8 +96,7 @@ find_handler_in_range (pc, range, child)
/* Find the inner-most handler that contains PC. */
struct eh_range *
find_handler (pc)
int pc;
find_handler (int pc)
{
struct eh_range *h;
if (pc >= cache_range_start)
......@@ -125,8 +121,7 @@ find_handler (pc)
/* Recursive helper routine for check_nested_ranges. */
static void
link_handler (range, outer)
struct eh_range *range, *outer;
link_handler (struct eh_range *range, struct eh_range *outer)
{
struct eh_range **ptr;
......@@ -208,7 +203,7 @@ link_handler (range, outer)
ensure that exception ranges are properly nested. */
void
handle_nested_ranges ()
handle_nested_ranges (void)
{
struct eh_range *ptr, *next;
......@@ -225,8 +220,7 @@ handle_nested_ranges ()
/* Free RANGE as well as its children and siblings. */
static void
free_eh_ranges (range)
struct eh_range *range;
free_eh_ranges (struct eh_range *range)
{
while (range)
{
......@@ -241,7 +235,7 @@ free_eh_ranges (range)
/* Called to re-initialize the exception machinery for a new method. */
void
method_init_exceptions ()
method_init_exceptions (void)
{
free_eh_ranges (&whole_range);
whole_range.start_pc = 0;
......@@ -267,10 +261,7 @@ method_init_exceptions ()
what the sorting counteracts. */
void
add_handler (start_pc, end_pc, handler, type)
int start_pc, end_pc;
tree handler;
tree type;
add_handler (int start_pc, int end_pc, tree handler, tree type)
{
struct eh_range *ptr, *prev = NULL, *h;
......@@ -306,8 +297,7 @@ add_handler (start_pc, end_pc, handler, type)
/* if there are any handlers for this range, issue start of region */
static void
expand_start_java_handler (range)
struct eh_range *range;
expand_start_java_handler (struct eh_range *range)
{
#if defined(DEBUG_JAVA_BINDING_LEVELS)
indent ();
......@@ -319,8 +309,7 @@ expand_start_java_handler (range)
}
tree
prepare_eh_table_type (type)
tree type;
prepare_eh_table_type (tree type)
{
tree exp;
......@@ -347,8 +336,7 @@ prepare_eh_table_type (type)
exception header. */
tree
build_exception_object_ref (type)
tree type;
build_exception_object_ref (tree type)
{
tree obj;
......@@ -365,8 +353,7 @@ build_exception_object_ref (type)
/* If there are any handlers for this range, isssue end of range,
and then all handler blocks */
static void
expand_end_java_handler (range)
struct eh_range *range;
expand_end_java_handler (struct eh_range *range)
{
tree handler = range->handlers;
force_poplevels (range->start_pc);
......@@ -398,9 +385,7 @@ expand_end_java_handler (range)
/* Recursive helper routine for maybe_start_handlers. */
static void
check_start_handlers (range, pc)
struct eh_range *range;
int pc;
check_start_handlers (struct eh_range *range, int pc)
{
if (range != NULL_EH_RANGE && range->start_pc == pc)
{
......@@ -417,9 +402,7 @@ static struct eh_range *current_range;
end_pc. */
void
maybe_start_try (start_pc, end_pc)
int start_pc;
int end_pc;
maybe_start_try (int start_pc, int end_pc)
{
struct eh_range *range;
if (! doing_eh (1))
......@@ -438,9 +421,7 @@ maybe_start_try (start_pc, end_pc)
start_pc. */
void
maybe_end_try (start_pc, end_pc)
int start_pc;
int end_pc;
maybe_end_try (int start_pc, int end_pc)
{
if (! doing_eh (1))
return;
......
......@@ -137,7 +137,7 @@ const unsigned char *linenumber_table;
int linenumber_count;
void
init_expr_processing()
init_expr_processing (void)
{
operand_type[21] = operand_type[54] = int_type_node;
operand_type[22] = operand_type[55] = long_type_node;
......@@ -147,8 +147,7 @@ init_expr_processing()
}
tree
java_truthvalue_conversion (expr)
tree expr;
java_truthvalue_conversion (tree expr)
{
/* It is simpler and generates better code to have only TRUTH_*_EXPR
or comparison expressions as truth values at this level.
......@@ -206,7 +205,7 @@ java_truthvalue_conversion (expr)
higher (or the same) index, but not lower. */
static void
flush_quick_stack ()
flush_quick_stack (void)
{
int stack_index = stack_pointer;
register tree prev, cur, next;
......@@ -242,8 +241,7 @@ flush_quick_stack ()
Return true on success, 0 on overflow. */
int
push_type_0 (type)
tree type;
push_type_0 (tree type)
{
int n_words;
type = promote_type (type);
......@@ -258,16 +256,14 @@ push_type_0 (type)
}
void
push_type (type)
tree type;
push_type (tree type)
{
if (! push_type_0 (type))
abort ();
}
static void
push_value (value)
tree value;
push_value (tree value)
{
tree type = TREE_TYPE (value);
if (TYPE_PRECISION (type) < 32 && INTEGRAL_TYPE_P (type))
......@@ -294,9 +290,7 @@ push_value (value)
On an error, *MESSAGEP is set to a freshly malloc'd error message. */
tree
pop_type_0 (type, messagep)
tree type;
char **messagep;
pop_type_0 (tree type, char **messagep)
{
int n_words;
tree t;
......@@ -355,8 +349,7 @@ pop_type_0 (type, messagep)
convertible to TYPE, otherwise call error. */
tree
pop_type (type)
tree type;
pop_type (tree type)
{
char *message = NULL;
type = pop_type_0 (type, &message);
......@@ -372,8 +365,7 @@ pop_type (type)
Handles array types and interfaces. */
int
can_widen_reference_to (source_type, target_type)
tree source_type, target_type;
can_widen_reference_to (tree source_type, tree target_type)
{
if (source_type == ptr_type_node || target_type == object_ptr_type_node)
return 1;
......@@ -449,8 +441,7 @@ can_widen_reference_to (source_type, target_type)
}
static tree
pop_value (type)
tree type;
pop_value (tree type)
{
type = pop_type (type);
if (quick_stack)
......@@ -470,8 +461,7 @@ pop_value (type)
/* Pop and discrad the top COUNT stack slots. */
static void
java_stack_pop (count)
int count;
java_stack_pop (int count)
{
while (count > 0)
{
......@@ -497,7 +487,7 @@ java_stack_pop (count)
/* Implement the 'swap' operator (to swap two top stack slots). */
static void
java_stack_swap ()
java_stack_swap (void)
{
tree type1, type2;
rtx temp;
......@@ -522,8 +512,7 @@ java_stack_swap ()
}
static void
java_stack_dup (size, offset)
int size, offset;
java_stack_dup (int size, int offset)
{
int low_index = stack_pointer - size - offset;
int dst_index;
......@@ -571,8 +560,7 @@ java_stack_dup (size, offset)
value stack. */
static void
build_java_athrow (node)
tree node;
build_java_athrow (tree node)
{
tree call;
......@@ -589,8 +577,7 @@ build_java_athrow (node)
/* Implementation for jsr/ret */
static void
build_java_jsr (target_pc, return_pc)
int target_pc, return_pc;
build_java_jsr (int target_pc, int return_pc)
{
tree where = lookup_label (target_pc);
tree ret = lookup_label (return_pc);
......@@ -604,8 +591,7 @@ build_java_jsr (target_pc, return_pc)
}
static void
build_java_ret (location)
tree location;
build_java_ret (tree location)
{
expand_computed_goto (location);
}
......@@ -613,8 +599,7 @@ build_java_ret (location)
/* Implementation of operations on array: new, load, store, length */
tree
decode_newarray_type (atype)
int atype;
decode_newarray_type (int atype)
{
switch (atype)
{
......@@ -633,8 +618,7 @@ decode_newarray_type (atype)
/* Map primitive type to the code used by OPCODE_newarray. */
int
encode_newarray_type (type)
tree type;
encode_newarray_type (tree type)
{
if (type == boolean_type_node)
return 4;
......@@ -660,8 +644,7 @@ encode_newarray_type (type)
ArrayIndexOfBoundsException exception handler. */
static tree
build_java_throw_out_of_bounds_exception (index)
tree index;
build_java_throw_out_of_bounds_exception (tree index)
{
tree node = build (CALL_EXPR, int_type_node,
build_address_of (soft_badarrayindex_node),
......@@ -674,8 +657,7 @@ build_java_throw_out_of_bounds_exception (index)
or value of the array NODE. May be used to implement some bytecodes. */
tree
build_java_array_length_access (node)
tree node;
build_java_array_length_access (tree node)
{
tree type = TREE_TYPE (node);
tree array_type = TREE_TYPE (type);
......@@ -710,9 +692,7 @@ build_java_array_length_access (node)
checks if we're not generating code. */
tree
java_check_reference (expr, check)
tree expr;
int check;
java_check_reference (tree expr, int check)
{
if (!flag_syntax_only && check)
{
......@@ -733,10 +713,7 @@ java_check_reference (expr, check)
/* Reference an object: just like an INDIRECT_REF, but with checking. */
tree
build_java_indirect_ref (type, expr, check)
tree type;
tree expr;
int check;
build_java_indirect_ref (tree type, tree expr, int check)
{
return build1 (INDIRECT_REF, type, java_check_reference (expr, check));
}
......@@ -747,8 +724,7 @@ build_java_indirect_ref (type, expr, check)
At this point, ARRAY should have been verified as an array. */
tree
build_java_arrayaccess (array, type, index)
tree array, type, index;
build_java_arrayaccess (tree array, tree type, tree index)
{
tree node, throw = NULL_TREE;
tree data_field;
......@@ -798,9 +774,7 @@ build_java_arrayaccess (array, type, index)
determine that no check is required. */
tree
build_java_arraystore_check (array, object)
tree array;
tree object;
build_java_arraystore_check (tree array, tree object)
{
tree check, element_type, source;
tree array_type_p = TREE_TYPE (array);
......@@ -871,9 +845,7 @@ build_java_arraystore_check (array, object)
As a side effect, it also makes sure that ARRAY_NODE is an array. */
static tree
build_java_check_indexed_type (array_node, indexed_type)
tree array_node;
tree indexed_type;
build_java_check_indexed_type (tree array_node, tree indexed_type)
{
tree elt_type;
......@@ -900,9 +872,7 @@ build_java_check_indexed_type (array_node, indexed_type)
of the array to create. */
tree
build_newarray (atype_value, length)
int atype_value;
tree length;
build_newarray (int atype_value, tree length)
{
tree type_arg;
......@@ -932,9 +902,7 @@ build_newarray (atype_value, length)
of the dimension. */
tree
build_anewarray (class_type, length)
tree class_type;
tree length;
build_anewarray (tree class_type, tree length)
{
tree type
= build_java_array_type (class_type,
......@@ -953,9 +921,7 @@ build_anewarray (class_type, length)
/* Return a node the evaluates 'new TYPE[LENGTH]'. */
tree
build_new_array (type, length)
tree type;
tree length;
build_new_array (tree type, tree length)
{
if (JPRIMITIVE_TYPE_P (type))
return build_newarray (encode_newarray_type (type), length);
......@@ -968,9 +934,7 @@ build_new_array (type, length)
dimensions. The argument list is NULL terminated. */
static void
expand_java_multianewarray (class_type, ndim)
tree class_type;
int ndim;
expand_java_multianewarray (tree class_type, int ndim)
{
int i;
tree args = build_tree_list( NULL_TREE, null_pointer_node );
......@@ -998,8 +962,7 @@ expand_java_multianewarray (class_type, ndim)
type. It is not necessary to generate this code if ARRAY is final. */
static void
expand_java_arraystore (rhs_type_node)
tree rhs_type_node;
expand_java_arraystore (tree rhs_type_node)
{
tree rhs_node = pop_value ((INTEGRAL_TYPE_P (rhs_type_node)
&& TYPE_PRECISION (rhs_type_node) <= 32) ?
......@@ -1034,8 +997,7 @@ expand_java_arraystore (rhs_type_node)
*/
static void
expand_java_arrayload (lhs_type_node )
tree lhs_type_node;
expand_java_arrayload (tree lhs_type_node )
{
tree load_node;
tree index_node = pop_value (int_type_node);
......@@ -1067,7 +1029,7 @@ expand_java_arrayload (lhs_type_node )
a NULL check on the array object. */
static void
expand_java_array_length ()
expand_java_array_length (void)
{
tree array = pop_value (ptr_type_node);
tree length = build_java_array_length_access (array);
......@@ -1079,9 +1041,7 @@ expand_java_array_length ()
either soft_monitorenter_node or soft_monitorexit_node. */
static tree
build_java_monitor (call, object)
tree call;
tree object;
build_java_monitor (tree call, tree object)
{
return (build (CALL_EXPR,
void_type_node,
......@@ -1093,9 +1053,7 @@ build_java_monitor (call, object)
/* Emit code for one of the PUSHC instructions. */
static void
expand_java_pushc (ival, type)
int ival;
tree type;
expand_java_pushc (int ival, tree type)
{
tree value;
if (type == ptr_type_node && ival == 0)
......@@ -1118,8 +1076,7 @@ expand_java_pushc (ival, type)
}
static void
expand_java_return (type)
tree type;
expand_java_return (tree type)
{
if (type == void_type_node)
expand_null_return ();
......@@ -1144,10 +1101,7 @@ expand_java_return (type)
}
static void
expand_load_internal (index, type, pc)
int index;
tree type;
int pc;
expand_load_internal (int index, tree type, int pc)
{
tree copy;
tree var = find_local_variable (index, type, pc);
......@@ -1170,14 +1124,12 @@ expand_load_internal (index, type, pc)
}
tree
build_address_of (value)
tree value;
build_address_of (tree value)
{
return build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (value)), value);
}
bool class_has_finalize_method (type)
tree type;
bool class_has_finalize_method (tree type)
{
tree super = CLASSTYPE_SUPER (type);
......@@ -1189,8 +1141,7 @@ bool class_has_finalize_method (type)
}
static void
expand_java_NEW (type)
tree type;
expand_java_NEW (tree type)
{
tree alloc_node;
......@@ -1211,8 +1162,7 @@ expand_java_NEW (type)
object. */
tree
build_get_class (value)
tree value;
build_get_class (tree value)
{
tree class_field = lookup_field (&dtable_type, get_identifier ("class"));
tree vtable_field = lookup_field (&object_type_node,
......@@ -1231,8 +1181,7 @@ build_get_class (value)
known. */
tree
build_instanceof (value, type)
tree value, type;
build_instanceof (tree value, tree type)
{
tree expr;
tree itype = TREE_TYPE (TREE_TYPE (soft_instanceof_node));
......@@ -1295,8 +1244,7 @@ build_instanceof (value, type)
}
static void
expand_java_INSTANCEOF (type)
tree type;
expand_java_INSTANCEOF (tree type)
{
tree value = pop_value (object_ptr_type_node);
value = build_instanceof (value, type);
......@@ -1304,8 +1252,7 @@ expand_java_INSTANCEOF (type)
}
static void
expand_java_CHECKCAST (type)
tree type;
expand_java_CHECKCAST (tree type)
{
tree value = pop_value (ptr_type_node);
value = build (CALL_EXPR, promote_type (type),
......@@ -1317,10 +1264,7 @@ expand_java_CHECKCAST (type)
}
static void
expand_iinc (local_var_index, ival, pc)
unsigned int local_var_index;
int ival;
int pc;
expand_iinc (unsigned int local_var_index, int ival, int pc)
{
tree local_var, res;
tree constant_value;
......@@ -1334,9 +1278,7 @@ expand_iinc (local_var_index, ival, pc)
tree
build_java_soft_divmod (op, type, op1, op2)
enum tree_code op;
tree type, op1, op2;
build_java_soft_divmod (enum tree_code op, tree type, tree op1, tree op2)
{
tree call = NULL;
tree arg1 = convert (type, op1);
......@@ -1384,9 +1326,7 @@ build_java_soft_divmod (op, type, op1, op2)
}
tree
build_java_binop (op, type, arg1, arg2)
enum tree_code op;
tree type, arg1, arg2;
build_java_binop (enum tree_code op, tree type, tree arg1, tree arg2)
{
tree mask;
switch (op)
......@@ -1465,8 +1405,7 @@ build_java_binop (op, type, arg1, arg2)
}
static void
expand_java_binop (type, op)
tree type; enum tree_code op;
expand_java_binop (tree type, enum tree_code op)
{
tree larg, rarg;
tree ltype = type;
......@@ -1494,9 +1433,7 @@ expand_java_binop (type, op)
class containing the field. */
tree
lookup_field (typep, name)
tree *typep;
tree name;
lookup_field (tree *typep, tree name)
{
if (CLASS_P (*typep) && !CLASS_LOADED_P (*typep))
{
......@@ -1554,8 +1491,7 @@ lookup_field (typep, name)
SELF_VALUE is NULL_TREE if looking for a static field. */
tree
build_field_ref (self_value, self_class, name)
tree self_value, self_class, name;
build_field_ref (tree self_value, tree self_class, tree name)
{
tree base_class = self_class;
tree field_decl = lookup_field (&base_class, name);
......@@ -1585,8 +1521,7 @@ build_field_ref (self_value, self_class, name)
}
tree
lookup_label (pc)
int pc;
lookup_label (int pc)
{
tree name;
char buf[32];
......@@ -1608,7 +1543,7 @@ lookup_label (pc)
labels, and try-catch-finally blocks label or temporary variables. */
tree
generate_name ()
generate_name (void)
{
static int l_number = 0;
char buff [32];
......@@ -1618,8 +1553,7 @@ generate_name ()
}
tree
create_label_decl (name)
tree name;
create_label_decl (tree name)
{
tree decl;
decl = build_decl (LABEL_DECL, name,
......@@ -1633,8 +1567,7 @@ create_label_decl (name)
char *instruction_bits;
static void
note_label (current_pc, target_pc)
int current_pc ATTRIBUTE_UNUSED, target_pc;
note_label (int current_pc ATTRIBUTE_UNUSED, int target_pc)
{
lookup_label (target_pc);
instruction_bits [target_pc] |= BCODE_JUMP_TARGET;
......@@ -1644,10 +1577,8 @@ note_label (current_pc, target_pc)
where CONDITION is one of one the compare operators. */
static void
expand_compare (condition, value1, value2, target_pc)
enum tree_code condition;
tree value1, value2;
int target_pc;
expand_compare (enum tree_code condition, tree value1, tree value2,
int target_pc)
{
tree target = lookup_label (target_pc);
tree cond = fold (build (condition, boolean_type_node, value1, value2));
......@@ -1659,10 +1590,7 @@ expand_compare (condition, value1, value2, target_pc)
/* Emit code for a TEST-type opcode. */
static void
expand_test (condition, type, target_pc)
enum tree_code condition;
tree type;
int target_pc;
expand_test (enum tree_code condition, tree type, int target_pc)
{
tree value1, value2;
flush_quick_stack ();
......@@ -1674,10 +1602,7 @@ expand_test (condition, type, target_pc)
/* Emit code for a COND-type opcode. */
static void
expand_cond (condition, type, target_pc)
enum tree_code condition;
tree type;
int target_pc;
expand_cond (enum tree_code condition, tree type, int target_pc)
{
tree value1, value2;
flush_quick_stack ();
......@@ -1689,8 +1614,7 @@ expand_cond (condition, type, target_pc)
}
static void
expand_java_goto (target_pc)
int target_pc;
expand_java_goto (int target_pc)
{
tree target_label = lookup_label (target_pc);
flush_quick_stack ();
......@@ -1699,7 +1623,7 @@ expand_java_goto (target_pc)
#if 0
static void
expand_java_call (target_pc, return_address)
expand_java_call (int target_pc, int return_address)
int target_pc, return_address;
{
tree target_label = lookup_label (target_pc);
......@@ -1710,8 +1634,7 @@ expand_java_call (target_pc, return_address)
}
static void
expand_java_ret (return_address)
tree return_address ATTRIBUTE_UNUSED;
expand_java_ret (tree return_address ATTRIBUTE_UNUSED)
{
warning ("ret instruction not implemented");
#if 0
......@@ -1723,8 +1646,7 @@ expand_java_ret (return_address)
#endif
static tree
pop_arguments (arg_types)
tree arg_types;
pop_arguments (tree arg_types)
{
if (arg_types == end_params_node)
return NULL_TREE;
......@@ -1747,8 +1669,7 @@ pop_arguments (arg_types)
(if it is needed) and then calls EXPR. */
tree
build_class_init (clas, expr)
tree clas, expr;
build_class_init (tree clas, tree expr)
{
tree init;
if (inherits_from_p (current_class, clas))
......@@ -1810,10 +1731,9 @@ build_class_init (clas, expr)
}
tree
build_known_method_ref (method, method_type, self_type,
method_signature, arg_list)
tree method, method_type ATTRIBUTE_UNUSED, self_type,
method_signature ATTRIBUTE_UNUSED, arg_list ATTRIBUTE_UNUSED;
build_known_method_ref (tree method, tree method_type ATTRIBUTE_UNUSED,
tree self_type, tree method_signature ATTRIBUTE_UNUSED,
tree arg_list ATTRIBUTE_UNUSED)
{
tree func;
if (is_compiled_class (self_type))
......@@ -1864,9 +1784,7 @@ build_known_method_ref (method, method_type, self_type,
}
tree
invoke_build_dtable (is_invoke_interface, arg_list)
int is_invoke_interface;
tree arg_list;
invoke_build_dtable (int is_invoke_interface, tree arg_list)
{
tree dtable, objectref;
......@@ -1894,8 +1812,7 @@ invoke_build_dtable (is_invoke_interface, arg_list)
otable_methods. If it has, the existing otable slot will be reused. */
int
get_offset_table_index (method)
tree method;
get_offset_table_index (tree method)
{
int i = 1;
tree method_list;
......@@ -1924,8 +1841,7 @@ get_offset_table_index (method)
}
tree
build_invokevirtual (dtable, method)
tree dtable, method;
build_invokevirtual (tree dtable, tree method)
{
tree func;
tree nativecode_ptr_ptr_type_node
......@@ -1971,8 +1887,7 @@ build_invokevirtual (dtable, method)
static GTY(()) tree class_ident;
tree
build_invokeinterface (dtable, method)
tree dtable, method;
build_invokeinterface (tree dtable, tree method)
{
tree lookup_arg;
tree interface;
......@@ -2032,10 +1947,7 @@ build_invokeinterface (dtable, method)
NARGS is the number of arguments, or -1 if not specified. */
static void
expand_invoke (opcode, method_ref_index, nargs)
int opcode;
int method_ref_index;
int nargs ATTRIBUTE_UNUSED;
expand_invoke (int opcode, int method_ref_index, int nargs ATTRIBUTE_UNUSED)
{
tree method_signature = COMPONENT_REF_SIGNATURE(&current_jcf->cpool, method_ref_index);
tree method_name = COMPONENT_REF_NAME (&current_jcf->cpool, method_ref_index);
......@@ -2163,8 +2075,7 @@ expand_invoke (opcode, method_ref_index, nargs)
a JNI function. */
tree
build_jni_stub (method)
tree method;
build_jni_stub (tree method)
{
tree jnifunc, call, args, body, lookup_arg, method_sig, arg_types;
tree jni_func_type, tem;
......@@ -2345,10 +2256,7 @@ build_jni_stub (method)
FIELD_REF_INDEX is an index into the constant pool. */
static void
expand_java_field_op (is_static, is_putting, field_ref_index)
int is_static;
int is_putting;
int field_ref_index;
expand_java_field_op (int is_static, int is_putting, int field_ref_index)
{
tree self_type =
get_class_constant (current_jcf,
......@@ -2420,8 +2328,7 @@ expand_java_field_op (is_static, is_putting, field_ref_index)
}
void
load_type_state (label)
tree label;
load_type_state (tree label)
{
int i;
tree vec = LABEL_TYPE_STATE (label);
......@@ -2436,9 +2343,7 @@ load_type_state (label)
placed here because it uses things defined locally in parse.y. */
static tree
case_identity (t, v)
tree t __attribute__ ((__unused__));
tree v;
case_identity (tree t __attribute__ ((__unused__)), tree v)
{
return v;
}
......@@ -2471,11 +2376,8 @@ get_primitive_array_vtable (tree elt)
}
struct rtx_def *
java_expand_expr (exp, target, tmode, modifier)
register tree exp;
rtx target;
enum machine_mode tmode;
int modifier; /* Actually an enum expand_modifier. */
java_expand_expr (tree exp, rtx target, enum machine_mode tmode,
int modifier /* Actually an enum expand_modifier. */)
{
tree current;
......@@ -2665,9 +2567,7 @@ java_expand_expr (exp, target, tmode, modifier)
instruction_bits[]. */
void
note_instructions (jcf, method)
JCF *jcf;
tree method;
note_instructions (JCF *jcf, tree method)
{
int PC;
unsigned char* byte_ops;
......@@ -2810,9 +2710,7 @@ note_instructions (jcf, method)
}
void
expand_byte_code (jcf, method)
JCF *jcf;
tree method;
expand_byte_code (JCF *jcf, tree method)
{
int PC;
int i;
......@@ -2921,9 +2819,7 @@ expand_byte_code (jcf, method)
}
static void
java_push_constant_from_pool (jcf, index)
JCF *jcf;
int index;
java_push_constant_from_pool (JCF *jcf, int index)
{
tree c;
if (JPOOL_TAG (jcf, index) == CONSTANT_String)
......@@ -2940,10 +2836,8 @@ java_push_constant_from_pool (jcf, index)
}
int
process_jvm_instruction (PC, byte_ops, length)
int PC;
const unsigned char* byte_ops;
long length ATTRIBUTE_UNUSED;
process_jvm_instruction (int PC, const unsigned char* byte_ops,
long length ATTRIBUTE_UNUSED)
{
const char *opname; /* Temporary ??? */
int oldpc = PC; /* PC at instruction start. */
......@@ -3255,9 +3149,7 @@ process_jvm_instruction (PC, byte_ops, length)
CODE_OFFSET. */
static unsigned char
peek_opcode_at_pc (jcf, code_offset, pc)
JCF *jcf;
int code_offset, pc;
peek_opcode_at_pc (JCF *jcf, int code_offset, int pc)
{
unsigned char opcode;
long absolute_offset = (long)JCF_TELL (jcf);
......@@ -3293,9 +3185,8 @@ peek_opcode_at_pc (jcf, code_offset, pc)
have allocated and filled properly. */
int
maybe_adjust_start_pc (jcf, code_offset, start_pc, slot)
struct JCF *jcf;
int code_offset, start_pc, slot;
maybe_adjust_start_pc (struct JCF *jcf, int code_offset,
int start_pc, int slot)
{
int first, index, opcode;
int pc, insn_pc;
......@@ -3398,8 +3289,7 @@ maybe_adjust_start_pc (jcf, code_offset, start_pc, slot)
*/
tree
force_evaluation_order (node)
tree node;
force_evaluation_order (tree node)
{
if (flag_syntax_only)
return node;
......@@ -3458,9 +3348,7 @@ force_evaluation_order (node)
method in order to emit initialization code for each test flag. */
static int
emit_init_test_initialization (entry, x)
void * * entry;
void * x ATTRIBUTE_UNUSED;
emit_init_test_initialization (void **entry, void *x ATTRIBUTE_UNUSED)
{
struct treetreehash_entry *ite = (struct treetreehash_entry *) *entry;
tree klass = build_class_ref (ite->key);
......
......@@ -254,8 +254,7 @@ static int decompiled = 0;
/* Return 1 if F is not Inf or NaN. */
static int
java_float_finite (f)
jfloat f;
java_float_finite (jfloat f)
{
union Word u;
u.f = f;
......@@ -268,8 +267,7 @@ java_float_finite (f)
/* Return 1 if D is not Inf or NaN. */
static int
java_double_finite (d)
jdouble d;
java_double_finite (jdouble d)
{
union DWord u;
u.d = d;
......@@ -281,9 +279,7 @@ java_double_finite (d)
/* Print a character, appropriately mangled for JNI. */
static void
jni_print_char (stream, ch)
FILE *stream;
int ch;
jni_print_char (FILE *stream, int ch)
{
if (! flag_jni)
jcf_print_char (stream, ch);
......@@ -345,10 +341,7 @@ print_name (FILE* stream, JCF* jcf, int name_index)
final separator. */
static void
print_base_classname (stream, jcf, index)
FILE *stream;
JCF *jcf;
int index;
print_base_classname (FILE *stream, JCF *jcf, int index)
{
int name_index = JPOOL_USHORT1 (jcf, index);
int len;
......@@ -379,10 +372,7 @@ print_base_classname (stream, jcf, index)
and 1 if STR is "greater" than NAME. */
static int
utf8_cmp (str, length, name)
const unsigned char *str;
int length;
const char *name;
utf8_cmp (const unsigned char *str, int length, const char *name)
{
const unsigned char *limit = str + length;
int i;
......@@ -513,9 +503,7 @@ static const char *const cxx_keywords[] =
Otherwise, return NULL. The return value is malloc()d. */
static char *
cxx_keyword_subst (str, length)
const unsigned char *str;
int length;
cxx_keyword_subst (const unsigned char *str, int length)
{
int last = ARRAY_SIZE (cxx_keywords);
int first = 0;
......@@ -562,9 +550,7 @@ cxx_keyword_subst (str, length)
/* Generate an access control keyword based on FLAGS. */
static void
generate_access (stream, flags)
FILE *stream;
JCF_u2 flags;
generate_access (FILE *stream, JCF_u2 flags)
{
if ((flags & ACC_VISIBILITY) == last_access)
return;
......@@ -594,9 +580,7 @@ generate_access (stream, flags)
/* See if NAME is already the name of a method. */
static int
name_is_method_p (name, length)
const unsigned char *name;
int length;
name_is_method_p (const unsigned char *name, int length)
{
struct method_name *p;
......@@ -611,11 +595,8 @@ name_is_method_p (name, length)
/* If there is already a method named NAME, whose signature is not
SIGNATURE, then return true. Otherwise return false. */
static int
overloaded_jni_method_exists_p (name, length, signature, sig_length)
const unsigned char *name;
int length;
const char *signature;
int sig_length;
overloaded_jni_method_exists_p (const unsigned char *name, int length,
const char *signature, int sig_length)
{
struct method_name *p;
......@@ -632,10 +613,7 @@ overloaded_jni_method_exists_p (name, length, signature, sig_length)
/* Get name of a field. This handles renamings due to C++ clash. */
static char *
get_field_name (jcf, name_index, flags)
JCF *jcf;
int name_index;
JCF_u2 flags;
get_field_name (JCF *jcf, int name_index, JCF_u2 flags)
{
unsigned char *name = JPOOL_UTF_DATA (jcf, name_index);
int length = JPOOL_UTF_LENGTH (jcf, name_index);
......@@ -667,11 +645,7 @@ get_field_name (jcf, name_index, flags)
/* Print a field name. Convenience function for use with
get_field_name. */
static void
print_field_name (stream, jcf, name_index, flags)
FILE *stream;
JCF *jcf;
int name_index;
JCF_u2 flags;
print_field_name (FILE *stream, JCF *jcf, int name_index, JCF_u2 flags)
{
char *override = get_field_name (jcf, name_index, flags);
......@@ -905,10 +879,8 @@ print_method_info (FILE *stream, JCF* jcf, int name_index, int sig_index,
signature. NAMEINDEX is the index of the field name; -1 for
`this'. OBJECTTYPE is the index of the object's type. */
static void
decompile_return_statement (out, jcf, methodtype, nameindex, objecttype)
FILE *out;
JCF *jcf;
int methodtype, nameindex, objecttype;
decompile_return_statement (FILE *out, JCF *jcf, int methodtype,
int nameindex, int objecttype)
{
int cast = 0;
int obj_name_len, method_name_len;
......@@ -1027,10 +999,7 @@ decompile_return_statement (out, jcf, methodtype, nameindex, objecttype)
/* Try to decompile a method body. Right now we just try to handle a
simple case that we can do. Expand as desired. */
static void
decompile_method (out, jcf, code_len)
FILE *out;
JCF *jcf;
int code_len;
decompile_method (FILE *out, JCF *jcf, int code_len)
{
const unsigned char *codes = jcf->read_ptr;
int index;
......@@ -1099,8 +1068,7 @@ decompile_method (out, jcf, code_len)
should probably be in hashtab.c to complement the existing string
hash function. */
static int
gcjh_streq (p1, p2)
const void *p1, *p2;
gcjh_streq (const void *p1, const void *p2)
{
return ! strcmp ((char *) p1, (char *) p2);
}
......@@ -1109,8 +1077,7 @@ gcjh_streq (p1, p2)
or 0 if not. CLNAME may be extracted from a signature, and can be
terminated with either `;' or NULL. */
static int
throwable_p (clname)
const unsigned char *clname;
throwable_p (const unsigned char *clname)
{
int length;
unsigned char *current;
......@@ -1209,10 +1176,8 @@ throwable_p (clname)
/* Print one piece of a signature. Returns pointer to next parseable
character on success, NULL on error. */
static const unsigned char *
decode_signature_piece (stream, signature, limit, need_space)
FILE *stream;
const unsigned char *signature, *limit;
int *need_space;
decode_signature_piece (FILE *stream, const unsigned char *signature,
const unsigned char *limit, int *need_space)
{
const char *ctype;
int array_depth = 0;
......@@ -1630,12 +1595,8 @@ print_mangled_classname (FILE *stream, JCF *jcf, const char *prefix, int index)
to an array, ignore it and don't print PREFIX. Returns 1 if
something was printed, 0 otherwise. */
static int
print_cxx_classname (stream, prefix, jcf, index, add_scope)
FILE *stream;
const char *prefix;
JCF *jcf;
int index;
int add_scope;
print_cxx_classname (FILE *stream, const char *prefix,
JCF *jcf, int index, int add_scope)
{
int name_index = JPOOL_USHORT1 (jcf, index);
int len, c;
......@@ -1674,9 +1635,7 @@ int written_class_count = 0;
/* Return name of superclass. If LEN is not NULL, fill it with length
of name. */
static const unsigned char *
super_class_name (derived_jcf, len)
JCF *derived_jcf;
int *len;
super_class_name (JCF *derived_jcf, int *len)
{
int supername_index = JPOOL_USHORT1 (derived_jcf, derived_jcf->super_class);
int supername_length = JPOOL_UTF_LENGTH (derived_jcf, supername_index);
......@@ -1704,10 +1663,7 @@ static struct include *all_includes = NULL;
/* Generate a #include. */
static void
print_include (out, utf8, len)
FILE *out;
const unsigned char *utf8;
int len;
print_include (FILE *out, const unsigned char *utf8, int len)
{
struct include *incl;
......@@ -1771,9 +1727,8 @@ static struct namelet root =
package or class name and links it into the tree. It does this
recursively. */
static void
add_namelet (name, name_limit, parent)
const unsigned char *name, *name_limit;
struct namelet *parent;
add_namelet (const unsigned char *name, const unsigned char *name_limit,
struct namelet *parent)
{
const unsigned char *p;
struct namelet *n = NULL, *np;
......@@ -1830,10 +1785,7 @@ add_namelet (name, name_limit, parent)
/* Print a single namelet. Destroys namelets while printing. */
static void
print_namelet (out, name, depth)
FILE *out;
struct namelet *name;
int depth;
print_namelet (FILE *out, struct namelet *name, int depth)
{
int i, term = 0;
struct namelet *c;
......@@ -1886,10 +1838,7 @@ print_namelet (out, name, depth)
we need decls. The signature argument can be a function
signature. */
static void
add_class_decl (out, jcf, signature)
FILE *out;
JCF *jcf;
JCF_u2 signature;
add_class_decl (FILE *out, JCF *jcf, JCF_u2 signature)
{
const unsigned char *s = JPOOL_UTF_DATA (jcf, signature);
int len = JPOOL_UTF_LENGTH (jcf, signature);
......@@ -1923,10 +1872,7 @@ add_class_decl (out, jcf, signature)
statically in libjava; we don't generate declarations for these.
This makes the generated headers a bit easier to read. */
static void
print_class_decls (out, jcf, self)
FILE *out;
JCF *jcf;
int self;
print_class_decls (FILE *out, JCF *jcf, int self)
{
/* Make sure to always add the current class to the list of things
that should be declared. */
......@@ -2244,14 +2190,14 @@ static const struct option options[] =
};
static void
usage ()
usage (void)
{
fprintf (stderr, "Try `gcjh --help' for more information.\n");
exit (1);
}
static void
help ()
help (void)
{
printf ("Usage: gcjh [OPTION]... CLASS...\n\n");
printf ("Generate C++ header files from .class files\n\n");
......@@ -2289,7 +2235,7 @@ help ()
}
static void
version ()
version (void)
{
printf ("gcjh (GCC) %s\n\n", version_string);
printf ("Copyright (C) 2002 Free Software Foundation, Inc.\n");
......
......@@ -56,7 +56,7 @@ static int print_dummies;
invocation. FIXME: we should change our API or just completely use
the one in mkdeps.h. */
void
jcf_dependency_reset ()
jcf_dependency_reset (void)
{
if (dep_out != NULL)
{
......@@ -73,8 +73,7 @@ jcf_dependency_reset ()
}
void
jcf_dependency_set_target (name)
const char *name;
jcf_dependency_set_target (const char *name)
{
/* We just handle this the same as an `add_target'. */
if (dependencies != NULL && name != NULL)
......@@ -82,16 +81,14 @@ jcf_dependency_set_target (name)
}
void
jcf_dependency_add_target (name)
const char *name;
jcf_dependency_add_target (const char *name)
{
if (dependencies != NULL)
deps_add_target (dependencies, name, 1);
}
void
jcf_dependency_set_dep_file (name)
const char *name;
jcf_dependency_set_dep_file (const char *name)
{
assert (dep_out != stdout);
if (dep_out)
......@@ -103,9 +100,7 @@ jcf_dependency_set_dep_file (name)
}
void
jcf_dependency_add_file (filename, system_p)
const char *filename;
int system_p;
jcf_dependency_add_file (const char *filename, int system_p)
{
if (! dependencies)
return;
......@@ -118,8 +113,7 @@ jcf_dependency_add_file (filename, system_p)
}
void
jcf_dependency_init (system_p)
int system_p;
jcf_dependency_init (int system_p)
{
assert (! dependencies);
system_files = system_p;
......@@ -127,13 +121,13 @@ jcf_dependency_init (system_p)
}
void
jcf_dependency_print_dummies ()
jcf_dependency_print_dummies (void)
{
print_dummies = 1;
}
void
jcf_dependency_write ()
jcf_dependency_write (void)
{
if (! dep_out)
return;
......
......@@ -800,14 +800,14 @@ static const struct option options[] =
};
static void
usage ()
usage (void)
{
fprintf (stderr, "Try `jcf-dump --help' for more information.\n");
exit (1);
}
static void
help ()
help (void)
{
printf ("Usage: jcf-dump [OPTION]... CLASS...\n\n");
printf ("Display contents of a class file in readable form.\n\n");
......@@ -830,7 +830,7 @@ help ()
}
static void
version ()
version (void)
{
printf ("jcf-dump (GCC) %s\n\n", version_string);
printf ("Copyright (C) 2002 Free Software Foundation, Inc.\n");
......
......@@ -106,9 +106,7 @@ static void load_inner_classes (tree);
/* Handle "SourceFile" attribute. */
static void
set_source_filename (jcf, index)
JCF *jcf;
int index;
set_source_filename (JCF *jcf, int index)
{
tree sfname_id = get_name_constant (jcf, index);
const char *sfname = IDENTIFIER_POINTER (sfname_id);
......@@ -223,9 +221,7 @@ set_source_filename (jcf, index)
#include "jcf-reader.c"
tree
parse_signature (jcf, sig_index)
JCF *jcf;
int sig_index;
parse_signature (JCF *jcf, int sig_index)
{
if (sig_index <= 0 || sig_index >= JPOOL_SIZE (jcf)
|| JPOOL_TAG (jcf, sig_index) != CONSTANT_Utf8)
......@@ -236,9 +232,7 @@ parse_signature (jcf, sig_index)
}
tree
get_constant (jcf, index)
JCF *jcf;
int index;
get_constant (JCF *jcf, int index)
{
tree value;
int tag;
......@@ -336,9 +330,7 @@ get_constant (jcf, index)
}
tree
get_name_constant (jcf, index)
JCF *jcf;
int index;
get_name_constant (JCF *jcf, int index)
{
tree name = get_constant (jcf, index);
......@@ -353,9 +345,7 @@ get_name_constant (jcf, index)
the outer context with the newly resolved innerclass. */
static void
handle_innerclass_attribute (count, jcf)
int count;
JCF *jcf;
handle_innerclass_attribute (int count, JCF *jcf)
{
int c = (count);
while (c--)
......@@ -391,9 +381,7 @@ handle_innerclass_attribute (count, jcf)
}
static tree
give_name_to_class (jcf, i)
JCF *jcf;
int i;
give_name_to_class (JCF *jcf, int i)
{
if (i <= 0 || i >= JPOOL_SIZE (jcf)
|| JPOOL_TAG (jcf, i) != CONSTANT_Class)
......@@ -420,7 +408,7 @@ give_name_to_class (jcf, i)
/* Get the class of the CONSTANT_Class whose constant pool index is I. */
tree
get_class_constant (JCF *jcf , int i)
get_class_constant (JCF *jcf, int i)
{
tree type;
if (i <= 0 || i >= JPOOL_SIZE (jcf)
......@@ -455,8 +443,7 @@ get_class_constant (JCF *jcf , int i)
define the class it is supposed to.) */
int
read_class (name)
tree name;
read_class (tree name)
{
JCF this_jcf, *jcf;
tree icv, class = NULL_TREE;
......@@ -548,9 +535,7 @@ read_class (name)
- and then perhaps rename read_class to load_class. FIXME */
void
load_class (class_or_name, verbose)
tree class_or_name;
int verbose;
load_class (tree class_or_name, int verbose)
{
tree name, saved;
int class_loaded;
......@@ -596,8 +581,7 @@ load_class (class_or_name, verbose)
/* Parse the .class file JCF. */
void
jcf_parse (jcf)
JCF* jcf;
jcf_parse (JCF* jcf)
{
int i, code;
......@@ -667,8 +651,7 @@ jcf_parse (jcf)
/* If we came across inner classes, load them now. */
static void
load_inner_classes (cur_class)
tree cur_class;
load_inner_classes (tree cur_class)
{
tree current;
for (current = DECL_INNER_CLASS_LIST (TYPE_NAME (cur_class)); current;
......@@ -683,13 +666,13 @@ load_inner_classes (cur_class)
}
void
init_outgoing_cpool ()
init_outgoing_cpool (void)
{
outgoing_cpool = ggc_alloc_cleared (sizeof (struct CPool));
}
static void
parse_class_file ()
parse_class_file (void)
{
tree method, field;
const char *save_input_filename = input_filename;
......@@ -799,9 +782,7 @@ parse_class_file ()
/* Parse a source file, as pointed by the current value of INPUT_FILENAME. */
static void
parse_source_file_1 (file, finput)
tree file;
FILE *finput;
parse_source_file_1 (tree file, FILE *finput)
{
int save_error_count = java_error_count;
/* Mark the file as parsed */
......@@ -833,7 +814,7 @@ parse_source_file_1 (file, finput)
/* Process a parsed source file, resolving names etc. */
static void
parse_source_file_2 ()
parse_source_file_2 (void)
{
int save_error_count = java_error_count;
java_complete_class (); /* Parse unsatisfied class decl. */
......@@ -841,7 +822,7 @@ parse_source_file_2 ()
}
static void
parse_source_file_3 ()
parse_source_file_3 (void)
{
int save_error_count = java_error_count;
java_check_circular_reference (); /* Check on circular references */
......@@ -852,15 +833,13 @@ parse_source_file_3 ()
}
void
add_predefined_file (name)
tree name;
add_predefined_file (tree name)
{
predef_filenames = tree_cons (NULL_TREE, name, predef_filenames);
}
int
predefined_filename_p (node)
tree node;
predefined_filename_p (tree node)
{
tree iter;
......@@ -873,8 +852,7 @@ predefined_filename_p (node)
}
void
java_parse_file (set_yydebug)
int set_yydebug ATTRIBUTE_UNUSED;
java_parse_file (int set_yydebug ATTRIBUTE_UNUSED)
{
int filename_count = 0;
char *list, *next;
......@@ -1229,7 +1207,7 @@ process_zip_dir (FILE *finput)
/* Initialization. */
void
init_jcf_parse ()
init_jcf_parse (void)
{
init_src_parse ();
}
......
......@@ -105,8 +105,7 @@ static int longest_path = 0;
static void
free_entry (entp)
struct entry **entp;
free_entry (struct entry **entp)
{
struct entry *e, *n;
......@@ -120,9 +119,7 @@ free_entry (entp)
}
static void
append_entry (entp, ent)
struct entry **entp;
struct entry *ent;
append_entry (struct entry **entp, struct entry *ent)
{
/* It doesn't matter if this is slow, since it is run only at
startup, and then infrequently. */
......@@ -139,10 +136,7 @@ append_entry (entp, ent)
}
static void
add_entry (entp, filename, is_system)
struct entry **entp;
const char *filename;
int is_system;
add_entry (struct entry **entp, const char *filename, int is_system)
{
int len;
struct entry *n;
......@@ -186,10 +180,7 @@ add_entry (entp, filename, is_system)
}
static void
add_path (entp, cp, is_system)
struct entry **entp;
const char *cp;
int is_system;
add_path (struct entry **entp, const char *cp, int is_system)
{
const char *startp, *endp;
......@@ -228,7 +219,7 @@ static int init_done = 0;
/* Initialize the path module. */
void
jcf_path_init ()
jcf_path_init (void)
{
char *cp;
char *try, sep[2];
......@@ -321,8 +312,7 @@ jcf_path_init ()
This overrides only the $CLASSPATH environment variable.
*/
void
jcf_path_classpath_arg (path)
const char *path;
jcf_path_classpath_arg (const char *path)
{
free_entry (&classpath_user);
add_path (&classpath_user, path, 0);
......@@ -331,8 +321,7 @@ jcf_path_classpath_arg (path)
/* Call this when -bootclasspath is seen on the command line.
*/
void
jcf_path_bootclasspath_arg (path)
const char *path;
jcf_path_bootclasspath_arg (const char *path)
{
free_entry (&sys_dirs);
add_path (&sys_dirs, path, 1);
......@@ -341,8 +330,7 @@ jcf_path_bootclasspath_arg (path)
/* Call this when -extdirs is seen on the command line.
*/
void
jcf_path_extdirs_arg (cp)
const char *cp;
jcf_path_extdirs_arg (const char *cp)
{
const char *startp, *endp;
......@@ -406,8 +394,7 @@ jcf_path_extdirs_arg (cp)
/* Call this when -I is seen on the command line. */
void
jcf_path_include_arg (path)
const char *path;
jcf_path_include_arg (const char *path)
{
add_entry (&include_dirs, path, 0);
}
......@@ -416,8 +403,7 @@ jcf_path_include_arg (path)
we provide a way to iterate through the sealed list. If PRINT is
true then we print the final class path to stderr. */
void
jcf_path_seal (print)
int print;
jcf_path_seal (int print)
{
struct entry *secondary;
......@@ -465,14 +451,13 @@ jcf_path_seal (print)
}
void *
jcf_path_start ()
jcf_path_start (void)
{
return (void *) sealed;
}
void *
jcf_path_next (x)
void *x;
jcf_path_next (void *x)
{
struct entry *ent = (struct entry *) x;
return (void *) ent->next;
......@@ -481,31 +466,28 @@ jcf_path_next (x)
/* We guarantee that the return path will either be a zip file, or it
will end with a directory separator. */
char *
jcf_path_name (x)
void *x;
jcf_path_name (void *x)
{
struct entry *ent = (struct entry *) x;
return ent->name;
}
int
jcf_path_is_zipfile (x)
void *x;
jcf_path_is_zipfile (void *x)
{
struct entry *ent = (struct entry *) x;
return (ent->flags & FLAG_ZIP);
}
int
jcf_path_is_system (x)
void *x;
jcf_path_is_system (void *x)
{
struct entry *ent = (struct entry *) x;
return (ent->flags & FLAG_SYSTEM);
}
int
jcf_path_max_len ()
jcf_path_max_len (void)
{
return longest_path;
}
......@@ -50,11 +50,8 @@ static void skip_attribute (JCF *, int);
#ifdef NEED_PEEK_ATTRIBUTE /* Not everyone uses this function */
static int
peek_attribute (jcf, attribute_number, peeked_name, peeked_name_length)
JCF *jcf;
int attribute_number;
const char *peeked_name;
int peeked_name_length;
peek_attribute (JCF *jcf, int attribute_number, const char *peeked_name,
int peeked_name_length)
{
int to_return = 0;
long absolute_offset = (long)JCF_TELL (jcf);
......@@ -92,9 +89,7 @@ peek_attribute (jcf, attribute_number, peeked_name, peeked_name_length)
#ifdef NEED_SKIP_ATTRIBUTE /* Not everyone uses this function */
static void
skip_attribute (jcf, number_of_attribute)
JCF *jcf;
int number_of_attribute;
skip_attribute (JCF *jcf, int number_of_attribute)
{
while (number_of_attribute--)
{
......
......@@ -352,10 +352,7 @@ static void append_gcj_attribute (struct jcf_partial *, tree);
static int CHECK_PUT (void *, struct jcf_partial *, int);
static int
CHECK_PUT (ptr, state, i)
void *ptr;
struct jcf_partial *state;
int i;
CHECK_PUT (void *ptr, struct jcf_partial *state, int i)
{
if ((unsigned char *) ptr < state->chunk->data
|| (unsigned char *) ptr + i > state->chunk->data + state->chunk->size)
......@@ -385,11 +382,8 @@ CHECK_PUT (ptr, state, i)
However, if DATA is NULL and SIZE>0, allocate a buffer as well. */
static struct chunk *
alloc_chunk (last, data, size, work)
struct chunk *last;
unsigned char *data;
int size;
struct obstack *work;
alloc_chunk (struct chunk *last, unsigned char *data,
int size, struct obstack *work)
{
struct chunk *chunk = (struct chunk *)
obstack_alloc (work, sizeof(struct chunk));
......@@ -409,8 +403,7 @@ alloc_chunk (last, data, size, work)
static int CHECK_OP (struct jcf_partial *);
static int
CHECK_OP (state)
struct jcf_partial *state;
CHECK_OP (struct jcf_partial *state)
{
if (state->bytecode.ptr > state->bytecode.limit)
abort ();
......@@ -422,10 +415,7 @@ CHECK_OP (state)
#endif
static unsigned char *
append_chunk (data, size, state)
unsigned char *data;
int size;
struct jcf_partial *state;
append_chunk (unsigned char *data, int size, struct jcf_partial *state)
{
state->chunk = alloc_chunk (state->chunk, data, size, state->chunk_obstack);
if (state->first == NULL)
......@@ -434,18 +424,14 @@ append_chunk (data, size, state)
}
static void
append_chunk_copy (data, size, state)
unsigned char *data;
int size;
struct jcf_partial *state;
append_chunk_copy (unsigned char *data, int size, struct jcf_partial *state)
{
unsigned char *ptr = append_chunk (NULL, size, state);
memcpy (ptr, data, size);
}
static struct jcf_block *
gen_jcf_label (state)
struct jcf_partial *state;
gen_jcf_label (struct jcf_partial *state)
{
struct jcf_block *block = (struct jcf_block *)
obstack_alloc (state->chunk_obstack, sizeof (struct jcf_block));
......@@ -456,8 +442,7 @@ gen_jcf_label (state)
}
static void
finish_jcf_block (state)
struct jcf_partial *state;
finish_jcf_block (struct jcf_partial *state)
{
struct jcf_block *block = state->last_block;
struct jcf_relocation *reloc;
......@@ -483,9 +468,7 @@ finish_jcf_block (state)
}
static void
define_jcf_label (label, state)
struct jcf_block *label;
struct jcf_partial *state;
define_jcf_label (struct jcf_block *label, struct jcf_partial *state)
{
if (state->last_block != NULL)
finish_jcf_block (state);
......@@ -500,8 +483,7 @@ define_jcf_label (label, state)
}
static struct jcf_block *
get_jcf_label_here (state)
struct jcf_partial *state;
get_jcf_label_here (struct jcf_partial *state)
{
if (state->last_block != NULL && BUFFER_LENGTH (&state->bytecode) == 0)
return state->last_block;
......@@ -516,9 +498,7 @@ get_jcf_label_here (state)
/* Note a line number entry for the current PC and given LINE. */
static void
put_linenumber (line, state)
int line;
struct jcf_partial *state;
put_linenumber (int line, struct jcf_partial *state)
{
struct jcf_block *label = get_jcf_label_here (state);
if (label->linenumber > 0)
......@@ -534,10 +514,8 @@ put_linenumber (line, state)
in the range (START_LABEL, END_LABEL). */
static struct jcf_handler *
alloc_handler (start_label, end_label, state)
struct jcf_block *start_label;
struct jcf_block *end_label;
struct jcf_partial *state;
alloc_handler (struct jcf_block *start_label, struct jcf_block *end_label,
struct jcf_partial *state)
{
struct jcf_handler *handler = (struct jcf_handler *)
obstack_alloc (state->chunk_obstack, sizeof (struct jcf_handler));
......@@ -576,9 +554,7 @@ struct localvar_info
((struct localvar_info**) state->localvars.ptr - localvar_buffer)
static void
localvar_alloc (decl, state)
tree decl;
struct jcf_partial *state;
localvar_alloc (tree decl, struct jcf_partial *state)
{
struct jcf_block *start_label = get_jcf_label_here (state);
int wide = TYPE_IS_WIDE (TREE_TYPE (decl));
......@@ -623,9 +599,7 @@ localvar_alloc (decl, state)
}
static void
localvar_free (decl, state)
tree decl;
struct jcf_partial *state;
localvar_free (tree decl, struct jcf_partial *state)
{
struct jcf_block *end_label = get_jcf_label_here (state);
int index = DECL_LOCAL_INDEX (decl);
......@@ -654,8 +628,7 @@ localvar_free (decl, state)
a field (FIELD_DECL or VAR_DECL, if static), as encoded in a .class file. */
static int
get_access_flags (decl)
tree decl;
get_access_flags (tree decl)
{
int flags = 0;
int isfield = TREE_CODE (decl) == FIELD_DECL || TREE_CODE (decl) == VAR_DECL;
......@@ -721,9 +694,7 @@ get_access_flags (decl)
/* Write the list of segments starting at CHUNKS to STREAM. */
static void
write_chunks (stream, chunks)
FILE* stream;
struct chunk *chunks;
write_chunks (FILE* stream, struct chunk *chunks)
{
for (; chunks != NULL; chunks = chunks->next)
fwrite (chunks->data, chunks->size, 1, stream);
......@@ -733,9 +704,7 @@ write_chunks (stream, chunks)
(Caller is responsible for doing NOTE_PUSH.) */
static void
push_constant1 (index, state)
HOST_WIDE_INT index;
struct jcf_partial *state;
push_constant1 (HOST_WIDE_INT index, struct jcf_partial *state)
{
RESERVE (3);
if (index < 256)
......@@ -754,9 +723,7 @@ push_constant1 (index, state)
(Caller is responsible for doing NOTE_PUSH.) */
static void
push_constant2 (index, state)
HOST_WIDE_INT index;
struct jcf_partial *state;
push_constant2 (HOST_WIDE_INT index, struct jcf_partial *state)
{
RESERVE (3);
OP1 (OPCODE_ldc2_w);
......@@ -767,9 +734,7 @@ push_constant2 (index, state)
Caller is responsible for doing NOTE_PUSH. */
static void
push_int_const (i, state)
HOST_WIDE_INT i;
struct jcf_partial *state;
push_int_const (HOST_WIDE_INT i, struct jcf_partial *state)
{
RESERVE(3);
if (i >= -1 && i <= 5)
......@@ -793,9 +758,8 @@ push_int_const (i, state)
}
static int
find_constant_wide (lo, hi, state)
HOST_WIDE_INT lo, hi;
struct jcf_partial *state;
find_constant_wide (HOST_WIDE_INT lo, HOST_WIDE_INT hi,
struct jcf_partial *state)
{
HOST_WIDE_INT w1, w2;
lshift_double (lo, hi, -32, 64, &w1, &w2, 1);
......@@ -807,9 +771,7 @@ find_constant_wide (lo, hi, state)
Return the index in the constant pool. */
static int
find_constant_index (value, state)
tree value;
struct jcf_partial *state;
find_constant_index (tree value, struct jcf_partial *state)
{
if (TREE_CODE (value) == INTEGER_CST)
{
......@@ -847,9 +809,7 @@ find_constant_index (value, state)
Caller is responsible for doing NOTE_PUSH. */
static void
push_long_const (lo, hi, state)
HOST_WIDE_INT lo, hi;
struct jcf_partial *state;
push_long_const (HOST_WIDE_INT lo, HOST_WIDE_INT hi, struct jcf_partial *state)
{
HOST_WIDE_INT highpart, dummy;
jint lowpart = WORD_TO_INT (lo);
......@@ -873,10 +833,7 @@ push_long_const (lo, hi, state)
}
static void
field_op (field, opcode, state)
tree field;
int opcode;
struct jcf_partial *state;
field_op (tree field, int opcode, struct jcf_partial *state)
{
int index = find_fieldref_index (&state->cpool, field);
RESERVE (3);
......@@ -889,9 +846,7 @@ field_op (field, opcode, state)
opcodes typically depend on the operand type. */
static int
adjust_typed_op (type, max)
tree type;
int max;
adjust_typed_op (tree type, int max)
{
switch (TREE_CODE (type))
{
......@@ -924,9 +879,7 @@ adjust_typed_op (type, max)
}
static void
maybe_wide (opcode, index, state)
int opcode, index;
struct jcf_partial *state;
maybe_wide (int opcode, int index, struct jcf_partial *state)
{
if (index >= 256)
{
......@@ -949,9 +902,7 @@ maybe_wide (opcode, index, state)
(The new words get inserted at stack[SP-size-offset].) */
static void
emit_dup (size, offset, state)
int size, offset;
struct jcf_partial *state;
emit_dup (int size, int offset, struct jcf_partial *state)
{
int kind;
if (size == 0)
......@@ -970,19 +921,14 @@ emit_dup (size, offset, state)
}
static void
emit_pop (size, state)
int size;
struct jcf_partial *state;
emit_pop (int size, struct jcf_partial *state)
{
RESERVE (1);
OP1 (OPCODE_pop - 1 + size);
}
static void
emit_iinc (var, value, state)
tree var;
HOST_WIDE_INT value;
struct jcf_partial *state;
emit_iinc (tree var, HOST_WIDE_INT value, struct jcf_partial *state)
{
int slot = DECL_LOCAL_INDEX (var);
......@@ -1004,10 +950,9 @@ emit_iinc (var, value, state)
}
static void
emit_load_or_store (var, opcode, state)
tree var; /* Variable to load from or store into. */
int opcode; /* Either OPCODE_iload or OPCODE_istore. */
struct jcf_partial *state;
emit_load_or_store (tree var, /* Variable to load from or store into. */
int opcode, /* Either OPCODE_iload or OPCODE_istore. */
struct jcf_partial *state)
{
tree type = TREE_TYPE (var);
int kind = adjust_typed_op (type, 4);
......@@ -1022,38 +967,29 @@ emit_load_or_store (var, opcode, state)
}
static void
emit_load (var, state)
tree var;
struct jcf_partial *state;
emit_load (tree var, struct jcf_partial *state)
{
emit_load_or_store (var, OPCODE_iload, state);
NOTE_PUSH (TYPE_IS_WIDE (TREE_TYPE (var)) ? 2 : 1);
}
static void
emit_store (var, state)
tree var;
struct jcf_partial *state;
emit_store (tree var, struct jcf_partial *state)
{
emit_load_or_store (var, OPCODE_istore, state);
NOTE_POP (TYPE_IS_WIDE (TREE_TYPE (var)) ? 2 : 1);
}
static void
emit_unop (opcode, type, state)
enum java_opcode opcode;
tree type ATTRIBUTE_UNUSED;
struct jcf_partial *state;
emit_unop (enum java_opcode opcode, tree type ATTRIBUTE_UNUSED,
struct jcf_partial *state)
{
RESERVE(1);
OP1 (opcode);
}
static void
emit_binop (opcode, type, state)
enum java_opcode opcode;
tree type;
struct jcf_partial *state;
emit_binop (enum java_opcode opcode, tree type, struct jcf_partial *state)
{
int size = TYPE_IS_WIDE (type) ? 2 : 1;
RESERVE(1);
......@@ -1062,11 +998,8 @@ emit_binop (opcode, type, state)
}
static void
emit_reloc (value, kind, target, state)
HOST_WIDE_INT value;
int kind;
struct jcf_block *target;
struct jcf_partial *state;
emit_reloc (HOST_WIDE_INT value, int kind,
struct jcf_block *target, struct jcf_partial *state)
{
struct jcf_relocation *reloc = (struct jcf_relocation *)
obstack_alloc (state->chunk_obstack, sizeof (struct jcf_relocation));
......@@ -1083,9 +1016,7 @@ emit_reloc (value, kind, target, state)
}
static void
emit_switch_reloc (label, state)
struct jcf_block *label;
struct jcf_partial *state;
emit_switch_reloc (struct jcf_block *label, struct jcf_partial *state)
{
emit_reloc (RELOCATION_VALUE_0, BLOCK_START_RELOC, label, state);
}
......@@ -1094,9 +1025,7 @@ emit_switch_reloc (label, state)
but re-uses an existing case reloc. */
static void
emit_case_reloc (reloc, state)
struct jcf_relocation *reloc;
struct jcf_partial *state;
emit_case_reloc (struct jcf_relocation *reloc, struct jcf_partial *state)
{
struct jcf_block *block = state->last_block;
reloc->next = block->u.relocations;
......@@ -1110,10 +1039,8 @@ emit_case_reloc (reloc, state)
The opcode is OPCODE, the inverted opcode is INV_OPCODE. */
static void
emit_if (target, opcode, inv_opcode, state)
struct jcf_block *target;
int opcode, inv_opcode;
struct jcf_partial *state;
emit_if (struct jcf_block *target, int opcode, int inv_opcode,
struct jcf_partial *state)
{
RESERVE(3);
OP1 (opcode);
......@@ -1122,9 +1049,7 @@ emit_if (target, opcode, inv_opcode, state)
}
static void
emit_goto (target, state)
struct jcf_block *target;
struct jcf_partial *state;
emit_goto (struct jcf_block *target, struct jcf_partial *state)
{
RESERVE(3);
OP1 (OPCODE_goto);
......@@ -1133,9 +1058,7 @@ emit_goto (target, state)
}
static void
emit_jsr (target, state)
struct jcf_block *target;
struct jcf_partial *state;
emit_jsr (struct jcf_block *target, struct jcf_partial *state)
{
RESERVE(3);
OP1 (OPCODE_jsr);
......@@ -1150,13 +1073,11 @@ emit_jsr (target, state)
may be able to optimize away GOTO TRUE_LABEL; TRUE_LABEL:) */
static void
generate_bytecode_conditional (exp, true_label, false_label,
true_branch_first, state)
tree exp;
struct jcf_block *true_label;
struct jcf_block *false_label;
int true_branch_first;
struct jcf_partial *state;
generate_bytecode_conditional (tree exp,
struct jcf_block *true_label,
struct jcf_block *false_label,
int true_branch_first,
struct jcf_partial *state)
{
tree exp0, exp1, type;
int save_SP = state->code_SP;
......@@ -1361,9 +1282,7 @@ generate_bytecode_conditional (exp, true_label, false_label,
emit label that is LIMIT). */
static void
call_cleanups (limit, state)
struct jcf_block *limit;
struct jcf_partial *state;
call_cleanups (struct jcf_block *limit, struct jcf_partial *state)
{
struct jcf_block *block = state->labeled_blocks;
for (; block != limit; block = block->next)
......@@ -1374,9 +1293,7 @@ call_cleanups (limit, state)
}
static void
generate_bytecode_return (exp, state)
tree exp;
struct jcf_partial *state;
generate_bytecode_return (tree exp, struct jcf_partial *state)
{
tree return_type = TREE_TYPE (TREE_TYPE (state->current_method));
int returns_void = TREE_CODE (return_type) == VOID_TYPE;
......@@ -1443,10 +1360,7 @@ generate_bytecode_return (exp, state)
TARGET is one of STACK_TARGET or IGNORE_TARGET. */
static void
generate_bytecode_insns (exp, target, state)
tree exp;
int target;
struct jcf_partial *state;
generate_bytecode_insns (tree exp, int target, struct jcf_partial *state)
{
tree type, arg;
enum java_opcode jopcode;
......@@ -2641,8 +2555,7 @@ generate_bytecode_insns (exp, target, state)
}
static void
perform_relocations (state)
struct jcf_partial *state;
perform_relocations (struct jcf_partial *state)
{
struct jcf_block *block;
struct jcf_relocation *reloc;
......@@ -2840,9 +2753,7 @@ perform_relocations (state)
}
static void
init_jcf_state (state, work)
struct jcf_partial *state;
struct obstack *work;
init_jcf_state (struct jcf_partial *state, struct obstack *work)
{
state->chunk_obstack = work;
state->first = state->chunk = NULL;
......@@ -2852,9 +2763,7 @@ init_jcf_state (state, work)
}
static void
init_jcf_method (state, method)
struct jcf_partial *state;
tree method;
init_jcf_method (struct jcf_partial *state, tree method)
{
state->current_method = method;
state->blocks = state->last_block = NULL;
......@@ -2875,8 +2784,7 @@ init_jcf_method (state, method)
}
static void
release_jcf_state (state)
struct jcf_partial *state;
release_jcf_state (struct jcf_partial *state)
{
CPOOL_FINISH (&state->cpool);
obstack_free (state->chunk_obstack, state->first);
......@@ -2888,9 +2796,7 @@ release_jcf_state (state)
static GTY(()) tree SourceFile_node;
static struct chunk *
generate_classfile (clas, state)
tree clas;
struct jcf_partial *state;
generate_classfile (tree clas, struct jcf_partial *state)
{
struct chunk *cpool_chunk;
const char *source_file, *s;
......@@ -3210,8 +3116,7 @@ generate_classfile (clas, state)
static GTY(()) tree Synthetic_node;
static unsigned char *
append_synthetic_attribute (state)
struct jcf_partial *state;
append_synthetic_attribute (struct jcf_partial *state)
{
unsigned char *ptr = append_chunk (NULL, 6, state);
int i;
......@@ -3228,9 +3133,7 @@ append_synthetic_attribute (state)
}
static void
append_gcj_attribute (state, class)
struct jcf_partial *state;
tree class;
append_gcj_attribute (struct jcf_partial *state, tree class)
{
unsigned char *ptr;
int i;
......@@ -3247,9 +3150,7 @@ append_gcj_attribute (state, class)
static tree InnerClasses_node;
static void
append_innerclasses_attribute (state, class)
struct jcf_partial *state;
tree class;
append_innerclasses_attribute (struct jcf_partial *state, tree class)
{
tree orig_decl = TYPE_NAME (class);
tree current, decl;
......@@ -3302,9 +3203,8 @@ append_innerclasses_attribute (state, class)
}
static void
append_innerclasses_attribute_entry (state, decl, name)
struct jcf_partial *state;
tree decl, name;
append_innerclasses_attribute_entry (struct jcf_partial *state,
tree decl, tree name)
{
int icii, icaf;
int ocii = 0, ini = 0;
......@@ -3328,8 +3228,7 @@ append_innerclasses_attribute_entry (state, decl, name)
}
static char *
make_class_file_name (clas)
tree clas;
make_class_file_name (tree clas)
{
const char *dname, *cname, *slash;
char *r;
......@@ -3396,8 +3295,7 @@ make_class_file_name (clas)
The output .class file name is make_class_file_name(CLAS). */
void
write_classfile (clas)
tree clas;
write_classfile (tree clas)
{
struct obstack *work = &temporary_obstack;
struct jcf_partial state[1];
......
......@@ -95,14 +95,14 @@ static const struct option options[] =
};
static void
usage ()
usage (void)
{
fprintf (stderr, "Try `jv-scan --help' for more information.\n");
exit (1);
}
static void
help ()
help (void)
{
printf ("Usage: jv-scan [OPTION]... FILE...\n\n");
printf ("Print useful information read from Java source files.\n\n");
......@@ -123,7 +123,7 @@ help ()
}
static void
version ()
version (void)
{
printf ("jv-scan (GCC) %s\n\n", version_string);
printf ("Copyright (C) 2002 Free Software Foundation, Inc.\n");
......@@ -264,8 +264,7 @@ warning (const char *s, ...)
}
void
gcc_obstack_init (obstack)
struct obstack *obstack;
gcc_obstack_init (struct obstack *obstack)
{
/* Let particular systems override the size of a chunk. */
#ifndef OBSTACK_CHUNK_SIZE
......
......@@ -40,8 +40,7 @@ struct obstack name_obstack;
struct obstack *mangle_obstack = &name_obstack;
void
gcc_obstack_init (obstack)
struct obstack *obstack;
gcc_obstack_init (struct obstack *obstack)
{
/* Let particular systems override the size of a chunk. */
#ifndef OBSTACK_CHUNK_SIZE
......@@ -157,8 +156,7 @@ main (int argc, char **argv)
static char *
do_mangle_classname (string)
const char *string;
do_mangle_classname (const char *string)
{
const char *ptr;
int count = 0;
......
......@@ -292,10 +292,8 @@ const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
/* Process an option that can accept a `no-' form.
Return 1 if option found, 0 otherwise. */
static int
process_option_with_no (p, table, table_size)
const char *p;
const struct string_option *table;
int table_size;
process_option_with_no (const char *p, const struct string_option *table,
int table_size)
{
int j;
......@@ -322,9 +320,7 @@ process_option_with_no (p, table, table_size)
* return 0, but do not complain if the option is not recognized.
*/
static int
java_decode_option (argc, argv)
int argc __attribute__ ((__unused__));
char **argv;
java_decode_option (int argc __attribute__ ((__unused__)), char **argv)
{
char *p = argv[0];
......@@ -509,8 +505,7 @@ java_decode_option (argc, argv)
FILE *finput;
static const char *
java_init (filename)
const char *filename;
java_init (const char *filename)
{
#if 0
extern int flag_minimal_debug;
......@@ -599,7 +594,7 @@ java_init (filename)
}
static void
java_finish ()
java_finish (void)
{
jcf_dependency_write ();
}
......@@ -617,9 +612,7 @@ static int decl_bufpos = 0;
It length is given by LEN; -1 means the string is nul-terminated. */
static void
put_decl_string (str, len)
const char *str;
int len;
put_decl_string (const char *str, int len)
{
if (len < 0)
len = strlen (str);
......@@ -643,8 +636,7 @@ put_decl_string (str, len)
/* Append to decl_buf a printable name for NODE. */
static void
put_decl_node (node)
tree node;
put_decl_node (tree node)
{
int was_pointer = 0;
if (TREE_CODE (node) == POINTER_TYPE)
......@@ -719,9 +711,7 @@ put_decl_node (node)
which is also called directly by java_print_error_function. */
const char *
lang_printable_name (decl, v)
tree decl;
int v __attribute__ ((__unused__));
lang_printable_name (tree decl, int v __attribute__ ((__unused__)))
{
decl_bufpos = 0;
put_decl_node (decl);
......@@ -733,9 +723,7 @@ lang_printable_name (decl, v)
space to the DECL name string -- With Leading Space. */
const char *
lang_printable_name_wls (decl, v)
tree decl;
int v __attribute__ ((__unused__));
lang_printable_name_wls (tree decl, int v __attribute__ ((__unused__)))
{
decl_bufpos = 1;
put_decl_node (decl);
......@@ -750,9 +738,8 @@ lang_printable_name_wls (decl, v)
static GTY(()) tree last_error_function_context;
static GTY(()) tree last_error_function;
static void
java_print_error_function (context, file)
diagnostic_context *context __attribute__((__unused__));
const char *file;
java_print_error_function (diagnostic_context *context ATTRIBUTE_UNUSED,
const char *file)
{
/* Don't print error messages with bogus function prototypes. */
if (inhibit_error_function_printing)
......@@ -796,14 +783,13 @@ java_print_error_function (context, file)
2, function prototypes are fully resolved and can be printed when
reporting errors. */
void lang_init_source (level)
int level;
void lang_init_source (int level)
{
inhibit_error_function_printing = (level == 1);
}
static void
java_init_options ()
java_init_options (void)
{
flag_bounds_check = 1;
flag_exceptions = 1;
......@@ -814,7 +800,7 @@ java_init_options ()
}
static bool
java_can_use_bit_fields_p ()
java_can_use_bit_fields_p (void)
{
/* The bit-field optimizations cause problems when generating class
files. */
......@@ -823,7 +809,7 @@ java_can_use_bit_fields_p ()
/* Post-switch processing. */
static bool
java_post_options ()
java_post_options (void)
{
/* Use tree inlining if possible. Function instrumentation is only
done in the RTL level, so we disable tree inlining. */
......@@ -845,8 +831,7 @@ java_post_options ()
/* Return either DECL or its known constant value (if it has one). */
tree
decl_constant_value (decl)
tree decl;
decl_constant_value (tree decl)
{
if (/* Don't change a variable array bound or initial value to a constant
in a place where a variable is invalid. */
......@@ -868,12 +853,11 @@ decl_constant_value (decl)
/* Walk the language specific tree nodes during inlining. */
static tree
java_tree_inlining_walk_subtrees (tp,subtrees,func,data,htab)
tree *tp ATTRIBUTE_UNUSED;
int *subtrees ATTRIBUTE_UNUSED;
walk_tree_fn func ATTRIBUTE_UNUSED;
void *data ATTRIBUTE_UNUSED;
void *htab ATTRIBUTE_UNUSED;
java_tree_inlining_walk_subtrees (tree *tp ATTRIBUTE_UNUSED,
int *subtrees ATTRIBUTE_UNUSED,
walk_tree_fn func ATTRIBUTE_UNUSED,
void *data ATTRIBUTE_UNUSED,
void *htab ATTRIBUTE_UNUSED)
{
enum tree_code code;
tree result;
......@@ -914,8 +898,7 @@ java_tree_inlining_walk_subtrees (tp,subtrees,func,data,htab)
/* Called from unsafe_for_reeval. */
static int
java_unsafe_for_reeval (t)
tree t;
java_unsafe_for_reeval (tree t)
{
switch (TREE_CODE (t))
{
......@@ -961,9 +944,7 @@ java_unsafe_for_reeval (t)
to one in the scope of the method being inlined into. */
static int
merge_init_test_initialization (entry, x)
void * * entry;
void * x;
merge_init_test_initialization (void **entry, void *x)
{
struct treetreehash_entry *ite = (struct treetreehash_entry *) *entry;
splay_tree decl_map = (splay_tree)x;
......@@ -991,9 +972,7 @@ merge_init_test_initialization (entry, x)
inlining. */
void
java_inlining_merge_static_initializers (fn, decl_map)
tree fn;
void *decl_map;
java_inlining_merge_static_initializers (tree fn, void *decl_map)
{
htab_traverse
(DECL_FUNCTION_INIT_TEST_TABLE (fn),
......@@ -1007,9 +986,7 @@ java_inlining_merge_static_initializers (fn, decl_map)
pre-existing one. */
static int
inline_init_test_initialization (entry, x)
void * * entry;
void * x;
inline_init_test_initialization (void **entry, void *x)
{
struct treetreehash_entry *ite = (struct treetreehash_entry *) *entry;
splay_tree decl_map = (splay_tree)x;
......@@ -1032,9 +1009,7 @@ inline_init_test_initialization (entry, x)
into, create a new mapping for it. */
void
java_inlining_map_static_initializers (fn, decl_map)
tree fn;
void *decl_map;
java_inlining_map_static_initializers (tree fn, void *decl_map)
{
htab_traverse
(DECL_FUNCTION_INIT_TEST_TABLE (fn),
......@@ -1044,9 +1019,7 @@ java_inlining_map_static_initializers (fn, decl_map)
/* Avoid voluminous output for deep recursion of compound exprs. */
static void
dump_compound_expr (di, t)
dump_info_p di;
tree t;
dump_compound_expr (dump_info_p di, tree t)
{
int i;
......@@ -1072,9 +1045,7 @@ dump_compound_expr (di, t)
}
static int
java_dump_tree (dump_info, t)
void *dump_info;
tree t;
java_dump_tree (void *dump_info, tree t)
{
enum tree_code code;
dump_info_p di = (dump_info_p) dump_info;
......
......@@ -82,9 +82,7 @@ static int need_byteswap = 0;
#endif
void
java_init_lex (finput, encoding)
FILE *finput;
const char *encoding;
java_init_lex (FILE *finput, const char *encoding)
{
#ifndef JC1_LITE
int java_lang_imported = 0;
......@@ -139,9 +137,7 @@ java_init_lex (finput, encoding)
}
static char *
java_sprint_unicode (line, i)
struct java_line *line;
int i;
java_sprint_unicode (struct java_line *line, int i)
{
static char buffer [10];
if (line->unicode_escape_p [i] || line->line [i] > 128)
......@@ -155,13 +151,13 @@ java_sprint_unicode (line, i)
}
static unicode_t
java_sneak_unicode ()
java_sneak_unicode (void)
{
return (ctxp->c_line->line [ctxp->c_line->current]);
}
static void
java_unget_unicode ()
java_unget_unicode (void)
{
if (!ctxp->c_line->current)
/* Can't unget unicode. */
......@@ -172,7 +168,7 @@ java_unget_unicode ()
}
static void
java_allocate_new_line ()
java_allocate_new_line (void)
{
unicode_t ahead = (ctxp->c_line ? ctxp->c_line->ahead[0] : '\0');
char ahead_escape_p = (ctxp->c_line ?
......@@ -217,9 +213,7 @@ java_allocate_new_line ()
/* Create a new lexer object. */
java_lexer *
java_new_lexer (finput, encoding)
FILE *finput;
const char *encoding;
java_new_lexer (FILE *finput, const char *encoding)
{
java_lexer *lex = xmalloc (sizeof (java_lexer));
int enc_error = 0;
......@@ -306,8 +300,7 @@ java_new_lexer (finput, encoding)
}
void
java_destroy_lexer (lex)
java_lexer *lex;
java_destroy_lexer (java_lexer *lex)
{
#ifdef HAVE_ICONV
if (! lex->use_fallback)
......@@ -317,8 +310,7 @@ java_destroy_lexer (lex)
}
static int
java_read_char (lex)
java_lexer *lex;
java_read_char (java_lexer *lex)
{
if (lex->unget_value)
{
......@@ -509,10 +501,7 @@ java_read_char (lex)
}
static void
java_store_unicode (l, c, unicode_escape_p)
struct java_line *l;
unicode_t c;
int unicode_escape_p;
java_store_unicode (struct java_line *l, unicode_t c, int unicode_escape_p)
{
if (l->size == l->max)
{
......@@ -526,9 +515,7 @@ java_store_unicode (l, c, unicode_escape_p)
}
static int
java_read_unicode (lex, unicode_escape_p)
java_lexer *lex;
int *unicode_escape_p;
java_read_unicode (java_lexer *lex, int *unicode_escape_p)
{
int c;
......@@ -582,9 +569,8 @@ java_read_unicode (lex, unicode_escape_p)
}
static int
java_read_unicode_collapsing_terminators (lex, unicode_escape_p)
java_lexer *lex;
int *unicode_escape_p;
java_read_unicode_collapsing_terminators (java_lexer *lex,
int *unicode_escape_p)
{
int c = java_read_unicode (lex, unicode_escape_p);
......@@ -604,7 +590,7 @@ java_read_unicode_collapsing_terminators (lex, unicode_escape_p)
}
static int
java_get_unicode ()
java_get_unicode (void)
{
/* It's time to read a line when... */
if (!ctxp->c_line || ctxp->c_line->current == ctxp->c_line->size)
......@@ -651,8 +637,7 @@ java_get_unicode ()
/* Parse the end of a C style comment.
* C is the first character following the '/' and '*'. */
static void
java_parse_end_comment (c)
int c;
java_parse_end_comment (int c)
{
for ( ;; c = java_get_unicode ())
{
......@@ -681,8 +666,7 @@ java_parse_end_comment (c)
character). Parsed keyword(s): @DEPRECATED. */
static int
java_parse_doc_section (c)
int c;
java_parse_doc_section (int c)
{
int valid_tag = 0, seen_star = 0;
......@@ -734,8 +718,7 @@ java_parse_doc_section (c)
This is only called if C >= 128 -- smaller values are handled
inline. However, this function handles all values anyway. */
static int
java_start_char_p (c)
unicode_t c;
java_start_char_p (unicode_t c)
{
unsigned int hi = c / 256;
const char *const page = type_table[hi];
......@@ -754,8 +737,7 @@ java_start_char_p (c)
This is only called if C >= 128 -- smaller values are handled
inline. However, this function handles all values anyway. */
static int
java_part_char_p (c)
unicode_t c;
java_part_char_p (unicode_t c)
{
unsigned int hi = c / 256;
const char *const page = type_table[hi];
......@@ -771,7 +753,7 @@ java_part_char_p (c)
}
static int
java_parse_escape_sequence ()
java_parse_escape_sequence (void)
{
unicode_t char_lit;
int c;
......@@ -840,11 +822,8 @@ java_parse_escape_sequence ()
static void java_perform_atof (YYSTYPE *, char *, int, int);
static void
java_perform_atof (java_lval, literal_token, fflag, number_beginning)
YYSTYPE *java_lval;
char *literal_token;
int fflag;
int number_beginning;
java_perform_atof (YYSTYPE *java_lval, char *literal_token, int fflag,
int number_beginning)
{
REAL_VALUE_TYPE value;
tree type = (fflag ? FLOAT_TYPE_NODE : DOUBLE_TYPE_NODE);
......@@ -891,11 +870,10 @@ static int yylex (YYSTYPE *);
static int
#ifdef JC1_LITE
yylex (java_lval)
yylex (YYSTYPE *java_lval)
#else
java_lex (java_lval)
java_lex (YYSTYPE *java_lval)
#endif
YYSTYPE *java_lval;
{
int c;
unicode_t first_unicode;
......@@ -1654,8 +1632,7 @@ java_lex (java_lval)
case of the largest negative value, and is only called in the case
where this value is not preceded by `-'. */
static void
error_if_numeric_overflow (value)
tree value;
error_if_numeric_overflow (tree value)
{
if (TREE_CODE (value) == INTEGER_CST
&& JAVA_RADIX10_FLAG (value)
......@@ -1670,8 +1647,7 @@ error_if_numeric_overflow (value)
#endif /* JC1_LITE */
static void
java_unicode_2_utf8 (unicode)
unicode_t unicode;
java_unicode_2_utf8 (unicode_t unicode)
{
if (RANGE (unicode, 0x01, 0x7f))
obstack_1grow (&temporary_obstack, (char)unicode);
......@@ -1695,8 +1671,7 @@ java_unicode_2_utf8 (unicode)
#ifndef JC1_LITE
static tree
build_wfl_node (node)
tree node;
build_wfl_node (tree node)
{
node = build_expr_wfl (node, ctxp->filename, ctxp->elc.line, ctxp->elc.col);
/* Prevent java_complete_lhs from short-circuiting node (if constant). */
......@@ -1706,9 +1681,7 @@ build_wfl_node (node)
#endif
static void
java_lex_error (msg, forward)
const char *msg ATTRIBUTE_UNUSED;
int forward ATTRIBUTE_UNUSED;
java_lex_error (const char *msg ATTRIBUTE_UNUSED, int forward ATTRIBUTE_UNUSED)
{
#ifndef JC1_LITE
ctxp->elc.line = ctxp->c_line->lineno;
......@@ -1723,9 +1696,7 @@ java_lex_error (msg, forward)
#ifndef JC1_LITE
static int
java_is_eol (fp, c)
FILE *fp;
int c;
java_is_eol (FILE *fp, int c)
{
int next;
switch (c)
......@@ -1744,9 +1715,8 @@ java_is_eol (fp, c)
#endif
char *
java_get_line_col (filename, line, col)
const char *filename ATTRIBUTE_UNUSED;
int line ATTRIBUTE_UNUSED, col ATTRIBUTE_UNUSED;
java_get_line_col (const char *filename ATTRIBUTE_UNUSED,
int line ATTRIBUTE_UNUSED, int col ATTRIBUTE_UNUSED)
{
#ifdef JC1_LITE
return 0;
......@@ -1822,10 +1792,7 @@ java_get_line_col (filename, line, col)
#ifndef JC1_LITE
static int
utf8_cmp (str, length, name)
const unsigned char *str;
int length;
const char *name;
utf8_cmp (const unsigned char *str, int length, const char *name)
{
const unsigned char *limit = str + length;
int i;
......@@ -1953,9 +1920,7 @@ static const char *const cxx_keywords[] =
/* Return true if NAME is a C++ keyword. */
int
cxx_keyword_p (name, length)
const char *name;
int length;
cxx_keyword_p (const char *name, int length)
{
int last = ARRAY_SIZE (cxx_keywords);
int first = 0;
......
......@@ -71,9 +71,7 @@ struct obstack *mangle_obstack;
the vtable. */
tree
java_mangle_decl (obstack, decl)
struct obstack *obstack;
tree decl;
java_mangle_decl (struct obstack *obstack, tree decl)
{
init_mangling (obstack);
switch (TREE_CODE (decl))
......@@ -91,9 +89,7 @@ java_mangle_decl (obstack, decl)
}
tree
java_mangle_class_field (obstack, type)
struct obstack *obstack;
tree type;
java_mangle_class_field (struct obstack *obstack, tree type)
{
init_mangling (obstack);
mangle_record_type (type, /* for_pointer = */ 0);
......@@ -103,9 +99,7 @@ java_mangle_class_field (obstack, type)
}
tree
java_mangle_vtable (obstack, type)
struct obstack *obstack;
tree type;
java_mangle_vtable (struct obstack *obstack, tree type)
{
init_mangling (obstack);
MANGLE_RAW_STRING ("TV");
......@@ -119,8 +113,7 @@ java_mangle_vtable (obstack, type)
/* This mangles a field decl */
static void
mangle_field_decl (decl)
tree decl;
mangle_field_decl (tree decl)
{
/* Mangle the name of the this the field belongs to */
mangle_record_type (DECL_CONTEXT (decl), /* for_pointer = */ 0);
......@@ -136,8 +129,7 @@ mangle_field_decl (decl)
its arguments. */
static void
mangle_method_decl (mdecl)
tree mdecl;
mangle_method_decl (tree mdecl)
{
tree method_name = DECL_NAME (mdecl);
tree arglist;
......@@ -177,8 +169,7 @@ mangle_method_decl (mdecl)
value if unicode encoding was required. */
static void
mangle_member_name (name)
tree name;
mangle_member_name (tree name)
{
append_gpp_mangled_name (IDENTIFIER_POINTER (name),
IDENTIFIER_LENGTH (name));
......@@ -191,8 +182,7 @@ mangle_member_name (name)
/* Append the mangled name of TYPE onto OBSTACK. */
static void
mangle_type (type)
tree type;
mangle_type (tree type)
{
switch (TREE_CODE (type))
{
......@@ -255,8 +245,7 @@ static int compression_next;
function to match pointer entries and start from the end */
static int
find_compression_pointer_match (type)
tree type;
find_compression_pointer_match (tree type)
{
int i;
......@@ -270,8 +259,7 @@ find_compression_pointer_match (type)
associated with it. */
static int
find_compression_array_match (type)
tree type;
find_compression_array_match (tree type)
{
return find_compression_pointer_match (type);
}
......@@ -279,8 +267,7 @@ find_compression_array_match (type)
/* Match the table of type against STRING. */
static int
find_compression_array_template_match (string)
tree string;
find_compression_array_template_match (tree string)
{
int i;
for (i = 0; i < compression_next; i++)
......@@ -295,9 +282,7 @@ find_compression_array_template_match (string)
to the rest of TYPE to be mangled. */
static int
find_compression_record_match (type, next_current)
tree type;
tree *next_current;
find_compression_record_match (tree type, tree *next_current)
{
int i, match;
tree current, saved_current = NULL_TREE;
......@@ -349,9 +334,7 @@ find_compression_record_match (type, next_current)
symbol, meaning it was preceded by a 'P'. */
static int
mangle_record_type (type, for_pointer)
tree type;
int for_pointer;
mangle_record_type (tree type, int for_pointer)
{
tree current;
int match;
......@@ -402,8 +385,7 @@ mangle_record_type (type, for_pointer)
a partial compression or/plus the rest of the mangling. */
static void
mangle_pointer_type (type)
tree type;
mangle_pointer_type (tree type)
{
int match;
tree pointer_type;
......@@ -437,8 +419,7 @@ mangle_pointer_type (type)
/* atms: array template mangled string. */
static GTY(()) tree atms;
static void
mangle_array_type (p_type)
tree p_type;
mangle_array_type (tree p_type)
{
tree type, elt_type;
int match;
......@@ -526,9 +507,7 @@ emit_compression_string (int i)
might all be unique, we find the same RECORD_TYPE.) */
static int
entry_match_pointer_p (type, i)
tree type;
int i;
entry_match_pointer_p (tree type, int i)
{
tree t = TREE_VEC_ELT (compression_table, i);
......@@ -549,8 +528,7 @@ entry_match_pointer_p (type, i)
part. The result is stored in TYPE_PACKAGE_LIST to be reused. */
static void
set_type_package_list (type)
tree type;
set_type_package_list (tree type)
{
int i;
const char *type_string = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type)));
......@@ -593,8 +571,7 @@ set_type_package_list (type)
compression table if necessary. */
static void
compression_table_add (type)
tree type;
compression_table_add (tree type)
{
if (compression_next == TREE_VEC_LENGTH (compression_table))
{
......@@ -612,8 +589,7 @@ compression_table_add (type)
/* Mangling initialization routine. */
static void
init_mangling (obstack)
struct obstack *obstack;
init_mangling (struct obstack *obstack)
{
mangle_obstack = obstack;
if (!compression_table)
......@@ -630,7 +606,7 @@ init_mangling (obstack)
IDENTIFIER_NODE. */
static tree
finish_mangling ()
finish_mangling (void)
{
tree result;
......
......@@ -53,9 +53,7 @@ extern struct obstack *mangle_obstack;
frequently that they could be cached. */
void
append_gpp_mangled_name (name, len)
const char *name;
int len;
append_gpp_mangled_name (const char *name, int len)
{
int encoded_len = unicode_mangling_length (name, len);
int needs_escapes = encoded_len > 0;
......@@ -76,9 +74,7 @@ append_gpp_mangled_name (name, len)
which case `__U' will be mangled `__U_'. */
static void
append_unicode_mangled_name (name, len)
const char *name;
int len;
append_unicode_mangled_name (const char *name, int len)
{
const unsigned char *ptr;
const unsigned char *limit = (const unsigned char *)name + len;
......@@ -129,9 +125,7 @@ append_unicode_mangled_name (name, len)
escapes. If no escapes are needed, return 0. */
static int
unicode_mangling_length (name, len)
const char *name;
int len;
unicode_mangling_length (const char *name, int len)
{
const unsigned char *ptr;
const unsigned char *limit = (const unsigned char *)name + len;
......@@ -199,9 +193,7 @@ unicode_mangling_length (name, len)
so frequently that they could be cached. */
void
append_gpp_mangled_name (name, len)
const char *name;
int len;
append_gpp_mangled_name (const char *name, int len)
{
const unsigned char *ptr;
const unsigned char *limit = (const unsigned char *)name + len;
......
......@@ -1176,7 +1176,7 @@ constant_expression:
/* Create a new parser context */
void
java_push_parser_context ()
java_push_parser_context (void)
{
struct parser_ctxt *new = xcalloc (1, sizeof (struct parser_ctxt));
......@@ -1185,8 +1185,7 @@ java_push_parser_context ()
}
static void
push_class_context (name)
const char *name;
push_class_context (const char *name)
{
struct class_context *ctx;
......@@ -1197,7 +1196,7 @@ push_class_context (name)
}
static void
pop_class_context ()
pop_class_context (void)
{
struct class_context *ctx;
......@@ -1217,9 +1216,7 @@ pop_class_context ()
/* Recursively construct the class name. This is just a helper
function for get_class_name(). */
static int
make_class_name_recursive (stack, ctx)
struct obstack *stack;
struct class_context *ctx;
make_class_name_recursive (struct obstack *stack, struct class_context *ctx)
{
if (! ctx)
return 0;
......@@ -1243,7 +1240,7 @@ make_class_name_recursive (stack, ctx)
/* Return a newly allocated string holding the name of the class. */
static char *
get_class_name ()
get_class_name (void)
{
char *result;
int last_was_digit;
......@@ -1287,8 +1284,7 @@ get_class_name ()
/* Actions defined here */
static void
report_class_declaration (name)
const char * name;
report_class_declaration (const char * name)
{
extern int flag_dump_class, flag_list_filename;
......@@ -1314,8 +1310,7 @@ report_class_declaration (name)
}
static void
report_main_declaration (declarator)
struct method_declarator *declarator;
report_main_declaration (struct method_declarator *declarator)
{
extern int flag_find_main;
......@@ -1342,7 +1337,7 @@ report_main_declaration (declarator)
}
void
report ()
report (void)
{
extern int flag_complexity;
if (flag_complexity)
......@@ -1351,7 +1346,7 @@ report ()
/* Reset global status used by the report functions. */
void reset_report ()
void reset_report (void)
{
previous_output = 0;
package_name = NULL;
......@@ -1360,8 +1355,7 @@ void reset_report ()
}
void
yyerror (msg)
const char *msg ATTRIBUTE_UNUSED;
yyerror (const char *msg ATTRIBUTE_UNUSED)
{
fprintf (stderr, "%s: %d: %s\n", input_filename, lineno, msg);
exit (1);
......
......@@ -2630,8 +2630,7 @@ constant_expression:
`dims:' rule is being used. */
static int
pop_current_osb (ctxp)
struct parser_ctxt *ctxp;
pop_current_osb (struct parser_ctxt *ctxp)
{
int to_return;
......@@ -2655,8 +2654,7 @@ pop_current_osb (ctxp)
created context becomes the current one. */
static void
create_new_parser_context (copy_from_previous)
int copy_from_previous;
create_new_parser_context (int copy_from_previous)
{
struct parser_ctxt *new;
......@@ -2676,14 +2674,13 @@ create_new_parser_context (copy_from_previous)
/* Create a new parser context and make it the current one. */
void
java_push_parser_context ()
java_push_parser_context (void)
{
create_new_parser_context (0);
}
void
java_pop_parser_context (generate)
int generate;
java_pop_parser_context (int generate)
{
tree current;
struct parser_ctxt *toFree, *next;
......@@ -2727,7 +2724,7 @@ java_pop_parser_context (generate)
variables. */
void
java_parser_context_save_global ()
java_parser_context_save_global (void)
{
if (!ctxp)
{
......@@ -2751,7 +2748,7 @@ java_parser_context_save_global ()
previous context the current one. */
void
java_parser_context_restore_global ()
java_parser_context_restore_global (void)
{
lineno = ctxp->lineno;
current_class = ctxp->class_type;
......@@ -2773,7 +2770,7 @@ java_parser_context_restore_global ()
classes be parsed. */
static void
java_parser_context_suspend ()
java_parser_context_suspend (void)
{
/* This makes debugging through java_debug_context easier */
static const char *const name = "<inner buffer context>";
......@@ -2799,7 +2796,7 @@ java_parser_context_suspend ()
can resume as if no context was ever saved. */
static void
java_parser_context_resume ()
java_parser_context_resume (void)
{
struct parser_ctxt *old = ctxp; /* This one is to be discarded */
struct parser_ctxt *saver = old->next; /* This one contain saved info */
......@@ -2826,7 +2823,7 @@ java_parser_context_resume ()
linked. */
static void
java_parser_context_push_initialized_field ()
java_parser_context_push_initialized_field (void)
{
tree node;
......@@ -2848,7 +2845,7 @@ java_parser_context_push_initialized_field ()
or <clinit> functions. */
static void
java_parser_context_pop_initialized_field ()
java_parser_context_pop_initialized_field (void)
{
tree stmts;
tree class_type = TREE_TYPE (GET_CPC ());
......@@ -2883,8 +2880,7 @@ java_parser_context_pop_initialized_field ()
}
static tree
reorder_static_initialized (list)
tree list;
reorder_static_initialized (tree list)
{
/* We have to keep things in order. The alias initializer have to
come first, then the initialized regular field, in reverse to
......@@ -2920,8 +2916,7 @@ reorder_static_initialized (list)
{int i; for (i = 0; i < (C); i++) fputc (' ', stderr);}
static void
java_debug_context_do (tab)
int tab;
java_debug_context_do (int tab)
{
struct parser_ctxt *copy = ctxp;
while (copy)
......@@ -2949,7 +2944,7 @@ java_debug_context_do (tab)
debugger. */
void
java_debug_context ()
java_debug_context (void)
{
java_debug_context_do (0);
}
......@@ -2964,7 +2959,7 @@ static int force_error = 0;
/* Reporting an constructor invocation error. */
static void
parse_ctor_invocation_error ()
parse_ctor_invocation_error (void)
{
if (DECL_CONSTRUCTOR_P (current_function_decl))
yyerror ("Constructor invocation must be first thing in a constructor");
......@@ -2975,8 +2970,7 @@ parse_ctor_invocation_error ()
/* Reporting JDK1.1 features not implemented. */
static tree
parse_jdk1_1_error (msg)
const char *msg;
parse_jdk1_1_error (const char *msg)
{
sorry (": `%s' JDK1.1(TM) feature", msg);
java_error_count++;
......@@ -2986,8 +2980,7 @@ parse_jdk1_1_error (msg)
static int do_warning = 0;
void
yyerror (msg)
const char *msg;
yyerror (const char *msg)
{
static java_lc elc;
static int prev_lineno;
......@@ -3051,10 +3044,7 @@ yyerror (msg)
}
static void
issue_warning_error_from_context (cl, msg, ap)
tree cl;
const char *msg;
va_list ap;
issue_warning_error_from_context (tree cl, const char *msg, va_list ap)
{
const char *saved, *saved_input_filename;
char buffer [4096];
......@@ -3104,8 +3094,7 @@ parse_warning_context (tree cl, const char *msg, ...)
}
static tree
find_expr_with_wfl (node)
tree node;
find_expr_with_wfl (tree node)
{
while (node)
{
......@@ -3148,8 +3137,7 @@ find_expr_with_wfl (node)
last line of the method the error occurs in. */
static void
missing_return_error (method)
tree method;
missing_return_error (tree method)
{
EXPR_WFL_SET_LINECOL (wfl_operator, DECL_SOURCE_LINE_LAST (method), -2);
parse_error_context (wfl_operator, "Missing return statement");
......@@ -3158,8 +3146,7 @@ missing_return_error (method)
/* Issue an unreachable statement error. From NODE, find the next
statement to report appropriately. */
static void
unreachable_stmt_error (node)
tree node;
unreachable_stmt_error (tree node)
{
/* Browse node to find the next expression node that has a WFL. Use
the location to report the error */
......@@ -3178,7 +3165,7 @@ unreachable_stmt_error (node)
}
int
java_report_errors ()
java_report_errors (void)
{
if (java_error_count)
fprintf (stderr, "%d error%s",
......@@ -3192,8 +3179,7 @@ java_report_errors ()
}
static char *
java_accstring_lookup (flags)
int flags;
java_accstring_lookup (int flags)
{
static char buffer [80];
#define COPY_RETURN(S) {strcpy (buffer, S); return buffer;}
......@@ -3221,9 +3207,7 @@ java_accstring_lookup (flags)
variables. */
static void
classitf_redefinition_error (context, id, decl, cl)
const char *context;
tree id, decl, cl;
classitf_redefinition_error (const char *context, tree id, tree decl, tree cl)
{
parse_error_context (cl, "%s `%s' already defined in %s:%d",
context, IDENTIFIER_POINTER (id),
......@@ -3232,9 +3216,7 @@ classitf_redefinition_error (context, id, decl, cl)
}
static void
variable_redefinition_error (context, name, type, line)
tree context, name, type;
int line;
variable_redefinition_error (tree context, tree name, tree type, int line)
{
const char *type_name;
......@@ -3256,9 +3238,7 @@ variable_redefinition_error (context, name, type, line)
the node pointed to by TRIMMED unless TRIMMED is null. */
static int
build_type_name_from_array_name (aname, trimmed)
tree aname;
tree *trimmed;
build_type_name_from_array_name (tree aname, tree *trimmed)
{
const char *name = IDENTIFIER_POINTER (aname);
int len = IDENTIFIER_LENGTH (aname);
......@@ -3273,8 +3253,7 @@ build_type_name_from_array_name (aname, trimmed)
}
static tree
build_array_from_name (type, type_wfl, name, ret_name)
tree type, type_wfl, name, *ret_name;
build_array_from_name (tree type, tree type_wfl, tree name, tree *ret_name)
{
int more_dims = 0;
......@@ -3326,8 +3305,7 @@ build_array_from_name (type, type_wfl, name, ret_name)
identifier. */
static tree
build_unresolved_array_type (type_or_wfl)
tree type_or_wfl;
build_unresolved_array_type (tree type_or_wfl)
{
const char *ptr;
tree wfl;
......@@ -3353,8 +3331,7 @@ build_unresolved_array_type (type_or_wfl)
}
static void
parser_add_interface (class_decl, interface_decl, wfl)
tree class_decl, interface_decl, wfl;
parser_add_interface (tree class_decl, tree interface_decl, tree wfl)
{
if (maybe_add_interface (TREE_TYPE (class_decl), TREE_TYPE (interface_decl)))
parse_error_context (wfl, "Interface `%s' repeated",
......@@ -3365,9 +3342,8 @@ parser_add_interface (class_decl, interface_decl, wfl)
encountered. TAG is 0 for a class, 1 for an interface. */
static int
check_class_interface_creation (is_interface, flags, raw_name, qualified_name, decl, cl)
int is_interface, flags;
tree raw_name, qualified_name, decl, cl;
check_class_interface_creation (int is_interface, int flags, tree raw_name,
tree qualified_name, tree decl, tree cl)
{
tree node;
int sca = 0; /* Static class allowed */
......@@ -3483,8 +3459,7 @@ check_class_interface_creation (is_interface, flags, raw_name, qualified_name, d
/* Construct a nested class name. If the final component starts with
a digit, return true. Otherwise return false. */
static int
make_nested_class_name (cpc_list)
tree cpc_list;
make_nested_class_name (tree cpc_list)
{
tree name;
......@@ -3507,8 +3482,7 @@ make_nested_class_name (cpc_list)
/* Can't redefine a class already defined in an earlier scope. */
static int
check_inner_class_redefinition (raw_name, cl)
tree raw_name, cl;
check_inner_class_redefinition (tree raw_name, tree cl)
{
tree scope_list;
......@@ -3528,9 +3502,8 @@ check_inner_class_redefinition (raw_name, cl)
we remember ENCLOSING and SUPER. */
static tree
resolve_inner_class (circularity_hash, cl, enclosing, super, class_type)
htab_t circularity_hash;
tree cl, *enclosing, *super, class_type;
resolve_inner_class (htab_t circularity_hash, tree cl, tree *enclosing,
tree *super, tree class_type)
{
tree local_enclosing = *enclosing;
tree local_super = NULL_TREE;
......@@ -3593,8 +3566,7 @@ resolve_inner_class (circularity_hash, cl, enclosing, super, class_type)
qualified. */
static tree
find_as_inner_class (enclosing, name, cl)
tree enclosing, name, cl;
find_as_inner_class (tree enclosing, tree name, tree cl)
{
tree qual, to_return;
if (!enclosing)
......@@ -3647,8 +3619,7 @@ find_as_inner_class (enclosing, name, cl)
through. */
static tree
find_as_inner_class_do (qual, enclosing)
tree qual, enclosing;
find_as_inner_class_do (tree qual, tree enclosing)
{
if (!qual)
return NULL_TREE;
......@@ -3678,9 +3649,7 @@ find_as_inner_class_do (qual, enclosing)
DECL. */
static void
set_nested_class_simple_name_value (outer, set)
tree outer;
int set;
set_nested_class_simple_name_value (tree outer, int set)
{
tree l;
......@@ -3690,7 +3659,7 @@ set_nested_class_simple_name_value (outer, set)
}
static void
link_nested_class_to_enclosing ()
link_nested_class_to_enclosing (void)
{
if (GET_ENCLOSING_CPC ())
{
......@@ -3702,8 +3671,7 @@ link_nested_class_to_enclosing ()
}
static tree
maybe_make_nested_class_name (name)
tree name;
maybe_make_nested_class_name (tree name)
{
tree id = NULL_TREE;
......@@ -3737,8 +3705,8 @@ maybe_make_nested_class_name (name)
line CL and do other maintenance things. */
static tree
maybe_create_class_interface_decl (decl, raw_name, qualified_name, cl)
tree decl, raw_name, qualified_name, cl;
maybe_create_class_interface_decl (tree decl, tree raw_name,
tree qualified_name, tree cl)
{
if (!decl)
decl = push_class (make_class (), qualified_name);
......@@ -3775,8 +3743,7 @@ maybe_create_class_interface_decl (decl, raw_name, qualified_name, cl)
}
static void
add_superinterfaces (decl, interface_list)
tree decl, interface_list;
add_superinterfaces (tree decl, tree interface_list)
{
tree node;
/* Superinterface(s): if present and defined, parser_check_super_interface ()
......@@ -3805,9 +3772,7 @@ add_superinterfaces (decl, interface_list)
interface's decl in pass 2. */
static tree
create_interface (flags, id, super)
int flags;
tree id, super;
create_interface (int flags, tree id, tree super)
{
tree raw_name = EXPR_WFL_NODE (id);
tree q_name = parser_qualified_classname (raw_name);
......@@ -3866,8 +3831,7 @@ create_interface (flags, id, super)
DEP. */
static void
patch_anonymous_class (type_decl, class_decl, wfl)
tree type_decl, class_decl, wfl;
patch_anonymous_class (tree type_decl, tree class_decl, tree wfl)
{
tree class = TREE_TYPE (class_decl);
tree type = TREE_TYPE (type_decl);
......@@ -3899,9 +3863,7 @@ patch_anonymous_class (type_decl, class_decl, wfl)
}
static tree
create_anonymous_class (location, type_name)
int location;
tree type_name;
create_anonymous_class (int location, tree type_name)
{
char buffer [80];
tree super = NULL_TREE, itf = NULL_TREE;
......@@ -3943,9 +3905,7 @@ create_anonymous_class (location, type_name)
interface's decl in pass 2. */
static tree
create_class (flags, id, super, interfaces)
int flags;
tree id, super, interfaces;
create_class (int flags, tree id, tree super, tree interfaces)
{
tree raw_name = EXPR_WFL_NODE (id);
tree class_id, decl;
......@@ -4051,8 +4011,7 @@ create_class (flags, id, super, interfaces)
parser context if necessary. */
static void
end_class_declaration (resume)
int resume;
end_class_declaration (int resume)
{
/* If an error occurred, context weren't pushed and won't need to be
popped by a resume. */
......@@ -4075,9 +4034,7 @@ end_class_declaration (resume)
}
static void
add_inner_class_fields (class_decl, fct_decl)
tree class_decl;
tree fct_decl;
add_inner_class_fields (tree class_decl, tree fct_decl)
{
tree block, marker, f;
......@@ -4165,9 +4122,7 @@ add_inner_class_fields (class_decl, fct_decl)
can't set the CLASS_LOADED_P flag */
static tree
find_field (class, name)
tree class;
tree name;
find_field (tree class, tree name)
{
tree decl;
for (decl = TYPE_FIELDS (class); decl; decl = TREE_CHAIN (decl))
......@@ -4182,8 +4137,7 @@ find_field (class, name)
of CLASS */
static tree
lookup_field_wrapper (class, name)
tree class, name;
lookup_field_wrapper (tree class, tree name)
{
tree type = class;
tree decl = NULL_TREE;
......@@ -4222,8 +4176,7 @@ lookup_field_wrapper (class, name)
otherwise. */
static int
duplicate_declaration_error_p (new_field_name, new_type, cl)
tree new_field_name, new_type, cl;
duplicate_declaration_error_p (tree new_field_name, tree new_type, tree cl)
{
/* This might be modified to work with method decl as well */
tree decl = find_field (TREE_TYPE (GET_CPC ()), new_field_name);
......@@ -4258,9 +4211,7 @@ duplicate_declaration_error_p (new_field_name, new_type, cl)
be later resolved in java_complete_class () */
static void
register_fields (flags, type, variable_list)
int flags;
tree type, variable_list;
register_fields (int flags, tree type, tree variable_list)
{
tree current, saved_type;
tree class_type = NULL_TREE;
......@@ -4405,8 +4356,7 @@ register_fields (flags, type, variable_list)
local(s). */
static tree
generate_finit (class_type)
tree class_type;
generate_finit (tree class_type)
{
int count = 0;
tree list = TYPE_FINIT_STMT_LIST (class_type);
......@@ -4440,8 +4390,7 @@ generate_finit (class_type)
statements in a try/catch/rethrow sequence. */
static tree
generate_instinit (class_type)
tree class_type;
generate_instinit (tree class_type)
{
tree current;
tree compound = NULL_TREE;
......@@ -4483,8 +4432,7 @@ generate_instinit (class_type)
/* FIXME */
static tree
build_instinit_invocation (class_type)
tree class_type;
build_instinit_invocation (tree class_type)
{
tree to_return = NULL_TREE;
......@@ -4514,9 +4462,7 @@ static int patch_stage;
with a constructor. */
static tree
method_header (flags, type, mdecl, throws)
int flags;
tree type, mdecl, throws;
method_header (int flags, tree type, tree mdecl, tree throws)
{
tree type_wfl = NULL_TREE;
tree meth_name = NULL_TREE;
......@@ -4726,8 +4672,7 @@ method_header (flags, type, mdecl, throws)
}
static void
fix_method_argument_names (orig_arg, meth)
tree orig_arg, meth;
fix_method_argument_names (tree orig_arg, tree meth)
{
tree arg = TYPE_ARG_TYPES (TREE_TYPE (meth));
if (TREE_CODE (TREE_TYPE (meth)) == METHOD_TYPE)
......@@ -4746,8 +4691,7 @@ fix_method_argument_names (orig_arg, meth)
/* Complete the method declaration with METHOD_BODY. */
static void
finish_method_declaration (method_body)
tree method_body;
finish_method_declaration (tree method_body)
{
int flags;
......@@ -4805,8 +4749,7 @@ finish_method_declaration (method_body)
/* Build a an error message for constructor circularity errors. */
static char *
constructor_circularity_msg (from, to)
tree from, to;
constructor_circularity_msg (tree from, tree to)
{
static char string [4096];
char *t = xstrdup (lang_printable_name (from, 0));
......@@ -4820,8 +4763,7 @@ constructor_circularity_msg (from, to)
static GTY(()) tree vcc_list;
static int
verify_constructor_circularity (meth, current)
tree meth, current;
verify_constructor_circularity (tree meth, tree current)
{
tree c;
......@@ -4865,8 +4807,7 @@ verify_constructor_circularity (meth, current)
/* Check modifiers that can be declared but exclusively */
static void
check_modifiers_consistency (flags)
int flags;
check_modifiers_consistency (int flags)
{
int acc_count = 0;
tree cl = NULL_TREE;
......@@ -4890,8 +4831,7 @@ check_modifiers_consistency (flags)
/* Check the methode header METH for abstract specifics features */
static void
check_abstract_method_header (meth)
tree meth;
check_abstract_method_header (tree meth)
{
int flags = get_access_flags_from_decl (meth);
......@@ -4912,8 +4852,7 @@ check_abstract_method_header (meth)
incomplete types. */
static tree
method_declarator (id, list)
tree id, list;
method_declarator (tree id, tree list)
{
tree arg_types = NULL_TREE, current, node;
tree meth = make_node (FUNCTION_TYPE);
......@@ -5010,9 +4949,7 @@ method_declarator (id, list)
}
static int
unresolved_type_p (wfl, returned)
tree wfl;
tree *returned;
unresolved_type_p (tree wfl, tree *returned)
{
if (TREE_CODE (wfl) == EXPR_WITH_FILE_LOCATION)
......@@ -5038,8 +4975,7 @@ unresolved_type_p (wfl, returned)
qualification from the current package definition. */
static tree
parser_qualified_classname (name)
tree name;
parser_qualified_classname (tree name)
{
tree nested_class_name;
......@@ -5056,8 +4992,7 @@ parser_qualified_classname (name)
everything is OK. */
static int
parser_check_super_interface (super_decl, this_decl, this_wfl)
tree super_decl, this_decl, this_wfl;
parser_check_super_interface (tree super_decl, tree this_decl, tree this_wfl)
{
tree super_type = TREE_TYPE (super_decl);
......@@ -5091,8 +5026,7 @@ parser_check_super_interface (super_decl, this_decl, this_wfl)
0 if everthing is OK. */
static int
parser_check_super (super_decl, this_decl, wfl)
tree super_decl, this_decl, wfl;
parser_check_super (tree super_decl, tree this_decl, tree wfl)
{
tree super_type = TREE_TYPE (super_decl);
......@@ -5130,8 +5064,7 @@ parser_check_super (super_decl, this_decl, wfl)
CTXP list of type dependency list. */
static void
create_jdep_list (ctxp)
struct parser_ctxt *ctxp;
create_jdep_list (struct parser_ctxt *ctxp)
{
jdeplist *new = xmalloc (sizeof (jdeplist));
new->first = new->last = NULL;
......@@ -5140,8 +5073,7 @@ create_jdep_list (ctxp)
}
static jdeplist *
reverse_jdep_list (ctxp)
struct parser_ctxt *ctxp;
reverse_jdep_list (struct parser_ctxt *ctxp)
{
register jdeplist *prev = NULL, *current, *next;
for (current = ctxp->classd_list; current; current = next)
......@@ -5158,8 +5090,7 @@ reverse_jdep_list (ctxp)
registered again. */
static tree
obtain_incomplete_type (type_name)
tree type_name;
obtain_incomplete_type (tree type_name)
{
tree ptr = NULL_TREE, name;
......@@ -5184,9 +5115,7 @@ obtain_incomplete_type (type_name)
manner. */
static tree
register_incomplete_type (kind, wfl, decl, ptr)
int kind;
tree wfl, decl, ptr;
register_incomplete_type (int kind, tree wfl, tree decl, tree ptr)
{
jdep *new = xmalloc (sizeof (jdep));
......@@ -5225,9 +5154,7 @@ register_incomplete_type (kind, wfl, decl, ptr)
otherwise. */
static tree
check_inner_circular_reference (source, target)
tree source;
tree target;
check_inner_circular_reference (tree source, tree target)
{
tree basetype_vec = TYPE_BINFO_BASETYPES (source);
tree ctx, cl;
......@@ -5273,8 +5200,7 @@ check_inner_circular_reference (source, target)
otherwise. TYPE can be an interface or a class. */
static tree
check_circular_reference (type)
tree type;
check_circular_reference (tree type)
{
tree basetype_vec = TYPE_BINFO_BASETYPES (type);
int i;
......@@ -5300,7 +5226,7 @@ check_circular_reference (type)
}
void
java_check_circular_reference ()
java_check_circular_reference (void)
{
tree current;
for (current = ctxp->class_list; current; current = TREE_CHAIN (current))
......@@ -5326,10 +5252,8 @@ java_check_circular_reference ()
finit$. */
static tree
build_alias_initializer_parameter_list (mode, class_type, parm, artificial)
int mode;
tree class_type, parm;
int *artificial;
build_alias_initializer_parameter_list (int mode, tree class_type, tree parm,
int *artificial)
{
tree field;
tree additional_parms = NULL_TREE;
......@@ -5407,8 +5331,7 @@ build_alias_initializer_parameter_list (mode, class_type, parm, artificial)
enforced. This is the case for anonymous classes. */
static tree
craft_constructor (class_decl, args)
tree class_decl, args;
craft_constructor (tree class_decl, tree args)
{
tree class_type = TREE_TYPE (class_decl);
tree parm = NULL_TREE;
......@@ -5466,7 +5389,7 @@ craft_constructor (class_decl, args)
compilation triggered this one to be simply loaded. */
void
java_fix_constructors ()
java_fix_constructors (void)
{
tree current;
......@@ -5500,8 +5423,7 @@ java_fix_constructors ()
about the class processed currently. */
void
safe_layout_class (class)
tree class;
safe_layout_class (tree class)
{
tree save_current_class = current_class;
const char *save_input_filename = input_filename;
......@@ -5515,8 +5437,7 @@ safe_layout_class (class)
}
static tree
jdep_resolve_class (dep)
jdep *dep;
jdep_resolve_class (jdep *dep)
{
tree decl;
......@@ -5548,7 +5469,7 @@ jdep_resolve_class (dep)
/* Complete unsatisfied class declaration and their dependencies */
void
java_complete_class ()
java_complete_class (void)
{
tree cclass;
jdeplist *cclassd;
......@@ -5696,8 +5617,7 @@ java_complete_class ()
array. */
static tree
resolve_class (enclosing, class_type, decl, cl)
tree enclosing, class_type, decl, cl;
resolve_class (tree enclosing, tree class_type, tree decl, tree cl)
{
tree tname = TYPE_NAME (class_type);
tree resolved_type = TREE_TYPE (class_type);
......@@ -5747,8 +5667,7 @@ resolve_class (enclosing, class_type, decl, cl)
qualify_and_find. */
tree
do_resolve_class (enclosing, class_type, decl, cl)
tree enclosing, class_type, decl, cl;
do_resolve_class (tree enclosing, tree class_type, tree decl, tree cl)
{
tree new_class_decl = NULL_TREE, super = NULL_TREE;
tree saved_enclosing_type = enclosing ? TREE_TYPE (enclosing) : NULL_TREE;
......@@ -5901,8 +5820,7 @@ do_resolve_class (enclosing, class_type, decl, cl)
}
static tree
qualify_and_find (class_type, package, name)
tree class_type, package, name;
qualify_and_find (tree class_type, tree package, tree name)
{
tree new_qualified = merge_qualified_name (package, name);
tree new_class_decl;
......@@ -5925,9 +5843,7 @@ qualify_and_find (class_type, package, name)
called when type resolution is necessary during the walk pass. */
static tree
resolve_and_layout (something, cl)
tree something;
tree cl;
resolve_and_layout (tree something, tree cl)
{
tree decl, decl_type;
......@@ -5988,8 +5904,7 @@ resolve_and_layout (something, cl)
layout. The current parsing context is saved and restored */
static tree
resolve_no_layout (name, cl)
tree name, cl;
resolve_no_layout (tree name, tree cl)
{
tree ptr, decl;
BUILD_PTR_FROM_NAME (ptr, name);
......@@ -6005,8 +5920,7 @@ resolve_no_layout (name, cl)
use an identifier tree. */
static const char *
purify_type_name (name)
const char *name;
purify_type_name (const char *name)
{
int len = strlen (name);
int bracket_found;
......@@ -6024,8 +5938,7 @@ purify_type_name (name)
/* The type CURRENT refers to can't be found. We print error messages. */
static void
complete_class_report_errors (dep)
jdep *dep;
complete_class_report_errors (jdep *dep)
{
const char *name;
......@@ -6091,8 +6004,7 @@ complete_class_report_errors (dep)
<init> */
static const char *
get_printable_method_name (decl)
tree decl;
get_printable_method_name (tree decl)
{
const char *to_return;
tree name = NULL_TREE;
......@@ -6115,8 +6027,7 @@ get_printable_method_name (decl)
function it's a FWL, so we can track errors more accurately.) */
static int
check_method_redefinition (class, method)
tree class, method;
check_method_redefinition (tree class, tree method)
{
tree redef, sig;
......@@ -6146,9 +6057,8 @@ check_method_redefinition (class, method)
/* Return 1 if check went ok, 0 otherwise. */
static int
check_abstract_method_definitions (do_interface, class_decl, type)
int do_interface;
tree class_decl, type;
check_abstract_method_definitions (int do_interface, tree class_decl,
tree type)
{
tree class = TREE_TYPE (class_decl);
tree method, end_type;
......@@ -6242,8 +6152,7 @@ check_abstract_method_definitions (do_interface, class_decl, type)
methods. */
static void
java_check_abstract_method_definitions (class_decl)
tree class_decl;
java_check_abstract_method_definitions (tree class_decl)
{
tree class = TREE_TYPE (class_decl);
tree super, vector;
......@@ -6273,8 +6182,7 @@ java_check_abstract_method_definitions (class_decl)
safe to build a method signature or not. */
static int
check_method_types_complete (decl)
tree decl;
check_method_types_complete (tree decl)
{
tree type = TREE_TYPE (decl);
tree args;
......@@ -6295,8 +6203,7 @@ check_method_types_complete (decl)
/* Visible interface to check methods contained in CLASS_DECL */
void
java_check_methods (class_decl)
tree class_decl;
java_check_methods (tree class_decl)
{
if (CLASS_METHOD_CHECKED_P (TREE_TYPE (class_decl)))
return;
......@@ -6315,8 +6222,7 @@ java_check_methods (class_decl)
declaration. */
static void
java_check_regular_methods (class_decl)
tree class_decl;
java_check_regular_methods (tree class_decl)
{
int saw_constructor = ANONYMOUS_CLASS_P (TREE_TYPE (class_decl));
tree method;
......@@ -6490,8 +6396,7 @@ java_check_regular_methods (class_decl)
is incompatible with the `throws' clause of FOUND (if any). */
static void
check_throws_clauses (method, method_wfl, found)
tree method, method_wfl, found;
check_throws_clauses (tree method, tree method_wfl, tree found)
{
tree mthrows, fthrows;
......@@ -6525,8 +6430,7 @@ check_throws_clauses (method, method_wfl, found)
/* Check abstract method of interface INTERFACE */
static void
java_check_abstract_methods (interface_decl)
tree interface_decl;
java_check_abstract_methods (tree interface_decl)
{
int i, n;
tree method, basetype_vec, found;
......@@ -6594,8 +6498,7 @@ java_check_abstract_methods (interface_decl)
signature. Return a matching method only if their types differ. */
static tree
lookup_java_interface_method2 (class, method_decl)
tree class, method_decl;
lookup_java_interface_method2 (tree class, tree method_decl)
{
int i, n;
tree basetype_vec = TYPE_BINFO_BASETYPES (class), to_return;
......@@ -6627,9 +6530,7 @@ lookup_java_interface_method2 (class, method_decl)
matching method only if their types differ. */
static tree
lookup_java_method2 (clas, method_decl, do_interface)
tree clas, method_decl;
int do_interface;
lookup_java_method2 (tree clas, tree method_decl, int do_interface)
{
tree method, method_signature, method_name, method_type, name;
......@@ -6662,8 +6563,7 @@ lookup_java_method2 (clas, method_decl, do_interface)
static GTY(()) tree cl_v;
static tree
lookup_cl (decl)
tree decl;
lookup_cl (tree decl)
{
char *line, *found;
......@@ -6692,8 +6592,7 @@ lookup_cl (decl)
/* Look for a simple name in the single-type import list */
static tree
find_name_in_single_imports (name)
tree name;
find_name_in_single_imports (tree name)
{
tree node;
......@@ -6707,7 +6606,7 @@ find_name_in_single_imports (name)
/* Process all single-type import. */
static int
process_imports ()
process_imports (void)
{
tree import;
int error_found;
......@@ -6766,9 +6665,7 @@ process_imports ()
statement. */
static void
find_in_imports (enclosing_type, class_type)
tree enclosing_type;
tree class_type;
find_in_imports (tree enclosing_type, tree class_type)
{
tree import = (enclosing_type ? TYPE_IMPORT_LIST (enclosing_type) :
ctxp->import_list);
......@@ -6785,9 +6682,7 @@ find_in_imports (enclosing_type, class_type)
}
static int
note_possible_classname (name, len)
const char *name;
int len;
note_possible_classname (const char *name, int len)
{
tree node;
if (len > 5 && strncmp (&name [len-5], ".java", 5) == 0)
......@@ -6807,8 +6702,7 @@ note_possible_classname (name, len)
directory. */
static void
read_import_dir (wfl)
tree wfl;
read_import_dir (tree wfl)
{
tree package_id = EXPR_WFL_NODE (wfl);
const char *package_name = IDENTIFIER_POINTER (package_id);
......@@ -6929,9 +6823,7 @@ read_import_dir (wfl)
entire list, to detected potential double definitions. */
static int
find_in_imports_on_demand (enclosing_type, class_type)
tree enclosing_type;
tree class_type;
find_in_imports_on_demand (tree enclosing_type, tree class_type)
{
tree class_type_name = TYPE_NAME (class_type);
tree import = (enclosing_type ? TYPE_IMPORT_DEMAND_LIST (enclosing_type) :
......@@ -7031,8 +6923,7 @@ find_in_imports_on_demand (enclosing_type, class_type)
particular package is added only once. */
static void
register_package (name)
tree name;
register_package (tree name)
{
static htab_t pht;
void **e;
......@@ -7049,8 +6940,7 @@ register_package (name)
}
static tree
resolve_package (pkg, next, type_name)
tree pkg, *next, *type_name;
resolve_package (tree pkg, tree *next, tree *type_name)
{
tree current;
tree decl = NULL_TREE;
......@@ -7091,8 +6981,7 @@ resolve_package (pkg, next, type_name)
access is being attempted. */
static void
check_inner_class_access (decl, enclosing_decl, cl)
tree decl, enclosing_decl, cl;
check_inner_class_access (tree decl, tree enclosing_decl, tree cl)
{
const char *access;
tree enclosing_decl_type;
......@@ -7207,10 +7096,7 @@ check_pkg_class_access (tree class_name, tree cl, bool verbose)
/* Local variable declaration. */
static void
declare_local_variables (modifier, type, vlist)
int modifier;
tree type;
tree vlist;
declare_local_variables (int modifier, tree type, tree vlist)
{
tree decl, current, saved_type;
tree type_wfl = NULL_TREE;
......@@ -7318,8 +7204,7 @@ declare_local_variables (modifier, type, vlist)
/* Called during parsing. Build decls from argument list. */
static void
source_start_java_method (fndecl)
tree fndecl;
source_start_java_method (tree fndecl)
{
tree tem;
tree parm_decl;
......@@ -7374,10 +7259,8 @@ source_start_java_method (fndecl)
/* Called during parsing. Creates an artificial method declaration. */
static tree
create_artificial_method (class, flags, type, name, args)
tree class;
int flags;
tree type, name, args;
create_artificial_method (tree class, int flags, tree type,
tree name, tree args)
{
tree mdecl;
......@@ -7395,8 +7278,7 @@ create_artificial_method (class, flags, type, name, args)
/* Starts the body if an artificial method. */
static void
start_artificial_method_body (mdecl)
tree mdecl;
start_artificial_method_body (tree mdecl)
{
DECL_SOURCE_LINE (mdecl) = 1;
DECL_SOURCE_LINE_MERGE (mdecl, 1);
......@@ -7405,8 +7287,7 @@ start_artificial_method_body (mdecl)
}
static void
end_artificial_method_body (mdecl)
tree mdecl;
end_artificial_method_body (tree mdecl)
{
/* exit_block modifies DECL_FUNCTION_BODY (current_function_decl).
It has to be evaluated first. (if mdecl is current_function_decl,
......@@ -7419,9 +7300,7 @@ end_artificial_method_body (mdecl)
/* Dump a tree of some kind. This is a convenience wrapper for the
dump_* functions in tree-dump.c. */
static void
dump_java_tree (phase, t)
enum tree_dump_index phase;
tree t;
dump_java_tree (enum tree_dump_index phase, tree t)
{
FILE *stream;
int flags;
......@@ -7438,7 +7317,7 @@ dump_java_tree (phase, t)
/* Terminate a function and expand its body. */
static void
source_end_java_method ()
source_end_java_method (void)
{
tree fndecl = current_function_decl;
......@@ -7491,8 +7370,7 @@ source_end_java_method ()
expression second operand if necessary. */
tree
java_method_add_stmt (fndecl, expr)
tree fndecl, expr;
java_method_add_stmt (tree fndecl, tree expr)
{
if (!GET_CURRENT_BLOCK (fndecl))
return NULL_TREE;
......@@ -7500,8 +7378,7 @@ java_method_add_stmt (fndecl, expr)
}
static tree
add_stmt_to_block (b, type, stmt)
tree b, type, stmt;
add_stmt_to_block (tree b, tree type, tree stmt)
{
tree body = BLOCK_EXPR_BODY (b), c;
......@@ -7520,8 +7397,7 @@ add_stmt_to_block (b, type, stmt)
COMPOUND_EXPR and add STMT to it. */
static tree
add_stmt_to_compound (existing, type, stmt)
tree existing, type, stmt;
add_stmt_to_compound (tree existing, tree type, tree stmt)
{
/* Keep track of this for inlining. */
if (current_function_decl)
......@@ -7533,7 +7409,7 @@ add_stmt_to_compound (existing, type, stmt)
return stmt;
}
void java_layout_seen_class_methods ()
void java_layout_seen_class_methods (void)
{
tree previous_list = all_class_list;
tree end = NULL_TREE;
......@@ -7557,7 +7433,7 @@ void java_layout_seen_class_methods ()
static GTY(()) tree stop_reordering;
void
java_reorder_fields ()
java_reorder_fields (void)
{
tree current;
......@@ -7602,7 +7478,7 @@ java_reorder_fields ()
classes */
void
java_layout_classes ()
java_layout_classes (void)
{
tree current;
int save_error_count = java_error_count;
......@@ -7639,7 +7515,7 @@ java_layout_classes ()
generation. */
static void
java_complete_expand_classes ()
java_complete_expand_classes (void)
{
tree current;
......@@ -7654,8 +7530,7 @@ java_complete_expand_classes ()
classes, if any. */
static void
java_complete_expand_class (outer)
tree outer;
java_complete_expand_class (tree outer)
{
tree inner_list;
......@@ -7681,8 +7556,7 @@ java_complete_expand_class (outer)
constructors and then <clinit>. */
static void
java_complete_expand_methods (class_decl)
tree class_decl;
java_complete_expand_methods (tree class_decl)
{
tree clinit, decl, first_decl;
......@@ -7783,8 +7657,7 @@ java_complete_expand_methods (class_decl)
safely used in some other methods/constructors. */
static tree
maybe_generate_pre_expand_clinit (class_type)
tree class_type;
maybe_generate_pre_expand_clinit (tree class_type)
{
tree current, mdecl;
......@@ -7843,8 +7716,7 @@ maybe_generate_pre_expand_clinit (class_type)
MODIFY_EXPR with a constant value. */
static int
analyze_clinit_body (this_class, bbody)
tree this_class, bbody;
analyze_clinit_body (tree this_class, tree bbody)
{
while (bbody)
switch (TREE_CODE (bbody))
......@@ -7892,8 +7764,7 @@ analyze_clinit_body (this_class, bbody)
is empty. Return 1 if <clinit> was discarded, 0 otherwise. */
static int
maybe_yank_clinit (mdecl)
tree mdecl;
maybe_yank_clinit (tree mdecl)
{
tree type, current;
tree fbody, bbody;
......@@ -7966,8 +7837,7 @@ maybe_yank_clinit (mdecl)
expansion of mdecl's body. */
static void
start_complete_expand_method (mdecl)
tree mdecl;
start_complete_expand_method (tree mdecl)
{
tree tem;
......@@ -8000,8 +7870,7 @@ start_complete_expand_method (mdecl)
/* Complete and expand a method. */
static void
java_complete_expand_method (mdecl)
tree mdecl;
java_complete_expand_method (tree mdecl)
{
tree fbody, block_body, exception_copy;
......@@ -8105,8 +7974,7 @@ java_complete_expand_method (mdecl)
/* For with each class for which there's code to generate. */
static void
java_expand_method_bodies (class)
tree class;
java_expand_method_bodies (tree class)
{
tree decl;
for (decl = TYPE_METHODS (class); decl; decl = TREE_CHAIN (decl))
......@@ -8178,8 +8046,7 @@ java_expand_method_bodies (class)
be later turned into a write by calling outer_field_access_fix. */
static tree
build_outer_field_access (id, decl)
tree id, decl;
build_outer_field_access (tree id, tree decl)
{
tree access = NULL_TREE;
tree ctx = TREE_TYPE (DECL_CONTEXT (TYPE_NAME (current_class)));
......@@ -8228,8 +8095,7 @@ build_outer_field_access (id, decl)
access. */
static int
outer_field_access_p (type, decl)
tree type, decl;
outer_field_access_p (tree type, tree decl)
{
if (!INNER_CLASS_TYPE_P (type)
|| TREE_CODE (decl) != FIELD_DECL
......@@ -8267,8 +8133,8 @@ outer_field_access_p (type, decl)
call if necessary. */
static int
outer_field_expanded_access_p (node, name, arg_type, arg)
tree node, *name, *arg_type, *arg;
outer_field_expanded_access_p (tree node, tree *name, tree *arg_type,
tree *arg)
{
int identified = 0;
......@@ -8314,8 +8180,7 @@ outer_field_expanded_access_p (node, name, arg_type, arg)
be identified. */
static tree
outer_field_access_fix (wfl, node, rhs)
tree wfl, node, rhs;
outer_field_access_fix (tree wfl, tree node, tree rhs)
{
tree name, arg_type, arg;
......@@ -8335,9 +8200,8 @@ outer_field_access_fix (wfl, node, rhs)
read access. */
static tree
build_outer_field_access_expr (lc, type, access_method_name, arg1, arg2)
int lc;
tree type, access_method_name, arg1, arg2;
build_outer_field_access_expr (int lc, tree type, tree access_method_name,
tree arg1, tree arg2)
{
tree args, cn, access;
......@@ -8354,7 +8218,7 @@ build_outer_field_access_expr (lc, type, access_method_name, arg1, arg2)
}
static tree
build_new_access_id ()
build_new_access_id (void)
{
static int access_n_counter = 1;
char buffer [128];
......@@ -8378,8 +8242,7 @@ build_new_access_id ()
*/
static tree
build_outer_field_access_methods (decl)
tree decl;
build_outer_field_access_methods (tree decl)
{
tree id, args, stmt, mdecl;
......@@ -8429,8 +8292,8 @@ build_outer_field_access_methods (decl)
/* Build an field access method NAME. */
static tree
build_outer_field_access_method (class, type, name, args, body)
tree class, type, name, args, body;
build_outer_field_access_method (tree class, tree type, tree name,
tree args, tree body)
{
tree saved_current_function_decl, mdecl;
......@@ -8454,8 +8317,7 @@ build_outer_field_access_method (class, type, name, args, body)
certain kinds of method invocation from inner classes. */
static tree
build_outer_method_access_method (decl)
tree decl;
build_outer_method_access_method (tree decl)
{
tree saved_current_function_decl, mdecl;
tree args = NULL_TREE, call_args = NULL_TREE;
......@@ -8544,9 +8406,7 @@ build_outer_method_access_method (decl)
for example build_outer_field_access). */
static tree
build_access_to_thisn (from, to, lc)
tree from, to;
int lc;
build_access_to_thisn (tree from, tree to, int lc)
{
tree access = NULL_TREE;
......@@ -8588,8 +8448,7 @@ build_access_to_thisn (from, to, lc)
attribute so that they can't be referred to directly. */
static tree
maybe_build_thisn_access_method (type)
tree type;
maybe_build_thisn_access_method (tree type)
{
tree mdecl, args, stmt, rtype;
tree saved_current_function_decl;
......@@ -8634,8 +8493,7 @@ static GTY(()) tree saved_thisn;
static GTY(()) tree saved_type;
static tree
build_current_thisn (type)
tree type;
build_current_thisn (tree type)
{
static int saved_i = -1;
static int saved_type_i = 0;
......@@ -8674,7 +8532,7 @@ build_current_thisn (type)
form used is `this.this$<n> = this$<n>;'. */
static tree
build_thisn_assign ()
build_thisn_assign (void)
{
if (current_class && PURE_INNER_CLASS_TYPE_P (current_class))
{
......@@ -8703,8 +8561,7 @@ static GTY(()) tree get_message_wfl;
static GTY(()) tree type_parm_wfl;
static tree
build_dot_class_method (class)
tree class;
build_dot_class_method (tree class)
{
#define BWF(S) build_wfl_node (get_identifier ((S)))
#define MQN(X,Y) make_qualified_name ((X), (Y), 0)
......@@ -8772,8 +8629,7 @@ build_dot_class_method (class)
}
static tree
build_dot_class_method_invocation (type)
tree type;
build_dot_class_method_invocation (tree type)
{
tree sig_id, s;
......@@ -8799,8 +8655,7 @@ build_dot_class_method_invocation (type)
necessary. */
static void
fix_constructors (mdecl)
tree mdecl;
fix_constructors (tree mdecl)
{
tree iii; /* Instance Initializer Invocation */
tree body = DECL_FUNCTION_BODY (mdecl);
......@@ -8920,8 +8775,7 @@ fix_constructors (mdecl)
for something that has the same signature. */
static int
verify_constructor_super (mdecl)
tree mdecl;
verify_constructor_super (tree mdecl)
{
tree class = CLASSTYPE_SUPER (current_class);
int super_inner = PURE_INNER_CLASS_TYPE_P (class);
......@@ -8973,7 +8827,7 @@ verify_constructor_super (mdecl)
static GTY(()) tree reversed_class_list;
void
java_expand_classes ()
java_expand_classes (void)
{
int save_error_count = 0;
static struct parser_ctxt *cur_ctxp = NULL;
......@@ -9096,9 +8950,7 @@ java_expand_classes ()
separating `.' operator. */
static tree
make_qualified_primary (primary, right, location)
tree primary, right;
int location;
make_qualified_primary (tree primary, tree right, int location)
{
tree wfl;
......@@ -9122,8 +8974,7 @@ make_qualified_primary (primary, right, location)
/* Simple merge of two name separated by a `.' */
static tree
merge_qualified_name (left, right)
tree left, right;
merge_qualified_name (tree left, tree right)
{
tree node;
if (!left && !right)
......@@ -9151,9 +9002,7 @@ merge_qualified_name (left, right)
inherited from the location information of the `.' operator. */
static tree
make_qualified_name (left, right, location)
tree left, right;
int location;
make_qualified_name (tree left, tree right, int location)
{
#ifdef USE_COMPONENT_REF
tree node = build (COMPONENT_REF, NULL_TREE, left, right);
......@@ -9187,8 +9036,7 @@ make_qualified_name (left, right, location)
last identifier is removed from the linked list */
static tree
cut_identifier_in_qualified (wfl)
tree wfl;
cut_identifier_in_qualified (tree wfl)
{
tree q;
tree previous = NULL_TREE;
......@@ -9207,9 +9055,7 @@ cut_identifier_in_qualified (wfl)
/* Resolve the expression name NAME. Return its decl. */
static tree
resolve_expression_name (id, orig)
tree id;
tree *orig;
resolve_expression_name (tree id, tree *orig)
{
tree name = EXPR_WFL_NODE (id);
tree decl;
......@@ -9311,8 +9157,7 @@ resolve_expression_name (id, orig)
}
static void
static_ref_err (wfl, field_id, class_type)
tree wfl, field_id, class_type;
static_ref_err (tree wfl, tree field_id, tree class_type)
{
parse_error_context
(wfl,
......@@ -9327,9 +9172,7 @@ static_ref_err (wfl, field_id, class_type)
recipient's address can be null. */
static tree
resolve_field_access (qual_wfl, field_decl, field_type)
tree qual_wfl;
tree *field_decl, *field_type;
resolve_field_access (tree qual_wfl, tree *field_decl, tree *field_type)
{
int is_static = 0;
tree field_ref;
......@@ -9392,8 +9235,7 @@ resolve_field_access (qual_wfl, field_decl, field_type)
NODE. */
static tree
strip_out_static_field_access_decl (node)
tree node;
strip_out_static_field_access_decl (tree node)
{
if (TREE_CODE (node) == COMPOUND_EXPR)
{
......@@ -9416,9 +9258,8 @@ strip_out_static_field_access_decl (node)
/* 6.5.5.2: Qualified Expression Names */
static int
resolve_qualified_expression_name (wfl, found_decl, where_found, type_found)
tree wfl;
tree *found_decl, *type_found, *where_found;
resolve_qualified_expression_name (tree wfl, tree *found_decl,
tree *where_found, tree *type_found)
{
int from_type = 0; /* Field search initiated from a type */
int from_super = 0, from_cast = 0, from_qualified_this = 0;
......@@ -9966,10 +9807,7 @@ resolve_qualified_expression_name (wfl, found_decl, where_found, type_found)
method. */
static int
not_accessible_p (reference, member, where, from_super)
tree reference, member;
tree where;
int from_super;
not_accessible_p (tree reference, tree member, tree where, int from_super)
{
int access_flag = get_access_flags_from_decl (member);
......@@ -10041,8 +9879,7 @@ not_accessible_p (reference, member, where, from_super)
/* Test deprecated decl access. */
static void
check_deprecation (wfl, decl)
tree wfl, decl;
check_deprecation (tree wfl, tree decl)
{
const char *file = DECL_SOURCE_FILE (decl);
/* Complain if the field is deprecated and the file it was defined
......@@ -10082,8 +9919,7 @@ check_deprecation (wfl, decl)
static GTY(()) tree cicp_cache;
static int
class_in_current_package (class)
tree class;
class_in_current_package (tree class)
{
int qualified_flag;
tree left;
......@@ -10119,8 +9955,7 @@ class_in_current_package (class)
done only if certain conditions meet. */
static tree
maybe_access_field (decl, where, type)
tree decl, where, type;
maybe_access_field (tree decl, tree where, tree type)
{
if (TREE_CODE (decl) == FIELD_DECL && decl != current_this
&& !FIELD_STATIC (decl))
......@@ -10135,12 +9970,8 @@ maybe_access_field (decl, where, type)
used. IS_STATIC is set to 1 if the invoked function is static. */
static tree
patch_method_invocation (patch, primary, where, from_super,
is_static, ret_decl)
tree patch, primary, where;
int from_super;
int *is_static;
tree *ret_decl;
patch_method_invocation (tree patch, tree primary, tree where, int from_super,
int *is_static, tree *ret_decl)
{
tree wfl = TREE_OPERAND (patch, 0);
tree args = TREE_OPERAND (patch, 1);
......@@ -10549,8 +10380,8 @@ patch_method_invocation (patch, primary, where, from_super,
non static method. Return 1 if it's the case, 0 otherwise. */
static int
check_for_static_method_reference (wfl, node, method, where, primary)
tree wfl, node, method, where, primary;
check_for_static_method_reference (tree wfl, tree node, tree method,
tree where, tree primary)
{
if (METHOD_STATIC (current_function_decl)
&& !METHOD_STATIC (method) && !primary && !CALL_CONSTRUCTOR_P (node))
......@@ -10572,9 +10403,7 @@ check_for_static_method_reference (wfl, node, method, where, primary)
returned. */
static int
maybe_use_access_method (is_super_init, mdecl, this_arg)
int is_super_init;
tree *mdecl, *this_arg;
maybe_use_access_method (int is_super_init, tree *mdecl, tree *this_arg)
{
tree ctx;
tree md = *mdecl, ta = *this_arg;
......@@ -10642,8 +10471,7 @@ maybe_use_access_method (is_super_init, mdecl, this_arg)
mode. */
static tree
patch_invoke (patch, method, args)
tree patch, method, args;
patch_invoke (tree patch, tree method, tree args)
{
tree dtable, func;
tree original_call, t, ta;
......@@ -10801,9 +10629,7 @@ patch_invoke (patch, method, args)
}
static int
invocation_mode (method, super)
tree method;
int super;
invocation_mode (tree method, int super)
{
int access = get_access_flags_from_decl (method);
......@@ -10834,10 +10660,7 @@ invocation_mode (method, super)
15.11.2 (Compile-Time Step 2) */
static tree
lookup_method_invoke (lc, cl, class, name, arg_list)
int lc;
tree cl;
tree class, name, arg_list;
lookup_method_invoke (int lc, tree cl, tree class, tree name, tree arg_list)
{
tree atl = end_params_node; /* Arg Type List */
tree method, signature, list, node;
......@@ -10920,9 +10743,8 @@ lookup_method_invoke (lc, cl, class, name, arg_list)
when we're looking for a constructor. */
static tree
find_applicable_accessible_methods_list (lc, class, name, arglist)
int lc;
tree class, name, arglist;
find_applicable_accessible_methods_list (int lc, tree class, tree name,
tree arglist)
{
static htab_t searched_classes;
static int search_not_done = 0;
......@@ -11040,10 +10862,8 @@ find_applicable_accessible_methods_list (lc, class, name, arglist)
/* Effectively search for the appropriate method in method */
static void
search_applicable_methods_list (lc, method, name, arglist, list, all_list)
int lc;
tree method, name, arglist;
tree *list, *all_list;
search_applicable_methods_list (int lc, tree method, tree name, tree arglist,
tree *list, tree *all_list)
{
for (; method; method = TREE_CHAIN (method))
{
......@@ -11071,8 +10891,7 @@ search_applicable_methods_list (lc, method, name, arglist, list, all_list)
/* 15.11.2.2 Choose the Most Specific Method */
static tree
find_most_specific_methods_list (list)
tree list;
find_most_specific_methods_list (tree list)
{
int max = 0;
int abstract, candidates;
......@@ -11162,8 +10981,7 @@ static GTY(()) tree m2_arg_value;
static GTY(()) tree m2_arg_cache;
static int
argument_types_convertible (m1, m2_or_arglist)
tree m1, m2_or_arglist;
argument_types_convertible (tree m1, tree m2_or_arglist)
{
register tree m1_arg, m2_arg;
......@@ -11203,8 +11021,7 @@ argument_types_convertible (m1, m2_or_arglist)
/* Qualification routines */
static void
qualify_ambiguous_name (id)
tree id;
qualify_ambiguous_name (tree id)
{
tree qual, qual_wfl, name = NULL_TREE, decl, ptr_type = NULL_TREE,
saved_current_class;
......@@ -11436,8 +11253,7 @@ qualify_ambiguous_name (id)
}
static int
breakdown_qualified (left, right, source)
tree *left, *right, source;
breakdown_qualified (tree *left, tree *right, tree source)
{
char *p, *base;
int l = IDENTIFIER_LENGTH (source);
......@@ -11465,8 +11281,7 @@ breakdown_qualified (left, right, source)
/* Return TRUE if two classes are from the same package. */
static int
in_same_package (name1, name2)
tree name1, name2;
in_same_package (tree name1, tree name2)
{
tree tmp;
tree pkg1;
......@@ -11496,8 +11311,7 @@ in_same_package (name1, name2)
Same as java_complete_lhs, but does resolve static finals to values. */
static tree
java_complete_tree (node)
tree node;
java_complete_tree (tree node)
{
node = java_complete_lhs (node);
if (JDECL_P (node) && CLASS_FINAL_VARIABLE_P (node)
......@@ -11512,8 +11326,7 @@ java_complete_tree (node)
}
static tree
java_stabilize_reference (node)
tree node;
java_stabilize_reference (tree node)
{
if (TREE_CODE (node) == COMPOUND_EXPR)
{
......@@ -11531,8 +11344,7 @@ java_stabilize_reference (node)
Same as java_complete_tree, but does not resolve static finals to values. */
static tree
java_complete_lhs (node)
tree node;
java_complete_lhs (tree node)
{
tree nn, cn, wfl_op1, wfl_op2, wfl_op3;
int flag;
......@@ -12293,8 +12105,7 @@ java_complete_lhs (node)
error was found. */
static int
complete_function_arguments (node)
tree node;
complete_function_arguments (tree node)
{
int flag = 0;
tree cn;
......@@ -12327,9 +12138,7 @@ complete_function_arguments (node)
debugable. */
static tree
build_debugable_stmt (location, stmt)
int location;
tree stmt;
build_debugable_stmt (int location, tree stmt)
{
if (TREE_CODE (stmt) != EXPR_WITH_FILE_LOCATION)
{
......@@ -12341,8 +12150,8 @@ build_debugable_stmt (location, stmt)
}
static tree
build_expr_block (body, decls)
tree body, decls;
build_expr_block (tree body, tree decls)
{
tree node = make_node (BLOCK);
BLOCK_EXPR_DECLS (node) = decls;
......@@ -12357,7 +12166,7 @@ build_expr_block (body, decls)
function block chain */
static tree
enter_block ()
enter_block (void)
{
tree b = build_expr_block (NULL_TREE, NULL_TREE);
......@@ -12391,7 +12200,7 @@ enter_block ()
the block being exited isn't the method's top level one. */
static tree
exit_block ()
exit_block (void)
{
tree b;
if (current_function_decl)
......@@ -12415,8 +12224,7 @@ exit_block ()
scoping rules. */
static tree
lookup_name_in_blocks (name)
tree name;
lookup_name_in_blocks (tree name)
{
tree b = GET_CURRENT_BLOCK (current_function_decl);
......@@ -12438,7 +12246,7 @@ lookup_name_in_blocks (name)
}
static void
maybe_absorb_scoping_blocks ()
maybe_absorb_scoping_blocks (void)
{
while (BLOCK_IS_IMPLICIT (GET_CURRENT_BLOCK (current_function_decl)))
{
......@@ -12456,9 +12264,7 @@ maybe_absorb_scoping_blocks ()
/* Wrap a non WFL node around a WFL. */
static tree
build_wfl_wrap (node, location)
tree node;
int location;
build_wfl_wrap (tree node, int location)
{
tree wfl, node_to_insert = node;
......@@ -12479,8 +12285,7 @@ build_wfl_wrap (node, location)
we're currently dealing with the class java.lang.Object. */
static tree
build_super_invocation (mdecl)
tree mdecl;
build_super_invocation (tree mdecl)
{
if (DECL_CONTEXT (mdecl) == object_type_node)
return empty_stmt_node;
......@@ -12503,10 +12308,8 @@ build_super_invocation (mdecl)
/* Build a SUPER/THIS qualified method invocation. */
static tree
build_this_super_qualified_invocation (use_this, name, args, lloc, rloc)
int use_this;
tree name, args;
int lloc, rloc;
build_this_super_qualified_invocation (int use_this, tree name, tree args,
int lloc, int rloc)
{
tree invok;
tree wfl =
......@@ -12519,9 +12322,7 @@ build_this_super_qualified_invocation (use_this, name, args, lloc, rloc)
/* Build an incomplete CALL_EXPR node. */
static tree
build_method_invocation (name, args)
tree name;
tree args;
build_method_invocation (tree name, tree args)
{
tree call = build (CALL_EXPR, NULL_TREE, name, args, NULL_TREE);
TREE_SIDE_EFFECTS (call) = 1;
......@@ -12532,8 +12333,7 @@ build_method_invocation (name, args)
/* Build an incomplete new xxx(...) node. */
static tree
build_new_invocation (name, args)
tree name, args;
build_new_invocation (tree name, tree args)
{
tree call = build (NEW_CLASS_EXPR, NULL_TREE, name, args, NULL_TREE);
TREE_SIDE_EFFECTS (call) = 1;
......@@ -12544,9 +12344,7 @@ build_new_invocation (name, args)
/* Build an incomplete assignment expression. */
static tree
build_assignment (op, op_location, lhs, rhs)
int op, op_location;
tree lhs, rhs;
build_assignment (int op, int op_location, tree lhs, tree rhs)
{
tree assignment;
/* Build the corresponding binop if we deal with a Compound
......@@ -12566,8 +12364,7 @@ build_assignment (op, op_location, lhs, rhs)
/* Print an INTEGER_CST node as decimal in a static buffer, and return
the buffer. This is used only for string conversion. */
static char *
string_convert_int_cst (node)
tree node;
string_convert_int_cst (tree node)
{
static char buffer[80];
......@@ -12640,8 +12437,7 @@ string_convert_int_cst (node)
/* Print an INTEGER_CST node in a static buffer, and return the
buffer. This is used only for error handling. */
char *
print_int_node (node)
tree node;
print_int_node (tree node)
{
static char buffer [80];
if (TREE_CONSTANT_OVERFLOW (node))
......@@ -12671,9 +12467,7 @@ print_int_node (node)
/* 15.25 Assignment operators. */
static tree
patch_assignment (node, wfl_op1)
tree node;
tree wfl_op1;
patch_assignment (tree node, tree wfl_op1)
{
tree rhs = TREE_OPERAND (node, 1);
tree lvalue = TREE_OPERAND (node, 0), llvalue;
......@@ -12844,8 +12638,7 @@ patch_assignment (node, wfl_op1)
modified rhs. */
static tree
try_reference_assignconv (lhs_type, rhs)
tree lhs_type, rhs;
try_reference_assignconv (tree lhs_type, tree rhs)
{
tree new_rhs = NULL_TREE;
tree rhs_type = TREE_TYPE (rhs);
......@@ -12871,8 +12664,7 @@ try_reference_assignconv (lhs_type, rhs)
builtin type. Return a converted RHS if the conversion is possible. */
static tree
try_builtin_assignconv (wfl_op1, lhs_type, rhs)
tree wfl_op1, lhs_type, rhs;
try_builtin_assignconv (tree wfl_op1, tree lhs_type, tree rhs)
{
tree new_rhs = NULL_TREE;
tree rhs_type = TREE_TYPE (rhs);
......@@ -12922,8 +12714,7 @@ try_builtin_assignconv (wfl_op1, lhs_type, rhs)
invocation convertion (5.3). */
static int
valid_builtin_assignconv_identity_widening_p (lhs_type, rhs_type)
tree lhs_type, rhs_type;
valid_builtin_assignconv_identity_widening_p (tree lhs_type, tree rhs_type)
{
/* 5.1.1: This is the identity conversion part. */
if (lhs_type == rhs_type)
......@@ -12968,10 +12759,7 @@ valid_builtin_assignconv_identity_widening_p (lhs_type, rhs_type)
assignment check. */
static int
valid_ref_assignconv_cast_p (source, dest, cast)
tree source;
tree dest;
int cast;
valid_ref_assignconv_cast_p (tree source, tree dest, int cast)
{
/* SOURCE or DEST might be null if not from a declared entity. */
if (!source || !dest)
......@@ -13101,9 +12889,7 @@ valid_ref_assignconv_cast_p (source, dest, cast)
}
static int
valid_cast_to_p (source, dest)
tree source;
tree dest;
valid_cast_to_p (tree source, tree dest)
{
if (TREE_CODE (source) == POINTER_TYPE)
source = TREE_TYPE (source);
......@@ -13124,8 +12910,7 @@ valid_cast_to_p (source, dest)
}
static tree
do_unary_numeric_promotion (arg)
tree arg;
do_unary_numeric_promotion (tree arg)
{
tree type = TREE_TYPE (arg);
if ((TREE_CODE (type) == INTEGER_TYPE && TYPE_PRECISION (type) < 32)
......@@ -13137,8 +12922,7 @@ do_unary_numeric_promotion (arg)
/* Return a nonzero value if SOURCE can be converted into DEST using
the method invocation conversion rule (5.3). */
static int
valid_method_invocation_conversion_p (dest, source)
tree dest, source;
valid_method_invocation_conversion_p (tree dest, tree source)
{
return ((JPRIMITIVE_TYPE_P (source) && JPRIMITIVE_TYPE_P (dest)
&& valid_builtin_assignconv_identity_widening_p (dest, source))
......@@ -13150,10 +12934,7 @@ valid_method_invocation_conversion_p (dest, source)
/* Build an incomplete binop expression. */
static tree
build_binop (op, op_location, op1, op2)
enum tree_code op;
int op_location;
tree op1, op2;
build_binop (enum tree_code op, int op_location, tree op1, tree op2)
{
tree binop = build (op, NULL_TREE, op1, op2);
TREE_SIDE_EFFECTS (binop) = 1;
......@@ -13170,8 +12951,7 @@ build_binop (op, op_location, op1, op2)
buffer. */
static char *
operator_string (node)
tree node;
operator_string (tree node)
{
#define BUILD_OPERATOR_STRING(S) \
{ \
......@@ -13220,8 +13000,7 @@ operator_string (node)
/* Return 1 if VAR_ACCESS1 is equivalent to VAR_ACCESS2. */
static int
java_decl_equiv (var_acc1, var_acc2)
tree var_acc1, var_acc2;
java_decl_equiv (tree var_acc1, tree var_acc2)
{
if (JDECL_P (var_acc1))
return (var_acc1 == var_acc2);
......@@ -13237,8 +13016,7 @@ java_decl_equiv (var_acc1, var_acc2)
used in conjunction with the `=' operator in a compound assignment. */
static int
binop_compound_p (code)
enum tree_code code;
binop_compound_p (enum tree_code code)
{
int i;
for (i = 0; i < BINOP_COMPOUND_CANDIDATES; i++)
......@@ -13251,8 +13029,7 @@ binop_compound_p (code)
/* Reorganize after a fold to get SAVE_EXPR to generate what we want. */
static tree
java_refold (t)
tree t;
java_refold (tree t)
{
tree c, b, ns, decl;
......@@ -13299,10 +13076,7 @@ java_refold (t)
of remaining nodes and detects more errors in certain cases. */
static tree
patch_binop (node, wfl_op1, wfl_op2)
tree node;
tree wfl_op1;
tree wfl_op2;
patch_binop (tree node, tree wfl_op1, tree wfl_op2)
{
tree op1 = TREE_OPERAND (node, 0);
tree op2 = TREE_OPERAND (node, 1);
......@@ -13722,10 +13496,7 @@ patch_binop (node, wfl_op1, wfl_op2)
zero value, the value of CSTE comes after the valude of STRING */
static tree
do_merge_string_cste (cste, string, string_len, after)
tree cste;
const char *string;
int string_len, after;
do_merge_string_cste (tree cste, const char *string, int string_len, int after)
{
const char *old = TREE_STRING_POINTER (cste);
int old_len = TREE_STRING_LENGTH (cste);
......@@ -13750,9 +13521,7 @@ do_merge_string_cste (cste, string, string_len, after)
new STRING_CST on success, NULL_TREE on failure */
static tree
merge_string_cste (op1, op2, after)
tree op1, op2;
int after;
merge_string_cste (tree op1, tree op2, int after)
{
/* Handle two string constants right away */
if (TREE_CODE (op2) == STRING_CST)
......@@ -13808,8 +13577,7 @@ merge_string_cste (op1, op2, after)
NULL_TREE for each invocation of this routine. FIXME */
static tree
string_constant_concatenation (op1, op2)
tree op1, op2;
string_constant_concatenation (tree op1, tree op2)
{
if (TREE_CODE (op1) == STRING_CST || (TREE_CODE (op2) == STRING_CST))
{
......@@ -13843,8 +13611,7 @@ string_constant_concatenation (op1, op2)
called on it to turn it into a String object. */
static tree
build_string_concatenation (op1, op2)
tree op1, op2;
build_string_concatenation (tree op1, tree op2)
{
tree result;
int side_effects = TREE_SIDE_EFFECTS (op1) | TREE_SIDE_EFFECTS (op2);
......@@ -13913,8 +13680,7 @@ build_string_concatenation (op1, op2)
NULL. */
static tree
patch_string (node)
tree node;
patch_string (tree node)
{
if (node == error_mark_node)
return error_mark_node;
......@@ -13940,8 +13706,7 @@ patch_string (node)
/* Build the internal representation of a string constant. */
static tree
patch_string_cst (node)
tree node;
patch_string_cst (tree node)
{
int location;
if (! flag_emit_class_files)
......@@ -13958,9 +13723,7 @@ patch_string_cst (node)
/* Build an incomplete unary operator expression. */
static tree
build_unaryop (op_token, op_location, op1)
int op_token, op_location;
tree op1;
build_unaryop (int op_token, int op_location, tree op1)
{
enum tree_code op;
tree unaryop;
......@@ -13986,10 +13749,7 @@ build_unaryop (op_token, op_location, op1)
later. IS_POST_P is 1 if the operator, 0 otherwise. */
static tree
build_incdec (op_token, op_location, op1, is_post_p)
int op_token, op_location;
tree op1;
int is_post_p;
build_incdec (int op_token, int op_location, tree op1, int is_post_p)
{
static const enum tree_code lookup [2][2] =
{
......@@ -14011,9 +13771,7 @@ build_incdec (op_token, op_location, op1, is_post_p)
though its type is already set. */
static tree
build_cast (location, type, exp)
int location;
tree type, exp;
build_cast (int location, tree type, tree exp)
{
tree node = build1 (CONVERT_EXPR, type, exp);
EXPR_WFL_LINECOL (node) = location;
......@@ -14022,9 +13780,7 @@ build_cast (location, type, exp)
/* Build an incomplete class reference operator. */
static tree
build_incomplete_class_ref (location, class_name)
int location;
tree class_name;
build_incomplete_class_ref (int location, tree class_name)
{
tree node = build1 (CLASS_LITERAL, NULL_TREE, class_name);
EXPR_WFL_LINECOL (node) = location;
......@@ -14033,8 +13789,7 @@ build_incomplete_class_ref (location, class_name)
/* Complete an incomplete class reference operator. */
static tree
patch_incomplete_class_ref (node)
tree node;
patch_incomplete_class_ref (tree node)
{
tree type = TREE_OPERAND (node, 0);
tree ref_type;
......@@ -14071,9 +13826,7 @@ patch_incomplete_class_ref (node)
but preserve the type of NODE if the type is fixed. */
static tree
patch_unaryop (node, wfl_op)
tree node;
tree wfl_op;
patch_unaryop (tree node, tree wfl_op)
{
tree op = TREE_OPERAND (node, 0);
tree op_type = TREE_TYPE (op);
......@@ -14261,8 +14014,7 @@ patch_unaryop (node, wfl_op)
message. Return the resolved type or NULL_TREE. */
static tree
resolve_type_during_patch (type)
tree type;
resolve_type_during_patch (tree type)
{
if (unresolved_type_p (type, NULL))
{
......@@ -14282,9 +14034,7 @@ resolve_type_during_patch (type)
found. Otherwise NODE or something meant to replace it is returned. */
static tree
patch_cast (node, wfl_op)
tree node;
tree wfl_op;
patch_cast (tree node, tree wfl_op)
{
tree op = TREE_OPERAND (node, 0);
tree cast_type = TREE_TYPE (node);
......@@ -14367,8 +14117,7 @@ patch_cast (node, wfl_op)
/* Build a null constant and give it the type TYPE. */
static tree
build_null_of_type (type)
tree type;
build_null_of_type (tree type)
{
tree node = build_int_2 (0, 0);
TREE_TYPE (node) = promote_type (type);
......@@ -14378,9 +14127,7 @@ build_null_of_type (type)
/* Build an ARRAY_REF incomplete tree node. Note that operand 1 isn't
a list of indices. */
static tree
build_array_ref (location, array, index)
int location;
tree array, index;
build_array_ref (int location, tree array, tree index)
{
tree node = build (ARRAY_REF, NULL_TREE, array, index);
EXPR_WFL_LINECOL (node) = location;
......@@ -14390,8 +14137,7 @@ build_array_ref (location, array, index)
/* 15.12 Array Access Expression */
static tree
patch_array_ref (node)
tree node;
patch_array_ref (tree node)
{
tree array = TREE_OPERAND (node, 0);
tree array_type = TREE_TYPE (array);
......@@ -14451,10 +14197,7 @@ patch_array_ref (node)
/* 15.9 Array Creation Expressions */
static tree
build_newarray_node (type, dims, extra_dims)
tree type;
tree dims;
int extra_dims;
build_newarray_node (tree type, tree dims, int extra_dims)
{
tree node =
build (NEW_ARRAY_EXPR, NULL_TREE, type, nreverse (dims),
......@@ -14463,8 +14206,7 @@ build_newarray_node (type, dims, extra_dims)
}
static tree
patch_newarray (node)
tree node;
patch_newarray (tree node)
{
tree type = TREE_OPERAND (node, 0);
tree dims = TREE_OPERAND (node, 1);
......@@ -14567,8 +14309,7 @@ patch_newarray (node)
pin-point errors. */
static tree
maybe_build_array_element_wfl (node)
tree node;
maybe_build_array_element_wfl (tree node)
{
if (TREE_CODE (node) != EXPR_WITH_FILE_LOCATION)
return build_expr_wfl (NULL_TREE, ctxp->filename,
......@@ -14582,9 +14323,7 @@ maybe_build_array_element_wfl (node)
and expansion. */
static tree
build_new_array_init (location, values)
int location;
tree values;
build_new_array_init (int location, tree values)
{
tree constructor = build (CONSTRUCTOR, NULL_TREE, NULL_TREE, values);
tree to_return = build1 (NEW_ARRAY_INIT, NULL_TREE, constructor);
......@@ -14597,8 +14336,7 @@ build_new_array_init (location, values)
appropriately. */
static tree
patch_new_array_init (type, node)
tree type, node;
patch_new_array_init (tree type, tree node)
{
int error_seen = 0;
tree current, element_type;
......@@ -14661,8 +14399,7 @@ patch_new_array_init (type, node)
otherwise. */
static int
array_constructor_check_entry (type, entry)
tree type, entry;
array_constructor_check_entry (tree type, tree entry)
{
char *array_type_string = NULL; /* For error reports */
tree value, type_value, new_value, wfl_value, patched;
......@@ -14711,8 +14448,7 @@ array_constructor_check_entry (type, entry)
}
static tree
build_this (location)
int location;
build_this (int location)
{
tree node = build_wfl_node (this_identifier_node);
TREE_SET_CODE (node, THIS_EXPR);
......@@ -14725,9 +14461,7 @@ build_this (location)
to be returned. */
static tree
build_return (location, op)
int location;
tree op;
build_return (int location, tree op)
{
tree node = build1 (RETURN_EXPR, NULL_TREE, op);
EXPR_WFL_LINECOL (node) = location;
......@@ -14736,8 +14470,7 @@ build_return (location, op)
}
static tree
patch_return (node)
tree node;
patch_return (tree node)
{
tree return_exp = TREE_OPERAND (node, 0);
tree meth = current_function_decl;
......@@ -14821,9 +14554,8 @@ patch_return (node)
/* 14.8 The if Statement */
static tree
build_if_else_statement (location, expression, if_body, else_body)
int location;
tree expression, if_body, else_body;
build_if_else_statement (int location, tree expression, tree if_body,
tree else_body)
{
tree node;
if (!else_body)
......@@ -14835,8 +14567,7 @@ build_if_else_statement (location, expression, if_body, else_body)
}
static tree
patch_if_else_statement (node)
tree node;
patch_if_else_statement (tree node)
{
tree expression = TREE_OPERAND (node, 0);
int can_complete_normally
......@@ -14883,9 +14614,7 @@ patch_if_else_statement (node)
label, yet. LABEL can be NULL_TREE for artificially-generated blocks. */
static tree
build_labeled_block (location, label)
int location;
tree label;
build_labeled_block (int location, tree label)
{
tree label_name ;
tree label_decl, node;
......@@ -14921,9 +14650,8 @@ build_labeled_block (location, label)
/* A labeled statement LBE is attached a statement. */
static tree
finish_labeled_statement (lbe, statement)
tree lbe; /* Labeled block expr */
tree statement;
finish_labeled_statement (tree lbe, /* Labeled block expr */
tree statement)
{
/* In anyways, tie the loop to its statement */
LABELED_BLOCK_BODY (lbe) = statement;
......@@ -14938,8 +14666,7 @@ finish_labeled_statement (lbe, statement)
list. */
static tree
build_new_loop (loop_body)
tree loop_body;
build_new_loop (tree loop_body)
{
tree loop = build (LOOP_EXPR, NULL_TREE, loop_body);
TREE_SIDE_EFFECTS (loop) = 1;
......@@ -14968,10 +14695,7 @@ build_new_loop (loop_body)
<structure described above> */
static tree
build_loop_body (location, condition, reversed)
int location;
tree condition;
int reversed;
build_loop_body (int location, tree condition, int reversed)
{
tree first, second, body;
......@@ -14993,10 +14717,7 @@ build_loop_body (location, condition, reversed)
loop list. */
static tree
finish_loop_body (location, condition, body, reversed)
int location;
tree condition, body;
int reversed;
finish_loop_body (int location, tree condition, tree body, int reversed)
{
tree to_return = ctxp->current_loop;
tree loop_body = LOOP_EXPR_BODY (to_return);
......@@ -15019,9 +14740,7 @@ finish_loop_body (location, condition, body, reversed)
loops feature the condition part */
static tree
finish_for_loop (location, condition, update, body)
int location;
tree condition, update, body;
finish_for_loop (int location, tree condition, tree update, tree body)
{
/* Put the condition and the loop body in place */
tree loop = finish_loop_body (location, condition, body, 0);
......@@ -15055,8 +14774,7 @@ finish_for_loop (location, condition, update, body)
LABELED_BLOCK_EXPR's block. */
static tree
search_loop (statement)
tree statement;
search_loop (tree statement)
{
if (TREE_CODE (statement) == LOOP_EXPR)
return statement;
......@@ -15078,8 +14796,7 @@ search_loop (statement)
returned otherwise. */
static int
labeled_block_contains_loop_p (block, loop)
tree block, loop;
labeled_block_contains_loop_p (tree block, tree loop)
{
if (!block)
return 0;
......@@ -15097,8 +14814,7 @@ labeled_block_contains_loop_p (block, loop)
insert LOOP as its body. */
static tree
patch_loop_statement (loop)
tree loop;
patch_loop_statement (tree loop)
{
tree loop_label;
......@@ -15120,9 +14836,7 @@ patch_loop_statement (loop)
unlabeled break/continue statement. */
static tree
build_bc_statement (location, is_break, name)
int location, is_break;
tree name;
build_bc_statement (int location, int is_break, tree name)
{
tree break_continue, label_block_expr = NULL_TREE;
......@@ -15151,8 +14865,7 @@ build_bc_statement (location, is_break, name)
/* Verification of a break/continue statement. */
static tree
patch_bc_statement (node)
tree node;
patch_bc_statement (tree node)
{
tree bc_label = EXIT_BLOCK_LABELED_BLOCK (node), target_stmt;
tree labeled_block = ctxp->current_labeled_block;
......@@ -15228,8 +14941,7 @@ patch_bc_statement (node)
boolean. */
static tree
patch_exit_expr (node)
tree node;
patch_exit_expr (tree node)
{
tree expression = TREE_OPERAND (node, 0);
TREE_TYPE (node) = error_mark_node;
......@@ -15264,8 +14976,7 @@ patch_exit_expr (node)
/* 14.9 Switch statement */
static tree
patch_switch_statement (node)
tree node;
patch_switch_statement (tree node)
{
tree se = TREE_OPERAND (node, 0), se_type;
tree save, iter;
......@@ -15342,9 +15053,7 @@ patch_switch_statement (node)
/* Build an assertion expression for `assert CONDITION : VALUE'; VALUE
might be NULL_TREE. */
static tree
build_assertion (location, condition, value)
int location;
tree condition, value;
build_assertion (int location, tree condition, tree value)
{
tree node;
tree klass = GET_CPC ();
......@@ -15421,9 +15130,8 @@ build_assertion (location, condition, value)
catches TYPE and executes CATCH_STMTS. */
static tree
encapsulate_with_try_catch (location, type, try_stmts, catch_stmts)
int location;
tree type, try_stmts, catch_stmts;
encapsulate_with_try_catch (int location, tree type, tree try_stmts,
tree catch_stmts)
{
tree try_block, catch_clause_param, catch_block, catch;
......@@ -15451,9 +15159,7 @@ encapsulate_with_try_catch (location, type, try_stmts, catch_stmts)
}
static tree
build_try_statement (location, try_block, catches)
int location;
tree try_block, catches;
build_try_statement (int location, tree try_block, tree catches)
{
tree node = build (TRY_EXPR, NULL_TREE, try_block, catches);
EXPR_WFL_LINECOL (node) = location;
......@@ -15461,9 +15167,7 @@ build_try_statement (location, try_block, catches)
}
static tree
build_try_finally_statement (location, try_block, finally)
int location;
tree try_block, finally;
build_try_finally_statement (int location, tree try_block, tree finally)
{
tree node = build (TRY_FINALLY_EXPR, NULL_TREE, try_block, finally);
EXPR_WFL_LINECOL (node) = location;
......@@ -15471,8 +15175,7 @@ build_try_finally_statement (location, try_block, finally)
}
static tree
patch_try_statement (node)
tree node;
patch_try_statement (tree node)
{
int error_found = 0;
tree try = TREE_OPERAND (node, 0);
......@@ -15583,8 +15286,7 @@ patch_try_statement (node)
/* 14.17 The synchronized Statement */
static tree
patch_synchronized_statement (node, wfl_op1)
tree node, wfl_op1;
patch_synchronized_statement (tree node, tree wfl_op1)
{
tree expr = java_complete_tree (TREE_OPERAND (node, 0));
tree block = TREE_OPERAND (node, 1);
......@@ -15653,8 +15355,7 @@ patch_synchronized_statement (node, wfl_op1)
/* 14.16 The throw Statement */
static tree
patch_throw_statement (node, wfl_op1)
tree node, wfl_op1;
patch_throw_statement (tree node, tree wfl_op1)
{
tree expr = TREE_OPERAND (node, 0);
tree type = TREE_TYPE (expr);
......@@ -15756,9 +15457,7 @@ patch_throw_statement (node, wfl_op1)
effectively caught from where DECL is invoked. */
static void
check_thrown_exceptions (location, decl)
int location;
tree decl;
check_thrown_exceptions (int location, tree decl)
{
tree throws;
/* For all the unchecked exceptions thrown by DECL */
......@@ -15793,8 +15492,7 @@ check_thrown_exceptions (location, decl)
current method. */
static int
check_thrown_exceptions_do (exception)
tree exception;
check_thrown_exceptions_do (tree exception)
{
tree list = currently_caught_type_list;
resolve_and_layout (exception, NULL_TREE);
......@@ -15814,8 +15512,7 @@ check_thrown_exceptions_do (exception)
}
static void
purge_unchecked_exceptions (mdecl)
tree mdecl;
purge_unchecked_exceptions (tree mdecl)
{
tree throws = DECL_FUNCTION_THROWS (mdecl);
tree new = NULL_TREE;
......@@ -15840,8 +15537,7 @@ purge_unchecked_exceptions (mdecl)
otherwise. */
static bool
ctors_unchecked_throws_clause_p (class_type)
tree class_type;
ctors_unchecked_throws_clause_p (tree class_type)
{
tree current;
......@@ -15869,8 +15565,7 @@ ctors_unchecked_throws_clause_p (class_type)
/* 15.24 Conditional Operator ?: */
static tree
patch_conditional_expr (node, wfl_cond, wfl_op1)
tree node, wfl_cond, wfl_op1;
patch_conditional_expr (tree node, tree wfl_cond, tree wfl_op1)
{
tree cond = TREE_OPERAND (node, 0);
tree op1 = TREE_OPERAND (node, 1);
......@@ -15983,8 +15678,7 @@ patch_conditional_expr (node, wfl_cond, wfl_op1)
/* Wrap EXPR with code to initialize DECL's class, if appropriate. */
static tree
maybe_build_class_init_for_field (decl, expr)
tree decl, expr;
maybe_build_class_init_for_field (tree decl, tree expr)
{
tree clas = DECL_CONTEXT (decl);
if (flag_emit_class_files || flag_emit_xref)
......@@ -16008,9 +15702,7 @@ maybe_build_class_init_for_field (decl, expr)
CONTEXT is a static final VAR_DECL whose initializer we are folding. */
static tree
fold_constant_for_init (node, context)
tree node;
tree context;
fold_constant_for_init (tree node, tree context)
{
tree op0, op1, val;
enum tree_code code = TREE_CODE (node);
......@@ -16157,22 +15849,18 @@ fold_constant_for_init (node, context)
'M' for MethodName, 'E' for ExpressionName, and 'A' for AmbiguousName. */
tree
resolve_simple_name (name, context)
tree name;
int context;
resolve_simple_name (tree name, int context)
{
}
tree
resolve_qualified_name (name, context)
tree name;
int context;
resolve_qualified_name (tree name, int context)
{
}
#endif
void
init_src_parse ()
init_src_parse (void)
{
/* Sanity check; we've been bit by this before. */
if (ARRAY_SIZE (ctxp->modifier_ctx) != MODIFIER_TK - PUBLIC_TK)
......@@ -16187,9 +15875,7 @@ init_src_parse ()
/* Attach to PTR (a block) the declaration found in ENTRY. */
static int
attach_init_test_initialization_flags (entry, ptr)
void **entry;
void *ptr;
attach_init_test_initialization_flags (void **entry, void *ptr)
{
tree block = (tree)ptr;
struct treetreehash_entry *ite = (struct treetreehash_entry *) *entry;
......@@ -16209,9 +15895,7 @@ attach_init_test_initialization_flags (entry, ptr)
a new one is created. */
static int
emit_test_initialization (entry_p, info)
void **entry_p;
void *info;
emit_test_initialization (void **entry_p, void *info)
{
tree l = (tree) info;
tree decl, init;
......
......@@ -50,9 +50,7 @@ tree * type_map;
/* Set the type of the local variable with index SLOT to TYPE. */
void
set_local_type (slot, type)
int slot;
tree type;
set_local_type (int slot, tree type)
{
int max_locals = DECL_MAX_LOCALS(current_function_decl);
int nslots = TYPE_IS_WIDE (type) ? 2 : 1;
......@@ -80,8 +78,7 @@ set_local_type (slot, type)
: (int)expr))) */
static tree
convert_ieee_real_to_integer (type, expr)
tree type, expr;
convert_ieee_real_to_integer (tree type, tree expr)
{
tree result;
expr = save_expr (expr);
......@@ -113,8 +110,7 @@ convert_ieee_real_to_integer (type, expr)
not permitted by the language being compiled. */
tree
convert (type, expr)
tree type, expr;
convert (tree type, tree expr)
{
register enum tree_code code = TREE_CODE (type);
......@@ -155,15 +151,13 @@ convert (type, expr)
tree
convert_to_char (type, expr)
tree type, expr;
convert_to_char (tree type, tree expr)
{
return build1 (NOP_EXPR, type, expr);
}
tree
convert_to_boolean (type, expr)
tree type, expr;
convert_to_boolean (tree type, tree expr)
{
return build1 (NOP_EXPR, type, expr);
}
......@@ -173,9 +167,7 @@ convert_to_boolean (type, expr)
then UNSIGNEDP selects between signed and unsigned types. */
tree
java_type_for_mode (mode, unsignedp)
enum machine_mode mode;
int unsignedp;
java_type_for_mode (enum machine_mode mode, int unsignedp)
{
if (mode == TYPE_MODE (int_type_node))
return unsignedp ? unsigned_int_type_node : int_type_node;
......@@ -197,9 +189,7 @@ java_type_for_mode (mode, unsignedp)
that is unsigned if UNSIGNEDP is nonzero, otherwise signed. */
tree
java_type_for_size (bits, unsignedp)
unsigned bits;
int unsignedp;
java_type_for_size (unsigned bits, int unsignedp)
{
if (bits <= TYPE_PRECISION (byte_type_node))
return unsignedp ? unsigned_byte_type_node : byte_type_node;
......@@ -216,9 +206,7 @@ java_type_for_size (bits, unsignedp)
signed according to UNSIGNEDP. */
tree
java_signed_or_unsigned_type (unsignedp, type)
int unsignedp;
tree type;
java_signed_or_unsigned_type (int unsignedp, tree type)
{
if (! INTEGRAL_TYPE_P (type))
return type;
......@@ -236,8 +224,7 @@ java_signed_or_unsigned_type (unsignedp, type)
/* Return a signed type the same as TYPE in other respects. */
tree
java_signed_type (type)
tree type;
java_signed_type (tree type)
{
return java_signed_or_unsigned_type (0, type);
}
......@@ -245,8 +232,7 @@ java_signed_type (type)
/* Return an unsigned type the same as TYPE in other respects. */
tree
java_unsigned_type (type)
tree type;
java_unsigned_type (tree type)
{
return java_signed_or_unsigned_type (1, type);
}
......@@ -256,8 +242,7 @@ java_unsigned_type (type)
Value is true if successful. */
bool
java_mark_addressable (exp)
tree exp;
java_mark_addressable (tree exp)
{
register tree x = exp;
while (1)
......@@ -320,8 +305,7 @@ java_mark_addressable (exp)
/* Thorough checking of the arrayness of TYPE. */
int
is_array_type_p (type)
tree type;
is_array_type_p (tree type)
{
return TREE_CODE (type) == POINTER_TYPE
&& TREE_CODE (TREE_TYPE (type)) == RECORD_TYPE
......@@ -332,8 +316,7 @@ is_array_type_p (type)
Return -1 if the length is unknown or non-constant. */
HOST_WIDE_INT
java_array_type_length (array_type)
tree array_type;
java_array_type_length (tree array_type)
{
tree arfld;
if (TREE_CODE (array_type) == POINTER_TYPE)
......@@ -358,9 +341,7 @@ java_array_type_length (array_type)
`length' from static arrays. We could restore it, FIXME. */
tree
build_prim_array_type (element_type, length)
tree element_type;
HOST_WIDE_INT length;
build_prim_array_type (tree element_type, HOST_WIDE_INT length)
{
tree index = NULL;
......@@ -378,9 +359,7 @@ build_prim_array_type (element_type, length)
The LENGTH is -1 if the length is unknown. */
tree
build_java_array_type (element_type, length)
tree element_type;
HOST_WIDE_INT length;
build_java_array_type (tree element_type, HOST_WIDE_INT length)
{
tree sig, t, fld, atype, arfld;
char buf[12];
......@@ -441,8 +420,7 @@ build_java_array_type (element_type, length)
/* Promote TYPE to the type actually used for fields and parameters. */
tree
promote_type (type)
tree type;
promote_type (tree type)
{
switch (TREE_CODE (type))
{
......@@ -476,8 +454,7 @@ promote_type (type)
Return the seen TREE_TYPE, updating *PTR. */
static tree
parse_signature_type (ptr, limit)
const unsigned char **ptr, *limit;
parse_signature_type (const unsigned char **ptr, const unsigned char *limit)
{
tree type;
......@@ -526,9 +503,7 @@ parse_signature_type (ptr, limit)
Return a gcc type node. */
tree
parse_signature_string (sig_string, sig_length)
const unsigned char *sig_string;
int sig_length;
parse_signature_string (const unsigned char *sig_string, int sig_length)
{
tree result_type;
const unsigned char *str = sig_string;
......@@ -581,8 +556,7 @@ get_type_from_signature (tree signature)
/* Ignore signature and always return null. Used by has_method. */
static tree
build_null_signature (type)
tree type ATTRIBUTE_UNUSED;
build_null_signature (tree type ATTRIBUTE_UNUSED)
{
return NULL_TREE;
}
......@@ -590,8 +564,7 @@ build_null_signature (type)
/* Return the signature string for the arguments of method type TYPE. */
tree
build_java_argument_signature (type)
tree type;
build_java_argument_signature (tree type)
{
extern struct obstack temporary_obstack;
tree sig = TYPE_ARGUMENT_SIGNATURE (type);
......@@ -618,8 +591,7 @@ build_java_argument_signature (type)
/* Return the signature of the given TYPE. */
tree
build_java_signature (type)
tree type;
build_java_signature (tree type)
{
tree sig, t;
while (TREE_CODE (type) == POINTER_TYPE)
......@@ -699,9 +671,7 @@ build_java_signature (type)
/* Save signature string SIG (an IDENTIFIER_NODE) in TYPE for future use. */
void
set_java_signature (type, sig)
tree type;
tree sig;
set_java_signature (tree type, tree sig)
{
tree old_sig;
while (TREE_CODE (type) == POINTER_TYPE)
......@@ -725,8 +695,7 @@ set_java_signature (type, sig)
signature. */
tree
lookup_argument_method (searched_class, method_name, method_signature)
tree searched_class, method_name, method_signature;
lookup_argument_method (tree searched_class, tree method_name, tree method_signature)
{
return lookup_do (searched_class, NULL_TREE, method_name, method_signature,
build_java_argument_signature);
......@@ -739,8 +708,7 @@ lookup_argument_method (searched_class, method_name, method_signature)
which takes into account return type.) */
tree
lookup_argument_method2 (searched_class, method_name, method_signature)
tree searched_class, method_name, method_signature;
lookup_argument_method2 (tree searched_class, tree method_name, tree method_signature)
{
return lookup_do (CLASSTYPE_SUPER (searched_class), searched_class,
method_name, method_signature,
......@@ -754,8 +722,7 @@ lookup_argument_method2 (searched_class, method_name, method_signature)
SEARCHED_CLASS is an interface, search it too. */
tree
lookup_java_method (searched_class, method_name, method_signature)
tree searched_class, method_name, method_signature;
lookup_java_method (tree searched_class, tree method_name, tree method_signature)
{
tree searched_interface;
......@@ -772,9 +739,7 @@ lookup_java_method (searched_class, method_name, method_signature)
/* Return true iff CLASS (or its ancestors) has a method METHOD_NAME. */
int
has_method (class, method_name)
tree class;
tree method_name;
has_method (tree class, tree method_name)
{
return lookup_do (class, class, method_name,
NULL_TREE, build_null_signature) != NULL_TREE;
......@@ -788,9 +753,8 @@ has_method (class, method_name)
signature. */
static tree
lookup_do (searched_class, searched_interface, method_name, signature, signature_builder)
tree searched_class, searched_interface, method_name, signature;
tree (*signature_builder) (tree);
lookup_do (tree searched_class, tree searched_interface, tree method_name,
tree signature, tree (*signature_builder) (tree))
{
tree method;
......@@ -851,8 +815,7 @@ lookup_do (searched_class, searched_interface, method_name, signature, signature
Return a FUNCTION_DECL on success, or NULL_TREE if none found. */
tree
lookup_java_constructor (clas, method_signature)
tree clas, method_signature;
lookup_java_constructor (tree clas, tree method_signature)
{
tree method = TYPE_METHODS (clas);
for ( ; method != NULL_TREE; method = TREE_CHAIN (method))
......@@ -869,11 +832,7 @@ lookup_java_constructor (clas, method_signature)
Promotion. It assumes that both T1 and T2 are eligible to BNP. */
tree
binary_numeric_promotion (t1, t2, exp1, exp2)
tree t1;
tree t2;
tree *exp1;
tree *exp2;
binary_numeric_promotion (tree t1, tree t2, tree *exp1, tree *exp2)
{
if (t1 == double_type_node || t2 == double_type_node)
{
......
......@@ -56,8 +56,7 @@ tree pending_blocks;
/* Append TARGET_LABEL to the pending_block stack unless already in it. */
static void
push_pending_label (target_label)
tree target_label;
push_pending_label (tree target_label)
{
if (! LABEL_CHANGED (target_label))
{
......@@ -72,8 +71,7 @@ push_pending_label (target_label)
Return NULL on success, or an error message on failure. */
static const char *
check_pending_block (target_label)
tree target_label;
check_pending_block (tree target_label)
{
int changed = merge_type_state (target_label);
......@@ -129,8 +127,7 @@ subroutine_nesting (tree label)
Return TYPE_UNKNOWN if the types cannot be merged. */
static tree
merge_types (type1, type2)
tree type1, type2;
merge_types (tree type1, tree type2)
{
if (type1 == type2)
return type1;
......@@ -245,8 +242,7 @@ merge_types (type1, type2)
0 if there was no change, and 1 if there was a change. */
int
merge_type_state (label)
tree label;
merge_type_state (tree label)
{
int nlocals = DECL_MAX_LOCALS (current_function_decl);
int cur_length = stack_pointer + nlocals;
......@@ -308,8 +304,7 @@ merge_type_state (label)
/* Handle dup-like operations. */
static void
type_stack_dup (size, offset)
int size, offset;
type_stack_dup (int size, int offset)
{
tree type[4];
int index;
......@@ -350,9 +345,7 @@ struct pc_index
/* A helper that is used when sorting exception ranges. */
static int
start_pc_cmp (xp, yp)
const void *xp;
const void *yp;
start_pc_cmp (const void *xp, const void *yp)
{
const struct pc_index *x = (const struct pc_index *) xp;
const struct pc_index *y = (const struct pc_index *) yp;
......@@ -375,8 +368,7 @@ start_pc_cmp (xp, yp)
Return NULL on success and a freshly malloc'd error message on failure. */
static char *
pop_argument_types (arg_types)
tree arg_types;
pop_argument_types (tree arg_types)
{
if (arg_types == end_params_node)
return NULL;
......@@ -419,10 +411,7 @@ pop_argument_types (arg_types)
/* Verify the bytecodes of the current method.
Return 1 on success, 0 on failure. */
int
verify_jvm_instructions (jcf, byte_ops, length)
JCF* jcf;
const unsigned char *byte_ops;
long length;
verify_jvm_instructions (JCF* jcf, const unsigned char *byte_ops, long length)
{
tree label;
int wide = 0;
......
......@@ -41,8 +41,7 @@ static xref_flag_table xref_table [] = {
/* Decode an xref flag value. Return 0 if the flag wasn't found. */
int
xref_flag_value (flag)
const char *flag;
xref_flag_value (const char *flag)
{
int i;
for (i = 0; xref_table [i].key; i++)
......@@ -52,23 +51,19 @@ xref_flag_value (flag)
}
void
xref_set_data (flag, data)
int flag;
void *data;
xref_set_data (int flag, void *data)
{
xref_table [flag-1].data = data;
}
void *
xref_get_data (flag)
int flag;
xref_get_data (int flag)
{
return xref_table [flag-1].data;
}
void
xref_set_current_fp (fp)
FILE *fp;
xref_set_current_fp (FILE *fp)
{
xref_table [flag_emit_xref-1].fp = fp;
}
......@@ -76,8 +71,7 @@ xref_set_current_fp (fp)
/* Branch to the right xref "back-end". */
void
expand_xref (node)
tree node;
expand_xref (tree node)
{
/* Maintain these two cached. */
static FILE *fp = NULL;
......
......@@ -222,8 +222,7 @@ static long find_zip_file_start (int fd, long offset);
/* Function makeword() */
/***********************/
static ush makeword(b)
const uch *b;
static ush makeword(const uch *b)
{
/*
* Convert Intel style 'short' integer to non-Intel non-16-bit
......@@ -237,8 +236,7 @@ static ush makeword(b)
/* Function makelong() */
/***********************/
static ulg makelong(sig)
const uch *sig;
static ulg makelong(const uch *sig)
{
/*
* Convert intel style 'long' variable to non-Intel non-16-bit
......@@ -254,9 +252,7 @@ static ulg makelong(sig)
start of the actual data. Return -1 on error. OFFSET is the
offset from the beginning of the zip file of the file's header. */
static long
find_zip_file_start (fd, offset)
int fd;
long offset;
find_zip_file_start (int fd, long offset)
{
int filename_length, extra_field_length;
unsigned char buffer[LREC_SIZE + 4];
......@@ -277,8 +273,7 @@ find_zip_file_start (fd, offset)
}
int
read_zip_archive (zipf)
register ZipFile *zipf;
read_zip_archive (ZipFile *zipf)
{
int i;
int dir_last_pad;
......@@ -356,7 +351,7 @@ read_zip_archive (zipf)
}
#ifdef TEST
main ()
main (void)
{
ZipFile zipf[1];
ZipDirectory *zipd;
......
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