mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Beefy::String changes, lambda hotswap fixes
Changed some string internals related to StringViewsma Added an "incompatible capture" error for lambdas when the captures change
This commit is contained in:
parent
767a3fafd9
commit
2f01cc14dd
25 changed files with 544 additions and 180 deletions
|
@ -9553,7 +9553,9 @@ BfLambdaInstance* BfExprEvaluator::GetLambdaInstance(BfLambdaBindExpression* lam
|
|||
mModule->mBfIRBuilder->PopulateType(useTypeInstance);
|
||||
mModule->PopulateType(useTypeInstance);
|
||||
|
||||
methodDef->mIsStatic = closureTypeInst == NULL;
|
||||
// If we are allowing hot swapping, we need to always mangle the name to non-static because if we add a capture
|
||||
// later then we need to have the mangled names match
|
||||
methodDef->mIsStatic = (closureTypeInst == NULL) && (!mModule->mCompiler->mOptions.mAllowHotSwapping);
|
||||
|
||||
SizedArray<BfIRType, 3> newTypes;
|
||||
SizedArray<BfIRType, 8> origParamTypes;
|
||||
|
@ -9598,12 +9600,12 @@ BfLambdaInstance* BfExprEvaluator::GetLambdaInstance(BfLambdaBindExpression* lam
|
|||
methodDef->mName.RemoveToEnd(prevSepPos);
|
||||
}
|
||||
|
||||
if (closureTypeInst != NULL)
|
||||
{
|
||||
StringT<128> typeInstName;
|
||||
BfMangler::Mangle(typeInstName,mModule->mCompiler->GetMangleKind(), closureTypeInst);
|
||||
closureHashCtx.MixinStr(typeInstName);
|
||||
}
|
||||
// if (closureTypeInst != NULL)
|
||||
// {
|
||||
// StringT<128> typeInstName;
|
||||
// BfMangler::Mangle(typeInstName,mModule->mCompiler->GetMangleKind(), closureTypeInst);
|
||||
// closureHashCtx.MixinStr(typeInstName);
|
||||
// }
|
||||
|
||||
auto checkMethodState = mModule->mCurMethodState;
|
||||
while (checkMethodState != NULL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue