Constructors
Members
The operations in this class - add outer parameters - pass outer arguments to these parameters - replace outer this references by outer paths. They are ca...
The operations in this class - add outer parameters - pass outer arguments to these parameters - replace outer this references by outer paths. They are called from erasure. There are two constraints which suggest these operations should be done in erasure. - Replacing this references with outer paths loses aliasing information, so programs will not typecheck with unerased types unless a lot of type refinements are added. Therefore, outer paths should be computed no earlier than erasure. - outer parameters should not show up in signatures, so again they cannot be added before erasure. - outer arguments need access to outer parameters as well as to the original type prefixes of types in New expressions. These prefixes get erased during erasure. Therefore, outer arguments have to be passed no later than erasure.
The operations in this class - add outer parameters - pass outer arguments to these parameters - replace outer this references by outer paths. They are ca...
The operations in this class - add outer parameters - pass outer arguments to these parameters - replace outer this references by outer paths. They are called from erasure. There are two constraints which suggest these operations should be done in erasure. - Replacing this references with outer paths loses aliasing information, so programs will not typecheck with unerased types unless a lot of type refinements are added. Therefore, outer paths should be computed no earlier than erasure. - outer parameters should not show up in signatures, so again they cannot be added before erasure. - outer arguments need access to outer parameters as well as to the original type prefixes of types in New expressions. These prefixes get erased during erasure. Therefore, outer arguments have to be passed no later than erasure.
Ensure that class cls
has outer accessors
Ensure that class cls
has outer accessors
It's possible (i1755.scala gives an example) that the type given by outerPrefix contains a This-reference to a module outside the context where that mod...
It's possible (i1755.scala gives an example) that the type given by outerPrefix contains a This-reference to a module outside the context where that module is defined. This needs to be translated to an access to the module object from the enclosing class or object.
This solution is a bit of a hack; it would be better to avoid such references to the This of a module from outside the module in the first place. I was not yet able to find out how such references arise and how to avoid them.
Class is always instantiated in the compilation unit where it is defined
Class is always instantiated in the compilation unit where it is defined
Class has an outer accessor. Can be called only after phase ExplicitOuter.
Class has an outer accessor. Can be called only after phase ExplicitOuter.
Class constructor takes an outer argument. Can be called only after phase ExplicitOuter.
Class constructor takes an outer argument. Can be called only after phase ExplicitOuter.
Class unconditionally needs an outer pointer. This is the case if the class needs an outer pointer if referenced and one of the following holds: - we mi...
Class unconditionally needs an outer pointer. This is the case if the class needs an outer pointer if referenced and one of the following holds: - we might not know at all instantiation sites whether outer is referenced or not - we need to potentially pass along outer to a parent class or trait
Class needs an outer pointer, provided there is a reference to an outer this in it.
Class needs an outer pointer, provided there is a reference to an outer this in it.
A new outer accessor for class cls
which is a member of owner
A new outer accessor for class cls
which is a member of owner
The outer accessor and potentially outer param accessor needed for class cls
The outer accessor and potentially outer param accessor needed for class cls
A new param accessor for the outer field in class cls
A new param accessor for the outer field in class cls
A new outer accessor or param accessor
A new outer accessor or param accessor
The outer accessor of class cls
. To find it is a bit tricky. The
class might have been moved with new owners between ExplicitOuter and Erasure,
where th...
The outer accessor of class cls
. To find it is a bit tricky. The
class might have been moved with new owners between ExplicitOuter and Erasure,
where the method is also called. For instance, it might have been part
of a by-name argument, and therefore be moved under a closure method
by ElimByName. In that case looking up the method again at Erasure with the
fully qualified name outerAccName
will fail, because the outerAccName
's
result is phase dependent. In that case we use a backup strategy where we search all
definitions in the class to find the one with the OuterAccessor flag.
The outer parameter accessor of cass cls
The outer parameter accessor of cass cls
The outer prefix implied by type tpe
The outer prefix implied by type tpe