summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc
diff options
context:
space:
mode:
authorGeoffrey Washburn <geoffrey.washburn@epfl.ch>2008-03-03 14:53:47 +0000
committerGeoffrey Washburn <geoffrey.washburn@epfl.ch>2008-03-03 14:53:47 +0000
commit0b67c4eaa0ad73d6b6292d90eefef7701200bace (patch)
treec641ffc85969d4193e61e900a1700718c358c805 /src/compiler/scala/tools/nsc
parent9797470c1c626cb3a45901e2a65773e6ef625241 (diff)
downloadscala-0b67c4eaa0ad73d6b6292d90eefef7701200bace.tar.gz
scala-0b67c4eaa0ad73d6b6292d90eefef7701200bace.tar.bz2
scala-0b67c4eaa0ad73d6b6292d90eefef7701200bace.zip
Elminiated a number of redundant calls to toString
Diffstat (limited to 'src/compiler/scala/tools/nsc')
-rw-r--r--src/compiler/scala/tools/nsc/MainTokenMetric.scala2
-rw-r--r--src/compiler/scala/tools/nsc/ast/TreePrinters.scala2
-rw-r--r--src/compiler/scala/tools/nsc/models/SemanticTokens.scala4
-rw-r--r--src/compiler/scala/tools/nsc/symtab/StdNames.scala4
-rw-r--r--src/compiler/scala/tools/nsc/symtab/Symbols.scala2
5 files changed, 7 insertions, 7 deletions
diff --git a/src/compiler/scala/tools/nsc/MainTokenMetric.scala b/src/compiler/scala/tools/nsc/MainTokenMetric.scala
index f555928a20..bf4cff7795 100644
--- a/src/compiler/scala/tools/nsc/MainTokenMetric.scala
+++ b/src/compiler/scala/tools/nsc/MainTokenMetric.scala
@@ -34,7 +34,7 @@ object MainTokenMetric {
}
Console.print(i.toString())
Console.print(" ")
- Console.println(source.toString())
+ Console.println(source)
totale += i
}
Console.println(totale.toString()+" total")
diff --git a/src/compiler/scala/tools/nsc/ast/TreePrinters.scala b/src/compiler/scala/tools/nsc/ast/TreePrinters.scala
index b148bb9b56..fd1c3e786b 100644
--- a/src/compiler/scala/tools/nsc/ast/TreePrinters.scala
+++ b/src/compiler/scala/tools/nsc/ast/TreePrinters.scala
@@ -110,7 +110,7 @@ abstract class TreePrinters {
def printFlags(flags: Long, privateWithin: String) {
var mask: Long = if (settings.debug.value) -1L else PrintableFlags
- val s = flagsToString(flags & mask, privateWithin.toString)
+ val s = flagsToString(flags & mask, privateWithin)
if (s.length() != 0) print(s + " ")
}
diff --git a/src/compiler/scala/tools/nsc/models/SemanticTokens.scala b/src/compiler/scala/tools/nsc/models/SemanticTokens.scala
index 1f246078f4..dd2cc02a45 100644
--- a/src/compiler/scala/tools/nsc/models/SemanticTokens.scala
+++ b/src/compiler/scala/tools/nsc/models/SemanticTokens.scala
@@ -159,7 +159,7 @@ class SemanticTokens(val compiler: Global) {
else new Info(symbol)
abstract class Semantic(val symbol: Symbol) extends Actual {
- val name = NameTransformer.decode(symbol.name.toString()).toString().trim()
+ val name = NameTransformer.decode(symbol.name.toString).trim()
assert(symbol != NoSymbol)
def myOuter = Process.this
@@ -519,7 +519,7 @@ class SemanticTokens(val compiler: Global) {
//Thread.dumpStack()
}
else if (term != NoSymbol) {
- val name = NameTransformer.decode(term.name.toString()).toString().trim()
+ val name = NameTransformer.decode(term.name.toString).trim()
val buf = unit.source.asInstanceOf[BatchSourceFile].content
val cs = name.toChars
var idx = 0
diff --git a/src/compiler/scala/tools/nsc/symtab/StdNames.scala b/src/compiler/scala/tools/nsc/symtab/StdNames.scala
index 9403280384..69b7448bf1 100644
--- a/src/compiler/scala/tools/nsc/symtab/StdNames.scala
+++ b/src/compiler/scala/tools/nsc/symtab/StdNames.scala
@@ -151,10 +151,10 @@ trait StdNames {
def isProtectedAccessor(name: Name) = name.startsWith(PROTECTED_PREFIX)
/** The name of an accessor for protected symbols. */
- def protName(name: Name): Name = newTermName(PROTECTED_PREFIX.toString() + name)
+ def protName(name: Name): Name = newTermName(PROTECTED_PREFIX + name)
/** The name of a setter for protected symbols. Used for inherited Java fields. */
- def protSetterName(name: Name): Name = newTermName(PROTECTED_PREFIX.toString() + "set" + name)
+ def protSetterName(name: Name): Name = newTermName(PROTECTED_PREFIX + "set" + name)
/** The name of bitmaps for initialized lazy vals. */
def bitmapName(n: Int): Name = newTermName("bitmap$" + n)
diff --git a/src/compiler/scala/tools/nsc/symtab/Symbols.scala b/src/compiler/scala/tools/nsc/symtab/Symbols.scala
index 3208ea16b0..e863e12766 100644
--- a/src/compiler/scala/tools/nsc/symtab/Symbols.scala
+++ b/src/compiler/scala/tools/nsc/symtab/Symbols.scala
@@ -1123,7 +1123,7 @@ trait Symbols {
* If settings.uniquId adds id.
*/
def nameString: String = {
- var s = simpleName.decode.toString
+ var s = simpleName.decode
if (s endsWith nme.LOCAL_SUFFIX)
s = s.substring(0, s.length - nme.LOCAL_SUFFIX.length)
if (s endsWith ".type")