scala-dev
scala-dev copied to clipboard
Re-implement exception handler inlining in the new optimizer
The old optimizer inlined exception handlers if a throw
throws an exception that is caught in the same method. According to @VladUreche, this is mainly to support two use-cases:
-
breakable { ...; break; ... }
-
return
statements
https://github.com/scala/scala/blob/2.11.x/src/compiler/scala/tools/nsc/backend/opt/InlineExceptionHandlers.scala
:+1: to ASM-level inline exception handlers
Existing test currently in pending: https://github.com/scala/scala/blob/93fa559f62637fc3a49d7b961a1d07cf843b0e6b/test/pending/run/inline-ex-handlers.scala