InlineReducer
A utility class offering methods for rewriting inlined code
Attributes
- Graph
-
- Supertypes
Members list
Type members
Types
The result type of reducing a match. It consists optionally of a list of bindings for the pattern-bound variables and the RHS of the selected case. Returns None
if no case was selected.
The result type of reducing a match. It consists optionally of a list of bindings for the pattern-bound variables and the RHS of the selected case. Returns None
if no case was selected.
Attributes
Value members
Concrete methods
If this is a value binding:
If this is a value binding:
- reduce its rhs if it is a projection and adjust its type accordingly,
- record symbol -> rhs in the InlineBindings context propery.
Attributes
Reduce an inline match
Reduce an inline match
Value parameters
- mtch
-
the match tree
- scrutType
-
its fully defined type, or ImplicitScrutineeTypeRef for a summonFrom
- scrutinee
-
the scrutinee expression, assumed to be pure, or EmptyTree for a summonFrom
- typer
-
The current inline typer
Attributes
- Returns
-
optionally, if match can be reduced to a matching case: A pair of bindings for all pattern-bound variables and the RHS of the case.
If tree
is equivalent to new C(args).x
where class C
does not have initialization code and x
is a parameter corresponding to one of the arguments args
, the corresponding argument, otherwise tree
itself. Side effects of original arguments need to be preserved.
If tree
is equivalent to new C(args).x
where class C
does not have initialization code and x
is a parameter corresponding to one of the arguments args
, the corresponding argument, otherwise tree
itself. Side effects of original arguments need to be preserved.