scala.tools.nsc.transform

SpecializeTypes

abstract class SpecializeTypes extends SubComponent with InfoTransform with TypingTransformers

Specialize code on types.

Source
SpecializeTypes.scala
Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. SpecializeTypes
  2. TypingTransformers
  3. InfoTransform
  4. Transform
  5. SubComponent
  6. AnyRef
  7. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SpecializeTypes()

Type Members

  1. class Duplicator extends Duplicators

  2. case class Forward(t: Symbol) extends SpecializedInfo with Product with Serializable

    Symbol is a method that should be forwarded to 't'

  3. case class Implementation(target: Symbol) extends SpecializedInfo with Product with Serializable

    Symbol is a specialized method whose body should be the target's method body.

  4. class ImplementationAdapter extends TreeSymSubstituter

    A tree symbol substituter that substitutes on type skolems.

  5. case class NormalizedMember(target: Symbol) extends SpecializedInfo with Product with Serializable

    Symbol is a normalized member obtained by specializing 'target'.

  6. case class Overload(sym: Symbol, env: TypeEnv) extends Product with Serializable

  7. class Phase extends Phase

    The phase defined by this transform

  8. case class SpecialOverload(original: Symbol, env: TypeEnv) extends SpecializedInfo with Product with Serializable

    Symbol is a special overloaded method of 'original', in the environment env.

  9. case class SpecialOverride(target: Symbol) extends SpecializedInfo with Product with Serializable

    Symbol is a specialized override paired with target'.

  10. class SpecializationPhase extends Phase

  11. class SpecializationTransformer extends Transformer

  12. case class SpecializedAccessor(target: Symbol) extends SpecializedInfo with Product with Serializable

    Symbol is a specialized accessor for the target' field.

  13. abstract class SpecializedInfo extends AnyRef

  14. case class SpecializedInnerClass(target: Symbol, env: TypeEnv) extends SpecializedInfo with Product with Serializable

    A specialized inner class that specializes original inner class target on a type parameter of the enclosing class, in the typeenv env.

  15. abstract class StdPhase extends GlobalPhase

    A standard phase template

  16. type TypeEnv = Map[Symbol, Type]

  17. abstract class TypingTransformer extends Transformer

Abstract Value Members

  1. abstract val global: Global

    Definition Classes
    TypingTransformers
  2. abstract val runsAfter: List[String]

    List of phase names, this phase should run after

    List of phase names, this phase should run after

    Definition Classes
    SubComponent
  3. abstract val runsRightAfter: Option[String]

    Phase name this phase will attach itself to, not allowing any phase to come between it and the phase name declared

    Phase name this phase will attach itself to, not allowing any phase to come between it and the phase name declared

    Definition Classes
    SubComponent

Concrete Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. object TypeEnv extends AnyRef

  7. object UnifyError extends Throwable with ControlThrowable with Product with Serializable

  8. def addConcreteSpecMethod(m: Symbol): Unit

    Add method m to the set of symbols for which we need an implementation tree in the tree transformer.

    Add method m to the set of symbols for which we need an implementation tree in the tree transformer.

    Note

    This field is part of the specializeTypes subcomponent, so any symbols that here are not garbage collected at the end of a compiler run!

  9. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  10. def changesBaseClasses: Boolean

    This phase changes base classes.

    This phase changes base classes.

    Definition Classes
    SpecializeTypesInfoTransform
  11. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  12. def concreteTypes(sym: Symbol): List[Type]

    Return the types sym' should be specialized at. This may be some of the primitive types or AnyRef. AnyRef means that a new type parameter T will be generated later, known to be a subtype of AnyRef (T <: AnyRef). These are in a meaningful order for stability purposes.

  13. def conflicting(env: TypeEnv): Boolean

    Is any type variable in env' conflicting with any if its type bounds, when type bindings in env' are taken into account?

    Is any type variable in env' conflicting with any if its type bounds, when type bindings in env' are taken into account?

    A conflicting type environment could still be satisfiable.

  14. def emptyEnv: TypeEnv

  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[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  18. def genericClass(cls: Symbol): Symbol

    Returns the generic class that was specialized to 'cls', or 'cls' itself if cls is not a specialized subclass.

  19. final def getClass(): java.lang.Class[_]

    Definition Classes
    AnyRef → Any
  20. def hasSpecializedParams(clazz: Symbol): Boolean

    Has clazz' any type parameters that need be specialized?

  21. def hashCode(): Int

    SubComponent are added to a HashSet and two phases are the same if they have the same name

    SubComponent are added to a HashSet and two phases are the same if they have the same name

    Definition Classes
    SubComponent → AnyRef → Any
  22. def illegalSpecializedInheritance(clazz: Symbol): Boolean

  23. val internal: Boolean

    Internal flag to tell external from internal phases

    Internal flag to tell external from internal phases

    Definition Classes
    SubComponent
  24. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  25. def isNormalizedMember(m: Symbol): Boolean

  26. def keepsTypeParams: Boolean

    Definition Classes
    SpecializeTypesInfoTransform
  27. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  28. def newPhase(prev: Phase): StdPhase

    Just to mark uncheckable

    Just to mark uncheckable

    Definition Classes
    SpecializeTypesInfoTransformTransformSubComponent
  29. def newTransformer(unit: CompilationUnit): Transformer

    The transformer factory

    The transformer factory

    Attributes
    protected
    Definition Classes
    SpecializeTypesTransform
  30. def nonConflicting(env: TypeEnv): Boolean

  31. final def notify(): Unit

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

    Definition Classes
    AnyRef
  33. def originalClass(clazz: Symbol): Symbol

    Return the generic class corresponding to this specialized class.

  34. def overload(sym: Symbol, env: TypeEnv): Option[Overload]

    Return the specialized overload of sym in the given env, if any.

  35. def ownPhase: Phase

    The phase corresponding to this subcomponent in the current compiler run

    The phase corresponding to this subcomponent in the current compiler run

    Definition Classes
    SubComponent
  36. val phaseName: String

    the name of the phase:

    the name of the phase:

    Definition Classes
    SpecializeTypesSubComponent
  37. def phaseNewFlags: Long

    New flags defined by the phase which are not valid before

    New flags defined by the phase which are not valid before

    Definition Classes
    SubComponent
  38. def phaseNextFlags: Long

    New flags defined by the phase which are not valid until immediately after it

    New flags defined by the phase which are not valid until immediately after it

    Definition Classes
    SubComponent
  39. lazy val primitiveTypes: List[Type]

  40. def printSpecStats(): Unit

  41. def produceTypeParameters(syms: List[Symbol], nowner: Symbol, env: TypeEnv): List[Symbol]

    Produces the symbols from type parameters syms of the original owner, in the given type environment env.

    Produces the symbols from type parameters syms of the original owner, in the given type environment env. The new owner is nowner.

    Non-specialized type parameters are cloned into new ones. Type parameters specialized on AnyRef have preexisting symbols.

    For instance, a @specialized(AnyRef) T, will become T$sp <: AnyRef.

  42. val runsBefore: List[String]

    List of phase names, this phase should run before

    List of phase names, this phase should run before

    Definition Classes
    SubComponent
  43. def satisfiable(env: TypeEnv, warnings: Boolean): Boolean

  44. def satisfiable(env: TypeEnv): Boolean

    The type environment is sound w.

    The type environment is sound w.r.t. to all type bounds or only soft conflicts appear. An environment is sound if all bindings are within the bounds of the given type variable. A soft conflict is a binding that does not fall within the bounds, but whose bounds contain type variables that are @specialized, (that could become satisfiable).

  45. def specializeCalls(unit: CompilationUnit): TypingTransformer { ... /* 5 definitions in type refinement */ }

  46. def specializeClass(clazz: Symbol, outerEnv: TypeEnv): List[Symbol]

    Specialize 'clazz', in the environment outerEnv.

    Specialize 'clazz', in the environment outerEnv. The outer environment contains bindings for specialized types of enclosing classes.

    A class C is specialized w.r.t to its own specialized type params stps, by specializing its members, and creating a new class for each combination of stps.

  47. val specializedClass: Map[(Symbol, TypeEnv), Symbol]

    For a given class and concrete type arguments, give its specialized class

  48. def specializedParams(sym: Symbol): List[Symbol]

    Return specialized type parameters.

  49. val specializedType: TypeMap

  50. def specializedTypeVars(tpe: Type): Set[Symbol]

    Return the set of @specialized type variables mentioned by the given type.

    Return the set of @specialized type variables mentioned by the given type. It only counts type variables that appear:

    • naked
    • as arguments to type constructors in @specialized positions (arrays are considered as Array[@specialized T])
  51. def specializedTypeVars(sym: Symbol): Set[Symbol]

  52. def specializedTypeVars(tpes: List[Type]): Set[Symbol]

  53. def splitParams(tps: List[Symbol]): (List[Symbol], List[Symbol])

  54. def survivingArgs(sym: Symbol, args: List[Type]): List[Type]

    Given an original class symbol and a list of types its type parameters are instantiated at returns a list of type parameters that should remain in the TypeRef when instantiating a specialized type.

  55. def survivingParams(params: List[Symbol], env: TypeEnv): List[Symbol]

    Type parameters that survive when specializing in the specified environment.

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

    Definition Classes
    AnyRef
  57. def toString(): String

    Definition Classes
    AnyRef → Any
  58. def transformInfo(sym: Symbol, tpe: Type): Type

    Type transformation.

    Type transformation. It is applied to all symbols, compiled or loaded. If it is a 'no-specialization' run, it is applied only to loaded symbols.

    Definition Classes
    SpecializeTypesInfoTransform
  59. val typeEnv: Map[Symbol, TypeEnv]

    Map class symbols to the type environments where they were created.

  60. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from TypingTransformers

Inherited from InfoTransform

Inherited from Transform

Inherited from SubComponent

Inherited from AnyRef

Inherited from Any