Produces an inlined version of call via its inlined method.
Value parameters
- call
-
the original call to an inlineable method
- rhsToInline
-
the body of the inlineable method that replaces the call.
Attributes
- Companion
- object
- Graph
-
- Supertypes
Members list
Type members
Classlikes
A typer for inlined bodies. Beyond standard typing, an inline typer performs the following functions:
A typer for inlined bodies. Beyond standard typing, an inline typer performs the following functions:
- Implement constant folding over inlined code
- Selectively expand ifs with constant conditions
- Inline arguments that are by-name closures
- Make sure inlined code is type-correct.
- Make sure that the tree's typing is idempotent (so that future -Ycheck passes succeed)
Attributes
- Supertypes
-
class ReTypertrait ReCheckingclass Typertrait Migrationstrait Derivingtrait QuotesAndSplicestrait Checkingtrait Dynamictrait Inferencingtrait ImportSuggestionstrait Implicitstrait Applicationstrait Compatibilitytrait TypeAssignerclass Namerclass Objecttrait Matchableclass AnyShow all
Value members
Concrete methods
The Inlined node representing the inlined call
The Inlined node representing the inlined call
Attributes
Returns the result type of the Inlined code block after removing thisProxy and opaqueProxy TermRefs. E.g. for an Inlined tree returning Block of type Option[Foo$_this.OpaqueInt], and for proxies:
Returns the result type of the Inlined code block after removing thisProxy and opaqueProxy TermRefs. E.g. for an Inlined tree returning Block of type Option[Foo$_this.OpaqueInt], and for proxies:
val $proxy1: Foo.type{type OpaqueInt = Int} = = ...
val Foo$_this: ($proxy1 : Foo.type{type OpaqueInt = Int}) = ...
the method will return: Foo.OpaqueInt
Attributes
Concrete fields
Maps a type that includes a thisProxy (e.g. TermRef(NoPrefix,val Foo$_this)) by reading the defTree belonging to that thisProxy (val Foo$_this: Foo.type = AnotherProxy) back into its original reference (AnotherProxy, which is directly or indirectly a refinement on Foo)
Maps a type that includes a thisProxy (e.g. TermRef(NoPrefix,val Foo$_this)) by reading the defTree belonging to that thisProxy (val Foo$_this: Foo.type = AnotherProxy) back into its original reference (AnotherProxy, which is directly or indirectly a refinement on Foo)
Usually when we end up with another proxy like this, we will be able to further unwrap it back into Foo with mapBackToOpaques, but, for nested transparent inline calls, AnotherProxy will be a proxy created by inlining the outer calls, that we might not be able to further unwrap this way (as those proxies will not be a part of opaqueProxies created during this inlining). We leave that as it is and treat this behavior as intended (see documentation with an example in Opaque Types in Transparent Inline Methods section in opaques-details.md), as we might need those opaques to have visible right hand sides for successful typechecking of the outer inline call.