diff options
author | Yi Zhang (CLR) <yizhang82@users.noreply.github.com> | 2017-05-22 17:52:59 -0700 |
---|---|---|
committer | Yi Zhang (CLR) <yzha@microsoft.com> | 2017-07-19 11:16:56 -0700 |
commit | a5f9bde9086a0a69ae290cf40bb89403d640e85f (patch) | |
tree | 09665551068c65b1dc2660322da8b7bef0ea923c /src/vm/method.cpp | |
parent | 9b8471b34c8fad1694ea0e9562e4699ac4eeda6e (diff) | |
download | coreclr-a5f9bde9086a0a69ae290cf40bb89403d640e85f.tar.gz coreclr-a5f9bde9086a0a69ae290cf40bb89403d640e85f.tar.bz2 coreclr-a5f9bde9086a0a69ae290cf40bb89403d640e85f.zip |
More update in /dev/defaultintf (#11693)
* Support non-virtual calls on interface private members correctly
* Support protected methods
* Properly handle precode
* Throw (tentative) exception when seeing conflict overrides and add a test case
(This updates CoreCLR dev/defaultintf the same with the build we are showing at //build)
Diffstat (limited to 'src/vm/method.cpp')
-rw-r--r-- | src/vm/method.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/vm/method.cpp b/src/vm/method.cpp index 5ac5cafd01..845ce799a9 100644 --- a/src/vm/method.cpp +++ b/src/vm/method.cpp @@ -2587,10 +2587,7 @@ BOOL MethodDesc::RequiresStableEntryPoint(BOOL fEstimateForChunk /*=FALSE*/) return TRUE; // TODO: Can we avoid early allocation of precodes for interfaces and cominterop? - // Only abstract virtual interface method need precode - // @DIM_TODO - We need to decide what is the right approach for precode for default - // interface methods - if ((IsInterface() && IsAbstract() && IsVirtual() && !IsStatic()) || IsComPlusCall()) + if ((IsInterface() && !IsStatic() && IsVirtual()) || IsComPlusCall()) return TRUE; } @@ -2686,7 +2683,7 @@ BOOL MethodDesc::MayHaveNativeCode() _ASSERTE(IsIL()); - if (IsWrapperStub() || ContainsGenericVariables() || IsAbstract()) + if ((IsInterface() && !IsStatic() && IsVirtual() && IsAbstract()) || IsWrapperStub() || ContainsGenericVariables() || IsAbstract()) { return FALSE; } @@ -5024,6 +5021,11 @@ BOOL MethodDesc::SetNativeCodeInterlocked(PCODE addr, PCODE pExpected /*=NULL*/ (TADDR&)value, (TADDR&)expected) == (TADDR&)expected; #endif // FEATURE_INTERPRETER } + + if (IsDefaultInterfaceMethod() && HasPrecode()) + { + return GetPrecode()->SetTargetInterlocked(addr); + } #ifdef FEATURE_INTERPRETER PCODE pFound = FastInterlockCompareExchangePointer(GetAddrOfSlot(), addr, pExpected); |