mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Concrete type size fix
This commit is contained in:
parent
9ccdf7282e
commit
9df5442a37
2 changed files with 12 additions and 12 deletions
|
@ -21643,18 +21643,14 @@ void BfExprEvaluator::PerformBinaryOperation(BfType* resultType, BfIRValue convL
|
|||
case BfBinaryOp_StrictEquality:
|
||||
mResult = BfTypedValue(mModule->mBfIRBuilder->CreateConst(BfTypeCode_Boolean, 1),
|
||||
mModule->GetPrimitiveType(BfTypeCode_Boolean));
|
||||
break;
|
||||
return;
|
||||
case BfBinaryOp_InEquality:
|
||||
case BfBinaryOp_StrictInEquality:
|
||||
mResult = BfTypedValue(mModule->mBfIRBuilder->CreateConst(BfTypeCode_Boolean, 0),
|
||||
mModule->GetPrimitiveType(BfTypeCode_Boolean));
|
||||
break;
|
||||
default:
|
||||
mModule->Fail("Invalid operation for void", opToken);
|
||||
break;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if ((!convLeftValue) || (!convRightValue))
|
||||
return;
|
||||
|
|
|
@ -1284,8 +1284,8 @@ void BfModule::PopulateType(BfType* resolvedTypeRef, BfPopulateType populateType
|
|||
{
|
||||
BfConcreteInterfaceType* concreteInterfaceType = (BfConcreteInterfaceType*)resolvedTypeRef;
|
||||
BF_ASSERT(concreteInterfaceType->mInterface->IsInterface());
|
||||
resolvedTypeRef->mSize = concreteInterfaceType->mInterface->mSize;
|
||||
resolvedTypeRef->mAlign = concreteInterfaceType->mInterface->mAlign;
|
||||
resolvedTypeRef->mSize = mContext->mBfObjectType->mSize;
|
||||
resolvedTypeRef->mAlign = mContext->mBfObjectType->mAlign;
|
||||
resolvedTypeRef->mDefineState = BfTypeDefineState_Defined;
|
||||
return;
|
||||
}
|
||||
|
@ -11854,6 +11854,9 @@ BfIRValue BfModule::CastToValue(BfAstNode* srcNode, BfTypedValue typedVal, BfTyp
|
|||
BfTypedValue operatorOut;
|
||||
if (ignoreWrites)
|
||||
{
|
||||
if (opMethodInstance != NULL)
|
||||
exprEvaluator.PerformCallChecks(opMethodInstance, srcNode);
|
||||
|
||||
if (returnType == toType)
|
||||
return mBfIRBuilder->GetFakeVal();
|
||||
operatorOut = GetDefaultTypedValue(returnType);
|
||||
|
@ -11861,6 +11864,7 @@ BfIRValue BfModule::CastToValue(BfAstNode* srcNode, BfTypedValue typedVal, BfTyp
|
|||
else
|
||||
{
|
||||
BfModuleMethodInstance moduleMethodInstance = GetMethodInstance(opMethodInstance->GetOwner(), opMethodInstance->mMethodDef, BfTypeVector());
|
||||
exprEvaluator.PerformCallChecks(moduleMethodInstance.mMethodInstance, srcNode);
|
||||
|
||||
SizedArray<BfIRValue, 1> args;
|
||||
exprEvaluator.PushArg(castedFromValue, args);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue