1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-07-04 15:26:00 +02:00

Added RefType, changed how CRepr types are represented

This commit is contained in:
Brian Fiete 2020-07-02 11:05:17 -07:00
parent 716f7b3638
commit 0c946de3ca
13 changed files with 311 additions and 40 deletions

View file

@ -137,6 +137,8 @@ enum BfConstType
BfConstType_TypeOf,
BfConstType_AggZero,
BfConstType_Array,
BfConstType_ArrayZero,
BfConstType_ArrayZero8,
BfConstType_Undef,
BfConstType_SizedArrayType
};
@ -176,6 +178,7 @@ enum BfIRCmd : uint8
BfIRCmd_CreateConstStruct,
BfIRCmd_CreateConstStructZero,
BfIRCmd_CreateConstArray,
BfIRCmd_CreateConstArrayZero,
BfIRCmd_CreateConstString,
BfIRCmd_ConfigConst,
@ -828,6 +831,13 @@ struct BfConstantArray
BfSizedArray<BfIRValue> mValues;
};
struct BfConstantArrayZero
{
BfConstType mConstType;
BfIRType mType;
int mCount;
};
class BfIRConstHolder
{
public:
@ -859,6 +869,8 @@ public:
BfIRValue CreateConstNull(BfIRType nullType);
BfIRValue CreateConstStructZero(BfIRType aggType);
BfIRValue CreateConstArray(BfIRType type, const BfSizedArray<BfIRValue>& values);
BfIRValue CreateConstArrayZero(BfIRType type, int count);
BfIRValue CreateConstArrayZero(int count);
BfIRValue CreateTypeOf(BfType* type);
BfIRValue GetUndefConstValue(BfTypeCode typeCode);
};