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

Define jitThrowIdentityException helper and isIdentityObject non-helper #7674

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hzongaro
Copy link
Contributor

The <isIdentityObject> non-helper can be used by downstream projects as a way of distinguishing in IL whether an object is an instance of a class for which each instance has a unique identity, sometimes called an identity type, versus an instance of a class for which instances that have the same value are indistinguishable, sometimes called a value type.

The <jitThrowIdentityException> helper can be used by downstream projects in IL to throw an IdentityException. It would typically be used to report that an object was expected to be an instance of a class for which each instance has a unique identity.

The <isIdentityObject> non-helper can be used by downstream projects as
a way of distinguishing in IL whether an object is an instance of a
class for which each instance has a unique identity, sometimes called an
identity type, versus an instance of a class for which instances that
have the same value are indistinguishable, sometimes called a value
type.

The <jitThrowIdentityException> helper can be used by downstream
projects in IL to throw an IdentityException.  It would typically be
used to report that an object was expected to be an instance of a class
for which each instance has a unique identity.

Signed-off-by:  Henry Zongaro <zongaro@ca.ibm.com>
@hzongaro
Copy link
Contributor Author

@a7ehuo, @0xdaryl may I ask you to review this change?

@0xdaryl
Copy link
Contributor

0xdaryl commented Feb 28, 2025

Jenkins build all

@0xdaryl 0xdaryl self-assigned this Feb 28, 2025
Copy link
Contributor

@a7ehuo a7ehuo left a comment

Choose a reason for hiding this comment

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

LGTM. I just have one question. I don't see any set up for isIdentityObjectNonHelperSymbol in getUseDefAliasesBV in Aliases.cpp. Should it return &symRefTab->aliasBuilder.defaultMethodDefAliases() for isIdentityObjectNonHelperSymbol in getUseDefAliasesBV?

@hzongaro
Copy link
Contributor Author

Should it return &symRefTab->aliasBuilder.defaultMethodDefAliases() for isIdentityObjectNonHelperSymbol in getUseDefAliasesBV?

Yes! Thank you for catching that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants