summaryrefslogtreecommitdiff
path: root/includes/compiler/templates.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--includes/compiler/templates.h66
1 files changed, 43 insertions, 23 deletions
diff --git a/includes/compiler/templates.h b/includes/compiler/templates.h
index 227dd7b..8fe5c46 100644
--- a/includes/compiler/templates.h
+++ b/includes/compiler/templates.h
@@ -9,7 +9,7 @@
#pragma options align=mac68k
#endif
-typedef struct PackedDeclInfo { // ok
+struct PackedDeclInfo { // ok
Type *thetype;
UInt32 qual;
NameSpace *nspace;
@@ -19,7 +19,7 @@ typedef struct PackedDeclInfo { // ok
Section section;
UInt8 exportflags;
Boolean has_expltargs;
-} PackedDeclInfo;
+};
struct Template {
Template *parent;
@@ -54,19 +54,6 @@ struct TemplInstance {
Boolean is_extern;
Boolean static_instantiated;
};
-/*
-struct __attribute__((packed)) TemplInstance
-{
- Template *templ;
- TemplInstance *parent;
- TemplArg *args;
- unsigned __int8 is_instantiated;
- unsigned __int8 is_specialized;
- unsigned __int8 is_extern;
- unsigned __int8 static_instantiated;
-};
-
- */
struct TemplParam { // verified via CPrec
TemplParam *next;
@@ -106,6 +93,36 @@ struct TemplArg { // verified by CPrec
Boolean is_deduced;
};
+struct DeduceInfo {
+ TemplArg *args;
+ TemplArg argBuffer[16];
+ int maxCount;
+ int count;
+ UInt8 x12C;
+};
+
+struct DefAction {
+ DefAction *next;
+ TemplateAction *action;
+ ObjBase *refobj;
+ int xC;
+ TypeEnum *enumtype;
+};
+
+struct TypeDeduce {
+ TemplClass *tmclass;
+ TemplClassInst *inst;
+ TemplParam *params;
+ TemplArg *args;
+ DefAction *defActions;
+ Boolean x14;
+ Boolean x15;
+ Boolean x16;
+ Boolean x17;
+ UInt8 nindex;
+ Boolean x19;
+};
+
struct TemplPartialSpec { // confirmed via CPrec (but templ might be a different type?)
TemplPartialSpec *next;
TemplClass *templ;
@@ -129,38 +146,41 @@ struct TemplStack {
struct TemplClass {
TypeClass theclass;
TemplClass *next;
- TemplClass *templ__parent;
- Type *x3A_maybe_parentinst;
+ TemplClass *templ_parent; // confirmed by v8
+ TemplClassInst *inst_parent; // confirmed by v8
TemplParam *templ__params;
TemplateMember *members;
TemplClassInst *instances;
TemplClass *pspec_owner;
TemplPartialSpec *pspecs;
TemplateAction *actions;
- // not confirmed these last 3 fields yet but there is space for them
- UInt16 lex_order_count;
+ UInt16 lex_order_count; // confirmed by v8
SInt8 align;
UInt8 flags;
};
enum {
+ TEMPLCLASS_FLAGS_1 = 1,
TEMPLCLASS_FLAGS_2 = 2
};
struct TemplClassInst {
TypeClass theclass;
- TemplClassInst *next;
- Type *x36; // not sure what this represents
+ TemplClassInst *next; // confirmed by v8
+ TemplClassInst *parent; // confirmed by v8
TemplClass *templ;
TemplArg *inst_args;
TemplArg *oargs;
- Boolean x46;
- Boolean x47;
+ Boolean is_instantiated;
+ Boolean is_specialized;
+ Boolean is_extern;
+ Boolean x49;
};
#define TEMPL_CLASS(ty) ( (TemplClass *) (ty) )
#define TEMPL_CLASS_INST(ty) ( (TemplClassInst *) (ty) )
#define IS_TEMPL_CLASS(ty) ( IS_TYPE_CLASS(ty) && (TYPE_CLASS(ty)->flags & CLASS_FLAGS_100) )
+#define IS_TEMPL_CLASS_INST(ty) ( IS_TYPE_CLASS(ty) && (TYPE_CLASS(ty)->flags & CLASS_FLAGS_800) )
/*************/
/* Functions */