Skip to content

Commit

Permalink
Fix adaptation of context passed to DottyBackendInterface
Browse files Browse the repository at this point in the history
  • Loading branch information
WojciechMazur committed Dec 19, 2023
1 parent 6131a72 commit 9078bba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/backend/jvm/GenBCode.scala
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class GenBCode extends Phase { self =>
}

override def run(using Context): Unit =
frontendAccess.frontendSynch {
frontendAccess.frontendSynchWithoutContext {
backendInterface.ctx
.asInstanceOf[FreshContext]
.setCompilationUnit(ctx.compilationUnit)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ sealed abstract class PostProcessorFrontendAccess(backendInterface: DottyBackend

private val frontendLock: AnyRef = new Object()
inline final def frontendSynch[T](inline x: Context ?=> T): T = frontendLock.synchronized(x(using backendInterface.ctx))
inline final def frontendSynchWithoutContext[T](inline x: T): T = frontendLock.synchronized(x)
inline def perRunLazy[T](inline init: Context ?=> T): Lazy[T] = new Lazy(init)(using this)
}

Expand Down

0 comments on commit 9078bba

Please sign in to comment.