Add ref variables

[reviewed by hilde]

This patch adds references via the 'refvar' keyword to the language (to be
replaced by 'ref' in the future). References can only be set once, after
that any reads or writes occur on the referenced variable.

var x = 1;
refvar y = x;
writeln(y); // prints 1
x += 1;
writeln(y); // prints 2
y += 1;
writeln(y); // prints 3
writeln(x); // prints 3

Read-only references can also be created using 'const refvar':

var x = 1;
const refvar y = x;
writeln(y); // prints 1
x += 1;
writeln(y); // prints 2
y += 1; // Error


git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23772 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Promote nbody-blc-ref from a future

r23772 added references to Chapel, so we can remove this future.
nobdy-blc-ref will run as a performance test as well now.


git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23773 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
This test did not follow our specification for extern classes by failing to
declare a struct type that was typedef'd to have the name "_data_set".  This
was caught by my default initialization alterations. [approved by bradc]



git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23774 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Initial reverse-complement implementations

git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23775 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Fix the LLVM build

[trivial, not reviewed]

r23772 broke the build for chpl+llvm this change fixes it.


git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23776 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
"Fix" multilocale memory tracking

[reviewed by Greg and David]

This commit "fixes" (more on the quotes below) multilocale memory
tracking, which has actually been broken since r22257.  The issue is
that we were trying to access strings (logfile names) from a remote
locale from within the runtime during memory tracking initialization
in chpl_memTracking_returnConfigVals().  This bug was mostly masked
because we don't test multilocale memory tracking with explicit
logfiles, but it broke the gasnet configuration on OSX with the big
c_string commit (r23558).

This commit actually abuses a current unexpected behavior in the
compiler where under certain circumstances, strings are copied to
remote locales.  In this specific case, when the locale.id is
accessed, the string is copied from locale 0 to the remote locale, and
can be assigned to a local temporary string which can then be passed
to the runtime.  When the string implementation is revamped using
records, we will simply change the locale.id access to one that checks
here.id.

FYI, Greg will be committing a test that locks in the correct behavior
for multilocale memory tracking.



git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23777 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Add a test for multilocale memory logging.

[Reviewed by Sung.]

We recently discovered that multilocale memory logging hasn't been
working.  Sung just fixed that with r23777.  This commit adds a test to
ensure that we notice if it stops working again.


git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23778 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Turn off work stealing for qthreads

[ok'd by greg and sung]

We have been having some performance regressions with qthreads. Using chameneos
as a case study, it appears that a significant amount of time is spent in the
work stealing routines, especially when the number of tasks < number of
qthreads workers.

This initial commit is to see the performance results of this and any testing
fallout. If this seems to resolve them, we can decide if this is a good default
and if there's cases it shouldn't be the default such as NUMA. We can also
provide a mechanism (execution config and/or function) to allow users to turn
on work stealing if their problem requires load balancing.


Also reverting chap03 to use the default sherwood scheduler again. We were
trying out nemesis because it didn't have work stealing and that seemed to
resolve our performance regressions there. If there are performance hits on
chap03 because of this that means there is additional overhead of using a
scheduler that supports multi-threaded shepherds (default sherwood) vs one that
only supports single-threaded shepherds (like nemesis.)


git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23779 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Add docs with information about git workflow, setup, and git cheat sheet.

The new documents use ReStructured Text markup. This is a forward looking
switch so we can one day publish this type of documentation in html form on the
web.

r: @bradcray

git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23780 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Remove subversion related bestPractices/ docs.

r: @bradcray

git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23781 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Skip RBC benchmark for valgrind testing.

Execution is timing out and it is not clear/simple to reduce the problem size.

Discussed with @vasslitvinov

git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23782 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Update several references to "subversion" to be git or github.

git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23783 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Retire Nightly/weekend as it is no longer used.

Discussed w/ @vasslitvinov

git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23784 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Include string leaks in leaking programs reported.

This patch adds a new option "-show_strings" to the analyzeMemLeaksLog script, which
includes string-related memory descriptors when tallying which programs leak.  
It does not affect the number of bytes reported as leaked.  The difference will be that it
will now list those programs that leak only string-related data, and include them in the
total number of programs that leak.

The nightly cron script was modified to run analyzeMemLeaksLog with the new -show_strings
option..

[tested locally]
[not reviewed]



git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23785 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Fixup qio for error codes, plugin functions

[reviewed by Tim]

I've been meaning for a while to update all the QIO functions to return
qioerr (which Chapel calls syserr) instead of err_t. The qioerr/syserr
is a pointer-to-constant-static data (ie data that is part of the program
image) that can have an error message and now function, filename, line number.
This patch makes the change and improves error messages for many QIO errors.

Also I started to write a QIO plugin myself, and noticed that the plugin
API was not as pleasant to use as I had hoped. So here I refactor it to 
allow the function table to be const static, to store a "filesystem" void*
(called fs_info) in a qio_file, and to pass the fs_info as the last argument
to all of the QIO plugin functions.

Lastly I made a minor change to how QIO plugin files are initialized when
there is no seek function available. Now the file will be marked seekable
if the flags argument requested that. This allows a HDFS use case - where
read-only files are seekable but writeable files are not.

These changes will definately break the HDFS integration, but Tim knows
about them and is planning to fix it.

runtime/include/qio/qio.h
runtime/src/qio/qio.c
 - change plugin API so that qio_file_functions_t can be static const
   and the filesystem is stored in a qio_file and passed to the plugin
   functions.
 - change qio_file_init_usr (called from qio_open_usr) to keep a file
   seekable if QIO_FDFLAG_SEEKABLE is set, even if there is no seek
   function (or the seek failed). Using this flag should be able to remove
   some special-case HDFS code from qio.c


modules/standard/Error.chpl
modules/standard/Buffers.chpl
modules/standard/IO.chpl
 err_t -> syserr (which is the Chapel name for qioerr)

runtime/include/qio/qbuffer.h
runtime/include/qio/bulkget.h
runtime/include/qio/qio_formatted.h
runtime/include/qio/qio_regexp.h
runtime/include/qio/deque.h
runtime/include/qio/qio.h
runtime/src/qio/deque.c
runtime/src/qio/qio.c
runtime/src/qio/regexp/none/fail-regexp.c
runtime/src/qio/regexp/re2/re2-interface.cc
runtime/src/qio/qbuffer.c
runtime/src/qio/bulkget.c
runtime/src/qio/qio_formatted.c
 err_t -> qioerr
 add error messages for most QIO-generated errors

runtime/include/qio/qio_error.h
 add function, file, line to constant error message structure
 (although these are not currently printed out, they might
  be useful in debugging).
 make double-checking of error codes turned off by a #define
 add QIO_ENOMEM, QIO_ESHORT, QIO_EEOF for easy access to
 qioerrs for those common situations.
 
test/
 update error messages that got more descriptive




git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23786 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Enable querying compile-time --[no-]checks setting at execution time.

[Reviewed by Sung.]

Add the const variable CHPL_NO_CHECKS to the compile-time configuration
flags in chpl_compilation_config.h.  This will enable a launcher or user
executable to know at execution time whether --no-checks was thrown at
compile time (including implicitly, due to --fast being thrown).


git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23787 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Change tests with extern prototypes to C library functions to use c_string rather than string



git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23788 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Fix externProcInClassShouldBeError.chpl and change its future messages

This test should have been changed with the proc = signature changes
(no .bad file made it pretty much impossible to spot).

After updating, the test no longer fails in the way it originally did
(internal error).  Not sure what fixed the problem along the way, but
it now fails in a somewhat less confusing way (during C compile), so
I've turned this into an error message future (or maybe it should be a
"warning message" future).



git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23789 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Fix extern_string_test*.chpl and remove .future, .bad, and .prediff

[ok'ed by Michael]

With r23558 (explicit separation between c_string and Chapel string),
it is possible to properly write these test programs that return and
allocate strings.

Removed the .future and .bad files, as well as the .prediff which was
to quiet non-deterministic output of the future.



git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23790 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Change extern prototypes to specify c_string instead of string

[ok'ed by Brad]



git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23791 3a8e244f-b0f2-452b-bcba-4c88e055c3ca