General stack info handling improvements

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@6466 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
richard 2000-04-14 10:38:22 +00:00
parent 2e21575872
commit 2fe1953386
10 changed files with 59 additions and 9 deletions

View file

@ -113,6 +113,10 @@ mframe_build_signature(const char *typePtr, int *size, int *narg, char *buf)
{
types++;
}
if (*types == '-')
{
types++;
}
while (isdigit(*types))
{
types++;
@ -448,6 +452,8 @@ mframe_next_arg(const char *typePtr, NSArgumentInfo *info)
*/
if (info->type[0] != _C_PTR || info->type[1] == '?')
{
BOOL negative = NO;
/*
* May tell the caller if the item is stored in a register.
*/
@ -456,11 +462,18 @@ mframe_next_arg(const char *typePtr, NSArgumentInfo *info)
typePtr++;
info->isReg = YES;
}
else if (info->isReg)
else
{
info->isReg = NO;
}
/*
* Cope with negative offsets.
*/
if (*typePtr == '-')
{
typePtr++;
negative = YES;
}
/*
* May tell the caller what the stack/register offset is for
* this argument.
@ -470,6 +483,10 @@ mframe_next_arg(const char *typePtr, NSArgumentInfo *info)
{
info->offset = info->offset * 10 + (*typePtr++ - '0');
}
if (negative == YES)
{
info->offset = -info->offset;
}
}
return typePtr;