Commit 42bac116 by Andreas Jaeger

encoding.c (objc_layout_structure_next_member): Remove unused variable.

	* encoding.c (objc_layout_structure_next_member): Remove unused
	variable.

From-SVN: r54406
parent 309323c2
2002-06-09 Andreas Jaeger <aj@suse.de>
* encoding.c (objc_layout_structure_next_member): Remove unused
variable.
2002-05-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2002-05-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (SHELL): Set to @SHELL@. * Makefile.in (SHELL): Set to @SHELL@.
...@@ -181,14 +186,14 @@ Wed Jan 3 00:49:10 2001 Ovidiu Predescu <ovidiu@cup.hp.com> ...@@ -181,14 +186,14 @@ Wed Jan 3 00:49:10 2001 Ovidiu Predescu <ovidiu@cup.hp.com>
function. This can alleviate problems __builtin_apply() and function. This can alleviate problems __builtin_apply() and
friends have on various platforms. (Solution suggested by Helge friends have on various platforms. (Solution suggested by Helge
Hess.) Hess.)
* objc/objc-api.h: Define __objc_msg_forward. * objc/objc-api.h: Define __objc_msg_forward.
* sendmsg.c: Define gen_rtx_REG. * sendmsg.c: Define gen_rtx_REG.
2000-12-06 Ralf Corsepius <corsepiu@faw.uni-ulm.de> 2000-12-06 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* thr-rtems.c: New file. Stub to compile. * thr-rtems.c: New file. Stub to compile.
2000-09-06 Alexandre Oliva <aoliva@redhat.com> 2000-09-06 Alexandre Oliva <aoliva@redhat.com>
...@@ -230,7 +235,7 @@ Sun Aug 6 22:51:16 2000 Ovidiu Predescu <ovidiu@cup.hp.com> ...@@ -230,7 +235,7 @@ Sun Aug 6 22:51:16 2000 Ovidiu Predescu <ovidiu@cup.hp.com>
Fri Jul 28 08:58:02 2000 Nicola Pero <nicola@brainstorm.co.uk> Fri Jul 28 08:58:02 2000 Nicola Pero <nicola@brainstorm.co.uk>
* configure.in: Added libtool support; build shared libraries * configure.in: Added libtool support; build shared libraries
if --enable-shared was passed on command line. if --enable-shared was passed on command line.
* Makefile.in: Modified most compilation commands to use libtool. * Makefile.in: Modified most compilation commands to use libtool.
* aclocal.m4: New symbolic link to the ../libtool.m4, from the * aclocal.m4: New symbolic link to the ../libtool.m4, from the
...@@ -291,7 +296,7 @@ Tue Sep 21 07:47:10 1999 Jeffrey A Law (law@cygnus.com) ...@@ -291,7 +296,7 @@ Tue Sep 21 07:47:10 1999 Jeffrey A Law (law@cygnus.com)
* Makefile.in (gc.o, gc_gc.o): Do not pass -fgnu-runtime to * Makefile.in (gc.o, gc_gc.o): Do not pass -fgnu-runtime to
the compiler when building C code. the compiler when building C code.
Fri Aug 6 23:32:29 1999 Daniel Jacobowitz <drow@drow.them.org> Fri Aug 6 23:32:29 1999 Daniel Jacobowitz <drow@drow.them.org>
* Makefile.in (FLAGS_TO_PASS): Include prefix, exec_prefix, * Makefile.in (FLAGS_TO_PASS): Include prefix, exec_prefix,
...@@ -370,7 +375,7 @@ Sat Oct 17 05:21:31 1998 Ovidiu Predescu <ovidiu@slip.net> ...@@ -370,7 +375,7 @@ Sat Oct 17 05:21:31 1998 Ovidiu Predescu <ovidiu@slip.net>
Mon Oct 11 21:25:27 1998 Ovidiu Predescu <ovidiu@slip.net> Mon Oct 11 21:25:27 1998 Ovidiu Predescu <ovidiu@slip.net>
* encoding.c: Redefine get_inner_array_type to get the first entry * encoding.c: Redefine get_inner_array_type to get the first entry
in the structure. in the structure.
Thu Oct 8 12:21:14 1998 Richard Frith-Macdonald <richard@brainstorm.co.uk> Thu Oct 8 12:21:14 1998 Richard Frith-Macdonald <richard@brainstorm.co.uk>
...@@ -435,4 +440,3 @@ Mon Sep 21 23:27:10 1998 Ovidiu Predescu <ovidiu@slip.net> ...@@ -435,4 +440,3 @@ Mon Sep 21 23:27:10 1998 Ovidiu Predescu <ovidiu@slip.net>
1998-09-21 Ben Elliston <bje@cygnus.com> 1998-09-21 Ben Elliston <bje@cygnus.com>
* New directory. Moved files from ../gcc/objc. * New directory. Moved files from ../gcc/objc.
/* Encoding of types for Objective C. /* Encoding of types for Objective C.
Copyright (C) 1993, 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc. Copyright (C) 1993, 1995, 1996, 1997, 1998, 2000, 2002
Free Software Foundation, Inc.
Contributed by Kresten Krab Thorup Contributed by Kresten Krab Thorup
Bitfield support by Ovidiu Predescu Bitfield support by Ovidiu Predescu
...@@ -85,7 +86,7 @@ static inline int ...@@ -85,7 +86,7 @@ static inline int
atoi (const char* str) atoi (const char* str)
{ {
int res = 0; int res = 0;
while (isdigit (*str)) while (isdigit (*str))
res *= 10, res += (*str++ - '0'); res *= 10, res += (*str++ - '0');
...@@ -93,7 +94,7 @@ atoi (const char* str) ...@@ -93,7 +94,7 @@ atoi (const char* str)
} }
/* /*
return the size of an object specified by type return the size of an object specified by type
*/ */
int int
...@@ -122,7 +123,7 @@ objc_sizeof_type (const char* type) ...@@ -122,7 +123,7 @@ objc_sizeof_type (const char* type)
case _C_CHR: case _C_CHR:
return sizeof(char); return sizeof(char);
break; break;
case _C_UCHR: case _C_UCHR:
return sizeof(unsigned char); return sizeof(unsigned char);
break; break;
...@@ -182,7 +183,7 @@ objc_sizeof_type (const char* type) ...@@ -182,7 +183,7 @@ objc_sizeof_type (const char* type)
while (isdigit(*++type)); while (isdigit(*++type));
return len*objc_aligned_size (type); return len*objc_aligned_size (type);
} }
break; break;
case _C_BFLD: case _C_BFLD:
{ {
...@@ -229,7 +230,7 @@ objc_sizeof_type (const char* type) ...@@ -229,7 +230,7 @@ objc_sizeof_type (const char* type)
} }
return max_size; return max_size;
} }
default: default:
{ {
objc_error(nil, OBJC_ERR_BAD_TYPE, "unknown type %s\n", type); objc_error(nil, OBJC_ERR_BAD_TYPE, "unknown type %s\n", type);
...@@ -240,7 +241,7 @@ objc_sizeof_type (const char* type) ...@@ -240,7 +241,7 @@ objc_sizeof_type (const char* type)
/* /*
Return the alignment of an object specified by type Return the alignment of an object specified by type
*/ */
int int
...@@ -260,7 +261,7 @@ objc_alignof_type(const char* type) ...@@ -260,7 +261,7 @@ objc_alignof_type(const char* type)
case _C_CLASS: case _C_CLASS:
return __alignof__(Class); return __alignof__(Class);
break; break;
case _C_SEL: case _C_SEL:
return __alignof__(SEL); return __alignof__(SEL);
break; break;
...@@ -268,7 +269,7 @@ objc_alignof_type(const char* type) ...@@ -268,7 +269,7 @@ objc_alignof_type(const char* type)
case _C_CHR: case _C_CHR:
return __alignof__(char); return __alignof__(char);
break; break;
case _C_UCHR: case _C_UCHR:
return __alignof__(unsigned char); return __alignof__(unsigned char);
break; break;
...@@ -389,7 +390,7 @@ objc_aligned_size (const char* type) ...@@ -389,7 +390,7 @@ objc_aligned_size (const char* type)
to be the size of a void*. to be the size of a void*.
*/ */
int int
objc_promoted_size (const char* type) objc_promoted_size (const char* type)
{ {
int size, wordsize; int size, wordsize;
...@@ -416,9 +417,9 @@ inline const char* ...@@ -416,9 +417,9 @@ inline const char*
objc_skip_type_qualifiers (const char* type) objc_skip_type_qualifiers (const char* type)
{ {
while (*type == _C_CONST while (*type == _C_CONST
|| *type == _C_IN || *type == _C_IN
|| *type == _C_INOUT || *type == _C_INOUT
|| *type == _C_OUT || *type == _C_OUT
|| *type == _C_BYCOPY || *type == _C_BYCOPY
|| *type == _C_BYREF || *type == _C_BYREF
|| *type == _C_ONEWAY || *type == _C_ONEWAY
...@@ -429,13 +430,13 @@ objc_skip_type_qualifiers (const char* type) ...@@ -429,13 +430,13 @@ objc_skip_type_qualifiers (const char* type)
return type; return type;
} }
/* /*
Skip one typespec element. If the typespec is prepended by type Skip one typespec element. If the typespec is prepended by type
qualifiers, these are skipped as well. qualifiers, these are skipped as well.
*/ */
const char* const char*
objc_skip_typespec (const char* type) objc_skip_typespec (const char* type)
{ {
/* Skip the variable name if any */ /* Skip the variable name if any */
...@@ -446,7 +447,7 @@ objc_skip_typespec (const char* type) ...@@ -446,7 +447,7 @@ objc_skip_typespec (const char* type)
} }
type = objc_skip_type_qualifiers (type); type = objc_skip_type_qualifiers (type);
switch (*type) { switch (*type) {
case _C_ID: case _C_ID:
...@@ -485,7 +486,7 @@ objc_skip_typespec (const char* type) ...@@ -485,7 +486,7 @@ objc_skip_typespec (const char* type)
case _C_ARY_B: case _C_ARY_B:
/* skip digits, typespec and closing ']' */ /* skip digits, typespec and closing ']' */
while(isdigit(*++type)); while(isdigit(*++type));
type = objc_skip_typespec(type); type = objc_skip_typespec(type);
if (*type == _C_ARY_E) if (*type == _C_ARY_E)
...@@ -504,23 +505,23 @@ objc_skip_typespec (const char* type) ...@@ -504,23 +505,23 @@ objc_skip_typespec (const char* type)
case _C_STRUCT_B: case _C_STRUCT_B:
/* skip name, and elements until closing '}' */ /* skip name, and elements until closing '}' */
while (*type != _C_STRUCT_E && *type++ != '='); while (*type != _C_STRUCT_E && *type++ != '=');
while (*type != _C_STRUCT_E) { type = objc_skip_typespec (type); } while (*type != _C_STRUCT_E) { type = objc_skip_typespec (type); }
return ++type; return ++type;
case _C_UNION_B: case _C_UNION_B:
/* skip name, and elements until closing ')' */ /* skip name, and elements until closing ')' */
while (*type != _C_UNION_E && *type++ != '='); while (*type != _C_UNION_E && *type++ != '=');
while (*type != _C_UNION_E) { type = objc_skip_typespec (type); } while (*type != _C_UNION_E) { type = objc_skip_typespec (type); }
return ++type; return ++type;
case _C_PTR: case _C_PTR:
/* Just skip the following typespec */ /* Just skip the following typespec */
return objc_skip_typespec (++type); return objc_skip_typespec (++type);
default: default:
{ {
objc_error(nil, OBJC_ERR_BAD_TYPE, "unknown type %s\n", type); objc_error(nil, OBJC_ERR_BAD_TYPE, "unknown type %s\n", type);
...@@ -533,7 +534,7 @@ objc_skip_typespec (const char* type) ...@@ -533,7 +534,7 @@ objc_skip_typespec (const char* type)
Skip an offset as part of a method encoding. This is prepended by a Skip an offset as part of a method encoding. This is prepended by a
'+' if the argument is passed in registers. '+' if the argument is passed in registers.
*/ */
inline const char* inline const char*
objc_skip_offset (const char* type) objc_skip_offset (const char* type)
{ {
if (*type == '+') type++; if (*type == '+') type++;
...@@ -555,7 +556,7 @@ objc_skip_argspec (const char* type) ...@@ -555,7 +556,7 @@ objc_skip_argspec (const char* type)
/* /*
Return the number of arguments that the method MTH expects. Return the number of arguments that the method MTH expects.
Note that all methods need two implicit arguments `self' and Note that all methods need two implicit arguments `self' and
`_cmd'. `_cmd'.
*/ */
int int
method_get_number_of_arguments (struct objc_method* mth) method_get_number_of_arguments (struct objc_method* mth)
...@@ -588,7 +589,7 @@ method_get_sizeof_arguments (struct objc_method* mth) ...@@ -588,7 +589,7 @@ method_get_sizeof_arguments (struct objc_method* mth)
the last argument. Typical use of this look like: the last argument. Typical use of this look like:
{ {
char *datum, *type; char *datum, *type;
for (datum = method_get_first_argument (method, argframe, &type); for (datum = method_get_first_argument (method, argframe, &type);
datum; datum = method_get_next_argument (argframe, &type)) datum; datum = method_get_next_argument (argframe, &type))
{ {
...@@ -603,7 +604,7 @@ method_get_sizeof_arguments (struct objc_method* mth) ...@@ -603,7 +604,7 @@ method_get_sizeof_arguments (struct objc_method* mth)
} }
} }
} }
*/ */
char* char*
method_get_next_argument (arglist_t argframe, method_get_next_argument (arglist_t argframe,
...@@ -624,14 +625,14 @@ method_get_next_argument (arglist_t argframe, ...@@ -624,14 +625,14 @@ method_get_next_argument (arglist_t argframe,
} }
/* /*
Return a pointer to the value of the first argument of the method Return a pointer to the value of the first argument of the method
described in M with the given argumentframe ARGFRAME. The type described in M with the given argumentframe ARGFRAME. The type
is returned in TYPE. type must be passed to successive calls of is returned in TYPE. type must be passed to successive calls of
method_get_next_argument. method_get_next_argument.
*/ */
char* char*
method_get_first_argument (struct objc_method* m, method_get_first_argument (struct objc_method* m,
arglist_t argframe, arglist_t argframe,
const char** type) const char** type)
{ {
*type = m->method_types; *type = m->method_types;
...@@ -641,12 +642,12 @@ method_get_first_argument (struct objc_method* m, ...@@ -641,12 +642,12 @@ method_get_first_argument (struct objc_method* m,
/* /*
Return a pointer to the ARGth argument of the method Return a pointer to the ARGth argument of the method
M from the frame ARGFRAME. The type of the argument M from the frame ARGFRAME. The type of the argument
is returned in the value-result argument TYPE is returned in the value-result argument TYPE
*/ */
char* char*
method_get_nth_argument (struct objc_method* m, method_get_nth_argument (struct objc_method* m,
arglist_t argframe, int arg, arglist_t argframe, int arg,
const char **type) const char **type)
{ {
const char* t = objc_skip_argspec (m->method_types); const char* t = objc_skip_argspec (m->method_types);
...@@ -656,7 +657,7 @@ method_get_nth_argument (struct objc_method* m, ...@@ -656,7 +657,7 @@ method_get_nth_argument (struct objc_method* m,
while (arg--) while (arg--)
t = objc_skip_argspec (t); t = objc_skip_argspec (t);
*type = t; *type = t;
t = objc_skip_typespec (t); t = objc_skip_typespec (t);
...@@ -749,7 +750,6 @@ objc_layout_structure (const char *type, ...@@ -749,7 +750,6 @@ objc_layout_structure (const char *type,
BOOL BOOL
objc_layout_structure_next_member (struct objc_struct_layout *layout) objc_layout_structure_next_member (struct objc_struct_layout *layout)
{ {
register int known_align = layout->record_size;
register int desired_align = 0; register int desired_align = 0;
/* The following are used only if the field is a bitfield */ /* The following are used only if the field is a bitfield */
...@@ -864,7 +864,7 @@ objc_layout_structure_next_member (struct objc_struct_layout *layout) ...@@ -864,7 +864,7 @@ objc_layout_structure_next_member (struct objc_struct_layout *layout)
Bump the cumulative size to multiple of field alignment. */ Bump the cumulative size to multiple of field alignment. */
layout->record_size = ROUND (layout->record_size, desired_align); layout->record_size = ROUND (layout->record_size, desired_align);
} }
/* Jump to the next field in record. */ /* Jump to the next field in record. */
layout->prev_type = layout->type; layout->prev_type = layout->type;
......
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