Commit 3a976c72 by Kazu Hirata Committed by Kazu Hirata

class.c: Remove uses of "register" specifier in declarations of arguments and local...

	* class.c: Remove uses of "register" specifier in
	declarations of arguments and local variables.
	* decl.c: Likewise.
	* expr.c: Likewise.
	* gjavah.c: Likewise.
	* jcf-dump.c: Likewise.
	* jcf-io.c: Likewise.
	* jcf-parse.c: Likewise.
	* jcf-write.c: Likewise.
	* keyword.h: Likewise.
	* parse.y: Likewise.
	* typeck.c: Likewise.
	* verify.c: Likewise.

From-SVN: r74882
parent aed8bfdc
2003-12-20 Kazu Hirata <kazu@cs.umass.edu>
* class.c: Remove uses of "register" specifier in
declarations of arguments and local variables.
* decl.c: Likewise.
* expr.c: Likewise.
* gjavah.c: Likewise.
* jcf-dump.c: Likewise.
* jcf-io.c: Likewise.
* jcf-parse.c: Likewise.
* jcf-write.c: Likewise.
* keyword.h: Likewise.
* parse.y: Likewise.
* typeck.c: Likewise.
* verify.c: Likewise.
2003-12-06 Kelley Cook <kcook@gcc.gnu.org> 2003-12-06 Kelley Cook <kcook@gcc.gnu.org>
* Make-lang.in (GCJ_CROSS_NAME): Delete. * Make-lang.in (GCJ_CROSS_NAME): Delete.
......
...@@ -723,8 +723,8 @@ strLengthUtf8 (char *str, int len) ...@@ -723,8 +723,8 @@ strLengthUtf8 (char *str, int len)
static int32 static int32
hashUtf8String (const char *str, int len) hashUtf8String (const char *str, int len)
{ {
register const unsigned char* ptr = (const unsigned char*) str; const unsigned char* ptr = (const unsigned char*) str;
register const unsigned char *limit = ptr + len; const unsigned char *limit = ptr + len;
int32 hash = 0; int32 hash = 0;
for (; ptr < limit;) for (; ptr < limit;)
{ {
......
...@@ -94,7 +94,7 @@ int current_pc; ...@@ -94,7 +94,7 @@ int current_pc;
void void
indent (void) indent (void)
{ {
register unsigned i; unsigned i;
for (i = 0; i < binding_depth*2; i++) for (i = 0; i < binding_depth*2; i++)
putc (' ', stderr); putc (' ', stderr);
...@@ -392,7 +392,7 @@ create_primitive_vtable (const char *name) ...@@ -392,7 +392,7 @@ create_primitive_vtable (const char *name)
void void
java_init_decl_processing (void) java_init_decl_processing (void)
{ {
register tree endlink; tree endlink;
tree field = NULL_TREE; tree field = NULL_TREE;
tree t; tree t;
...@@ -966,7 +966,7 @@ java_init_decl_processing (void) ...@@ -966,7 +966,7 @@ java_init_decl_processing (void)
tree tree
lookup_name (tree name) lookup_name (tree name)
{ {
register tree val; tree val;
if (current_binding_level != global_binding_level if (current_binding_level != global_binding_level
&& IDENTIFIER_LOCAL_VALUE (name)) && IDENTIFIER_LOCAL_VALUE (name))
val = IDENTIFIER_LOCAL_VALUE (name); val = IDENTIFIER_LOCAL_VALUE (name);
...@@ -981,7 +981,7 @@ lookup_name (tree name) ...@@ -981,7 +981,7 @@ lookup_name (tree name)
static tree static tree
lookup_name_current_level (tree name) lookup_name_current_level (tree name)
{ {
register tree t; tree t;
if (current_binding_level == global_binding_level) if (current_binding_level == global_binding_level)
return IDENTIFIER_GLOBAL_VALUE (name); return IDENTIFIER_GLOBAL_VALUE (name);
...@@ -1001,8 +1001,8 @@ lookup_name_current_level (tree name) ...@@ -1001,8 +1001,8 @@ lookup_name_current_level (tree name)
void void
push_labeled_block (tree lb) push_labeled_block (tree lb)
{ {
register tree name = DECL_NAME (LABELED_BLOCK_LABEL (lb)); tree name = DECL_NAME (LABELED_BLOCK_LABEL (lb));
register struct binding_level *b = current_binding_level; struct binding_level *b = current_binding_level;
tree oldlocal = IDENTIFIER_LOCAL_VALUE (name); tree oldlocal = IDENTIFIER_LOCAL_VALUE (name);
if (oldlocal != 0) if (oldlocal != 0)
b->shadowed = tree_cons (name, oldlocal, b->shadowed); b->shadowed = tree_cons (name, oldlocal, b->shadowed);
...@@ -1042,9 +1042,9 @@ pop_labeled_block (void) ...@@ -1042,9 +1042,9 @@ pop_labeled_block (void)
tree tree
pushdecl (tree x) pushdecl (tree x)
{ {
register tree t; tree t;
register tree name = DECL_NAME (x); tree name = DECL_NAME (x);
register struct binding_level *b = current_binding_level; struct binding_level *b = current_binding_level;
if (TREE_CODE (x) != TYPE_DECL) if (TREE_CODE (x) != TYPE_DECL)
DECL_CONTEXT (x) = current_function_decl; DECL_CONTEXT (x) = current_function_decl;
...@@ -1159,8 +1159,8 @@ pushdecl_force_head (tree x) ...@@ -1159,8 +1159,8 @@ pushdecl_force_head (tree x)
tree tree
pushdecl_top_level (tree x) pushdecl_top_level (tree x)
{ {
register tree t; tree t;
register struct binding_level *b = current_binding_level; struct binding_level *b = current_binding_level;
current_binding_level = global_binding_level; current_binding_level = global_binding_level;
t = pushdecl (x); t = pushdecl (x);
...@@ -1199,7 +1199,7 @@ make_binding_level (void) ...@@ -1199,7 +1199,7 @@ make_binding_level (void)
void void
pushlevel (int unused ATTRIBUTE_UNUSED) pushlevel (int unused ATTRIBUTE_UNUSED)
{ {
register struct binding_level *newlevel = NULL_BINDING_LEVEL; struct binding_level *newlevel = NULL_BINDING_LEVEL;
#if 0 #if 0
/* If this is the top level of a function, /* If this is the top level of a function,
...@@ -1255,7 +1255,7 @@ pushlevel (int unused ATTRIBUTE_UNUSED) ...@@ -1255,7 +1255,7 @@ pushlevel (int unused ATTRIBUTE_UNUSED)
tree tree
poplevel (int keep, int reverse, int functionbody) poplevel (int keep, int reverse, int functionbody)
{ {
register tree link; tree link;
/* The chain of decls was accumulated in reverse order. /* The chain of decls was accumulated in reverse order.
Put it into forward order, just for cleanliness. */ Put it into forward order, just for cleanliness. */
tree decls; tree decls;
...@@ -1394,7 +1394,7 @@ poplevel (int keep, int reverse, int functionbody) ...@@ -1394,7 +1394,7 @@ poplevel (int keep, int reverse, int functionbody)
#if 0 #if 0
for (link = named_labels; link; link = TREE_CHAIN (link)) for (link = named_labels; link; link = TREE_CHAIN (link))
{ {
register tree label = TREE_VALUE (link); tree label = TREE_VALUE (link);
if (DECL_INITIAL (label) == 0) if (DECL_INITIAL (label) == 0)
{ {
...@@ -1417,7 +1417,7 @@ poplevel (int keep, int reverse, int functionbody) ...@@ -1417,7 +1417,7 @@ poplevel (int keep, int reverse, int functionbody)
/* Pop the current level, and free the structure for reuse. */ /* Pop the current level, and free the structure for reuse. */
{ {
register struct binding_level *level = current_binding_level; struct binding_level *level = current_binding_level;
current_binding_level = current_binding_level->level_chain; current_binding_level = current_binding_level->level_chain;
level->level_chain = free_binding_level; level->level_chain = free_binding_level;
......
...@@ -206,7 +206,7 @@ static void ...@@ -206,7 +206,7 @@ static void
flush_quick_stack (void) flush_quick_stack (void)
{ {
int stack_index = stack_pointer; int stack_index = stack_pointer;
register tree prev, cur, next; tree prev, cur, next;
/* First reverse the quick_stack, and count the number of slots it has. */ /* First reverse the quick_stack, and count the number of slots it has. */
for (cur = quick_stack, prev = NULL_TREE; cur != NULL_TREE; cur = next) for (cur = quick_stack, prev = NULL_TREE; cur != NULL_TREE; cur = next)
......
...@@ -1370,7 +1370,7 @@ print_c_decl (FILE* stream, JCF* jcf, int name_index, int signature_index, ...@@ -1370,7 +1370,7 @@ print_c_decl (FILE* stream, JCF* jcf, int name_index, int signature_index,
{ {
int length = JPOOL_UTF_LENGTH (jcf, signature_index); int length = JPOOL_UTF_LENGTH (jcf, signature_index);
const unsigned char *str0 = JPOOL_UTF_DATA (jcf, signature_index); const unsigned char *str0 = JPOOL_UTF_DATA (jcf, signature_index);
register const unsigned char *str = str0; const unsigned char *str = str0;
const unsigned char *limit = str + length; const unsigned char *limit = str + length;
int need_space = 0; int need_space = 0;
int is_method = str[0] == '('; int is_method = str[0] == '(';
...@@ -1430,7 +1430,7 @@ print_full_cxx_name (FILE* stream, JCF* jcf, int name_index, ...@@ -1430,7 +1430,7 @@ print_full_cxx_name (FILE* stream, JCF* jcf, int name_index,
{ {
int length = JPOOL_UTF_LENGTH (jcf, signature_index); int length = JPOOL_UTF_LENGTH (jcf, signature_index);
const unsigned char *str0 = JPOOL_UTF_DATA (jcf, signature_index); const unsigned char *str0 = JPOOL_UTF_DATA (jcf, signature_index);
register const unsigned char *str = str0; const unsigned char *str = str0;
const unsigned char *limit = str + length; const unsigned char *limit = str + length;
int need_space = 0; int need_space = 0;
int is_method = str[0] == '('; int is_method = str[0] == '(';
...@@ -1541,7 +1541,7 @@ print_stub_or_jni (FILE* stream, JCF* jcf, int name_index, ...@@ -1541,7 +1541,7 @@ print_stub_or_jni (FILE* stream, JCF* jcf, int name_index,
{ {
int length = JPOOL_UTF_LENGTH (jcf, signature_index); int length = JPOOL_UTF_LENGTH (jcf, signature_index);
const unsigned char *str0 = JPOOL_UTF_DATA (jcf, signature_index); const unsigned char *str0 = JPOOL_UTF_DATA (jcf, signature_index);
register const unsigned char *str = str0; const unsigned char *str = str0;
const unsigned char *limit = str + length; const unsigned char *limit = str + length;
int need_space = 0; int need_space = 0;
int is_method = str[0] == '('; int is_method = str[0] == '(';
......
...@@ -615,7 +615,7 @@ print_constant (FILE *out, JCF *jcf, int index, int verbosity) ...@@ -615,7 +615,7 @@ print_constant (FILE *out, JCF *jcf, int index, int verbosity)
break; break;
case CONSTANT_Utf8: case CONSTANT_Utf8:
{ {
register const unsigned char *str = JPOOL_UTF_DATA (jcf, index); const unsigned char *str = JPOOL_UTF_DATA (jcf, index);
int length = JPOOL_UTF_LENGTH (jcf, index); int length = JPOOL_UTF_LENGTH (jcf, index);
if (verbosity > 0) if (verbosity > 0)
{ /* Print as 8-bit bytes. */ { /* Print as 8-bit bytes. */
......
...@@ -619,7 +619,7 @@ jcf_print_char (FILE *stream, int ch) ...@@ -619,7 +619,7 @@ jcf_print_char (FILE *stream, int ch)
/* Print UTF8 string at STR of length LENGTH bytes to STREAM. */ /* Print UTF8 string at STR of length LENGTH bytes to STREAM. */
void void
jcf_print_utf8 (FILE *stream, register const unsigned char *str, int length) jcf_print_utf8 (FILE *stream, const unsigned char *str, int length)
{ {
const unsigned char * limit = str + length; const unsigned char * limit = str + length;
while (str < limit) while (str < limit)
...@@ -713,7 +713,7 @@ format_uint (char *buffer, uint64 value, int base) ...@@ -713,7 +713,7 @@ format_uint (char *buffer, uint64 value, int base)
{ {
#define WRITE_BUF_SIZE (4 + sizeof(uint64) * 8) #define WRITE_BUF_SIZE (4 + sizeof(uint64) * 8)
char buf[WRITE_BUF_SIZE]; char buf[WRITE_BUF_SIZE];
register char *buf_ptr = buf+WRITE_BUF_SIZE; /* End of buf. */ char *buf_ptr = buf+WRITE_BUF_SIZE; /* End of buf. */
int chars_written; int chars_written;
int i; int i;
......
...@@ -753,8 +753,8 @@ parse_class_file (void) ...@@ -753,8 +753,8 @@ parse_class_file (void)
input_line = 0; input_line = 0;
if (DECL_LINENUMBERS_OFFSET (method)) if (DECL_LINENUMBERS_OFFSET (method))
{ {
register int i; int i;
register unsigned char *ptr; unsigned char *ptr;
JCF_SEEK (jcf, DECL_LINENUMBERS_OFFSET (method)); JCF_SEEK (jcf, DECL_LINENUMBERS_OFFSET (method));
linenumber_count = i = JCF_readu2 (jcf); linenumber_count = i = JCF_readu2 (jcf);
linenumber_table = ptr = jcf->read_ptr; linenumber_table = ptr = jcf->read_ptr;
......
...@@ -559,9 +559,9 @@ localvar_alloc (tree decl, struct jcf_partial *state) ...@@ -559,9 +559,9 @@ localvar_alloc (tree decl, struct jcf_partial *state)
struct jcf_block *start_label = get_jcf_label_here (state); struct jcf_block *start_label = get_jcf_label_here (state);
int wide = TYPE_IS_WIDE (TREE_TYPE (decl)); int wide = TYPE_IS_WIDE (TREE_TYPE (decl));
int index; int index;
register struct localvar_info *info; struct localvar_info *info;
register struct localvar_info **ptr = localvar_buffer; struct localvar_info **ptr = localvar_buffer;
register struct localvar_info **limit struct localvar_info **limit
= (struct localvar_info**) state->localvars.ptr; = (struct localvar_info**) state->localvars.ptr;
for (index = 0; ptr < limit; index++, ptr++) for (index = 0; ptr < limit; index++, ptr++)
{ {
...@@ -602,8 +602,8 @@ maybe_free_localvar (tree decl, struct jcf_partial *state, int really) ...@@ -602,8 +602,8 @@ maybe_free_localvar (tree decl, struct jcf_partial *state, int really)
{ {
struct jcf_block *end_label = get_jcf_label_here (state); struct jcf_block *end_label = get_jcf_label_here (state);
int index = DECL_LOCAL_INDEX (decl); int index = DECL_LOCAL_INDEX (decl);
register struct localvar_info **ptr = &localvar_buffer [index]; struct localvar_info **ptr = &localvar_buffer [index];
register struct localvar_info *info = *ptr; struct localvar_info *info = *ptr;
int wide = TYPE_IS_WIDE (TREE_TYPE (decl)); int wide = TYPE_IS_WIDE (TREE_TYPE (decl));
info->end_label = end_label; info->end_label = end_label;
......
...@@ -51,7 +51,7 @@ inline ...@@ -51,7 +51,7 @@ inline
#endif #endif
#endif #endif
static unsigned int static unsigned int
hash (register const char *str, register unsigned int len) hash (const char *str, unsigned int len)
{ {
static const unsigned char asso_values[] = static const unsigned char asso_values[] =
{ {
...@@ -82,7 +82,7 @@ hash (register const char *str, register unsigned int len) ...@@ -82,7 +82,7 @@ hash (register const char *str, register unsigned int len)
86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
86, 86, 86, 86, 86, 86 86, 86, 86, 86, 86, 86
}; };
register int hval = len; int hval = len;
switch (hval) switch (hval)
{ {
...@@ -102,7 +102,7 @@ hash (register const char *str, register unsigned int len) ...@@ -102,7 +102,7 @@ hash (register const char *str, register unsigned int len)
__inline __inline
#endif #endif
const struct java_keyword * const struct java_keyword *
java_keyword (register const char *str, register unsigned int len) java_keyword (const char *str, unsigned int len)
{ {
static const struct java_keyword wordlist[] = static const struct java_keyword wordlist[] =
{ {
...@@ -175,11 +175,11 @@ java_keyword (register const char *str, register unsigned int len) ...@@ -175,11 +175,11 @@ java_keyword (register const char *str, register unsigned int len)
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
{ {
register int key = hash (str, len); int key = hash (str, len);
if (key <= MAX_HASH_VALUE && key >= 0) if (key <= MAX_HASH_VALUE && key >= 0)
{ {
register const char *s = wordlist[key].name; const char *s = wordlist[key].name;
if (*str == *s && !strcmp (str + 1, s + 1)) if (*str == *s && !strcmp (str + 1, s + 1))
return &wordlist[key]; return &wordlist[key];
......
...@@ -5114,7 +5114,7 @@ create_jdep_list (struct parser_ctxt *ctxp) ...@@ -5114,7 +5114,7 @@ create_jdep_list (struct parser_ctxt *ctxp)
static jdeplist * static jdeplist *
reverse_jdep_list (struct parser_ctxt *ctxp) reverse_jdep_list (struct parser_ctxt *ctxp)
{ {
register jdeplist *prev = NULL, *current, *next; jdeplist *prev = NULL, *current, *next;
for (current = ctxp->classd_list; current; current = next) for (current = ctxp->classd_list; current; current = next)
{ {
next = current->next; next = current->next;
...@@ -11242,7 +11242,7 @@ static GTY(()) tree m2_arg_cache; ...@@ -11242,7 +11242,7 @@ static GTY(()) tree m2_arg_cache;
static int static int
argument_types_convertible (tree m1, tree m2_or_arglist) argument_types_convertible (tree m1, tree m2_or_arglist)
{ {
register tree m1_arg, m2_arg; tree m1_arg, m2_arg;
SKIP_THIS_AND_ARTIFICIAL_PARMS (m1_arg, m1) SKIP_THIS_AND_ARTIFICIAL_PARMS (m1_arg, m1)
......
...@@ -112,7 +112,7 @@ convert_ieee_real_to_integer (tree type, tree expr) ...@@ -112,7 +112,7 @@ convert_ieee_real_to_integer (tree type, tree expr)
tree tree
convert (tree type, tree expr) convert (tree type, tree expr)
{ {
register enum tree_code code = TREE_CODE (type); enum tree_code code = TREE_CODE (type);
if (!expr) if (!expr)
return error_mark_node; return error_mark_node;
...@@ -244,7 +244,7 @@ java_unsigned_type (tree type) ...@@ -244,7 +244,7 @@ java_unsigned_type (tree type)
bool bool
java_mark_addressable (tree exp) java_mark_addressable (tree exp)
{ {
register tree x = exp; tree x = exp;
while (1) while (1)
switch (TREE_CODE (x)) switch (TREE_CODE (x))
{ {
...@@ -480,7 +480,7 @@ parse_signature_type (const unsigned char **ptr, const unsigned char *limit) ...@@ -480,7 +480,7 @@ parse_signature_type (const unsigned char **ptr, const unsigned char *limit)
case 'L': case 'L':
{ {
const unsigned char *start = ++(*ptr); const unsigned char *start = ++(*ptr);
register const unsigned char *str = start; const unsigned char *str = start;
for ( ; ; str++) for ( ; ; str++)
{ {
if (str >= limit) if (str >= limit)
......
...@@ -423,7 +423,7 @@ verify_jvm_instructions (JCF* jcf, const unsigned char *byte_ops, long length) ...@@ -423,7 +423,7 @@ verify_jvm_instructions (JCF* jcf, const unsigned char *byte_ops, long length)
char *pmessage; char *pmessage;
int i; int i;
int index; int index;
register unsigned char *p; unsigned char *p;
struct eh_range *prev_eh_ranges = NULL_EH_RANGE; struct eh_range *prev_eh_ranges = NULL_EH_RANGE;
struct eh_range *eh_ranges; struct eh_range *eh_ranges;
tree return_type = TREE_TYPE (TREE_TYPE (current_function_decl)); tree return_type = TREE_TYPE (TREE_TYPE (current_function_decl));
......
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