mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Reflect Filtered, extension attribs fix, generic arg BfAstNode
This commit is contained in:
parent
6315d81207
commit
361be9dc92
13 changed files with 75 additions and 26 deletions
|
@ -3255,7 +3255,7 @@ int BfResolvedTypeSet::DoHash(BfTypeReference* typeRef, LookupContext* ctx, BfHa
|
|||
BfTypeVector genericArgs;
|
||||
for (auto genericArgTypeRef : genericInstTypeRef->mGenericArguments)
|
||||
{
|
||||
auto argType = ctx->mModule->ResolveTypeRef(genericArgTypeRef, BfPopulateType_Identity, ctx->mResolveFlags);
|
||||
auto argType = ctx->mModule->ResolveTypeRef(genericArgTypeRef, NULL, BfPopulateType_Identity, ctx->mResolveFlags);
|
||||
if (argType != NULL)
|
||||
genericArgs.Add(argType);
|
||||
else
|
||||
|
@ -3747,6 +3747,16 @@ int BfResolvedTypeSet::Hash(BfTypeReference* typeRef, LookupContext* ctx, BfHash
|
|||
return HASH_MIX(hashVal, hashSeed);
|
||||
}
|
||||
|
||||
int BfResolvedTypeSet::Hash(BfAstNode* typeRefNode, LookupContext* ctx, BfHashFlags flags, int hashSeed)
|
||||
{
|
||||
if (auto typeRef = BfNodeDynCast<BfTypeReference>(typeRefNode))
|
||||
return Hash(typeRef, ctx, flags, hashSeed);
|
||||
|
||||
BF_FATAL("Not supported");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// These types can be from different contexts ("foreign" types) so we can't just compare ptrs
|
||||
bool BfResolvedTypeSet::Equals(BfType* lhs, BfType* rhs, LookupContext* ctx)
|
||||
{
|
||||
|
@ -4577,6 +4587,16 @@ bool BfResolvedTypeSet::Equals(BfType* lhs, BfTypeReference* rhs, LookupContext*
|
|||
return false;
|
||||
}
|
||||
|
||||
bool BfResolvedTypeSet::Equals(BfType* lhs, BfAstNode* rhs, LookupContext* ctx)
|
||||
{
|
||||
if (auto rhsTypeRef = BfNodeDynCast<BfTypeReference>(rhs))
|
||||
return Equals(lhs, rhsTypeRef, ctx);
|
||||
|
||||
BF_FATAL("Illegal");
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void BfResolvedTypeSet::RemoveEntry(BfResolvedTypeSet::Entry* entry)
|
||||
{
|
||||
int hashIdx = (entry->mHash & 0x7FFFFFFF) % mHashSize;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue