Skip to content

Commit 0b96142

Browse files
committed
Fix comment and remove spurious end-of-line whitespaces
1 parent e412269 commit 0b96142

7 files changed

+19
-19
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class BTypesFromSymbols[I <: DottyBackendInterface](val int: I, val frontendAcce
3636
}
3737
import coreBTypes._
3838

39-
@threadUnsafe protected lazy val classBTypeFromInternalNameMap =
39+
@threadUnsafe protected lazy val classBTypeFromInternalNameMap =
4040
collection.concurrent.TrieMap.empty[String, ClassBType]
4141

4242
/**

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class BackendUtils(val postProcessor: PostProcessor) {
3535
case "18" => asm.Opcodes.V18
3636
case "19" => asm.Opcodes.V19
3737
}
38-
38+
3939
lazy val extraProc: Int = {
4040
import GenBCodeOps.addFlagIf
4141
val majorVersion: Int = (classfileVersion & 0xFF)
@@ -160,7 +160,7 @@ class BackendUtils(val postProcessor: PostProcessor) {
160160
* `refedInnerClasses` may contain duplicates, need not contain the enclosing inner classes of
161161
* each inner class it lists (those are looked up and included).
162162
*
163-
* This method serializes in the InnerClasses JVM attribute in an appropriate order,
163+
* This method serializes in the InnerClasses JVM attribute in an appropriate order,
164164
* not necessarily that given by `refedInnerClasses`.
165165
*
166166
* can-multi-thread

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import scala.language.unsafeNulls
1515

1616
class ClassfileWriter(frontendAccess: PostProcessorFrontendAccess) {
1717
import frontendAccess.{backendReporting, compilerSettings}
18-
18+
1919
// if non-null, classfiles are additionally written to this directory
2020
private val dumpOutputDir: AbstractFile = getDirectoryOrNull(compilerSettings.dumpClassesDirectory)
2121

@@ -35,17 +35,17 @@ class ClassfileWriter(frontendAccess: PostProcessorFrontendAccess) {
3535
None
3636
}
3737
}
38-
jar.underlyingSource.map{ source =>
39-
if jar.isEmpty then
38+
jar.underlyingSource.map{ source =>
39+
if jar.isEmpty then
4040
val jarMainAttrs = mainClass.map(Name.MAIN_CLASS -> _).toList
4141
new Jar(source.file).jarWriter(jarMainAttrs: _*)
4242
else
43-
// Writing to non-empty JAR might be an undefined behaviour, e.g. in case if other files where
43+
// Writing to non-empty JAR might be an undefined behaviour, e.g. in case if other files where
4444
// created using `AbstractFile.bufferedOutputStream`instead of JarWritter
4545
backendReporting.warning(s"Tried to write to non-empty JAR: $source")
4646
null
4747
}.orNull
48-
48+
4949
case _ => null
5050
}
5151

@@ -113,7 +113,7 @@ class ClassfileWriter(frontendAccess: PostProcessorFrontendAccess) {
113113

114114
def writeTasty(className: InternalName, bytes: Array[Byte]): Unit =
115115
writeToJarOrFile(className, bytes, ".tasty")
116-
116+
117117
private def writeToJarOrFile(className: InternalName, bytes: Array[Byte], suffix: String): AbstractFile | Null = {
118118
if jarWriter == null then
119119
val outFolder = compilerSettings.outputDirectory
@@ -124,7 +124,7 @@ class ClassfileWriter(frontendAccess: PostProcessorFrontendAccess) {
124124
catch case _: Throwable => ()
125125
finally throw ex
126126
outFile
127-
else
127+
else
128128
val path = className + suffix
129129
val out = jarWriter.newOutputStream(path)
130130
try out.write(bytes, 0, bytes.length)

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,13 +185,13 @@ abstract class GenericSignatureVisitor(nestedOnly: Boolean) {
185185
}
186186

187187
// Backported from scala/scala, commit sha: 724be0e9425b9ad07c244d25efdad695d75abbcf
188-
// https://github.com/scala/scala/blob/724be0e9425b9ad07c244d25efdad695d75abbcf/src/compiler/scala/tools/nsc/backend/jvm/analysis/BackendUtils.scala#L790
188+
// https://github.com/scala/scala/blob/724be0e9425b9ad07c244d25efdad695d75abbcf/src/compiler/scala/tools/nsc/backend/jvm/analysis/BackendUtils.scala#L790
189189
abstract class NestedClassesCollector[T](nestedOnly: Boolean) extends GenericSignatureVisitor(nestedOnly) {
190-
type InternalName = String
190+
type InternalName = String
191191

192192
def declaredNestedClasses(internalName: InternalName): List[T]
193193
def getClassIfNested(internalName: InternalName): Option[T]
194-
194+
195195
val declaredInnerClasses = mutable.Set.empty[T]
196196
val referredInnerClasses = mutable.Set.empty[T]
197197

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,19 @@ class PostProcessor(val frontendAccess: PostProcessorFrontendAccess, val bTypes:
1616
import bTypes.*
1717
import frontendAccess.{backendReporting, compilerSettings}
1818
import int.given
19-
19+
2020
val backendUtils = new BackendUtils(this)
2121
val classfileWriter = ClassfileWriter(frontendAccess)
2222

2323
def postProcessAndSendToDisk(generatedDefs: GeneratedDefs): Unit = {
2424
val GeneratedDefs(classes, tasty) = generatedDefs
2525
for (GeneratedClass(classNode, sourceFile, isArtifact, onFileCreated) <- classes) {
26-
val bytes =
27-
try
26+
val bytes =
27+
try
2828
if !isArtifact then setSerializableLambdas(classNode)
2929
setInnerClasses(classNode)
3030
serializeClass(classNode)
31-
catch
31+
catch
3232
case e: java.lang.RuntimeException if e.getMessage != null && e.getMessage.nn.contains("too large!") =>
3333
backendReporting.error(s"Could not write class ${classNode.name} because it exceeds JVM code size limits. ${e.getMessage}")
3434
null

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ object PostProcessorFrontendAccess {
4646

4747
private def buildCompilerSettings(): CompilerSettings = new CompilerSettings {
4848
extension [T](s: dotty.tools.dotc.config.Settings.Setting[T])
49-
def valueSetByUser: Option[T] =
49+
def valueSetByUser: Option[T] =
5050
Option(s.value).filter(_ != s.default)
5151
def s = ctx.settings
5252

compiler/src/dotty/tools/dotc/config/ScalaSettings.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import scala.util.chaining._
1515
class ScalaSettings extends SettingGroup with AllScalaSettings
1616

1717
object ScalaSettings:
18-
// Keep synchronized with `classfileVersion` in `BCodeIdiomatic`
18+
// Keep synchronized with `classfileVersion` in `BackendUtils`
1919
private val minTargetVersion = 8
2020
private val maxTargetVersion = 19
2121

0 commit comments

Comments
 (0)