scala.scalajs.ir.JSDesugaring

JSDesugar

class JSDesugar extends Transformer

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. JSDesugar
  2. Transformer
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new JSDesugar()

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 clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  8. def eraseParamType(param: ParamDef): ParamDef

  9. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. def genAsInstanceOf(expr: Tree, cls: ReferenceType)(implicit pos: Position): Tree

  11. def genClassDataOf(cls: ReferenceType)(implicit pos: Position): Tree

  12. def genIsAsInstanceOf(expr: Tree, cls: ReferenceType, test: Boolean)(implicit pos: Position): Tree

  13. def genIsInstanceOf(expr: Tree, cls: ReferenceType)(implicit pos: Position): Tree

  14. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  16. def isExpression(tree: Tree): Boolean

    Test whether the given tree is a standard JS expression.

  17. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  18. def isPureExpression(tree: Tree): Boolean

    Test whether the given tree is a pure standard JS expression.

  19. def isSideEffectFreeExpression(tree: Tree): Boolean

    Test whether the given tree is a side-effect-free standard JS expression.

  20. var labeledExprLHSes: Map[Ident, Tree]

  21. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  22. def newSyntheticVar()(implicit pos: Position): Ident

  23. final def notify(): Unit

    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  25. def pushLhsInto(lhs: Tree, rhs: Tree): Tree

    Push an lhs into a (potentially complex) rhs lhs can be either a EmptyTree, a VarDef, a Assign or a Return

  26. def resetSyntheticVarCounterIn[A](f: ⇒ A): A

  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  28. var syntheticVarCounter: Int

  29. def toString(): String

    Definition Classes
    AnyRef → Any
  30. def transformDef(tree: Tree): Tree

    Definition Classes
    Transformer
  31. def transformExpr(tree: Tree): Tree

    Desugar an expression of Extended-JS into ES5 JS

    Desugar an expression of Extended-JS into ES5 JS

    Definition Classes
    JSDesugarTransformer
  32. def transformStat(tree: Tree): Tree

    Desugar a statement of Extended-JS into ES5 JS

    Desugar a statement of Extended-JS into ES5 JS

    Definition Classes
    JSDesugarTransformer
  33. def unnest(arg0: Tree, args: List[Tree])(makeStat: (Tree, List[Tree]) ⇒ Tree): Tree

    Same as above, for one head argument and a list of arguments

  34. def unnest(lhs: Tree, rhs: Tree)(makeStat: (Tree, Tree) ⇒ Tree): Tree

    Same as above, for two arguments

  35. def unnest(arg: Tree)(makeStat: (Tree) ⇒ Tree): Tree

    Same as above, for a single argument

  36. def unnest(args: List[Tree])(makeStat: (List[Tree]) ⇒ Tree): Tree

    Unnest complex constructs in argument position in temporary variables

    Unnest complex constructs in argument position in temporary variables

    If all the arguments are JS expressions, there is nothing to do. Any argument that is not a JS expression must be unnested and stored in a temporary variable before the statement produced by makeStat.

    But *this changes the evaluation order!* In order not to lose it, it is necessary to also unnest arguments that are expressions but that are supposed to be evaluated before the argument-to-be-unnested and could have side-effects or even whose evaluation could be influenced by the side-effects of another unnested argument.

    Without deep effect analysis, which we do not do, we need to take a very pessimistic approach, and unnest any expression that contains an identifier (except those after the last non-expression argument). Hence the predicate isPureExpressionWithoutIdent.

  37. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Transformer

Inherited from AnyRef

Inherited from Any

Ungrouped