summaryrefslogtreecommitdiff
path: root/src/zap/zapinfo.cpp
diff options
context:
space:
mode:
authorAndy Ayers <andya@microsoft.com>2017-10-23 17:46:41 -0700
committerAndy Ayers <andya@microsoft.com>2017-10-30 14:36:24 -0700
commit215ee89756e612bcdd7e9bd61ea500eacaf4973f (patch)
tree1ba04645996fd4c04db80c1975a1fbd3ef791568 /src/zap/zapinfo.cpp
parent274c961fa23d3dcd38cbb5736dcbf7b908d0cf99 (diff)
downloadcoreclr-215ee89756e612bcdd7e9bd61ea500eacaf4973f.tar.gz
coreclr-215ee89756e612bcdd7e9bd61ea500eacaf4973f.tar.bz2
coreclr-215ee89756e612bcdd7e9bd61ea500eacaf4973f.zip
JIT: optimize calls on boxed objects
For calls with boxed this objects, invoke the unboxed entry point if available and modify the box to copy the original value or struct to a local. Pass the address of this local as the first argument to the unboxed entry point. Defer for cases where the unboxed entry point requires an extra type parameter. This may enable subsequent inlining of the method, and if the method has other boxed parameters, may enable undoing those boxes as well. The jit is not yet as proficient at eliminating the struct copies, but they are present with or without this change, and some may even be required when the methods mutate the fields of `this`. Closes #14213.
Diffstat (limited to 'src/zap/zapinfo.cpp')
-rw-r--r--src/zap/zapinfo.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/zap/zapinfo.cpp b/src/zap/zapinfo.cpp
index 4007f678ae..f0e9d9e8c4 100644
--- a/src/zap/zapinfo.cpp
+++ b/src/zap/zapinfo.cpp
@@ -3708,12 +3708,18 @@ void ZapInfo::getMethodVTableOffset(CORINFO_METHOD_HANDLE method,
CORINFO_METHOD_HANDLE ZapInfo::resolveVirtualMethod(
CORINFO_METHOD_HANDLE virtualMethod,
CORINFO_CLASS_HANDLE implementingClass,
- CORINFO_CONTEXT_HANDLE ownerType
- )
+ CORINFO_CONTEXT_HANDLE ownerType)
{
return m_pEEJitInfo->resolveVirtualMethod(virtualMethod, implementingClass, ownerType);
}
+CORINFO_METHOD_HANDLE ZapInfo::getUnboxedEntry(
+ CORINFO_METHOD_HANDLE ftn,
+ bool* requiresInstMethodTableArg)
+{
+ return m_pEEJitInfo->getUnboxedEntry(ftn, requiresInstMethodTableArg);
+}
+
CORINFO_CLASS_HANDLE ZapInfo::getDefaultEqualityComparerClass(
CORINFO_CLASS_HANDLE elemType)
{