chapel-lang/chapel — pull request #593 by sungeunchoi (2014-10-01 19:14:49+00:00)
Title: Remove remote string copy

This commit fixes the unexpected behavior where strings are copied to
remote locales if the .locale field is accessed. Long term the one
line fix in insertWideReferences.cpp will go away, but I wanted to use
this as an experiment to see how difficult it would be to use the
NewString module from an internal module. The MemoryTracking module
abused the unexpected behavior of string, and so with this commit I
use the NewString type in MemoryTracking.

With this change, the only remaining instances of when we copy strings
to remote locales is when the string is passed by reference. When the
new string implementation is made the default, this too should go away
(handled in codegen), and the runtime function
chpl_gen_comm_wide_string_get() should be removed.

This commit also changes some test output to include the NewString
module. For test/multilocale/bradc/globalConstRepl.chpl, this
unexpected string behavior was masking an actual bug, so that test was
split into two. The original test removed the string case (so as to
continue testing the rest), and the string case is now a future in
stringConstRepl.chpl.