From aec1b8dddc68ecb8288ec6132932e4c7b4bca09f Mon Sep 17 00:00:00 2001 From: Ash Wolf Date: Tue, 10 Jan 2023 11:05:21 +0000 Subject: getting close to done --- includes/compiler/CExpr.h | 47 ++++++++--------------------------------------- 1 file changed, 8 insertions(+), 39 deletions(-) (limited to 'includes/compiler/CExpr.h') diff --git a/includes/compiler/CExpr.h b/includes/compiler/CExpr.h index 24f0646..bdc0789 100644 --- a/includes/compiler/CExpr.h +++ b/includes/compiler/CExpr.h @@ -64,7 +64,9 @@ typedef struct Conversion { } Conversion; // CExpr.c -extern Boolean (*name_obj_check)(HashNameNode *, Object *); +typedef Boolean (*NameObjCheckCB)(HashNameNode *, Object *); + +extern NameObjCheckCB name_obj_check; extern Boolean disallowgreaterthan; // CExpr2.c @@ -174,7 +176,7 @@ extern void CExpr_MatchCV(Type *t1, UInt32 q1, Type *t2, UInt32 q2, Match13 *mat extern Boolean CExpr_MatchAssign(Type *type, UInt32 qual, ENode *expr, Match13 *match); extern ENode *CExpr_ClassPointerCast(BClassList *cls, ENode *expr, Boolean nullcheckflag); extern ENode *CExpr_GetClassAccessNode(BClassList *a, BClassList *b, ENode *expr, Object *obj, AccessType access, Boolean flag); -extern ENode *CExpr_ConvertToBool(ENode *expr, Boolean flag); +extern ENode *CExpr_ConvertToBool(ENode *expr, Boolean isExplicit); extern void CExpr_ConversionIteratorInit(ConversionIterator *iter, TypeClass *tclass); extern Object *CExpr_ConversionIteratorNext(ConversionIterator *iter); extern short user_assign_check(ENode *expr, Type *type, UInt32 qual, Boolean flag1, Boolean flag2, Boolean flag3); @@ -197,45 +199,12 @@ extern ENode *scannew(Boolean flag); extern ENode *scandelete(Boolean flag); // CExprConvMatch.c -// static void CExpr_GetImplictObjectParamType(); -// static void CExpr_GetParamType(); -// static void CExpr_HasNParams(); -// static void CExpr_TypeCompare(); -// static void CExpr_IsReferenceCompatible(); -// static void CExpr_IsBaseOf(); -// static void CExpr_IsBetterClassConversion(); -// static void CExpr_IsBetterStandardConv(); -// static void CExpr_IsBetterImplicitConv(); -// static void CExpr_SetupStandardConversionResult(); -// static void CExpr_SetQualConversionResult(); -// static void CExpr_OverloadFuncMatch(); -// static void CExpr_StandardConversionMatch(); -// static void CExpr_UserConversion(); -// static void CExpr_UserConversionMatch(); -// static void CExpr_ImplicitConversionMatch(); -extern Boolean CExpr_CanImplicitlyConvert(ENode *expr, Type *type, UInt32 qual); -// static void CExpr_DerivedToBase(); -// static void CExpr_ClassReferenceConversion(); -// static void CExpr_BindToReference(); -extern ENode *CExpr_Convert(ENode *expr, Type *type, UInt32 qual, Boolean flag1, Boolean flag2); -extern ENode *CExpr_AssignmentPromotion(ENode *expr, Type *type, UInt32 qual, Boolean flag); -// static void CExpr_IsBetterMatch(); -// static void CExpr_MatchArgs(); -// static void CExpr_GetMatchObject(); -// static void CExpr_FindBestMatch(); -extern void CExpr_FuncArgMatch(NameSpaceObjectList *nsol, TemplArg *templargs, ENodeList *argexprs, Match13 *match, ENode *expr, Boolean flag); -// static void CExpr_BuildConversionTypeList(); -// static void CExpr_NextPromotedIntegralType(); -// static void CExpr_NextArithmeticType(); -// static void CExpr_NextPromotedArithmeticType(); -// static void CExpr_MatchBuiltin(); -// static void CExpr_CheckIncDecBuiltin(); -// static void CExpr_CheckUnaryBuiltin(); -// static void CExpr_CheckBinaryBuiltin(); -// static void CExpr_MatchOperands(); +extern Boolean CExpr_CanImplicitlyConvert(ENode *expr, Type *type2, UInt32 qual2); +extern ENode *CExpr_Convert(ENode *expr, Type *type, UInt32 qual, Boolean isExplicit, Boolean flag2); +extern ENode *CExpr_AssignmentPromotion(ENode *expr, Type *type2, UInt32 qual2, Boolean flag); +extern void CExpr_FuncArgMatch(NameSpaceObjectList *list, TemplArg *templargs, ENodeList *argexprs, Match13 *match13, ENode *expr, Boolean flag); extern Boolean CExpr_CondOperatorMatch(ENode *left, ENode *right, Conversion *conv); extern Boolean CExpr_OperatorMatch(short token, ENode *left, ENode *right, Conversion *conv); -// static void CExpr_ClassCopyInit(); #ifdef __MWERKS__ #pragma options align=reset -- cgit v1.2.3