(
final int opcode,
final String owner,
final String name,
final String descriptor,
final boolean isInterface)
| 1026 | } |
| 1027 | |
| 1028 | @Override |
| 1029 | public void visitMethodInsn( |
| 1030 | final int opcode, |
| 1031 | final String owner, |
| 1032 | final String name, |
| 1033 | final String descriptor, |
| 1034 | final boolean isInterface) { |
| 1035 | lastBytecodeOffset = code.length; |
| 1036 | // Add the instruction to the bytecode of the method. |
| 1037 | Symbol methodrefSymbol = symbolTable.addConstantMethodref(owner, name, descriptor, isInterface); |
| 1038 | if (opcode == Opcodes.INVOKEINTERFACE) { |
| 1039 | code.put12(Opcodes.INVOKEINTERFACE, methodrefSymbol.index) |
| 1040 | .put11(methodrefSymbol.getArgumentsAndReturnSizes() >> 2, 0); |
| 1041 | } else { |
| 1042 | code.put12(opcode, methodrefSymbol.index); |
| 1043 | } |
| 1044 | // If needed, update the maximum stack size and number of locals, and stack map frames. |
| 1045 | if (currentBasicBlock != null) { |
| 1046 | if (compute == COMPUTE_ALL_FRAMES || compute == COMPUTE_INSERTED_FRAMES) { |
| 1047 | currentBasicBlock.frame.execute(opcode, 0, methodrefSymbol, symbolTable); |
| 1048 | } else { |
| 1049 | int argumentsAndReturnSize = methodrefSymbol.getArgumentsAndReturnSizes(); |
| 1050 | int stackSizeDelta = (argumentsAndReturnSize & 3) - (argumentsAndReturnSize >> 2); |
| 1051 | int size; |
| 1052 | if (opcode == Opcodes.INVOKESTATIC) { |
| 1053 | size = relativeStackSize + stackSizeDelta + 1; |
| 1054 | } else { |
| 1055 | size = relativeStackSize + stackSizeDelta; |
| 1056 | } |
| 1057 | if (size > maxRelativeStackSize) { |
| 1058 | maxRelativeStackSize = size; |
| 1059 | } |
| 1060 | relativeStackSize = size; |
| 1061 | } |
| 1062 | } |
| 1063 | } |
| 1064 | |
| 1065 | @Override |
| 1066 | public void visitInvokeDynamicInsn( |
no test coverage detected