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

[GR-50773] Improve typing of GraphProvider and signatures. #7982

Merged
merged 1 commit into from
Dec 9, 2023

Conversation

graalvmbot
Copy link
Collaborator

Now that ParseOnce is the only execution mode, and ResolvedSignature can provide better typing for signatures, this PR improves typing and removes explicit type checks.

  • In GraphProvider.buildGraph, pass in AnalysisMethod to remove later explicit casts.
  • Remove SubstrateGraphKit.loadArguments. It is just silly to load arguments based on the method signature (which could be the wrong signature), we can just collect the arguments when the FrameStateBuilder creates them.
  • Return a typed signature from AnalysisMethod.getSignature and HostedMethod.getSignature and remove later explicit casts.
  • Use the getParameterType and getReturnType methods of ResolvedSignature that do not need an accessingClass parameter.
  • Use ResolvedSignature.toParameterList where appropriate and remove later explicit casts.
  • Replace SimpleSignature with ResolvedSignature
  • Do not use ResolvedJavaMethod.toParameterTypes because it is badly defined for constructors. Overrides in AnalysisMethod and HostedMethod prevent future usage in our universe.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Dec 8, 2023
@graalvmbot graalvmbot closed this Dec 9, 2023
@graalvmbot graalvmbot deleted the cwi/GR-50426-Signature-3 branch December 9, 2023 08:07
@graalvmbot graalvmbot merged commit f60f913 into master Dec 9, 2023
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants