Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 17612bd

Browse files
author
John Chen
authored
Fix a tailcall test that fails with Ready-to-Run (#8240)
The test case JIT/opt/Tailcall/TailcallVerifyWithPrefix has some methods that depend on the JIT compiler doing automatic tail call. Since tail call is not supported with Ready-to-Run, the test case is modified to exclude such methods from Ready-to-Run images.
1 parent 37f3140 commit 17612bd

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

tests/src/JIT/opt/Tailcall/TailcallVerifyWithPrefix.il

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5610,6 +5610,9 @@
56105610
.method public hidebysig instance void
56115611
Caller1() cil managed
56125612
{
5613+
// This method depends on JIT compiler doing automatic tail call, which isn't supported by Ready-to-Run.
5614+
.custom instance void System.Runtime.BypassReadyToRunAttribute::.ctor() = ( 01 00 00 00 )
5615+
56135616
// Code size 53 (0x35)
56145617
.maxstack 8
56155618
IL_0000: ldc.i4.0
@@ -5633,6 +5636,9 @@
56335636
.method public hidebysig instance void
56345637
Caller1Recursive() cil managed
56355638
{
5639+
// This method depends on JIT compiler doing automatic tail call, which isn't supported by Ready-to-Run.
5640+
.custom instance void System.Runtime.BypassReadyToRunAttribute::.ctor() = ( 01 00 00 00 )
5641+
56365642
// Code size 55 (0x37)
56375643
.maxstack 8
56385644
IL_0000: ldc.i4.0
@@ -5670,6 +5676,9 @@
56705676
.method private hidebysig instance void
56715677
Callee1Recursive(int32 i) cil managed
56725678
{
5679+
// This method depends on JIT compiler doing automatic tail call, which isn't supported by Ready-to-Run.
5680+
.custom instance void System.Runtime.BypassReadyToRunAttribute::.ctor() = ( 01 00 00 00 )
5681+
56735682
// Code size 93 (0x5d)
56745683
.maxstack 3
56755684
.locals init ([0] string stackTrace,
@@ -5805,6 +5814,9 @@
58055814
Caller1(!V arg1,
58065815
!K arg2) cil managed
58075816
{
5817+
// This method depends on JIT compiler doing automatic tail call, which isn't supported by Ready-to-Run.
5818+
.custom instance void System.Runtime.BypassReadyToRunAttribute::.ctor() = ( 01 00 00 00 )
5819+
58085820
// Code size 54 (0x36)
58095821
.maxstack 8
58105822
IL_0000: ldc.i4.0
@@ -6016,6 +6028,9 @@
60166028

60176029
.method private hidebysig static void Caller2() cil managed
60186030
{
6031+
// This method depends on JIT compiler doing automatic tail call, which isn't supported by Ready-to-Run.
6032+
.custom instance void System.Runtime.BypassReadyToRunAttribute::.ctor() = ( 01 00 00 00 )
6033+
60196034
// Code size 52 (0x34)
60206035
.maxstack 8
60216036
IL_0000: ldc.i4.0
@@ -10376,6 +10391,21 @@
1037610391
.field static assembly valuetype '<PrivateImplementationDetails>{D1242658-CA16-4D11-A740-6635F112F4B5}'/'__StaticArrayInitTypeSize=20' '$$method0x6000076-1' at I_00005C00
1037710392
} // end of class '<PrivateImplementationDetails>{D1242658-CA16-4D11-A740-6635F112F4B5}'
1037810393

10394+
.class private auto ansi sealed beforefieldinit System.Runtime.BypassReadyToRunAttribute
10395+
extends [mscorlib]System.Attribute
10396+
{
10397+
.method public hidebysig specialname rtspecialname
10398+
instance void .ctor() cil managed
10399+
{
10400+
// Code size 7 (0x7)
10401+
.maxstack 8
10402+
IL_0000: ldarg.0
10403+
IL_0001: call instance void [mscorlib]System.Attribute::.ctor()
10404+
IL_0006: ret
10405+
} // end of method BypassReadyToRunAttribute::.ctor
10406+
10407+
} // end of class System.Runtime.BypassReadyToRunAttribute
10408+
1037910409

1038010410
// =============================================================
1038110411

0 commit comments

Comments
 (0)