chapel-lang/chapel — pull request #107 by hildeth (2014-08-04 05:35:22+00:00)
Title: Fix replicateGlobalWrappedRecordVars()

The existing implementation of replicateGlobalRecordWrappedVars() was written so that it
would skip the first block of the module initialization function when looking for the
definition of a global record-wrapped variable. I modified the function to also look in
the first block.

The old version worked because by accident all the definitions of interest lay in blocks
following the first. However, as part of the implementation of calling user default
constructors, I moved the initialization code for variables closer to where the variables
are declared. In some cases, this resulted in interesting initialization code ending up
in the first block.

The change also made the total allocated memory in shannon/printFinalMemStat.chpl go down
by 64 bytes in the no-local case. So I updated the .good file for that test.

[tested: / (std)]