Skip to content

Commit be49502

Browse files
authored
More JVM backend cleanup (#25747)
Part of #25218 - Like the rest of the compiler, use `Context` in methods, do not capture it inside classes - Includes splitting `CoreBTypes` into `BTypeLoader` and `WellKnownBTypes`; the latter is what `CoreBTypesFromSymbols` used to be, minus loading stuff that went into the former. Only the latter captures a Context (and it's the only remaining class to do so). - This means we can stop modifying (!) the `Context` in `GenBCode` - We also no longer need to lock while calling `genClassDef` (it isn't supposed to be multi-threaded anyway, but right now on main if you remove the lock all hell breaks loose) - Remove remaining JVM backend references from the frontend. - Simplify code, delete dead code, etc. We can't quite remove `frontendLock` / PPFA yet, as this happens if we do: ``` [info] Test dotty.tools.dotc.CompilationTests.parallelBackend started [ ] completed (0/7, 0 failed, 1s)Error while emitting gopher/OChannel Cyclic reference involving class LambdaDeserialize Run with -explain-cyclic for more details. Compilation failed for: 'compiling 'tests/pos/i10477' in test 'parallelBackend'' [=================================> ] completed (6/7, 1 failed, 4s)Error while emitting adts/t2$Option$ Cyclic reference involving class LambdaMetafactory Run with -explain-cyclic for more details. [=================================> ] completed (6/7, 1 failed, 4s)Compilation failed for: 'compiling 'tests/pos/reference' in test 'parallelBackend'' [=======================================>] completed (7/7, 2 failed, 4s) ``` ## How much have you relied on LLM-based tools in this contribution? not ## How was the solution tested? existing tests, this is a pure refactoring
1 parent 5ad714f commit be49502

41 files changed

Lines changed: 1688 additions & 2274 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

compiler/src/dotty/tools/backend/jvm/BCodeAsmCommon.scala

Lines changed: 0 additions & 117 deletions
This file was deleted.

0 commit comments

Comments
 (0)