Capture the MethodHandle.Lookup used when pulling a Code Model/FuncOp/ModuleOp from a Method

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • None
    • Affects Version/s: repo-babylon
    • Component/s: core-libs

      It's likely that any code needing to resolve a java.lang.reflect.Class/Methods will need a suitable MethodHandles.Lookup.

      Maybe we can help users requiring a lookup, by capturing the Lookup used to extract the CodeModel/FuncOp from the original Method in the FuncOp itself

      My guess is this will need to be via a method on the FuncOp which returns Optional<MethodHandles.LookUp>....

      In HAT we have to carry the original lookup around just so we can use them as we traverse the code mode to resolve classes/methods as needed.

      I suspect other users of the CodeModel will likely have to jump through similar hoops. I think this will make life much easier.

      Of course transformers will have to copy/convey this captured data (as it does location/attributes) as as transform models.

            Assignee:
            Unassigned
            Reporter:
            Gary Frost
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: