-
Notifications
You must be signed in to change notification settings - Fork 396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate public definitions of self() in compiler #5780
Comments
That's great, @ABHI12800 ! Thank you for offering to help. Is the context for this item clear to you, or is there anything we can do to help you get started? fwiw, I recommend you start with just one (one of the simpler) classes that has public |
Thanks for replying @mstoodle. Sure, I will start with one.
I think the context is little bit clear to me. And I will surely need help since its my first contribution. |
You'll probably want to read up on extensible classes a bit, which you can find in Just like when using CRTP, however, we need to cast [1] https://github.com/eclipse/omr/blob/master/doc/compiler/extensible_classes/Extensible_Classes.md |
That will do, yes. Another way would be to move the Also, just for convenience, @ABHI12800 has opened a PR for review here #5793 . |
I don't have any real preference. There are lots of different styles in use throughout the code base. Thanks for taking on these changes. |
Thanks for your reply. :) |
I suggest we get your first PR merged as you work out all the mechanics involved in contributing, then we would happily welcome more changes like this one from you. |
Is this ok? |
@ABHI12800 those PRs are unnecessarily small. May I suggest we open up one PR and have all the commits in there? Having multiple PRs requires multiple rounds of testing and eyes from committers. |
Sorry ,I will do that. |
Opened PR as #5803 |
Hello everyone, to assist the community, another public definition of self(): |
@georgkrylov pointed out in #4557 that OMRCompilation.hpp defines
self()
as a public member function. I believe the nature ofself()
should be constrained toprotected
access: there should not be a need for a class outside of the extensible hierarchy of e.g.Compilation
to callCompilation
'sself()
function. External classes should only referring to the fully extendedTR::Compilation
type.See #4557 (comment)
which includes this code snippet from
OMRCompilation.hpp
:https://github.com/eclipse/omr/blob/7b4155a69859e4422f742acbffe712d1d15ee4cc/compiler/compile/OMRCompilation.hpp#L288-L312
The text was updated successfully, but these errors were encountered: