summaryrefslogtreecommitdiff
path: root/includes/compiler/common.h
diff options
context:
space:
mode:
authorAsh Wolf <ninji@wuffs.org>2022-12-29 12:32:55 +0000
committerAsh Wolf <ninji@wuffs.org>2022-12-29 12:32:55 +0000
commitfcfbafff31869ed808bff0639532db1828660e92 (patch)
tree7425b346b031c4cb47a06250b3f6f950374d44ae /includes/compiler/common.h
parentbc1321735c15104ffad195e1509cab5f3a044260 (diff)
downloadMWCC-fcfbafff31869ed808bff0639532db1828660e92.tar.gz
MWCC-fcfbafff31869ed808bff0639532db1828660e92.zip
dump lots more code
Diffstat (limited to 'includes/compiler/common.h')
-rw-r--r--includes/compiler/common.h88
1 files changed, 31 insertions, 57 deletions
diff --git a/includes/compiler/common.h b/includes/compiler/common.h
index f2b2e87..b5cb718 100644
--- a/includes/compiler/common.h
+++ b/includes/compiler/common.h
@@ -92,12 +92,9 @@ typedef enum Section {
SECT_MW_SWITCH = 30,
SECT_8BYTE_LITERALS = 31,
SECT_4BYTE_LITERALS = 32,
- // one of these next 2 is missing in pro7
SECT_MOD_INIT_FUNC = 33,
- SECT_MOD_TERM_FUNC = 34,
SECT_CONST = 34,
SECT_CONST_PTR = 35,
- // everything after here is known ok
SECT_NONLAZY_PTRS = 36,
SECT_COMMON_VARS = 37,
SECT_16BYTE_LITERALS = 38,
@@ -106,8 +103,8 @@ typedef enum Section {
SECT_UDATA_COALESCE = 41,
SECT_CONST_COALESCE = 42,
SECT_CONST_PTR_COALESCE = 43,
- SECT_CSTR_COALESCE = 44,
- N_SECTIONS = 45
+ //SECT_CSTR_COALESCE = 44,
+ N_SECTIONS = 44
} Section;
typedef struct Alias Alias;
@@ -117,18 +114,27 @@ typedef struct CLabel CLabel;
typedef struct ClassList ClassList;
typedef struct CParams CParams;
typedef struct CPrepFileInfo CPrepFileInfo;
+typedef struct CScopeSave CScopeSave;
+typedef struct DeclE DeclE;
+typedef struct DeclFucker DeclFucker;
typedef struct DeclInfo DeclInfo;
typedef struct DeclThing DeclThing; // rename me please
+typedef struct DeduceInfo DeduceInfo;
+typedef struct DefAction DefAction;
typedef struct DefArgCtorInfo DefArgCtorInfo;
typedef struct DepName DepName;
typedef struct EMemberInfo EMemberInfo;
typedef struct ENode ENode;
typedef struct ENodeList ENodeList;
typedef struct ExceptionAction ExceptionAction;
+typedef struct ExceptSpecList ExceptSpecList;
typedef struct ExtendedParam ExtendedParam;
+typedef struct FileOffsetInfo FileOffsetInfo;
typedef struct FuncArg FuncArg;
+typedef struct GList GList;
typedef struct Initializer Initializer;
typedef struct InlineXRef InlineXRef;
+typedef struct Macro Macro;
typedef struct MemInitializer MemInitializer;
typedef struct NameSpace NameSpace;
typedef struct NameSpaceName NameSpaceName;
@@ -144,8 +150,17 @@ typedef struct ObjType ObjType;
typedef struct ObjTypeTag ObjTypeTag;
typedef struct Object Object;
typedef struct ObjectList ObjectList;
+typedef struct ObjectTemplated ObjectTemplated;
+typedef struct ObjCCategory ObjCCategory;
typedef struct ObjCInfo ObjCInfo;
typedef struct ObjCMethod ObjCMethod;
+typedef struct ObjCMethodArg ObjCMethodArg;
+typedef struct ObjCMethodList ObjCMethodList;
+typedef struct ObjCNamedArg ObjCNamedArg;
+typedef struct ObjCProtocol ObjCProtocol;
+typedef struct ObjCProtocolList ObjCProtocolList;
+typedef struct ObjCSelector ObjCSelector;
+typedef struct OLinkList OLinkList;
typedef struct Operand Operand;
typedef struct PackedDeclInfo PackedDeclInfo;
typedef struct PCode PCode;
@@ -157,6 +172,8 @@ typedef struct PTFList PTFList;
typedef struct SOMInfo SOMInfo;
typedef struct Statement Statement;
typedef struct StructMember StructMember;
+typedef struct SwitchCase SwitchCase;
+typedef struct SwitchInfo SwitchInfo;
typedef struct Template Template;
typedef struct TemplateAction TemplateAction;
typedef struct TemplateFriend TemplateFriend;
@@ -175,12 +192,14 @@ typedef struct TStreamElement TStreamElement;
typedef struct Type Type;
typedef struct TypeBitfield TypeBitfield;
typedef struct TypeClass TypeClass;
+typedef struct TypeDeduce TypeDeduce;
typedef struct TypeEnum TypeEnum;
typedef struct TypeFunc TypeFunc;
typedef struct TypeIntegral TypeIntegral;
typedef struct TypeList TypeList;
typedef struct TypeMemberPointer TypeMemberPointer;
typedef struct TypeMethod TypeMethod;
+typedef struct TypeObjCID TypeObjCID;
typedef struct TypePointer TypePointer;
typedef struct TypeStruct TypeStruct;
typedef struct TypeTemplDep TypeTemplDep;
@@ -203,62 +222,15 @@ typedef struct TemplParamID {
typedef enum TemplDepSubType {
TDE_PARAM,
- TDE_TYPEEXPR,
- TDE_unk2, // may actually be 1?
+ TDE_SIZEOF,
+ TDE_ALIGNOF,
TDE_CAST,
TDE_QUALNAME,
- TDE_QUALTEMPL,
- //TDE_OBJACCESS,
- //TDE_SOURCEREF,
- //TDE_FUNCCALL,
- //TDE_LOCAL,
- TDE_MONAND = 7,
- TDE_MONPLUS,
- TDE_MONMUL,
- TDE_NEW,
- TDE_DELETE,
- TDE_ARRAY,
- TDE_DYNAMIC_CAST,
- TDE_STATIC_CAST,
- TDE_REINTERPRET_CAST,
- TDE_CONST_CAST,
- TDE_TYPEID,
- TDE_MEMBERACCESS,
- TDE_THROW,
- TDE_EXCEPTIONINIT,
- TDE_LOCALINIT,
- TDE_STATICINIT,
- TDE_LOCALDESTROY,
- TDE_ILLEGAL
+ TDE_OBJ,
+ TDE_SOURCEREF,
+ TDE_ADDRESS_OF
} TemplDepSubType;
-/// Things that can be applied to a type expression
-typedef enum TEFuncSel {
- TEFS_SIZEOF,
- TEFS_ALIGNOF,
- TEFS_UUIDOF,
- TEFS_BI_ALIGN,
- TEFS_BI_TYPE,
- TEFS_BI_VTYPE,
- TEFS_BI_CTYPE
-} TEFuncSel;
-
-/// How to access an object
-/// this might not actually be in Pro7 lol
-typedef struct ObjAccess {
- NameSpaceObjectList *list;
- TypeClass *naming;
- TypeClass *member;
- TemplArg *targs;
- HashNameNode *name;
- ENode *expr;
- Boolean is_qualified;
- Boolean is_member;
- Boolean is_ambig : 1;
- Boolean is_ptm : 1;
- Boolean ext_only : 1;
-} ObjAccess;
-
/// Qualifiers
enum {
Q_CONST = 1,
@@ -281,7 +253,9 @@ enum {
Q_20000 = 0x20000,
Q_OVERLOAD = 0x40000, // weak
Q_80000 = 0x80000,
+ Q_100000 = 0x100000, // Objective-C ID
Q_RESTRICT = 0x200000,
+ Q_400000 = 0x400000, // is templated from another object?
Q_1000000 = 0x1000000,
Q_ALIGNED_1 = 0x2000000,
Q_ALIGNED_2 = 0x4000000,