Change gtGetThisArg not to return nullptr. (#44398)
authorSergey Andreenko <seandree@microsoft.com>
Thu, 19 Nov 2020 00:40:54 +0000 (14:40 -1000)
committerGitHub <noreply@github.com>
Thu, 19 Nov 2020 00:40:54 +0000 (16:40 -0800)
commit044ee8cedd53e7bda01fecd2c688797aa1d5d1f7
tree65ac9c16a2502e0ddc6d8ce3582a2b07f53e3464
parent21f32f08097d15020298689b687ff0296b3f039e
Change gtGetThisArg not to return nullptr. (#44398)

* Don't wrap string literal const as nop for CoreRT.

It was probably an old workaround for another Jit bug, it is most likely fixed by now.

* Change `gtGetThisArg` not to return `nullptr`.

There was only 1 case where a null return was tolerated - for a tail call in `optAssertionGen` marked as virtual.
However, a transformed tail call is never a virtual, fix `fgMorphTailCallViaJitHelper` to unset virtual flag.

* Keep x86 tail call via jit helper as a virtual stub call.
src/coreclr/src/jit/assertionprop.cpp
src/coreclr/src/jit/gentree.cpp
src/coreclr/src/jit/lower.cpp
src/coreclr/src/jit/morph.cpp