From f8ccfc541f691d3166883a877ce1ff3d9007c7a8 Mon Sep 17 00:00:00 2001 From: guqicun Date: Sat, 6 Apr 2024 18:44:16 +0800 Subject: [PATCH] chore: remove repetitive words Signed-off-by: guqicun --- doc/internal/tastyreader.md | 2 +- .../scala/tools/nsc/backend/jvm/ClassfileWriters.scala | 2 +- src/compiler/scala/tools/nsc/javac/JavaParsers.scala | 2 +- src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala | 2 +- .../scala/tools/nsc/transform/async/ExprBuilder.scala | 4 ++-- src/library/scala/collection/mutable/ArrayBuffer.scala | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/internal/tastyreader.md b/doc/internal/tastyreader.md index 2075f4885dc8..8f39f7815438 100644 --- a/doc/internal/tastyreader.md +++ b/doc/internal/tastyreader.md @@ -99,7 +99,7 @@ In the above, relative paths will be calculated from the working directory of `t Because these commands are run from sbt, incremental changes can be made to the code for the TASTy reader and then step `2` can be immediately re-run to observe new behaviour of the compiler. -In the output of the above step `2`, you will see the the following snippet, showing progress in traversing TASTy and understanding the definition of `trait Dull`: +In the output of the above step `2`, you will see the following snippet, showing progress in traversing TASTy and understanding the definition of `trait Dull`: ```scala #[trait Dull]: Addr(4) completing Symbol(trait Dull, #6286): #[trait Dull]: Addr(7) No symbol found at current address, ensuring one exists: diff --git a/src/compiler/scala/tools/nsc/backend/jvm/ClassfileWriters.scala b/src/compiler/scala/tools/nsc/backend/jvm/ClassfileWriters.scala index e5e3b80eddd5..764b04292824 100644 --- a/src/compiler/scala/tools/nsc/backend/jvm/ClassfileWriters.scala +++ b/src/compiler/scala/tools/nsc/backend/jvm/ClassfileWriters.scala @@ -268,7 +268,7 @@ abstract class ClassfileWriters { checkName(filePath.getFileName()) } - // the common case is that we are are creating a new file, and on MS Windows the create and truncate is expensive + // the common case is that we are creating a new file, and on MS Windows the create and truncate is expensive // because there is not an options in the windows API that corresponds to this so the truncate is applied as a separate call // even if the file is new. // as this is rare, its best to always try to create a new file, and it that fails, then open with truncate if that fails diff --git a/src/compiler/scala/tools/nsc/javac/JavaParsers.scala b/src/compiler/scala/tools/nsc/javac/JavaParsers.scala index f49162581d21..23897efecfe1 100644 --- a/src/compiler/scala/tools/nsc/javac/JavaParsers.scala +++ b/src/compiler/scala/tools/nsc/javac/JavaParsers.scala @@ -375,7 +375,7 @@ trait JavaParsers extends ast.parser.ParsersCommon with JavaScanners { * // We only support a subset of the Java syntax that can form constant expressions. * // https://docs.oracle.com/javase/specs/jls/se14/html/jls-15.html#jls-15.29 * // - * // Luckily, we can just parse matching `(` and `)` to find our way to the end of the the argument list. + * // Luckily, we can just parse matching `(` and `)` to find our way to the end of the argument list. * // and drop the arguments until we implement full support for Java constant expressions * // * ConditionalExpressionSubset := Literal diff --git a/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala b/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala index 172bde0caa29..2e6b12784f6d 100644 --- a/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala +++ b/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala @@ -607,7 +607,7 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers { // scala/bug#5545: Eliminate classes with the same name loaded from the bytecode already present - all we need to do is // to force .info on them, as their lazy type will be evaluated and the symbols will be eliminated. Unfortunately // evaluating the info after creating the specialized class will mess the specialized class signature, so we'd - // better unlink the the class-file backed symbol before creating the new class symbol + // better unlink the class-file backed symbol before creating the new class symbol val bytecodeClazz = clazz.owner.info.decl(clazzName) // debuglog("Specializing " + clazz + ", but found " + bytecodeClazz + " already there") def unlink(sym: Symbol): Unit = if (sym != NoSymbol) { diff --git a/src/compiler/scala/tools/nsc/transform/async/ExprBuilder.scala b/src/compiler/scala/tools/nsc/transform/async/ExprBuilder.scala index b21667673e7b..db1101495c65 100644 --- a/src/compiler/scala/tools/nsc/transform/async/ExprBuilder.scala +++ b/src/compiler/scala/tools/nsc/transform/async/ExprBuilder.scala @@ -312,7 +312,7 @@ trait ExprBuilder extends TransformUtils with AsyncAnalysis { buildStateAndOpenNextState(afterLabelState, style = StateTransitionStyle.None) } } else if (containsAwait(rhs)) { - // A while loop containing an await. We assuming that the the backward branch is reachable across the async + // A while loop containing an await. We assuming that the backward branch is reachable across the async // code path and create a state for the `while` label. // // In theory we could avoid creating this state in code like: @@ -632,7 +632,7 @@ trait ExprBuilder extends TransformUtils with AsyncAnalysis { } } - /** Update the state variable and jump to the the while loop that encloses the state machine. */ + /** Update the state variable and jump to the while loop that encloses the state machine. */ case object UpdateAndContinue extends StateTransitionStyle { def trees(nextState: Int, stateSet: StateSet): List[Tree] = { stateSet += nextState diff --git a/src/library/scala/collection/mutable/ArrayBuffer.scala b/src/library/scala/collection/mutable/ArrayBuffer.scala index 046cd6f6602c..14667924a63d 100644 --- a/src/library/scala/collection/mutable/ArrayBuffer.scala +++ b/src/library/scala/collection/mutable/ArrayBuffer.scala @@ -192,7 +192,7 @@ class ArrayBuffer[A] private (initialElements: Array[AnyRef], initialSize: Int) // the previous line // - `copyElemsToArray` will call `System.arraycopy` // - `System.arraycopy` will effectively "read" all the values before - // overwriting any of them when two arrays are the the same reference + // overwriting any of them when two arrays are the same reference val actual = IterableOnce.copyElemsToArray(elems, array.asInstanceOf[Array[Any]], index, elemsLength) if (actual != elemsLength) throw new IllegalStateException(s"Copied $actual of $elemsLength") size0 = len + elemsLength // update size AFTER the copy, in case we're inserting a proxy