summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-02-24 15:04:22 +0100
committerPaul Phillips <paulp@improving.org>2013-03-05 09:40:32 -0800
commita8d60a6c76d2d5434148c2d7c8f2bf147855252c (patch)
tree6020d5153e844bbc5296b8a4251fc7858d429f09 /src
parentfff0f50773b45690d571852b139bd6da7b6a45ae (diff)
downloadscala-a8d60a6c76d2d5434148c2d7c8f2bf147855252c.tar.gz
scala-a8d60a6c76d2d5434148c2d7c8f2bf147855252c.tar.bz2
scala-a8d60a6c76d2d5434148c2d7c8f2bf147855252c.zip
Name boolean arguments in src/reflect.
Diffstat (limited to 'src')
-rw-r--r--src/reflect/scala/reflect/internal/CapturedVariables.scala2
-rw-r--r--src/reflect/scala/reflect/internal/Kinds.scala2
-rw-r--r--src/reflect/scala/reflect/internal/Positions.scala4
-rw-r--r--src/reflect/scala/reflect/internal/Printers.scala8
-rw-r--r--src/reflect/scala/reflect/internal/Symbols.scala2
-rw-r--r--src/reflect/scala/reflect/internal/Types.scala26
-rw-r--r--src/reflect/scala/reflect/internal/util/TableDef.scala4
-rw-r--r--src/reflect/scala/reflect/io/AbstractFile.scala4
-rw-r--r--src/reflect/scala/reflect/io/File.scala2
-rw-r--r--src/reflect/scala/reflect/io/VirtualDirectory.scala4
-rw-r--r--src/reflect/scala/reflect/io/ZipArchive.scala4
11 files changed, 31 insertions, 31 deletions
diff --git a/src/reflect/scala/reflect/internal/CapturedVariables.scala b/src/reflect/scala/reflect/internal/CapturedVariables.scala
index 77909d9157..c262c8474a 100644
--- a/src/reflect/scala/reflect/internal/CapturedVariables.scala
+++ b/src/reflect/scala/reflect/internal/CapturedVariables.scala
@@ -19,7 +19,7 @@ trait CapturedVariables { self: SymbolTable =>
/** Convert type of a captured variable to *Ref type.
*/
def capturedVariableType(vble: Symbol): Type =
- capturedVariableType(vble, NoType, false)
+ capturedVariableType(vble, NoType, erasedTypes = false)
/** Convert type of a captured variable to *Ref type.
*/
diff --git a/src/reflect/scala/reflect/internal/Kinds.scala b/src/reflect/scala/reflect/internal/Kinds.scala
index 5d7df8c367..cc8dd16d69 100644
--- a/src/reflect/scala/reflect/internal/Kinds.scala
+++ b/src/reflect/scala/reflect/internal/Kinds.scala
@@ -86,7 +86,7 @@ trait Kinds {
// plan: split into kind inference and subkinding
// every Type has a (cached) Kind
def kindsConform(tparams: List[Symbol], targs: List[Type], pre: Type, owner: Symbol): Boolean =
- checkKindBounds0(tparams, targs, pre, owner, false).isEmpty
+ checkKindBounds0(tparams, targs, pre, owner, explainErrors = false).isEmpty
/** Check whether `sym1`'s variance conforms to `sym2`'s variance.
*
diff --git a/src/reflect/scala/reflect/internal/Positions.scala b/src/reflect/scala/reflect/internal/Positions.scala
index f5aeec63e1..cc32a0363f 100644
--- a/src/reflect/scala/reflect/internal/Positions.scala
+++ b/src/reflect/scala/reflect/internal/Positions.scala
@@ -36,7 +36,7 @@ trait Positions extends api.Positions { self: SymbolTable =>
* If some of the trees are ranges, returns a range position enclosing all ranges
* Otherwise returns default position that is either focused or not.
*/
- def wrappingPos(default: Position, trees: List[Tree]): Position = wrappingPos(default, trees, true)
+ def wrappingPos(default: Position, trees: List[Tree]): Position = wrappingPos(default, trees, focus = true)
def wrappingPos(default: Position, trees: List[Tree], focus: Boolean): Position = {
if (useOffsetPositions) default else {
val ranged = trees filter (_.pos.isRange)
@@ -61,7 +61,7 @@ trait Positions extends api.Positions { self: SymbolTable =>
* shortening the range, assigning TransparentPositions
* to some of the nodes in `tree` or focusing on the position.
*/
- def ensureNonOverlapping(tree: Tree, others: List[Tree]){ ensureNonOverlapping(tree, others, true) }
+ def ensureNonOverlapping(tree: Tree, others: List[Tree]){ ensureNonOverlapping(tree, others, focus = true) }
def ensureNonOverlapping(tree: Tree, others: List[Tree], focus: Boolean) {
if (useOffsetPositions) return
diff --git a/src/reflect/scala/reflect/internal/Printers.scala b/src/reflect/scala/reflect/internal/Printers.scala
index 55f7704056..28837c4ae8 100644
--- a/src/reflect/scala/reflect/internal/Printers.scala
+++ b/src/reflect/scala/reflect/internal/Printers.scala
@@ -25,8 +25,8 @@ trait Printers extends api.Printers { self: SymbolTable =>
if (nme.keywords(term) && term != nme.USCOREkw) "`%s`" format s
else s
}
- def quotedName(name: Name): String = quotedName(name, false)
- def quotedName(name: String): String = quotedName(newTermName(name), false)
+ def quotedName(name: Name): String = quotedName(name, decode = false)
+ def quotedName(name: String): String = quotedName(newTermName(name), decode = false)
private def symNameInternal(tree: Tree, name: Name, decoded: Boolean): String = {
val sym = tree.symbol
@@ -43,8 +43,8 @@ trait Printers extends api.Printers { self: SymbolTable =>
}
}
- def decodedSymName(tree: Tree, name: Name) = symNameInternal(tree, name, true)
- def symName(tree: Tree, name: Name) = symNameInternal(tree, name, false)
+ def decodedSymName(tree: Tree, name: Name) = symNameInternal(tree, name, decoded = true)
+ def symName(tree: Tree, name: Name) = symNameInternal(tree, name, decoded = false)
/** Turns a path into a String, introducing backquotes
* as necessary.
diff --git a/src/reflect/scala/reflect/internal/Symbols.scala b/src/reflect/scala/reflect/internal/Symbols.scala
index ff83cb5f26..26ca62c44a 100644
--- a/src/reflect/scala/reflect/internal/Symbols.scala
+++ b/src/reflect/scala/reflect/internal/Symbols.scala
@@ -2192,7 +2192,7 @@ trait Symbols extends api.Symbols { self: SymbolTable =>
)
/** The setter of this value or getter definition, or NoSymbol if none exists */
- final def setter(base: Symbol): Symbol = setter(base, false)
+ final def setter(base: Symbol): Symbol = setter(base, hasExpandedName = false)
final def setter(base: Symbol, hasExpandedName: Boolean): Symbol = {
var sname = nme.getterToSetter(nme.getterName(name.toTermName))
diff --git a/src/reflect/scala/reflect/internal/Types.scala b/src/reflect/scala/reflect/internal/Types.scala
index 22ba6d43e9..365e9a1682 100644
--- a/src/reflect/scala/reflect/internal/Types.scala
+++ b/src/reflect/scala/reflect/internal/Types.scala
@@ -705,7 +705,7 @@ trait Types extends api.Types { self: SymbolTable =>
findMembers(excludedFlags, requiredFlags)
def memberBasedOnName(name: Name, excludedFlags: Long): Symbol =
- findMember(name, excludedFlags, 0, false)
+ findMember(name, excludedFlags, 0, stableOnly = false)
/** The least type instance of given class which is a supertype
* of this type. Example:
@@ -925,7 +925,7 @@ trait Types extends api.Types { self: SymbolTable =>
def matches(that: Type): Boolean = matchesType(this, that, !phase.erasedTypes)
/** Same as matches, except that non-method types are always assumed to match. */
- def looselyMatches(that: Type): Boolean = matchesType(this, that, true)
+ def looselyMatches(that: Type): Boolean = matchesType(this, that, alwaysMatchSimple = true)
/** The shortest sorted upwards closed array of types that contains
* this type as first element.
@@ -2844,7 +2844,7 @@ trait Types extends api.Types { self: SymbolTable =>
val tvars = quantifiedFresh map (tparam => TypeVar(tparam))
val underlying1 = underlying.instantiateTypeParams(quantified, tvars) // fuse subst quantified -> quantifiedFresh -> tvars
op(underlying1) && {
- solve(tvars, quantifiedFresh, quantifiedFresh map (_ => Invariant), false, depth) &&
+ solve(tvars, quantifiedFresh, quantifiedFresh map (_ => Invariant), upper = false, depth) &&
isWithinBounds(NoPrefix, NoSymbol, quantifiedFresh, tvars map (_.constr.inst))
}
}
@@ -3259,7 +3259,7 @@ trait Types extends api.Types { self: SymbolTable =>
* (`T` corresponds to @param sym)
*/
def registerTypeSelection(sym: Symbol, tp: Type): Boolean = {
- registerBound(HasTypeMember(sym.name.toTypeName, tp), false)
+ registerBound(HasTypeMember(sym.name.toTypeName, tp), isLowerBound = false)
}
private def isSkolemAboveLevel(tp: Type) = tp.typeSymbol match {
@@ -5035,7 +5035,7 @@ trait Types extends api.Types { self: SymbolTable =>
}
}
else {
- var rebind0 = pre.findMember(sym.name, BRIDGE, 0, true) orElse {
+ var rebind0 = pre.findMember(sym.name, BRIDGE, 0, stableOnly = true) orElse {
if (sym.isAliasType) throw missingAliasException
devWarning(s"$pre.$sym no longer exist at phase $phase")
throw new MissingTypeControl // For build manager and presentation compiler purposes
@@ -5840,7 +5840,7 @@ trait Types extends api.Types { self: SymbolTable =>
case AnnotatedType(_, _, _) | BoundedWildcardType(_) =>
secondTry
case _ =>
- tv2.registerBound(tp1, true)
+ tv2.registerBound(tp1, isLowerBound = true)
}
case _ =>
secondTry
@@ -5858,7 +5858,7 @@ trait Types extends api.Types { self: SymbolTable =>
case BoundedWildcardType(bounds) =>
isSubType(tp1.bounds.lo, tp2, depth)
case tv @ TypeVar(_,_) =>
- tv.registerBound(tp2, false)
+ tv.registerBound(tp2, isLowerBound = false)
case ExistentialType(_, _) =>
try {
skolemizationLevel += 1
@@ -6036,7 +6036,7 @@ trait Types extends api.Types { self: SymbolTable =>
def lastTry =
tp2 match {
case ExistentialType(_, res2) if alwaysMatchSimple =>
- matchesType(tp1, res2, true)
+ matchesType(tp1, res2, alwaysMatchSimple = true)
case MethodType(_, _) =>
false
case PolyType(_, _) =>
@@ -6056,7 +6056,7 @@ trait Types extends api.Types { self: SymbolTable =>
if (params1.isEmpty) matchesType(res1, res2, alwaysMatchSimple)
else matchesType(tp1, res2, alwaysMatchSimple)
case ExistentialType(_, res2) =>
- alwaysMatchSimple && matchesType(tp1, res2, true)
+ alwaysMatchSimple && matchesType(tp1, res2, alwaysMatchSimple = true)
case TypeRef(_, sym, Nil) =>
params1.isEmpty && sym.isModuleClass && matchesType(res1, tp2, alwaysMatchSimple)
case _ =>
@@ -6069,7 +6069,7 @@ trait Types extends api.Types { self: SymbolTable =>
case NullaryMethodType(res2) =>
matchesType(res1, res2, alwaysMatchSimple)
case ExistentialType(_, res2) =>
- alwaysMatchSimple && matchesType(tp1, res2, true)
+ alwaysMatchSimple && matchesType(tp1, res2, alwaysMatchSimple = true)
case TypeRef(_, sym, Nil) if sym.isModuleClass =>
matchesType(res1, tp2, alwaysMatchSimple)
case _ =>
@@ -6083,7 +6083,7 @@ trait Types extends api.Types { self: SymbolTable =>
else
matchesQuantified(tparams1, tparams2, res1, res2)
case ExistentialType(_, res2) =>
- alwaysMatchSimple && matchesType(tp1, res2, true)
+ alwaysMatchSimple && matchesType(tp1, res2, alwaysMatchSimple = true)
case _ =>
false // remember that tparams1.nonEmpty is now an invariant of PolyType
}
@@ -6092,7 +6092,7 @@ trait Types extends api.Types { self: SymbolTable =>
case ExistentialType(tparams2, res2) =>
matchesQuantified(tparams1, tparams2, res1, res2)
case _ =>
- if (alwaysMatchSimple) matchesType(res1, tp2, true)
+ if (alwaysMatchSimple) matchesType(res1, tp2, alwaysMatchSimple = true)
else lastTry
}
case TypeRef(_, sym, Nil) if sym.isModuleClass =>
@@ -6288,7 +6288,7 @@ trait Types extends api.Types { self: SymbolTable =>
val columns: List[Column[List[Type]]] = mapWithIndex(sorted) {
case ((k, v), idx) =>
- Column(str(k), (xs: List[Type]) => str(xs(idx)), true)
+ Column(str(k), (xs: List[Type]) => str(xs(idx)), left = true)
}
val tableDef = TableDef(columns: _*)
diff --git a/src/reflect/scala/reflect/internal/util/TableDef.scala b/src/reflect/scala/reflect/internal/util/TableDef.scala
index 04ecfe8d76..d57c59757d 100644
--- a/src/reflect/scala/reflect/internal/util/TableDef.scala
+++ b/src/reflect/scala/reflect/internal/util/TableDef.scala
@@ -19,8 +19,8 @@ class TableDef[T](_cols: Column[T]*) {
* if none is specified, a space is used.
*/
def ~(next: Column[T]) = retThis(cols :+= next)
- def >>(pair: (String, T => Any)) = this ~ Column(pair._1, pair._2, false)
- def <<(pair: (String, T => Any)) = this ~ Column(pair._1, pair._2, true)
+ def >>(pair: (String, T => Any)) = this ~ Column(pair._1, pair._2, left = false)
+ def <<(pair: (String, T => Any)) = this ~ Column(pair._1, pair._2, left = true)
def >+(sep: String) = retThis(separators += ((cols.size - 1, sep)))
/** Below this point should all be considered private/internal.
diff --git a/src/reflect/scala/reflect/io/AbstractFile.scala b/src/reflect/scala/reflect/io/AbstractFile.scala
index bd6c186825..4d6f14c71d 100644
--- a/src/reflect/scala/reflect/io/AbstractFile.scala
+++ b/src/reflect/scala/reflect/io/AbstractFile.scala
@@ -227,7 +227,7 @@ abstract class AbstractFile extends Iterable[AbstractFile] {
*/
def fileNamed(name: String): AbstractFile = {
assert(isDirectory, "Tried to find '%s' in '%s' but it is not a directory".format(name, path))
- fileOrSubdirectoryNamed(name, false)
+ fileOrSubdirectoryNamed(name, isDir = false)
}
/**
@@ -236,7 +236,7 @@ abstract class AbstractFile extends Iterable[AbstractFile] {
*/
def subdirectoryNamed(name: String): AbstractFile = {
assert (isDirectory, "Tried to find '%s' in '%s' but it is not a directory".format(name, path))
- fileOrSubdirectoryNamed(name, true)
+ fileOrSubdirectoryNamed(name, isDir = true)
}
protected def unsupported(): Nothing = unsupported(null)
diff --git a/src/reflect/scala/reflect/io/File.scala b/src/reflect/scala/reflect/io/File.scala
index c74dc06501..64651dcfbd 100644
--- a/src/reflect/scala/reflect/io/File.scala
+++ b/src/reflect/scala/reflect/io/File.scala
@@ -72,7 +72,7 @@ class File(jfile: JFile)(implicit constructorCodec: Codec) extends Path(jfile) w
/** Wraps a BufferedWriter around the result of writer().
*/
- def bufferedWriter(): BufferedWriter = bufferedWriter(false)
+ def bufferedWriter(): BufferedWriter = bufferedWriter(append = false)
def bufferedWriter(append: Boolean): BufferedWriter = bufferedWriter(append, creationCodec)
def bufferedWriter(append: Boolean, codec: Codec): BufferedWriter =
new BufferedWriter(writer(append, codec))
diff --git a/src/reflect/scala/reflect/io/VirtualDirectory.scala b/src/reflect/scala/reflect/io/VirtualDirectory.scala
index ae0dd2032c..210167e5c6 100644
--- a/src/reflect/scala/reflect/io/VirtualDirectory.scala
+++ b/src/reflect/scala/reflect/io/VirtualDirectory.scala
@@ -54,14 +54,14 @@ extends AbstractFile {
(files get name filter (_.isDirectory == directory)).orNull
override def fileNamed(name: String): AbstractFile =
- Option(lookupName(name, false)) getOrElse {
+ Option(lookupName(name, directory = false)) getOrElse {
val newFile = new VirtualFile(name, path+'/'+name)
files(name) = newFile
newFile
}
override def subdirectoryNamed(name: String): AbstractFile =
- Option(lookupName(name, true)) getOrElse {
+ Option(lookupName(name, directory = true)) getOrElse {
val dir = new VirtualDirectory(name, Some(this))
files(name) = dir
dir
diff --git a/src/reflect/scala/reflect/io/ZipArchive.scala b/src/reflect/scala/reflect/io/ZipArchive.scala
index 78fc8d9cc8..5414441e00 100644
--- a/src/reflect/scala/reflect/io/ZipArchive.scala
+++ b/src/reflect/scala/reflect/io/ZipArchive.scala
@@ -39,8 +39,8 @@ object ZipArchive {
*/
def fromURL(url: URL): URLZipArchive = new URLZipArchive(url)
- private def dirName(path: String) = splitPath(path, true)
- private def baseName(path: String) = splitPath(path, false)
+ private def dirName(path: String) = splitPath(path, front = true)
+ private def baseName(path: String) = splitPath(path, front = false)
private def splitPath(path0: String, front: Boolean): String = {
val isDir = path0.charAt(path0.length - 1) == '/'
val path = if (isDir) path0.substring(0, path0.length - 1) else path0