Open dchopra001 opened 5 years ago
This is actually a much more widespread inconsistency throughout the compiler. Many of the "legacy" getters use getMyField()
while use of myField()
has grown in popularity for many new fields in recent years because of the influence of Objective-C and to improve statement readability ("get" is often implied, and when multiple getters are used in the same statement they just consume real estate). I also suspect each developer has a philosophical preference to a particular style.
It might be worth reining this practice in if we want to maintain a consistent look-and-feel to the codebase and impose a naming style for getters going forward (and with the long term objective of renaming getters named in an alternate style to our agreed-upon style). It's something we could document in a style guide eventually.
As part of #3316 we identified some common codegen APIs that can be renamed better to be more consistent: https://github.com/eclipse/omr/blob/79be16936d281373a16ebde0cef43a1f06d10b7e/compiler/codegen/OMRCodeGenerator.hpp#L1149-L1156
Specifically:
internalControlFlowNestingDepth()
can be changed togetInternalControlFlowNestingDepth()
andinternalControlFlowSafeNestingDepth()
can be changed togetInternalControlFlowSafeNestingDepth()
. This way the API naming convention will be consisted with how the setters are named here.We can also change
insideInternalControlFlow()
toisInsideInternalControlFlow()
.