Changed "IsTypeStruct() || IsTypeUnion()" expressions into shorter "IsClassStruct()" expressions.
Type-classes are groups of types that can be handled in the same way (similar syntax).
This commit is contained in:
@@ -396,7 +396,7 @@ static unsigned FunctionParamList (FuncDesc* Func, int IsFastcall)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Handle struct/union specially */
|
/* Handle struct/union specially */
|
||||||
if (IsTypeStruct (Expr.Type) || IsTypeUnion (Expr.Type)) {
|
if (IsClassStruct (Expr.Type)) {
|
||||||
/* Use the replacement type */
|
/* Use the replacement type */
|
||||||
Flags |= TypeOf (GetStructReplacementType (Expr.Type));
|
Flags |= TypeOf (GetStructReplacementType (Expr.Type));
|
||||||
} else {
|
} else {
|
||||||
@@ -658,7 +658,7 @@ static void FunctionCall (ExprDesc* Expr)
|
|||||||
ReturnType = GetFuncReturn (Expr->Type);
|
ReturnType = GetFuncReturn (Expr->Type);
|
||||||
|
|
||||||
/* Handle struct/union specially */
|
/* Handle struct/union specially */
|
||||||
if (IsTypeStruct (ReturnType) || IsTypeUnion (ReturnType)) {
|
if (IsClassStruct (ReturnType)) {
|
||||||
/* If there is no replacement type, then it is just the address */
|
/* If there is no replacement type, then it is just the address */
|
||||||
if (ReturnType == GetStructReplacementType (ReturnType)) {
|
if (ReturnType == GetStructReplacementType (ReturnType)) {
|
||||||
/* Dereference it */
|
/* Dereference it */
|
||||||
|
|||||||
@@ -477,7 +477,7 @@ void NewFunc (SymEntry* Func)
|
|||||||
Flags = CF_PTR;
|
Flags = CF_PTR;
|
||||||
} else {
|
} else {
|
||||||
/* Handle struct/union specially */
|
/* Handle struct/union specially */
|
||||||
if (IsTypeStruct (D->LastParam->Type) || IsTypeUnion (D->LastParam->Type)) {
|
if (IsClassStruct (D->LastParam->Type)) {
|
||||||
Flags = TypeOf (GetStructReplacementType (D->LastParam->Type)) | CF_FORCECHAR;
|
Flags = TypeOf (GetStructReplacementType (D->LastParam->Type)) | CF_FORCECHAR;
|
||||||
} else {
|
} else {
|
||||||
Flags = TypeOf (D->LastParam->Type) | CF_FORCECHAR;
|
Flags = TypeOf (D->LastParam->Type) | CF_FORCECHAR;
|
||||||
@@ -506,7 +506,7 @@ void NewFunc (SymEntry* Func)
|
|||||||
|
|
||||||
/* Check if we need copy for struct/union type */
|
/* Check if we need copy for struct/union type */
|
||||||
RType = Param->Type;
|
RType = Param->Type;
|
||||||
if (IsTypeStruct (RType) || IsTypeUnion (RType)) {
|
if (IsClassStruct (RType)) {
|
||||||
RType = GetStructReplacementType (RType);
|
RType = GetStructReplacementType (RType);
|
||||||
|
|
||||||
/* If there is no replacement type, then it is just the address.
|
/* If there is no replacement type, then it is just the address.
|
||||||
|
|||||||
@@ -329,7 +329,7 @@ static void ReturnStatement (void)
|
|||||||
TypeConversion (&Expr, F_GetReturnType (CurrentFunc));
|
TypeConversion (&Expr, F_GetReturnType (CurrentFunc));
|
||||||
|
|
||||||
/* Load the value into the primary */
|
/* Load the value into the primary */
|
||||||
if (IsTypeStruct (Expr.Type) || IsTypeUnion (Expr.Type)) {
|
if (IsClassStruct (Expr.Type)) {
|
||||||
/* Handle struct/union specially */
|
/* Handle struct/union specially */
|
||||||
ReturnType = GetStructReplacementType (Expr.Type);
|
ReturnType = GetStructReplacementType (Expr.Type);
|
||||||
if (ReturnType == Expr.Type) {
|
if (ReturnType == Expr.Type) {
|
||||||
|
|||||||
Reference in New Issue
Block a user