< prev index next >

src/java.base/share/classes/jdk/internal/org/objectweb/asm/MethodWriter.java

Print this page
*** 310,11 ***
          NA, // wide = 196 (0xc4)
          NA, // multianewarray = 197 (0xc5)
          -1, // ifnull = 198 (0xc6)
          -1, // ifnonnull = 199 (0xc7)
          NA, // goto_w = 200 (0xc8)
!         NA // jsr_w = 201 (0xc9)
      };
  
      /** Where the constants used in this MethodWriter must be stored. */
      private final SymbolTable symbolTable;
  
--- 310,14 ---
          NA, // wide = 196 (0xc4)
          NA, // multianewarray = 197 (0xc5)
          -1, // ifnull = 198 (0xc6)
          -1, // ifnonnull = 199 (0xc7)
          NA, // goto_w = 200 (0xc8)
!         NA, // jsr_w = 201 (0xc9)
+         NA, // breakpoint = 202 (0xca)
+         NA, // default = 203 (0xcb)
+         NA, // withfield = 204 (0xcc)
      };
  
      /** Where the constants used in this MethodWriter must be stored. */
      private final SymbolTable symbolTable;
  

*** 1006,11 ***
          code.put12(opcode, typeSymbol.index);
          // If needed, update the maximum stack size and number of locals, and stack map frames.
          if (currentBasicBlock != null) {
              if (compute == COMPUTE_ALL_FRAMES || compute == COMPUTE_INSERTED_FRAMES) {
                  currentBasicBlock.frame.execute(opcode, lastBytecodeOffset, typeSymbol, symbolTable);
!             } else if (opcode == Opcodes.NEW) {
                  // The stack size delta is 1 for NEW, and 0 for ANEWARRAY, CHECKCAST, or INSTANCEOF.
                  int size = relativeStackSize + 1;
                  if (size > maxRelativeStackSize) {
                      maxRelativeStackSize = size;
                  }
--- 1009,11 ---
          code.put12(opcode, typeSymbol.index);
          // If needed, update the maximum stack size and number of locals, and stack map frames.
          if (currentBasicBlock != null) {
              if (compute == COMPUTE_ALL_FRAMES || compute == COMPUTE_INSERTED_FRAMES) {
                  currentBasicBlock.frame.execute(opcode, lastBytecodeOffset, typeSymbol, symbolTable);
!             } else if (opcode == Opcodes.NEW || opcode == Opcodes.DEFAULT) {
                  // The stack size delta is 1 for NEW, and 0 for ANEWARRAY, CHECKCAST, or INSTANCEOF.
                  int size = relativeStackSize + 1;
                  if (size > maxRelativeStackSize) {
                      maxRelativeStackSize = size;
                  }

*** 1032,10 ***
--- 1035,13 ---
                  currentBasicBlock.frame.execute(opcode, 0, fieldrefSymbol, symbolTable);
              } else {
                  int size;
                  char firstDescChar = descriptor.charAt(0);
                  switch (opcode) {
+                     case Opcodes.WITHFIELD:
+                         size = relativeStackSize + (firstDescChar == 'D' || firstDescChar == 'J' ? -2 : -1);
+                         break;
                      case Opcodes.GETSTATIC:
                          size = relativeStackSize + (firstDescChar == 'D' || firstDescChar == 'J' ? 2 : 1);
                          break;
                      case Opcodes.PUTSTATIC:
                          size = relativeStackSize + (firstDescChar == 'D' || firstDescChar == 'J' ? -2 : -1);
< prev index next >