docs: public final void gen(CodeBuilder adapter) {
      boolean shouldClearIsGeneratingBit = false;
      if (Flags.DEBUG && !isGenerating.get()) {
        isGenerating.set(true);
        shouldClearIsGeneratingBit = true;
      }
      try {
        if (location.isKnown()) {
          // These add entries to the line number tables that are associated with the current method.
          // The line number table is just a mapping of bytecode offset (aka 'pc') to line number,
          // http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.7.12
          // It is used by the JVM to add source data to stack traces and by debuggers to highlight
          // source files.
          Label start = new Label();
          adapter.mark(start);
          adapter.visitLineNumber(location.getBeginLine(), start);
        }
  
        doGen(adapter);
  
        if (location.isKnown()) {
          Label end = new Label();
          adapter.mark(end);
          adapter.visitLineNumber(location.getEndLine(), end);
        }
      } finally {
        if (shouldClearIsGeneratingBit) {
          isGenerating.set(false);
        }
      }
    }