Open dchopra001 opened 6 years ago
FYI according to [1] OpenJ9 has switched to compile Windows with VS2013 which according to [2] supports scoped (strongly typed) enums since VS2012. We should be able to complete this work item now if we propose for OMR to bump to compiling with VS2013 on Windows as well. We should first double check all the platforms have compiler support though before diving in.
[1] https://openj9.slack.com/archives/C8312LCV9/p1604503096095300 [2] https://docs.microsoft.com/en-us/previous-versions/hh567368(v=vs.140)?redirectedfrom=MSDN
Actually just realized that Slack link may expire eventually so I'll link the actual issue https://github.com/eclipse/openj9/issues/10129 here.
As part of this issue: https://github.com/eclipse/omr/issues/2491 and this PR: https://github.com/eclipse/omr/pull/2577, we broke
TR::RealRegister::RegNum
insidecompiler/codegen/OMRRealRegister.hpp
into two enums.Initially we had: https://github.com/eclipse/omr/blob/de70faf87f67ffe9cd9571d30e5a378009b85b7c/compiler/codegen/OMRRealRegister.hpp#L61-L65
The new design was to have two scoped enums:
RegNum
andRegDep
, whereRegNum
represents all hardware backed registers andRegDep
represents all hardware backed registers + all register concepts such asTR::RealRegister::AssignAny
. However, due to compiler support (MSVC 2010 doesn't support scoped enums) we currently cannot implement scoped enums. So for now https://github.com/eclipse/omr/pull/2577 is a temporary solution which should be improved with scoped enums once support is available.