summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools
diff options
context:
space:
mode:
authorSeth Tisue <seth@tisue.net>2017-02-16 13:42:49 -0800
committerGitHub <noreply@github.com>2017-02-16 13:42:49 -0800
commit98a7d4ce0234dc1c4b080ecaeed9ced09d39578a (patch)
tree995f19014bfa2021c0a1a074d1732f993dfaf107 /src/compiler/scala/tools
parent955b779b63d16ab3d2d24b454374c55e9d06c228 (diff)
parent1eb331b4196492f8f8084a2c102272c3a9c0cd2d (diff)
downloadscala-98a7d4ce0234dc1c4b080ecaeed9ced09d39578a.tar.gz
scala-98a7d4ce0234dc1c4b080ecaeed9ced09d39578a.tar.bz2
scala-98a7d4ce0234dc1c4b080ecaeed9ced09d39578a.zip
Merge pull request #5694 from janekdb/topic/2.12.x-scaladoc-spelling-corrections-2
Fix typos in compiler and reflect
Diffstat (limited to 'src/compiler/scala/tools')
-rw-r--r--src/compiler/scala/tools/nsc/Global.scala2
-rw-r--r--src/compiler/scala/tools/nsc/PhaseAssembly.scala2
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/AsmUtils.scala2
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/BCodeBodyBuilder.scala2
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/BCodeHelpers.scala8
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/BTypes.scala10
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/BytecodeWriters.scala2
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/analysis/BackendUtils.scala3
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/analysis/package.scala2
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/opt/BoxUnbox.scala6
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/opt/ByteCodeRepository.scala6
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/opt/CallGraph.scala2
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/opt/CopyProp.scala4
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/opt/InlineInfoAttribute.scala2
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/opt/Inliner.scala4
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/opt/InlinerHeuristics.scala2
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/opt/LocalOpt.scala2
-rw-r--r--src/compiler/scala/tools/nsc/classpath/DirectoryClassPath.scala2
-rw-r--r--src/compiler/scala/tools/nsc/javac/JavaParsers.scala2
-rw-r--r--src/compiler/scala/tools/nsc/transform/AccessorSynthesis.scala2
-rw-r--r--src/compiler/scala/tools/nsc/transform/Delambdafy.scala4
-rw-r--r--src/compiler/scala/tools/nsc/transform/Fields.scala2
-rw-r--r--src/compiler/scala/tools/nsc/transform/LambdaLift.scala2
-rw-r--r--src/compiler/scala/tools/nsc/transform/Mixin.scala4
-rw-r--r--src/compiler/scala/tools/nsc/transform/SampleTransform.scala2
-rw-r--r--src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala2
-rw-r--r--src/compiler/scala/tools/nsc/transform/UnCurry.scala4
-rw-r--r--src/compiler/scala/tools/nsc/transform/patmat/Logic.scala4
-rw-r--r--src/compiler/scala/tools/nsc/transform/patmat/MatchTreeMaking.scala4
-rw-r--r--src/compiler/scala/tools/nsc/util/package.scala2
30 files changed, 49 insertions, 48 deletions
diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala
index 40be302799..c1b0733895 100644
--- a/src/compiler/scala/tools/nsc/Global.scala
+++ b/src/compiler/scala/tools/nsc/Global.scala
@@ -1198,7 +1198,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
first
}
- // --------------- Miscellania -------------------------------
+ // --------------- Miscellanea -------------------------------
/** Progress tracking. Measured in "progress units" which are 1 per
* compilation unit per phase completed.
diff --git a/src/compiler/scala/tools/nsc/PhaseAssembly.scala b/src/compiler/scala/tools/nsc/PhaseAssembly.scala
index ef9818c62d..df72c37e53 100644
--- a/src/compiler/scala/tools/nsc/PhaseAssembly.scala
+++ b/src/compiler/scala/tools/nsc/PhaseAssembly.scala
@@ -17,7 +17,7 @@ trait PhaseAssembly {
self: Global =>
/**
- * Aux datastructure for solving the constraint system
+ * Aux data structure for solving the constraint system
* The dependency graph container with helper methods for node and edge creation
*/
private class DependencyGraph {
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/AsmUtils.scala b/src/compiler/scala/tools/nsc/backend/jvm/AsmUtils.scala
index 1982c7f643..402dc66a7f 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/AsmUtils.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/AsmUtils.scala
@@ -33,7 +33,7 @@ object AsmUtils {
final val traceClassPattern = ""
/**
- * Print the bytedcode of classes as they are serialized by the ASM library. The serialization
+ * Print the bytecode of classes as they are serialized by the ASM library. The serialization
* performed by `asm.ClassWriter` can change the code generated by GenBCode. For example, it
* introduces stack map frames, it computes the maximal stack sizes, and it replaces dead
* code by NOPs (see also https://github.com/scala/scala/pull/3726#issuecomment-42861780).
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/BCodeBodyBuilder.scala b/src/compiler/scala/tools/nsc/backend/jvm/BCodeBodyBuilder.scala
index c7952ffe94..76d042ce3b 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/BCodeBodyBuilder.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/BCodeBodyBuilder.scala
@@ -918,7 +918,7 @@ abstract class BCodeBodyBuilder extends BCodeSkelBuilder {
(args zip params) filterNot isTrivial
}
- // first push *all* arguments. This makes sure muliple uses of the same labelDef-var will all denote the (previous) value.
+ // first push *all* arguments. This makes sure multiple uses of the same labelDef-var will all denote the (previous) value.
aps foreach { case (arg, param) => genLoad(arg, locals(param).tk) } // `locals` is known to contain `param` because `genDefDef()` visited `labelDefsAtOrUnder`
// second assign one by one to the LabelDef's variables.
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/BCodeHelpers.scala b/src/compiler/scala/tools/nsc/backend/jvm/BCodeHelpers.scala
index 18e7500172..a74c70a684 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/BCodeHelpers.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/BCodeHelpers.scala
@@ -188,7 +188,7 @@ abstract class BCodeHelpers extends BCodeIdiomatic with BytecodeWriters {
* Data for emitting an EnclosingMethod attribute. None if `classSym` is a member class (not
* an anonymous or local class). See doc in BTypes.
*
- * The class is parametrized by two functions to obtain a bytecode class descriptor for a class
+ * The class is parameterized by two functions to obtain a bytecode class descriptor for a class
* symbol, and to obtain a method signature descriptor fro a method symbol. These function depend
* on the implementation of GenASM / GenBCode, so they need to be passed in.
*/
@@ -332,7 +332,7 @@ abstract class BCodeHelpers extends BCodeIdiomatic with BytecodeWriters {
failNoForwarder("companion contains its own main method (implementation restriction: no main is allowed, regardless of signature)")
else if (companion.isTrait)
failNoForwarder("companion is a trait")
- // Now either succeeed, or issue some additional warnings for things which look like
+ // Now either succeed, or issue some additional warnings for things which look like
// attempts to be java main methods.
else (possibles exists definitions.isJavaMainMethod) || {
possibles exists { m =>
@@ -541,9 +541,9 @@ abstract class BCodeHelpers extends BCodeIdiomatic with BytecodeWriters {
* symbol (sym.annotations) or type (as an AnnotatedType, eliminated by erasure).
*
* For Scala annotations this is OK: they are stored in the pickle and ignored by the backend.
- * Java annoations on the other hand are additionally emitted to the classfile in Java's format.
+ * Java annotations on the other hand are additionally emitted to the classfile in Java's format.
*
- * This means that [[Type]] instances within an AnnotaionInfo reach the backend non-erased. Examples:
+ * This means that [[Type]] instances within an AnnotationInfo reach the backend non-erased. Examples:
* - @(javax.annotation.Resource @annotation.meta.getter) val x = 0
* Here, annotationInfo.atp is an AnnotatedType.
* - @SomeAnnotation[T] val x = 0
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/BTypes.scala b/src/compiler/scala/tools/nsc/backend/jvm/BTypes.scala
index 121091fe4f..3e3229d2c3 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/BTypes.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/BTypes.scala
@@ -83,7 +83,7 @@ abstract class BTypes {
val callsitePositions: concurrent.Map[MethodInsnNode, Position] = recordPerRunCache(TrieMap.empty)
/**
- * Stores callsite instructions of invocatinos annotated `f(): @inline/noinline`.
+ * Stores callsite instructions of invocations annotated `f(): @inline/noinline`.
* Instructions are added during code generation (BCodeBodyBuilder). The maps are then queried
* when building the CallGraph, every Callsite object has an annotated(No)Inline field.
*/
@@ -287,7 +287,7 @@ abstract class BTypes {
}
// The InlineInfo is built from the classfile (not from the symbol) for all classes that are NOT
- // being compiled. For those classes, the info is only needed if the inliner is enabled, othewise
+ // being compiled. For those classes, the info is only needed if the inliner is enabled, otherwise
// we can save the memory.
if (!compilerSettings.optInlinerEnabled) BTypes.EmptyInlineInfo
else fromClassfileAttribute getOrElse fromClassfileWithoutAttribute
@@ -653,7 +653,7 @@ abstract class BTypes {
* Fields in the InnerClass entries:
* - inner class: the (nested) class C we are talking about
* - outer class: the class of which C is a member. Has to be null for non-members, i.e. for
- * local and anonymous classes. NOTE: this co-incides with the presence of an
+ * local and anonymous classes. NOTE: this coincides with the presence of an
* EnclosingMethod attribute (see below)
* - inner name: A string with the simple name of the inner class. Null for anonymous classes.
* - flags: access property flags, details in JVMS, table in 4.7.6. Static flag: see
@@ -702,7 +702,7 @@ abstract class BTypes {
* local and anonymous classes, no matter if there is an enclosing method or not. Accordingly, the
* "class" field (see below) must be always defined, while the "method" field may be null.
*
- * NOTE: When an EnclosingMethod attribute is requried (local and anonymous classes), the "outer"
+ * NOTE: When an EnclosingMethod attribute is required (local and anonymous classes), the "outer"
* field in the InnerClass table must be null.
*
* Fields:
@@ -1144,7 +1144,7 @@ object BTypes {
/**
* Metadata about a ClassBType, used by the inliner.
*
- * More information may be added in the future to enable more elaborate inlinine heuristics.
+ * More information may be added in the future to enable more elaborate inline heuristics.
* Note that this class should contain information that can only be obtained from the ClassSymbol.
* Information that can be computed from the ClassNode should be added to the call graph instead.
*
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/BytecodeWriters.scala b/src/compiler/scala/tools/nsc/backend/jvm/BytecodeWriters.scala
index 84f6d87c5c..2cf5cfcb8d 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/BytecodeWriters.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/BytecodeWriters.scala
@@ -78,7 +78,7 @@ trait BytecodeWriters {
}
/*
- * The ASM textual representation for bytecode overcomes disadvantages of javap ouput in three areas:
+ * The ASM textual representation for bytecode overcomes disadvantages of javap output in three areas:
* (a) pickle dingbats undecipherable to the naked eye;
* (b) two constant pools, while having identical contents, are displayed differently due to physical layout.
* (c) stack maps (classfile version 50 and up) are displayed in encoded form by javap,
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/analysis/BackendUtils.scala b/src/compiler/scala/tools/nsc/backend/jvm/analysis/BackendUtils.scala
index e25b55e7ab..90da570f01 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/analysis/BackendUtils.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/analysis/BackendUtils.scala
@@ -382,7 +382,8 @@ class BackendUtils[BT <: BTypes](val btypes: BT) {
* but not for writing in the classfile. We let the ClassWriter recompute max's.
*
* NOTE 2: the maxStack value computed here may be larger than the smallest correct value
- * that would allow running an analyzer, see `InstructionStackEffect.forAsmAnalysisConservative`.
+ * that would allow running an analyzer, see `InstructionStackEffect.forAsmAnalysis` and
+ * `InstructionStackEffect.maxStackGrowth`.
*
* NOTE 3: the implementation doesn't look at instructions that cannot be reached, it computes
* the max local / stack size in the reachable code. These max's work just fine for running an
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/analysis/package.scala b/src/compiler/scala/tools/nsc/backend/jvm/analysis/package.scala
index ef961941a0..999c686aac 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/analysis/package.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/analysis/package.scala
@@ -110,7 +110,7 @@ package scala.tools.nsc.backend.jvm
* - Use YourKit for finding hotspots (cpu profiling). when it comes to drilling down into the details
* of a hotspot, don't pay too much attention to the percentages / time counts.
* - Should also try other profilers.
- * - Use timers. When a method showed up as a hotspot, i added a timer around that method, and a
+ * - Use timers. When a method showed up as a hotspot, I added a timer around that method, and a
* second one within the method to measure specific parts. The timers slow things down, but the
* relative numbers show what parts of a method are slow.
*
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/opt/BoxUnbox.scala b/src/compiler/scala/tools/nsc/backend/jvm/opt/BoxUnbox.scala
index a4cd8fce1e..78fc7e1ecf 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/opt/BoxUnbox.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/opt/BoxUnbox.scala
@@ -69,7 +69,7 @@ class BoxUnbox[BT <: BTypes](val btypes: BT) {
* E1: M1 only works if there's a single boxing operation.
* def e1(b: Boolean) = {
* val i: Integer = box(10) // 10 is stored into a new local, box operation and i removed
- * val j: Integer = box(20) // 20 is stored into a new local, box operation adn j removed
+ * val j: Integer = box(20) // 20 is stored into a new local, box operation and j removed
* val r = if (b) i else j // loads and stores of the box are eliminated, r no longer exists
* unbox(r) // cannot rewrite: we don't know which local to load
* }
@@ -138,7 +138,7 @@ class BoxUnbox[BT <: BTypes](val btypes: BT) {
* - note that the MatchError creation is dead code: local2 is never null. However, our nullness
* analysis cannot identify this: it does not track nullness through tuple stores and loads.
* - if we re-write the non-escaping consumers of the outer tuple, but keep the tuple allocation
- * and the escaping consumer, we get the follwoing:
+ * and the escaping consumer, we get the following:
*
* load 1, load 2
* val newLocal1 = new Tuple2; load newLocal1 // stack: Tuple2
@@ -188,7 +188,7 @@ class BoxUnbox[BT <: BTypes](val btypes: BT) {
var maxStackGrowth = 0
- /** Mehtod M1 for eliminating box-unbox pairs (see doc comment in the beginning of this file) */
+ /** Method M1 for eliminating box-unbox pairs (see doc comment in the beginning of this file) */
def replaceBoxOperationsSingleCreation(creation: BoxCreation, finalCons: Set[BoxConsumer], boxKind: BoxKind, keepBox: Boolean): Unit = {
/**
* If the box is eliminated, all copy operations (loads, stores, others) of the box need to
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/opt/ByteCodeRepository.scala b/src/compiler/scala/tools/nsc/backend/jvm/opt/ByteCodeRepository.scala
index 78acd72dba..f2ff73c44d 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/opt/ByteCodeRepository.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/opt/ByteCodeRepository.scala
@@ -167,7 +167,7 @@ class ByteCodeRepository[BT <: BTypes](val classPath: ClassPath, val btypes: BT)
* the users (e.g. the inliner) have to be aware of method selection.
*
* Note that the returned method may be abstract (ACC_ABSTRACT), native (ACC_NATIVE) or signature
- * polymorphic (methods `invoke` and `invokeExact` in class `MehtodHandles`).
+ * polymorphic (methods `invoke` and `invokeExact` in class `MethodHandles`).
*
* @return The [[MethodNode]] of the requested method and the [[InternalName]] of its declaring
* class, or an error message if the method could not be found. An error message is also
@@ -204,8 +204,8 @@ class ByteCodeRepository[BT <: BTypes](val classPath: ClassPath, val btypes: BT)
visited += i
// abstract and static methods are excluded, see jvms-5.4.3.3
for (m <- findMethod(c) if !isPrivateMethod(m) && !isStaticMethod(m)) found += ((m, c))
- val recusionResult = findIn(c)
- if (recusionResult.isDefined) return recusionResult
+ val recursionResult = findIn(c)
+ if (recursionResult.isDefined) return recursionResult
}
None
}
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 9c0dfb0ee2..a740ca525c 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/opt/CallGraph.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/opt/CallGraph.scala
@@ -285,7 +285,7 @@ class CallGraph[BT <: BTypes](val btypes: BT) {
// final case class :: / final case object Nil
// (l: List).map // can be inlined
// we need to know that
- // - the recevier is sealed
+ // - the receiver is sealed
// - what are the children of the receiver
// - all children are final
// - none of the children overrides map
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/opt/CopyProp.scala b/src/compiler/scala/tools/nsc/backend/jvm/opt/CopyProp.scala
index b05669ce89..518646812e 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/opt/CopyProp.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/opt/CopyProp.scala
@@ -273,7 +273,7 @@ class CopyProp[BT <: BTypes](val btypes: BT) {
}
/**
- * Eliminate the `numArgs` inputs of the instruction `prod` (which was eliminated). Fo
+ * Eliminate the `numArgs` inputs of the instruction `prod` (which was eliminated). For
* each input value
* - if the `prod` instruction is the single consumer, enqueue the producers of the input
* - otherwise, insert a POP instruction to POP the input value
@@ -465,7 +465,7 @@ class CopyProp[BT <: BTypes](val btypes: BT) {
}
/**
- * Remove `xSTORE n; xLOAD n` paris if
+ * Remove `xSTORE n; xLOAD n` pairs if
* - the local variable n is not used anywhere else in the method (1), and
* - there are no executable instructions and no live labels (jump targets) between the two (2)
*
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/opt/InlineInfoAttribute.scala b/src/compiler/scala/tools/nsc/backend/jvm/opt/InlineInfoAttribute.scala
index 16ed9da0e4..7bc4ea2392 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/opt/InlineInfoAttribute.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/opt/InlineInfoAttribute.scala
@@ -82,7 +82,7 @@ case class InlineInfoAttribute(inlineInfo: InlineInfo) extends Attribute(InlineI
}
/**
- * De-serialize the attribute into an InlineInfo. The attribute starts at cr.b(off), but we don't
+ * Deserialize the attribute into an InlineInfo. The attribute starts at cr.b(off), but we don't
* need to access that array directly, we can use the `read` methods provided by the ClassReader.
*
* `buf` is a pre-allocated character array that is guaranteed to be long enough to hold any
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/opt/Inliner.scala b/src/compiler/scala/tools/nsc/backend/jvm/opt/Inliner.scala
index b9f593a4d8..0ae8347dc5 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/opt/Inliner.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/opt/Inliner.scala
@@ -683,7 +683,7 @@ class Inliner[BT <: BTypes](val btypes: BT) {
* (A2) C and D are members of the same run-time package
*/
def classIsAccessible(accessed: BType, from: ClassBType): Either[OptimizerWarning, Boolean] = (accessed: @unchecked) match {
- // TODO: A2 requires "same run-time package", which seems to be package + classloader (JMVS 5.3.). is the below ok?
+ // TODO: A2 requires "same run-time package", which seems to be package + classloader (JVMS 5.3.). is the below ok?
case c: ClassBType => c.isPublic.map(_ || c.packageInternalName == from.packageInternalName)
case a: ArrayBType => classIsAccessible(a.elementType, from)
case _: PrimitiveBType => Right(true)
@@ -725,7 +725,7 @@ class Inliner[BT <: BTypes](val btypes: BT) {
* type from there (https://github.com/scala-opt/scala/issues/13).
*/
def memberIsAccessible(memberFlags: Int, memberDeclClass: ClassBType, memberRefClass: ClassBType, from: ClassBType): Either[OptimizerWarning, Boolean] = {
- // TODO: B3 requires "same run-time package", which seems to be package + classloader (JMVS 5.3.). is the below ok?
+ // TODO: B3 requires "same run-time package", which seems to be package + classloader (JVMS 5.3.). is the below ok?
def samePackageAsDestination = memberDeclClass.packageInternalName == from.packageInternalName
def targetObjectConformsToDestinationClass = false // needs type propagation analysis, see above
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/opt/InlinerHeuristics.scala b/src/compiler/scala/tools/nsc/backend/jvm/opt/InlinerHeuristics.scala
index 4744cb9ab1..63360e17ff 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/opt/InlinerHeuristics.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/opt/InlinerHeuristics.scala
@@ -125,7 +125,7 @@ class InlinerHeuristics[BT <: BTypes](val bTypes: BT) {
if (callsite.isInlineAnnotated && callee.canInlineFromSource) {
// By default, we only emit inliner warnings for methods annotated @inline. However, we don't
// want to be unnecessarily noisy with `-opt-warnings:_`: for example, the inliner heuristic
- // would attempty to inline `Function1.apply$sp$II`, as it's higher-order (the receiver is
+ // would attempt to inline `Function1.apply$sp$II`, as it's higher-order (the receiver is
// a function), and it's concrete (forwards to `apply`). But because it's non-final, it cannot
// be inlined. So we only create warnings here for methods annotated @inline.
Some(Left(CalleeNotFinal(
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 65d1e20d69..9c22b09cdd 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/opt/LocalOpt.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/opt/LocalOpt.scala
@@ -61,7 +61,7 @@ import scala.tools.nsc.backend.jvm.opt.BytecodeUtils._
* - empty local variable descriptors (local variables that were holding the box may become unused)
*
* copy propagation (replaces LOAD n to the LOAD m for the smallest m that is an alias of n)
- * + enables downstrem:
+ * + enables downstream:
* - stale stores (a stored value may not be loaded anymore)
* - store-load pairs (a load n may now be right after a store n)
* + NOTE: copy propagation is only executed once, in the first fixpoint loop iteration. none of
diff --git a/src/compiler/scala/tools/nsc/classpath/DirectoryClassPath.scala b/src/compiler/scala/tools/nsc/classpath/DirectoryClassPath.scala
index 133a656206..1ea152b29c 100644
--- a/src/compiler/scala/tools/nsc/classpath/DirectoryClassPath.scala
+++ b/src/compiler/scala/tools/nsc/classpath/DirectoryClassPath.scala
@@ -106,7 +106,7 @@ trait JFileDirectoryLookup[FileEntryType <: ClassRepresentation] extends Directo
// as the type of `case class C(); case class D(); List(C(), D()).head`, rather than the opposite order.
// On Mac, the HFS performs this sorting transparently, but on Linux the order is unspecified.
//
- // Note this behaviour can be enabled with in javac with `javac -XDsortfiles`, but that's only
+ // Note this behaviour can be enabled in javac with `javac -XDsortfiles`, but that's only
// intended to improve determinism of the compiler for compiler hackers.
util.Arrays.sort(listing, (o1: File, o2: File) => o1.getName.compareTo(o2.getName))
listing
diff --git a/src/compiler/scala/tools/nsc/javac/JavaParsers.scala b/src/compiler/scala/tools/nsc/javac/JavaParsers.scala
index 947af55724..3ef75679ee 100644
--- a/src/compiler/scala/tools/nsc/javac/JavaParsers.scala
+++ b/src/compiler/scala/tools/nsc/javac/JavaParsers.scala
@@ -276,7 +276,7 @@ trait JavaParsers extends ast.parser.ParsersCommon with JavaScanners {
// SelectFromTypeTree otherwise. See #3567.
// Select nodes can be later
// converted in the typechecker to SelectFromTypeTree if the class
- // turns out to be an instance ionner class instead of a static inner class.
+ // turns out to be an instance inner class instead of a static inner class.
def typeSelect(t: Tree, name: Name) = t match {
case Ident(_) | Select(_, _) => Select(t, name)
case _ => SelectFromTypeTree(t, name.toTypeName)
diff --git a/src/compiler/scala/tools/nsc/transform/AccessorSynthesis.scala b/src/compiler/scala/tools/nsc/transform/AccessorSynthesis.scala
index a0bba46398..e027b065ac 100644
--- a/src/compiler/scala/tools/nsc/transform/AccessorSynthesis.scala
+++ b/src/compiler/scala/tools/nsc/transform/AccessorSynthesis.scala
@@ -99,7 +99,7 @@ trait AccessorSynthesis extends Transform with ast.TreeDSL {
}
- // TODO: better way to communicate from info transform to tree transfor?
+ // TODO: better way to communicate from info transform to tree transform?
private[this] val _bitmapInfo = perRunCaches.newMap[Symbol, BitmapInfo]
private[this] val _slowPathFor = perRunCaches.newMap[Symbol, Symbol]()
diff --git a/src/compiler/scala/tools/nsc/transform/Delambdafy.scala b/src/compiler/scala/tools/nsc/transform/Delambdafy.scala
index 855e53710b..2e7ab8a887 100644
--- a/src/compiler/scala/tools/nsc/transform/Delambdafy.scala
+++ b/src/compiler/scala/tools/nsc/transform/Delambdafy.scala
@@ -152,7 +152,7 @@ abstract class Delambdafy extends Transform with TypingTransformers with ast.Tre
val resTpOk = (
samResultType =:= UnitTpe
|| functionResultType =:= samResultType
- || (isReferenceType(samResultType) && isReferenceType(functionResultType))) // yes, this is what the spec says -- no further correspondance required
+ || (isReferenceType(samResultType) && isReferenceType(functionResultType))) // yes, this is what the spec says -- no further correspondence required
if (resTpOk && (samParamTypes corresponds functionParamTypes){ (samParamTp, funParamTp) =>
funParamTp =:= samParamTp || (isReferenceType(funParamTp) && isReferenceType(samParamTp) && funParamTp <:< samParamTp) }) target
else {
@@ -165,7 +165,7 @@ abstract class Delambdafy extends Transform with TypingTransformers with ast.Tre
// whenever a type in the sam's signature is (erases to) a primitive type, we must pick the sam's version,
// as we don't implement the logic regarding widening that's performed by LMF -- we require =:= for primitives
//
- // We use the sam's type for the check whether we're dealin with a reference type, as it could be a generic type,
+ // We use the sam's type for the check whether we're dealing with a reference type, as it could be a generic type,
// which means the function's parameter -- even if it expects a value class -- will need to be
// boxed on the generic call to the sam method.
diff --git a/src/compiler/scala/tools/nsc/transform/Fields.scala b/src/compiler/scala/tools/nsc/transform/Fields.scala
index fbf1e8cec1..b2bf9fad3f 100644
--- a/src/compiler/scala/tools/nsc/transform/Fields.scala
+++ b/src/compiler/scala/tools/nsc/transform/Fields.scala
@@ -58,7 +58,7 @@ import symtab.Flags._
*
* In the even longer term (Scala 3?), I agree with @DarkDimius that it would make sense
* to hide the difference between strict and lazy vals. All vals are lazy,
- * but the memoization overhead is removed when we statically know they are forced during initialiation.
+ * but the memoization overhead is removed when we statically know they are forced during initialization.
* We could still expose the low-level field semantics through `private[this] val`s.
*
* In any case, the current behavior of overriding vals is pretty surprising.
diff --git a/src/compiler/scala/tools/nsc/transform/LambdaLift.scala b/src/compiler/scala/tools/nsc/transform/LambdaLift.scala
index 798cfcd072..169fe7588e 100644
--- a/src/compiler/scala/tools/nsc/transform/LambdaLift.scala
+++ b/src/compiler/scala/tools/nsc/transform/LambdaLift.scala
@@ -113,7 +113,7 @@ abstract class LambdaLift extends InfoTransform {
*
* For DelayedInit subclasses, constructor statements end up in the synthetic init method
* instead of the constructor itself, so the access should go to the field. This method changes
- * `logicallyEnclosingMember` in this case to return a temprorary symbol corresponding to that
+ * `logicallyEnclosingMember` in this case to return a temporary symbol corresponding to that
* method.
*/
private def logicallyEnclosingMember(sym: Symbol): Symbol = {
diff --git a/src/compiler/scala/tools/nsc/transform/Mixin.scala b/src/compiler/scala/tools/nsc/transform/Mixin.scala
index de0db51b6c..96e2135c52 100644
--- a/src/compiler/scala/tools/nsc/transform/Mixin.scala
+++ b/src/compiler/scala/tools/nsc/transform/Mixin.scala
@@ -32,7 +32,7 @@ abstract class Mixin extends InfoTransform with ast.TreeDSL with AccessorSynthes
* we cannot emit PROTECTED methods in interfaces on the JVM,
* but knowing that these trait methods are protected means we won't emit static forwarders.
*
- * JVMLS: "Methods of interfaces may have any of the flags in Table 4.6-A set
+ * JVMS: "Methods of interfaces may have any of the flags in Table 4.6-A set
* except ACC_PROTECTED, ACC_FINAL, ACC_SYNCHRONIZED, and ACC_NATIVE (JLS ยง9.4)."
*
* TODO: can we just set the right flags from the start??
@@ -137,7 +137,7 @@ abstract class Mixin extends InfoTransform with ast.TreeDSL with AccessorSynthes
*/
def addMember(clazz: Symbol, member: Symbol): Symbol = {
debuglog(s"mixing into $clazz: ${member.defString}")
- // This attachment is used to instruct the backend about which methids in traits require
+ // This attachment is used to instruct the backend about which methods in traits require
// a static trait impl method. We remove this from the new symbol created for the method
// mixed into the subclass.
member.removeAttachment[NeedStaticImpl.type]
diff --git a/src/compiler/scala/tools/nsc/transform/SampleTransform.scala b/src/compiler/scala/tools/nsc/transform/SampleTransform.scala
index ba303f7c2b..4c1705e386 100644
--- a/src/compiler/scala/tools/nsc/transform/SampleTransform.scala
+++ b/src/compiler/scala/tools/nsc/transform/SampleTransform.scala
@@ -35,7 +35,7 @@ abstract class SampleTransform extends Transform {
atPos(tree1.pos)( // `atPos` fills in position of its tree argument
Select( // The `Select` factory method is defined in class `Trees`
sup,
- currentOwner.newValue( // creates a new term symbol owned by `currentowner`
+ currentOwner.newValue( // creates a new term symbol owned by `currentOwner`
newTermName("sample"), // The standard term name creator
tree1.pos)))))
case _ =>
diff --git a/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala b/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
index 84f47c1caa..9161786d76 100644
--- a/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
+++ b/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
@@ -1992,7 +1992,7 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers {
else exitingSpecialize(specializeCalls(unit).transform(tree))
// Remove the final modifier and @inline annotation from anything in the
- // original class (since it's being overridden in at least onesubclass).
+ // original class (since it's being overridden in at least one subclass).
//
// We do this here so that the specialized subclasses will correctly copy
// final and @inline.
diff --git a/src/compiler/scala/tools/nsc/transform/UnCurry.scala b/src/compiler/scala/tools/nsc/transform/UnCurry.scala
index 096b6b9263..dcffd7a6ab 100644
--- a/src/compiler/scala/tools/nsc/transform/UnCurry.scala
+++ b/src/compiler/scala/tools/nsc/transform/UnCurry.scala
@@ -363,7 +363,7 @@ abstract class UnCurry extends InfoTransform
* mark the method symbol SYNCHRONIZED for bytecode generation.
*
* Delambdafy targets are deemed ineligible as the Delambdafy phase will
- * replace `this.synchronized` with `$this.synchronzed` now that it emits
+ * replace `this.synchronized` with `$this.synchronized` now that it emits
* all lambda impl methods as static.
*/
private def translateSynchronized(tree: Tree) = tree match {
@@ -705,7 +705,7 @@ abstract class UnCurry extends InfoTransform
//
// So what we need to do is to use the pre-uncurry type when creating `l$1`, which is `c.Tree` and is
// correct. Now, there are two additional problems:
- // 1. when varargs and byname params are involved, the uncurry transformation desugares these special
+ // 1. when varargs and byname params are involved, the uncurry transformation desugars these special
// cases to actual typerefs, eg:
// ```
// T* ~> Seq[T] (Scala-defined varargs)
diff --git a/src/compiler/scala/tools/nsc/transform/patmat/Logic.scala b/src/compiler/scala/tools/nsc/transform/patmat/Logic.scala
index cb3759e5fa..db6eac34cb 100644
--- a/src/compiler/scala/tools/nsc/transform/patmat/Logic.scala
+++ b/src/compiler/scala/tools/nsc/transform/patmat/Logic.scala
@@ -184,8 +184,8 @@ trait Logic extends Debugging {
// push negation inside formula
def negationNormalFormNot(p: Prop): Prop = p match {
- case And(ops) => Or(ops.map(negationNormalFormNot)) // De'Morgan
- case Or(ops) => And(ops.map(negationNormalFormNot)) // De'Morgan
+ case And(ops) => Or(ops.map(negationNormalFormNot)) // De Morgan
+ case Or(ops) => And(ops.map(negationNormalFormNot)) // De Morgan
case Not(p) => negationNormalForm(p)
case True => False
case False => True
diff --git a/src/compiler/scala/tools/nsc/transform/patmat/MatchTreeMaking.scala b/src/compiler/scala/tools/nsc/transform/patmat/MatchTreeMaking.scala
index 89c793ec94..794d3d442a 100644
--- a/src/compiler/scala/tools/nsc/transform/patmat/MatchTreeMaking.scala
+++ b/src/compiler/scala/tools/nsc/transform/patmat/MatchTreeMaking.scala
@@ -564,11 +564,11 @@ trait MatchTreeMaking extends MatchCodeGen with Debugging {
else scrut match {
case Typed(tree, tpt) =>
val suppressExhaustive = tpt.tpe hasAnnotation UncheckedClass
- val supressUnreachable = tree match {
+ val suppressUnreachable = tree match {
case Ident(name) if name startsWith nme.CHECK_IF_REFUTABLE_STRING => true // SI-7183 don't warn for withFilter's that turn out to be irrefutable.
case _ => false
}
- val suppression = Suppression(suppressExhaustive, supressUnreachable)
+ val suppression = Suppression(suppressExhaustive, suppressUnreachable)
val hasSwitchAnnotation = treeInfo.isSwitchAnnotation(tpt.tpe)
// matches with two or fewer cases need not apply for switchiness (if-then-else will do)
// `case 1 | 2` is considered as two cases.
diff --git a/src/compiler/scala/tools/nsc/util/package.scala b/src/compiler/scala/tools/nsc/util/package.scala
index bd95fdbb50..80e82c85d8 100644
--- a/src/compiler/scala/tools/nsc/util/package.scala
+++ b/src/compiler/scala/tools/nsc/util/package.scala
@@ -89,7 +89,7 @@ package object util {
implicit class StackTraceOps(private val e: Throwable) extends AnyVal with StackTracing {
/** Format the stack trace, returning the prefix consisting of frames that satisfy
* a given predicate.
- * The format is similar to the typical case described in the JavaDoc
+ * The format is similar to the typical case described in the Javadoc
* for [[java.lang.Throwable#printStackTrace]].
* If a stack trace is truncated, it will be followed by a line of the form
* `... 3 elided`, by analogy to the lines `... 3 more` which indicate