summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/BCodeBodyBuilder.scala10
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/opt/CallGraph.scala2
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/opt/LocalOpt.scala2
-rw-r--r--src/compiler/scala/tools/nsc/transform/Erasure.scala4
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/ConstantFolder.scala6
-rw-r--r--src/eclipse/README.md4
-rw-r--r--src/interactive/scala/tools/nsc/interactive/CompilerControl.scala4
-rw-r--r--src/library/scala/collection/GenTraversableOnce.scala2
-rw-r--r--src/library/scala/inline.scala2
-rw-r--r--src/library/scala/noinline.scala2
-rw-r--r--src/library/scala/util/Either.scala38
-rw-r--r--src/repl/scala/tools/nsc/interpreter/IMain.scala2
12 files changed, 39 insertions, 39 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/BCodeBodyBuilder.scala b/src/compiler/scala/tools/nsc/backend/jvm/BCodeBodyBuilder.scala
index bac84a4959..0b07e12917 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/BCodeBodyBuilder.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/BCodeBodyBuilder.scala
@@ -297,14 +297,14 @@ abstract class BCodeBodyBuilder extends BCodeSkelBuilder {
case app : Apply =>
generatedType = genApply(app, expectedType)
- case app @ ApplyDynamic(qual, Literal(Constant(boostrapMethodRef: Symbol)) :: staticAndDynamicArgs) =>
- val numStaticArgs = boostrapMethodRef.paramss.head.size - 3 /*JVM provided args*/
+ case app @ ApplyDynamic(qual, Literal(Constant(bootstrapMethodRef: Symbol)) :: staticAndDynamicArgs) =>
+ val numStaticArgs = bootstrapMethodRef.paramss.head.size - 3 /*JVM provided args*/
val (staticArgs, dynamicArgs) = staticAndDynamicArgs.splitAt(numStaticArgs)
- val boostrapDescriptor = staticHandleFromSymbol(boostrapMethodRef)
+ val bootstrapDescriptor = staticHandleFromSymbol(bootstrapMethodRef)
val bootstrapArgs = staticArgs.map({case t @ Literal(c: Constant) => bootstrapMethodArg(c, t.pos)})
val descriptor = methodBTypeFromMethodType(qual.symbol.info, false)
genLoadArguments(dynamicArgs, qual.symbol.info.params.map(param => typeToBType(param.info)))
- mnode.visitInvokeDynamicInsn(qual.symbol.name.encoded, descriptor.descriptor, boostrapDescriptor, bootstrapArgs : _*)
+ mnode.visitInvokeDynamicInsn(qual.symbol.name.encoded, descriptor.descriptor, bootstrapDescriptor, bootstrapArgs : _*)
case ApplyDynamic(qual, args) => sys.error("No invokedynamic support yet.")
@@ -613,7 +613,7 @@ abstract class BCodeBodyBuilder extends BCodeSkelBuilder {
}
argsSize match {
case 1 => bc newarray elemKind
- case _ => // this is currently dead code is Scalac, unlike in Dotty
+ case _ => // this is currently dead code in Scalac, unlike in Dotty
val descr = ("[" * argsSize) + elemKind.descriptor // denotes the same as: arrayN(elemKind, argsSize).descriptor
mnode.visitMultiANewArrayInsn(descr, argsSize)
}
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/opt/CallGraph.scala b/src/compiler/scala/tools/nsc/backend/jvm/opt/CallGraph.scala
index b088b5ee48..e0fd77bb54 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/opt/CallGraph.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/opt/CallGraph.scala
@@ -27,7 +27,7 @@ class CallGraph[BT <: BTypes](val btypes: BT) {
*
* Indexing the call graph by the containing MethodNode and the invocation MethodInsnNode allows
* finding callsites efficiently. For example, an inlining heuristic might want to know all
- * callsites withing a callee method.
+ * callsites within a callee method.
*
* Note that the call graph is not guaranteed to be complete: callsites may be missing. In
* particular, if a method is very large, all of its callsites might not be in the hash map.
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/opt/LocalOpt.scala b/src/compiler/scala/tools/nsc/backend/jvm/opt/LocalOpt.scala
index fedacdac41..65d1e20d69 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/opt/LocalOpt.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/opt/LocalOpt.scala
@@ -47,7 +47,7 @@ import scala.tools.nsc.backend.jvm.opt.BytecodeUtils._
* note that eliminating empty handlers and stale local variable descriptors is required for
* correctness, see the comment in the body of `methodOptimizations`.
*
- * box-unbox elimination (eliminates box-unbox pairs withing the same method)
+ * box-unbox elimination (eliminates box-unbox pairs within the same method)
* + enables UPSTREAM:
* - nullness optimizations (a box extraction operation (unknown nullness) may be rewritten to
* a read of a non-null local. example in doc comment of box-unbox implementation)
diff --git a/src/compiler/scala/tools/nsc/transform/Erasure.scala b/src/compiler/scala/tools/nsc/transform/Erasure.scala
index cc234eb623..25475515aa 100644
--- a/src/compiler/scala/tools/nsc/transform/Erasure.scala
+++ b/src/compiler/scala/tools/nsc/transform/Erasure.scala
@@ -1093,7 +1093,7 @@ abstract class Erasure extends InfoTransform
// See SI-5568.
tree setSymbol Object_getClass
} else {
- devWarning(s"The symbol '${fn.symbol}' was interecepted but didn't match any cases, that means the intercepted methods set doesn't match the code")
+ devWarning(s"The symbol '${fn.symbol}' was intercepted but didn't match any cases, that means the intercepted methods set doesn't match the code")
tree
}
} else qual match {
@@ -1209,7 +1209,7 @@ abstract class Erasure extends InfoTransform
try super.transform(tree1).clearType()
finally tpt setType specialErasure(tree1.symbol)(tree1.symbol.tpe).resultType
- case ApplyDynamic(qual, Literal(Constant(boostrapMethodRef: Symbol)) :: _) =>
+ case ApplyDynamic(qual, Literal(Constant(bootstrapMethodRef: Symbol)) :: _) =>
tree
case _ =>
super.transform(tree1).clearType()
diff --git a/src/compiler/scala/tools/nsc/typechecker/ConstantFolder.scala b/src/compiler/scala/tools/nsc/typechecker/ConstantFolder.scala
index 2cd4785fbf..8b62409076 100644
--- a/src/compiler/scala/tools/nsc/typechecker/ConstantFolder.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/ConstantFolder.scala
@@ -103,13 +103,13 @@ abstract class ConstantFolder {
case nme.XOR => Constant(x.longValue ^ y.longValue)
case nme.AND => Constant(x.longValue & y.longValue)
case nme.LSL if x.tag <= IntTag
- => Constant(x.intValue << y.longValue.toInt) // TODO: remove .toInt once starr includes the fix for SI-9516 (2.12.0-M5)
+ => Constant(x.intValue << y.longValue)
case nme.LSL => Constant(x.longValue << y.longValue)
case nme.LSR if x.tag <= IntTag
- => Constant(x.intValue >>> y.longValue.toInt) // TODO: remove .toInt once starr includes the fix for SI-9516 (2.12.0-M5)
+ => Constant(x.intValue >>> y.longValue)
case nme.LSR => Constant(x.longValue >>> y.longValue)
case nme.ASR if x.tag <= IntTag
- => Constant(x.intValue >> y.longValue.toInt) // TODO: remove .toInt once starr includes the fix for SI-9516 (2.12.0-M5)
+ => Constant(x.intValue >> y.longValue)
case nme.ASR => Constant(x.longValue >> y.longValue)
case nme.EQ => Constant(x.longValue == y.longValue)
case nme.NE => Constant(x.longValue != y.longValue)
diff --git a/src/eclipse/README.md b/src/eclipse/README.md
index f67fa26e5e..c7a4827341 100644
--- a/src/eclipse/README.md
+++ b/src/eclipse/README.md
@@ -57,10 +57,10 @@ If it doesn’t compile
=====================
The likely reason is that the build path of the imported projects isn’t correct. This can happen for instance
-when the [version.properties](https://github.com/scala/scala/blob/master/versions.properties) file is updated,
+when the [versions.properties](https://github.com/scala/scala/blob/master/versions.properties) file is updated,
and Eclipse .classpath of the different projects isn’t updated accordingly. The fix is simple, manually inspect
the build path of each project and make sure the version of the declared dependencies is in sync with the version
-declared in the `version.properties` file. If it isn’t, update it manually and, when done, don’t forget to share
+declared in the `versions.properties` file. If it isn’t, update it manually and, when done, don’t forget to share
your changes via a pull request.
(We are aware this is cumbersome. If you feel like scripting the process, pull requests are of course welcome.)
diff --git a/src/interactive/scala/tools/nsc/interactive/CompilerControl.scala b/src/interactive/scala/tools/nsc/interactive/CompilerControl.scala
index cb12cebc49..462f4432cd 100644
--- a/src/interactive/scala/tools/nsc/interactive/CompilerControl.scala
+++ b/src/interactive/scala/tools/nsc/interactive/CompilerControl.scala
@@ -101,11 +101,11 @@ trait CompilerControl { self: Global =>
* the given sources at the head of the list of to-be-compiled sources.
*/
def askReload(sources: List[SourceFile], response: Response[Unit]) = {
- val superseeded = scheduler.dequeueAll {
+ val superseded = scheduler.dequeueAll {
case ri: ReloadItem if ri.sources == sources => Some(ri)
case _ => None
}
- superseeded.foreach(_.response.set(()))
+ superseded.foreach(_.response.set(()))
postWorkItem(new ReloadItem(sources, response))
}
diff --git a/src/library/scala/collection/GenTraversableOnce.scala b/src/library/scala/collection/GenTraversableOnce.scala
index d3096a872c..f87f7654bc 100644
--- a/src/library/scala/collection/GenTraversableOnce.scala
+++ b/src/library/scala/collection/GenTraversableOnce.scala
@@ -96,7 +96,7 @@ trait GenTraversableOnce[+A] extends Any {
*/
def size: Int
- /** The size of this $coll if it is can be cheaply computed
+ /** The size of this $coll, if it can be cheaply computed
*
* @return the number of elements in this $coll, or -1 if the size cannot be determined cheaply
*/
diff --git a/src/library/scala/inline.scala b/src/library/scala/inline.scala
index dc55af301c..f6d7c7569e 100644
--- a/src/library/scala/inline.scala
+++ b/src/library/scala/inline.scala
@@ -29,7 +29,7 @@ package scala
* }
* }}}
*
- * Note: parentheses are required when annotating a callsite withing a larger expression.
+ * Note: parentheses are required when annotating a callsite within a larger expression.
*
* {{{
* def t1 = f1(1) + f1(1): @noinline // equivalent to (f1(1) + f1(1)): @noinline
diff --git a/src/library/scala/noinline.scala b/src/library/scala/noinline.scala
index a427e170f4..0cd5ef9f64 100644
--- a/src/library/scala/noinline.scala
+++ b/src/library/scala/noinline.scala
@@ -29,7 +29,7 @@ package scala
* }
* }}}
*
- * Note: parentheses are required when annotating a callsite withing a larger expression.
+ * Note: parentheses are required when annotating a callsite within a larger expression.
*
* {{{
* def t1 = f1(1) + f1(1): @noinline // equivalent to (f1(1) + f1(1)): @noinline
diff --git a/src/library/scala/util/Either.scala b/src/library/scala/util/Either.scala
index c332f18295..7bded972f2 100644
--- a/src/library/scala/util/Either.scala
+++ b/src/library/scala/util/Either.scala
@@ -55,31 +55,31 @@ package util
* val left23: Left[Double, Int] = Left(23.0)
* val left42 = Left(42.0)
*
- * for (
- * a <- right1;
- * b <- right2;
+ * for {
+ * a <- right1
+ * b <- right2
* c <- right3
- * ) yield a + b + c // Right(6)
+ * } yield a + b + c // Right(6)
*
- * for (
- * a <- right1;
- * b <- right2;
+ * for {
+ * a <- right1
+ * b <- right2
* c <- left23
- * ) yield a + b + c // Left(23.0)
+ * } yield a + b + c // Left(23.0)
*
- * for (
- * a <- right1;
- * b <- left23;
+ * for {
+ * a <- right1
+ * b <- left23
* c <- right2
- * ) yield a + b + c // Left(23.0)
+ * } yield a + b + c // Left(23.0)
*
* // It is advisable to provide the type of the “missing” value (especially the right value for `Left`)
* // as otherwise that type might be infered as `Nothing` without context:
- * for (
- * a <- left23;
- * b <- right1;
+ * for {
+ * a <- left23
+ * b <- right1
* c <- left42 // type at this position: Either[Double, Nothing]
- * ) yield a + b + c
+ * } yield a + b + c
* // ^
* // error: ambiguous reference to overloaded definition,
* // both method + in class Int of type (x: Char)Int
@@ -136,10 +136,10 @@ sealed abstract class Either[+A, +B] extends Product with Serializable {
* @example {{{
* val right = Right(2)
* val left = Left(3)
- * for (
- * r1 <- right;
+ * for {
+ * r1 <- right
* r2 <- left.swap
- * ) yield r1 * r2 // Right(6)
+ * } yield r1 * r2 // Right(6)
* }}}
*/
def swap: Either[B, A] = this match {
diff --git a/src/repl/scala/tools/nsc/interpreter/IMain.scala b/src/repl/scala/tools/nsc/interpreter/IMain.scala
index 44784aa953..65f2c95f73 100644
--- a/src/repl/scala/tools/nsc/interpreter/IMain.scala
+++ b/src/repl/scala/tools/nsc/interpreter/IMain.scala
@@ -1203,7 +1203,7 @@ class IMain(initialSettings: Settings, protected val out: JPrintWriter) extends
/** Utility methods for the Interpreter. */
object IMain {
- /** Dummy identifier fragement inserted at the cursor before presentation compilation. Needed to support completion of `global.def<TAB>` */
+ /** Dummy identifier fragment inserted at the cursor before presentation compilation. Needed to support completion of `global.def<TAB>` */
val DummyCursorFragment = "_CURSOR_"
// The two name forms this is catching are the two sides of this assignment: