Add deprecation warning to lock class
SI-7704 Fix partest's test category selection

My recent changes to command line parsing in 6090709 broke partest's
functionality of picking test categories (e. g. --pos or --run).

The breakage was caused because scala.tools.cmd._ stored the command
line options with the `--` prefix, but TestKinds.standardKinds did not.
Add some explicit return types to s.t.c._
Clean up ConsoleRunner, --> returns Boolean ...

... not Unit now.
SI-7265 javaSpecVersion, adjust isJava... tests

Make this and related properties public, because they
are useful.

This change ought to have been committed at 2.11 and then
backported with restrictions, rather than vice-versa.

Note that they are defined in the order, version, vendor
and name, which is the order from the underlying javadoc.

It would be a neat feature of the PR validator, as previously
imagined, to run a "pending" test and then, on success and
merge, to move it automatically to the canonical suite.
Bug fix ! , if $color_opts is unset partest script does not work.
Fix N^2 spot in erasure.

An expression containing nested casts would type the same tree 2^N
times where N is the number of nested casts. This was particularly
visible in Vector.scala where one can find a six-cast expression.
It's currently line "why was six afraid of seven", aka line 789.

  display5((index >> 25) & 31)
    .asInstanceOf[Array[AnyRef]]((index >> 20) & 31)
    .asInstanceOf[Array[AnyRef]]((index >> 15) & 31)
    .asInstanceOf[Array[AnyRef]]((index >> 10) & 31)
    .asInstanceOf[Array[AnyRef]]((index >> 5) & 31)
    .asInstanceOf[Array[AnyRef]](index & 31)
    .asInstanceOf[T]

Compiling Vector.scala, before/after.

  < #unique types                 : 10805
  > #unique types                 : 9722
  < #created tree nodes           : 26716
  > #created tree nodes           : 25647

I found a similar bug about a year ago in 39f01d4f48. It's
interesting to consider how little defense we have against bugs
of this nature - visually non-obvious differences in tree
traversal can have spectacular impact on complexity.
SI-7544 Interpolation message for %% literal

The new error text: "conversions must follow a splice; use %% for
literal %, %n for newline".

The error is emitted when % is not at the start of a part; only
the non-conversions %% and %n are allowed.

It would be nice if it were convenient to parse the part to see
what the user may have intended, but c'est l'erreur.
In tests, interpolation is no longer -Xperimental.
StringContext#checkLengths reports bad args count

Since interpolator args are of type Any, it's easy
to write s(args) instead of s(args: _*).  I wonder
if Xlint would have warned me about that.
Par-Test split checks work again

Check files split into conditional blocks with partest flags
have been broken since the new diff regime.

For some reason, no one noticed.

The clever scheme to "filter the diff" instead of just filtering
the check file is abandoned as futile and unnecessary.

Fix java6 checkfile for ifdiff fix.
SI-7658 Prevent StackOverflowError in ScalaRunTime.stringOf
Remove unused private[scala] def ScalaRunTime.checkZip
warn about uninitialized reads (in constructors), self-contained check

The check in question relies on helper maps and methods that don't
belong outside that check. This commit encapsulates those helpers into
the newly added `checkUninitializedReads()` , thus uncluttering
`transformClassTemplate()`
handling AnyVal special case early on to simplify logic afterwards

This way the contract of `transformClassTemplate()` can focus on
non-AnyVal cases, which are more regular from the perspective of
transforming their templates in the constructors phase.
how stuff works: elision of param-accessor-fields and outer-accessors
eliding what the constructor phase elides but with less effort (1 of 2)

For now both old and new implementations of elision coexist,
allowing cross-checking their results.
In the next commit only the new one will remain.
eliding what the constructor phase elides but with less effort (2 of 2)

Removing the old implementation of elision in constructors
in favor of the new one which is both faster, more readable.
method transformClassTemplate() turned into class TemplateTransformer

Before this commit, each activation of transformClassTemplate()
performed the rewriting that the constructors phase is well-known for.
Lots of auxialiary objects were created in the process,
with lifetime confined to said activation.

The same auxiliary objects (having same lifetimes as before)
also are in effect starting with this commit,
but now it's an instance of TemplateTransformer
that holds them together. In other words,
there's a one-to-one correspondence between:
- (what used to be) transformClassTemplate() activation
- TemplateTransformer initialization

After initialization, the result of TemplateTransformer
can be found in its `transformed` member val.

In fact, the refactoring to get here from the previous commit
basically involves taking the body of method transformClassTemplate()
as-is to become the template of TemplateTransformer.

The TemplateTransformer in question will allow modularizing
sub-transformations (e.g., DelayedInit) into dedicated traits
(see  upcoming commits).
separation of concerns: delayed-init in constructors

This commit modularizes TemplateTransformer by moving a few methods
from TemplateTransformer into the newly added DelayedInitHelper.

The methods in question
- delayedInitCall()
- delayedInitClosure()
- delayedEndpointDef()

build trees that rewriteDelayedInit() puts together.
That way, all trace of rewriting related to delayed-init
have vanished from TemplateTransformer and are encapsulated in
DelayedInitHelper.