File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
compiler/src/dotty/tools/backend/jvm Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder {
3939 import coreBTypes ._
4040 import BCodeBodyBuilder ._
4141
42- private val primitives = new DottyPrimitives (ctx)
42+ protected val primitives : DottyPrimitives
4343
4444 /*
4545 * Functionality to build the body of ASM MethodNode, except for `synchronized` and `try` expressions.
Original file line number Diff line number Diff line change @@ -50,9 +50,13 @@ class GenBCode extends Phase {
5050 myOutput
5151 }
5252
53+ private var myPrimitives : DottyPrimitives = null
54+
5355 def run (using Context ): Unit =
54- GenBCodePipeline (
55- DottyBackendInterface (outputDir, superCallsMap)
56+ if myPrimitives == null then myPrimitives = new DottyPrimitives (ctx)
57+ new GenBCodePipeline (
58+ DottyBackendInterface (outputDir, superCallsMap),
59+ myPrimitives
5660 ).run(ctx.compilationUnit.tpdTree)
5761
5862
@@ -74,7 +78,7 @@ object GenBCode {
7478 val name : String = " genBCode"
7579}
7680
77- class GenBCodePipeline (val int : DottyBackendInterface )(using Context ) extends BCodeSyncAndTry {
81+ class GenBCodePipeline (val int : DottyBackendInterface , val primitives : DottyPrimitives )(using Context ) extends BCodeSyncAndTry {
7882 import DottyBackendInterface .symExtensions
7983
8084 private var tree : Tree = _
You can’t perform that action at this time.
0 commit comments