Packages

  • package root
    Definition Classes
    root
  • package scala
    Definition Classes
    root
  • package tools
    Definition Classes
    scala
  • package nsc
    Definition Classes
    tools
  • package backend
    Definition Classes
    nsc
  • package jvm
    Definition Classes
    backend
  • abstract class GenBCode extends SubComponent

    Some notes about the backend's state and its initialization and release.

    Some notes about the backend's state and its initialization and release.

    State that is used in a single run is allocated through recordPerRunCache, for example ByteCodeRepository.compilingClasses or CallGraph.callsites. This state is cleared at the end of each run.

    Some state needs to be re-initialized per run, for example CoreBTypes (computed from Symbols / Types) or the GeneratedClassHandler (depends on the compiler settings). This state is (re-) initialized in the GenBCode.initialize method. There two categories:

    1. State that is stored in a var field and (re-) assigned in the initialize method, for example the GeneratedClassHandler 2. State that uses the PerRunInit / bTypes.perRunLazy / LazyVar infrastructure, for example the types in CoreBTypes

    The reason to use the LazyVar infrastructure is to prevent eagerly computing all the state even if it's never used in a run. It can also be used to work around initialization ordering issues, just like ordinary lazy vals. For state that is known to be accessed, a var field is just fine.

    Typical LazyVar use: lazy val state: LazyVar[T] = perRunLazy(component)(initializer)

    • The initializer expression is executed lazily
    • When the initializer actually runs, it synchronizes on the PostProcessorFrontendAccess.frontendLock
    • The component.initialize method causes the LazyVar to be re-initialized on the next get
    • The state is itself a lazy val to make sure the component.initialize method only clears those LazyVars that were ever accessed

    TODO: convert some uses of LazyVar to ordinary var.

    Definition Classes
    jvm
  • BCodePhase
  • StdPhase

class BCodePhase extends StdPhase

Linear Supertypes
GenBCode.StdPhase, GlobalPhase, reflect.internal.Phase, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BCodePhase
  2. StdPhase
  3. GlobalPhase
  4. Phase
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new BCodePhase(prev: Phase)

Type Members

  1. type Id = Int
    Definition Classes
    Phase

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. def apply(unit: Global.CompilationUnit): Unit
    Definition Classes
    BCodePhaseGlobalPhase
  5. final def applyPhase(unit: Global.CompilationUnit): Unit
    Definition Classes
    GlobalPhase
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. final val assignsFields: Boolean
    Definition Classes
    Phase
  8. def cancelled(unit: Global.CompilationUnit): Boolean

    Is current phase cancelled on this unit?

    Is current phase cancelled on this unit?

    Definition Classes
    GlobalPhase
  9. def checkable: Boolean
    Definition Classes
    Phase
  10. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  11. def description: String
    Definition Classes
    BCodePhase → Phase
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(other: Any): Boolean
    Definition Classes
    Phase → AnyRef → Any
  14. final def erasedTypes: Boolean
    Definition Classes
    Phase
  15. def erasedTypes_=(value: Boolean): Unit
    Attributes
    protected
    Definition Classes
    Phase
  16. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. def flagMask: Long
    Definition Classes
    Phase
  18. final val flatClasses: Boolean
    Definition Classes
    Phase
  19. val fmask: Long
    Definition Classes
    Phase
  20. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  21. def hasNext: Boolean
    Definition Classes
    Phase
  22. def hashCode(): Int
    Definition Classes
    Phase → AnyRef → Any
  23. val id: Id
    Definition Classes
    Phase
  24. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  25. def iterator: collection.Iterator[reflect.internal.Phase]
    Definition Classes
    Phase
  26. def keepsTypeParams: Boolean
    Definition Classes
    Phase
  27. def name: String
    Definition Classes
    StdPhase → Phase
  28. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  29. def newFlags: Long
    Definition Classes
    StdPhase → Phase
  30. def next: reflect.internal.Phase
    Definition Classes
    Phase
  31. def nextFlags: Long
    Definition Classes
    StdPhase → Phase
  32. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  33. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  34. val prev: reflect.internal.Phase
    Definition Classes
    Phase
  35. final val refChecked: Boolean
    Definition Classes
    Phase
  36. def run(): Unit
    Definition Classes
    BCodePhaseGlobalPhase → Phase
  37. def shouldSkipThisPhaseForJava: Boolean
    Attributes
    protected
    Definition Classes
    GlobalPhase
  38. final val specialized: Boolean
    Definition Classes
    Phase
  39. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  40. def toString(): String
    Definition Classes
    Phase → AnyRef → Any
  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( ... ) @native()
  44. final def withCurrentUnitNoLog(unit: Global.CompilationUnit)(task: ⇒ Unit): Unit
    Definition Classes
    GlobalPhase
    Annotations
    @inline()
  45. def writeOtherFiles(): Unit

Deprecated Value Members

  1. final def withCurrentUnit(unit: Global.CompilationUnit)(task: ⇒ Unit): Unit
    Definition Classes
    GlobalPhase
    Annotations
    @deprecated
    Deprecated

Inherited from GenBCode.StdPhase

Inherited from GlobalPhase

Inherited from reflect.internal.Phase

Inherited from AnyRef

Inherited from Any

Ungrouped