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

Generate inline superclass test for Class.isAssignableFrom on Z #20855

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

Conversation

matthewhall2
Copy link
Contributor

@matthewhall2 matthewhall2 commented Dec 18, 2024

adds superclass check
checks for class depth at compile time to skip over superclass test for the case when toClassDepth > fromClassDepth

This PR does not enable the change. It will be enabled in a later PR.

tests on this branch:
vmfarm
jenkins personal

tests on branch with change enabled:
vmfarm
jenkins personal

@matthewhall2 matthewhall2 force-pushed the assignableFrom_genSuperclassTest branch 2 times, most recently from 093a9de to e0ce9ec Compare December 18, 2024 20:39
@matthewhall2 matthewhall2 marked this pull request as draft December 18, 2024 20:41
@matthewhall2 matthewhall2 force-pushed the assignableFrom_genSuperclassTest branch 8 times, most recently from 32f0761 to 4da8d70 Compare December 19, 2024 21:33
@matthewhall2 matthewhall2 marked this pull request as ready for review December 19, 2024 22:00
@matthewhall2 matthewhall2 force-pushed the assignableFrom_genSuperclassTest branch from 4da8d70 to 6d94a59 Compare December 19, 2024 22:13
@matthewhall2 matthewhall2 force-pushed the assignableFrom_genSuperclassTest branch 2 times, most recently from 9dfc3e3 to d4d8676 Compare January 3, 2025 16:13
adds superclass check
checks for class depth at compile time to skip over superclass test for
the case when toClassDepth > fromClassDepth

Signed-off-by: Matthew Hall <matthew.hall3@outlook.com>
@matthewhall2 matthewhall2 force-pushed the assignableFrom_genSuperclassTest branch from d4d8676 to ce999ca Compare January 3, 2025 16:48
@matthewhall2
Copy link
Contributor Author

@r30shah can you review please?

generateS390BranchInstruction(cg, TR::InstOpCode::BRC, TR::InstOpCode::COND_BRC, node, failLabel);
}
}
genTestIsSuper(cg, node, fromClassReg, toClassReg, sr1, sr2, NULL, NULL, toClassDepth, failLabel, successLabel, helperCallLabel, deps, NULL, false, NULL, NULL);
Copy link
Contributor

Choose a reason for hiding this comment

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

getTestIsSuper is used by checkAssignableFrom old code and old instance of and checkcast code. We should make the changes is new isAssignableFrom with intention to clean-up old code in mind. I would take a look at genTestIsSuper and genInstanceOfOrCheckcastSuperClassTest and refactor common code to the single function. Currently the code in both is repeated twice with some subtle changes

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

Successfully merging this pull request may close these issues.

2 participants