[Tailcall] Bring coreclr tests for tail calls to Mono source tree (#7204)
commit6f0fba8961ac66f032b50b25a229b00d9bc78162
authorjaykrell <jay.krell@cornell.edu>
Thu, 29 Mar 2018 17:54:10 +0000 (29 10:54 -0700)
committerGitHub <noreply@github.com>
Thu, 29 Mar 2018 17:54:10 +0000 (29 10:54 -0700)
treed062bbfabf160e504de2300461d8d09fa59dea44
parent765ea257723394b7b36551b3ca2b859e42011b8f
[Tailcall] Bring coreclr tests for tail calls to Mono source tree (#7204)

* [Tailcall] Copy some tests from CoreCLR.

* [Tailcall] Copy and build some tests from CoreCLR.

* [Tailcall] Add mono --test-tailcall-require switch
 that asserts that every tail. is honored.
 Add some tailcall output under -v.

* [Tailcall] Switch tests/coreclr/tailcall to tests/tailcall/coreclr
on the theory that this is where additioanl tailcall tests will go,
not that is the coreclr test area.
Also remove leading "./" which did afford easier search/replace
but will likely be seen as noise, and might break out of tree builds.

* [Tailcall] update readme

* [Tailcall] Tweak logging and first working Makefile, w/o disabled tests.
Next step is try to restore parallelism.

* [Tailcall] Add indent and fix check-tailcall to be parallel and incremental.

* [Tailcall] Out of tree builds just need mkdir.

* [Tailcall] Remove accidental content.

* [Tailcall] Undo fix for out of tree builds.

* [Tailcall] Use environment variable MONO_DEBUG in place of command line parameter despite
environment variables having problems and being banned in other contexts.

Accept and ignore empty MONO_DEBUG option so that ",foo" can be appended without
first checking for empty -- without having to learn how in another language.

Use g_print instead of printf in new code, i.e. for Android debugger.

Remove newlines to restore unreadability/unmergability.

Make running tailcall tests not incremental by default but leave I= to make it incremental.

Add comments indicating "tailcalllog" is a public interface, not to be changed
without changing its users.

* [Tailcall] Resolve a recent "FIXME".

* [Tailcall] Compile but do not run the C# tests.

* [Tailcall] Split disabled compile from disabled run, and compile the last of the tests.
Disable compile remains, because one of the tests contains 3 files, and putting
the three sources in the sources variable (for distribution) implies building them each separately.
Disable compile is used to remove two of them from compiling independently
and then another dependency rule makes them compile together.

* [Tailcall] Follow convention without incrementality and less verification.

* [Tailcall] Disable new failing tests on x86/arm/arm64 and Linux/amd64.

* [Tailcall] Disable more tests for x86 and sort the lists.

* [Tailcall] Move from .NET Standard to mscorlib see if that works better.

* [Tailcall] Add missing build dependency.

* [Tailcall] Do not compile tailcall/coreclr/JIT/opt/Tailcall/TailcallVerifyWithPrefix.exe for
FullAOT. Compiling it fails an assert where it is supposed to raise an exception. Fix later.

* [Tailcall] For now, do not run any CoreCLR tailcall tests with FullAOT.
--compile-all fails an assert there. Instead we have to find what can run, and don't use --compile-all.

* [Tailcall] Disable all CoreCLR tests under FullAOT. Some fail to tailcall.
Many work, w/o assertion failure and printing success, but none exit with 0 exit code.

* [Tailcall] Add clarifying comment.

* [Tailcall] Add two opportunistic tail. prefixes.
82 files changed:
mono/mini/method-to-ir.c
mono/mini/mini-runtime.c
mono/mini/mini-runtime.h
mono/tests/Makefile.am
mono/tests/tailcall-generic-cast-nocrash-il.il
mono/tests/tailcall-virt.il
mono/tests/tailcall/coreclr/CoreMangLib/cti/system/reflection/emit/opcodes/opcodestailcall.cs [new file with mode: 0644]
mono/tests/tailcall/coreclr/CoreMangLib/system/span/SlowTailCallArgs.cs [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/CodeGenBringUpTests/RecursiveTailCall.cs [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Directed/IL/PInvokeTail/PInvokeTail.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Directed/IL/PInvokeTail/tailwinapi.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Directed/IL/Tailcall/JitTailcall1.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Directed/IL/Tailcall/Jittailcall2.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Directed/IL/mutualrecur-tailcall/MutualRecur-TailCall.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Directed/coverage/importer/Desktop/badtailcall.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Directed/coverage/importer/badtailcall.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Directed/pinvoke/tail.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Directed/tailcall/tailcall.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Directed/zeroinit/tail.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/IL_Conformance/Old/Base/tailcall.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/Boxing/boxunbox/tailcall.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/Boxing/misc/tailjump.cs [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/Boxing/misc/tailjump.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/Invoke/SEH/catchfault_tail.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/Invoke/SEH/catchfinally_tail.cs [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/Invoke/SEH/catchfinally_tail.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/Invoke/fptr/recurse_tail_call.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/Invoke/fptr/recurse_tail_calli.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/nonvirtualcall/tailcall.cs [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/nonvirtualcall/tailcall.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/tailcall/Desktop/thread-race.cs [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/tailcall/compat_enum.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/tailcall/compat_i2_bool.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/tailcall/compat_i4_i1.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/tailcall/compat_i4_u.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/tailcall/compat_i_u2.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/tailcall/compat_obj.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/tailcall/compat_r4_r8.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/tailcall/compat_r4_r8_inl.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/tailcall/compat_r8_r4.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/tailcall/compat_r8_r4_inl.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/tailcall/compat_v.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/tailcall/deep_array.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/tailcall/deep_array_nz.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/tailcall/deep_gc.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/tailcall/deep_inst.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/tailcall/deep_value.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/tailcall/deep_virt.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/tailcall/gcval.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/tailcall/gcval_nested.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/tailcall/gcval_sideeffect.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/tailcall/pointer.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/tailcall/pointer_i.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/tailcall/recurse_ep.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/tailcall/recurse_ep_void.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/tailcall/reference_i.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/tailcall/test_2a.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/tailcall/test_2b.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/tailcall/test_2c.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/tailcall/test_3b.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/tailcall/test_implicit.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/tailcall/test_mutual_rec.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/tailcall/test_switch.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/tailcall/test_virt.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/tailcall/test_void.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/tailcall_v4/delegateParamCallTarget.cs [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/tailcall_v4/delegateTail.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/tailcall_v4/hijacking.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/tailcall_v4/smallFrame.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Methodical/tailcall_v4/tailcall_AV.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/Regression/VS-ia64-JIT/V1.2-M02/b102844/tailcallcalli.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/opt/ETW/TailCallCases.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/opt/FastTailCall/FastTailCallCandidates.cs [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/opt/FastTailCall/FastTailCallInlining.cs [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/opt/FastTailCall/GitHubIssue12479.cs [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/opt/FastTailCall/StackFixup.cs [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/opt/FastTailCall/StructPassingSimple.cs [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/opt/Loops/SearchLoopTail.cs [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/opt/Tailcall/TailcallVerifyTransparentLibraryWithPrefix.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/opt/Tailcall/TailcallVerifyVerifiableLibraryWithPrefix.il [new file with mode: 0644]
mono/tests/tailcall/coreclr/JIT/opt/Tailcall/TailcallVerifyWithPrefix.il [new file with mode: 0644]
mono/tests/tailcall/readme.txt [new file with mode: 0644]