ch.epfl.yinyang

EmbeddedControls

trait EmbeddedControls extends AnyRef

Default implementation of virtualized Scala control structures.

This trait is adapted from the EmbeddedControls trait in Scala Virtualized. See also https://raw.github.com/namin/scala/topic-virt/src/library/scala/EmbeddedControls.scala

The EmbeddedControls trait provides method definitions where calls to the methods are treated by the compiler in a special way. The reason to express these calls as methods is to give embedded DSLs a chance to provide their own definitions and thereby override the standard interpretation of the compiler.

Example: When faced with an if construct, the @virtualized macro annotation will generate a method call: ifThenElse(cond, thenp, elsep)

This method call will be bound to an implementation based on normal rules of scoping. If it binds to the standard one in this trait, the corresponding macro will replace it by an If tree node. If not, the call will be left as it is and a staging or interpreting DSL can take over.

Note

None of the above will happen unless you annotate your code with @virtualize.

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

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. macro def __assign[T](lhs: T, rhs: T): Unit

  5. macro def __doWhile(body: Unit, cond: Boolean): Unit

  6. macro def __ifThenElse[T](cond: Boolean, thenBr: T, elseBr: T): T

  7. macro def __lazyValDef[T](init: T): T

  8. macro def __newVar[T](init: T): T

  9. macro def __readVar[T](init: T): T

  10. macro def __return(expr: Any): Nothing

  11. macro def __valDef[T](init: T): T

  12. macro def __whileDo(cond: Boolean, body: Unit): Unit

  13. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  14. def clone(): AnyRef

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

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. final def getClass(): Class[_]

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

    Definition Classes
    AnyRef → Any
  20. macro def infix_!=(x1: Any, x2: Any): Boolean

  21. macro def infix_##(x: Any): Int

  22. macro def infix_==(x1: Any, x2: Any): Boolean

  23. macro def infix_asInstanceOf[T](x: Any): T

  24. macro def infix_clone(x: AnyRef): AnyRef

  25. macro def infix_eq(x1: AnyRef, x2: AnyRef): Boolean

  26. macro def infix_equals(x1: Any, x2: Any): Boolean

  27. macro def infix_finalize(x: AnyRef): Unit

  28. macro def infix_getClass(x: Any): Class[_]

  29. macro def infix_hashCode(x: Any): Int

  30. macro def infix_isInstanceOf[T](x: Any): Boolean

  31. macro def infix_ne(x1: AnyRef, x2: AnyRef): Boolean

  32. macro def infix_notify(x: AnyRef): Unit

  33. macro def infix_notifyAll(x: AnyRef): Unit

  34. macro def infix_synchronized[T](x: AnyRef, body: T): T

  35. macro def infix_toString(x: Any): String

  36. macro def infix_wait(x: AnyRef, timeout: Long, nanos: Int): Unit

  37. macro def infix_wait(x: AnyRef, timeout: Long): Unit

  38. macro def infix_wait(x: AnyRef): Unit

  39. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  40. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  41. final def notify(): Unit

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

    Definition Classes
    AnyRef
  43. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  44. def toString(): String

    Definition Classes
    AnyRef → Any
  45. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped