summaryrefslogtreecommitdiff
path: root/src/vm/method.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vm/method.cpp')
-rw-r--r--src/vm/method.cpp12
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);