int computeMethodInfoSize() {
        // 2 bytes each for access_flags, name_index, descriptor_index and attributes_count.
        int size = 8;
        // For ease of reference, we use here the same attribute order as in Section 4.7 of the JVMS.
        if (code.length > 0) {
            if (code.length > 65535) {
                throw new JSONException("Method too large: " + symbolTable.className + "." + name + " " + descriptor + ", length " + code.length);
            }
            symbolTable.addConstantUtf8(Constants.CODE);
            // The Code attribute has 6 header bytes, plus 2, 2, 4 and 2 bytes respectively for max_stack,
            // max_locals, code_length and attributes_count, plus the bytecode and the exception table.
            size += 16 + code.length + 2;
            if (stackMapTableEntries != null) {
                symbolTable.addConstantUtf8(Constants.STACK_MAP_TABLE);
                // 6 header bytes and 2 bytes for number_of_entries.
                size += 8 + stackMapTableEntries.length;
            }
        }
        return size;
    }
Returns the size of the method_info JVMS structure generated by this MethodWriter. Also add the
names of the attributes of this method in the constant pool.

@return the size in bytes of the method_info JVMS structure.
core/src/main/java/com/alibaba/fastjson2/internal/asm/MethodWriter.java