mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 03:52:19 +02:00
Changed array to Ordered instead of CRepr
This commit is contained in:
parent
36c99d2088
commit
15c3ad98de
6 changed files with 121 additions and 44 deletions
|
@ -2622,6 +2622,14 @@ BfError* BfModule::Fail(const StringImpl& error, BfAstNode* refNode, bool isPers
|
|||
return bfError;
|
||||
}
|
||||
|
||||
BfError* BfModule::FailInternal(const StringImpl& error, BfAstNode* refNode)
|
||||
{
|
||||
if (mHadBuildError)
|
||||
return NULL;
|
||||
|
||||
return Fail(error, refNode);
|
||||
}
|
||||
|
||||
BfError* BfModule::FailAfter(const StringImpl& error, BfAstNode* refNode)
|
||||
{
|
||||
if (mIgnoreErrors)
|
||||
|
@ -9059,29 +9067,6 @@ bool BfModule::HasMixin(BfTypeInstance* typeInstance, const StringImpl& methodNa
|
|||
return BfModuleMethodInstance();
|
||||
}
|
||||
|
||||
BfFieldInstance* BfModule::GetFieldByName(BfTypeInstance* typeInstance, const StringImpl& fieldName)
|
||||
{
|
||||
PopulateType(typeInstance, BfPopulateType_DataAndMethods);
|
||||
|
||||
typeInstance->mTypeDef->PopulateMemberSets();
|
||||
BfMemberSetEntry* entry = NULL;
|
||||
BfFieldDef* fieldDef = NULL;
|
||||
if (typeInstance->mTypeDef->mFieldSet.TryGetWith(fieldName, &entry))
|
||||
{
|
||||
fieldDef = (BfFieldDef*)entry->mMemberDef;
|
||||
return &typeInstance->mFieldInstances[fieldDef->mIdx];
|
||||
}
|
||||
|
||||
// for (auto& fieldInst : typeInstance->mFieldInstances)
|
||||
// {
|
||||
// auto fieldDef = fieldInst.GetFieldDef();
|
||||
// if ((fieldDef != NULL) && (fieldDef->mName == fieldName))
|
||||
// return &fieldInst;
|
||||
// }
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
String BfModule::MethodToString(BfMethodInstance* methodInst, BfMethodNameFlags methodNameFlags, BfTypeVector* methodGenericArgs)
|
||||
{
|
||||
auto methodDef = methodInst->mMethodDef;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue