chapel-lang / chapel

a Productive Parallel Programming Language
https://chapel-lang.org
Other
1.77k stars 417 forks source link

unifying special move initialization functions #15674

Open mppf opened 4 years ago

mppf commented 4 years ago

After #15239, we have now 3 "move" initialization functions that the compiler uses to implement move initialization (these aren't user facing):

It would be nice to clean up this story to avoid having different function names for the different types. For example, could tuples and array slices do what they need to with chpl__coerceMove ?

See also #15676 which asks about move initialization across locales. Combining the issues, we might, for example, have a move initialization function accepting destination (runtime) type and a source locale.

mppf commented 4 years ago

PR #16180 makes some progress in this direction. It removes chpl__unalias and many uses of chpl__unref. It might not be hard to remove also the remaining use of chpl__unref.

mppf commented 4 years ago

A separate (but related) issue is that we still have chpl__initCopy as well as chpl__autoCopy. These differ for tuples and for iterator records IIRC.