docs: public int addFunction(FunctionNode fnNode) {
          if (fnNode == null) codeBug();
          if (functions == null)
              functions = new ArrayList<FunctionNode>();
          functions.add(fnNode);
          return functions.size() - 1;
      }