mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-14 14:24:10 +02:00
Comptime updates, start of metaprogramming support
This commit is contained in:
parent
be1c099f19
commit
3bbf2d8313
43 changed files with 1562 additions and 885 deletions
|
@ -61,6 +61,9 @@ namespace IDE.Compiler
|
|||
[CallingConvention(.Stdcall), CLink]
|
||||
static extern void BfCompiler_Cancel(void* bfCompiler);
|
||||
|
||||
[CallingConvention(.Stdcall), CLink]
|
||||
static extern void BfCompiler_RequestFastFinish(void* bfCompiler);
|
||||
|
||||
[CallingConvention(.Stdcall), CLink]
|
||||
static extern void BfCompiler_ClearCompletionPercentage(void* bfCompiler);
|
||||
|
||||
|
@ -111,6 +114,12 @@ namespace IDE.Compiler
|
|||
[CallingConvention(.Stdcall), CLink]
|
||||
static extern void BfCompiler_ForceRebuild(void* bfCompiler);
|
||||
|
||||
[CallingConvention(.Stdcall), CLink]
|
||||
static extern char8* BfCompiler_GetEmitSource(void* bfCompiler, char8* fileName);
|
||||
|
||||
[CallingConvention(.Stdcall), CLink]
|
||||
static extern int32 BfCompiler_GetEmitSourceVersion(void* bfCompiler, char8* fileName);
|
||||
|
||||
public enum HotTypeFlags
|
||||
{
|
||||
None = 0,
|
||||
|
@ -267,6 +276,20 @@ namespace IDE.Compiler
|
|||
BfCompiler_ForceRebuild(mNativeBfCompiler);
|
||||
}
|
||||
|
||||
public bool GetEmitSource(StringView fileName, String outText)
|
||||
{
|
||||
char8* str = BfCompiler_GetEmitSource(mNativeBfCompiler, fileName.ToScopeCStr!());
|
||||
if (str == null)
|
||||
return false;
|
||||
outText.Append(str);
|
||||
return true;
|
||||
}
|
||||
|
||||
public int32 GetEmitVersion(StringView fileName)
|
||||
{
|
||||
return BfCompiler_GetEmitSourceVersion(mNativeBfCompiler, fileName.ToScopeCStr!());
|
||||
}
|
||||
|
||||
public void QueueSetPassInstance(BfPassInstance passInstance)
|
||||
{
|
||||
SetPassInstanceCommand command = new SetPassInstanceCommand();
|
||||
|
@ -658,6 +681,15 @@ namespace IDE.Compiler
|
|||
}
|
||||
}
|
||||
|
||||
public override void RequestFastFinish()
|
||||
{
|
||||
if ([Friend]mThreadWorker.mThreadRunning || [Friend]mThreadWorkerHi.mThreadRunning)
|
||||
{
|
||||
if (mNativeBfCompiler != null)
|
||||
BfCompiler_RequestFastFinish(mNativeBfCompiler);
|
||||
}
|
||||
}
|
||||
|
||||
public void ClearCompletionPercentage()
|
||||
{
|
||||
BfCompiler_ClearCompletionPercentage(mNativeBfCompiler);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue