Skip to content

Commit

Permalink
Merge pull request #10737 from guqicun/2.13.x
Browse files Browse the repository at this point in the history
chore: remove repetitive words
  • Loading branch information
SethTisue committed Apr 8, 2024
2 parents ef341f4 + f8ccfc5 commit 25818df
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion doc/internal/tastyreader.md
Expand Up @@ -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:
Expand Down
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/scala/tools/nsc/javac/JavaParsers.scala
Expand Up @@ -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
Expand Down
Expand Up @@ -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) {
Expand Down
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/library/scala/collection/mutable/ArrayBuffer.scala
Expand Up @@ -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
Expand Down

0 comments on commit 25818df

Please sign in to comment.