docs: Statement detachLimited(AppendableExpression appendable) {
      if (!appendable.supportsSoftLimiting()) {
        return appendable.toStatement();
      }
      final Label reattachPoint = new Label();
      final SaveRestoreState saveRestoreState = variables.saveRestoreState();
  
      Statement restore = saveRestoreState.restore();
      int state = addState(reattachPoint, restore);
      final Expression isSoftLimited = appendable.softLimitReached();
      final Statement returnLimited = returnExpression(MethodRef.RENDER_RESULT_LIMITED.invoke());
      final Statement saveState =
          stateField.putInstanceField(thisExpr, BytecodeUtils.constant(state));
      return new Statement() {
        @Override
        protected void doGen(CodeBuilder adapter) {
          isSoftLimited.gen(adapter);
          adapter.ifZCmp(Opcodes.IFEQ, reattachPoint); // if !softLimited
          // ok we were limited, save state and return
          saveRestoreState.save().gen(adapter); // save locals
          saveState.gen(adapter); // save the state field
          returnLimited.gen(adapter);
          // Note, the reattach point for 'limited' is _after_ the check.  That means we do not
          // recheck the limit state.  So if a caller calls us back without freeing any buffer we
          // will print more before checking again.  This is fine, because our caller is breaking the
          // contract.
          adapter.mark(reattachPoint);
        }
      };
    }