mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Interop fixes and tests, fixing xplat struct passing issues
This commit is contained in:
parent
4cf6af53bd
commit
5da74382d4
31 changed files with 1569 additions and 239 deletions
|
@ -71,6 +71,22 @@ BeStructType* BeContext::CreateStruct(const StringImpl& name)
|
|||
return structType;
|
||||
}
|
||||
|
||||
BeStructType* BeContext::CreateStruct(const SizedArrayImpl<BeType*>& types)
|
||||
{
|
||||
BeStructType** valuePtr = NULL;
|
||||
if (mAnonymousStructMap.TryGetValueWith(types, &valuePtr))
|
||||
return *valuePtr;
|
||||
|
||||
Array<BeType*> key;
|
||||
for (auto type : types)
|
||||
key.Add(type);
|
||||
|
||||
BeStructType* structType = CreateStruct("");
|
||||
SetStructBody(structType, types, false);
|
||||
mAnonymousStructMap.TryAdd(key, structType);
|
||||
return structType;
|
||||
}
|
||||
|
||||
BePointerType* BeContext::GetPointerTo(BeType* beType)
|
||||
{
|
||||
if (beType->mPointerType == NULL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue