Update check files for -Ydelambdafy:method

Should have been done in 63207e1.
Fix t8549 under -Ydelambdafy:method

the structure of Option.class generated by delambdafy:method is
slightly different. For example, lambdas declared within Option are
not emitted as nested classes, so under delambdafy:method there's no
inner class entry for anonfun classes.

The test failed because serializing a ClassTag involves serializing an
Option. Option did not have a `@SerialVersionUID`, and the classfile
generated by delambdafy:method has a different value.

The annotation is required on the parent class (Option) as well as the
subclasses (Some / None). De-serializing a Some will fail if Option
has a different SerialVersionUID.

Relates to SI-8576. We should probably have more SVUID annotations in
the library.
Ensure closure elimination test runs under -Ydelambdafy:inline
Ensure delambafy:inline for anonymous function class javap test

https://issues.scala-lang.org/browse/SI-8898
Fix lambda names under delambdafy:method in innerClassAttribute test

This should have been done in 63207e1
SI-8835 Fix implementation of Iterator drop to remove quadratic behavior
SI-8947 Avoid cross talk between tag materializers and reify

After a macro has been expanded, the expandee are expansion are
bidirectionally linked with tree attachments. Reify uses the back
reference to replace the expansion with the expandee in the reified
tree. It also has some special cases to replace calls to macros
defined in scala-compiler.jar with `Predef.implicitly[XxxTag[T]]`.
This logic lives in `Reshape`.

However, the expansion of a macro may be `EmptyTree`. This is the case
when a tag materializer macro fails. User defined macros could do the
also expand to `EmptyTree`. In the enclosed test case, the error
message that the tag materializer issued ("cannot materialize
class tag for unsplicable type") is not displayed as the typechecker
finds another means of making the surrounding expression typecheck.

However, the macro engine attaches a backreference to the materializer
macro on `EmpytyTree`!

Later, when `reify` reshapes a tree, every occurance of `EmptyTree`
will be replaced by a call to `implicitly`.

This commit expands the domain of `CannotHaveAttrs`, which is mixed
in to `EmptyTree`. It silently ignores all attempts to mutate
attachments.

Unlike similar code that discards mutations of its type and position,
I have refrained from issuing a developer warning in this case, as
to silence this I would need to go and add a special case at any
places adding attachments.
SI-8925, SI-7407 test cases, fixed in new backend

Given that the issues are old (2.10) and we move to the new backend
in 2.12, I don't plan to fix them in GenASM.

The test case for 7407 existed already, this commit just adds
`-Yopt:l:none` to the flags to make no dead code is eliminated.
Debugging utility to print ASM instructions
GenBCode: Simplify branching instructions

This commit implements simplifications to branching instructions, for
example `CondJump l; GOTO l` is replaced by `POP; GOTO l`.

The individual optimizations are explained in doc comments.

A later commit will add compiler flags to allow enabling the new
optimizations.
GenBCode: Eliminate redundant labels and line number nodes

Cleanup optimizations
 - remove line number nodes that describe no executable instructions
 - squash sequences of label nodes, remove unreferenced labels

Command-line flags that allow enabling these transformations are added
in a later comimt.
GenBCode: Command-line flags for enabling cleanup optimizations

Add command-line flags `Yopt:...` for simplifying jumps, eliminating
stale line number and label nodes.

`LocalOpt.methodOptimizations` applies all enabled intra-method
optimizations in the right order.

Some cleanups for unreachable code elimination and its tests.
GenBCode: Tests for combined method-level optimizations
GenBCode: Compact local variable slots

After eliminating unreachable code, there may be unused local varaible
slots. Such gaps increase the method's frame size unnecessarily.

The optimization does not attempt to re-use the same local variable
slot for non-overlapping locals (proper register allocation):

    def f(b: Boolean) = if (b) { val x = e; x } else { val y = e; y }

x and y will not use the same slot, even though they could.

This was originally implemented by Miguel in
  https://github.com/lrytz/scala/commit/09c40359338f8770e4f99d045999af062112973e
SI-8922 REPL load -v

Verbose mode causes the familiar prompt and
line echo so you can see what you just loaded.

The quit message is pushed up a level in the
process loop.

This has the huge payoff that if you start the
repl and immediately hit ctl-D, you don't have to
wait for the compiler to init (yawn) before you
get a shell prompt back.
SI-8931 make generic signature consistent with interface list in classfiles

An optimization was introduced in 7a99c03 (SI-5278) to remove redundant
interfaces from the list of implemented interfaces in the bytecode.
However the same change was not propagated to the generic signature
of a class, which also contains a list of direct parent classes and
interfaces.

The JVM does not check the well-formedness of signatures at class
loading or linking (see §4.3.4 of jdk7 jvms), but other tools might
assume the number of implemented interfaces is the same whether one
asked for generic or erased interfaces.

It doesn't break reflection so nobody complained, but it does show:

scala> val c = classOf[Tuple1[String]]
c: Class[(String,)] = class scala.Tuple1

scala> c.getInterfaces // Product is gone
res0: Array[Class[_]] = Array(interface scala.Product1, interface
scala.Serializable)

scala> c.getGenericInterfaces // Product is back!
res1: Array[java.lang.reflect.Type] = Array(scala.Product1<T1>,
interface scala.Product, interface scala.Serializable)

This moves the optimization to erasure, for use in emitting the generic
signature, and the backend calls into it later for the list of
interfaces.
SI-8960 Bring back the SerialVersionUID to anonymous function classes

In PR #1673 / 4267444, the annotation `SerialVersionId` was changed
from a `StaticAnnotation` to `ClassFileAnnotation` in order to enforce
annotation arguments to be constants. That was 2.11.0.

The ID value in the AnnotationInfo moved from `args` to `assocs`, but
the backend was not adjusted. This was fixed in PR #3711 / ecbc9d0 for
2.11.1.

Unfortunately, the synthetic AnnotationInfo that is added to anonymous
function classes still used the old constructor (`args` instead of
`assocs`), so extracting the value failed, and no field was added to
the classfile.
SI-6502 Reenables loading jars into the running REPL (regression in 2.10)

Fixes SI-6502, reenables loading jars into the running REPL
(regression in 2.10). This PR allows adding a jar to the compile
and runtime classpaths without resetting the REPL state (crucial
for Spark SPARK-3257).

This follows the lead taken by @som-snytt in PR #3986, which
differentiates two jar-loading behaviors (muddled by cp):

  - adding jars and replaying REPL expressions (using replay)
  - adding jars without resetting the REPL (deprecated cp,
    introduced require) This PR implements require (left
    unimplemented in #3986)

This PR is a simplification of a similar approach taken by
@gkossakowski in #3884. In this attempt, we check first to make
sure that a jar is only added if it only contains new
classes/traits/objects, otherwise we emit an error. This differs
from the old invalidation approach which also tracked deleted
classpath entries.
SI-6502 Addressing review comments
SI-6502 Addresses @som-snytt's feedback