This commit is contained in:
Ash Wolf
2022-11-07 03:06:21 +00:00
parent d0b9848c54
commit 9a46dd0e2e
62 changed files with 30796 additions and 1532 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,9 @@
#include "compiler.h"
#include "compiler/CError.h"
#include "compiler/CMangler.h"
#include "compiler/CParser.h"
#include "compiler/CPrep.h"
#include "compiler/CScope.h"
#include "compiler/enode.h"
#include "compiler/objects.h"
#include "compiler/scopes.h"
@@ -1016,7 +1020,7 @@ static NameSpaceObjectList *CScope_FindLookupName(NameSpaceLookupList *list, Has
if (r6->object->otype == r30->object->otype) {
switch (r6->object->otype) {
case OT_TYPE:
if ((OBJ_TYPE(r6->object)->type == OBJ_TYPE(r30->object)->type) && (OBJ_TYPE(r6->object)->unk6 == OBJ_TYPE(r30->object)->unk6))
if ((OBJ_TYPE(r6->object)->type == OBJ_TYPE(r30->object)->type) && (OBJ_TYPE(r6->object)->qual == OBJ_TYPE(r30->object)->qual))
goto break1;
break;
case OT_TYPETAG:
@@ -1196,7 +1200,7 @@ static Boolean CScope_SetupParseNameResult(CScopeParseResult *result, NameSpaceO
return 0;
case OT_TYPE:
result->x8 = OBJ_TYPE(list->object)->type;
result->xC = OBJ_TYPE(list->object)->unk6;
result->xC = OBJ_TYPE(list->object)->qual;
result->obj_10 = list->object;
result->name_4 = name;
result->x20 = 1;
@@ -1388,7 +1392,7 @@ inline Boolean CScope_NSIteratorNext(CScopeNSIterator *iterator) {
}
}
Type *CScope_GetType(NameSpace *nspace, HashNameNode *name, void **unk6) {
Type *CScope_GetType(NameSpace *nspace, HashNameNode *name, UInt32 *qual) {
CScopeParseResult result;
CScopeNSIterator iterator;
NameSpaceObjectList *list;
@@ -1400,13 +1404,13 @@ Type *CScope_GetType(NameSpace *nspace, HashNameNode *name, void **unk6) {
do {
for (list = CScope_NSIteratorFind(&iterator, name); list; list = list->next) {
if (list->object->otype == OT_TYPETAG) {
if (unk6)
*unk6 = NULL;
if (qual)
*qual = 0;
return OBJ_TYPE_TAG(list->object)->type;
}
if (list->object->otype == OT_TYPE) {
if (unk6)
*unk6 = OBJ_TYPE(list->object)->unk6;
if (qual)
*qual = OBJ_TYPE(list->object)->qual;
return OBJ_TYPE(list->object)->type;
}
}
@@ -2429,7 +2433,7 @@ static void CScope_AddUsingObject(BClassList *bcl, NameSpace *nspace, ObjBase *o
if (!nspace->theclass) {
if ((list = CScope_FindQualName(nspace, name)) && (list->object->otype == OT_TYPE) &&
(OBJ_TYPE(obj)->type == OBJ_TYPE(list->object)->type) &&
(OBJ_TYPE(obj)->unk6 == OBJ_TYPE(list->object)->unk6))
(OBJ_TYPE(obj)->qual == OBJ_TYPE(list->object)->qual))
return;
}
copy = galloc(sizeof(ObjType));
@@ -2530,7 +2534,7 @@ void CScope_AddClassUsingDeclaration(TypeClass *tclass, TypeClass *tclass2, Hash
}
}
void CScope_ParseUsingDeclaration(NameSpace *nspace, AccessType access) {
void CScope_ParseUsingDeclaration(NameSpace *nspace, short access, Boolean flag) {
// almost matches, slight bit of register weirdness
CScopeParseResult result;