Skip to content

Conversation

@jasper-d
Copy link
Contributor

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

Removes all _NoLogging methods.

Fixes #89634

@ghost ghost added area-VM-coreclr community-contribution Indicates that the PR has been added by a community member labels 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!

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