GenBCode version of "not eliminate loadmodule on static methods."

f27f2d80d759130597b652d6cc9d789f8c472e5a modifies GenASM, we follow suite here,
making test/files/run/static-module-method.scala pass under GenBCode.
there's a reason for this code in GenBCode

aced32d05c97651534f468bc9a475ea5f6ae75b8 removed unused code,
along with code that populates a cache with entries needed
in some program runs. I'm re-adding the latter.
removing dead code in BCodeSyncAndTry
overzealous assert in GenBCode

The assert in question was aimed at ruling out
gotos (ie "jumping-applys") in actual argument position
of a jumping-apply.

But the assert in question went overboard
to also rule out a LabelDef in actual argument position.

This commit removes the assert in question altogether.

The unwanted behaviors, and only those, are rule out by
the test added in this commit and the existing tests for SI-6089.

See also https://issues.scala-lang.org/browse/SI-7749
Improvements to partest-ack, plus partest-paths.

I noticed partest-ack was not finding all matching tests, and
fixed that. Also cleaned up the ack options so they're understood
by the latest version of ack.

Along the way I broke the canonicalization functionality out into its
own script so it can easily be used from other places.
SI-8017 Value class awareness for -Ydelamdafy:method

The delambdafy creates a bridge method which requires adaptation
of the result type to the generic `Object`, which is the erased
return type of FunctionN.

This bridge building reused some code from erasure, now refactored
into TypeAdaptingTransformer.

But, it was running into problems with:

    class C(a: Int) extends AnyVal
    (x: Any) => new C(0)

It created (forgive the pseudo quasiquote syntax):

    class anonfun$ extends Function1[Any, C] {
       def apply#1(a: Object): Int = 0
       <bridge> def apply#2(a: Object): Object = {
         val result: Int = apply#1(a)
         ${adapt(Ident("result"), ObjectType)}
       }
    }

This resulted in primitive boxing, rather than value class boxing.

Instead, we need the call to the main apply method to be typed
as `ErasedValueClass(C, Int)`, which `adapt` takes as a trigger
to perform value class boxing.

Finally, we have to run the post-erasure transformer over the adapted
tree to eliminate remnants of `ErasedValueClass` from the types of
trees.
Merge pull request #3273 from paulp/pr/ack

Improvements to partest-ack, plus partest-paths.
SI-7897, SI-6675 improves name-based patmat

This emerges from a recent attempt to eliminate pattern matcher
related duplication and to bake the scalac-independent logic
out of it. I had in mind something a lot cleaner, but it was
a whole lot of work to get it here and I can take it no further.

Key file to admire is PatternExpander.scala, which should
provide a basis for some separation of concerns.

The bugs addressed are a CCE involving Tuple1 and an imprecise
warning regarding multiple pattern crushing.

Editorial: auto-tupling unapply results was a terrible idea which
should never have escaped from the crib. It is tantamount to
purposely throwing type safety down the toilet in the very place
where people need type safety the most. See SI-6111 and SI-6675 for
some other comments.
SI-7850 CCE in patmat with invalid isEmpty.

Name-based pattern matcher needed some hardening against
unapply methods with the right name but wrong types. Only
isEmpty methods which return Boolean are acceptable.
Catching it directly rather than indirectly also allowed
for better error messages.
removing defensive code made obsolete by existing fix to SI-5604

SI-5604 was fixed in commit e6f10b07d44f0ddde26246b4a41527a84eede81c
overzealous assert in BCodeBodyBuilder rejected throw null
SI-8047 change fresh name encoding to avoid owner corruption

Previously a following encoding was used to represent fresh
names that should be created at runtime of the quasiquote:

  build.withFreshTermName(prefix1) { name$1 =>
    ...
      build.withFreshTermName(prefixN) { name$N =>
        tree
      }
    ...
  }

It turned out that this encoding causes symbol corruption when
tree defines symbols of its own. After being spliced into anonymous
functions, the owner chain of those symbols will become corrupted.

Now a simpler and probably better performing alternative is
used instead:

  {
    val name$1 = universe.build.freshTermName(prefix1)
    ...
    val name$N = universe.build.freshTermName(prefixN)
    tree
  }

Here owner stays the same and doesn’t need any adjustment.
Use t- prefix instead of si- prefix for test files
SI-6120 Suppress extra warnings

This is a mere polish for the fix to allow multiple warnings.

Sensibility checks in refchecks were shown to be redundant.

This commit includes a mild refactor to reduce tabbage, and
uses a local var to flag that a warning has already been emitted.

It would be better to have the checks return true if warned,
to facilitate `nonSensically || unrelatedly`, etc., but that's
a lot of `else false`.

The check files that were updated with the redundant warnings
are reverted.
Merge pull request #3236 from xeno-by/topic/wildbox-macros

(2.11.0-M8) whitebox macros are now first typechecked against outerPt
duplicates macro arguments before expansion

As discussed with Jason, this is an important dimension of defenses that
we can build to ensure robustness of the macro engine.

This commit is important in the context of the upcoming patch to the
presentation compiler that will throw away expansions and keep original
macro applications (only when run in presentation compiler mode) so that
hyperlinking in macro arguments starts working in the IDE.

Duplication of macro arguments will make sure that macro arguments, which
are going to become exposed to the IDE, can’t become corrupted by possibly
misbehaving or misguided macros.
Dotless type application for infix operators.

When you have an aesthetic expresion like

  def f(xs: Iterator[Int]) = (
    xs takeWhile (_ < 1000)
             map (_ * -1)
          filter (_ % 2 == 0)
         flatMap (x => List(x, x))
    reduceOption (_ + _)
           maxBy (_.toString)
  )

And then for whatever reason you have to perform explicit
type application in the midst of that expression, it's
aggravating in the extreme that it has (had) to be rewritten
in its entirety to accommodate that change.

So now you can perform type application in the middle of it.

For reasons not entirely clear to me postfix operators are
excluded. The discussion as well as the approval for the infix
variation of it can be found at:
  https://groups.google.com/forum/#!msg/scala-language/eJl1wnkEz9M/hR984-lqC5EJ
Test demonstrating SI-8085

* The presentation compiler sourcepath is now correctly set-up.
* Amazingly enough (for me at least), the outer import in the
  package object seem to be responsible of the faulty behavior.
  In fact, if you move the import clause *inside* the package object,
  the test succeed!
  The test's output does provide the correct hint of this:

```
% diff /Users/mirco/Projects/ide/scala/test/files/presentation/t8085-presentation.log /Users/mirco/Projects/ide/scala/test/files/presentation/t8085.check
@@ -1,3 +1,2 @@
 reload: NodeScalaSuite.scala
-prefixes differ: <empty>.nodescala,nodescala
-value always is not a member of object scala.concurrent.Future
+Test OK
```

Notice the ``-prefixes differ: <empty>.nodescala,nodescala``. And compare
it with the output when the import clause is placed inside the package
object:

```
% diff /Users/mirco/Projects/ide/scala/test/files/presentation/t8085-presentation.log /Users/mirco/Projects/ide/scala/test/files/presentation/t8085.check
@@ -1,4 +1,2 @@
 reload: NodeScalaSuite.scala
-reload: NodeScalaSuite.scala
-open package module: package object nodescala
 Test OK
```

Notice now the ``-open package module: package object nodescala``!
SI-8085 Fix BrowserTraverser for package objects

A source file like:

    import foo.bar
    package object baz

Is parsed into:

    package <empty> {
       import foo.bar
       package baz {
          object `package`
       }
    }

A special case in Namers compensates by adjusting the owner of
`baz` to be `<root>`, rather than `<empty>`.

This wasn't being accounted for in `BrowserTraverser`, which
underpins `-sourcepath`, and allows the presentation compiler to
load top level symbols from sources outside those passes as
the list of sources to compile.

This bug did not appear in sources like:

    package p1
    package object p2 { ... }

... because the parser does not wrap this in the `package <empty> {}`

This goes some way to explaining why it has gone unnoticed for
so long.
Merge pull request #3282 from retronym/ticket/8085

 Fix BrowserTraverser for package objects