scala/scala — pull request #3816 by lrytz (2014-06-04 17:12:28+00:00)
Title: Don't crash on dead code in ICodeReader

Under `-Ybackend:GenBCode`, the scala compiler occasionally emits dead code, see discussion on PR #3726 for example.

Such a class file crashes ICodeReader. This was uncovered because under `-optimise`, the compiler switches to the ICode-GenASM pipeline, even if the `-Ybackend:GenBCode` flag is present.

There are multiple [tests that fail before](https://scala-webapps.epfl.ch/jenkins/job/scala-checkin-manual/1227/consoleFull) basically because the compiler emits inliner warnings ("could not inline") when the ICodeReader failed.

I tried writing a specific test, but it's not so easy with partest - basically we'd need to generate a classfile with dead code using ASM, but it would need a correct scala signature, which may change over time. I'd say we can merge without a specific test, but ideas are welcome.