mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-18 16:10:26 +02:00
Comptime improvments, IOn<X> interfaces, const payload enum
This commit is contained in:
parent
e7fe91facb
commit
f37fb2c1b7
20 changed files with 884 additions and 364 deletions
|
@ -150,4 +150,31 @@ namespace System.Reflection
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Ordered]
|
||||
struct ComptimeFieldInfo
|
||||
{
|
||||
int64 mNativeFieldInstance;
|
||||
TypeId mOwner;
|
||||
TypeId mTypeId;
|
||||
int32 mFieldIdx;
|
||||
FieldFlags mFlags;
|
||||
|
||||
public StringView Name
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Compiler.IsComptime)
|
||||
return Type.[Friend]Comptime_Field_GetName(mNativeFieldInstance);
|
||||
return "?";
|
||||
}
|
||||
}
|
||||
|
||||
public Type Owner => Type.[Friend]GetType_((.)mOwner);
|
||||
public Type FieldType => Type.[Friend]GetType_((.)mTypeId);
|
||||
public int FieldIdx => mFieldIdx;
|
||||
public bool IsConst => mFlags.HasFlag(.Const);
|
||||
public bool IsStatic => mFlags.HasFlag(.Static);
|
||||
public bool IsInstanceField => !mFlags.HasFlag(.Static) && !mFlags.HasFlag(.Const);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue