summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-08-27 18:02:20 +0000
committerPaul Phillips <paulp@improving.org>2011-08-27 18:02:20 +0000
commitf0b042b33558345d815ca926360b8071b92461aa (patch)
tree81aaa5c8bf71f5ccdc0aa29d1f720fd65c54acf4 /src/compiler
parent2c548eac23014bff46f563dd4fdfd65bc7aaa54c (diff)
downloadscala-f0b042b33558345d815ca926360b8071b92461aa.tar.gz
scala-f0b042b33558345d815ca926360b8071b92461aa.tar.bz2
scala-f0b042b33558345d815ca926360b8071b92461aa.zip
Fixing up a few instances of suboptimal reversi...
Fixing up a few instances of suboptimal reversing, no review.
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/backend/icode/BasicBlocks.scala2
-rw-r--r--src/compiler/scala/tools/nsc/backend/opt/ClosureElimination.scala2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/icode/BasicBlocks.scala b/src/compiler/scala/tools/nsc/backend/icode/BasicBlocks.scala
index 03f08dbddd..56e05cdc04 100644
--- a/src/compiler/scala/tools/nsc/backend/icode/BasicBlocks.scala
+++ b/src/compiler/scala/tools/nsc/backend/icode/BasicBlocks.scala
@@ -94,7 +94,7 @@ trait BasicBlocks {
/** Return an iterator over the instructions in this basic block. */
def iterator: Iterator[Instruction] =
- if (closed) instrs.iterator else instructionList.reverse.iterator
+ if (closed) instrs.iterator else instructionList.reverseIterator
/** return the underlying array of instructions */
def getArray: Array[Instruction] = {
diff --git a/src/compiler/scala/tools/nsc/backend/opt/ClosureElimination.scala b/src/compiler/scala/tools/nsc/backend/opt/ClosureElimination.scala
index e0d51aee16..3e921cf472 100644
--- a/src/compiler/scala/tools/nsc/backend/opt/ClosureElimination.scala
+++ b/src/compiler/scala/tools/nsc/backend/opt/ClosureElimination.scala
@@ -232,7 +232,7 @@ abstract class ClosureElimination extends SubComponent {
while (t != Nil) {
peep(b, h, t.head) match {
case Some(newInstrs) =>
- newInstructions = seen.reverse ::: newInstrs ::: t.tail;
+ newInstructions = seen reverse_::: newInstrs ::: t.tail
redo = true
case None =>
()