summaryrefslogtreecommitdiff
path: root/includes/compiler/objc.h
blob: ce3ebe40d6da3c21530c783919a20dc1807955e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#ifndef COMPILER_OBJC_H
#define COMPILER_OBJC_H

#include "compiler/common.h"

#ifdef __MWERKS__
#pragma options align=mac68k
#endif

typedef struct ObjCMethodArg { // bigger in v7 (0x20 vs 0x14)
    struct ObjCMethodArg *next;
    HashNameNode *selector;
    HashNameNode *name;
    Type *type;
    UInt32 qual;
    UInt32 unk14;
    UInt32 unk18;
    UInt32 unk1C;
} ObjCMethodArg;

typedef struct ObjCMethodList { // verified via CPrec
    struct ObjCMethodList *next;
    struct ObjCMethod *method;
} ObjCMethodList;

typedef struct ObjCSelector { // verified via CPrec
    struct ObjCSelector *next;
    Object *selobject;
    HashNameNode *name;
    struct ObjCMethodList *methods;
} ObjCSelector;

typedef struct ObjCMethod { // verified via CPrec
    struct ObjCMethod *next;
    Object *object;
    TypeFunc *functype;
    ObjCSelector *selector;
    Type *return_type;
    UInt32 return_qual;
    ObjCMethodArg *selector_args;
    Boolean has_valist;
    Boolean is_class_method;
    Boolean is_defined;
} ObjCMethod;

typedef struct ObjCProtocol { // verified via CPrec
    struct ObjCProtocol *next;
    HashNameNode *name;
    struct ObjCProtocolList *protocols;
    ObjCMethod *methods;
    Object *object;
} ObjCProtocol;

typedef struct ObjCProtocolList { // verified via CPrec
    struct ObjCProtocolList *next;
    ObjCProtocol *protocol;
} ObjCProtocolList;

typedef struct ObjCCategory { // verified via CPrec
    struct ObjCCategory *next;
    HashNameNode *name;
    ObjCProtocolList *protocols;
    ObjCMethod *methods;
} ObjCCategory;

struct ObjCInfo { // verified via CPrec
    Object *classobject;
    Object *metaobject;
    Object *classrefobj;
    ObjCMethod *methods;
    ObjCProtocolList *protocols;
    ObjCCategory *categories;
    Boolean is_implemented;
};

#ifdef __MWERKS__
#pragma options align=reset
#endif

#endif