summaryrefslogtreecommitdiff
path: root/includes/compiler/objc.h
diff options
context:
space:
mode:
authorAsh Wolf <ninji@wuffs.org>2022-10-25 20:30:28 +0100
committerAsh Wolf <ninji@wuffs.org>2022-10-25 20:30:28 +0100
commitd0b9848c54e6f85ab713f059dcd1ddef7e57caa6 (patch)
tree5bdb9dbf6c853780bc444dc92bf6f9fa3a95742a /includes/compiler/objc.h
parent685f22a6a0a5403c76316a2390c021a7b0f7597d (diff)
downloadMWCC-d0b9848c54e6f85ab713f059dcd1ddef7e57caa6.tar.gz
MWCC-d0b9848c54e6f85ab713f059dcd1ddef7e57caa6.zip
a bunch of compiler stuff
Diffstat (limited to '')
-rw-r--r--includes/compiler/objc.h80
1 files changed, 80 insertions, 0 deletions
diff --git a/includes/compiler/objc.h b/includes/compiler/objc.h
new file mode 100644
index 0000000..ce3ebe4
--- /dev/null
+++ b/includes/compiler/objc.h
@@ -0,0 +1,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