forked from scala/scala
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
191 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/compiler/scala/tools/nsc/reporters/BufferedReporter.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package scala.tools.nsc.reporters | ||
|
||
import scala.reflect.internal.util.Parallel.{assertOnMain, assertOnWorker} | ||
import scala.reflect.internal.util.Position | ||
|
||
final class BufferedReporter extends Reporter { | ||
private[this] var buffered = List.empty[BufferedMessage] | ||
|
||
protected def info0(pos: Position, msg: String, severity: Severity, force: Boolean): Unit = { | ||
assertOnWorker() | ||
buffered = BufferedMessage(pos, msg, severity, force) :: buffered | ||
severity.count += 1 | ||
} | ||
|
||
def flushTo(reporter: Reporter): Unit = { | ||
assertOnMain() | ||
val sev = Array(reporter.INFO, reporter.WARNING, reporter.ERROR) | ||
buffered.reverse.foreach { | ||
msg => | ||
reporter.info1(msg.pos, msg.msg, sev(msg.severity.id), msg.force) | ||
} | ||
buffered = Nil | ||
} | ||
|
||
private case class BufferedMessage(pos: Position, msg: String, severity: Severity, force: Boolean) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 0 additions & 39 deletions
39
src/compiler/scala/tools/nsc/util/ThreadIdentityAwareThreadLocal.scala
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.