Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Enable interpreter build #11252

Merged
merged 2 commits into from
Apr 28, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clrdefinitions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ if (CLR_CMAKE_PLATFORM_UNIX OR CLR_CMAKE_TARGET_ARCH_ARM64)
set(FEATURE_IMPLICIT_TLS 1)
endif(CLR_CMAKE_PLATFORM_UNIX OR CLR_CMAKE_TARGET_ARCH_ARM64)
if(FEATURE_INTERPRETER)
add_definitions(-DFEATURE_INTERPRETER)
add_definitions(-DUSE_INTERPRETER)
endif(FEATURE_INTERPRETER)
add_definitions(-DFEATURE_ISYM_READER)
add_definitions(-DFEATURE_LOADER_OPTIMIZATION)
Expand Down
3 changes: 3 additions & 0 deletions src/inc/switches.h
Original file line number Diff line number Diff line change
Expand Up @@ -233,5 +233,8 @@
#define FEATURE_STACK_SAMPLING
#endif // defined (ALLOW_SXS_JIT)

#if defined(USE_INTERPRETER)
#define FEATURE_INTERPRETER
#endif // USE_INTERPRETER
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if, instead of adding another name (USE_INTERPRETER), it would be better to add, here:

#if defined(CROSSGEN_COMPILE)
#if defined(FEATURE_INTERPRETER)
#undef FEATURE_INTERPRETER // No interpreter in crossgen builds
#endif
#endif

?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for comment! It works well. I updated PR as you suggested.

#endif // !defined(CROSSGEN_COMPILE)

4 changes: 4 additions & 0 deletions src/vm/tieredcompilation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down