This class does not change linearization.
This class does not change linearization.
Transforms the info of types to add the Inner$jsclass fields.
Transforms the info of types to add the Inner$jsclass fields.
This method was inspired by ExplicitOuter.transformInfo.
Makes the references to inner JS class values explicit.
Roughly, for every inner JS class of the form:
this phase creates a field
Inner$jsclassinOuterto hold the JS class value forInner. The rhs of that field is a call to a magic method, used to retain information that the back-end will need.These fields will be read by code generated in
ExplicitLocalJS.Note that this field must also be added to outer classes and traits coming from separate compilation, therefore this phase is an
InfoTransform. Since thetransformInfoalso applies to classes defined in the current compilation unit, the tree traversal must not create the field symbols a second time when synthesizing theValDef. Instead, it must reuse the same symbols thattransformInfowill create.It seems the easiest way to do that is to run the entire
transform"in the future", withexitingPhase(ExplicitInnerJS). This design is similar to howexplicitouterworks.