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. def doAssign(lhs: Tree, rhs: Tree): Tree

  7. def doVarDef(ident: Ident, tpe: Type, mutable: Boolean, rhs: Tree): Tree

  8. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

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

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

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

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

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

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

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

    Test whether the given tree is a standard JS expression.

  18. final def isInstanceOf[T0]: Boolean

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

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

  20. def isSideEffectFreeExpression(tree: Tree): Boolean

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

  21. var labeledExprLHSes: Map[Ident, Tree]

  22. def makeRecordFieldIdent(recName: String, recOrigName: Option[String], fieldName: String, fieldOrigName: Option[String])(implicit pos: Position): Ident

  23. def makeRecordFieldIdent(recIdent: Ident, fieldName: String, fieldOrigiName: Option[String])(implicit pos: Position): Ident

  24. def makeRecordFieldIdent(recIdent: Ident, fieldIdent: Ident)(implicit pos: Position): Ident

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

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

  27. final def notify(): Unit

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

    Definition Classes
    AnyRef
  29. 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

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

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

    Definition Classes
    AnyRef
  32. var syntheticVarCounter: Int

  33. def toString(): String

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

    Definition Classes
    Transformer
  35. 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
  36. 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
  37. 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

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

    Same as above, for two arguments

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

    Same as above, for a single argument

  40. 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.

  41. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Transformer

Inherited from AnyRef

Inherited from Any

Ungrouped