Produces an inlined version of call
via its inlined
method.
Constructors
Members
A typer for inlined code. Its purpose is: 1. Implement constant folding over inlined code 2. Selectively expand ifs with constant conditions 3. Inline ar...
A typer for inlined code. Its purpose is: 1. Implement constant folding over inlined code 2. Selectively expand ifs with constant conditions 3. Inline arguments that are inlineable closures 4. Make sure inlined code is type-correct. 5. Make sure that the tree's typing is idempotent (so that future -Ycheck passes succeed)
An extractor for references to closure arguments that refer to @inline
methods
An extractor for references to closure arguments that refer to @inline
methods
A buffer for bindings that define proxies for actual arguments
A buffer for bindings that define proxies for actual arguments
A map from parameter names of the inline method to references of the actual arguments. For a type argument this is the full argument type. For a value a...
A map from parameter names of the inline method to references of the actual arguments.
For a type argument this is the full argument type.
For a value argument, it is a reference to either the argument value
(if the argument is a pure expression of singleton type), or to val
or def
acting
as a proxy (if the argument is something else).
A map from references to (type and value) parameters of the inline method
to their corresponding argument or proxy references, as given by paramBinding
A map from references to (type and value) parameters of the inline method
to their corresponding argument or proxy references, as given by paramBinding
.
A map from the classes of (direct and outer) this references in rhs
to references of their proxies.
Note that we can't index by the ThisType itself sinc...
A map from the classes of (direct and outer) this references in rhs
to references of their proxies.
Note that we can't index by the ThisType itself since there are several
possible forms to express what is logicaly the same ThisType. E.g.
ThisType(TypeRef(ThisType(p), cls))
vs
ThisType(TypeRef(TermRef(ThisType(
These are different (wrt ==) types but represent logically the same key
Populate paramBinding
and bindingsBuf
by matching parameters with
corresponding arguments. bindingbuf
will be further extended later by
proxies to this-...
Populate paramBinding
and bindingsBuf
by matching parameters with
corresponding arguments. bindingbuf
will be further extended later by
proxies to this-references.
The Inlined node representing the inlined call
The Inlined node representing the inlined call
Register type of leaf node
Register type of leaf node
Populate thisProxy
and paramProxy
as follows:
1a. If given type refers to a static this, thisProxy binds it to corresponding global reference, 1b. If gi...
Populate thisProxy
and paramProxy
as follows:
1a. If given type refers to a static this, thisProxy binds it to corresponding global reference,
1b. If given type refers to an instance this, create a proxy symbol and bind the thistype to
refer to the proxy. The proxy is not yet entered in bindingsBuf
that will come later.
2. If given type refers to a parameter, make paramProxy
refer to the entry stored
in paramNames
under the parameter's name. This roundabout way to bind parameter
references to proxies is done because we not known a priori what the parameter
references of a method are (we only know the method's type, but that contains PolyParams
and MethodParams, not TypeRefs or TermRefs.