[Chapel Merge] Improve readLine

Branch: refs/heads/main
Revision: 75d1abc
Author: mppf
Link: Improve readLine by mppf · Pull Request #20018 · chapel-lang/chapel · GitHub
Log Message:

Merge pull request #20018 from mppf/readLine-improvements

Improve readLine

Follow-up to #19937

  • improve size checking
  • figure out line size in channel buffer
  • better optimize to avoid copying the contents of the line

Reviewed by @e-kayrakli and @ShreyasKhandekar - thanks!

  • full local testing

    Modified Files:
    A test/io/readLine/readLineArrayBoundary.chpl
    A test/io/readLine/readLineArrayBoundary.good
    A test/io/readLine/readLineBytesBoundary.chpl
    A test/io/readLine/readLineBytesBoundary.good
    A test/io/readLine/readLineStringBoundary.chpl
    A test/io/readLine/readLineStringBoundary.good
    M modules/internal/BytesStringCommon.chpl
    M modules/standard/IO.chpl
    M runtime/include/qio/qio.h

    Compare: Comparing d69c6f8a4ae1...75d1abc5c118 · chapel-lang/chapel · GitHub