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

Valhalla: Drop non-ClassType descriptors when parsing LoadableDescriptors

XMLWordPrintable

      The LoadableDescriptors attribute supports all FieldDescriptors which are expressed with the following grammar:
      ```
      FieldDescriptor:
        FieldType

      FieldType:
        BaseType
        ClassType
        ArrayType

      BaseType:
        (one of)
        B C D F I J S Z

      ClassType:
        L ClassName ;

      ArrayType:
        [ ComponentType

      ComponentType:
        FieldType
      ```

      Only the "ClassType" descriptors are meaningful to the JVM as they are ones which can be speculatively loaded.

      Update the classFileParser logic to:
      1) Validate all LD elements as FieldDescriptors (already what it does today)
      2) Drop the non-ClassType (ie: non "L" Foo ";") elements so the rest of the JVM never sees them,

            fparain Frederic Parain
            heidinga Dan Heidinga
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: