diff options
author | Ash Wolf <ninji@wuffs.org> | 2023-01-20 11:56:38 +0000 |
---|---|---|
committer | Ash Wolf <ninji@wuffs.org> | 2023-01-20 11:56:38 +0000 |
commit | 0905072b3ccfcb394b1dca2405a55cff4e2b9271 (patch) | |
tree | c7c6f87ecf257c4e7b6a92355e75030165731371 /compiler_and_linker/unsorted/CExpr.c | |
parent | 7d986adf37220e1981a707745b784b078de4e3bc (diff) | |
download | MWCC-0905072b3ccfcb394b1dca2405a55cff4e2b9271.tar.gz MWCC-0905072b3ccfcb394b1dca2405a55cff4e2b9271.zip |
tons more renaming of stuff
Diffstat (limited to 'compiler_and_linker/unsorted/CExpr.c')
-rw-r--r-- | compiler_and_linker/unsorted/CExpr.c | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/compiler_and_linker/unsorted/CExpr.c b/compiler_and_linker/unsorted/CExpr.c index 500ae57..23fe22f 100644 --- a/compiler_and_linker/unsorted/CExpr.c +++ b/compiler_and_linker/unsorted/CExpr.c @@ -44,7 +44,7 @@ restart: goto restart; } - if ((obj->qual & Q_10000) && expr->rtype == obj->type) { + if ((obj->qual & Q_INLINE_DATA) && expr->rtype == obj->type) { switch (expr->rtype->type) { case TYPEINT: case TYPEENUM: @@ -783,7 +783,7 @@ ENode *CExpr_DoExplicitConversion(Type *type, UInt32 qual, ENodeList *list) { } CDecl_CompleteType(type); - if (!(TYPE_CLASS(type)->flags & CLASS_FLAGS_2)) + if (!(TYPE_CLASS(type)->flags & CLASS_COMPLETED)) CError_Error(CErrorStr136, type, 0); CanCreateObject(type); @@ -866,7 +866,7 @@ static Boolean CExpr_IsTemplateFunc(Object *obj) { return IS_TEMPL_FUNC(obj->type); } -static ENode *CExpr_ExplicitTemplateArgCheck(CScopeParseResult *pr) { +static ENode *CExpr_ExplicitTemplateArgCheck(NameResult *pr) { NameSpaceObjectList *list; NameSpaceObjectList *newhead; NameSpaceObjectList *newlist; @@ -912,7 +912,7 @@ static ENode *CExpr_ExplicitTemplateArgCheck(CScopeParseResult *pr) { return expr; } -ENode *CExpr_MakeNameLookupResultExpr(CScopeParseResult *pr) { +ENode *CExpr_MakeNameLookupResultExpr(NameResult *pr) { ENode *expr; if (pr->obj_10) { @@ -979,7 +979,7 @@ static Type *CExpr_NewPTMType(EMemberInfo *member, Object *obj) { tmethod->args = tmethod->args->next; CDecl_MakePTMFuncType(TYPE_FUNC(tmethod)); - tmethod->flags &= ~FUNC_FLAGS_2; + tmethod->flags &= ~FUNC_DEFINED; ptm->size = 12; ptm->ty2 = TYPE(tmethod->theclass); @@ -989,7 +989,7 @@ static Type *CExpr_NewPTMType(EMemberInfo *member, Object *obj) { return TYPE(ptm); } -static ENode *CExpr_ParseNameResultExpr(CScopeParseResult *pr, ENode *expr, Boolean flag1, Boolean flag2) { +static ENode *CExpr_ParseNameResultExpr(NameResult *pr, ENode *expr, Boolean flag1, Boolean flag2) { ENode *result; ENode *ta_expr; ObjEnumConst *oec; @@ -1000,25 +1000,25 @@ static ENode *CExpr_ParseNameResultExpr(CScopeParseResult *pr, ENode *expr, Bool TypeFunc *tfunc; SInt32 val; - if (pr->x8) { + if (pr->type) { if (copts.cplusplus) { - if (IS_TYPE_TEMPLATE(pr->x8)) { - if (TYPE_TEMPLATE(pr->x8)->dtype == TEMPLDEP_ARGUMENT && TYPE_TEMPLATE(pr->x8)->u.pid.type == TPT_NONTYPE) { + if (IS_TYPE_TEMPLATE(pr->type)) { + if (TYPE_TEMPLATE(pr->type)->dtype == TEMPLDEP_ARGUMENT && TYPE_TEMPLATE(pr->type)->u.pid.type == TPT_NONTYPE) { result = CExpr_NewTemplDepENode(TDE_PARAM); - result->data.templdep.u.pid = TYPE_TEMPLATE(pr->x8)->u.pid; + result->data.templdep.u.pid = TYPE_TEMPLATE(pr->type)->u.pid; tk = lex(); return result; } - if (TYPE_TEMPLATE(pr->x8)->dtype == TEMPLDEP_QUALNAME && !pr->x20) { + if (TYPE_TEMPLATE(pr->type)->dtype == TEMPLDEP_QUALNAME && !pr->x20) { result = CExpr_NewTemplDepENode(TDE_QUALNAME); - result->data.templdep.u.qual.type = TYPE_TEMPLATE(pr->x8)->u.qual.type; - result->data.templdep.u.qual.name = TYPE_TEMPLATE(pr->x8)->u.qual.name; + result->data.templdep.u.qual.type = TYPE_TEMPLATE(pr->type)->u.qual.type; + result->data.templdep.u.qual.name = TYPE_TEMPLATE(pr->type)->u.qual.name; tk = lex(); return result; } } tk = lex(); - return CExpr_ParseExplicitConversion(pr->x8, pr->xC); + return CExpr_ParseExplicitConversion(pr->type, pr->qual); } CError_ErrorSkip(CErrorStr141); tk = lex(); @@ -1028,7 +1028,7 @@ static ENode *CExpr_ParseNameResultExpr(CScopeParseResult *pr, ENode *expr, Bool if (pr->obj_10) { switch (pr->obj_10->otype) { case OT_OBJECT: - if (OBJECT(pr->obj_10)->nspace && OBJECT(pr->obj_10)->nspace->theclass && (OBJECT(pr->obj_10)->nspace->theclass->flags & CLASS_FLAGS_100)) { + if (OBJECT(pr->obj_10)->nspace && OBJECT(pr->obj_10)->nspace->theclass && (OBJECT(pr->obj_10)->nspace->theclass->flags & CLASS_IS_TEMPL)) { result = CExpr_NewTemplDepENode(TDE_OBJ); result->data.templdep.u.obj = OBJECT(pr->obj_10); tk = lex(); @@ -1103,7 +1103,7 @@ static ENode *CExpr_ParseNameResultExpr(CScopeParseResult *pr, ENode *expr, Bool case OT_ENUMCONST: CClass_CheckEnumAccess(pr->bcl_18, OBJ_ENUM_CONST(pr->obj_10)); oec = OBJ_ENUM_CONST(pr->obj_10); - if (CInt64_IsZero(&oec->val) && IS_TYPE_ENUM(oec->type) && TYPE_ENUM(oec->type)->nspace && TYPE_ENUM(oec->type)->nspace->theclass && (TYPE_ENUM(oec->type)->nspace->theclass->flags & CLASS_FLAGS_100)) { + if (CInt64_IsZero(&oec->val) && IS_TYPE_ENUM(oec->type) && TYPE_ENUM(oec->type)->nspace && TYPE_ENUM(oec->type)->nspace->theclass && (TYPE_ENUM(oec->type)->nspace->theclass->flags & CLASS_IS_TEMPL)) { val = 0; expr = NULL; for (act = TEMPL_CLASS(TYPE_ENUM(oec->type)->nspace->theclass)->actions; act; act = act->next) { @@ -1304,7 +1304,7 @@ static ENode *CExpr_ParseRotate(Boolean is_right) { static ENode *CExpr_ParseNextArg(void) { NameSpaceObjectList *list; - CScopeParseResult pr; + NameResult pr; ENode *expr; SInt32 rounded_size; @@ -1560,7 +1560,7 @@ static ENode *CExpr_ParseBuiltin_isintconst(void) { } static ENode *primary_expression(Boolean flag) { - CScopeParseResult pr; + NameResult pr; ENode *expr; switch (tk) { @@ -1753,7 +1753,7 @@ static ENode *call_ptmf(ENode *expr) { static ENode *CExpr_DummyDestr(ENode *expr) { SInt32 state; - CScopeParseResult pr; + NameResult pr; DeclInfo di; NameSpace *nspace; @@ -1779,17 +1779,17 @@ loop: nspace = pr.nspace_0; goto loop; } - } else if (IS_TYPE_CLASS(pr.x8) && tk == TK_COLON_COLON) { + } else if (IS_TYPE_CLASS(pr.type) && tk == TK_COLON_COLON) { tk = lex(); - nspace = TYPE_CLASS(pr.x8)->nspace; + nspace = TYPE_CLASS(pr.type)->nspace; goto loop; } else { - if (!is_typesame(pr.x8, expr->rtype)) + if (!is_typesame(pr.type, expr->rtype)) CError_Error(CErrorStr146); if (tk == TK_COLON_COLON && ((tk = lex()) == '~') && ((tk = lex()) == TK_IDENTIFIER)) { parse_dtor: if (CScope_FindTypeName(nspace, tkidentifier, &pr) && !pr.nspace_0) { - if (!is_typesame(pr.x8, expr->rtype)) + if (!is_typesame(pr.type, expr->rtype)) CError_Error(CErrorStr146); tk = lex(); goto parsed; @@ -1833,7 +1833,7 @@ parsed: } static ENode *postfix_expression(Boolean flag) { - CScopeParseResult pr; + NameResult pr; Conversion conv; ENode *expr; ENode *subexpr; @@ -1988,7 +1988,7 @@ loop: if (TYPE_CLASS(expr->rtype)->objcinfo && copts.cplusplus && (subexpr = CObjC_CheckModernSendMessage(TYPE_CLASS(expr->rtype), expr))) return subexpr; - if (!(TYPE_CLASS(expr->rtype)->flags & CLASS_FLAGS_2)) + if (!(TYPE_CLASS(expr->rtype)->flags & CLASS_COMPLETED)) CError_Error(CErrorStr136, expr->rtype, 0); if ((tk = lex()) == TK_TEMPLATE && (tk = lex()) != TK_IDENTIFIER) @@ -2341,7 +2341,7 @@ ENode *getpointertomemberfunc(ENode *expr, Type *type, Boolean flag) { CError_ASSERT(3503, obj->otype == OT_OBJECT && IS_TYPE_NONSTATIC_METHOD(obj->type)); - if (TYPE_FUNC(obj->type)->flags & FUNC_FLAGS_100000) + if (TYPE_FUNC(obj->type)->flags & FUNC_IS_TEMPL) CError_Error(CErrorStr190); ptmtype = CExpr_NewPTMType(expr->data.emember, obj); @@ -2356,7 +2356,7 @@ ENode *getpointertomemberfunc(ENode *expr, Type *type, Boolean flag) { data[0] = 0; if (obj->datatype == DVFUNC) { olist = NULL; - data[1] = tmethod->x1E; + data[1] = tmethod->vtbl_index; data[2] = tmethod->theclass->vtable->offset; } else { data[1] = -1; |