code: public static int getFirstRegisterSlot(Method m) {
          Type[] parms = m.getArgumentTypes();
  
          int first = m.isStatic() ? 0 : 1;
          for (Type t : parms) {
              first += getSignatureSize(t.getSignature());
          }
  
          return first;
      }
docs: returns the first open register slot after parameters
  
  @param m
  the method for which you want the parameters
  @return the first available register slot