Ensure night.update-repo tries to update ~/chapel.

git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23734 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Ensure one of the CPU modules is loaded before running whitebox tests.

Otherwise chpl_arch.py spits out a million warnings, literally.

git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23735 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Move the creation of runtime types and routines into resolution proper.

The main purpose of this patch is to move the creation of runtime types and the
resolution of the associated functions (chpl__buildArrayRuntimeType,
chpl__buildDomainRuntimeType() and chpl__convertRuntimeTypeToValue()) ahead of
the call to removeUnusedFunctions().  This is in anticipation of adding a clause
to replaceInitPrims() called by insertRuntimeInitTemps(), to resolve PRIM_INIT
primitives added to perform default initialization.  This in turn will provide
an implementation for user default constructor calls.

This patch also contains factorings and modifications that enabled moving the
runtime type implementation earlier in the resolution pass.


DETAILS
[all changes and line numbers are in functionResolution.cpp]

The calls used to create runtime types
   insertRuntimeTypeTemps();
   buildRuntimeTypeInitFns();
   replaceValuesWithRuntimeTypes();
   replaceReturnedValuesWithRuntimeTypes();
   insertRuntimeInitTemps();
were consolidated and placed in the function handleRuntimeTypes().  These calls
were removed from pruneResolvedTree(), and instead handleRuntimeTypes() is
called in resolve() as the last call before the call to pruneResolvedTree().
This makes it clear that the implementation of runtime types is part of
resolution, and not part of post-resolution cleanup.

6646: Previously, the method token was removed when a virtual function call was
replaced by a PRIM_VIRTUAL_METHOD_CALL primitive.  For consistency, this method
token is now left in the list of actual arguments, so the same code can be used
in removeParamArgs().

6737: Rewrote for clarity.

6828: Rearranged the order of some calls in pruneResolvedTree().  Removed calls
related to runtime types and placed them in handleRuntimeTypes().

6865: Removed the comment related to type functions.  Type functions are handled
separately.

6875: Added a clause to ignore runtime type values, in support of code motion.

6899: Rearranged the code for clarity and added comments.  Added a clause to
ignore runtime type values, required as a result of moving the runtime type
handling up.

7002: Added a clause to ignore runtime type values, required by code motion.
This permitted removal of a similar clause in the same routine.

7034: Rewrote most of removeRandomCalls() as removeParamArgs().  Instead of
removing param args, type variable args and method tokens piecemeal, and
separately for formal and actual arguments, they are now all removed in the same
routine.  The invariant expected by for_formals_actuals -- that the number of
formal and actual arguments match -- was broken across many calls in
pruneResolvedTree(), and this made the handling of runtime types unnecessarily
complex, and too dependent upon the order in which these cleanup functions were
called.  Consolidating the removal of these arguments (both formal and actual)
in one place allowed the invariant to be preserved both before and after this
call.  Once the functions for handling runtime types were fixed up to obey the
invariant, it was possible to move them earlier in the resolution pass.  7065:
Note that the code previously added to handle virtual method calls has been
consolidated with the case for normal calls, because the use of
for_formals_actuals is enabled.  The kernel of removeRandomPrimitives() was
factored out as removeRandomPrimitive().

7163: Added a clause to ignore unresolved functions, so buildRuntimeInitFns()
could be moved ahead of removeUnusedFunctions().  Factored out
buildRuntimeInitFn().  Added lots of comments to clarify what this function is
doing.

7266: removeMethodTokenFormals() is moot, its function is now performed by
removeParamArgs().  Ditto for removeInstantiatedParamFormals().  Rewrote
replaceTypeArgsWithFormalTypeTemps() for clarity and added comments.

7372: Added a test to ensure we replace PRIM_INIT primitives only in functions
that have been resolved -- permitting this function to appear before
removeUnusedFunctions().

[tested on / (--verify)]
[reviewed by lydia]
[clean built and smoke-tested prior to checkin]


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