Dotty Documentation

0.11.0-bin-SNAPSHOT

class LiftTry

Lifts try's that might be executed on non-empty expression stacks to their own methods. I.e.

try body catch handler

is lifted to

{ def liftedTree$n() = try body catch handler; liftedTree$n() }

However, don't lift try's without catch expressions (try-finally). Lifting is needed only for try-catch expressions that are evaluated in a context where the stack might not be empty. finally does not attempt to continue evaluation after an exception, so the fact that values on the stack are 'lost' does not matter (copied from https://github.com/scala/scala/pull/922).

[-] Constructors

LiftTry ( )

[-] Members

[+] private var NeedLift : Location [ Boolean ]
[+] val phaseName : String

the following two members override abstract members in Transform

[+] private def NeedLift_= ( x$1: Location [ Boolean ] ) : Unit
[+] override def initContext ( ctx: FreshContext ) : Unit
[+] private def liftingCtx ( p: Boolean ) ( implicit ctx: Context ) : Context
[+] private def needLift ( implicit ctx: Context ) : Boolean
[+] override def prepareForApply ( tree: Apply ) ( implicit ctx: Context ) : Context
[+] override def prepareForAssign ( tree: Assign ) ( implicit ctx: Context ) : Context
[+] override def prepareForReturn ( tree: Return ) ( implicit ctx: Context ) : Context
[+] override def prepareForTemplate ( tree: Template ) ( implicit ctx: Context ) : Context
[+] override def prepareForValDef ( tree: ValDef ) ( implicit ctx: Context ) : Context
[+] override def transformTry ( tree: Try ) ( implicit ctx: Context ) : Tree