[Chapel Merge] Make uses of CPtr private in standard/internal mod

Branch: refs/heads/master
Revision: 0db9200
Author: e-kayrakli
Log Message:

Merge pull request #16451 from e-kayrakli/private-use-cptr

Make uses of CPtr private in standard/internal modules

This PR makes the use of CPtr private in standard/internal modules

There were two roadblocks in detangling the dependencies:

  • ChapelLocale had some code for privatization that created a dependence with
    CPtr. This PR moves that logic into
    modules/internal/ChapelPrivatization.chpl

  • CPtr used ioLiteral that created a dependence with IO. This PR explicitly
    calls readWriteLiteral with a string literal instead to remove that
    dependency. (See https://github.com/chapel-lang/chapel/issues/16449)

We have had some issues in the past w.r.t. undefined call_tmp in trying to do
this. I have seen a similar issue and worked around it by adding some explicit
types in 248147cd88893ddbe22e6d9daf0c57c119f90d62. This PR doesn’t bump into
that issue even if I revert that commit.

[Reviewed by @bradcray]

Test:

  • [x] standard
  • [x] gasnet
  • [x] standard --futures-only

Modified Files:
A modules/internal/ChapelPrivatization.chpl
M modules/internal/ByteBufferHelpers.chpl
M modules/internal/Bytes.chpl
M modules/internal/BytesCasts.chpl
M modules/internal/BytesStringCommon.chpl
M modules/internal/CPtr.chpl
M modules/internal/CString.chpl
M modules/internal/ChapelArray.chpl
M modules/internal/ChapelBase.chpl
M modules/internal/ChapelError.chpl
M modules/internal/ChapelHashtable.chpl
M modules/internal/ChapelLocale.chpl
M modules/internal/ChapelSerializedBroadcast.chpl
M modules/internal/ChapelStandard.chpl
M modules/internal/ChapelSyncvar.chpl
M modules/internal/ChapelTaskData.chpl
M modules/internal/ChapelTaskDataHelp.chpl
M modules/internal/DefaultRectangular.chpl
M modules/internal/ExternalArray.chpl
M modules/internal/String.chpl
M modules/internal/StringCasts.chpl
M modules/packages/BLAS.chpl
M modules/packages/Buffers.chpl
M modules/packages/Crypto.chpl
M modules/packages/Curl.chpl
M modules/packages/DistributedBag.chpl
M modules/packages/FFTW.chpl
M modules/packages/HDF5.chpl
M modules/packages/HDFS.chpl
M modules/packages/LAPACK.chpl
M modules/packages/Prefetch.chpl
M modules/packages/ProtobufProtocolSupport.chpl
M modules/packages/Sort.chpl
M modules/packages/ZMQ.chpl
M modules/standard/DateTime.chpl
M modules/standard/FileSystem.chpl
M modules/standard/GMP.chpl
M modules/standard/IO.chpl
M modules/standard/Path.chpl
M modules/standard/Spawn.chpl
M modules/standard/Sys.chpl
M modules/standard/SysError.chpl
M test/arrays/deitz/rowMajor.chpl
M test/arrays/diten/array_of_c_string.chpl
M test/compflags/ferguson/print-module-resolution.good
M test/deprecated/length.chpl
M test/deprecated/length.good
M test/distributions/ferguson/islayout.chpl
M test/extern/bradc/externNull.chpl
M test/extern/bradc/multidimArrToExtern.chpl
M test/extern/bradc/sparseToExtern.chpl
M test/extern/bradc/sparseToExtern.good
M test/extern/diten/externVoidFnWithArray.chpl
M test/extern/diten/externVoidFnWithArray.good
M test/extern/diten/externVoidFnWithArrayNoUse.chpl
M test/extern/ferguson/array_to_pointer.chpl
M test/extern/ferguson/c-array/c-array-bad-coercion.chpl
M test/extern/ferguson/c-array/c-array-bad-coercion.good
M test/extern/ferguson/c-array/c-array-basic.chpl
M test/extern/ferguson/c-array/c-array-coercions.chpl
M test/extern/ferguson/c-array/c-array-export-proc-error.chpl
M test/extern/ferguson/c-array/c-array-export-proc-error.good
M test/extern/ferguson/c-array/c-array-heap.chpl
M test/extern/ferguson/c-array/c-array-in-record-custom-init.chpl
M test/extern/ferguson/c-array/c-array-in-record-default-init.chpl
M test/extern/ferguson/c-array/c-array-in-struct.chpl
M test/extern/ferguson/c-array/c-array-interop.chpl
M test/extern/ferguson/c-array/c-array-multilocale.chpl
M test/extern/ferguson/c-array/c-array-passing.chpl
M test/extern/ferguson/c-array/c-array-ptr-in-struct.chpl
M test/extern/ferguson/c-array/c-array-ptr-interop.chpl
M test/extern/ferguson/c-array/c-array-record.chpl
M test/extern/ferguson/c-array/c-array-too-big.chpl
M test/extern/ferguson/c-array/c-array-too-big.good
M test/extern/ferguson/c_ptr_casting.chpl
M test/extern/ferguson/c_ptrs.chpl
M test/extern/ferguson/c_void_pointer_cast.chpl
M test/extern/ferguson/c_void_pointer_cast_record.chpl
M test/extern/ferguson/readme_examples.chpl
M test/extern/ferguson/tuple_to_pointer.chpl
M test/extern/fnPtrs/passBadFnsToCChapel-ChapelFcfToC.good
M test/extern/fnPtrs/passBadFnsToCChapel-cPtrToChapel.good
M test/extern/fnPtrs/passBadFnsToCChapel.chpl
M test/extern/fnPtrs/passFnsToC2x.chpl
M test/extern/fnPtrs/passFnsToC2x2.chpl
M test/extern/fnPtrs/passFnsToCChapel.chpl
M test/extern/fnPtrs/passFnsToCChapel2.chpl
M test/extern/fnPtrs/passFnsToCChapel2x.chpl
M test/extern/fnPtrs/storeFnsThenPass.chpl
M test/extern/fnPtrs/storeFnsThenPass2x.chpl
M test/extern/kbrady/extern_array_call.chpl
M test/extern/kbrady/extern_string_type.chpl
M test/extern/kbrady/extern_void_array_call.chpl
M test/extern/passArrays/passViewToExtern.chpl
M test/functions/ferguson/record-const-ref-default-inline.chpl
M test/functions/ferguson/record-const-ref-default.chpl
M test/interop/C/exportArray/exportFuncWithPtr.chpl
M test/interop/C/exportArray/wrapExternArray-copy.chpl
M test/interop/C/exportArray/wrapExternArray-real.chpl
M test/interop/C/exportArray/wrapExternArray.chpl
M test/interop/C/llvm/exportArray/wrapExternArray-copy.chpl
M test/interop/C/llvm/exportArray/wrapExternArray-real.chpl
M test/interop/C/llvm/exportArray/wrapExternArray.chpl
M test/interop/fortran/FortranCallChapel/chapelProcs.chpl
M test/interop/fortran/fortArrayToDRAutomatic/chapelProcs.chpl
M test/interop/fortran/fortArrayToDefaultRectangular/chapelProcs.chpl
M test/interop/fortran/genFortranInterface/chapelProcs.chpl
M test/interop/fortran/multidimArray/chapelProcs.chpl
M test/io/ferguson/remote-error/error.chpl
M test/io/ferguson/remote-error/error2.chpl
M test/io/nspark/print-cptr.chpl
M test/library/packages/Sort/correctness/testMsbRadixSort.chpl
M test/library/standard/Endian/Endian.chpl
M test/library/standard/FileSystem/bharshbarg/filer.chpl
M test/library/standard/FileSystem/bharshbarg/filer.good
M test/library/standard/GMP/studies/gmp-simple-long-inout.chpl
M test/library/standard/Prefetch/test_prefetch.chpl
M test/memory/ferguson/test1.chpl
M test/modules/bradc/printModStuff/foo.good
M test/modules/sungeun/init/printModuleInitOrder.na-none.good
M test/multilocale/ferguson/get-addr-node.chpl
M test/optimizations/parallelAssign/basicDR.chpl
M test/parallel/forall/vass/other/flatten-with-ovar.chpl
M test/runtime/configMatters/comm/cache-remote/atomic3.chpl
M test/runtime/configMatters/comm/cache-remote/seqreread.chpl
M test/runtime/gbt/tasks/idToString.chpl
M test/studies/dedup/dedup-extern.chpl
M test/studies/shootout/k-nucleotide/bharshbarg/knucleotide-associative.chpl
M test/studies/shootout/k-nucleotide/bharshbarg/knucleotide-chaining.chpl
M test/studies/shootout/reverse-complement/bharshbarg/revcomp-buf.chpl
M test/studies/shootout/reverse-complement/bharshbarg/revcomp-line.chpl
M test/studies/shootout/reverse-complement/bharshbarg/revcomp-mark-skip-read-begin.chpl
M test/types/bytes/basic.chpl
M test/types/bytes/factory/basic.chpl
M test/types/bytes/factory/wrongCPtrType.chpl
M test/types/bytes/io/writeread-pattern.chpl
M test/types/bytes/io/writeread-random.chpl
M test/types/cptr/assign_c_nil_to_c_ptr.chpl
M test/types/cptr/c_ptr_c_string.chpl
M test/types/cptr/cfnptr_to_void.chpl
M test/types/cptr/cptr_diff.chpl
M test/types/cptr/is_c_ptr_a_class.chpl
M test/types/cptr/memcpy-etc.chpl
M test/types/cptr/ptr_cast_to_string.chpl
M test/types/cptr/ptr_coerce_to_void_ptr.chpl
M test/types/cptr/ptr_eq.chpl
M test/types/cptr/ptr_neq.chpl
M test/types/records/lydia/offsetNotRecord-array.chpl
M test/types/records/lydia/offsetNotRecord-array.good
M test/types/records/lydia/offsetNotRecord-class.chpl
M test/types/records/lydia/offsetNotRecord-class.good
M test/types/records/lydia/offsetNotRecord-int.chpl
M test/types/records/lydia/offsetNotRecord-int.good
M test/types/records/lydia/offsetNotRecord-sync.chpl
M test/types/records/lydia/offsetNotRecord-sync.good
M test/types/records/lydia/recordOffset-badField.chpl
M test/types/records/lydia/recordOffset-badField.good
M test/types/records/lydia/recordOffset-classField.chpl
M test/types/records/lydia/recordOffset-cstringField.chpl
M test/types/records/lydia/recordOffset-generic.chpl
M test/types/records/lydia/recordOffset-recordField.chpl
M test/types/records/lydia/recordOffset.chpl
M test/types/string/factory/basic.chpl
M test/types/string/factory/wrongCPtrType.chpl
M test/types/string/validation/randomByteEscape.chpl
M test/users/bugzilla/bug794131/bug794131.chpl
M test/users/ibertolacc/void_extern_proc_array.chpl
M test/users/npadmana/bugs/extern_c_ptr_c_int/extern-c-ptr-c-int.chpl
M test/users/npadmana/funcPtrTypeTest/funcPtrType3.chpl
M test/visibility/private/functions/privateOperatorError.good
M test/visibility/private/functions/privateOperatorError2.good

Compare: https://github.com/chapel-lang/chapel/compare/37461635736a...0db920076434