From 5d0bbb19cc133753cebda7099e46d4b2084336c6 Mon Sep 17 00:00:00 2001 From: Ash Wolf Date: Wed, 18 Jan 2023 17:19:20 +0000 Subject: rename TypeMethod and the struct type enums --- compiler_and_linker/unsorted/CABI.c | 2 +- compiler_and_linker/unsorted/CBrowse.c | 2 +- compiler_and_linker/unsorted/CClass.c | 12 +-- compiler_and_linker/unsorted/CDecl.c | 38 +++++----- compiler_and_linker/unsorted/CError.c | 22 +++--- compiler_and_linker/unsorted/CExpr.c | 24 +++--- compiler_and_linker/unsorted/CExpr2.c | 2 +- compiler_and_linker/unsorted/CInit.c | 22 +++--- compiler_and_linker/unsorted/CMachine.c | 56 +++++++------- compiler_and_linker/unsorted/CMangler.c | 22 +++--- compiler_and_linker/unsorted/CPrec.c | 2 +- compiler_and_linker/unsorted/CTemplateTools.c | 2 +- compiler_and_linker/unsorted/CodeGen.c | 86 +++++++++++----------- compiler_and_linker/unsorted/GenStabs.c | 22 +++--- compiler_and_linker/unsorted/IroDump.c | 22 +++--- .../unsorted/IroPointerAnalysisADTs.c | 6 +- compiler_and_linker/unsorted/Operands.c | 22 +++--- compiler_and_linker/unsorted/RegisterInfo.c | 2 +- compiler_and_linker/unsorted/uDump.c | 22 +++--- 19 files changed, 194 insertions(+), 194 deletions(-) (limited to 'compiler_and_linker') diff --git a/compiler_and_linker/unsorted/CABI.c b/compiler_and_linker/unsorted/CABI.c index d607104..d5bf287 100644 --- a/compiler_and_linker/unsorted/CABI.c +++ b/compiler_and_linker/unsorted/CABI.c @@ -407,7 +407,7 @@ static void CABI_AllocateVTable(DeclE *decle, TypeClass *tclass) { CError_ASSERT(714, objbase = decle->objlist[i]); if (objbase->otype == OT_OBJECT && OBJECT(objbase)->datatype == DVFUNC) { - TypeMethod *tmethod = TYPE_METHOD(OBJECT(objbase)->type); + TypeMemberFunc *tmethod = TYPE_METHOD(OBJECT(objbase)->type); Object *baseobj = CABI_FindZeroVirtualBaseMember(tclass, OBJECT(objbase)); if (baseobj) { diff --git a/compiler_and_linker/unsorted/CBrowse.c b/compiler_and_linker/unsorted/CBrowse.c index 9bc65b9..a776a70 100644 --- a/compiler_and_linker/unsorted/CBrowse.c +++ b/compiler_and_linker/unsorted/CBrowse.c @@ -300,7 +300,7 @@ void CBrowse_AddClassMemberVar(ObjMemberVar *ivar, SInt32 startOffset, SInt32 en void CBrowse_AddClassMemberFunction(Object *object, SInt32 startOffset, SInt32 endOffset) { SInt32 flags; SInt32 id; - TypeMethod *tfunc; + TypeMemberFunc *tfunc; CError_ASSERT(380, object); diff --git a/compiler_and_linker/unsorted/CClass.c b/compiler_and_linker/unsorted/CClass.c index 86ba7a9..93aa66c 100644 --- a/compiler_and_linker/unsorted/CClass.c +++ b/compiler_and_linker/unsorted/CClass.c @@ -227,7 +227,7 @@ Object *CClass_DummyDefaultConstructor(TypeClass *tclass) { FuncArg *args; NameSpaceObjectList *nsol; HashNameNode *name; - TypeMethod *tmethod; + TypeMemberFunc *tmethod; Object *object; ObjectList list; @@ -267,8 +267,8 @@ Object *CClass_DummyDefaultConstructor(TypeClass *tclass) { return OBJECT(nsol->object); } - tmethod = galloc(sizeof(TypeMethod)); - memclrw(tmethod, sizeof(TypeMethod)); + tmethod = galloc(sizeof(TypeMemberFunc)); + memclrw(tmethod, sizeof(TypeMemberFunc)); tmethod->type = TYPEFUNC; tmethod->functype = TYPE(&void_ptr); @@ -1249,9 +1249,9 @@ static TypeList *CClass_GetCoVariantClassList(TypeList *list, TypeClass *tclass, return list; } -static TypeMethod *CClass_GetCovariantType(TypeMethod *tmethod, Type *type) { +static TypeMemberFunc *CClass_GetCovariantType(TypeMemberFunc *tmethod, Type *type) { TypePointer *tptr; - TypeMethod *result; + TypeMemberFunc *result; CError_ASSERT(1724, IS_TYPE_METHOD(tmethod) && @@ -1261,7 +1261,7 @@ static TypeMethod *CClass_GetCovariantType(TypeMethod *tmethod, Type *type) { *tptr = *TYPE_POINTER(tmethod->functype); tptr->target = type; - result = galloc(sizeof(TypeMethod)); + result = galloc(sizeof(TypeMemberFunc)); *result = *tmethod; result->flags &= ~(FUNC_FLAGS_20 | FUNC_FLAGS_400000); result->functype = TYPE(tptr); diff --git a/compiler_and_linker/unsorted/CDecl.c b/compiler_and_linker/unsorted/CDecl.c index 7aee542..8ad16a8 100644 --- a/compiler_and_linker/unsorted/CDecl.c +++ b/compiler_and_linker/unsorted/CDecl.c @@ -1413,7 +1413,7 @@ Object *CDecl_GetFunctionObject(DeclInfo *declinfo, NameSpace *nspace, Boolean * Type *type; NameSpace *nspace2; NameSpaceObjectList *list; - TypeMethod tmp; + TypeMemberFunc tmp; Boolean outflag; r27 = 0; @@ -3138,11 +3138,11 @@ void CDecl_ExtractClassExportFlags(DeclInfo *declinfo, UInt8 flags) { declinfo->exportflags |= EXPORT_FLAGS_EXPORT; } -TypeMethod *CDecl_MakeTypeMemberFunc(TypeFunc *tfunc, TypeClass *tclass, Boolean flag) { - TypeMethod *method; +TypeMemberFunc *CDecl_MakeTypeMemberFunc(TypeFunc *tfunc, TypeClass *tclass, Boolean flag) { + TypeMemberFunc *method; - method = galloc(sizeof(TypeMethod)); - memclrw(method, sizeof(TypeMethod)); + method = galloc(sizeof(TypeMemberFunc)); + memclrw(method, sizeof(TypeMemberFunc)); *TYPE_FUNC(method) = *tfunc; method->theclass = tclass; method->x26 = flag; @@ -3167,7 +3167,7 @@ static void CDecl_MakeFunctionVirtual(TypeClass *tclass, Object *func) { static void CDecl_AddFunctionMember(DeclE *decle, TypeClass *tclass, DeclInfo *declinfo, short access, Boolean flag1, Boolean flag2, Boolean flag3, Boolean flag4) { NameSpaceObjectList *list; // r20 Object *obj; // also r20 - TypeMethod *tfunc; // r19 + TypeMemberFunc *tfunc; // r19 Boolean r31; Boolean outflag; @@ -4200,9 +4200,9 @@ static short getaccesstype(AccessType a, AccessType b, AccessType c) { return ACCESSPUBLIC; } -static TypeMethod *CDecl_MakeDefaultCtorType(TypeClass *tclass) { - TypeMethod *tmeth = galloc(sizeof(TypeMethod)); - memclrw(tmeth, sizeof(TypeMethod)); +static TypeMemberFunc *CDecl_MakeDefaultCtorType(TypeClass *tclass) { + TypeMemberFunc *tmeth = galloc(sizeof(TypeMemberFunc)); + memclrw(tmeth, sizeof(TypeMemberFunc)); tmeth->type = TYPEFUNC; tmeth->functype = TYPE(&void_ptr); tmeth->flags = FUNC_FLAGS_1000 | FUNC_FLAGS_100 | FUNC_FLAGS_METHOD; @@ -4220,7 +4220,7 @@ static void CDecl_AddDefArgConstructor(TypeClass *tclass) { // empty } -static void CDecl_AddMemberFunctionObject(TypeClass *tclass, HashNameNode *name, TypeMethod *tmeth, short access) { +static void CDecl_AddMemberFunctionObject(TypeClass *tclass, HashNameNode *name, TypeMemberFunc *tmeth, short access) { Object *obj = CParser_NewCompilerDefFunctionObject(); obj->name = name; obj->type = TYPE(tmeth); @@ -4272,10 +4272,10 @@ static void CDecl_AddDefaultConstructor(DeclE *decle, TypeClass *tclass) { } } -static TypeMethod *CDecl_MakeCopyCtorType(TypeClass *tclass, Boolean is_const) { +static TypeMemberFunc *CDecl_MakeCopyCtorType(TypeClass *tclass, Boolean is_const) { FuncArg *arg; - TypeMethod *tmeth = galloc(sizeof(TypeMethod)); - memclrw(tmeth, sizeof(TypeMethod)); + TypeMemberFunc *tmeth = galloc(sizeof(TypeMemberFunc)); + memclrw(tmeth, sizeof(TypeMemberFunc)); tmeth->type = TYPEFUNC; tmeth->functype = TYPE(&void_ptr); tmeth->flags = FUNC_FLAGS_1000 | FUNC_FLAGS_100 | FUNC_FLAGS_METHOD; @@ -4353,10 +4353,10 @@ static void CDecl_AddDefaultCopyConstructor(DeclE *decle, TypeClass *tclass) { } } -static TypeMethod *CDecl_MakeAssignmentOperatorType(TypeClass *tclass, Boolean is_const) { +static TypeMemberFunc *CDecl_MakeAssignmentOperatorType(TypeClass *tclass, Boolean is_const) { FuncArg *arg; - TypeMethod *tmeth = galloc(sizeof(TypeMethod)); - memclrw(tmeth, sizeof(TypeMethod)); + TypeMemberFunc *tmeth = galloc(sizeof(TypeMemberFunc)); + memclrw(tmeth, sizeof(TypeMemberFunc)); tmeth->type = TYPEFUNC; tmeth->functype = CDecl_NewRefPointerType(TYPE(tclass)); tmeth->flags = FUNC_FLAGS_100 | FUNC_FLAGS_METHOD; @@ -4424,9 +4424,9 @@ static void CDecl_AddDefaultAssignmentOperator(DeclE *decle, TypeClass *tclass) } } -TypeMethod *CDecl_MakeDefaultDtorType(TypeClass *tclass, Boolean is_virtual) { - TypeMethod *tmeth = galloc(sizeof(TypeMethod)); - memclrw(tmeth, sizeof(TypeMethod)); +TypeMemberFunc *CDecl_MakeDefaultDtorType(TypeClass *tclass, Boolean is_virtual) { + TypeMemberFunc *tmeth = galloc(sizeof(TypeMemberFunc)); + memclrw(tmeth, sizeof(TypeMemberFunc)); tmeth->type = TYPEFUNC; tmeth->functype = (Type *) &void_ptr; tmeth->flags = FUNC_FLAGS_2000 | FUNC_FLAGS_100 | FUNC_FLAGS_METHOD; diff --git a/compiler_and_linker/unsorted/CError.c b/compiler_and_linker/unsorted/CError.c index c49e956..985e46d 100644 --- a/compiler_and_linker/unsorted/CError.c +++ b/compiler_and_linker/unsorted/CError.c @@ -374,17 +374,17 @@ void CError_BufferAppendType(CErrorBuffer *eb, Type *ty, UInt32 qual) { case STRUCT_TYPE_UNION: CError_BufferAppendString(eb, "union "); break; - case STRUCT_TYPE_4: - case STRUCT_TYPE_5: - case STRUCT_TYPE_6: - case STRUCT_TYPE_7: - case STRUCT_TYPE_8: - case STRUCT_TYPE_9: - case STRUCT_TYPE_A: - case STRUCT_TYPE_B: - case STRUCT_TYPE_C: - case STRUCT_TYPE_D: - case STRUCT_TYPE_E: + case STRUCT_VECTOR_UCHAR: + case STRUCT_VECTOR_SCHAR: + case STRUCT_VECTOR_BCHAR: + case STRUCT_VECTOR_USHORT: + case STRUCT_VECTOR_SSHORT: + case STRUCT_VECTOR_BSHORT: + case STRUCT_VECTOR_UINT: + case STRUCT_VECTOR_SINT: + case STRUCT_VECTOR_BINT: + case STRUCT_VECTOR_FLOAT: + case STRUCT_VECTOR_PIXEL: break; default: CError_FATAL(618); diff --git a/compiler_and_linker/unsorted/CExpr.c b/compiler_and_linker/unsorted/CExpr.c index 64002a9..992fc09 100644 --- a/compiler_and_linker/unsorted/CExpr.c +++ b/compiler_and_linker/unsorted/CExpr.c @@ -950,7 +950,7 @@ ENode *CExpr_MakeNameLookupResultExpr(CScopeParseResult *pr) { static Type *CExpr_NewPTMType(EMemberInfo *member, Object *obj) { TypeMemberPointer *ptm; - TypeMethod *tmethod; + TypeMemberFunc *tmethod; BClassList *path; ptm = galloc(sizeof(TypeMemberPointer)); @@ -971,8 +971,8 @@ static Type *CExpr_NewPTMType(EMemberInfo *member, Object *obj) { CError_ASSERT(1308, IS_TYPE_FUNC(obj->type)); } - tmethod = galloc(sizeof(TypeMethod)); - memclrw(tmethod, sizeof(TypeMethod)); + tmethod = galloc(sizeof(TypeMemberFunc)); + memclrw(tmethod, sizeof(TypeMemberFunc)); *tmethod = *TYPE_METHOD(obj->type); CError_ASSERT(1312, tmethod->args); @@ -1376,15 +1376,15 @@ static ENode *CExpr_ParseVecStep(void) { CDecl_CompleteType(type); if (IS_TYPE_VECTOR(type)) { switch (TYPE_STRUCT(type)->stype) { - case STRUCT_TYPE_4: - case STRUCT_TYPE_5: - case STRUCT_TYPE_6: + case STRUCT_VECTOR_UCHAR: + case STRUCT_VECTOR_SCHAR: + case STRUCT_VECTOR_BCHAR: value = 16; break; - case STRUCT_TYPE_7: - case STRUCT_TYPE_8: - case STRUCT_TYPE_9: - case STRUCT_TYPE_E: + case STRUCT_VECTOR_USHORT: + case STRUCT_VECTOR_SSHORT: + case STRUCT_VECTOR_BSHORT: + case STRUCT_VECTOR_PIXEL: value = 8; break; default: @@ -2013,7 +2013,7 @@ loop: } goto loop; } - if (!IS_TYPE_STRUCT(expr->rtype) || TYPE_STRUCT(expr->rtype)->stype > STRUCT_TYPE_3) { + if (!IS_TYPE_STRUCT(expr->rtype) || TYPE_STRUCT(expr->rtype)->stype > STRUCT_TYPE_MAX) { if (copts.cplusplus && (subexpr = CExpr_DummyDestr(expr))) return subexpr; CError_ErrorSkip(CErrorStr149); @@ -2296,7 +2296,7 @@ ENode *getpointertomemberfunc(ENode *expr, Type *type, Boolean flag) { Object *obj; Object *dataobj; Type *ptmtype; - TypeMethod *tmethod; + TypeMemberFunc *tmethod; OLinkList *olist; SInt32 data[3]; diff --git a/compiler_and_linker/unsorted/CExpr2.c b/compiler_and_linker/unsorted/CExpr2.c index c770edc..6a5150c 100644 --- a/compiler_and_linker/unsorted/CExpr2.c +++ b/compiler_and_linker/unsorted/CExpr2.c @@ -1810,7 +1810,7 @@ short user_assign_check(ENode *expr, Type *type, UInt32 qual, Boolean flag1, Boo short r14b; TypeFunc *r14c; ENodeList *r14d; - TypeMethod *r13; + TypeMemberFunc *r13; ENodeList *r13b; short result; FuncArg *arg; diff --git a/compiler_and_linker/unsorted/CInit.c b/compiler_and_linker/unsorted/CInit.c index 76b96c2..2d2930f 100644 --- a/compiler_and_linker/unsorted/CInit.c +++ b/compiler_and_linker/unsorted/CInit.c @@ -900,9 +900,9 @@ static void CInit_InitTypeStruct(CInit_Stuff *s, CInit_Stuff2 *s2, const TypeStr tk = lex(); if (IS_TYPESTRUCT_VECTOR(tstruct)) { switch (TYPE_STRUCT(tstruct)->stype) { - case STRUCT_TYPE_4: - case STRUCT_TYPE_5: - case STRUCT_TYPE_6: + case STRUCT_VECTOR_UCHAR: + case STRUCT_VECTOR_SCHAR: + case STRUCT_VECTOR_BCHAR: if (count != 16) { if (count == 1) { UInt8 val, *p; @@ -915,10 +915,10 @@ static void CInit_InitTypeStruct(CInit_Stuff *s, CInit_Stuff2 *s2, const TypeStr } } break; - case STRUCT_TYPE_7: - case STRUCT_TYPE_8: - case STRUCT_TYPE_9: - case STRUCT_TYPE_E: + case STRUCT_VECTOR_USHORT: + case STRUCT_VECTOR_SSHORT: + case STRUCT_VECTOR_BSHORT: + case STRUCT_VECTOR_PIXEL: if (count != 8) { if (count == 1) { SInt16 val, *p; @@ -931,10 +931,10 @@ static void CInit_InitTypeStruct(CInit_Stuff *s, CInit_Stuff2 *s2, const TypeStr } } break; - case STRUCT_TYPE_A: - case STRUCT_TYPE_B: - case STRUCT_TYPE_C: - case STRUCT_TYPE_D: + case STRUCT_VECTOR_UINT: + case STRUCT_VECTOR_SINT: + case STRUCT_VECTOR_BINT: + case STRUCT_VECTOR_FLOAT: if (count != 4) { if (count == 1) { UInt32 val, *p; diff --git a/compiler_and_linker/unsorted/CMachine.c b/compiler_and_linker/unsorted/CMachine.c index 9eebdfe..c62faf5 100644 --- a/compiler_and_linker/unsorted/CMachine.c +++ b/compiler_and_linker/unsorted/CMachine.c @@ -95,23 +95,23 @@ static StructMember stVF_float2 = {&stVF_float3, (Type *) &stfloat, NULL, 8, 0}; static StructMember stVF_float1 = {&stVF_float2, (Type *) &stfloat, NULL, 4, 0}; static StructMember stVF_float0 = {&stVF_float1, (Type *) &stfloat, NULL, 0, 0}; -TypeStruct stvectorunsignedchar = {TYPESTRUCT, 16, NULL, &stVUC_unsignedchar0, STRUCT_TYPE_4, 16}; -TypeStruct stvectorsignedchar = {TYPESTRUCT, 16, NULL, &stVSC_signedchar0, STRUCT_TYPE_5, 16}; -TypeStruct stvectorboolchar = {TYPESTRUCT, 16, NULL, &stVSC_signedchar0, STRUCT_TYPE_6, 16}; +TypeStruct stvectorunsignedchar = {TYPESTRUCT, 16, NULL, &stVUC_unsignedchar0, STRUCT_VECTOR_UCHAR, 16}; +TypeStruct stvectorsignedchar = {TYPESTRUCT, 16, NULL, &stVSC_signedchar0, STRUCT_VECTOR_SCHAR, 16}; +TypeStruct stvectorboolchar = {TYPESTRUCT, 16, NULL, &stVSC_signedchar0, STRUCT_VECTOR_BCHAR, 16}; -TypeStruct stvectorunsignedshort = {TYPESTRUCT, 16, NULL, &stVUS_unsignedshort0, STRUCT_TYPE_7, 16}; -TypeStruct stvectorsignedshort = {TYPESTRUCT, 16, NULL, &stVSS_signedshort0, STRUCT_TYPE_8, 16}; -TypeStruct stvectorboolshort = {TYPESTRUCT, 16, NULL, &stVSS_signedshort0, STRUCT_TYPE_9, 16}; +TypeStruct stvectorunsignedshort = {TYPESTRUCT, 16, NULL, &stVUS_unsignedshort0, STRUCT_VECTOR_USHORT, 16}; +TypeStruct stvectorsignedshort = {TYPESTRUCT, 16, NULL, &stVSS_signedshort0, STRUCT_VECTOR_SSHORT, 16}; +TypeStruct stvectorboolshort = {TYPESTRUCT, 16, NULL, &stVSS_signedshort0, STRUCT_VECTOR_BSHORT, 16}; -TypeStruct stvectorunsignedlong = {TYPESTRUCT, 16, NULL, &stVUL_unsignedlong0, STRUCT_TYPE_A, 16}; -TypeStruct stvectorsignedlong = {TYPESTRUCT, 16, NULL, &stVSL_signedlong0, STRUCT_TYPE_B, 16}; -TypeStruct stvectorboollong = {TYPESTRUCT, 16, NULL, &stVSL_signedlong0, STRUCT_TYPE_C, 16}; +TypeStruct stvectorunsignedlong = {TYPESTRUCT, 16, NULL, &stVUL_unsignedlong0, STRUCT_VECTOR_UINT, 16}; +TypeStruct stvectorsignedlong = {TYPESTRUCT, 16, NULL, &stVSL_signedlong0, STRUCT_VECTOR_SINT, 16}; +TypeStruct stvectorboollong = {TYPESTRUCT, 16, NULL, &stVSL_signedlong0, STRUCT_VECTOR_BINT, 16}; -TypeStruct stvectorfloat = {TYPESTRUCT, 16, NULL, &stVF_float0, STRUCT_TYPE_D, 16}; +TypeStruct stvectorfloat = {TYPESTRUCT, 16, NULL, &stVF_float0, STRUCT_VECTOR_FLOAT, 16}; -TypeStruct stvectorpixel = {TYPESTRUCT, 16, NULL, &stVUS_unsignedshort0, STRUCT_TYPE_E, 16}; +TypeStruct stvectorpixel = {TYPESTRUCT, 16, NULL, &stVUS_unsignedshort0, STRUCT_VECTOR_PIXEL, 16}; -TypeStruct stvector = {TYPESTRUCT, 16, NULL, NULL, STRUCT_TYPE_A, 16}; +TypeStruct stvector = {TYPESTRUCT, 16, NULL, NULL, STRUCT_VECTOR_UINT, 16}; static SInt32 cmach_structoffset; static UInt8 cmach_structalign; @@ -217,7 +217,7 @@ SInt32 CMach_AllocationAlignment(Type *type, UInt32 qual) { align = anotheralign; if (copts.optimizationlevel > 0) { - if (type->type == TYPEARRAY || (type->type == TYPESTRUCT && (TYPE_STRUCT(type)->stype < STRUCT_TYPE_4 || TYPE_STRUCT(type)->stype > STRUCT_TYPE_E)) || type->type == TYPECLASS || (type->type == TYPEMEMBERPOINTER && (UInt32) type->size == 12)) { + if (type->type == TYPEARRAY || (type->type == TYPESTRUCT && (TYPE_STRUCT(type)->stype < STRUCT_VECTOR_UCHAR || TYPE_STRUCT(type)->stype > STRUCT_VECTOR_PIXEL)) || type->type == TYPECLASS || (type->type == TYPEMEMBERPOINTER && (UInt32) type->size == 12)) { return (copts.min_struct_alignment > align) ? copts.min_struct_alignment : align; } } @@ -581,29 +581,29 @@ void CMach_InitVectorMem(Type *type, MWVector128 val, void *mem, Boolean flag) { switch (type->type) { case TYPESTRUCT: switch (TYPE_STRUCT(type)->stype) { - case STRUCT_TYPE_4: - case STRUCT_TYPE_5: - case STRUCT_TYPE_6: + case STRUCT_VECTOR_UCHAR: + case STRUCT_VECTOR_SCHAR: + case STRUCT_VECTOR_BCHAR: for (i = 0; i < 16; i++) uc[i] = val.uc[i]; memcpy(mem, uc, 16); break; - case STRUCT_TYPE_7: - case STRUCT_TYPE_8: - case STRUCT_TYPE_9: - case STRUCT_TYPE_E: + case STRUCT_VECTOR_USHORT: + case STRUCT_VECTOR_SSHORT: + case STRUCT_VECTOR_BSHORT: + case STRUCT_VECTOR_PIXEL: for (i = 0; i < 8; i++) us[i] = val.us[i]; memcpy(mem, us, 16); break; - case STRUCT_TYPE_A: - case STRUCT_TYPE_B: - case STRUCT_TYPE_C: + case STRUCT_VECTOR_UINT: + case STRUCT_VECTOR_SINT: + case STRUCT_VECTOR_BINT: for (i = 0; i < 4; i++) ul[i] = val.ul[i]; memcpy(mem, ul, 16); break; - case STRUCT_TYPE_D: + case STRUCT_VECTOR_FLOAT: for (i = 0; i < 4; i++) f[i] = val.f[i]; memcpy(mem, f, 16); @@ -841,7 +841,7 @@ static SInt16 CMach_GetQualifiedStructAlign(const TypeStruct *tstruct, Boolean f SInt32 align; Boolean isFirst; - if (tstruct->stype >= STRUCT_TYPE_4 && tstruct->stype <= STRUCT_TYPE_E) + if (tstruct->stype >= STRUCT_VECTOR_UCHAR && tstruct->stype <= STRUCT_VECTOR_PIXEL) return 16; switch (copts.structalignment) { @@ -1030,7 +1030,7 @@ static SInt16 CMach_GetQualifiedTypeAlign(Type *type, Boolean flag) { Boolean isWin; SInt16 align; - if (type->type == TYPESTRUCT && TYPE_STRUCT(type)->stype >= STRUCT_TYPE_4 && TYPE_STRUCT(type)->stype <= STRUCT_TYPE_E) + if (type->type == TYPESTRUCT && TYPE_STRUCT(type)->stype >= STRUCT_VECTOR_UCHAR && TYPE_STRUCT(type)->stype <= STRUCT_VECTOR_PIXEL) return 16; switch (copts.structalignment) { @@ -1295,7 +1295,7 @@ static Boolean CMach_IsTrivialClass(TypeClass *tclass) { UInt8 CMach_GetFunctionResultClass(TypeFunc *tfunc) { switch (tfunc->functype->type) { case TYPESTRUCT: - if (tfunc->functype->type == TYPESTRUCT && TYPE_STRUCT(tfunc->functype)->stype >= STRUCT_TYPE_4 && TYPE_STRUCT(tfunc->functype)->stype <= STRUCT_TYPE_E) + if (tfunc->functype->type == TYPESTRUCT && TYPE_STRUCT(tfunc->functype)->stype >= STRUCT_VECTOR_UCHAR && TYPE_STRUCT(tfunc->functype)->stype <= STRUCT_VECTOR_PIXEL) return 0; case TYPECLASS: case TYPEMEMBERPOINTER: @@ -1308,7 +1308,7 @@ UInt8 CMach_GetFunctionResultClass(TypeFunc *tfunc) { Boolean CMach_PassResultInHiddenArg(Type *type) { switch (type->type) { case TYPESTRUCT: - if (TYPE_STRUCT(type)->stype >= STRUCT_TYPE_4 && TYPE_STRUCT(type)->stype <= STRUCT_TYPE_E) + if (TYPE_STRUCT(type)->stype >= STRUCT_VECTOR_UCHAR && TYPE_STRUCT(type)->stype <= STRUCT_VECTOR_PIXEL) return 0; else return 1; diff --git a/compiler_and_linker/unsorted/CMangler.c b/compiler_and_linker/unsorted/CMangler.c index f597d44..496f600 100644 --- a/compiler_and_linker/unsorted/CMangler.c +++ b/compiler_and_linker/unsorted/CMangler.c @@ -432,37 +432,37 @@ static void CMangler_MangleTypeAppend(Type *type, UInt32 qual) { case TYPESTRUCT: CMangler_MangleQualifier(qual); switch (TYPE_STRUCT(type)->stype) { - case STRUCT_TYPE_4: + case STRUCT_VECTOR_UCHAR: AppendGListName(&name_mangle_list, "XUc"); return; - case STRUCT_TYPE_5: + case STRUCT_VECTOR_SCHAR: AppendGListName(&name_mangle_list, "Xc"); return; - case STRUCT_TYPE_6: + case STRUCT_VECTOR_BCHAR: AppendGListName(&name_mangle_list, "XC"); return; - case STRUCT_TYPE_7: + case STRUCT_VECTOR_USHORT: AppendGListName(&name_mangle_list, "XUs"); return; - case STRUCT_TYPE_8: + case STRUCT_VECTOR_SSHORT: AppendGListName(&name_mangle_list, "Xs"); return; - case STRUCT_TYPE_9: + case STRUCT_VECTOR_BSHORT: AppendGListName(&name_mangle_list, "XS"); return; - case STRUCT_TYPE_A: + case STRUCT_VECTOR_UINT: AppendGListName(&name_mangle_list, "XUi"); return; - case STRUCT_TYPE_B: + case STRUCT_VECTOR_SINT: AppendGListName(&name_mangle_list, "Xi"); return; - case STRUCT_TYPE_C: + case STRUCT_VECTOR_BINT: AppendGListName(&name_mangle_list, "XI"); return; - case STRUCT_TYPE_D: + case STRUCT_VECTOR_FLOAT: AppendGListName(&name_mangle_list, "Xf"); return; - case STRUCT_TYPE_E: + case STRUCT_VECTOR_PIXEL: AppendGListName(&name_mangle_list, "Xp"); return; } diff --git a/compiler_and_linker/unsorted/CPrec.c b/compiler_and_linker/unsorted/CPrec.c index 78a36b6..9872211 100644 --- a/compiler_and_linker/unsorted/CPrec.c +++ b/compiler_and_linker/unsorted/CPrec.c @@ -872,7 +872,7 @@ static TypeFunc *CPrec_GetTypeFuncPatch(TypeFunc *type) { TypeFunc *p = CPrec_AppendAlign(); CPrec_NewAddrPatch(type, p); - CPrec_AppendData(type, (type->flags & FUNC_FLAGS_METHOD) ? sizeof(TypeMethod) : sizeof(TypeFunc)); + CPrec_AppendData(type, (type->flags & FUNC_FLAGS_METHOD) ? sizeof(TypeMemberFunc) : sizeof(TypeFunc)); CPrec_NewPointerPatch(&p->functype, CPrec_GetTypePatch(type->functype)); if (type->args) diff --git a/compiler_and_linker/unsorted/CTemplateTools.c b/compiler_and_linker/unsorted/CTemplateTools.c index bc7f8be..03a51cb 100644 --- a/compiler_and_linker/unsorted/CTemplateTools.c +++ b/compiler_and_linker/unsorted/CTemplateTools.c @@ -1906,7 +1906,7 @@ Type *CTemplTool_DeduceTypeCopy(TypeDeduce *deduce, Type *type, UInt32 *resultQu case TYPEFUNC: if (TYPE_FUNC(type)->flags & FUNC_FLAGS_METHOD) { qual2 = 0; - deduced = galloc(sizeof(TypeMethod)); + deduced = galloc(sizeof(TypeMemberFunc)); *TYPE_METHOD(deduced) = *TYPE_METHOD(type); TYPE_METHOD(deduced)->x22 = 0; TYPE_METHOD(deduced)->theclass = TYPE_CLASS(CTemplTool_DeduceTypeQualCopy(deduce, TYPE(TYPE_METHOD(type)->theclass), &qual2)); diff --git a/compiler_and_linker/unsorted/CodeGen.c b/compiler_and_linker/unsorted/CodeGen.c index f14aa60..19c7d1d 100644 --- a/compiler_and_linker/unsorted/CodeGen.c +++ b/compiler_and_linker/unsorted/CodeGen.c @@ -1969,17 +1969,17 @@ ENode *CodeGen_HandleTypeCast(ENode *expr, Type *type, UInt32 qual) { flags = qual & ENODE_FLAG_QUALS; if (IS_TYPE_STRUCT(type) && IS_TYPE_STRUCT(expr->rtype) && expr->flags == flags) { switch (TYPE_STRUCT(type)->stype) { - case STRUCT_TYPE_4: - case STRUCT_TYPE_5: - case STRUCT_TYPE_6: - case STRUCT_TYPE_7: - case STRUCT_TYPE_8: - case STRUCT_TYPE_9: - case STRUCT_TYPE_A: - case STRUCT_TYPE_B: - case STRUCT_TYPE_C: - case STRUCT_TYPE_D: - case STRUCT_TYPE_E: + case STRUCT_VECTOR_UCHAR: + case STRUCT_VECTOR_SCHAR: + case STRUCT_VECTOR_BCHAR: + case STRUCT_VECTOR_USHORT: + case STRUCT_VECTOR_SSHORT: + case STRUCT_VECTOR_BSHORT: + case STRUCT_VECTOR_UINT: + case STRUCT_VECTOR_SINT: + case STRUCT_VECTOR_BINT: + case STRUCT_VECTOR_FLOAT: + case STRUCT_VECTOR_PIXEL: expr = makemonadicnode(expr, ETYPCON); expr->rtype = type; expr->flags = flags; @@ -2026,9 +2026,9 @@ Boolean CodeGen_CollapseVectorExpression(ENode *expr, MWVector128 *vec, Type *ty escan = escan->data.diadic.left; } switch (TYPE_STRUCT(type)->stype) { - case STRUCT_TYPE_4: - case STRUCT_TYPE_5: - case STRUCT_TYPE_6: + case STRUCT_VECTOR_UCHAR: + case STRUCT_VECTOR_SCHAR: + case STRUCT_VECTOR_BCHAR: if (i < 15) { PPCError_Error(110, type, 0); } else if (i > 15) { @@ -2046,7 +2046,7 @@ Boolean CodeGen_CollapseVectorExpression(ENode *expr, MWVector128 *vec, Type *ty } if (copts.pedantic) { - if (TYPE_STRUCT(type)->stype == STRUCT_TYPE_4) { + if (TYPE_STRUCT(type)->stype == STRUCT_VECTOR_UCHAR) { if (!CInt64_IsInURange(v, 1)) PPCError_Warning(113, type, 0); } else { @@ -2062,7 +2062,7 @@ Boolean CodeGen_CollapseVectorExpression(ENode *expr, MWVector128 *vec, Type *ty if (ENODE_IS(escan, EINTCONST)) { CInt64 v = escan->data.intval; if (copts.pedantic) { - if (TYPE_STRUCT(type)->stype == STRUCT_TYPE_4) { + if (TYPE_STRUCT(type)->stype == STRUCT_VECTOR_UCHAR) { if (!CInt64_IsInURange(v, 1)) PPCError_Warning(113, type, 0); } else { @@ -2079,10 +2079,10 @@ Boolean CodeGen_CollapseVectorExpression(ENode *expr, MWVector128 *vec, Type *ty } break; - case STRUCT_TYPE_7: - case STRUCT_TYPE_8: - case STRUCT_TYPE_9: - case STRUCT_TYPE_E: + case STRUCT_VECTOR_USHORT: + case STRUCT_VECTOR_SSHORT: + case STRUCT_VECTOR_BSHORT: + case STRUCT_VECTOR_PIXEL: if (i < 7) { PPCError_Error(110, type, 0); } else if (i > 7) { @@ -2099,7 +2099,7 @@ Boolean CodeGen_CollapseVectorExpression(ENode *expr, MWVector128 *vec, Type *ty } if (copts.pedantic) { - if (TYPE_STRUCT(type)->stype == STRUCT_TYPE_7 || TYPE_STRUCT(type)->stype == STRUCT_TYPE_E) { + if (TYPE_STRUCT(type)->stype == STRUCT_VECTOR_USHORT || TYPE_STRUCT(type)->stype == STRUCT_VECTOR_PIXEL) { if (!CInt64_IsInURange(v, 2)) PPCError_Warning(113, type, 0); } else { @@ -2115,7 +2115,7 @@ Boolean CodeGen_CollapseVectorExpression(ENode *expr, MWVector128 *vec, Type *ty if (ENODE_IS(escan, EINTCONST)) { CInt64 v = escan->data.intval; if (copts.pedantic) { - if (TYPE_STRUCT(type)->stype == STRUCT_TYPE_7 || TYPE_STRUCT(type)->stype == STRUCT_TYPE_E) { + if (TYPE_STRUCT(type)->stype == STRUCT_VECTOR_USHORT || TYPE_STRUCT(type)->stype == STRUCT_VECTOR_PIXEL) { if (!CInt64_IsInURange(v, 2)) PPCError_Warning(113, type, 0); } else { @@ -2132,9 +2132,9 @@ Boolean CodeGen_CollapseVectorExpression(ENode *expr, MWVector128 *vec, Type *ty } break; - case STRUCT_TYPE_A: - case STRUCT_TYPE_B: - case STRUCT_TYPE_C: + case STRUCT_VECTOR_UINT: + case STRUCT_VECTOR_SINT: + case STRUCT_VECTOR_BINT: if (i < 3) { PPCError_Error(110, type, 0); } else if (i > 3) { @@ -2152,7 +2152,7 @@ Boolean CodeGen_CollapseVectorExpression(ENode *expr, MWVector128 *vec, Type *ty } if (copts.pedantic) { - if (TYPE_STRUCT(type)->stype == STRUCT_TYPE_A) { + if (TYPE_STRUCT(type)->stype == STRUCT_VECTOR_UINT) { if (!CInt64_IsInURange(v, 4)) PPCError_Warning(113, type, 0); } else { @@ -2168,7 +2168,7 @@ Boolean CodeGen_CollapseVectorExpression(ENode *expr, MWVector128 *vec, Type *ty if (ENODE_IS(escan, EINTCONST)) { CInt64 v = escan->data.intval; if (copts.pedantic) { - if (TYPE_STRUCT(type)->stype == STRUCT_TYPE_A) { + if (TYPE_STRUCT(type)->stype == STRUCT_VECTOR_UINT) { if (!CInt64_IsInURange(v, 4)) PPCError_Warning(113, type, 0); } else { @@ -2185,7 +2185,7 @@ Boolean CodeGen_CollapseVectorExpression(ENode *expr, MWVector128 *vec, Type *ty } break; - case STRUCT_TYPE_D: + case STRUCT_VECTOR_FLOAT: if (i < 3) { PPCError_Error(110, type, 0); } else if (i > 3) { @@ -2228,13 +2228,13 @@ Boolean CodeGen_CollapseVectorExpression(ENode *expr, MWVector128 *vec, Type *ty } else if (ENODE_IS(expr, EINTCONST)) { int i = 0; switch (TYPE_STRUCT(type)->stype) { - case STRUCT_TYPE_4: - case STRUCT_TYPE_5: - case STRUCT_TYPE_6: + case STRUCT_VECTOR_UCHAR: + case STRUCT_VECTOR_SCHAR: + case STRUCT_VECTOR_BCHAR: { CInt64 v = expr->data.intval; if (copts.pedantic) { - if (TYPE_STRUCT(type)->stype == STRUCT_TYPE_4) { + if (TYPE_STRUCT(type)->stype == STRUCT_VECTOR_UCHAR) { if (!CInt64_IsInURange(v, 1)) PPCError_Warning(113, type, 0); } else { @@ -2247,14 +2247,14 @@ Boolean CodeGen_CollapseVectorExpression(ENode *expr, MWVector128 *vec, Type *ty result = 1; break; } - case STRUCT_TYPE_7: - case STRUCT_TYPE_8: - case STRUCT_TYPE_9: - case STRUCT_TYPE_E: + case STRUCT_VECTOR_USHORT: + case STRUCT_VECTOR_SSHORT: + case STRUCT_VECTOR_BSHORT: + case STRUCT_VECTOR_PIXEL: { CInt64 v = expr->data.intval; if (copts.pedantic) { - if (TYPE_STRUCT(type)->stype == STRUCT_TYPE_7 || TYPE_STRUCT(type)->stype == STRUCT_TYPE_E) { + if (TYPE_STRUCT(type)->stype == STRUCT_VECTOR_USHORT || TYPE_STRUCT(type)->stype == STRUCT_VECTOR_PIXEL) { if (!CInt64_IsInURange(v, 2)) PPCError_Warning(113, type, 0); } else { @@ -2267,13 +2267,13 @@ Boolean CodeGen_CollapseVectorExpression(ENode *expr, MWVector128 *vec, Type *ty result = 1; break; } - case STRUCT_TYPE_A: - case STRUCT_TYPE_B: - case STRUCT_TYPE_C: + case STRUCT_VECTOR_UINT: + case STRUCT_VECTOR_SINT: + case STRUCT_VECTOR_BINT: { CInt64 v = expr->data.intval; if (copts.pedantic) { - if (TYPE_STRUCT(type)->stype == STRUCT_TYPE_A) { + if (TYPE_STRUCT(type)->stype == STRUCT_VECTOR_UINT) { if (!CInt64_IsInURange(v, 4)) PPCError_Warning(113, type, 0); } else { @@ -2286,7 +2286,7 @@ Boolean CodeGen_CollapseVectorExpression(ENode *expr, MWVector128 *vec, Type *ty result = 1; break; } - case STRUCT_TYPE_D: + case STRUCT_VECTOR_FLOAT: { Float fv; if (!CInt64_IsInRange(expr->data.intval, 4)) { @@ -2307,7 +2307,7 @@ Boolean CodeGen_CollapseVectorExpression(ENode *expr, MWVector128 *vec, Type *ty default: PPCError_Error(112); break; - case STRUCT_TYPE_D: + case STRUCT_VECTOR_FLOAT: { Float fv; i = 0; diff --git a/compiler_and_linker/unsorted/GenStabs.c b/compiler_and_linker/unsorted/GenStabs.c index 2db276f..f024ede 100644 --- a/compiler_and_linker/unsorted/GenStabs.c +++ b/compiler_and_linker/unsorted/GenStabs.c @@ -711,17 +711,17 @@ static int StabTypeID(Type *type) { case TYPESTRUCT: if (IS_TYPESTRUCT_VECTOR(TYPE_STRUCT(type))) { switch (TYPE_STRUCT(type)->stype) { - case STRUCT_TYPE_4: return StabType_VectorUChar; - case STRUCT_TYPE_5: return StabType_VectorSChar; - case STRUCT_TYPE_6: return StabType_VectorBChar; - case STRUCT_TYPE_7: return StabType_VectorUShort; - case STRUCT_TYPE_8: return StabType_VectorSShort; - case STRUCT_TYPE_9: return StabType_VectorBShort; - case STRUCT_TYPE_A: return StabType_VectorUInt; - case STRUCT_TYPE_B: return StabType_VectorSInt; - case STRUCT_TYPE_C: return StabType_VectorBInt; - case STRUCT_TYPE_D: return StabType_VectorFloat; - case STRUCT_TYPE_E: return StabType_VectorPixel; + case STRUCT_VECTOR_UCHAR: return StabType_VectorUChar; + case STRUCT_VECTOR_SCHAR: return StabType_VectorSChar; + case STRUCT_VECTOR_BCHAR: return StabType_VectorBChar; + case STRUCT_VECTOR_USHORT: return StabType_VectorUShort; + case STRUCT_VECTOR_SSHORT: return StabType_VectorSShort; + case STRUCT_VECTOR_BSHORT: return StabType_VectorBShort; + case STRUCT_VECTOR_UINT: return StabType_VectorUInt; + case STRUCT_VECTOR_SINT: return StabType_VectorSInt; + case STRUCT_VECTOR_BINT: return StabType_VectorBInt; + case STRUCT_VECTOR_FLOAT: return StabType_VectorFloat; + case STRUCT_VECTOR_PIXEL: return StabType_VectorPixel; } } else { id = local_struct(type); diff --git a/compiler_and_linker/unsorted/IroDump.c b/compiler_and_linker/unsorted/IroDump.c index dfa6c3e..c59aa7b 100644 --- a/compiler_and_linker/unsorted/IroDump.c +++ b/compiler_and_linker/unsorted/IroDump.c @@ -576,37 +576,37 @@ void IRO_SpellType(Type *type, char *buf) { case TYPESTRUCT: if (IS_TYPESTRUCT_VECTOR(TYPE_STRUCT(type))) { switch (TYPE_STRUCT(type)->stype) { - case STRUCT_TYPE_4: + case STRUCT_VECTOR_UCHAR: strcpy(buf, "vector unsigned char "); break; - case STRUCT_TYPE_5: + case STRUCT_VECTOR_SCHAR: strcpy(buf, "vector signed char "); break; - case STRUCT_TYPE_6: + case STRUCT_VECTOR_BCHAR: strcpy(buf, "vector bool char "); break; - case STRUCT_TYPE_7: + case STRUCT_VECTOR_USHORT: strcpy(buf, "vector unsigned short "); break; - case STRUCT_TYPE_8: + case STRUCT_VECTOR_SSHORT: strcpy(buf, "vector signed short "); break; - case STRUCT_TYPE_9: + case STRUCT_VECTOR_BSHORT: strcpy(buf, "vector bool short "); break; - case STRUCT_TYPE_A: + case STRUCT_VECTOR_UINT: strcpy(buf, "vector unsigned long "); break; - case STRUCT_TYPE_B: + case STRUCT_VECTOR_SINT: strcpy(buf, "vector signed long "); break; - case STRUCT_TYPE_C: + case STRUCT_VECTOR_BINT: strcpy(buf, "vector bool long "); break; - case STRUCT_TYPE_D: + case STRUCT_VECTOR_FLOAT: strcpy(buf, "vector float "); break; - case STRUCT_TYPE_E: + case STRUCT_VECTOR_PIXEL: strcpy(buf, "vector pixel "); break; } diff --git a/compiler_and_linker/unsorted/IroPointerAnalysisADTs.c b/compiler_and_linker/unsorted/IroPointerAnalysisADTs.c index 744f58c..6e24e6f 100644 --- a/compiler_and_linker/unsorted/IroPointerAnalysisADTs.c +++ b/compiler_and_linker/unsorted/IroPointerAnalysisADTs.c @@ -2308,9 +2308,9 @@ CW_INLINE void PointsToFunction_RemoveByLocationSet(PointsToFunction *pointsToFu PointsToFunction *prev; PointsToFunction *tmp; - IRO_ASSERT(3170, pointsToFunc != NULL); - IRO_ASSERT(3171, ls != NULL); - IRO_ASSERT(3172, !LocationSet_IsUnknown(ls)); + IRO_ASSERT(3818, pointsToFunc != NULL); + IRO_ASSERT(3819, ls != NULL); + IRO_ASSERT(3820, !LocationSet_IsUnknown(ls)); prev = NULL; while (pointsToFunc && pointsToFunc->pte) { diff --git a/compiler_and_linker/unsorted/Operands.c b/compiler_and_linker/unsorted/Operands.c index d1e96ef..2b717e9 100644 --- a/compiler_and_linker/unsorted/Operands.c +++ b/compiler_and_linker/unsorted/Operands.c @@ -632,21 +632,21 @@ void Coerce_to_v_register(Operand *op, Type *type, short output_reg) { case OpndType_Absolute: reg = output_reg ? output_reg : used_virtual_registers[RegClass_VR]++; switch (TYPE_STRUCT(type)->stype) { - case STRUCT_TYPE_4: - case STRUCT_TYPE_5: - case STRUCT_TYPE_6: + case STRUCT_VECTOR_UCHAR: + case STRUCT_VECTOR_SCHAR: + case STRUCT_VECTOR_BCHAR: emitpcode(PC_VSPLTISB, reg, op->immediate); break; - case STRUCT_TYPE_7: - case STRUCT_TYPE_8: - case STRUCT_TYPE_9: - case STRUCT_TYPE_E: + case STRUCT_VECTOR_USHORT: + case STRUCT_VECTOR_SSHORT: + case STRUCT_VECTOR_BSHORT: + case STRUCT_VECTOR_PIXEL: emitpcode(PC_VSPLTISH, reg, op->immediate); break; - case STRUCT_TYPE_A: - case STRUCT_TYPE_B: - case STRUCT_TYPE_C: - case STRUCT_TYPE_D: + case STRUCT_VECTOR_UINT: + case STRUCT_VECTOR_SINT: + case STRUCT_VECTOR_BINT: + case STRUCT_VECTOR_FLOAT: emitpcode(PC_VSPLTISW, reg, op->immediate); break; default: diff --git a/compiler_and_linker/unsorted/RegisterInfo.c b/compiler_and_linker/unsorted/RegisterInfo.c index 72aa09c..177c2e0 100644 --- a/compiler_and_linker/unsorted/RegisterInfo.c +++ b/compiler_and_linker/unsorted/RegisterInfo.c @@ -194,7 +194,7 @@ void assign_register_by_type(Object *obj) { vi->rclass = RegClass_GPR; } else if (ty->type == TYPEFLOAT) { vi->rclass = RegClass_FPR; - } else if ((ty->type == TYPESTRUCT) && (TYPE_STRUCT(ty)->stype >= STRUCT_TYPE_4) && (TYPE_STRUCT(ty)->stype <= STRUCT_TYPE_E)) { + } else if ((ty->type == TYPESTRUCT) && (TYPE_STRUCT(ty)->stype >= STRUCT_VECTOR_UCHAR) && (TYPE_STRUCT(ty)->stype <= STRUCT_VECTOR_PIXEL)) { vi->rclass = RegClass_VR; } else { return; diff --git a/compiler_and_linker/unsorted/uDump.c b/compiler_and_linker/unsorted/uDump.c index 77ac238..58bc589 100644 --- a/compiler_and_linker/unsorted/uDump.c +++ b/compiler_and_linker/unsorted/uDump.c @@ -521,37 +521,37 @@ static void spell(Type *type, char *buf) { case TYPESTRUCT: if (IS_TYPESTRUCT_VECTOR(TYPE_STRUCT(type))) { switch (TYPE_STRUCT(type)->stype) { - case STRUCT_TYPE_4: + case STRUCT_VECTOR_UCHAR: strcpy(buf, "vector unsigned char "); break; - case STRUCT_TYPE_5: + case STRUCT_VECTOR_SCHAR: strcpy(buf, "vector signed char "); break; - case STRUCT_TYPE_6: + case STRUCT_VECTOR_BCHAR: strcpy(buf, "vector bool char "); break; - case STRUCT_TYPE_7: + case STRUCT_VECTOR_USHORT: strcpy(buf, "vector unsigned short "); break; - case STRUCT_TYPE_8: + case STRUCT_VECTOR_SSHORT: strcpy(buf, "vector signed short "); break; - case STRUCT_TYPE_9: + case STRUCT_VECTOR_BSHORT: strcpy(buf, "vector bool short "); break; - case STRUCT_TYPE_A: + case STRUCT_VECTOR_UINT: strcpy(buf, "vector unsigned int "); break; - case STRUCT_TYPE_B: + case STRUCT_VECTOR_SINT: strcpy(buf, "vector signed int "); break; - case STRUCT_TYPE_C: + case STRUCT_VECTOR_BINT: strcpy(buf, "vector bool int "); break; - case STRUCT_TYPE_D: + case STRUCT_VECTOR_FLOAT: strcpy(buf, "vector float "); break; - case STRUCT_TYPE_E: + case STRUCT_VECTOR_PIXEL: strcpy(buf, "vector pixel "); break; } -- cgit v1.2.3