Make future-spec tests not spawn threads in constructors.
The future-spec tests were spawning threads in object constructors which
meant they were on the ragged edge of entering deadlock from the static
initialization lock acquired during the static initialization blocks we
use to construct object reference fields. My work on restructuring
lambdas pushed it over the edge. This commit refactors the tests to use
class constructors rather than object constructors.
Add a skeletal Delambdafy phase.
This commit adds a do-nothing phase called "Delambdafy" that will
eventually be responsible for doing the final translation of lambdas
into classes.
SI-7776 post-erasure signature clashes are now macro-aware

"double definition: macro this and method that have same type after erasure"
This error doesn't make sense when macros are involved, because macros
expand at compile-time, where we're not affected by erasure. Moreover,
macros produce no bytecode, which means that we're safe from VerifyErrors.
SI-7634 resurrect the REPL's :sh command

ProcessResult had a companion object in 2.10 that somehow disappeared in
2.11. It only called "new ProcessResult(...)", so the REPL might just as
well do that.
Adds a setting to delay delambdafication. If set then uncurry lifts
the body of a lambda into a local def. Tests are included to show the
different tree shapes.
Refactor Erasure for delambdafication.
This commit is purely a refactor. It pulls code needed to adapt a tree
of one type into a tree of another type (by casting, boxing, coercing,
etc) out of Erasure and into common locations that will be usable
from the Delambdafy phase.
Flesh out the Delambdafy phase.

This commit puts a real body on the Delambdafy phase.

 From a lambda, Delambdafy will create
 1) a static forwarder at the top level of the class that contained
      the lambda
 2) a new top level class that
      a) has fields and a constructor taking the captured environment
(including possbily the "this" reference)
      b) an apply method that calls the static forwarder
      c) if needed a bridge method for the apply method
 3) an instantiation of the newly created class which replaces the
   lambda

Trees.scala is modified to add two more convenient factories
for templates and classdefs.

A few basic tests are included to verify that it works as expected.
Further commits will have additional tests.
Make GenASM not eliminate loadmodule on static methods.
During development of delayed delambdafy there was a problem where
GenASM would eliminate a loadmodule for all methods defined within that
module even if those methods were static. The result would be broken
byte code that failed verification. This commit fixes that and adds a
test.
Make specialization aware of anonymous functions.
During development of late delmabdafying there was a problem where
specialization would undo some of the work done in uncurry if the body
of the lambda had a constant type. That would result in a compiler crash
as when the delambdafy phase got a tree shape it didn't understand.
This commit has a fix and a test.
Create test variants where delambdafication alters signatures.
This commit includes several tests where there's a variation in
signatures between inline delambdafication and method based
delambdafication.
Force several tests to run using inline delambdafication.
The differences when running with method based delambdafication aren't
important enough yet to create specialized versions that use method
based delambdafication.
Merge pull request #3081 from JamesIry/wip_delayed_delambdafy_cleanup

Delay delambdafication and put the lambda's body into the containing class
Merge pull request #3042 from gourlaysama/t7634-repl-sh-is-broken

SI-7634 resurrect the REPL's :sh command
Fast path for ByNameClass in isImpossibleSubtype

These show up often due to the way that searches for
implicit views operate: firstly `A=>B` is sought, and
failing that `(=>A) => B`.
Cache ImplicitInfo#isCyclicOrErroneous

An optimization in implicit search.

ImplicitInfo-s themselves are cached (per-run) in Contexts
(for in-scope implicits) and in Implicits (for companion object
implicits.)
Add a per-run cache for member symbols

We are all used to calls to `definitions.PredefModule`, or
`defintions.Predef_???` to grab the symbol of some well known
entity. But you'll notice that some of these are lazy vals,
and others are defs.

Why is this so? In the presentation compiler, a member like
`Predef.???` will be assigned a new symbol after the user
browses into `Predef.scala`.

Mistakenly using vals in definitions leads to subtle
IDE bugs like SI-7678. We are able to trigger these
situations in tests, as noted in the comments of that issue.

Changing the vals to defs, on the other hand, has a performance
penalty. Some schemes to workaround this have shown up:
cache them per-implicit search, or compare method names and owners
rather than symbols on hot paths in the type checker.

This commit introduces a facility to cache these sort of symbols
per-run, and uses it to check for `Predef.conforms` and
and for the class/type tag materializers.

A followup pull request (WIP: https://github.com/retronym/scala/compare/ticket/7678-2)
will expand the use of to address the widespread and unsafe caching
of member symbols that I found while investigating SI-7678.
SI-7678 Don't cache member symbols of TypeTags in Definitions.

It we can only safely use vals in Definitions for top-level symbols.
Otherwise, when the IDE switches to loading the symbol from source,
we can hold on to a stale symbol, which in turn impedes implicit
materialization of TypeTags.

This commit moves (most) of the accessors for member symbols
into RunDefinitions, and changes calling code accordingly.
This is a win for presentation compiler correctness, and
might even shave of a few cycles.

In a few cases, I have had to leave a `def` to a member symbol
in Definitions so we can get to it from the SymbolTable cake,
which doesn't see RunDefinitions.

The macro FastTrack facility now correctly recreates the mapping
from Symbol to macro implementation each run, using a new facility
in perRunCaches to create a run-indexed cache.

The enclosed test recreates the situation reported in the ticket,
in which TypeTags.scala is loaded from source.
Merge pull request #3101 from xeno-by/ticket/7776

SI-7776 post-erasure signature clashes are now macro-aware
Merge pull request #3092 from retronym/ticket/7678-2

Small implicit optimizations, and SI-7678 RunDefinitions