diff options
Diffstat (limited to 'includes/compiler')
-rw-r--r-- | includes/compiler/CDecl.h | 4 | ||||
-rw-r--r-- | includes/compiler/common.h | 2 | ||||
-rw-r--r-- | includes/compiler/types.h | 45 |
3 files changed, 18 insertions, 33 deletions
diff --git a/includes/compiler/CDecl.h b/includes/compiler/CDecl.h index 331a53b..e4537f8 100644 --- a/includes/compiler/CDecl.h +++ b/includes/compiler/CDecl.h @@ -117,14 +117,14 @@ extern void scanenum(DeclInfo *declinfo); extern void CDecl_ScanStructDeclarator(BigDeclInfo *bde); extern void scanstruct(DeclInfo *declinfo, short structtype); extern void CDecl_ExtractClassExportFlags(DeclInfo *declinfo, UInt8 flags); -extern TypeMethod *CDecl_MakeTypeMemberFunc(TypeFunc *tfunc, TypeClass *tclass, Boolean flag); +extern TypeMemberFunc *CDecl_MakeTypeMemberFunc(TypeFunc *tfunc, TypeClass *tclass, Boolean flag); extern void CDecl_PackDeclInfo(PackedDeclInfo *packed, DeclInfo *declinfo); extern void CDecl_UnpackDeclInfo(DeclInfo *declinfo, PackedDeclInfo *packed); extern void CDecl_AddFriend(TypeClass *tclass, Object *friendfunc, TypeClass *friendclass); extern void CDecl_CheckCtorIntegrity(FuncArg *args, TypeClass *tclass); extern void CDecl_MakeVBaseList(TypeClass *tclass); extern Boolean CDecl_CheckNewBase(TypeClass *tclass, TypeClass *baseclass, Boolean is_virtual); -extern TypeMethod *CDecl_MakeDefaultDtorType(TypeClass *tclass, Boolean is_virtual); +extern TypeMemberFunc *CDecl_MakeDefaultDtorType(TypeClass *tclass, Boolean is_virtual); extern void CDecl_CompleteClass(DeclE *decle, TypeClass *tclass); extern TypeClass *CDecl_DefineClass(NameSpace *nspace, HashNameNode *name, TypeClass *tclass, short mode, Boolean flag2, Boolean flag3); extern void CDecl_ParseClassDeclSpec(UInt8 *declspec); diff --git a/includes/compiler/common.h b/includes/compiler/common.h index 156e5c4..fc5e84e 100644 --- a/includes/compiler/common.h +++ b/includes/compiler/common.h @@ -198,7 +198,7 @@ typedef struct TypeFunc TypeFunc; typedef struct TypeIntegral TypeIntegral; typedef struct TypeList TypeList; typedef struct TypeMemberPointer TypeMemberPointer; -typedef struct TypeMethod TypeMethod; +typedef struct TypeMemberFunc TypeMemberFunc; typedef struct TypeObjCID TypeObjCID; typedef struct TypePointer TypePointer; typedef struct TypeStruct TypeStruct; diff --git a/includes/compiler/types.h b/includes/compiler/types.h index b1d6c73..5767eb9 100644 --- a/includes/compiler/types.h +++ b/includes/compiler/types.h @@ -100,34 +100,19 @@ enum { STRUCT_TYPE_STRUCT = 0, STRUCT_TYPE_UNION = 1, STRUCT_TYPE_CLASS = 2, - STRUCT_TYPE_3 = 3, - STRUCT_TYPE_4 = 4, - STRUCT_TYPE_5 = 5, - STRUCT_TYPE_6 = 6, - STRUCT_TYPE_7 = 7, - STRUCT_TYPE_8 = 8, - STRUCT_TYPE_9 = 9, - STRUCT_TYPE_A = 10, - STRUCT_TYPE_B = 11, - STRUCT_TYPE_C = 12, - STRUCT_TYPE_D = 13, - STRUCT_TYPE_E = 14 + STRUCT_TYPE_MAX = 3, + STRUCT_VECTOR_UCHAR = 4, + STRUCT_VECTOR_SCHAR = 5, + STRUCT_VECTOR_BCHAR = 6, + STRUCT_VECTOR_USHORT = 7, + STRUCT_VECTOR_SSHORT = 8, + STRUCT_VECTOR_BSHORT = 9, + STRUCT_VECTOR_UINT = 10, + STRUCT_VECTOR_SINT = 11, + STRUCT_VECTOR_BINT = 12, + STRUCT_VECTOR_FLOAT = 13, + STRUCT_VECTOR_PIXEL = 14 }; -//const char STRUCT_TYPE_STRUCT = 0; -//const char STRUCT_TYPE_UNION = 1; -//const char STRUCT_TYPE_CLASS = 2; -//const char STRUCT_TYPE_3 = 3; -//const char STRUCT_TYPE_4 = 4; -//const char STRUCT_TYPE_5 = 5; -//const char STRUCT_TYPE_6 = 6; -//const char STRUCT_TYPE_7 = 7; -//const char STRUCT_TYPE_8 = 8; -//const char STRUCT_TYPE_9 = 9; -//const char STRUCT_TYPE_A = 10; -//const char STRUCT_TYPE_B = 11; -//const char STRUCT_TYPE_C = 12; -//const char STRUCT_TYPE_D = 13; -//const char STRUCT_TYPE_E = 14; struct ClassList { // checked via CPrec @@ -283,7 +268,7 @@ enum { // This is actually called TypeMemberFunc... // There seems to be a version of this which adds a class pointer at the end -struct TypeMethod { +struct TypeMemberFunc { TypeType type; SInt32 size; FuncArg *args; @@ -398,7 +383,7 @@ struct TypeList { #define TYPE_STRUCT(ty) ((TypeStruct *) (ty)) #define TYPE_CLASS(ty) ((TypeClass *) (ty)) #define TYPE_FUNC(ty) ((TypeFunc *) (ty)) -#define TYPE_METHOD(ty) ((TypeMethod *) (ty)) +#define TYPE_METHOD(ty) ((TypeMemberFunc *) (ty)) #define TYPE_BITFIELD(ty) ((TypeBitfield *) (ty)) #define TYPE_TEMPLATE(ty) ((TypeTemplDep *) (ty)) #define TYPE_MEMBER_POINTER(ty) ((TypeMemberPointer *) (ty)) @@ -433,7 +418,7 @@ struct TypeList { #define IS_TYPE_ARRAY(ty) ( (ty)->type == TYPEARRAY ) #define IS_TYPE_BITFIELD(ty) ( (ty)->type == TYPEBITFIELD ) #define IS_TYPE_TEMPLDEPEXPR(ty) ( (ty)->type == TYPETEMPLDEPEXPR ) -#define IS_TYPESTRUCT_VECTOR(ty) ( (ty)->stype >= STRUCT_TYPE_4 && (ty)->stype <= STRUCT_TYPE_E ) +#define IS_TYPESTRUCT_VECTOR(ty) ( (ty)->stype >= STRUCT_VECTOR_UCHAR && (ty)->stype <= STRUCT_VECTOR_PIXEL ) #define IS_TYPE_VECTOR(ty) ( (ty)->type == TYPESTRUCT && IS_TYPESTRUCT_VECTOR(TYPE_STRUCT(ty)) ) #define IS_TYPE_NONVECTOR_STRUCT(ty) ( (ty)->type == TYPESTRUCT && !IS_TYPESTRUCT_VECTOR(TYPE_STRUCT(ty)) ) #define IS_TYPE_MEMBERPOINTER(ty) ( (ty)->type == TYPEMEMBERPOINTER ) |