예제 #1
0
        protected void Test(Jitter jitter, string testCode, MethodDescription description, string expectedAsm)
        {
            var compiler = new RoslynCompiler();

            using (var result = compiler.Compile(testCode))
            {
                foreach (var jitResult in jitter.Jit(result, description))
                {
                    Console.WriteLine(jitResult.Asm);
                    Assert.AreEqual(expectedAsm, jitResult.Asm);
                }
            }
        }
예제 #2
0
 public static string GetMonoJitDescription(this MethodDescription description)
 {
     return($"{description.FullTypeName}:{description.MethodName}{description.ArgumentTypes.GetSuffixJitMetadataName()}");
 }
예제 #3
0
 public static string GetMonoAotDescription(this MethodDescription description)
 {
     return($"{description.FullTypeName.Replace('.', '_')}_{description.MethodName}{description.ArgumentTypes.GetSuffixAotMetadataName()}");
 }
예제 #4
0
파일: MonoJIT.cs 프로젝트: Therzok/JITPad
 protected override string GenerateMethodName(MethodDescription description) => description.GetMonoJitDescription();
예제 #5
0
파일: Jitter.cs 프로젝트: Therzok/JITPad
 protected abstract string GenerateMethodName(MethodDescription description);