1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 03:52:19 +02:00

Added typeof_comptime const type

This commit is contained in:
Brian Fiete 2025-01-19 12:40:50 -08:00
parent a82cc0534d
commit c511773dad
10 changed files with 111 additions and 10 deletions

View file

@ -1885,6 +1885,17 @@ CeOperand CeBuilder::GetOperand(BeValue* value, bool allowAlloca, bool allowImme
// return GetOperand(callInst->mInlineResult);
}
break;
case BeTypeOfConstant::TypeId:
{
auto beTypeOf = (BeTypeOfConstant*)value;
auto ptrType = mCeMachine->GetBeContext()->GetVoidPtrType();
CeOperand result = FrameAlloc(ptrType);
Emit(CeOp_GetReflectType);
EmitFrameOffset(result);
Emit((int32)beTypeOf->mBfTypeId);
return result;
}
break;
}
CeOperand* operandPtr = NULL;