Merge pull request #1151 from scalamacros/topic/cleanup

more cleanup in Macros.scala
Merge remote-tracking branch 'origin/2.10.x' into merge-210

# By Eugene Burmako (12) and others
# Via Paul Phillips (4) and others
* origin/2.10.x:
  Fixes SI-6236.
  Fixes SI-6189.
  Hunting down eliminable :: allocations.
  Absolutize tools.nsc => scala.tools.nsc.
  more cleanup for typedMacroBody
  shaves more than 150 lines off typedMacroBody
  Optimization in SubstMap.
  removes dead code
  pull request feedback
  more macro cleanup
  further cleanup of transformTypeTagEvidenceParams
  macroImplSigs => macroImplSig
  Dominik's comments on api.Mirrors
  phaseId(currentPeriod) >= erasurePhase.id
  materializeImplicit and implicitsOfExpectedType
  cleanup of reflection- and macro-related stuff
  adds the `skipPackage` attribute to Scaladoc
  Fixes backend crash due to incorrect consumedTypes
  Fix SI-6208.  mutable.Queue now returns mutable.Queue for collection methods rather than MutableList.
Restored lastNoSuccess to Parsers.

It was in 2.9.2 and can't be removed without deprecation.
Merge pull request #1156 from paulp/last-no-success

Restored lastNoSuccess to Parsers.
Merge pull request #1155 from paulp/merge-210

Merge 210
Merge pull request #1154 from hubertp/2.10.x-issue/5676-fix

Use rawflags for checking FINAL flag.
Modified SI-6150 fix again.

Have to keep a sharp eye on those ReusableCBFs.
Now all the indexed sequences should be using the
same instance.
cleanup for macroExpand

Error reporting is moved to ContextErrors to disentangle stuff in Macros.scala.
With logics and error reporting intertwined it was an awful mess.

Exceptions are used for the same reason. Instead of threading failures through
the code polluting it with options/ifs, I outline the success path.

It worked much better for typedMacroBody, but I'm also happy with the resulting
code of macroExpand. To me a major factor towards applicability of exceptions
was that they are short-lived and that there might be max one error per domain,
after which we unconditionally bail.
Improve efficiency of updated

Added utility method to create a HashTrieSet with two leaf HashSets with different hash
Used said utility method instead of creating a temorary HashTrieSet with an empty elems array
Added assertions to HashTrieSet to validate tree
Added test that should cover all code paths of the changes done in SI-6220

This test will pass even with an older version of the scala library, since as mentioned this is just a performance improvement.
Merge pull request #1150 from paulp/issue/6150

Issue/6150
SI-5788 correct test and symbol update

Previously I thought it's fixed because I didn't include the correct
testcase. Now it's the correct testcase and this prompted me to
change the code a bit to make it work properly.
Fix for community build blocker.

As two character bugfixes go, this was a doozy.
I will forego elaborating at length and offer generic
instructions for elucidation:

% git log --grep=tpeHK
Merge pull request #1161 from VladUreche/issue/5788-hack

SI-5788 correct test and symbol update
Merge pull request #1162 from paulp/aug19-scala-graph

Fix for community build blocker.
pull request feedback
Merge pull request #1159 from scalamacros/topic/cleanup

even more cleanup in Macros.scala
Compilespeed improvements: Exists arguments and others

It turns out that exists is not inlinable, even if put into List.
We try to eliminate or hoist most closures passed to exists in Types.
There are some other small improvements as well.

--

(@gkossakowski): This commit contains also a fix to crasher
prepared by @paulp. I squashed that commit and kept the
test-case that came with it.
More method hoisting.

Also avoided systematically to map (_.tpe) on parameters in favor of
lazy val paramTypes.
Splitting large methods into smaller ones.