Skip to content
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

Remove _NoLogging methods from VM #89641

Merged
merged 14 commits into from
Jul 28, 2023
Merged

Remove _NoLogging methods from VM #89641

merged 14 commits into from
Jul 28, 2023

Conversation

jasper-d
Copy link
Contributor

@jasper-d jasper-d commented Jul 28, 2023

Removes all _NoLogging methods.

Fixes #89634

@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label Jul 28, 2023
@jkotas
Copy link
Member

jkotas commented Jul 28, 2023

I think that assert wouldn't be a problem except for GetClassWithPossibleAV. Also, GetClass_NoLogging has FORCEINLINE while GetClass has only inline. Not sure what the best course of action here is.

  • Rename GetClass_NoLogging to GetClassWithPossibleAV
  • Change GetClass to call it GetClassWithPossibleAV and assert that the result is non-null. Mark both with FORCEINLINE for a good measure.

@jasper-d
Copy link
Contributor Author

  • Rename GetClass_NoLogging to GetClassWithPossibleAV

@jkotas There is already GetClassWithPossibleAV but that has CANNOT_HAVE_CONTRACT:

inline PTR_EEClass MethodTable::GetClassWithPossibleAV()
{
CANNOT_HAVE_CONTRACT;
SUPPORTS_DAC;
return GetClass_NoLogging();
}

So rename GetClassWithPossibleAV to GetClassWithPossibleAVNoContract and GetClass_NoLogging to GetClassWithPossibleAV?

@jkotas
Copy link
Member

jkotas commented Jul 28, 2023

I would delete the existing GetClassWithPossibleAV and move the comment from the existing GetClassWithPossibleAV to the renamed GetClass_NoLogging.

The extra CANNOT_HAVE_CONTRACT annotation in the existing GetClassWithPossibleAV is not important.

Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

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

Thank you!

src/coreclr/vm/methodtable.h Outdated Show resolved Hide resolved
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
@jasper-d
Copy link
Contributor Author

Thank you for the help!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-VM-coreclr community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

_NoLogging methods in VM
2 participants