Packages

  • package root
    Definition Classes
    root
  • package org
    Definition Classes
    root
  • package scalajs
    Definition Classes
    org
  • package nscplugin
    Definition Classes
    scalajs
  • abstract class ExplicitInnerJS [G <: Global with Singleton] extends PluginComponent with InfoTransform with TypingTransformers with CompatComponent

    Makes the references to inner JS class values explicit.

    Makes the references to inner JS class values explicit.

    Roughly, for every inner JS class of the form:

    class Outer {
      class Inner extends ParentJSClass
    }

    this phase creates a field Inner$jsclass in Outer to hold the JS class value for Inner. The rhs of that field is a call to a magic method, used to retain information that the back-end will need.

    class Outer {
      <synthetic> val Inner$jsclass: AnyRef =
        createJSClass(classOf[Inner], js.constructorOf[ParentJSClass])
    
      class Inner extends ParentJSClass
    }

    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 the transformInfo also applies to classes defined in the current compilation unit, the tree traversal must not create the field symbols a second time when synthesizing the ValDef. Instead, it must reuse the same symbols that transformInfo will create.

    It seems the easiest way to do that is to run the entire transform "in the future", with exitingPhase(ExplicitInnerJS). This design is similar to how explicitouter works.

    Definition Classes
    nscplugin
  • BTypesCompat
  • ExplicitInnerJSTransformer
  • GlobalCompat
  • Phase
  • SAMFunctionAttachCompat
  • SAMFunctionAttachCompatDef
  • SAMFunctionCompatOps
  • StdPhase
  • StdTermNamesCompat
  • StdTypeNamesCompat
  • SymbolCompat
  • TypingTransformer
c

org.scalajs.nscplugin.ExplicitInnerJS

ExplicitInnerJSTransformer

class ExplicitInnerJSTransformer extends TypingTransformer

Linear Supertypes
ExplicitInnerJS.TypingTransformer, G.Transformer, G.Transformer, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ExplicitInnerJSTransformer
  2. TypingTransformer
  3. Transformer
  4. Transformer
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ExplicitInnerJSTransformer(unit: G.CompilationUnit)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def atOwner[A](tree: G.Tree, owner: G.Symbol)(trans: ⇒ A): A
    Definition Classes
    TypingTransformer
  6. final def atOwner[A](owner: G.Symbol)(trans: ⇒ A): A
    Definition Classes
    TypingTransformer → Transformer
  7. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. var curTree: G.Tree
    Attributes
    protected
    Definition Classes
    TypingTransformer
  9. def currentClass: G.Symbol
    Attributes
    protected
    Definition Classes
    Transformer
  10. def currentMethod: G.Symbol
    Attributes
    protected
    Definition Classes
    Transformer
  11. var currentOwner: G.Symbol
    Attributes
    protected[scala]
    Definition Classes
    Transformer
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  16. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. var localTyper: (G.analyzer)#Typer
    Definition Classes
    TypingTransformer
  19. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. final def notify(): Unit
    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  22. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  23. def toString(): String
    Definition Classes
    AnyRef → Any
  24. def transform(tree: G.Tree): G.Tree

    The main transformation method.

    The main transformation method.

    Definition Classes
    ExplicitInnerJSTransformer → TypingTransformer → Transformer
  25. def transformCaseDefs(trees: List[G.CaseDef]): List[G.CaseDef]
    Definition Classes
    Transformer
  26. def transformIdents(trees: List[G.Ident]): List[G.Ident]
    Definition Classes
    Transformer
  27. def transformMemberDefs(trees: List[G.MemberDef]): List[G.MemberDef]
    Definition Classes
    Transformer
  28. def transformModifiers(mods: G.Modifiers): G.Modifiers
    Definition Classes
    Transformer
  29. def transformStats(stats: List[G.Tree], exprOwner: G.Symbol): List[G.Tree]
    Definition Classes
    Transformer
  30. def transformTemplate(tree: G.Template): G.Template
    Definition Classes
    Transformer
  31. def transformTrees(trees: List[G.Tree]): List[G.Tree]
    Definition Classes
    Transformer
  32. def transformTypeDefs(trees: List[G.TypeDef]): List[G.TypeDef]
    Definition Classes
    Transformer
  33. def transformUnit(unit: G.CompilationUnit): Unit

    Execute the whole transformation in the future, exiting this phase.

    Execute the whole transformation in the future, exiting this phase.

    Definition Classes
    ExplicitInnerJSTransformer → Transformer
  34. def transformValDef(tree: G.ValDef): G.ValDef
    Definition Classes
    Transformer
  35. def transformValDefs(trees: List[G.ValDef]): List[G.ValDef]
    Definition Classes
    Transformer
  36. def transformValDefss(treess: List[List[G.ValDef]]): List[List[G.ValDef]]
    Definition Classes
    Transformer
  37. val treeCopy: G.TreeCopier
    Definition Classes
    Transformer
  38. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  40. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from G.Transformer

Inherited from G.Transformer

Inherited from AnyRef

Inherited from Any

Ungrouped