@@ -9,6 +9,7 @@ import Contexts._
99import Symbols ._
1010import dotty .tools .io ._
1111import scala .collection .mutable
12+ import scala .compiletime .uninitialized
1213
1314class GenBCode extends Phase { self =>
1415
@@ -25,7 +26,7 @@ class GenBCode extends Phase { self =>
2526 private val entryPoints = new mutable.HashSet [String ]()
2627 def registerEntryPoint (s : String ): Unit = entryPoints += s
2728
28- private var _backendInterface : DottyBackendInterface = _
29+ private var _backendInterface : DottyBackendInterface = uninitialized
2930 def backendInterface (using ctx : Context ): DottyBackendInterface = {
3031 if _backendInterface eq null then
3132 // Enforce usage of FreshContext so we would be able to modify compilation unit between runs
@@ -36,7 +37,7 @@ class GenBCode extends Phase { self =>
3637 _backendInterface
3738 }
3839
39- private var _codeGen : CodeGen = _
40+ private var _codeGen : CodeGen = uninitialized
4041 def codeGen (using Context ): CodeGen = {
4142 if _codeGen eq null then
4243 val int = backendInterface
@@ -45,28 +46,28 @@ class GenBCode extends Phase { self =>
4546 _codeGen
4647 }
4748
48- private var _bTypes : BTypesFromSymbols [DottyBackendInterface ] = _
49+ private var _bTypes : BTypesFromSymbols [DottyBackendInterface ] = uninitialized
4950 def bTypes (using Context ): BTypesFromSymbols [DottyBackendInterface ] = {
5051 if _bTypes eq null then
5152 _bTypes = BTypesFromSymbols (backendInterface, frontendAccess)
5253 _bTypes
5354 }
5455
55- private var _frontendAccess : PostProcessorFrontendAccess | Null = _
56+ private var _frontendAccess : PostProcessorFrontendAccess | Null = uninitialized
5657 def frontendAccess (using Context ): PostProcessorFrontendAccess = {
5758 if _frontendAccess eq null then
5859 _frontendAccess = PostProcessorFrontendAccess .Impl (backendInterface, entryPoints)
5960 _frontendAccess.nn
6061 }
6162
62- private var _postProcessor : PostProcessor | Null = _
63+ private var _postProcessor : PostProcessor | Null = uninitialized
6364 def postProcessor (using Context ): PostProcessor = {
6465 if _postProcessor eq null then
6566 _postProcessor = new PostProcessor (frontendAccess, bTypes)
6667 _postProcessor.nn
6768 }
6869
69- private var _generatedClassHandler : GeneratedClassHandler | Null = _
70+ private var _generatedClassHandler : GeneratedClassHandler | Null = uninitialized
7071 def generatedClassHandler (using Context ): GeneratedClassHandler = {
7172 if _generatedClassHandler eq null then
7273 _generatedClassHandler = GeneratedClassHandler (postProcessor)
0 commit comments