Skip to content

Define jitThrowIdentityException helper and isIdentityObject non-helper - #7674

Merged
0xdaryl merged 1 commit into
eclipse-omr:masterfrom
hzongaro:define-jitThrowIdentityExcept-isIdentityObject
Mar 4, 2025
Merged

Define jitThrowIdentityException helper and isIdentityObject non-helper#7674
0xdaryl merged 1 commit into
eclipse-omr:masterfrom
hzongaro:define-jitThrowIdentityExcept-isIdentityObject

Conversation

@hzongaro

Copy link
Copy Markdown
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.

@hzongaro

Copy link
Copy Markdown
Contributor Author

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

@0xdaryl

0xdaryl commented Feb 28, 2025

Copy link
Copy Markdown
Contributor

Jenkins build all

@0xdaryl 0xdaryl self-assigned this Feb 28, 2025

@a7ehuo a7ehuo left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor Author

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

Yes! Thank you for catching that.

@hzongaro

hzongaro commented Mar 2, 2025

Copy link
Copy Markdown
Contributor Author

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

Fixed in commit 7da639f. Once everyone has approved, I will squash the commits.

@a7ehuo a7ehuo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. Thanks for the update!

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
hzongaro force-pushed the define-jitThrowIdentityExcept-isIdentityObject branch from 7da639f to 8063d09 Compare March 3, 2025 17:03
@hzongaro

hzongaro commented Mar 3, 2025

Copy link
Copy Markdown
Contributor Author

LGTM. Thanks for the update!

Thank you! I have squashed the commits.

Jenkins build all

@AdamBrousseau

Copy link
Copy Markdown
Contributor

Jenkins build all

@0xdaryl
0xdaryl merged commit 9eaf846 into eclipse-omr:master Mar 4, 2025
@hzongaro
hzongaro deleted the define-jitThrowIdentityExcept-isIdentityObject branch May 12, 2025 12:54
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.

4 participants