Fix for io_test C compilation error.

The error message being displayed by the C compiler (GCC version 4.4.1 or newer) is
meaningful.  It warns that the program is attempting to free something that is not
heap-allocated -- in this case "\n" and the definitions of other ioLiterals.

The reason why the error only appears when --fast is supplied is that aggressive inlining
brings the call to free() into the function where an ioLiteral is passed to it, so under
those circumstances the C compiler can see that something stupid is being attempted.

In the original code, the author thought is was safe to free by explicitly avoiding known
cases where the contents of a c_string was owned by another program entity.  However,
since the IO module also supplies unowned c_strings it is unsafe in general to delete
them.  I added comments liberally to the module code where c_strings are accessed, so
future programmers are warned away from this practice.

Looking forward, except where performance is a concern, strings should be used in
preference to c_strings.  The new implementation of strings will manage memory correctly,
so the programmer who uses such objects need not concern himself with ownership details.
Merge branch 'master' into fixCStrings
Add a primer for array vector operations

This primer walks through the new vector-like capabilities on 1D arrays.
Merge branch 'master' into fixCStrings
Adding a primer for the standard module Random.

This primer intentionally does not include any functionality with Private in
the name.  It also does not include the SeedGenerators record, as that record
only includes our default random generator settings.
Add indication of the new primer to the READMEs
Add Vass's suggestions to the array vector ops primer

Vass reviewed and made a few suggestions, so implemented them here.
Updated comments with new info from c_string interface investigation.
Update arrayVectorOps.good

I forgot to update the .good after adding Vass's suggestions.
Taking Vass's comments into account.
Merge pull request #450 from hildeth/fixCStrings

Fix for io_test C compilation error.



The error message being displayed by the C compiler (GCC version 4.4.1 or newer) is
meaningful. It warns that the program is attempting to free something that is not
heap-allocated -- in this case "\n" and the definitions of other ioLiterals.

The reason why the error only appears when --fast is supplied is that aggressive inlining
brings the call to free() into the function where an ioLiteral is passed to it, so under
those circumstances the C compiler can see that something stupid is being attempted.

In the original code, the author thought is was safe to free by explicitly avoiding known
cases where the contents of a c_string was owned by another program entity. However,
since the IO module also supplies unowned c_strings it is unsafe in general to delete
them. I added comments liberally to the module code where c_strings are accessed, so
future programmers are warned away from this practice.

Looking forward, except where performance is a concern, strings should be used in
preference to c_strings. The new implementation of strings will manage memory correctly,
so the programmer who uses such objects need not concern himself with ownership details.
Merge pull request #445 from daviditen/vectorArrayPrimer

Add a primer for array vector operations

This primer walks through the new vector-like capabilities on 1D arrays.
[reviewed by Vass]
Merge pull request #449 from lydia-duncan/primers

Adding a primer for the standard module Random [reviewed by vass]

This primer intentionally does not include any functionality with Private in
the name. It also does not include the SeedGenerators record, as that record
only includes our default random generator settings.
Report error when writing to const array elements.
Merge pull request #452 from bradcray/re2ByDefault

Building static re2 library only by default

[reviewed by tvandoren, as have most of my other recent re2-related commits]

Prior to this change, we built .a and .so libraries for re2.  This
causes problems for the Cray module build because the .so carries
dependences in the RPM that we don't intend for it to.  Looking
at other third-party packages (qthreads, hwloc), we seem to get
away with building static libraries only, so let's do the same for
re2 to keep things simple.

Unfortunately, implementing this change was not as simple as hoped
since re2 is not an autoconf package (I never thought I'd wish for
an autoconf package).  Its makefiles are hardcoded to build both
the .a and .so, so I changed our first build command to target
the .a directly and then had to add a new install-static command
that only installed the static library, not the .so.  Because re2
lives its life in git as a bundle, this meant tacking a little
Makefile stub onto the end of their Makefile after unpacking (ugh--
maybe we've crossed the barrier where keeping re2 bundled is not
worth the pain anymore?  But I didn't have the guts to make that
change this late in the release cycle).

Tested by clobbering re2, making, inspecting that the .so was not
there and that test/regexp/ferguson/regex.chpl still worked.
Merge pull request #451 from vasslitvinov/array-const-checking

Report error when writing to const array elements.

It is a small change to functionResolution.cpp. I introduced a new pragma flag that says "when the receiver is constant, the result is constant". Then followed the pattern of/relied on const checking that already was in place.

Several tests updated 'const' arrays. I replaced 'const' with 'var' on those arrays.

In one test I used an array literal for initialization of an array, which remained 'const'.

Reviewed by Tom.
Refactoring Makefiles to try and clean them up

[trivial, not reviewed]

Mostly, pushed logic relating to third-party into the
third-party Makefile.  Also make the format of the re2
target more symmetric with others to make the "up-to-date"
message print more nicely.  Moved the build of the optional
packages after the compiler and before the runtime, like
other packages.

I'd hoped that by doing this move, I'd only get the
speculative build message when the build was actually
not already done (by putting the install directory in
as a precondition), but I'd forgotten that that would
change the order in which things were built.  Still,
I think this approach is an improvement on the original.
Making GMP's path more correct on Macs

This is the moral equivalent of what Kyle did in #431, but
for GMP rather than RE2.  Apparently I didn't test closely
enough the other night to notice that the problem occurs
here as well.