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

Added Compiler.Align

This commit is contained in:
Brian Fiete 2022-08-28 07:41:35 -07:00
parent ec4ccb2e9c
commit 8aef7275d0
5 changed files with 55 additions and 13 deletions

View file

@ -300,6 +300,7 @@ namespace System
}
static extern void Comptime_SetReturnType(int32 typeId);
static extern void Comptime_Align(int32 typeId, int32 align);
static extern void* Comptime_MethodBuilder_EmitStr(void* native, StringView str);
static extern void* Comptime_CreateMethod(int32 typeId, StringView methodName, Type returnType, MethodFlags methodFlags);
static extern void Comptime_EmitTypeBody(int32 typeId, StringView text);
@ -328,6 +329,12 @@ namespace System
Comptime_SetReturnType((.)type.TypeId);
}
[Comptime(OnlyFromComptime=true)]
public static void Align(Type type, int align)
{
Comptime_Align((.)type.TypeId, (.)align);
}
[Comptime(OnlyFromComptime=true)]
public static void EmitAddInterface(Type owner, Type iface)
{