11package dotty .tools .backend .jvm
22
3- import scala .collection .mutable .Clearable
3+ import scala .collection .mutable .{ Clearable , HashSet }
44import dotty .tools .dotc .util .*
55import dotty .tools .io .AbstractFile
66import java .util .{Collection => JCollection , Map => JMap }
@@ -20,7 +20,7 @@ sealed abstract class PostProcessorFrontendAccess {
2020 def getEntryPoints : List [String ]
2121
2222 private val frontendLock : AnyRef = new Object ()
23- @ inline final def frontendSynch [T ](x : => T ): T = frontendLock.synchronized (x)
23+ inline final def frontendSynch [T ](inline x : => T ): T = frontendLock.synchronized (x)
2424}
2525
2626object PostProcessorFrontendAccess {
@@ -35,11 +35,12 @@ object PostProcessorFrontendAccess {
3535 }
3636
3737 sealed trait BackendReporting {
38- def error (message : String , pos : SourcePosition ): Unit
38+ def error (message : String ): Unit
39+ def warning (message : String ): Unit
3940 def log (message : String ): Unit
4041 }
4142
42- class Impl [I <: DottyBackendInterface ](val int : I ) extends PostProcessorFrontendAccess {
43+ class Impl [I <: DottyBackendInterface ](val int : I , entryPoints : HashSet [ String ] ) extends PostProcessorFrontendAccess {
4344 import int .given
4445 lazy val compilerSettings : CompilerSettings = buildCompilerSettings()
4546
@@ -67,13 +68,11 @@ object PostProcessorFrontendAccess {
6768 }
6869
6970 object backendReporting extends BackendReporting {
70- def error (message : String , pos : SourcePosition ): Unit = frontendSynch(report.error(message, pos))
71+ def error (message : String ): Unit = frontendSynch(report.error(message, NoSourcePosition ))
72+ def warning (message : String ): Unit = frontendSynch(report.warning(message, NoSourcePosition ))
7173 def log (message : String ): Unit = frontendSynch(report.log(message))
7274 }
7375
74- def getEntryPoints : List [String ] = frontendSynch(Phases .genBCodePhase match {
75- case genBCode : GenBCode => genBCode.entryPoints.toList
76- case _ => Nil
77- })
76+ def getEntryPoints : List [String ] = frontendSynch(entryPoints.toList)
7877 }
7978}
0 commit comments