X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=libobjc%2Fencoding.c;h=bd8b67e0e8b70314b6ac55e7619f661c122594a4;hb=45f3982640ef8034c09b1f99806122525801e62d;hp=985ba0771b17c9ed6210e9281d2e5680091ea9d9;hpb=d91f7526fb89f7d993f570efe6ca75ab6f856370;p=pf3gnuchains%2Fgcc-fork.git diff --git a/libobjc/encoding.c b/libobjc/encoding.c index 985ba0771b1..bd8b67e0e8b 100644 --- a/libobjc/encoding.c +++ b/libobjc/encoding.c @@ -993,98 +993,6 @@ method_getNumberOfArguments (struct objc_method *method) } } -int -method_get_number_of_arguments (struct objc_method *mth) -{ - return method_getNumberOfArguments (mth); -} - -/* Return the size of the argument block needed on the stack to invoke - the method MTH. This may be zero, if all arguments are passed in - registers. */ -int -method_get_sizeof_arguments (struct objc_method *mth) -{ - const char *type = objc_skip_typespec (mth->method_types); - return atoi (type); -} - -/* - Return a pointer to the next argument of ARGFRAME. type points to - the last argument. Typical use of this look like: - - { - char *datum, *type; - for (datum = method_get_first_argument (method, argframe, &type); - datum; datum = method_get_next_argument (argframe, &type)) - { - unsigned flags = objc_get_type_qualifiers (type); - type = objc_skip_type_qualifiers (type); - if (*type != _C_PTR) - [portal encodeData: datum ofType: type]; - else - { - if ((flags & _F_IN) == _F_IN) - [portal encodeData: *(char **) datum ofType: ++type]; - } - } - } -*/ -char * -method_get_next_argument (arglist_t argframe, const char **type) -{ - const char *t = objc_skip_argspec (*type); - - if (*t == '\0') - return 0; - - *type = t; - t = objc_skip_typespec (t); - - if (*t == '+') - return argframe->arg_regs + atoi (++t); - else - return argframe->arg_ptr + atoi (t); -} - -/* Return a pointer to the value of the first argument of the method - described in M with the given argumentframe ARGFRAME. The type - is returned in TYPE. type must be passed to successive calls of - method_get_next_argument. */ -char * -method_get_first_argument (struct objc_method *m, - arglist_t argframe, - const char **type) -{ - *type = m->method_types; - return method_get_next_argument (argframe, type); -} - -/* Return a pointer to the ARGth argument of the method - M from the frame ARGFRAME. The type of the argument - is returned in the value-result argument TYPE. */ -char * -method_get_nth_argument (struct objc_method *m, - arglist_t argframe, int arg, - const char **type) -{ - const char *t = objc_skip_argspec (m->method_types); - - if (arg > method_get_number_of_arguments (m)) - return 0; - - while (arg--) - t = objc_skip_argspec (t); - - *type = t; - t = objc_skip_typespec (t); - - if (*t == '+') - return argframe->arg_regs + atoi (++t); - else - return argframe->arg_ptr + atoi (t); -} - unsigned objc_get_type_qualifiers (const char *type) {