Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8344160

Don't see how to create a local variable with type and lifetime

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • None
    • core-libs

      ADDITIONAL SYSTEM INFORMATION :
      does not apply

      A DESCRIPTION OF THE PROBLEM :
      Reading through the existing java.lang.classfile code and documentation, I don't see how to create a new local variable. I do see how to read one in from an existing class file. BCEL and ASM both have the ability to create a local variable of any type and with a specific scope. (They also allow you to assign the offset in the LocalVariableTable, but I would expect you to handle that automatically behind the scenes.) I would expect to be able to create a local with method scope or with block scope. Probably with the ability to create a corresponding LocalVariableTypeTable entry if requested. It seems like the various byte code instruction builders should have a way to access these locals symbolically as opposed to just by slot number.


            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: