Branch: refs/heads/main
Revision: a90b7d9
Author: benharsh
Link: Reduce IO operator usage with ioLiteral and ioNewline by benharsh · Pull Request #20442 · chapel-lang/chapel · GitHub
Log Message:
Merge pull request #20442 from benharsh/reduce-io-op-usage-literal
Reduce IO operator usage with ioLiteral and ioNewline
This PR replaces a number of uses of the IO operator (<~>
) with calls to channel._readLiteral
and channel._writeLiteral
, and their newline counterparts. These methods are no-doc'd draft versions of those proposed in #19487 and their names are subject to change. The relevant changes are generally fall under the following patterns:
- <~> becoming
f._readLiteral
- <~> becoming
f._writeLiteral
- <~> becoming a wrapper for a nested
rwLiteral
function that handles both reads and writes - Replacing some uses of
readIt
withf._readLiteral
Some convenient cleanup tasks were done at this time:
- Removed an old, unused, untested branch of
chpl_serialReadWriteRectangularHelper
- Simplified the literal constants in
_tuple._readWriteHelper
- Some
var
s becomingconst
- bug fix for default readThis implementation for unions
[reviewed-by @lydia-duncan]
Modified Files:
A test/types/unions/union-readWrite.chpl
A test/types/unions/union-readWrite.good
M modules/dists/HashedDist.chpl
M modules/internal/DefaultAssociative.chpl
M modules/internal/DefaultRectangular.chpl
M modules/packages/LinkedLists.chpl
M modules/standard/ChapelIO.chpl
M modules/standard/DateTime.chpl
M modules/standard/IO.chpl
M modules/standard/List.chpl
M modules/standard/Map.chpl
M modules/standard/Time.chpl
M test/io/ferguson/readThis/readclass.chpl
M test/io/ferguson/readThis/readclass2.chpl
M test/io/ferguson/readThis/readclass3.chpl
M test/io/ferguson/recordeof.chpl
M test/io/recordio.chpl
M test/io/recordio.good
Compare: https://github.com/chapel-lang/chapel/compare/b9be8341e69b...a90b7d981f58