[Chapel Merge] `weakPointer` prototype implementation

Branch: refs/heads/main
Revision: 14552bc45a88263243850f88954233bec166c84a
Author: Jeremiah Corrado
Link: `weakPointer` prototype implementation by jeremiah-corrado · Pull Request #20918 · chapel-lang/chapel · GitHub
Log Message:

started WeakPointer implementation
This is a prototype implementation for a weakPointer type. See [Feature Request] - a weak-pointer type for `shared` Objects · Issue #20894 · chapel-lang/chapel · GitHub for some background. So far, the interface is reasonably complete. I've implemented more methods than we'd probably want to keep in the final design. For example, there are currently two ways to construct a weakPointer from a shared class (mySharedClass.downgrade() and new weakPointer(mySharedClass)). We may not want both? We also might want to rename some of the methods/fields. The implementation itself is mostly in place but there are some bugs yet to be worked out. (Neither of the tests are currently passing). I'm creating a draft PR now to make it easier to collect feedback.
Compare: Comparing 694c222d0375898b7fdee1d55e21d757b8483f30...14552bc45a88263243850f88954233bec166c84a · chapel-lang/chapel · GitHub
Diff: https://github.com/chapel-lang/chapel/pull/20918.diff
Modified Files:
.github/workflows/email.yml,compiler/AST/checkAST.cpp,compiler/AST/primitive.cpp,compiler/include/misc.h,compiler/include/resolution.h,compiler/llvm/clangUtil.cpp,compiler/parser/parser.cpp,compiler/passes/checkResolved.cpp,compiler/resolution/functionResolution.cpp,compiler/resolution/preFold.cpp,compiler/util/misc.cpp,doc/rst/meta/builtins/index.rst,frontend/include/chpl/resolution/copy-elision.h,frontend/include/chpl/uast/prim-ops-list.h,frontend/lib/framework/Context.cpp,frontend/lib/immediates/num.cpp,frontend/lib/resolution/VarScopeVisitor.cpp,frontend/lib/resolution/VarScopeVisitor.h,frontend/lib/resolution/call-init-deinit.cpp,frontend/lib/resolution/copy-elision.cpp,frontend/lib/resolution/prims.cpp,frontend/lib/resolution/split-init.cpp,frontend/test/resolution/CMakeLists.txt,frontend/test/resolution/testSplitInit.cpp,modules/internal/ChapelArray.chpl,modules/internal/ChapelBase.chpl,modules/internal/ChapelDomain.chpl,modules/internal/ChapelRange.chpl,modules/internal/SharedObject.chpl,modules/internal/String.chpl,modules/internal/fixInternalDocs.sh,modules/packages/Buffers.chpl,modules/packages/Crypto.chpl,modules/packages/Curl.chpl,modules/packages/HDFS.chpl,modules/packages/Socket.chpl,modules/standard/AutoMath.chpl,modules/standard/BigInteger.chpl,modules/standard/ChapelIO.chpl,modules/standard/FileSystem.chpl,modules/standard/IO.chpl,modules/standard/OS.chpl,modules/standard/Subprocess.chpl,modules/standard/Sys.chpl,modules/standard/SysBasic.chpl,modules/standard/Types.chpl,test/classes/delete-free/swap-managed.good,test/compflags/ferguson/print-module-resolution.good,test/deprecated/SysBasic/chapel_specific_errors.good,test/deprecated/SysBasic/qio_err_t.good,test/domains/sungeun/rect/expand.chpl,test/domains/sungeun/rect/expand.good,test/domains/sungeun/rect/exterior.chpl,test/domains/sungeun/rect/exterior.good,test/domains/sungeun/rect/interior.chpl,test/domains/sungeun/rect/interior.good,test/domains/sungeun/rect/translate.chpl,test/domains/sungeun/rect/translate.good,test/domains/sungeun/rect/translate_illegal.good,test/functions/diten/unary_uint64_param_minus.good,test/functions/ferguson/type-colon-dispatch.chpl,test/gpu/native/studies/shoc/triadchpl.chpl,test/gpu/native/studies/shoc/triadchpl.good,test/gpu/native/studies/shoc/triadchpl.gpu-keys,test/io/sungeun/ioerror.chpl,test/library/packages/Crypto.skipif,test/library/packages/Crypto/blowfish/bfTest1.good,test/library/packages/Crypto/blowfish/bfTest2.good,test/library/packages/Socket.skipif,test/library/packages/Socket/ipv6/connect_timeout_ipv6.chpl,test/library/packages/Socket/ipv6/udpio_ipv6.chpl,test/library/standard/Types/copyable-sync-string.bad,test/library/standard/Types/copyable-sync-string.chpl,test/library/standard/Types/copyable-sync-string.good,test/modules/bradc/printModStuff/foo.good,test/optimizations/deadCodeElimination/elliot/countDeadModules.comm-ofi.good,test/optimizations/deadCodeElimination/elliot/countDeadModules.comm-ugni.good,test/optimizations/deadCodeElimination/elliot/countDeadModules.good,test/studies/dedup/dedup-extern.skipif,test/studies/dedup/dedup-externblock.skipif,test/trivial/deitz/coerce-assign/plusassign.chpl,test/trivial/deitz/coerce-assign/plusassign_error.good,test/trivial/deitz/integers/negate_uint32.good,test/trivial/deitz/type-param-mod-config/type_select1-handcode.good,test/types/coerce/allNumericsBinary.chpl,test/types/coerce/allNumericsBinaryBigParam.chpl,test/types/coerce/allNumericsBinaryBigParamParam.chpl,test/types/coerce/allNumericsBinaryParam.chpl,test/types/coerce/allNumericsBinaryParamParam.chpl,test/types/coerce/allNumericsBinaryRealImagComplex-compiles.chpl,test/types/coerce/allNumericsBinaryRealImagComplex-errors.chpl,test/types/coerce/allNumericsBinaryRealImagComplex-errors.good,test/types/coerce/allNumericsUnaryRealImagComplex.chpl,test/types/coerce/ferguson/coercion-dispatch-minimal-modules.good,test/types/imag/opequals2.1.good,test/types/imag/opequals2.2.good,test/types/sync/lydia/arrayOfArrayOfSyncsInField.bad,test/users/ferguson/err_tmp.chpl,test/visibility/except/operatorsExceptions/exceptNegation.good,tools/mason/MasonUtils.chpl,util/buildRelease/smokeTest,util/devel/lookForTabs,util/devel/lookForTrailingSpaces

Added Files:
frontend/test/resolution/testCopyElision.cpp,test/classes/weakPointers/COMPOPTS,test/classes/weakPointers/concurrentUpgrades.chpl,test/classes/weakPointers/concurrentUpgrades.good,test/classes/weakPointers/initWeakPtr.chpl,test/classes/weakPointers/initWeakPtr.good,test/classes/weakPointers/passiveCache.chpl,test/classes/weakPointers/passiveCache.good,test/domains/sungeun/rect/translate_illegal.prediff,test/extern/ExternBlockClangError.chpl,test/extern/ExternBlockClangError.compopts,test/extern/ExternBlockClangError.good,test/extern/ExternBlockClangError.skipif,test/library/packages/Crypto/blowfish.skipif,test/param/ferguson/inf-nan-narrowing.chpl,test/param/ferguson/inf-nan-narrowing.good,test/trivial/deitz/coerce-assign/plusassign_error.prediff,test/types/coerce/allNumericsBinaryWithGeneric.chpl,test/types/coerce/allNumericsBinaryWithGeneric.good,test/types/coerce/allNumericsUnaryRealImagComplexWithGeneric.chpl,test/types/coerce/allNumericsUnaryRealImagComplexWithGeneric.good,test/types/coerce/coerce-vs-generic.chpl,test/types/coerce/coerce-vs-generic.good,test/types/imag/opequals2.prediff,test/types/sync/lydia/arrayOfArrayOfSyncsInField.prediff,test/visibility/private/moduleSymbols/transitiveUsePrivate.bad,test/visibility/private/moduleSymbols/transitiveUsePrivate.chpl,test/visibility/private/moduleSymbols/transitiveUsePrivate.future,test/visibility/private/moduleSymbols/transitiveUsePrivate.good

Removed Files: