aboutsummaryrefslogtreecommitdiff
path: root/ARMeilleure/Translation/Compiler.cs
diff options
context:
space:
mode:
Diffstat (limited to 'ARMeilleure/Translation/Compiler.cs')
-rw-r--r--ARMeilleure/Translation/Compiler.cs20
1 files changed, 16 insertions, 4 deletions
diff --git a/ARMeilleure/Translation/Compiler.cs b/ARMeilleure/Translation/Compiler.cs
index ec2f2968..934c0db6 100644
--- a/ARMeilleure/Translation/Compiler.cs
+++ b/ARMeilleure/Translation/Compiler.cs
@@ -7,18 +7,30 @@ using System.Runtime.InteropServices;
namespace ARMeilleure.Translation
{
+ using PTC;
+
static class Compiler
{
- public static T Compile<T>(ControlFlowGraph cfg, OperandType[] argTypes, OperandType retType, CompilerOptions options)
+ public static T Compile<T>(
+ ControlFlowGraph cfg,
+ OperandType[] argTypes,
+ OperandType retType,
+ CompilerOptions options,
+ PtcInfo ptcInfo = null)
{
- CompiledFunction func = Compile(cfg, argTypes, retType, options);
+ CompiledFunction func = Compile(cfg, argTypes, retType, options, ptcInfo);
IntPtr codePtr = JitCache.Map(func);
return Marshal.GetDelegateForFunctionPointer<T>(codePtr);
}
- public static CompiledFunction Compile(ControlFlowGraph cfg, OperandType[] argTypes, OperandType retType, CompilerOptions options)
+ public static CompiledFunction Compile(
+ ControlFlowGraph cfg,
+ OperandType[] argTypes,
+ OperandType retType,
+ CompilerOptions options,
+ PtcInfo ptcInfo = null)
{
Logger.StartPass(PassName.Dominance);
@@ -45,7 +57,7 @@ namespace ARMeilleure.Translation
CompilerContext cctx = new CompilerContext(cfg, argTypes, retType, options);
- return CodeGenerator.Generate(cctx);
+ return CodeGenerator.Generate(cctx, ptcInfo);
}
}
} \ No newline at end of file