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

FilteredJavaStream is unnecessary

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • None
    • hotspot

      Either hide constantPoolOop or expose it as a field of jdk_internal_reflect_ConstantPool but we don't need this filtering mechanism for any reason.

      The reason that constantPoolOop is the java.lang.Class instance (mirror) and not a ConstantPool* is because the latter is metadata managed by storage in the VM so would need special handling if there were pointers to it in the Java heap. The reason for the special handling is because class redefinition could delete the ConstantPool if old methods were no longer running. Because of constant pool merging for class redefinition, the InstanceKlass->constant pool pointer will maintain the validity of indices that the Java code might retrieve from jdk_internal_reflect_ConstantPool.

            phubner Paul Hubner
            coleenp Coleen Phillimore
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: