Begin to relocate creation of the Module initialization function


Currently the parser inserts a clumsy version of the Module initFunction
into almost every module.  The goal is to perform this operation at the
start of the normalize().

The challenge in moving this operation is that there is code in several
passes that assumes that the modules have the initFunction.  This code
needs to be modified to implement the same business logic after this
migration.

I am breaking this motion in to several steps to reduce the amount of code
that needs to be reviewed at each step.



This step has the modest task of adding the initialization function at the
start of scopeResolve().



1) compiler/AST/build.{h,cpp}

Remove the definition of void createInitFn(ModuleSymbol* mod) and the
invocation of the function from buildModule.

Alter addPragmaFlags so that it no longer tries to propagate the
FLAG_EXPORT_INIT flag to the module initFunction.  This update will
be performed when the initFunction is created.

Also some #include cleanup in build.h and some trivial reformatting.




2) compiler/AST/type.cpp

Update the definition of initTheProgram to (a) avoid adding an
initFunction (b) to insert the use statement in to the module block
rather than the initFunction (c) insert the class definition for
Object in to the module body rather than the initFunction

Also some trivial reformatting for long arglists




3) compiler/passes/checkParsed.cpp

   a) check_parsed_var verified that any config vars were located
      with the initFn.  Changed this to ensure these are at the
      top level of the Module

   b) added a new top-level function checkModule.  This function
      scans each module and complains if there is a return or yield
      at the top-level of a chapel file

      Historically this test was performed while scanning the initFunction.

   c) Finally renamed the internal functions with underscores in their names
      to the more standard camel case.




4) compiler/passes/scopeResolve.cpp

Installed a new function insertModuleInit() that inserts an initFunction
into every module (other than root) and then propagates the EXPORT_INIT
flag if present.




Compiled:   STD on clang   STD/LLVM on gcc

Tested:     Several small tests with visual inspection of ASTs
            paratest

Review:     Tom






git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23863 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Don't force QT_WORKER_UNIT=core with the nemesis thread scheduler.

[Reviewed by Elliot.]

We limit the #workers to no more than the #PUs (hyperthreads) in
qthreads.  But we also tell qthreads to distribute the workers onto
processor cores, not PUs.  This creates a conflict when the #workers is
greater than the #cores.  The regular qthreads thread scheduler is okay
with this, but the nemesis scheduler gripes about it.  So, if we're
using the nemesis scheduler, don't force worker distribution onto the
cores, just let qthreads do what it wants in this case.

This is an adjustment to r23836, and should be removed when that commit
is removed.


git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23864 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Do some cleaning up.

[Not reviewed.]

There are three changes here:
- Change chpl_localeID to chpl_nodeID.  We changed the name of this
  global variable many months ago.  We missed these uses, and were not
  reminded of them because they occur in debug code and we don't build
  qthreads with that enabled.
- Change some <TAB> characters to spaces.
- Fix some indentation.  The r23836 changes indented by 2 columns, but
  qthreads uses 4-space indentation.


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