MWCC/includes/compiler/CABI.h

47 lines
2.0 KiB
C
Raw Normal View History

2022-11-07 03:06:21 +00:00
#ifndef COMPILER_CABI_H
#define COMPILER_CABI_H
#include "compiler/common.h"
#include "compiler/CDecl.h"
#ifdef __MWERKS__
#pragma options align=mac68k
#endif
2023-01-10 11:05:21 +00:00
typedef enum CABIDestroyMode {
CABIDestroy0 = 0,
CABIDestroy1 = 1,
CABIDestroy2 = 2,
CABIDestroy3 = 3
} CABIDestroyMode;
extern short CABI_GetStructResultArgumentIndex(TypeFunc *tfunc);
2022-11-07 03:06:21 +00:00
extern Type *CABI_GetSizeTType(void);
extern Type *CABI_GetPtrDiffTType(void);
extern SInt16 CABI_StructSizeAlignValue(Type *type, SInt32 size);
extern void CABI_ReverseBitField(TypeBitfield *tbitfield);
extern void CABI_AddVTable(TypeClass *tclass);
extern SInt32 CABI_GetVTableOffset(TypeClass *tclass);
extern void CABI_LayoutClass(DeclE *decle, TypeClass *tclass);
2023-01-10 11:05:21 +00:00
extern void CABI_MakeDefaultArgConstructor(TypeClass *tclass, Object *func);
2022-11-07 03:06:21 +00:00
extern ENode *CABI_MakeThisExpr(TypeClass *tclass, SInt32 offset);
extern SInt32 CABI_GetCtorOffsetOffset(TypeClass *tclass, TypeClass *base);
extern Object *CABI_ConstructorCallsNew(TypeClass *tclass);
typedef Statement *(*TransConstructorCallback)(Statement *stmt, TypeClass *tclass, TypeClass *base, SInt32 offset, Boolean flag);
2023-01-10 11:05:21 +00:00
extern void CABI_TransConstructor(Object *obj, Statement *stmt, TypeClass *tclass, TransConstructorCallback callback, Boolean has_try);
extern void CABI_MakeDefaultConstructor(TypeClass *tclass, Object *func);
extern void CABI_MakeDefaultCopyConstructor(TypeClass *tclass, Object *func);
extern void CABI_MakeDefaultAssignmentOperator(TypeClass *tclass, Object *func);
extern void CABI_TransDestructor(Object *obj1, Object *obj2, Statement *stmt, TypeClass *tclass, CABIDestroyMode mode);
extern void CABI_MakeDefaultDestructor(TypeClass *tclass, Object *func);
extern void CABI_MakeLayeredDestructor(TypeClass *tclass, Object *func);
extern Object *CABI_GetDestructorObject(Object *obj, CABIDestroyMode mode);
2022-11-07 03:06:21 +00:00
extern void CABI_AddLayeredDestructors(TypeClass *tclass);
2023-01-10 11:05:21 +00:00
extern ENode *CABI_DestroyObject(Object *dtor, ENode *objexpr, CABIDestroyMode mode, Boolean flag1, Boolean flag2);
2022-11-07 03:06:21 +00:00
#ifdef __MWERKS__
#pragma options align=reset
#endif
#endif