chapel-lang/chapel — pull request #43 by noakesmichael (2014-07-22 20:36:42+00:00)
Title: Preliminary "whitespace" cleanup in preparation for tackling a few simple issues with Module uses

This is largely a "whitespace" cleanup in preparation for working on the module use cleanup.

The module use cleanup will be focussed on ModuleSymbol and BlockStmt. This took
me in to symbol.{h,cpp} and stmt.{h,cpp}. For each of these files I added a fragment
of C-style block comments between each major section e.g. between the class declarations
in the header files and the class implementations in the source code files.

In stmt.h and symbol.h

Straightened out the declarations for ModuleSymbol and BlockStmt so that

(a) virtual functions that are declared in parent classes are consistently tagged
as virtual and are grouped together

(b) the constructors/destructors appear first, then the inherited virtual overrides
starting from the base class, and then the new definitions for the class being
defined. For the new class the order is methods and then instance variables.

(c) made some small adjustments for overly long lines where easy to do

I applied this thinking to a few other neighboring classes but I didn't methodically
fix all of them.

Also removed several unnecessary #includes.

In stmt.h moved the definition of enum BlockTag to be adjacent to definition of
class BlockStmt.

In stmt.cpp and symbol.cpp

Altered the syntax used to initialize instance variables for the constructors
for ModuleSymbol and BlockStmt. The original form requires that the initializers
be in the same order as the variable declaration in the class. For these two
classes there does not appear to be any need to use the external initializer form.

For class BlockStmt converted method addUse() to be moduleAddUse() and
removeUse() to be moduleRemoveUse(). I expect to do some work on the
modUses variable and this name change helps to disambiguate uses if
"addUse" and "removeUse" that are associated with the logic for Def/Use
chains.

In main/runpasses.cpp

Noticed that the "timer" for the check/verify step was set up in the
wrong place. This error is only evident when --verify and --print-passes
are used together and it generally a small error compared to the total
runtime.

Most of the remaining changes are for consistency with the method renaming
on BlockStmt

Compiled: clang STD, gnu STD/LLVM
Tested: Passed paratest without --verify
Review: Elliot