diff options
author | Sejong Oh <sejooh@microsoft.com> | 2016-05-17 13:35:32 -0700 |
---|---|---|
committer | Sejong Oh <sejooh@microsoft.com> | 2016-05-17 13:35:32 -0700 |
commit | 80f3d4f3a73abff6c90b331bc7b3eb97d365cf2c (patch) | |
tree | 8d4cc50e8dae282c73d5948c549bb35ba1f4e341 | |
parent | 182bea3c657856c90e9c5c0bab32bdc63c35352e (diff) | |
parent | 5e664c56ec991b9d73a00a0628e114d0c2b0dfec (diff) | |
download | coreclr-80f3d4f3a73abff6c90b331bc7b3eb97d365cf2c.tar.gz coreclr-80f3d4f3a73abff6c90b331bc7b3eb97d365cf2c.tar.bz2 coreclr-80f3d4f3a73abff6c90b331bc7b3eb97d365cf2c.zip |
Merge pull request #4999 from sejongoh/avoid_ti_method_check
Add typeInfo::GetMehtod2 to avoid checking GetType == TI_METHOD.
-rwxr-xr-x[-rw-r--r--] | src/jit/_typeinfo.h | 7 | ||||
-rwxr-xr-x[-rw-r--r--] | src/jit/importer.cpp | 2 | ||||
-rw-r--r-- | tests/testsUnsupportedOutsideWindows.txt | 2 |
3 files changed, 8 insertions, 3 deletions
diff --git a/src/jit/_typeinfo.h b/src/jit/_typeinfo.h index c71294a8b8..2e04343b3c 100644..100755 --- a/src/jit/_typeinfo.h +++ b/src/jit/_typeinfo.h @@ -555,6 +555,13 @@ public: return m_method; } + // If FEATURE_CORECLR is enabled, GetMethod can be called + // before the pointer type is known to be a method pointer type. + CORINFO_METHOD_HANDLE GetMethod2() const + { + return m_method; + } + // Get this item's type // If primitive, returns the primitive type (TI_*) // If not primitive, returns: diff --git a/src/jit/importer.cpp b/src/jit/importer.cpp index 52604b5136..52a7a7148e 100644..100755 --- a/src/jit/importer.cpp +++ b/src/jit/importer.cpp @@ -11610,7 +11610,7 @@ DO_LDFTN: #ifdef FEATURE_CORECLR // In coreclr the delegate transparency rule needs to be enforced even if verification is disabled typeInfo tiActualFtn = impStackTop(0).seTypeInfo; - CORINFO_METHOD_HANDLE delegateMethodHandle = tiActualFtn.GetMethod(); + CORINFO_METHOD_HANDLE delegateMethodHandle = tiActualFtn.GetMethod2(); impInsertCalloutForDelegate(info.compMethodHnd, delegateMethodHandle, diff --git a/tests/testsUnsupportedOutsideWindows.txt b/tests/testsUnsupportedOutsideWindows.txt index 845cf6034b..8e28953195 100644 --- a/tests/testsUnsupportedOutsideWindows.txt +++ b/tests/testsUnsupportedOutsideWindows.txt @@ -219,8 +219,6 @@ JIT/Methodical/cctor/xassem/xprecise3_cs_do/xprecise3_cs_do.sh JIT/Methodical/cctor/xassem/xprecise3_cs_r/xprecise3_cs_r.sh JIT/Methodical/cctor/xassem/xprecise3_cs_ro/xprecise3_cs_ro.sh JIT/Methodical/Coverage/arglist_pos/arglist_pos.sh -JIT/Methodical/delegate/_simpleoddpower_il_d/_simpleoddpower_il_d.sh -JIT/Methodical/delegate/_simpleoddpower_il_r/_simpleoddpower_il_r.sh JIT/Methodical/delegate/_XModuledeleg1_d/_XModuledeleg1_d.sh JIT/Methodical/delegate/_XModuledeleg1_do/_XModuledeleg1_do.sh JIT/Methodical/delegate/_XModuledeleg1_r/_XModuledeleg1_r.sh |