File tree 2 files changed +8
-4
lines changed
compiler/src/dotty/tools/backend/jvm
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 {
39
39
import coreBTypes ._
40
40
import BCodeBodyBuilder ._
41
41
42
- private val primitives = new DottyPrimitives (ctx)
42
+ protected val primitives : DottyPrimitives
43
43
44
44
/*
45
45
* 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 {
50
50
myOutput
51
51
}
52
52
53
+ private var myPrimitives : DottyPrimitives = null
54
+
53
55
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
56
60
).run(ctx.compilationUnit.tpdTree)
57
61
58
62
@@ -74,7 +78,7 @@ object GenBCode {
74
78
val name : String = " genBCode"
75
79
}
76
80
77
- class GenBCodePipeline (val int : DottyBackendInterface )(using Context ) extends BCodeSyncAndTry {
81
+ class GenBCodePipeline (val int : DottyBackendInterface , val primitives : DottyPrimitives )(using Context ) extends BCodeSyncAndTry {
78
82
import DottyBackendInterface .symExtensions
79
83
80
84
private var tree : Tree = _
You can’t perform that action at this time.
0 commit comments