|
@@ -399,10 +399,10 @@ bool BfModule::AddDeferredCallEntry(BfDeferredCallEntry* deferredCallEntry, BfSc
|
|
|
|
|
|
int dataIdx = 2;
|
|
|
int argIdx = 0;
|
|
|
- if (!methodDef->mIsStatic)
|
|
|
+ if ((!methodDef->mIsStatic) && (!owningType->IsValuelessType()))
|
|
|
{
|
|
|
gepInstance = mBfIRBuilder->CreateInBoundsGEP(deferredAlloca, 0, 2);
|
|
|
- if (owningType->IsStruct())
|
|
|
+ if (owningType->IsValueType())
|
|
|
{
|
|
|
if ((!methodDef->mIsMutating) && (owningType->IsSplattable()))
|
|
|
{
|
|
@@ -1172,7 +1172,7 @@ void BfModule::EmitDeferredCallProcessor(BfScopeData* scopeData, SLIList<BfDefer
|
|
|
if ((argIdx == 0) && (!methodDef->mIsStatic))
|
|
|
{
|
|
|
// 'this'
|
|
|
- isStruct = methodOwner->IsStruct();
|
|
|
+ isStruct = methodOwner->IsValueType();
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -1750,7 +1750,7 @@ BfLocalVariable* BfModule::HandleVariableDeclaration(BfVariableDeclaration* varD
|
|
|
BfExprEvaluator valExprEvaluator(this);
|
|
|
valExprEvaluator.mAllowReadOnlyReference = isReadOnly;
|
|
|
initValue = CreateValueFromExpression(valExprEvaluator, varDecl->mInitializer, expectedType, (BfEvalExprFlags)(BfEvalExprFlags_NoCast | BfEvalExprFlags_AllowRefExpr | BfEvalExprFlags_VariableDeclaration));
|
|
|
-
|
|
|
+
|
|
|
if ((initValue) && (resolvedType->IsUndefSizedArray()))
|
|
|
{
|
|
|
int stringId = GetStringPoolIdx(initValue.mValue, mBfIRBuilder);
|