Enable interpreter build (dotnet/coreclr#11252)
authorJonghyun Park <parjong@gmail.com>
Fri, 28 Apr 2017 18:08:36 +0000 (03:08 +0900)
committerBruce Forstall <brucefo@microsoft.com>
Fri, 28 Apr 2017 18:08:36 +0000 (11:08 -0700)
Enable FEATURE_INTERPRETER build

Commit migrated from https://github.com/dotnet/coreclr/commit/12d18da45492e5b48991b1d0dcf3bfbea5136944

src/coreclr/src/inc/switches.h
src/coreclr/src/vm/tieredcompilation.cpp

index bb30387..7996453 100644 (file)
 
 #endif // !defined(CROSSGEN_COMPILE)
 
+#if defined(FEATURE_INTERPRETER) && defined(CROSSGEN_COMPILE)
+#undef FEATURE_INTERPRETER
+#endif
index 2032e66..acc26b9 100644 (file)
@@ -337,7 +337,11 @@ void TieredCompilationManager::InstallMethodCode(MethodDesc* pMethod, PCODE pCod
     _ASSERTE(!pMethod->IsNativeCodeStableAfterInit());
 
     PCODE pExistingCode = pMethod->GetNativeCode();
+#ifdef FEATURE_INTERPRETER
+    if (!pMethod->SetNativeCodeInterlocked(pCode, pExistingCode, TRUE))
+#else
     if (!pMethod->SetNativeCodeInterlocked(pCode, pExistingCode))
+#endif
     {
         //We aren't there yet, but when the feature is finished we shouldn't be racing against any other code mutator and there would be no
         //reason for this to fail