Fix importing of calls with explicit `this`. (#35385)
authorEugene Rozenfeld <erozen@microsoft.com>
Fri, 24 Apr 2020 18:46:32 +0000 (11:46 -0700)
committerGitHub <noreply@github.com>
Fri, 24 Apr 2020 18:46:32 +0000 (11:46 -0700)
commit07f9134f21d99e1a8906619f6c741a49d78b6fa5
tree02af54e465d8fb84fdc2a8f7ccf3d933f4eab32f
parent7f956090ebc1b9b6de27b209b0ed25a976d9b109
Fix importing of calls with explicit `this`. (#35385)

When signature calling convention has `CORINFO_CALLCONV_EXPLICITTHIS`
set `this` argument is explicitly included in the argument list.
The importer wasn't taking that into account and was trying to pop
an implicit `this`, which resulted in `BADCODE("stack underflow")`
from `impPopStack` and `System.InvalidProgramException`.

Fixes #35384
src/coreclr/src/jit/importer.cpp
src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_35384/GitHub_35384.il [new file with mode: 0644]
src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_35384/GitHub_35384.ilproj [new file with mode: 0644]