Object

org.scalajs.ir

Types

Related Doc: package ir

Permalink

object Types

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Types
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. final case class ArrayType(arrayTypeRef: ArrayTypeRef) extends Type with Product with Serializable

    Permalink

    Array type.

  2. final case class ArrayTypeRef(base: NonArrayTypeRef, dimensions: Int) extends TypeRef with Product with Serializable

    Permalink

    Array type.

  3. final case class ClassRef(className: ClassName) extends NonArrayTypeRef with Product with Serializable

    Permalink

    Class (or interface) type.

  4. final case class ClassType(className: ClassName) extends Type with Product with Serializable

    Permalink

    Class (or interface) type.

  5. sealed abstract class NonArrayTypeRef extends TypeRef

    Permalink
  6. final case class PrimRef extends NonArrayTypeRef with Product with Serializable

    Permalink

    Primitive type reference.

  7. sealed abstract class PrimType extends Type

    Permalink
  8. sealed abstract class PrimTypeWithRef extends PrimType

    Permalink
  9. final case class RecordType(fields: List[Field]) extends Type with Product with Serializable

    Permalink

    Record type.

    Record type. Used by the optimizer to inline classes as records with multiple fields. They are desugared as several local variables by JSDesugaring. Record types cannot cross method boundaries, so they cannot appear as the type of fields or parameters, nor as result types of methods. The compiler itself never generates record types.

  10. sealed abstract class Type extends AnyRef

    Permalink

    Type of a term (expression or statement) in the IR.

    Type of a term (expression or statement) in the IR.

    There is a many-to-one relationship from TypeRefs to Types, because java.lang.Object and JS types all collapse to AnyType.

    In fact, there are two Types that do not have any real equivalent in type refs: StringType and UndefType, as they refer to the non-null variants of java.lang.String and java.lang.Void, respectively.

  11. sealed abstract class TypeRef extends AnyRef

    Permalink

    Type reference (allowed for classOf[], is/asInstanceOf[]).

    Type reference (allowed for classOf[], is/asInstanceOf[]).

    A TypeRef has exactly the same level of precision as a JVM type. There is a one-to-one relationship between a TypeRef and an instance of java.lang.Class at run-time. This means that:

    • All primitive types have their TypeRef (including scala.Byte and scala.Short), and they are different from their boxed versions.
    • JS types are not erased to any
    • Array types are like on the JVM

    A TypeRef therefore uniquely identifies a classOf[T]. It is also the type refs that are used in method signatures, and which therefore dictate JVM/IR overloading.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. object AnyType extends Type with Product with Serializable

    Permalink

    Any type (the top type of this type system).

    Any type (the top type of this type system). A variable of this type can contain any value, including undefined and null and any JS value. This type supports a very limited set of Scala operations, the ones common to all values. Basically only reference equality tests and instance tests. It also supports all JavaScript operations, since all Scala objects are also genuine JavaScript objects. The type java.lang.Object in the back-end maps to AnyType because it can hold JS values (not only instances of Scala.js classes).

  5. object ArrayTypeRef extends Serializable

    Permalink
  6. final val BooleanRef: PrimRef

    Permalink
  7. object BooleanType extends PrimTypeWithRef with Product with Serializable

    Permalink

    Boolean type.

    Boolean type. It does not accept null nor undefined.

  8. final val ByteRef: PrimRef

    Permalink
  9. object ByteType extends PrimTypeWithRef with Product with Serializable

    Permalink

    8-bit signed integer type.

    8-bit signed integer type. It does not accept null nor undefined.

  10. final val CharRef: PrimRef

    Permalink
  11. object CharType extends PrimTypeWithRef with Product with Serializable

    Permalink

    Char type, a 16-bit UTF-16 code unit.

    Char type, a 16-bit UTF-16 code unit. It does not accept null nor undefined.

  12. final val DoubleRef: PrimRef

    Permalink
  13. object DoubleType extends PrimTypeWithRef with Product with Serializable

    Permalink

    Double type (64-bit).

    Double type (64-bit). It does not accept null nor undefined.

  14. final val FloatRef: PrimRef

    Permalink
  15. object FloatType extends PrimTypeWithRef with Product with Serializable

    Permalink

    Float type (32-bit).

    Float type (32-bit). It does not accept null nor undefined.

  16. final val IntRef: PrimRef

    Permalink
  17. object IntType extends PrimTypeWithRef with Product with Serializable

    Permalink

    32-bit signed integer type.

    32-bit signed integer type. It does not accept null nor undefined.

  18. final val LongRef: PrimRef

    Permalink
  19. object LongType extends PrimTypeWithRef with Product with Serializable

    Permalink

    64-bit signed integer type.

    64-bit signed integer type. It does not accept null nor undefined.

  20. object NoType extends PrimTypeWithRef with Product with Serializable

    Permalink

    No type.

  21. final val NothingRef: PrimRef

    Permalink
  22. object NothingType extends PrimTypeWithRef with Product with Serializable

    Permalink

    Nothing type (the bottom type of this type system).

    Nothing type (the bottom type of this type system). Expressions from which one can never come back are typed as Nothing. For example, throw and return.

  23. final val NullRef: PrimRef

    Permalink
  24. object NullType extends PrimTypeWithRef with Product with Serializable

    Permalink

    The type of null.

    The type of null. It does not accept undefined. The null type is a subtype of all class types and array types.

  25. object RecordType extends Serializable

    Permalink
  26. final val ShortRef: PrimRef

    Permalink
  27. object ShortType extends PrimTypeWithRef with Product with Serializable

    Permalink

    16-bit signed integer type.

    16-bit signed integer type. It does not accept null nor undefined.

  28. object StringType extends PrimType with Product with Serializable

    Permalink

    String type.

    String type. It does not accept null nor undefined.

  29. object UndefType extends PrimType with Product with Serializable

    Permalink

    The type of undefined.

  30. final val VoidRef: PrimRef

    Permalink
  31. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  32. def clone(): AnyRef

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  38. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  39. def isSubtype(lhs: Type, rhs: Type)(isSubclass: (ClassName, ClassName) ⇒ Boolean): Boolean

    Permalink

    Tests whether a type lhs is a subtype of rhs (or equal).

    Tests whether a type lhs is a subtype of rhs (or equal). NoType is never a subtype or supertype of anything (including itself). All other types are subtypes of themselves.

    isSubclass

    A function testing whether a class/interface is a subclass of another class/interface.

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  44. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  48. def zeroOf(tpe: Type)(implicit pos: Position): Tree

    Permalink

    Generates a literal zero of the given type.

Inherited from AnyRef

Inherited from Any

Ungrouped