Object

scala.tools.nsc.Global

specializeTypes

Related Doc: package Global

Permalink

object specializeTypes extends SpecializeTypes

Source
Global.scala
Linear Supertypes
Content Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. specializeTypes
  2. SpecializeTypes
  3. TypingTransformers
  4. InfoTransform
  5. Transform
  6. SubComponent
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class Abstract(t: Global.Symbol) extends SpecializedInfo with Product with Serializable

    Permalink

    Symbol is a specialized abstract method, either specialized or original.

    Symbol is a specialized abstract method, either specialized or original. The original t is abstract.

    Definition Classes
    SpecializeTypes
  2. class Duplicator extends Duplicators

    Permalink

    This duplicator additionally performs casts of expressions if that is allowed by the casts map.

    This duplicator additionally performs casts of expressions if that is allowed by the casts map.

    Definition Classes
    SpecializeTypes
  3. case class Forward(t: Global.Symbol) extends SpecializedInfo with Product with Serializable

    Permalink

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

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

    Definition Classes
    SpecializeTypes
  4. case class Implementation(target: Global.Symbol) extends SpecializedInfo with Product with Serializable

    Permalink

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

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

    Definition Classes
    SpecializeTypes
  5. class ImplementationAdapter extends Global.TreeSymSubstituter

    Permalink

    A tree symbol substituter that substitutes on type skolems.

    A tree symbol substituter that substitutes on type skolems. If a type parameter is a skolem, it looks for the original symbol in the 'from' and maps it to the corresponding new symbol. The new symbol should probably be a type skolem as well (not enforced).

    All private members are made protected in order to be accessible from specialized classes.

    Definition Classes
    SpecializeTypes
  6. case class NormalizedMember(target: Global.Symbol) extends SpecializedInfo with Product with Serializable

    Permalink

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

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

    Definition Classes
    SpecializeTypes
  7. case class Overload(sym: Global.Symbol, env: TypeEnv) extends Product with Serializable

    Permalink
    Definition Classes
    SpecializeTypes
  8. class Phase extends InfoTransform.Phase

    Permalink
    Definition Classes
    InfoTransform
  9. case class SpecialOverload(original: Global.Symbol, env: TypeEnv) extends SpecializedInfo with Product with Serializable

    Permalink

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

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

    Definition Classes
    SpecializeTypes
  10. case class SpecialOverride(target: Global.Symbol) extends SpecializedInfo with Product with Serializable

    Permalink

    Symbol is a specialized override paired with target.

    Symbol is a specialized override paired with target.

    Definition Classes
    SpecializeTypes
  11. case class SpecialSuperAccessor(t: Global.Symbol) extends SpecializedInfo with Product with Serializable

    Permalink

    Symbol is a special overload of the super accessor.

    Symbol is a special overload of the super accessor.

    Definition Classes
    SpecializeTypes
  12. class SpecializationDuplicator extends Duplicator

    Permalink

    Introduced to fix SI-7343: Phase ordering problem between Duplicators and Specialization.

    Introduced to fix SI-7343: Phase ordering problem between Duplicators and Specialization. brief explanation: specialization rewires class parents during info transformation, and the new info then guides the tree changes. But if a symbol is created during duplication, which runs after specialization, its info is not visited and thus the corresponding tree is not specialized. One manifestation is the following: object Test { class Parent[@specialized(Int) T]

    def spec_method[@specialized(Int) T](t: T, expectedXSuper: String) = { class X extends Parent[T]() // even in the specialized variant, the local X class // doesn't extend Parent$mcI$sp, since its symbol has // been created after specialization and was not seen // by specialization's info transformer. ... } } We fix this by forcing duplication to take place before specialization.

    Note: The constructors phase (which also uses duplication) comes after erasure and uses the post-erasure typer => we must protect it from the beforeSpecialization phase shifting.

    Definition Classes
    SpecializeTypes
  13. class SpecializationPhase extends Phase

    Permalink
    Definition Classes
    SpecializeTypes
  14. class SpecializationTransformer extends Global.Transformer

    Permalink
    Definition Classes
    SpecializeTypes
  15. case class SpecializedAccessor(target: Global.Symbol) extends SpecializedInfo with Product with Serializable

    Permalink

    Symbol is a specialized accessor for the target field.

    Symbol is a specialized accessor for the target field.

    Definition Classes
    SpecializeTypes
  16. abstract class SpecializedInfo extends AnyRef

    Permalink
    Definition Classes
    SpecializeTypes
  17. case class SpecializedInnerClass(target: Global.Symbol, env: TypeEnv) extends SpecializedInfo with Product with Serializable

    Permalink

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

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

    Definition Classes
    SpecializeTypes
  18. abstract class StdPhase extends GlobalPhase

    Permalink

    A standard phase template

    A standard phase template

    Definition Classes
    SubComponent
  19. type TypeEnv = Map[Global.Symbol, Global.Type]

    Permalink
    Definition Classes
    SpecializeTypes
  20. abstract class TypingTransformer extends Global.Transformer

    Permalink
    Definition Classes
    TypingTransformers

Value Members

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

    Permalink

    Test two objects for inequality.

    Test two objects for inequality.

    returns

    true if !(this == that), false otherwise.

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

    Permalink

    Equivalent to x.hashCode except for boxed numeric types and null.

    Equivalent to x.hashCode except for boxed numeric types and null. For numerics, it returns a hash value which is consistent with value equality: if two value type instances compare as true, then ## will produce the same hash value for each of them. For null returns a hashcode where null.hashCode throws a NullPointerException.

    returns

    a hash value consistent with ==

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

    Permalink

    The expression x == that is equivalent to if (x eq null) that eq null else x.equals(that).

    The expression x == that is equivalent to if (x eq null) that eq null else x.equals(that).

    returns

    true if the receiver object is equivalent to the argument; false otherwise.

    Definition Classes
    AnyRef → Any
  4. object TypeEnv

    Permalink
    Definition Classes
    SpecializeTypes
  5. object UnifyError extends Throwable with ControlThrowable with Product with Serializable

    Permalink
    Definition Classes
    SpecializeTypes
  6. def addConcreteSpecMethod(m: Global.Symbol): Unit

    Permalink

    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.

    Definition Classes
    SpecializeTypes
    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!

  7. final def afterOwnPhase[T](op: ⇒ T): T

    Permalink
    Definition Classes
    SubComponent
    Annotations
    @inline()
  8. final def asInstanceOf[T0]: T0

    Permalink

    Cast the receiver object to be of type T0.

    Cast the receiver object to be of type T0.

    Note that the success of a cast at runtime is modulo Scala's erasure semantics. Therefore the expression 1.asInstanceOf[String] will throw a ClassCastException at runtime, while the expression List(1).asInstanceOf[List[String]] will not. In the latter example, because the type argument is erased as part of compilation it is not possible to check whether the contents of the list are of the requested type.

    returns

    the receiver object.

    Definition Classes
    Any
    Exceptions thrown

    ClassCastException if the receiver object is not an instance of the erasure of type T0.

  9. final def beforeOwnPhase[T](op: ⇒ T): T

    Permalink
    Definition Classes
    SubComponent
    Annotations
    @inline()
  10. def changesBaseClasses: Boolean

    Permalink

    This phase changes base classes.

    This phase changes base classes.

    Definition Classes
    SpecializeTypesInfoTransform
  11. def clone(): AnyRef

    Permalink

    Create a copy of the receiver object.

    Create a copy of the receiver object.

    The default implementation of the clone method is platform dependent.

    returns

    a copy of the receiver object.

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
    Note

    not specified by SLS as a member of AnyRef

  12. def concreteTypes(sym: Global.Symbol): List[Global.Type]

    Permalink

    Return the types sym should be specialized at.

    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.

    Definition Classes
    SpecializeTypes
  13. def emptyEnv: TypeEnv

    Permalink
    Definition Classes
    SpecializeTypes
  14. def enabled: Boolean

    Permalink

    Is this component enabled? Default is true.

    Is this component enabled? Default is true.

    Definition Classes
    SubComponent
  15. final def eq(arg0: AnyRef): Boolean

    Permalink

    Tests whether the argument (that) is a reference to the receiver object (this).

    Tests whether the argument (that) is a reference to the receiver object (this).

    The eq method implements an equivalence relation on non-null instances of AnyRef, and has three additional properties:

    • It is consistent: for any non-null instances x and y of type AnyRef, multiple invocations of x.eq(y) consistently returns true or consistently returns false.
    • For any non-null instance x of type AnyRef, x.eq(null) and null.eq(x) returns false.
    • null.eq(null) returns true.

    When overriding the equals or hashCode methods, it is important to ensure that their behavior is consistent with reference equality. Therefore, if two objects are references to each other (o1 eq o2), they should be equal to each other (o1 == o2) and they should hash to the same value (o1.hashCode == o2.hashCode).

    returns

    true if the argument is a reference to the receiver object; false otherwise.

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

    Permalink

    The equality method for reference types.

    The equality method for reference types. Default implementation delegates to eq.

    See also equals in scala.Any.

    returns

    true if the receiver object is equivalent to the argument; false otherwise.

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

    Permalink

    Called by the garbage collector on the receiver object when there are no more references to the object.

    Called by the garbage collector on the receiver object when there are no more references to the object.

    The details of when and if the finalize method is invoked, as well as the interaction between finalize and non-local returns and exceptions, are all platform dependent.

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
    Note

    not specified by SLS as a member of AnyRef

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

    Permalink

    A representation that corresponds to the dynamic class of the receiver object.

    A representation that corresponds to the dynamic class of the receiver object.

    The nature of the representation is platform dependent.

    returns

    a representation that corresponds to the dynamic class of the receiver object.

    Definition Classes
    AnyRef → Any
    Note

    not specified by SLS as a member of AnyRef

  19. val global: Global.this.type

    Permalink

    The global environment; overridden by instantiation in Global.

    The global environment; overridden by instantiation in Global.

    Definition Classes
    specializeTypesTypingTransformersSubComponent
  20. def hasSpecializedParams(clazz: Global.Symbol): Boolean

    Permalink

    Has clazz any type parameters that need be specialized?

    Has clazz any type parameters that need be specialized?

    Definition Classes
    SpecializeTypes
  21. def hashCode(): Int

    Permalink

    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

    returns

    the hash code value for this object.

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

    Permalink
    Definition Classes
    SpecializeTypes
  23. val initial: Boolean

    Permalink

    True if this phase runs before all other phases.

    True if this phase runs before all other phases. Usually, parser.

    Definition Classes
    SubComponent
  24. val internal: Boolean

    Permalink

    True if this phase is not provided by a plug-in.

    True if this phase is not provided by a plug-in.

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

    Permalink

    Test whether the dynamic type of the receiver object is T0.

    Test whether the dynamic type of the receiver object is T0.

    Note that the result of the test is modulo Scala's erasure semantics. Therefore the expression 1.isInstanceOf[String] will return false, while the expression List(1).isInstanceOf[List[String]] will return true. In the latter example, because the type argument is erased as part of compilation it is not possible to check whether the contents of the list are of the specified type.

    returns

    true if the receiver object is an instance of erasure of type T0; false otherwise.

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

    Permalink
    Definition Classes
    SpecializeTypes
  27. def keepsTypeParams: Boolean

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

    Permalink

    Equivalent to !(this eq that).

    Equivalent to !(this eq that).

    returns

    true if the argument is not a reference to the receiver object; false otherwise.

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

    Permalink

    Just to mark uncheckable

    Just to mark uncheckable

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

    Permalink

    The transformer factory

    The transformer factory

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

    Permalink

    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.

    Definition Classes
    SpecializeTypes
  32. final def notify(): Unit

    Permalink

    Wakes up a single thread that is waiting on the receiver object's monitor.

    Wakes up a single thread that is waiting on the receiver object's monitor.

    Definition Classes
    AnyRef
    Note

    not specified by SLS as a member of AnyRef

  33. final def notifyAll(): Unit

    Permalink

    Wakes up all threads that are waiting on the receiver object's monitor.

    Wakes up all threads that are waiting on the receiver object's monitor.

    Definition Classes
    AnyRef
    Note

    not specified by SLS as a member of AnyRef

  34. def originalClass(clazz: Global.Symbol): Global.Symbol

    Permalink

    Return the generic class corresponding to this specialized class.

    Return the generic class corresponding to this specialized class.

    Definition Classes
    SpecializeTypes
  35. def ownPhase: nsc.Phase

    Permalink

    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

    Permalink

    the name of the phase:

    the name of the phase:

    Definition Classes
    SpecializeTypesSubComponent
  37. def phaseNewFlags: Long

    Permalink

    The following flags may be set by this phase:

    The following flags may be set by this phase:

    Definition Classes
    SpecializeTypesSubComponent
  38. def phaseNextFlags: Long

    Permalink

    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. def produceTypeParameters(syms: List[Global.Symbol], nowner: Global.Symbol, env: TypeEnv): collection.immutable.List[Global.Symbol]

    Permalink

    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.

    Definition Classes
    SpecializeTypes
  40. val requires: List[String]

    Permalink

    Names of phases required by this component.

    Names of phases required by this component. Default is Nil.

    Definition Classes
    SubComponent
  41. val runsAfter: collection.immutable.List[String]

    Permalink

    Names of phases that must run before this phase.

    Names of phases that must run before this phase.

    Definition Classes
    specializeTypesSubComponent
  42. val runsBefore: List[String]

    Permalink

    Names of phases that must run after this phase.

    Names of phases that must run after this phase. Default is Nil.

    Definition Classes
    SubComponent
  43. val runsRightAfter: Some[String]

    Permalink

    Name of the phase that this phase must follow immediately.

    Name of the phase that this phase must follow immediately.

    Definition Classes
    specializeTypesSubComponent
  44. def satisfiabilityConstraints(env: TypeEnv): Option[TypeEnv]

    Permalink
    Definition Classes
    SpecializeTypes
  45. def satisfiable(env: TypeEnv, warnings: Boolean): Boolean

    Permalink
    Definition Classes
    SpecializeTypes
  46. def satisfiable(env: TypeEnv): Boolean

    Permalink

    The type environment is sound w.r.t.

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

    Definition Classes
    SpecializeTypes
  47. lazy val specializableTypes: collection.immutable.List[Global.Type]

    Permalink
    Definition Classes
    SpecializeTypes
  48. def specializeCalls(unit: Global.CompilationUnit): TypingTransformer { ... /* 7 definitions in type refinement */ }

    Permalink
    Definition Classes
    SpecializeTypes
  49. def specializeClass(clazz: Global.Symbol, outerEnv: TypeEnv): List[Global.Symbol]

    Permalink

    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.

    Definition Classes
    SpecializeTypes
  50. val specializedClass: HashMap[(Global.Symbol, TypeEnv), Global.Symbol]

    Permalink

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

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

    Definition Classes
    SpecializeTypes
  51. def specializedFunctionName(sym: Global.Symbol, args: List[Global.Type]): reflect.internal.Symbols.Symbol.NameType

    Permalink
    Definition Classes
    SpecializeTypes
  52. def specializedParams(sym: Global.Symbol): List[Global.Symbol]

    Permalink

    Return specialized type parameters.

    Return specialized type parameters.

    Definition Classes
    SpecializeTypes
  53. val specializedType: Global.TypeMap

    Permalink
    Definition Classes
    SpecializeTypes
  54. def specializedTypeVars(tpe: Global.Type): Set[Global.Symbol]

    Permalink

    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])
    Definition Classes
    SpecializeTypes
  55. def specializedTypeVars(sym: Global.Symbol): Set[Global.Symbol]

    Permalink
    Definition Classes
    SpecializeTypes
  56. def specializedTypeVars(tpes: List[Global.Type]): Set[Global.Symbol]

    Permalink
    Definition Classes
    SpecializeTypes
  57. def specializesClass(sym: Global.Symbol): Global.Symbol

    Permalink

    If the symbol is the companion of a value class, the value class.

    If the symbol is the companion of a value class, the value class. Otherwise, AnyRef.

    Definition Classes
    SpecializeTypes
  58. def survivingArgs(sym: Global.Symbol, args: List[Global.Type]): List[Global.Type]

    Permalink

    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.

    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.

    Definition Classes
    SpecializeTypes
  59. def survivingParams(params: List[Global.Symbol], env: TypeEnv): collection.immutable.List[Global.Symbol]

    Permalink

    Type parameters that survive when specializing in the specified environment.

    Type parameters that survive when specializing in the specified environment.

    Definition Classes
    SpecializeTypes
  60. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  61. val terminal: Boolean

    Permalink

    True if this phase runs after all other phases.

    True if this phase runs after all other phases. Usually, terminal.

    Definition Classes
    SubComponent
  62. def toString(): String

    Permalink

    Creates a String representation of this object.

    Creates a String representation of this object. The default representation is platform dependent. On the java platform it is the concatenation of the class name, "@", and the object's hashcode in hexadecimal.

    returns

    a String representation of the object.

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

    Permalink

    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
  64. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from SpecializeTypes

Inherited from TypingTransformers

Inherited from InfoTransform

Inherited from Transform

Inherited from SubComponent

Inherited from AnyRef

Inherited from Any

Ungrouped