< prev index next >

src/java.base/share/classes/java/lang/classfile/attribute/StackMapFrameInfo.java

Print this page
@@ -28,10 +28,11 @@
  import java.lang.classfile.ClassFile;
  import java.lang.classfile.Label;
  import java.lang.classfile.Opcode;
  import java.lang.classfile.constantpool.ClassEntry;
  import java.lang.classfile.instruction.BranchInstruction;
+ import java.lang.classfile.constantpool.NameAndTypeEntry;
  import java.lang.constant.ClassDesc;
  import java.util.List;
  
  import jdk.internal.classfile.impl.StackMapDecoder;
  import jdk.internal.classfile.impl.TemporaryConstantPool;

@@ -75,21 +76,44 @@
      /**
       * {@return the expanded operand stack types}
       */
      List<VerificationTypeInfo> stack();
  
+     /**
+      * {@return the expanded unset fields}
+      *
+      * @see <a href="https://cr.openjdk.org/~dlsmith/jep401/jep401-20241108/specs/value-objects-jvms.html">Specs</a>
+      */
+     List<NameAndTypeEntry> unsetFields();
+ 
      /**
       * {@return a new stack map frame}
       *
       * @param target the location of the frame
       * @param locals the complete list of frame locals
       * @param stack the complete frame stack
       */
      public static StackMapFrameInfo of(Label target,
              List<VerificationTypeInfo> locals,
              List<VerificationTypeInfo> stack) {
-         return new StackMapDecoder.StackMapFrameImpl(255, target, locals, stack);
+ 
+         return of(target, locals, stack, List.of());
+     }
+ 
+     /**
+      * {@return a new stack map frame}
+      * @param target the location of the frame
+      * @param locals the complete list of frame locals
+      * @param stack the complete frame stack
+      * @param unsetFields the complete list of unset fields
+      */
+     public static StackMapFrameInfo of(Label target,
+                                        List<VerificationTypeInfo> locals,
+                                        List<VerificationTypeInfo> stack,
+                                        List<NameAndTypeEntry> unsetFields) {
+ 
+         return new StackMapDecoder.StackMapFrameImpl(255, target, locals, stack, unsetFields);
      }
  
      /**
       * The type of a stack or local variable value.
       *
< prev index next >