mirror of
https://github.com/cc65/cc65.git
synced 2025-04-09 10:39:40 +00:00
Removed RefineFuncDesc() as an unnecessary wrapper.
This commit is contained in:
parent
4e820677ee
commit
88246f852d
@ -741,7 +741,7 @@ static int HandleSymRedefinition (SymEntry* Sym, const Type* T, unsigned Flags)
|
||||
/* Refine the existing composite prototype with this new
|
||||
** one.
|
||||
*/
|
||||
RefineFuncDesc (Sym->Type, T);
|
||||
TypeComposition (Sym->Type, T);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -427,10 +427,6 @@ void TypeComposition (Type* lhs, const Type* rhs)
|
||||
** type or this fails with a critical check.
|
||||
*/
|
||||
{
|
||||
FuncDesc* F1;
|
||||
FuncDesc* F2;
|
||||
long LeftCount, RightCount;
|
||||
|
||||
/* Compose two types */
|
||||
while (lhs->C != T_END) {
|
||||
|
||||
@ -445,8 +441,8 @@ void TypeComposition (Type* lhs, const Type* rhs)
|
||||
/* Check for special type elements */
|
||||
if (IsTypeFunc (lhs)) {
|
||||
/* Compose the function descriptors */
|
||||
F1 = GetFuncDesc (lhs);
|
||||
F2 = GetFuncDesc (rhs);
|
||||
FuncDesc* F1 = GetFuncDesc (lhs);
|
||||
FuncDesc* F2 = GetFuncDesc (rhs);
|
||||
|
||||
/* If F1 has an empty parameter list (which does also mean, it is
|
||||
** not a function definition, because the flag is reset in this
|
||||
@ -470,8 +466,8 @@ void TypeComposition (Type* lhs, const Type* rhs)
|
||||
}
|
||||
} else if (IsTypeArray (lhs)) {
|
||||
/* Check member count */
|
||||
LeftCount = GetElementCount (lhs);
|
||||
RightCount = GetElementCount (rhs);
|
||||
long LeftCount = GetElementCount (lhs);
|
||||
long RightCount = GetElementCount (rhs);
|
||||
|
||||
/* Set composite type if it is requested */
|
||||
if (LeftCount != UNSPECIFIED) {
|
||||
@ -485,28 +481,4 @@ void TypeComposition (Type* lhs, const Type* rhs)
|
||||
++lhs;
|
||||
++rhs;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
FuncDesc* RefineFuncDesc (Type* OldType, const Type* NewType)
|
||||
/* Refine the existing function descriptor with a new one */
|
||||
{
|
||||
FuncDesc* Old = GetFuncDesc (OldType);
|
||||
FuncDesc* New = GetFuncDesc (NewType);
|
||||
|
||||
CHECK (Old != 0 && New != 0);
|
||||
|
||||
if ((New->Flags & FD_EMPTY) == 0) {
|
||||
if ((Old->Flags & FD_EMPTY) == 0) {
|
||||
TypeComposition (OldType, NewType);
|
||||
} else {
|
||||
TypeCopy (OldType, NewType);
|
||||
Old->Flags &= ~FD_EMPTY;
|
||||
}
|
||||
}
|
||||
|
||||
return Old;
|
||||
}
|
||||
|
@ -63,9 +63,6 @@ void TypeComposition (Type* lhs, const Type* rhs);
|
||||
** type or this fails with a critical check.
|
||||
*/
|
||||
|
||||
FuncDesc* RefineFuncDesc (Type* OldType, const Type* NewType);
|
||||
/* Refine the existing function descriptor with a new one */
|
||||
|
||||
|
||||
|
||||
/* End of typeconv.h */
|
||||
|
Loading…
x
Reference in New Issue
Block a user